dsh-open-artifact 0.16.2 → 0.16.3

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 (109) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/icon.svg +1 -1
  3. package/lib/client.js +2504 -2430
  4. package/lib/index.js +26 -8
  5. package/package.json +1 -1
  6. package/skills/open-artifact/SKILL.md +8 -5
  7. package/vendor/frame-host/client/comments.js +1 -1
  8. package/vendor/frame-host/frame-host.mjs +15 -2
  9. package/vendor/harnesses/antigravity.json +3 -0
  10. package/vendor/harnesses/chatgpt.json +3 -0
  11. package/vendor/harnesses/claude-code.json +3 -0
  12. package/vendor/harnesses/codex.json +3 -0
  13. package/vendor/harnesses/copilot.json +3 -0
  14. package/vendor/harnesses/cursor.json +3 -0
  15. package/vendor/harnesses/dsh.json +3 -0
  16. package/vendor/harnesses/zcode.json +3 -0
  17. package/vendor/home/assets/index-BMcfb5B7.css +1 -0
  18. package/vendor/home/assets/index-CxVzqoE0.js +43 -0
  19. package/vendor/home/index.html +2 -2
  20. package/vendor/open-artifact.mjs +1278 -456
  21. package/vendor/runtime.json +1 -1
  22. package/vendor/shell/assets/index-BMcfb5B7.css +1 -0
  23. package/vendor/{type-server/shell/assets/index-xloVcJb_.js → shell/assets/index-C_XsG-Qe.js} +1 -1
  24. package/vendor/shell/index.html +2 -2
  25. package/vendor/type-server/cli.mjs +16 -3
  26. package/vendor/type-server/editors/data/assets/{index-DcaVBiGm.js → index-CMhqwoHV.js} +1 -1
  27. package/vendor/type-server/editors/data/index.html +1 -1
  28. package/vendor/type-server/editors/design/assets/{index-B5Wv_tnf.js → index-DUW-k3ks.js} +1 -1
  29. package/vendor/type-server/editors/design/index.html +1 -1
  30. package/vendor/type-server/editors/design-system/assets/{index-BqDGbG4f.js → index-l9dVDF3y.js} +1 -1
  31. package/vendor/type-server/editors/design-system/index.html +1 -1
  32. package/vendor/type-server/editors/docs/assets/{abnfDiagram-WEYOIA3C-CDTl-yCx.js → abnfDiagram-WEYOIA3C-C7HiIlhQ.js} +1 -1
  33. package/vendor/type-server/editors/docs/assets/{architectureDiagram-ZHVYKT53-BOl_bS-V.js → architectureDiagram-ZHVYKT53-BNtmYbnl.js} +1 -1
  34. package/vendor/type-server/editors/docs/assets/{blockDiagram-RJAE7QA3-CkMxyQ6a.js → blockDiagram-RJAE7QA3-CmB3Jqrq.js} +1 -1
  35. package/vendor/type-server/editors/docs/assets/{c4Diagram-XDPPPE54-BLHAzoyQ.js → c4Diagram-XDPPPE54-BInEfPqU.js} +1 -1
  36. package/vendor/type-server/editors/docs/assets/channel-BT2p6jtG.js +1 -0
  37. package/vendor/type-server/editors/docs/assets/{chunk-2E7WHVMD-B2ZKLsyS.js → chunk-2E7WHVMD-DERsVzyR.js} +1 -1
  38. package/vendor/type-server/editors/docs/assets/{chunk-2Q5K7J3B-DkNtD1xL.js → chunk-2Q5K7J3B-C5h24pTP.js} +1 -1
  39. package/vendor/type-server/editors/docs/assets/{chunk-4EMNKR2T-C3xRZwqt.js → chunk-4EMNKR2T-CtlMesOe.js} +1 -1
  40. package/vendor/type-server/editors/docs/assets/{chunk-55XCU76K-DEOjkZqt.js → chunk-55XCU76K-BcHXSlto.js} +1 -1
  41. package/vendor/type-server/editors/docs/assets/{chunk-5VM5RSS4-DCKBSHxZ.js → chunk-5VM5RSS4-DnqXPWSg.js} +1 -1
  42. package/vendor/type-server/editors/docs/assets/{chunk-JWPE2WC7-DrvooUmN.js → chunk-JWPE2WC7-Bls1jQHy.js} +1 -1
  43. package/vendor/type-server/editors/docs/assets/{chunk-VQ5W62QI-DYMeK3pU.js → chunk-VQ5W62QI-B-9NPBBl.js} +1 -1
  44. package/vendor/type-server/editors/docs/assets/{chunk-XXDRQBXY-Cvl-anAV.js → chunk-XXDRQBXY-DqHJwIOI.js} +1 -1
  45. package/vendor/type-server/editors/docs/assets/{chunk-ZCHMQSOR-gWl3U20G.js → chunk-ZCHMQSOR-CO0N7boC.js} +2 -2
  46. package/vendor/type-server/editors/docs/assets/{classDiagram-v2-4MYWR3UA-On9X3_w5.js → classDiagram-v2-4MYWR3UA-Dm4tBHd-.js} +1 -1
  47. package/vendor/type-server/editors/docs/assets/{core-Cw4Llisp.js → core-CMnn1N7u.js} +1 -1
  48. package/vendor/type-server/editors/docs/assets/{cose-bilkent-JH36ORCC-B72D_yQn.js → cose-bilkent-JH36ORCC-DGyUtGAA.js} +1 -1
  49. package/vendor/type-server/editors/docs/assets/{cynefin-EF2NZ3EQ-B_v4ABxk.js → cynefin-EF2NZ3EQ-BdlZazYw.js} +1 -1
  50. package/vendor/type-server/editors/docs/assets/{cynefinDiagram-WF24UDRP-Bu9uLebD.js → cynefinDiagram-WF24UDRP-BjKufr-c.js} +1 -1
  51. package/vendor/type-server/editors/docs/assets/{dagre-NK4GIZVX-DOkgWNtI.js → dagre-NK4GIZVX-BZlO2--v.js} +1 -1
  52. package/vendor/type-server/editors/docs/assets/{diagram-CBK3MWTC-CgIhmBRJ.js → diagram-CBK3MWTC-3STWIa1n.js} +1 -1
  53. package/vendor/type-server/editors/docs/assets/{diagram-I5XIIV2D-HpeiOnYm.js → diagram-I5XIIV2D-BIiZBp1S.js} +1 -1
  54. package/vendor/type-server/editors/docs/assets/{diagram-ODIL2UCW-CWmar6iG.js → diagram-ODIL2UCW-Cxn7JmvU.js} +1 -1
  55. package/vendor/type-server/editors/docs/assets/{diagram-PFBEJUXE-CXcCGIYn.js → diagram-PFBEJUXE-D2k1jJ3f.js} +1 -1
  56. package/vendor/type-server/editors/docs/assets/{diagram-RJA3I4VV-jEFt8GAQ.js → diagram-RJA3I4VV-7ZRL3Uk6.js} +1 -1
  57. package/vendor/type-server/editors/docs/assets/{diagram-TYUNFSNR-Da-kw_Xm.js → diagram-TYUNFSNR-Jyx-ylJA.js} +1 -1
  58. package/vendor/type-server/editors/docs/assets/{ebnfDiagram-V4P3TTPT-BaZ03UMA.js → ebnfDiagram-V4P3TTPT-DGfWrKui.js} +1 -1
  59. package/vendor/type-server/editors/docs/assets/{elk-QONTBCTQ-Bri5BDi4.js → elk-QONTBCTQ-B7tKj3Ar.js} +1 -1
  60. package/vendor/type-server/editors/docs/assets/{erDiagram-KYQIGQAA-aju23vzr.js → erDiagram-KYQIGQAA-D06HHDAP.js} +1 -1
  61. package/vendor/type-server/editors/docs/assets/{flowDiagram-IUGLLWBU-DezRFFND.js → flowDiagram-IUGLLWBU-CZJZKHIM.js} +1 -1
  62. package/vendor/type-server/editors/docs/assets/{ganttDiagram-R7GPNTJY-DDDYA5M0.js → ganttDiagram-R7GPNTJY-BaBRsp-X.js} +1 -1
  63. package/vendor/type-server/editors/docs/assets/{gitGraphDiagram-PDYL7XHY-Brbvftki.js → gitGraphDiagram-PDYL7XHY-B2bt-1sQ.js} +1 -1
  64. package/vendor/type-server/editors/docs/assets/{index-rie6Fmea.js → index-YZPGEMCI.js} +3 -3
  65. package/vendor/type-server/editors/docs/assets/{infoDiagram-MVDRKAX5-Buk7jjzD.js → infoDiagram-MVDRKAX5-C1qijMFd.js} +1 -1
  66. package/vendor/type-server/editors/docs/assets/{ishikawaDiagram-HPEHV2GE-k1-dGoms.js → ishikawaDiagram-HPEHV2GE-C2fcPeVy.js} +1 -1
  67. package/vendor/type-server/editors/docs/assets/{journeyDiagram-BOSHW7O7-fuODgQ0y.js → journeyDiagram-BOSHW7O7-DAdGOjA_.js} +1 -1
  68. package/vendor/type-server/editors/docs/assets/{kanban-definition-FNSA4HC5-0EJOb8QO.js → kanban-definition-FNSA4HC5-Cjm2BYYa.js} +1 -1
  69. package/vendor/type-server/editors/docs/assets/{mermaid.core-rflC9T3b.js → mermaid.core-T4owCd57.js} +4 -4
  70. package/vendor/type-server/editors/docs/assets/{mindmap-definition-6OY57UG3-BA4jPnUz.js → mindmap-definition-6OY57UG3-DqNbrCsa.js} +1 -1
  71. package/vendor/type-server/editors/docs/assets/{pegDiagram-ECIUJNBX-D1mSs1Df.js → pegDiagram-ECIUJNBX-B8pnl9eq.js} +1 -1
  72. package/vendor/type-server/editors/docs/assets/{pieDiagram-GNMPY74T-DISpmq94.js → pieDiagram-GNMPY74T-CqN2ryDn.js} +1 -1
  73. package/vendor/type-server/editors/docs/assets/{quadrantDiagram-D57K4MC3-C_DveStJ.js → quadrantDiagram-D57K4MC3-D6ZHYaMj.js} +1 -1
  74. package/vendor/type-server/editors/docs/assets/{railroadDiagram-Y72NRBL7-XkLhMgFv.js → railroadDiagram-Y72NRBL7-DbFNy0DV.js} +1 -1
  75. package/vendor/type-server/editors/docs/assets/{requirementDiagram-EQYSW5RA-DKtU2dUB.js → requirementDiagram-EQYSW5RA-CBjn24a2.js} +1 -1
  76. package/vendor/type-server/editors/docs/assets/{sankeyDiagram-SY24JHO5-DXnpKoyA.js → sankeyDiagram-SY24JHO5-Be5yf8X0.js} +1 -1
  77. package/vendor/type-server/editors/docs/assets/{sequenceDiagram-BLEHNHQU-D3XryRDT.js → sequenceDiagram-BLEHNHQU-CM75oaFL.js} +1 -1
  78. package/vendor/type-server/editors/docs/assets/{sizeCapture-INFHLROL-Ce0anhUv.js → sizeCapture-INFHLROL-BS3ZKpfq.js} +1 -1
  79. package/vendor/type-server/editors/docs/assets/{stateDiagram-v2-A6IESKWZ-C_-4V6la.js → stateDiagram-v2-A6IESKWZ-DBao6lhy.js} +1 -1
  80. package/vendor/type-server/editors/docs/assets/{swimlanes-B3ENRKFQ-DsaAidHj.js → swimlanes-B3ENRKFQ-OBdPnY1S.js} +1 -1
  81. package/vendor/type-server/editors/docs/assets/swimlanesDiagram-AYQRV4AK-D73Zrbfj.js +8 -0
  82. package/vendor/type-server/editors/docs/assets/{timeline-definition-JXYKGLGB-DfKECQ2o.js → timeline-definition-JXYKGLGB-BqkDYP31.js} +1 -1
  83. package/vendor/type-server/editors/docs/assets/{usecaseDiagram-WPOLBNNX-Dc8tWzRe.js → usecaseDiagram-WPOLBNNX-0IvdCTW3.js} +1 -1
  84. package/vendor/type-server/editors/docs/assets/{vennDiagram-Q3Y3IDCW-tc61BjSp.js → vennDiagram-Q3Y3IDCW-Dt2rtwRE.js} +1 -1
  85. package/vendor/type-server/editors/docs/assets/{wardleyDiagram-IVAIDKWA-DyVqcsy4.js → wardleyDiagram-IVAIDKWA-G9f9s0F7.js} +1 -1
  86. package/vendor/type-server/editors/docs/assets/{xychartDiagram-4URNHDU4-B8VxiLaY.js → xychartDiagram-4URNHDU4-CaUTu_0n.js} +1 -1
  87. package/vendor/type-server/editors/docs/index.html +1 -1
  88. package/vendor/type-server/editors/motion/assets/{gif-jobs-DY7KR2r5.js → gif-jobs-C1zQj3s9.js} +1 -1
  89. package/vendor/type-server/editors/motion/assets/{index-DBRxctvJ.js → index-Cw_UcKR5.js} +3 -3
  90. package/vendor/type-server/editors/motion/assets/{src-CP9lpzx7.js → src-wn9P_DUt.js} +1 -1
  91. package/vendor/type-server/editors/motion/index.html +1 -1
  92. package/vendor/type-server/editors/sheets/assets/{index-B6FKM2kq.js → index-C3CIL5GM.js} +2 -2
  93. package/vendor/type-server/editors/sheets/assets/{workbook-worker-D4VqJhLz.js → workbook-worker-CbhVg0YQ.js} +1 -1
  94. package/vendor/type-server/editors/sheets/index.html +1 -1
  95. package/vendor/type-server/editors/slides/assets/{index-DI_AWWuc.js → index-fJEPQZQY.js} +2 -2
  96. package/vendor/type-server/editors/slides/assets/{src-CWCcr2Hw.js → src-mZdWgqty.js} +1 -1
  97. package/vendor/type-server/editors/slides/index.html +1 -1
  98. package/vendor/type-server/editors/whiteboard/assets/{drawing-look-worker-CS2Hv0Nf.js → drawing-look-worker-gMYrygDq.js} +2 -2
  99. package/vendor/type-server/editors/whiteboard/assets/{index-BkWtA61j.js → index-BtZ30wGI.js} +2 -2
  100. package/vendor/type-server/editors/whiteboard/index.html +1 -1
  101. package/vendor/type-server/shell/assets/index-BMcfb5B7.css +1 -0
  102. package/vendor/{shell/assets/index-xloVcJb_.js → type-server/shell/assets/index-C_XsG-Qe.js} +1 -1
  103. package/vendor/type-server/shell/index.html +2 -2
  104. package/vendor/home/assets/index-CQTGVxZi.js +0 -43
  105. package/vendor/home/assets/index-CkjifzaW.css +0 -1
  106. package/vendor/shell/assets/index-CkjifzaW.css +0 -1
  107. package/vendor/type-server/editors/docs/assets/channel-CR_04g-H.js +0 -1
  108. package/vendor/type-server/editors/docs/assets/swimlanesDiagram-AYQRV4AK-iNMg14LW.js +0 -8
  109. package/vendor/type-server/shell/assets/index-CkjifzaW.css +0 -1
@@ -6,7 +6,7 @@ function KR(e,o){for(var a=0;a<o.length;a++){const i=o[a];if(typeof i!="string"&
6
6
  `+V[r].replace(" at new "," at ");return t.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",t.displayName)),ue}while(1<=r&&0<=u);break}}}finally{Oe=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Te(s):""}function Ee(t,n){switch(t.tag){case 26:case 27:case 5:return Te(t.type);case 16:return Te("Lazy");case 13:return t.child!==n&&n!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Be(t.type,!1);case 11:return Be(t.type.render,!1);case 1:return Be(t.type,!0);case 31:return Te("Activity");default:return""}}function Pe(t){try{var n="",s=null;do n+=Ee(t,s),s=t,t=t.return;while(t);return n}catch(r){return`
7
7
  Error generating stack: `+r.message+`
8
8
  `+r.stack}}var Se=Object.prototype.hasOwnProperty,Re=e.unstable_scheduleCallback,ke=e.unstable_cancelCallback,Ie=e.unstable_shouldYield,je=e.unstable_requestPaint,le=e.unstable_now,ve=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,He=e.unstable_LowPriority,Lt=e.unstable_IdlePriority,Yt=e.log,ut=e.unstable_setDisableYieldValue,Ae=null,Ye=null;function Qe(t){if(typeof Yt=="function"&&ut(t),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(Ae,t)}catch{}}var ct=Math.clz32?Math.clz32:hn,en=Math.log,rn=Math.LN2;function hn(t){return t>>>=0,t===0?32:31-(en(t)/rn|0)|0}var xt=256,_t=262144,Ve=4194304;function ft(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Dt(t,n,s){var r=t.pendingLanes;if(r===0)return 0;var u=0,f=t.suspendedLanes,x=t.pingedLanes;t=t.warmLanes;var R=r&134217727;return R!==0?(r=R&~f,r!==0?u=ft(r):(x&=R,x!==0?u=ft(x):s||(s=R&~t,s!==0&&(u=ft(s))))):(R=r&~f,R!==0?u=ft(R):x!==0?u=ft(x):s||(s=r&~t,s!==0&&(u=ft(s)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,s=n&-n,f>=s||f===32&&(s&4194048)!==0)?n:u}function It(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function jn(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ln(){var t=Ve;return Ve<<=1,(Ve&62914560)===0&&(Ve=4194304),t}function yo(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function Sn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ro(t,n,s,r,u,f){var x=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var R=t.entanglements,V=t.expirationTimes,oe=t.hiddenUpdates;for(s=x&~s;0<s;){var ue=31-ct(s),de=1<<ue;R[ue]=0,V[ue]=-1;var ae=oe[ue];if(ae!==null)for(oe[ue]=null,ue=0;ue<ae.length;ue++){var re=ae[ue];re!==null&&(re.lane&=-536870913)}s&=~de}r!==0&&_n(t,r,0),f!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=f&~(x&~n))}function _n(t,n,s){t.pendingLanes|=n,t.suspendedLanes&=~n;var r=31-ct(n);t.entangledLanes|=n,t.entanglements[r]=t.entanglements[r]|1073741824|s&261930}function Ze(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var r=31-ct(s),u=1<<r;u&n|t[r]&n&&(t[r]|=n),s&=~u}}function At(t,n){var s=n&-n;return s=(s&42)!==0?1:Dn(s),(s&(t.suspendedLanes|n))!==0?0:s}function Dn(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function io(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function bo(){var t=q.p;return t!==0?t:(t=window.event,t===void 0?32:$v(t.type))}function ps(t,n){var s=q.p;try{return q.p=t,n()}finally{q.p=s}}var ro=Math.random().toString(36).slice(2),qt="__reactFiber$"+ro,mn="__reactProps$"+ro,Ao="__reactContainer$"+ro,Tf="__reactEvents$"+ro,LE="__reactListeners$"+ro,IE="__reactHandles$"+ro,dg="__reactResources$"+ro,Vi="__reactMarker$"+ro;function Ef(t){delete t[qt],delete t[mn],delete t[Tf],delete t[LE],delete t[IE]}function Ha(t){var n=t[qt];if(n)return n;for(var s=t.parentNode;s;){if(n=s[Ao]||s[qt]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=_v(t);t!==null;){if(s=t[qt])return s;t=_v(t)}return n}t=s,s=t.parentNode}return null}function Ua(t){if(t=t[qt]||t[Ao]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Yi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(i(33))}function Ba(t){var n=t[dg];return n||(n=t[dg]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function sn(t){t[Vi]=!0}var pg=new Set,hg={};function Js(t,n){Fa(t,n),Fa(t+"Capture",n)}function Fa(t,n){for(hg[t]=n,t=0;t<n.length;t++)pg.add(n[t])}var HE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),mg={},gg={};function UE(t){return Se.call(gg,t)?!0:Se.call(mg,t)?!1:HE.test(t)?gg[t]=!0:(mg[t]=!0,!1)}function Ol(t,n,s){if(UE(n))if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var r=n.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+s)}}function kl(t,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+s)}}function Oo(t,n,s,r){if(r===null)t.removeAttribute(s);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(n,s,""+r)}}function qn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function yg(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function BE(t,n,s){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,f=r.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){s=""+x,f.call(this,x)}}),Object.defineProperty(t,n,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Cf(t){if(!t._valueTracker){var n=yg(t)?"checked":"value";t._valueTracker=BE(t,n,""+t[n])}}function bg(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var s=n.getValue(),r="";return t&&(r=yg(t)?t.checked?"true":"false":t.value),t=r,t!==s?(n.setValue(t),!0):!1}function Nl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var FE=/[\n"\\]/g;function Gn(t){return t.replace(FE,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Rf(t,n,s,r,u,f,x,R){t.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.type=x:t.removeAttribute("type"),n!=null?x==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+qn(n)):t.value!==""+qn(n)&&(t.value=""+qn(n)):x!=="submit"&&x!=="reset"||t.removeAttribute("value"),n!=null?Af(t,x,qn(n)):s!=null?Af(t,x,qn(s)):r!=null&&t.removeAttribute("value"),u==null&&f!=null&&(t.defaultChecked=!!f),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.name=""+qn(R):t.removeAttribute("name")}function vg(t,n,s,r,u,f,x,R){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.type=f),n!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Cf(t);return}s=s!=null?""+qn(s):"",n=n!=null?""+qn(n):s,R||n===t.value||(t.value=n),t.defaultValue=n}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=R?t.checked:!!r,t.defaultChecked=!!r,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.name=x),Cf(t)}function Af(t,n,s){n==="number"&&Nl(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Va(t,n,s,r){if(t=t.options,n){n={};for(var u=0;u<s.length;u++)n["$"+s[u]]=!0;for(s=0;s<t.length;s++)u=n.hasOwnProperty("$"+t[s].value),t[s].selected!==u&&(t[s].selected=u),u&&r&&(t[s].defaultSelected=!0)}else{for(s=""+qn(s),n=null,u=0;u<t.length;u++){if(t[u].value===s){t[u].selected=!0,r&&(t[u].defaultSelected=!0);return}n!==null||t[u].disabled||(n=t[u])}n!==null&&(n.selected=!0)}}function xg(t,n,s){if(n!=null&&(n=""+qn(n),n!==t.value&&(t.value=n),s==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=s!=null?""+qn(s):""}function Sg(t,n,s,r){if(n==null){if(r!=null){if(s!=null)throw Error(i(92));if($(r)){if(1<r.length)throw Error(i(93));r=r[0]}s=r}s==null&&(s=""),n=s}s=qn(n),t.defaultValue=s,r=t.textContent,r===s&&r!==""&&r!==null&&(t.value=r),Cf(t)}function Ya(t,n){if(n){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=n;return}}t.textContent=n}var VE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function wg(t,n,s){var r=n.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?r?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":r?t.setProperty(n,s):typeof s!="number"||s===0||VE.has(n)?n==="float"?t.cssFloat=s:t[n]=(""+s).trim():t[n]=s+"px"}function Tg(t,n,s){if(n!=null&&typeof n!="object")throw Error(i(62));if(t=t.style,s!=null){for(var r in s)!s.hasOwnProperty(r)||n!=null&&n.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var u in n)r=n[u],n.hasOwnProperty(u)&&s[u]!==r&&wg(t,u,r)}else for(var f in n)n.hasOwnProperty(f)&&wg(t,f,n[f])}function Of(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var YE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ml(t){return qE.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ko(){}var kf=null;function Nf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var qa=null,Ga=null;function Eg(t){var n=Ua(t);if(n&&(t=n.stateNode)){var s=t[mn]||null;e:switch(t=n.stateNode,n.type){case"input":if(Rf(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Gn(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var r=s[n];if(r!==t&&r.form===t.form){var u=r[mn]||null;if(!u)throw Error(i(90));Rf(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<s.length;n++)r=s[n],r.form===t.form&&bg(r)}break e;case"textarea":xg(t,s.value,s.defaultValue);break e;case"select":n=s.value,n!=null&&Va(t,!!s.multiple,n,!1)}}}var Mf=!1;function Cg(t,n,s){if(Mf)return t(n,s);Mf=!0;try{var r=t(n);return r}finally{if(Mf=!1,(qa!==null||Ga!==null)&&(bc(),qa&&(n=qa,t=Ga,Ga=qa=null,Eg(n),t)))for(n=0;n<t.length;n++)Eg(t[n])}}function qi(t,n){var s=t.stateNode;if(s===null)return null;var r=s[mn]||null;if(r===null)return null;s=r[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(i(231,n,typeof s));return s}var No=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jf=!1;if(No)try{var Gi={};Object.defineProperty(Gi,"passive",{get:function(){jf=!0}}),window.addEventListener("test",Gi,Gi),window.removeEventListener("test",Gi,Gi)}catch{jf=!1}var hs=null,_f=null,jl=null;function Rg(){if(jl)return jl;var t,n=_f,s=n.length,r,u="value"in hs?hs.value:hs.textContent,f=u.length;for(t=0;t<s&&n[t]===u[t];t++);var x=s-t;for(r=1;r<=x&&n[s-r]===u[f-r];r++);return jl=u.slice(t,1<r?1-r:void 0)}function _l(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Dl(){return!0}function Ag(){return!1}function wn(t){function n(s,r,u,f,x){this._reactName=s,this._targetInst=u,this.type=r,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var R in t)t.hasOwnProperty(R)&&(s=t[R],this[R]=s?s(f):f[R]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Dl:Ag,this.isPropagationStopped=Ag,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Dl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Dl)},persist:function(){},isPersistent:Dl}),n}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zl=wn(ea),Xi=v({},ea,{view:0,detail:0}),GE=wn(Xi),Df,zf,Ki,Pl=v({},Xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ki&&(Ki&&t.type==="mousemove"?(Df=t.screenX-Ki.screenX,zf=t.screenY-Ki.screenY):zf=Df=0,Ki=t),Df)},movementY:function(t){return"movementY"in t?t.movementY:zf}}),Og=wn(Pl),XE=v({},Pl,{dataTransfer:0}),KE=wn(XE),$E=v({},Xi,{relatedTarget:0}),Pf=wn($E),WE=v({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),QE=wn(WE),ZE=v({},ea,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),JE=wn(ZE),eC=v({},ea,{data:0}),kg=wn(eC),tC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},oC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sC(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=oC[t])?!!n[t]:!1}function Lf(){return sC}var aC=v({},Xi,{key:function(t){if(t.key){var n=tC[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=_l(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?nC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lf,charCode:function(t){return t.type==="keypress"?_l(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?_l(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),iC=wn(aC),rC=v({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ng=wn(rC),lC=v({},Xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lf}),cC=wn(lC),uC=v({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),fC=wn(uC),dC=v({},Pl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),pC=wn(dC),hC=v({},ea,{newState:0,oldState:0}),mC=wn(hC),gC=[9,13,27,32],If=No&&"CompositionEvent"in window,$i=null;No&&"documentMode"in document&&($i=document.documentMode);var yC=No&&"TextEvent"in window&&!$i,Mg=No&&(!If||$i&&8<$i&&11>=$i),jg=" ",_g=!1;function Dg(t,n){switch(t){case"keyup":return gC.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xa=!1;function bC(t,n){switch(t){case"compositionend":return zg(n);case"keypress":return n.which!==32?null:(_g=!0,jg);case"textInput":return t=n.data,t===jg&&_g?null:t;default:return null}}function vC(t,n){if(Xa)return t==="compositionend"||!If&&Dg(t,n)?(t=Rg(),jl=_f=hs=null,Xa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Mg&&n.locale!=="ko"?null:n.data;default:return null}}var xC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pg(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!xC[t.type]:n==="textarea"}function Lg(t,n,s,r){qa?Ga?Ga.push(r):Ga=[r]:qa=r,n=Cc(n,"onChange"),0<n.length&&(s=new zl("onChange","change",null,s,r),t.push({event:s,listeners:n}))}var Wi=null,Qi=null;function SC(t){vv(t,0)}function Ll(t){var n=Yi(t);if(bg(n))return t}function Ig(t,n){if(t==="change")return n}var Hg=!1;if(No){var Hf;if(No){var Uf="oninput"in document;if(!Uf){var Ug=document.createElement("div");Ug.setAttribute("oninput","return;"),Uf=typeof Ug.oninput=="function"}Hf=Uf}else Hf=!1;Hg=Hf&&(!document.documentMode||9<document.documentMode)}function Bg(){Wi&&(Wi.detachEvent("onpropertychange",Fg),Qi=Wi=null)}function Fg(t){if(t.propertyName==="value"&&Ll(Qi)){var n=[];Lg(n,Qi,t,Nf(t)),Cg(SC,n)}}function wC(t,n,s){t==="focusin"?(Bg(),Wi=n,Qi=s,Wi.attachEvent("onpropertychange",Fg)):t==="focusout"&&Bg()}function TC(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ll(Qi)}function EC(t,n){if(t==="click")return Ll(n)}function CC(t,n){if(t==="input"||t==="change")return Ll(n)}function RC(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var zn=typeof Object.is=="function"?Object.is:RC;function Zi(t,n){if(zn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var s=Object.keys(t),r=Object.keys(n);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var u=s[r];if(!Se.call(n,u)||!zn(t[u],n[u]))return!1}return!0}function Vg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Yg(t,n){var s=Vg(t);t=0;for(var r;s;){if(s.nodeType===3){if(r=t+s.textContent.length,t<=n&&r>=n)return{node:s,offset:n-t};t=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Vg(s)}}function qg(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?qg(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Gg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Nl(t.document);n instanceof t.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)t=n.contentWindow;else break;n=Nl(t.document)}return n}function Bf(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var AC=No&&"documentMode"in document&&11>=document.documentMode,Ka=null,Ff=null,Ji=null,Vf=!1;function Xg(t,n,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Vf||Ka==null||Ka!==Nl(r)||(r=Ka,"selectionStart"in r&&Bf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ji&&Zi(Ji,r)||(Ji=r,r=Cc(Ff,"onSelect"),0<r.length&&(n=new zl("onSelect","select",null,n,s),t.push({event:n,listeners:r}),n.target=Ka)))}function ta(t,n){var s={};return s[t.toLowerCase()]=n.toLowerCase(),s["Webkit"+t]="webkit"+n,s["Moz"+t]="moz"+n,s}var $a={animationend:ta("Animation","AnimationEnd"),animationiteration:ta("Animation","AnimationIteration"),animationstart:ta("Animation","AnimationStart"),transitionrun:ta("Transition","TransitionRun"),transitionstart:ta("Transition","TransitionStart"),transitioncancel:ta("Transition","TransitionCancel"),transitionend:ta("Transition","TransitionEnd")},Yf={},Kg={};No&&(Kg=document.createElement("div").style,"AnimationEvent"in window||(delete $a.animationend.animation,delete $a.animationiteration.animation,delete $a.animationstart.animation),"TransitionEvent"in window||delete $a.transitionend.transition);function na(t){if(Yf[t])return Yf[t];if(!$a[t])return t;var n=$a[t],s;for(s in n)if(n.hasOwnProperty(s)&&s in Kg)return Yf[t]=n[s];return t}var $g=na("animationend"),Wg=na("animationiteration"),Qg=na("animationstart"),OC=na("transitionrun"),kC=na("transitionstart"),NC=na("transitioncancel"),Zg=na("transitionend"),Jg=new Map,qf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");qf.push("scrollEnd");function lo(t,n){Jg.set(t,n),Js(n,[t])}var Il=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Xn=[],Wa=0,Gf=0;function Hl(){for(var t=Wa,n=Gf=Wa=0;n<t;){var s=Xn[n];Xn[n++]=null;var r=Xn[n];Xn[n++]=null;var u=Xn[n];Xn[n++]=null;var f=Xn[n];if(Xn[n++]=null,r!==null&&u!==null){var x=r.pending;x===null?u.next=u:(u.next=x.next,x.next=u),r.pending=u}f!==0&&ey(s,u,f)}}function Ul(t,n,s,r){Xn[Wa++]=t,Xn[Wa++]=n,Xn[Wa++]=s,Xn[Wa++]=r,Gf|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Xf(t,n,s,r){return Ul(t,n,s,r),Bl(t)}function oa(t,n){return Ul(t,null,null,n),Bl(t)}function ey(t,n,s){t.lanes|=s;var r=t.alternate;r!==null&&(r.lanes|=s);for(var u=!1,f=t.return;f!==null;)f.childLanes|=s,r=f.alternate,r!==null&&(r.childLanes|=s),f.tag===22&&(t=f.stateNode,t===null||t._visibility&1||(u=!0)),t=f,f=f.return;return t.tag===3?(f=t.stateNode,u&&n!==null&&(u=31-ct(s),t=f.hiddenUpdates,r=t[u],r===null?t[u]=[n]:r.push(n),n.lane=s|536870912),f):null}function Bl(t){if(50<Sr)throw Sr=0,np=null,Error(i(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Qa={};function MC(t,n,s,r){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pn(t,n,s,r){return new MC(t,n,s,r)}function Kf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mo(t,n){var s=t.alternate;return s===null?(s=Pn(t.tag,n,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=n,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,n=t.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function ty(t,n){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,n=s.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Fl(t,n,s,r,u,f){var x=0;if(r=t,typeof t=="function")Kf(t)&&(x=1);else if(typeof t=="string")x=PR(t,s,W.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Y:return t=Pn(31,s,n,u),t.elementType=Y,t.lanes=f,t;case A:return sa(s.children,u,f,n);case N:x=8,u|=24;break;case C:return t=Pn(12,s,n,u|2),t.elementType=C,t.lanes=f,t;case L:return t=Pn(13,s,n,u),t.elementType=L,t.lanes=f,t;case z:return t=Pn(19,s,n,u),t.elementType=z,t.lanes=f,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:x=10;break e;case _:x=9;break e;case j:x=11;break e;case I:x=14;break e;case U:x=16,r=null;break e}x=29,s=Error(i(130,t===null?"null":typeof t,"")),r=null}return n=Pn(x,s,n,u),n.elementType=t,n.type=r,n.lanes=f,n}function sa(t,n,s,r){return t=Pn(7,t,r,n),t.lanes=s,t}function $f(t,n,s){return t=Pn(6,t,null,n),t.lanes=s,t}function ny(t){var n=Pn(18,null,null,0);return n.stateNode=t,n}function Wf(t,n,s){return n=Pn(4,t.children!==null?t.children:[],t.key,n),n.lanes=s,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var oy=new WeakMap;function Kn(t,n){if(typeof t=="object"&&t!==null){var s=oy.get(t);return s!==void 0?s:(n={value:t,source:n,stack:Pe(n)},oy.set(t,n),n)}return{value:t,source:n,stack:Pe(n)}}var Za=[],Ja=0,Vl=null,er=0,$n=[],Wn=0,ms=null,vo=1,xo="";function jo(t,n){Za[Ja++]=er,Za[Ja++]=Vl,Vl=t,er=n}function sy(t,n,s){$n[Wn++]=vo,$n[Wn++]=xo,$n[Wn++]=ms,ms=t;var r=vo;t=xo;var u=32-ct(r)-1;r&=~(1<<u),s+=1;var f=32-ct(n)+u;if(30<f){var x=u-u%5;f=(r&(1<<x)-1).toString(32),r>>=x,u-=x,vo=1<<32-ct(n)+u|s<<u|r,xo=f+t}else vo=1<<f|s<<u|r,xo=t}function Qf(t){t.return!==null&&(jo(t,1),sy(t,1,0))}function Zf(t){for(;t===Vl;)Vl=Za[--Ja],Za[Ja]=null,er=Za[--Ja],Za[Ja]=null;for(;t===ms;)ms=$n[--Wn],$n[Wn]=null,xo=$n[--Wn],$n[Wn]=null,vo=$n[--Wn],$n[Wn]=null}function ay(t,n){$n[Wn++]=vo,$n[Wn++]=xo,$n[Wn++]=ms,vo=n.id,xo=n.overflow,ms=t}var cn=null,Mt=null,rt=!1,gs=null,Qn=!1,Jf=Error(i(519));function ys(t){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tr(Kn(n,t)),Jf}function iy(t){var n=t.stateNode,s=t.type,r=t.memoizedProps;switch(n[qt]=t,n[mn]=r,s){case"dialog":st("cancel",n),st("close",n);break;case"iframe":case"object":case"embed":st("load",n);break;case"video":case"audio":for(s=0;s<Tr.length;s++)st(Tr[s],n);break;case"source":st("error",n);break;case"img":case"image":case"link":st("error",n),st("load",n);break;case"details":st("toggle",n);break;case"input":st("invalid",n),vg(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":st("invalid",n);break;case"textarea":st("invalid",n),Sg(n,r.value,r.defaultValue,r.children)}s=r.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||r.suppressHydrationWarning===!0||Tv(n.textContent,s)?(r.popover!=null&&(st("beforetoggle",n),st("toggle",n)),r.onScroll!=null&&st("scroll",n),r.onScrollEnd!=null&&st("scrollend",n),r.onClick!=null&&(n.onclick=ko),n=!0):n=!1,n||ys(t,!0)}function ry(t){for(cn=t.return;cn;)switch(cn.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:cn=cn.return}}function ei(t){if(t!==cn)return!1;if(!rt)return ry(t),rt=!0,!1;var n=t.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||yp(t.type,t.memoizedProps)),s=!s),s&&Mt&&ys(t),ry(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));Mt=jv(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));Mt=jv(t)}else n===27?(n=Mt,Ms(t.type)?(t=wp,wp=null,Mt=t):Mt=n):Mt=cn?Jn(t.stateNode.nextSibling):null;return!0}function aa(){Mt=cn=null,rt=!1}function ed(){var t=gs;return t!==null&&(Rn===null?Rn=t:Rn.push.apply(Rn,t),gs=null),t}function tr(t){gs===null?gs=[t]:gs.push(t)}var td=O(null),ia=null,_o=null;function bs(t,n,s){J(td,n._currentValue),n._currentValue=s}function Do(t){t._currentValue=td.current,F(td)}function nd(t,n,s){for(;t!==null;){var r=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),t===s)break;t=t.return}}function od(t,n,s,r){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var f=u.dependencies;if(f!==null){var x=u.child;f=f.firstContext;e:for(;f!==null;){var R=f;f=u;for(var V=0;V<n.length;V++)if(R.context===n[V]){f.lanes|=s,R=f.alternate,R!==null&&(R.lanes|=s),nd(f.return,s,t),r||(x=null);break e}f=R.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(i(341));x.lanes|=s,f=x.alternate,f!==null&&(f.lanes|=s),nd(x,s,t),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===t){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function ti(t,n,s,r){t=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(i(387));if(x=x.memoizedProps,x!==null){var R=u.type;zn(u.pendingProps.value,x.value)||(t!==null?t.push(R):t=[R])}}else if(u===me.current){if(x=u.alternate,x===null)throw Error(i(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(Or):t=[Or])}u=u.return}t!==null&&od(n,t,s,r),n.flags|=262144}function Yl(t){for(t=t.firstContext;t!==null;){if(!zn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ra(t){ia=t,_o=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function un(t){return ly(ia,t)}function ql(t,n){return ia===null&&ra(t),ly(t,n)}function ly(t,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},_o===null){if(t===null)throw Error(i(308));_o=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else _o=_o.next=n;return s}var jC=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(s,r){t.push(r)}};this.abort=function(){n.aborted=!0,t.forEach(function(s){return s()})}},_C=e.unstable_scheduleCallback,DC=e.unstable_NormalPriority,Kt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sd(){return{controller:new jC,data:new Map,refCount:0}}function nr(t){t.refCount--,t.refCount===0&&_C(DC,function(){t.controller.abort()})}var or=null,ad=0,ni=0,oi=null;function zC(t,n){if(or===null){var s=or=[];ad=0,ni=lp(),oi={status:"pending",value:void 0,then:function(r){s.push(r)}}}return ad++,n.then(cy,cy),n}function cy(){if(--ad===0&&or!==null){oi!==null&&(oi.status="fulfilled");var t=or;or=null,ni=0,oi=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function PC(t,n){var s=[],r={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return t.then(function(){r.status="fulfilled",r.value=n;for(var u=0;u<s.length;u++)(0,s[u])(n)},function(u){for(r.status="rejected",r.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),r}var uy=P.S;P.S=function(t,n){Xb=le(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&zC(t,n),uy!==null&&uy(t,n)};var la=O(null);function id(){var t=la.current;return t!==null?t:Ot.pooledCache}function Gl(t,n){n===null?J(la,la.current):J(la,n.pool)}function fy(){var t=id();return t===null?null:{parent:Kt._currentValue,pool:t}}var si=Error(i(460)),rd=Error(i(474)),Xl=Error(i(542)),Kl={then:function(){}};function dy(t){return t=t.status,t==="fulfilled"||t==="rejected"}function py(t,n,s){switch(s=t[s],s===void 0?t.push(n):s!==n&&(n.then(ko,ko),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,my(t),t;default:if(typeof n.status=="string")n.then(ko,ko);else{if(t=Ot,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=n,t.status="pending",t.then(function(r){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=r}},function(r){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=r}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,my(t),t}throw ua=n,si}}function ca(t){try{var n=t._init;return n(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ua=s,si):s}}var ua=null;function hy(){if(ua===null)throw Error(i(459));var t=ua;return ua=null,t}function my(t){if(t===si||t===Xl)throw Error(i(483))}var ai=null,sr=0;function $l(t){var n=sr;return sr+=1,ai===null&&(ai=[]),py(ai,t,n)}function ar(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Wl(t,n){throw n.$$typeof===S?Error(i(525)):(t=Object.prototype.toString.call(n),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function gy(t){function n(te,G){if(t){var ne=te.deletions;ne===null?(te.deletions=[G],te.flags|=16):ne.push(G)}}function s(te,G){if(!t)return null;for(;G!==null;)n(te,G),G=G.sibling;return null}function r(te){for(var G=new Map;te!==null;)te.key!==null?G.set(te.key,te):G.set(te.index,te),te=te.sibling;return G}function u(te,G){return te=Mo(te,G),te.index=0,te.sibling=null,te}function f(te,G,ne){return te.index=ne,t?(ne=te.alternate,ne!==null?(ne=ne.index,ne<G?(te.flags|=67108866,G):ne):(te.flags|=67108866,G)):(te.flags|=1048576,G)}function x(te){return t&&te.alternate===null&&(te.flags|=67108866),te}function R(te,G,ne,fe){return G===null||G.tag!==6?(G=$f(ne,te.mode,fe),G.return=te,G):(G=u(G,ne),G.return=te,G)}function V(te,G,ne,fe){var Le=ne.type;return Le===A?ue(te,G,ne.props.children,fe,ne.key):G!==null&&(G.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===U&&ca(Le)===G.type)?(G=u(G,ne.props),ar(G,ne),G.return=te,G):(G=Fl(ne.type,ne.key,ne.props,null,te.mode,fe),ar(G,ne),G.return=te,G)}function oe(te,G,ne,fe){return G===null||G.tag!==4||G.stateNode.containerInfo!==ne.containerInfo||G.stateNode.implementation!==ne.implementation?(G=Wf(ne,te.mode,fe),G.return=te,G):(G=u(G,ne.children||[]),G.return=te,G)}function ue(te,G,ne,fe,Le){return G===null||G.tag!==7?(G=sa(ne,te.mode,fe,Le),G.return=te,G):(G=u(G,ne),G.return=te,G)}function de(te,G,ne){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=$f(""+G,te.mode,ne),G.return=te,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return ne=Fl(G.type,G.key,G.props,null,te.mode,ne),ar(ne,G),ne.return=te,ne;case T:return G=Wf(G,te.mode,ne),G.return=te,G;case U:return G=ca(G),de(te,G,ne)}if($(G)||M(G))return G=sa(G,te.mode,ne,null),G.return=te,G;if(typeof G.then=="function")return de(te,$l(G),ne);if(G.$$typeof===k)return de(te,ql(te,G),ne);Wl(te,G)}return null}function ae(te,G,ne,fe){var Le=G!==null?G.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Le!==null?null:R(te,G,""+ne,fe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case w:return ne.key===Le?V(te,G,ne,fe):null;case T:return ne.key===Le?oe(te,G,ne,fe):null;case U:return ne=ca(ne),ae(te,G,ne,fe)}if($(ne)||M(ne))return Le!==null?null:ue(te,G,ne,fe,null);if(typeof ne.then=="function")return ae(te,G,$l(ne),fe);if(ne.$$typeof===k)return ae(te,G,ql(te,ne),fe);Wl(te,ne)}return null}function re(te,G,ne,fe,Le){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return te=te.get(ne)||null,R(G,te,""+fe,Le);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case w:return te=te.get(fe.key===null?ne:fe.key)||null,V(G,te,fe,Le);case T:return te=te.get(fe.key===null?ne:fe.key)||null,oe(G,te,fe,Le);case U:return fe=ca(fe),re(te,G,ne,fe,Le)}if($(fe)||M(fe))return te=te.get(ne)||null,ue(G,te,fe,Le,null);if(typeof fe.then=="function")return re(te,G,ne,$l(fe),Le);if(fe.$$typeof===k)return re(te,G,ne,ql(G,fe),Le);Wl(G,fe)}return null}function _e(te,G,ne,fe){for(var Le=null,dt=null,ze=G,$e=G=0,it=null;ze!==null&&$e<ne.length;$e++){ze.index>$e?(it=ze,ze=null):it=ze.sibling;var pt=ae(te,ze,ne[$e],fe);if(pt===null){ze===null&&(ze=it);break}t&&ze&&pt.alternate===null&&n(te,ze),G=f(pt,G,$e),dt===null?Le=pt:dt.sibling=pt,dt=pt,ze=it}if($e===ne.length)return s(te,ze),rt&&jo(te,$e),Le;if(ze===null){for(;$e<ne.length;$e++)ze=de(te,ne[$e],fe),ze!==null&&(G=f(ze,G,$e),dt===null?Le=ze:dt.sibling=ze,dt=ze);return rt&&jo(te,$e),Le}for(ze=r(ze);$e<ne.length;$e++)it=re(ze,te,$e,ne[$e],fe),it!==null&&(t&&it.alternate!==null&&ze.delete(it.key===null?$e:it.key),G=f(it,G,$e),dt===null?Le=it:dt.sibling=it,dt=it);return t&&ze.forEach(function(Ps){return n(te,Ps)}),rt&&jo(te,$e),Le}function Fe(te,G,ne,fe){if(ne==null)throw Error(i(151));for(var Le=null,dt=null,ze=G,$e=G=0,it=null,pt=ne.next();ze!==null&&!pt.done;$e++,pt=ne.next()){ze.index>$e?(it=ze,ze=null):it=ze.sibling;var Ps=ae(te,ze,pt.value,fe);if(Ps===null){ze===null&&(ze=it);break}t&&ze&&Ps.alternate===null&&n(te,ze),G=f(Ps,G,$e),dt===null?Le=Ps:dt.sibling=Ps,dt=Ps,ze=it}if(pt.done)return s(te,ze),rt&&jo(te,$e),Le;if(ze===null){for(;!pt.done;$e++,pt=ne.next())pt=de(te,pt.value,fe),pt!==null&&(G=f(pt,G,$e),dt===null?Le=pt:dt.sibling=pt,dt=pt);return rt&&jo(te,$e),Le}for(ze=r(ze);!pt.done;$e++,pt=ne.next())pt=re(ze,te,$e,pt.value,fe),pt!==null&&(t&&pt.alternate!==null&&ze.delete(pt.key===null?$e:pt.key),G=f(pt,G,$e),dt===null?Le=pt:dt.sibling=pt,dt=pt);return t&&ze.forEach(function(XR){return n(te,XR)}),rt&&jo(te,$e),Le}function Tt(te,G,ne,fe){if(typeof ne=="object"&&ne!==null&&ne.type===A&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case w:e:{for(var Le=ne.key;G!==null;){if(G.key===Le){if(Le=ne.type,Le===A){if(G.tag===7){s(te,G.sibling),fe=u(G,ne.props.children),fe.return=te,te=fe;break e}}else if(G.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===U&&ca(Le)===G.type){s(te,G.sibling),fe=u(G,ne.props),ar(fe,ne),fe.return=te,te=fe;break e}s(te,G);break}else n(te,G);G=G.sibling}ne.type===A?(fe=sa(ne.props.children,te.mode,fe,ne.key),fe.return=te,te=fe):(fe=Fl(ne.type,ne.key,ne.props,null,te.mode,fe),ar(fe,ne),fe.return=te,te=fe)}return x(te);case T:e:{for(Le=ne.key;G!==null;){if(G.key===Le)if(G.tag===4&&G.stateNode.containerInfo===ne.containerInfo&&G.stateNode.implementation===ne.implementation){s(te,G.sibling),fe=u(G,ne.children||[]),fe.return=te,te=fe;break e}else{s(te,G);break}else n(te,G);G=G.sibling}fe=Wf(ne,te.mode,fe),fe.return=te,te=fe}return x(te);case U:return ne=ca(ne),Tt(te,G,ne,fe)}if($(ne))return _e(te,G,ne,fe);if(M(ne)){if(Le=M(ne),typeof Le!="function")throw Error(i(150));return ne=Le.call(ne),Fe(te,G,ne,fe)}if(typeof ne.then=="function")return Tt(te,G,$l(ne),fe);if(ne.$$typeof===k)return Tt(te,G,ql(te,ne),fe);Wl(te,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,G!==null&&G.tag===6?(s(te,G.sibling),fe=u(G,ne),fe.return=te,te=fe):(s(te,G),fe=$f(ne,te.mode,fe),fe.return=te,te=fe),x(te)):s(te,G)}return function(te,G,ne,fe){try{sr=0;var Le=Tt(te,G,ne,fe);return ai=null,Le}catch(ze){if(ze===si||ze===Xl)throw ze;var dt=Pn(29,ze,null,te.mode);return dt.lanes=fe,dt.return=te,dt}}}var fa=gy(!0),yy=gy(!1),vs=!1;function ld(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cd(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function xs(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ss(t,n,s){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(ht&2)!==0){var u=r.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),r.pending=n,n=Bl(t),ey(t,null,s),n}return Ul(t,r,n,s),Bl(t)}function ir(t,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var r=n.lanes;r&=t.pendingLanes,s|=r,n.lanes=s,Ze(t,s)}}function ud(t,n){var s=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var u=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?u=f=x:f=f.next=x,s=s.next}while(s!==null);f===null?u=f=n:f=f.next=n}else u=f=n;s={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=n:t.next=n,s.lastBaseUpdate=n}var fd=!1;function rr(){if(fd){var t=oi;if(t!==null)throw t}}function lr(t,n,s,r){fd=!1;var u=t.updateQueue;vs=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,R=u.shared.pending;if(R!==null){u.shared.pending=null;var V=R,oe=V.next;V.next=null,x===null?f=oe:x.next=oe,x=V;var ue=t.alternate;ue!==null&&(ue=ue.updateQueue,R=ue.lastBaseUpdate,R!==x&&(R===null?ue.firstBaseUpdate=oe:R.next=oe,ue.lastBaseUpdate=V))}if(f!==null){var de=u.baseState;x=0,ue=oe=V=null,R=f;do{var ae=R.lane&-536870913,re=ae!==R.lane;if(re?(at&ae)===ae:(r&ae)===ae){ae!==0&&ae===ni&&(fd=!0),ue!==null&&(ue=ue.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var _e=t,Fe=R;ae=n;var Tt=s;switch(Fe.tag){case 1:if(_e=Fe.payload,typeof _e=="function"){de=_e.call(Tt,de,ae);break e}de=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Fe.payload,ae=typeof _e=="function"?_e.call(Tt,de,ae):_e,ae==null)break e;de=v({},de,ae);break e;case 2:vs=!0}}ae=R.callback,ae!==null&&(t.flags|=64,re&&(t.flags|=8192),re=u.callbacks,re===null?u.callbacks=[ae]:re.push(ae))}else re={lane:ae,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ue===null?(oe=ue=re,V=de):ue=ue.next=re,x|=ae;if(R=R.next,R===null){if(R=u.shared.pending,R===null)break;re=R,R=re.next,re.next=null,u.lastBaseUpdate=re,u.shared.pending=null}}while(!0);ue===null&&(V=de),u.baseState=V,u.firstBaseUpdate=oe,u.lastBaseUpdate=ue,f===null&&(u.shared.lanes=0),Rs|=x,t.lanes=x,t.memoizedState=de}}function by(t,n){if(typeof t!="function")throw Error(i(191,t));t.call(n)}function vy(t,n){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)by(s[t],n)}var ii=O(null),Ql=O(0);function xy(t,n){t=Vo,J(Ql,t),J(ii,n),Vo=t|n.baseLanes}function dd(){J(Ql,Vo),J(ii,ii.current)}function pd(){Vo=Ql.current,F(ii),F(Ql)}var Ln=O(null),Zn=null;function ws(t){var n=t.alternate;J(Gt,Gt.current&1),J(Ln,t),Zn===null&&(n===null||ii.current!==null||n.memoizedState!==null)&&(Zn=t)}function hd(t){J(Gt,Gt.current),J(Ln,t),Zn===null&&(Zn=t)}function Sy(t){t.tag===22?(J(Gt,Gt.current),J(Ln,t),Zn===null&&(Zn=t)):Ts()}function Ts(){J(Gt,Gt.current),J(Ln,Ln.current)}function In(t){F(Ln),Zn===t&&(Zn=null),F(Gt)}var Gt=O(0);function Zl(t){for(var n=t;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||xp(s)||Sp(s)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var zo=0,Ke=null,St=null,$t=null,Jl=!1,ri=!1,da=!1,ec=0,cr=0,li=null,LC=0;function Ut(){throw Error(i(321))}function md(t,n){if(n===null)return!1;for(var s=0;s<n.length&&s<t.length;s++)if(!zn(t[s],n[s]))return!1;return!0}function gd(t,n,s,r,u,f){return zo=f,Ke=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,P.H=t===null||t.memoizedState===null?sb:Md,da=!1,f=s(r,u),da=!1,ri&&(f=Ty(n,s,r,u)),wy(t),f}function wy(t){P.H=dr;var n=St!==null&&St.next!==null;if(zo=0,$t=St=Ke=null,Jl=!1,cr=0,li=null,n)throw Error(i(300));t===null||Wt||(t=t.dependencies,t!==null&&Yl(t)&&(Wt=!0))}function Ty(t,n,s,r){Ke=t;var u=0;do{if(ri&&(li=null),cr=0,ri=!1,25<=u)throw Error(i(301));if(u+=1,$t=St=null,t.updateQueue!=null){var f=t.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}P.H=ab,f=n(s,r)}while(ri);return f}function IC(){var t=P.H,n=t.useState()[0];return n=typeof n.then=="function"?ur(n):n,t=t.useState()[0],(St!==null?St.memoizedState:null)!==t&&(Ke.flags|=1024),n}function yd(){var t=ec!==0;return ec=0,t}function bd(t,n,s){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~s}function vd(t){if(Jl){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Jl=!1}zo=0,$t=St=Ke=null,ri=!1,cr=ec=0,li=null}function yn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?Ke.memoizedState=$t=t:$t=$t.next=t,$t}function Xt(){if(St===null){var t=Ke.alternate;t=t!==null?t.memoizedState:null}else t=St.next;var n=$t===null?Ke.memoizedState:$t.next;if(n!==null)$t=n,St=t;else{if(t===null)throw Ke.alternate===null?Error(i(467)):Error(i(310));St=t,t={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},$t===null?Ke.memoizedState=$t=t:$t=$t.next=t}return $t}function tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ur(t){var n=cr;return cr+=1,li===null&&(li=[]),t=py(li,t,n),n=Ke,($t===null?n.memoizedState:$t.next)===null&&(n=n.alternate,P.H=n===null||n.memoizedState===null?sb:Md),t}function nc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ur(t);if(t.$$typeof===k)return un(t)}throw Error(i(438,String(t)))}function xd(t){var n=null,s=Ke.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var r=Ke.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(n={data:r.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=tc(),Ke.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0)for(s=n.data[n.index]=Array(t),r=0;r<t;r++)s[r]=B;return n.index++,s}function Po(t,n){return typeof n=="function"?n(t):n}function oc(t){var n=Xt();return Sd(n,St,t)}function Sd(t,n,s){var r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=s;var u=t.baseQueue,f=r.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}n.baseQueue=u=f,r.pending=null}if(f=t.baseState,u===null)t.memoizedState=f;else{n=u.next;var R=x=null,V=null,oe=n,ue=!1;do{var de=oe.lane&-536870913;if(de!==oe.lane?(at&de)===de:(zo&de)===de){var ae=oe.revertLane;if(ae===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),de===ni&&(ue=!0);else if((zo&ae)===ae){oe=oe.next,ae===ni&&(ue=!0);continue}else de={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},V===null?(R=V=de,x=f):V=V.next=de,Ke.lanes|=ae,Rs|=ae;de=oe.action,da&&s(f,de),f=oe.hasEagerState?oe.eagerState:s(f,de)}else ae={lane:de,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},V===null?(R=V=ae,x=f):V=V.next=ae,Ke.lanes|=de,Rs|=de;oe=oe.next}while(oe!==null&&oe!==n);if(V===null?x=f:V.next=R,!zn(f,t.memoizedState)&&(Wt=!0,ue&&(s=oi,s!==null)))throw s;t.memoizedState=f,t.baseState=x,t.baseQueue=V,r.lastRenderedState=f}return u===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function wd(t){var n=Xt(),s=n.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=t;var r=s.dispatch,u=s.pending,f=n.memoizedState;if(u!==null){s.pending=null;var x=u=u.next;do f=t(f,x.action),x=x.next;while(x!==u);zn(f,n.memoizedState)||(Wt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,r]}function Ey(t,n,s){var r=Ke,u=Xt(),f=rt;if(f){if(s===void 0)throw Error(i(407));s=s()}else s=n();var x=!zn((St||u).memoizedState,s);if(x&&(u.memoizedState=s,Wt=!0),u=u.queue,Cd(Ay.bind(null,r,u,t),[t]),u.getSnapshot!==n||x||$t!==null&&$t.memoizedState.tag&1){if(r.flags|=2048,ci(9,{destroy:void 0},Ry.bind(null,r,u,s,n),null),Ot===null)throw Error(i(349));f||(zo&127)!==0||Cy(r,n,s)}return s}function Cy(t,n,s){t.flags|=16384,t={getSnapshot:n,value:s},n=Ke.updateQueue,n===null?(n=tc(),Ke.updateQueue=n,n.stores=[t]):(s=n.stores,s===null?n.stores=[t]:s.push(t))}function Ry(t,n,s,r){n.value=s,n.getSnapshot=r,Oy(n)&&ky(t)}function Ay(t,n,s){return s(function(){Oy(n)&&ky(t)})}function Oy(t){var n=t.getSnapshot;t=t.value;try{var s=n();return!zn(t,s)}catch{return!0}}function ky(t){var n=oa(t,2);n!==null&&An(n,t,2)}function Td(t){var n=yn();if(typeof t=="function"){var s=t;if(t=s(),da){Qe(!0);try{s()}finally{Qe(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:t},n}function Ny(t,n,s,r){return t.baseState=s,Sd(t,St,typeof r=="function"?r:Po)}function HC(t,n,s,r,u){if(ic(t))throw Error(i(485));if(t=n.action,t!==null){var f={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){f.listeners.push(x)}};P.T!==null?s(!0):f.isTransition=!1,r(f),s=n.pending,s===null?(f.next=n.pending=f,My(n,f)):(f.next=s.next,n.pending=s.next=f)}}function My(t,n){var s=n.action,r=n.payload,u=t.state;if(n.isTransition){var f=P.T,x={};P.T=x;try{var R=s(u,r),V=P.S;V!==null&&V(x,R),jy(t,n,R)}catch(oe){Ed(t,n,oe)}finally{f!==null&&x.types!==null&&(f.types=x.types),P.T=f}}else try{f=s(u,r),jy(t,n,f)}catch(oe){Ed(t,n,oe)}}function jy(t,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(r){_y(t,n,r)},function(r){return Ed(t,n,r)}):_y(t,n,s)}function _y(t,n,s){n.status="fulfilled",n.value=s,Dy(n),t.state=s,n=t.pending,n!==null&&(s=n.next,s===n?t.pending=null:(s=s.next,n.next=s,My(t,s)))}function Ed(t,n,s){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=s,Dy(n),n=n.next;while(n!==r)}t.action=null}function Dy(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function zy(t,n){return n}function Py(t,n){if(rt){var s=Ot.formState;if(s!==null){e:{var r=Ke;if(rt){if(Mt){t:{for(var u=Mt,f=Qn;u.nodeType!==8;){if(!f){u=null;break t}if(u=Jn(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Mt=Jn(u.nextSibling),r=u.data==="F!";break e}}ys(r)}r=!1}r&&(n=s[0])}}return s=yn(),s.memoizedState=s.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zy,lastRenderedState:n},s.queue=r,s=tb.bind(null,Ke,r),r.dispatch=s,r=Td(!1),f=Nd.bind(null,Ke,!1,r.queue),r=yn(),u={state:n,dispatch:null,action:t,pending:null},r.queue=u,s=HC.bind(null,Ke,u,f,s),u.dispatch=s,r.memoizedState=t,[n,s,!1]}function Ly(t){var n=Xt();return Iy(n,St,t)}function Iy(t,n,s){if(n=Sd(t,n,zy)[0],t=oc(Po)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=ur(n)}catch(x){throw x===si?Xl:x}else r=n;n=Xt();var u=n.queue,f=u.dispatch;return s!==n.memoizedState&&(Ke.flags|=2048,ci(9,{destroy:void 0},UC.bind(null,u,s),null)),[r,f,t]}function UC(t,n){t.action=n}function Hy(t){var n=Xt(),s=St;if(s!==null)return Iy(n,s,t);Xt(),n=n.memoizedState,s=Xt();var r=s.queue.dispatch;return s.memoizedState=t,[n,r,!1]}function ci(t,n,s,r){return t={tag:t,create:s,deps:r,inst:n,next:null},n=Ke.updateQueue,n===null&&(n=tc(),Ke.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=t.next=t:(r=s.next,s.next=t,t.next=r,n.lastEffect=t),t}function Uy(){return Xt().memoizedState}function sc(t,n,s,r){var u=yn();Ke.flags|=t,u.memoizedState=ci(1|n,{destroy:void 0},s,r===void 0?null:r)}function ac(t,n,s,r){var u=Xt();r=r===void 0?null:r;var f=u.memoizedState.inst;St!==null&&r!==null&&md(r,St.memoizedState.deps)?u.memoizedState=ci(n,f,s,r):(Ke.flags|=t,u.memoizedState=ci(1|n,f,s,r))}function By(t,n){sc(8390656,8,t,n)}function Cd(t,n){ac(2048,8,t,n)}function BC(t){Ke.flags|=4;var n=Ke.updateQueue;if(n===null)n=tc(),Ke.updateQueue=n,n.events=[t];else{var s=n.events;s===null?n.events=[t]:s.push(t)}}function Fy(t){var n=Xt().memoizedState;return BC({ref:n,nextImpl:t}),function(){if((ht&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function Vy(t,n){return ac(4,2,t,n)}function Yy(t,n){return ac(4,4,t,n)}function qy(t,n){if(typeof n=="function"){t=t();var s=n(t);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Gy(t,n,s){s=s!=null?s.concat([t]):null,ac(4,4,qy.bind(null,n,t),s)}function Rd(){}function Xy(t,n){var s=Xt();n=n===void 0?null:n;var r=s.memoizedState;return n!==null&&md(n,r[1])?r[0]:(s.memoizedState=[t,n],t)}function Ky(t,n){var s=Xt();n=n===void 0?null:n;var r=s.memoizedState;if(n!==null&&md(n,r[1]))return r[0];if(r=t(),da){Qe(!0);try{t()}finally{Qe(!1)}}return s.memoizedState=[r,n],r}function Ad(t,n,s){return s===void 0||(zo&1073741824)!==0&&(at&261930)===0?t.memoizedState=n:(t.memoizedState=s,t=$b(),Ke.lanes|=t,Rs|=t,s)}function $y(t,n,s,r){return zn(s,n)?s:ii.current!==null?(t=Ad(t,s,r),zn(t,n)||(Wt=!0),t):(zo&42)===0||(zo&1073741824)!==0&&(at&261930)===0?(Wt=!0,t.memoizedState=s):(t=$b(),Ke.lanes|=t,Rs|=t,n)}function Wy(t,n,s,r,u){var f=q.p;q.p=f!==0&&8>f?f:8;var x=P.T,R={};P.T=R,Nd(t,!1,n,s);try{var V=u(),oe=P.S;if(oe!==null&&oe(R,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var ue=PC(V,r);fr(t,n,ue,Bn(t))}else fr(t,n,r,Bn(t))}catch(de){fr(t,n,{then:function(){},status:"rejected",reason:de},Bn())}finally{q.p=f,x!==null&&R.types!==null&&(x.types=R.types),P.T=x}}function FC(){}function Od(t,n,s,r){if(t.tag!==5)throw Error(i(476));var u=Qy(t).queue;Wy(t,u,n,K,s===null?FC:function(){return Zy(t),s(r)})}function Qy(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:K},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:s},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Zy(t){var n=Qy(t);n.next===null&&(n=t.alternate.memoizedState),fr(t,n.next.queue,{},Bn())}function kd(){return un(Or)}function Jy(){return Xt().memoizedState}function eb(){return Xt().memoizedState}function VC(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var s=Bn();t=xs(s);var r=Ss(n,t,s);r!==null&&(An(r,n,s),ir(r,n,s)),n={cache:sd()},t.payload=n;return}n=n.return}}function YC(t,n,s){var r=Bn();s={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ic(t)?nb(n,s):(s=Xf(t,n,s,r),s!==null&&(An(s,t,r),ob(s,n,r)))}function tb(t,n,s){var r=Bn();fr(t,n,s,r)}function fr(t,n,s,r){var u={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(ic(t))nb(n,u);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,R=f(x,s);if(u.hasEagerState=!0,u.eagerState=R,zn(R,x))return Ul(t,n,u,0),Ot===null&&Hl(),!1}catch{}if(s=Xf(t,n,u,r),s!==null)return An(s,t,r),ob(s,n,r),!0}return!1}function Nd(t,n,s,r){if(r={lane:2,revertLane:lp(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(t)){if(n)throw Error(i(479))}else n=Xf(t,s,r,2),n!==null&&An(n,t,2)}function ic(t){var n=t.alternate;return t===Ke||n!==null&&n===Ke}function nb(t,n){ri=Jl=!0;var s=t.pending;s===null?n.next=n:(n.next=s.next,s.next=n),t.pending=n}function ob(t,n,s){if((s&4194048)!==0){var r=n.lanes;r&=t.pendingLanes,s|=r,n.lanes=s,Ze(t,s)}}var dr={readContext:un,use:nc,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useLayoutEffect:Ut,useInsertionEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useSyncExternalStore:Ut,useId:Ut,useHostTransitionStatus:Ut,useFormState:Ut,useActionState:Ut,useOptimistic:Ut,useMemoCache:Ut,useCacheRefresh:Ut};dr.useEffectEvent=Ut;var sb={readContext:un,use:nc,useCallback:function(t,n){return yn().memoizedState=[t,n===void 0?null:n],t},useContext:un,useEffect:By,useImperativeHandle:function(t,n,s){s=s!=null?s.concat([t]):null,sc(4194308,4,qy.bind(null,n,t),s)},useLayoutEffect:function(t,n){return sc(4194308,4,t,n)},useInsertionEffect:function(t,n){sc(4,2,t,n)},useMemo:function(t,n){var s=yn();n=n===void 0?null:n;var r=t();if(da){Qe(!0);try{t()}finally{Qe(!1)}}return s.memoizedState=[r,n],r},useReducer:function(t,n,s){var r=yn();if(s!==void 0){var u=s(n);if(da){Qe(!0);try{s(n)}finally{Qe(!1)}}}else u=n;return r.memoizedState=r.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},r.queue=t,t=t.dispatch=YC.bind(null,Ke,t),[r.memoizedState,t]},useRef:function(t){var n=yn();return t={current:t},n.memoizedState=t},useState:function(t){t=Td(t);var n=t.queue,s=tb.bind(null,Ke,n);return n.dispatch=s,[t.memoizedState,s]},useDebugValue:Rd,useDeferredValue:function(t,n){var s=yn();return Ad(s,t,n)},useTransition:function(){var t=Td(!1);return t=Wy.bind(null,Ke,t.queue,!0,!1),yn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,s){var r=Ke,u=yn();if(rt){if(s===void 0)throw Error(i(407));s=s()}else{if(s=n(),Ot===null)throw Error(i(349));(at&127)!==0||Cy(r,n,s)}u.memoizedState=s;var f={value:s,getSnapshot:n};return u.queue=f,By(Ay.bind(null,r,f,t),[t]),r.flags|=2048,ci(9,{destroy:void 0},Ry.bind(null,r,f,s,n),null),s},useId:function(){var t=yn(),n=Ot.identifierPrefix;if(rt){var s=xo,r=vo;s=(r&~(1<<32-ct(r)-1)).toString(32)+s,n="_"+n+"R_"+s,s=ec++,0<s&&(n+="H"+s.toString(32)),n+="_"}else s=LC++,n="_"+n+"r_"+s.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:kd,useFormState:Py,useActionState:Py,useOptimistic:function(t){var n=yn();n.memoizedState=n.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=Nd.bind(null,Ke,!0,s),s.dispatch=n,[t,n]},useMemoCache:xd,useCacheRefresh:function(){return yn().memoizedState=VC.bind(null,Ke)},useEffectEvent:function(t){var n=yn(),s={impl:t};return n.memoizedState=s,function(){if((ht&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}},Md={readContext:un,use:nc,useCallback:Xy,useContext:un,useEffect:Cd,useImperativeHandle:Gy,useInsertionEffect:Vy,useLayoutEffect:Yy,useMemo:Ky,useReducer:oc,useRef:Uy,useState:function(){return oc(Po)},useDebugValue:Rd,useDeferredValue:function(t,n){var s=Xt();return $y(s,St.memoizedState,t,n)},useTransition:function(){var t=oc(Po)[0],n=Xt().memoizedState;return[typeof t=="boolean"?t:ur(t),n]},useSyncExternalStore:Ey,useId:Jy,useHostTransitionStatus:kd,useFormState:Ly,useActionState:Ly,useOptimistic:function(t,n){var s=Xt();return Ny(s,St,t,n)},useMemoCache:xd,useCacheRefresh:eb};Md.useEffectEvent=Fy;var ab={readContext:un,use:nc,useCallback:Xy,useContext:un,useEffect:Cd,useImperativeHandle:Gy,useInsertionEffect:Vy,useLayoutEffect:Yy,useMemo:Ky,useReducer:wd,useRef:Uy,useState:function(){return wd(Po)},useDebugValue:Rd,useDeferredValue:function(t,n){var s=Xt();return St===null?Ad(s,t,n):$y(s,St.memoizedState,t,n)},useTransition:function(){var t=wd(Po)[0],n=Xt().memoizedState;return[typeof t=="boolean"?t:ur(t),n]},useSyncExternalStore:Ey,useId:Jy,useHostTransitionStatus:kd,useFormState:Hy,useActionState:Hy,useOptimistic:function(t,n){var s=Xt();return St!==null?Ny(s,St,t,n):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:xd,useCacheRefresh:eb};ab.useEffectEvent=Fy;function jd(t,n,s,r){n=t.memoizedState,s=s(r,n),s=s==null?n:v({},n,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var _d={enqueueSetState:function(t,n,s){t=t._reactInternals;var r=Bn(),u=xs(r);u.payload=n,s!=null&&(u.callback=s),n=Ss(t,u,r),n!==null&&(An(n,t,r),ir(n,t,r))},enqueueReplaceState:function(t,n,s){t=t._reactInternals;var r=Bn(),u=xs(r);u.tag=1,u.payload=n,s!=null&&(u.callback=s),n=Ss(t,u,r),n!==null&&(An(n,t,r),ir(n,t,r))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var s=Bn(),r=xs(s);r.tag=2,n!=null&&(r.callback=n),n=Ss(t,r,s),n!==null&&(An(n,t,s),ir(n,t,s))}};function ib(t,n,s,r,u,f,x){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,f,x):n.prototype&&n.prototype.isPureReactComponent?!Zi(s,r)||!Zi(u,f):!0}function rb(t,n,s,r){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,r),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,r),n.state!==t&&_d.enqueueReplaceState(n,n.state,null)}function pa(t,n){var s=n;if("ref"in n){s={};for(var r in n)r!=="ref"&&(s[r]=n[r])}if(t=t.defaultProps){s===n&&(s=v({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function lb(t){Il(t)}function cb(t){console.error(t)}function ub(t){Il(t)}function rc(t,n){try{var s=t.onUncaughtError;s(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function fb(t,n,s){try{var r=t.onCaughtError;r(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Dd(t,n,s){return s=xs(s),s.tag=3,s.payload={element:null},s.callback=function(){rc(t,n)},s}function db(t){return t=xs(t),t.tag=3,t}function pb(t,n,s,r){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var f=r.value;t.payload=function(){return u(f)},t.callback=function(){fb(n,s,r)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(t.callback=function(){fb(n,s,r),typeof u!="function"&&(As===null?As=new Set([this]):As.add(this));var R=r.stack;this.componentDidCatch(r.value,{componentStack:R!==null?R:""})})}function qC(t,n,s,r,u){if(s.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=s.alternate,n!==null&&ti(n,s,u,!0),s=Ln.current,s!==null){switch(s.tag){case 31:case 13:return Zn===null?vc():s.alternate===null&&Bt===0&&(Bt=3),s.flags&=-257,s.flags|=65536,s.lanes=u,r===Kl?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([r]):n.add(r),ap(t,r,u)),!1;case 22:return s.flags|=65536,r===Kl?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([r]):s.add(r)),ap(t,r,u)),!1}throw Error(i(435,s.tag))}return ap(t,r,u),vc(),!1}if(rt)return n=Ln.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,r!==Jf&&(t=Error(i(422),{cause:r}),tr(Kn(t,s)))):(r!==Jf&&(n=Error(i(423),{cause:r}),tr(Kn(n,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,r=Kn(r,s),u=Dd(t.stateNode,r,u),ud(t,u),Bt!==4&&(Bt=2)),!1;var f=Error(i(520),{cause:r});if(f=Kn(f,s),xr===null?xr=[f]:xr.push(f),Bt!==4&&(Bt=2),n===null)return!0;r=Kn(r,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=Dd(s.stateNode,r,t),ud(s,t),!1;case 1:if(n=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(As===null||!As.has(f))))return s.flags|=65536,u&=-u,s.lanes|=u,u=db(u),pb(u,t,s,r),ud(s,u),!1}s=s.return}while(s!==null);return!1}var zd=Error(i(461)),Wt=!1;function fn(t,n,s,r){n.child=t===null?yy(n,null,s,r):fa(n,t.child,s,r)}function hb(t,n,s,r,u){s=s.render;var f=n.ref;if("ref"in r){var x={};for(var R in r)R!=="ref"&&(x[R]=r[R])}else x=r;return ra(n),r=gd(t,n,s,x,f,u),R=yd(),t!==null&&!Wt?(bd(t,n,u),Lo(t,n,u)):(rt&&R&&Qf(n),n.flags|=1,fn(t,n,r,u),n.child)}function mb(t,n,s,r,u){if(t===null){var f=s.type;return typeof f=="function"&&!Kf(f)&&f.defaultProps===void 0&&s.compare===null?(n.tag=15,n.type=f,gb(t,n,f,r,u)):(t=Fl(s.type,null,r,n,n.mode,u),t.ref=n.ref,t.return=n,n.child=t)}if(f=t.child,!Vd(t,u)){var x=f.memoizedProps;if(s=s.compare,s=s!==null?s:Zi,s(x,r)&&t.ref===n.ref)return Lo(t,n,u)}return n.flags|=1,t=Mo(f,r),t.ref=n.ref,t.return=n,n.child=t}function gb(t,n,s,r,u){if(t!==null){var f=t.memoizedProps;if(Zi(f,r)&&t.ref===n.ref)if(Wt=!1,n.pendingProps=r=f,Vd(t,u))(t.flags&131072)!==0&&(Wt=!0);else return n.lanes=t.lanes,Lo(t,n,u)}return Pd(t,n,s,r,u)}function yb(t,n,s,r){var u=r.children,f=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,t!==null){for(r=n.child=t.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;r=u&~f}else r=0,n.child=null;return bb(t,n,f,s,r)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Gl(n,f!==null?f.cachePool:null),f!==null?xy(n,f):dd(),Sy(n);else return r=n.lanes=536870912,bb(t,n,f!==null?f.baseLanes|s:s,s,r)}else f!==null?(Gl(n,f.cachePool),xy(n,f),Ts(),n.memoizedState=null):(t!==null&&Gl(n,null),dd(),Ts());return fn(t,n,u,s),n.child}function pr(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function bb(t,n,s,r,u){var f=id();return f=f===null?null:{parent:Kt._currentValue,pool:f},n.memoizedState={baseLanes:s,cachePool:f},t!==null&&Gl(n,null),dd(),Sy(n),t!==null&&ti(t,n,r,!0),n.childLanes=u,null}function lc(t,n){return n=uc({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function vb(t,n,s){return fa(n,t.child,null,s),t=lc(n,n.pendingProps),t.flags|=2,In(n),n.memoizedState=null,t}function GC(t,n,s){var r=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(rt){if(r.mode==="hidden")return t=lc(n,r),n.lanes=536870912,pr(null,t);if(hd(n),(t=Mt)?(t=Mv(t,Qn),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ms!==null?{id:vo,overflow:xo}:null,retryLane:536870912,hydrationErrors:null},s=ny(t),s.return=n,n.child=s,cn=n,Mt=null)):t=null,t===null)throw ys(n);return n.lanes=536870912,null}return lc(n,r)}var f=t.memoizedState;if(f!==null){var x=f.dehydrated;if(hd(n),u)if(n.flags&256)n.flags&=-257,n=vb(t,n,s);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(i(558));else if(Wt||ti(t,n,s,!1),u=(s&t.childLanes)!==0,Wt||u){if(r=Ot,r!==null&&(x=At(r,s),x!==0&&x!==f.retryLane))throw f.retryLane=x,oa(t,x),An(r,t,x),zd;vc(),n=vb(t,n,s)}else t=f.treeContext,Mt=Jn(x.nextSibling),cn=n,rt=!0,gs=null,Qn=!1,t!==null&&ay(n,t),n=lc(n,r),n.flags|=4096;return n}return t=Mo(t.child,{mode:r.mode,children:r.children}),t.ref=n.ref,n.child=t,t.return=n,t}function cc(t,n){var s=n.ref;if(s===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(t===null||t.ref!==s)&&(n.flags|=4194816)}}function Pd(t,n,s,r,u){return ra(n),s=gd(t,n,s,r,void 0,u),r=yd(),t!==null&&!Wt?(bd(t,n,u),Lo(t,n,u)):(rt&&r&&Qf(n),n.flags|=1,fn(t,n,s,u),n.child)}function xb(t,n,s,r,u,f){return ra(n),n.updateQueue=null,s=Ty(n,r,s,u),wy(t),r=yd(),t!==null&&!Wt?(bd(t,n,f),Lo(t,n,f)):(rt&&r&&Qf(n),n.flags|=1,fn(t,n,s,f),n.child)}function Sb(t,n,s,r,u){if(ra(n),n.stateNode===null){var f=Qa,x=s.contextType;typeof x=="object"&&x!==null&&(f=un(x)),f=new s(r,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=_d,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=r,f.state=n.memoizedState,f.refs={},ld(n),x=s.contextType,f.context=typeof x=="object"&&x!==null?un(x):Qa,f.state=n.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(jd(n,s,x,r),f.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(x=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),x!==f.state&&_d.enqueueReplaceState(f,f.state,null),lr(n,r,f,u),rr(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(t===null){f=n.stateNode;var R=n.memoizedProps,V=pa(s,R);f.props=V;var oe=f.context,ue=s.contextType;x=Qa,typeof ue=="object"&&ue!==null&&(x=un(ue));var de=s.getDerivedStateFromProps;ue=typeof de=="function"||typeof f.getSnapshotBeforeUpdate=="function",R=n.pendingProps!==R,ue||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(R||oe!==x)&&rb(n,f,r,x),vs=!1;var ae=n.memoizedState;f.state=ae,lr(n,r,f,u),rr(),oe=n.memoizedState,R||ae!==oe||vs?(typeof de=="function"&&(jd(n,s,de,r),oe=n.memoizedState),(V=vs||ib(n,s,V,r,ae,oe,x))?(ue||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=oe),f.props=r,f.state=oe,f.context=x,r=V):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{f=n.stateNode,cd(t,n),x=n.memoizedProps,ue=pa(s,x),f.props=ue,de=n.pendingProps,ae=f.context,oe=s.contextType,V=Qa,typeof oe=="object"&&oe!==null&&(V=un(oe)),R=s.getDerivedStateFromProps,(oe=typeof R=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x!==de||ae!==V)&&rb(n,f,r,V),vs=!1,ae=n.memoizedState,f.state=ae,lr(n,r,f,u),rr();var re=n.memoizedState;x!==de||ae!==re||vs||t!==null&&t.dependencies!==null&&Yl(t.dependencies)?(typeof R=="function"&&(jd(n,s,R,r),re=n.memoizedState),(ue=vs||ib(n,s,ue,r,ae,re,V)||t!==null&&t.dependencies!==null&&Yl(t.dependencies))?(oe||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,re,V),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,re,V)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||x===t.memoizedProps&&ae===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&ae===t.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=re),f.props=r,f.state=re,f.context=V,r=ue):(typeof f.componentDidUpdate!="function"||x===t.memoizedProps&&ae===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&ae===t.memoizedState||(n.flags|=1024),r=!1)}return f=r,cc(t,n),r=(n.flags&128)!==0,f||r?(f=n.stateNode,s=r&&typeof s.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,t!==null&&r?(n.child=fa(n,t.child,null,u),n.child=fa(n,null,s,u)):fn(t,n,s,u),n.memoizedState=f.state,t=n.child):t=Lo(t,n,u),t}function wb(t,n,s,r){return aa(),n.flags|=256,fn(t,n,s,r),n.child}var Ld={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Id(t){return{baseLanes:t,cachePool:fy()}}function Hd(t,n,s){return t=t!==null?t.childLanes&~s:0,n&&(t|=Un),t}function Tb(t,n,s){var r=n.pendingProps,u=!1,f=(n.flags&128)!==0,x;if((x=f)||(x=t!==null&&t.memoizedState===null?!1:(Gt.current&2)!==0),x&&(u=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,t===null){if(rt){if(u?ws(n):Ts(),(t=Mt)?(t=Mv(t,Qn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ms!==null?{id:vo,overflow:xo}:null,retryLane:536870912,hydrationErrors:null},s=ny(t),s.return=n,n.child=s,cn=n,Mt=null)):t=null,t===null)throw ys(n);return Sp(t)?n.lanes=32:n.lanes=536870912,null}var R=r.children;return r=r.fallback,u?(Ts(),u=n.mode,R=uc({mode:"hidden",children:R},u),r=sa(r,u,s,null),R.return=n,r.return=n,R.sibling=r,n.child=R,r=n.child,r.memoizedState=Id(s),r.childLanes=Hd(t,x,s),n.memoizedState=Ld,pr(null,r)):(ws(n),Ud(n,R))}var V=t.memoizedState;if(V!==null&&(R=V.dehydrated,R!==null)){if(f)n.flags&256?(ws(n),n.flags&=-257,n=Bd(t,n,s)):n.memoizedState!==null?(Ts(),n.child=t.child,n.flags|=128,n=null):(Ts(),R=r.fallback,u=n.mode,r=uc({mode:"visible",children:r.children},u),R=sa(R,u,s,null),R.flags|=2,r.return=n,R.return=n,r.sibling=R,n.child=r,fa(n,t.child,null,s),r=n.child,r.memoizedState=Id(s),r.childLanes=Hd(t,x,s),n.memoizedState=Ld,n=pr(null,r));else if(ws(n),Sp(R)){if(x=R.nextSibling&&R.nextSibling.dataset,x)var oe=x.dgst;x=oe,r=Error(i(419)),r.stack="",r.digest=x,tr({value:r,source:null,stack:null}),n=Bd(t,n,s)}else if(Wt||ti(t,n,s,!1),x=(s&t.childLanes)!==0,Wt||x){if(x=Ot,x!==null&&(r=At(x,s),r!==0&&r!==V.retryLane))throw V.retryLane=r,oa(t,r),An(x,t,r),zd;xp(R)||vc(),n=Bd(t,n,s)}else xp(R)?(n.flags|=192,n.child=t.child,n=null):(t=V.treeContext,Mt=Jn(R.nextSibling),cn=n,rt=!0,gs=null,Qn=!1,t!==null&&ay(n,t),n=Ud(n,r.children),n.flags|=4096);return n}return u?(Ts(),R=r.fallback,u=n.mode,V=t.child,oe=V.sibling,r=Mo(V,{mode:"hidden",children:r.children}),r.subtreeFlags=V.subtreeFlags&65011712,oe!==null?R=Mo(oe,R):(R=sa(R,u,s,null),R.flags|=2),R.return=n,r.return=n,r.sibling=R,n.child=r,pr(null,r),r=n.child,R=t.child.memoizedState,R===null?R=Id(s):(u=R.cachePool,u!==null?(V=Kt._currentValue,u=u.parent!==V?{parent:V,pool:V}:u):u=fy(),R={baseLanes:R.baseLanes|s,cachePool:u}),r.memoizedState=R,r.childLanes=Hd(t,x,s),n.memoizedState=Ld,pr(t.child,r)):(ws(n),s=t.child,t=s.sibling,s=Mo(s,{mode:"visible",children:r.children}),s.return=n,s.sibling=null,t!==null&&(x=n.deletions,x===null?(n.deletions=[t],n.flags|=16):x.push(t)),n.child=s,n.memoizedState=null,s)}function Ud(t,n){return n=uc({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function uc(t,n){return t=Pn(22,t,null,n),t.lanes=0,t}function Bd(t,n,s){return fa(n,t.child,null,s),t=Ud(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Eb(t,n,s){t.lanes|=n;var r=t.alternate;r!==null&&(r.lanes|=n),nd(t.return,n,s)}function Fd(t,n,s,r,u,f){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:u,treeForkCount:f}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=r,x.tail=s,x.tailMode=u,x.treeForkCount=f)}function Cb(t,n,s){var r=n.pendingProps,u=r.revealOrder,f=r.tail;r=r.children;var x=Gt.current,R=(x&2)!==0;if(R?(x=x&1|2,n.flags|=128):x&=1,J(Gt,x),fn(t,n,r,s),r=rt?er:0,!R&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Eb(t,s,n);else if(t.tag===19)Eb(t,s,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(u){case"forwards":for(s=n.child,u=null;s!==null;)t=s.alternate,t!==null&&Zl(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=n.child,n.child=null):(u=s.sibling,s.sibling=null),Fd(n,!1,u,s,f,r);break;case"backwards":case"unstable_legacy-backwards":for(s=null,u=n.child,n.child=null;u!==null;){if(t=u.alternate,t!==null&&Zl(t)===null){n.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}Fd(n,!0,s,null,f,r);break;case"together":Fd(n,!1,null,null,void 0,r);break;default:n.memoizedState=null}return n.child}function Lo(t,n,s){if(t!==null&&(n.dependencies=t.dependencies),Rs|=n.lanes,(s&n.childLanes)===0)if(t!==null){if(ti(t,n,s,!1),(s&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(i(153));if(n.child!==null){for(t=n.child,s=Mo(t,t.pendingProps),n.child=s,s.return=n;t.sibling!==null;)t=t.sibling,s=s.sibling=Mo(t,t.pendingProps),s.return=n;s.sibling=null}return n.child}function Vd(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Yl(t)))}function XC(t,n,s){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),bs(n,Kt,t.memoizedState.cache),aa();break;case 27:case 5:Ce(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:bs(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,hd(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(ws(n),n.flags|=128,null):(s&n.child.childLanes)!==0?Tb(t,n,s):(ws(n),t=Lo(t,n,s),t!==null?t.sibling:null);ws(n);break;case 19:var u=(t.flags&128)!==0;if(r=(s&n.childLanes)!==0,r||(ti(t,n,s,!1),r=(s&n.childLanes)!==0),u){if(r)return Cb(t,n,s);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),J(Gt,Gt.current),r)break;return null;case 22:return n.lanes=0,yb(t,n,s,n.pendingProps);case 24:bs(n,Kt,t.memoizedState.cache)}return Lo(t,n,s)}function Rb(t,n,s){if(t!==null)if(t.memoizedProps!==n.pendingProps)Wt=!0;else{if(!Vd(t,s)&&(n.flags&128)===0)return Wt=!1,XC(t,n,s);Wt=(t.flags&131072)!==0}else Wt=!1,rt&&(n.flags&1048576)!==0&&sy(n,er,n.index);switch(n.lanes=0,n.tag){case 16:e:{var r=n.pendingProps;if(t=ca(n.elementType),n.type=t,typeof t=="function")Kf(t)?(r=pa(t,r),n.tag=1,n=Sb(null,n,t,r,s)):(n.tag=0,n=Pd(null,n,t,r,s));else{if(t!=null){var u=t.$$typeof;if(u===j){n.tag=11,n=hb(null,n,t,r,s);break e}else if(u===I){n.tag=14,n=mb(null,n,t,r,s);break e}}throw n=ee(t)||t,Error(i(306,n,""))}}return n;case 0:return Pd(t,n,n.type,n.pendingProps,s);case 1:return r=n.type,u=pa(r,n.pendingProps),Sb(t,n,r,u,s);case 3:e:{if(pe(n,n.stateNode.containerInfo),t===null)throw Error(i(387));r=n.pendingProps;var f=n.memoizedState;u=f.element,cd(t,n),lr(n,r,null,s);var x=n.memoizedState;if(r=x.cache,bs(n,Kt,r),r!==f.cache&&od(n,[Kt],s,!0),rr(),r=x.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=wb(t,n,r,s);break e}else if(r!==u){u=Kn(Error(i(424)),n),tr(u),n=wb(t,n,r,s);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Mt=Jn(t.firstChild),cn=n,rt=!0,gs=null,Qn=!0,s=yy(n,null,r,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(aa(),r===u){n=Lo(t,n,s);break e}fn(t,n,r,s)}n=n.child}return n;case 26:return cc(t,n),t===null?(s=Lv(n.type,null,n.pendingProps,null))?n.memoizedState=s:rt||(s=n.type,t=n.pendingProps,r=Rc(ie.current).createElement(s),r[qt]=n,r[mn]=t,dn(r,s,t),sn(r),n.stateNode=r):n.memoizedState=Lv(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ce(n),t===null&&rt&&(r=n.stateNode=Dv(n.type,n.pendingProps,ie.current),cn=n,Qn=!0,u=Mt,Ms(n.type)?(wp=u,Mt=Jn(r.firstChild)):Mt=u),fn(t,n,n.pendingProps.children,s),cc(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&rt&&((u=r=Mt)&&(r=TR(r,n.type,n.pendingProps,Qn),r!==null?(n.stateNode=r,cn=n,Mt=Jn(r.firstChild),Qn=!1,u=!0):u=!1),u||ys(n)),Ce(n),u=n.type,f=n.pendingProps,x=t!==null?t.memoizedProps:null,r=f.children,yp(u,f)?r=null:x!==null&&yp(u,x)&&(n.flags|=32),n.memoizedState!==null&&(u=gd(t,n,IC,null,null,s),Or._currentValue=u),cc(t,n),fn(t,n,r,s),n.child;case 6:return t===null&&rt&&((t=s=Mt)&&(s=ER(s,n.pendingProps,Qn),s!==null?(n.stateNode=s,cn=n,Mt=null,t=!0):t=!1),t||ys(n)),null;case 13:return Tb(t,n,s);case 4:return pe(n,n.stateNode.containerInfo),r=n.pendingProps,t===null?n.child=fa(n,null,r,s):fn(t,n,r,s),n.child;case 11:return hb(t,n,n.type,n.pendingProps,s);case 7:return fn(t,n,n.pendingProps,s),n.child;case 8:return fn(t,n,n.pendingProps.children,s),n.child;case 12:return fn(t,n,n.pendingProps.children,s),n.child;case 10:return r=n.pendingProps,bs(n,n.type,r.value),fn(t,n,r.children,s),n.child;case 9:return u=n.type._context,r=n.pendingProps.children,ra(n),u=un(u),r=r(u),n.flags|=1,fn(t,n,r,s),n.child;case 14:return mb(t,n,n.type,n.pendingProps,s);case 15:return gb(t,n,n.type,n.pendingProps,s);case 19:return Cb(t,n,s);case 31:return GC(t,n,s);case 22:return yb(t,n,s,n.pendingProps);case 24:return ra(n),r=un(Kt),t===null?(u=id(),u===null&&(u=Ot,f=sd(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=s),u=f),n.memoizedState={parent:r,cache:u},ld(n),bs(n,Kt,u)):((t.lanes&s)!==0&&(cd(t,n),lr(n,null,null,s),rr()),u=t.memoizedState,f=n.memoizedState,u.parent!==r?(u={parent:r,cache:r},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),bs(n,Kt,r)):(r=f.cache,bs(n,Kt,r),r!==u.cache&&od(n,[Kt],s,!0))),fn(t,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function Io(t){t.flags|=4}function Yd(t,n,s,r,u){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(u&335544128)===u)if(t.stateNode.complete)t.flags|=8192;else if(Jb())t.flags|=8192;else throw ua=Kl,rd}else t.flags&=-16777217}function Ab(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Fv(n))if(Jb())t.flags|=8192;else throw ua=Kl,rd}function fc(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?ln():536870912,t.lanes|=n,pi|=n)}function hr(t,n){if(!rt)switch(t.tailMode){case"hidden":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function jt(t){var n=t.alternate!==null&&t.alternate.child===t.child,s=0,r=0;if(n)for(var u=t.child;u!==null;)s|=u.lanes|u.childLanes,r|=u.subtreeFlags&65011712,r|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)s|=u.lanes|u.childLanes,r|=u.subtreeFlags,r|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=r,t.childLanes=s,n}function KC(t,n,s){var r=n.pendingProps;switch(Zf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(n),null;case 1:return jt(n),null;case 3:return s=n.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Do(Kt),be(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(ei(n)?Io(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ed())),jt(n),null;case 26:var u=n.type,f=n.memoizedState;return t===null?(Io(n),f!==null?(jt(n),Ab(n,f)):(jt(n),Yd(n,u,null,r,s))):f?f!==t.memoizedState?(Io(n),jt(n),Ab(n,f)):(jt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==r&&Io(n),jt(n),Yd(n,u,t,r,s)),null;case 27:if(Me(n),s=ie.current,u=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&Io(n);else{if(!r){if(n.stateNode===null)throw Error(i(166));return jt(n),null}t=W.current,ei(n)?iy(n):(t=Dv(u,r,s),n.stateNode=t,Io(n))}return jt(n),null;case 5:if(Me(n),u=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&Io(n);else{if(!r){if(n.stateNode===null)throw Error(i(166));return jt(n),null}if(f=W.current,ei(n))iy(n);else{var x=Rc(ie.current);switch(f){case 1:f=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=x.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?x.createElement("select",{is:r.is}):x.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?x.createElement(u,{is:r.is}):x.createElement(u)}}f[qt]=n,f[mn]=r;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)f.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=f;e:switch(dn(f,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Io(n)}}return jt(n),Yd(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,s),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==r&&Io(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(i(166));if(t=ie.current,ei(n)){if(t=n.stateNode,s=n.memoizedProps,r=null,u=cn,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}t[qt]=n,t=!!(t.nodeValue===s||r!==null&&r.suppressHydrationWarning===!0||Tv(t.nodeValue,s)),t||ys(n,!0)}else t=Rc(t).createTextNode(r),t[qt]=n,n.stateNode=t}return jt(n),null;case 31:if(s=n.memoizedState,t===null||t.memoizedState!==null){if(r=ei(n),s!==null){if(t===null){if(!r)throw Error(i(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[qt]=n}else aa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;jt(n),t=!1}else s=ed(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return n.flags&256?(In(n),n):(In(n),null);if((n.flags&128)!==0)throw Error(i(558))}return jt(n),null;case 13:if(r=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=ei(n),r!==null&&r.dehydrated!==null){if(t===null){if(!u)throw Error(i(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(i(317));u[qt]=n}else aa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;jt(n),u=!1}else u=ed(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(In(n),n):(In(n),null)}return In(n),(n.flags&128)!==0?(n.lanes=s,n):(s=r!==null,t=t!==null&&t.memoizedState!==null,s&&(r=n.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==u&&(r.flags|=2048)),s!==t&&s&&(n.child.flags|=8192),fc(n,n.updateQueue),jt(n),null);case 4:return be(),t===null&&dp(n.stateNode.containerInfo),jt(n),null;case 10:return Do(n.type),jt(n),null;case 19:if(F(Gt),r=n.memoizedState,r===null)return jt(n),null;if(u=(n.flags&128)!==0,f=r.rendering,f===null)if(u)hr(r,!1);else{if(Bt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(f=Zl(t),f!==null){for(n.flags|=128,hr(r,!1),t=f.updateQueue,n.updateQueue=t,fc(n,t),n.subtreeFlags=0,t=s,s=n.child;s!==null;)ty(s,t),s=s.sibling;return J(Gt,Gt.current&1|2),rt&&jo(n,r.treeForkCount),n.child}t=t.sibling}r.tail!==null&&le()>gc&&(n.flags|=128,u=!0,hr(r,!1),n.lanes=4194304)}else{if(!u)if(t=Zl(f),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,fc(n,t),hr(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!rt)return jt(n),null}else 2*le()-r.renderingStartTime>gc&&s!==536870912&&(n.flags|=128,u=!0,hr(r,!1),n.lanes=4194304);r.isBackwards?(f.sibling=n.child,n.child=f):(t=r.last,t!==null?t.sibling=f:n.child=f,r.last=f)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=le(),t.sibling=null,s=Gt.current,J(Gt,u?s&1|2:s&1),rt&&jo(n,r.treeForkCount),t):(jt(n),null);case 22:case 23:return In(n),pd(),r=n.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(s&536870912)!==0&&(n.flags&128)===0&&(jt(n),n.subtreeFlags&6&&(n.flags|=8192)):jt(n),s=n.updateQueue,s!==null&&fc(n,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==s&&(n.flags|=2048),t!==null&&F(la),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),Do(Kt),jt(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function $C(t,n){switch(Zf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Do(Kt),be(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Me(n),null;case 31:if(n.memoizedState!==null){if(In(n),n.alternate===null)throw Error(i(340));aa()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(In(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(i(340));aa()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return F(Gt),null;case 4:return be(),null;case 10:return Do(n.type),null;case 22:case 23:return In(n),pd(),t!==null&&F(la),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Do(Kt),null;case 25:return null;default:return null}}function Ob(t,n){switch(Zf(n),n.tag){case 3:Do(Kt),be();break;case 26:case 27:case 5:Me(n);break;case 4:be();break;case 31:n.memoizedState!==null&&In(n);break;case 13:In(n);break;case 19:F(Gt);break;case 10:Do(n.type);break;case 22:case 23:In(n),pd(),t!==null&&F(la);break;case 24:Do(Kt)}}function mr(t,n){try{var s=n.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var u=r.next;s=u;do{if((s.tag&t)===t){r=void 0;var f=s.create,x=s.inst;r=f(),x.destroy=r}s=s.next}while(s!==u)}}catch(R){bt(n,n.return,R)}}function Es(t,n,s){try{var r=n.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var f=u.next;r=f;do{if((r.tag&t)===t){var x=r.inst,R=x.destroy;if(R!==void 0){x.destroy=void 0,u=n;var V=s,oe=R;try{oe()}catch(ue){bt(u,V,ue)}}}r=r.next}while(r!==f)}}catch(ue){bt(n,n.return,ue)}}function kb(t){var n=t.updateQueue;if(n!==null){var s=t.stateNode;try{vy(n,s)}catch(r){bt(t,t.return,r)}}}function Nb(t,n,s){s.props=pa(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(r){bt(t,n,r)}}function gr(t,n){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof s=="function"?t.refCleanup=s(r):s.current=r}}catch(u){bt(t,n,u)}}function So(t,n){var s=t.ref,r=t.refCleanup;if(s!==null)if(typeof r=="function")try{r()}catch(u){bt(t,n,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(u){bt(t,n,u)}else s.current=null}function Mb(t){var n=t.type,s=t.memoizedProps,r=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break e;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}catch(u){bt(t,t.return,u)}}function qd(t,n,s){try{var r=t.stateNode;yR(r,t.type,s,n),r[mn]=n}catch(u){bt(t,t.return,u)}}function jb(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ms(t.type)||t.tag===4}function Gd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||jb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ms(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xd(t,n,s){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(t),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=ko));else if(r!==4&&(r===27&&Ms(t.type)&&(s=t.stateNode,n=null),t=t.child,t!==null))for(Xd(t,n,s),t=t.sibling;t!==null;)Xd(t,n,s),t=t.sibling}function dc(t,n,s){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?s.insertBefore(t,n):s.appendChild(t);else if(r!==4&&(r===27&&Ms(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(dc(t,n,s),t=t.sibling;t!==null;)dc(t,n,s),t=t.sibling}function _b(t){var n=t.stateNode,s=t.memoizedProps;try{for(var r=t.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);dn(n,r,s),n[qt]=t,n[mn]=s}catch(f){bt(t,t.return,f)}}var Ho=!1,Qt=!1,Kd=!1,Db=typeof WeakSet=="function"?WeakSet:Set,an=null;function WC(t,n){if(t=t.containerInfo,mp=_c,t=Gg(t),Bf(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var u=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var x=0,R=-1,V=-1,oe=0,ue=0,de=t,ae=null;t:for(;;){for(var re;de!==s||u!==0&&de.nodeType!==3||(R=x+u),de!==f||r!==0&&de.nodeType!==3||(V=x+r),de.nodeType===3&&(x+=de.nodeValue.length),(re=de.firstChild)!==null;)ae=de,de=re;for(;;){if(de===t)break t;if(ae===s&&++oe===u&&(R=x),ae===f&&++ue===r&&(V=x),(re=de.nextSibling)!==null)break;de=ae,ae=de.parentNode}de=re}s=R===-1||V===-1?null:{start:R,end:V}}else s=null}s=s||{start:0,end:0}}else s=null;for(gp={focusedElem:t,selectionRange:s},_c=!1,an=n;an!==null;)if(n=an,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,an=t;else for(;an!==null;){switch(n=an,f=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)u=t[s],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&f!==null){t=void 0,s=n,u=f.memoizedProps,f=f.memoizedState,r=s.stateNode;try{var _e=pa(s.type,u);t=r.getSnapshotBeforeUpdate(_e,f),r.__reactInternalSnapshotBeforeUpdate=t}catch(Fe){bt(s,s.return,Fe)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,s=t.nodeType,s===9)vp(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":vp(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=n.sibling,t!==null){t.return=n.return,an=t;break}an=n.return}}function zb(t,n,s){var r=s.flags;switch(s.tag){case 0:case 11:case 15:Bo(t,s),r&4&&mr(5,s);break;case 1:if(Bo(t,s),r&4)if(t=s.stateNode,n===null)try{t.componentDidMount()}catch(x){bt(s,s.return,x)}else{var u=pa(s.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(u,n,t.__reactInternalSnapshotBeforeUpdate)}catch(x){bt(s,s.return,x)}}r&64&&kb(s),r&512&&gr(s,s.return);break;case 3:if(Bo(t,s),r&64&&(t=s.updateQueue,t!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=s.child.stateNode;break;case 1:n=s.child.stateNode}try{vy(t,n)}catch(x){bt(s,s.return,x)}}break;case 27:n===null&&r&4&&_b(s);case 26:case 5:Bo(t,s),n===null&&r&4&&Mb(s),r&512&&gr(s,s.return);break;case 12:Bo(t,s);break;case 31:Bo(t,s),r&4&&Ib(t,s);break;case 13:Bo(t,s),r&4&&Hb(t,s),r&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=aR.bind(null,s),CR(t,s))));break;case 22:if(r=s.memoizedState!==null||Ho,!r){n=n!==null&&n.memoizedState!==null||Qt,u=Ho;var f=Qt;Ho=r,(Qt=n)&&!f?Fo(t,s,(s.subtreeFlags&8772)!==0):Bo(t,s),Ho=u,Qt=f}break;case 30:break;default:Bo(t,s)}}function Pb(t){var n=t.alternate;n!==null&&(t.alternate=null,Pb(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ef(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var zt=null,Tn=!1;function Uo(t,n,s){for(s=s.child;s!==null;)Lb(t,n,s),s=s.sibling}function Lb(t,n,s){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(Ae,s)}catch{}switch(s.tag){case 26:Qt||So(s,n),Uo(t,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Qt||So(s,n);var r=zt,u=Tn;Ms(s.type)&&(zt=s.stateNode,Tn=!1),Uo(t,n,s),Cr(s.stateNode),zt=r,Tn=u;break;case 5:Qt||So(s,n);case 6:if(r=zt,u=Tn,zt=null,Uo(t,n,s),zt=r,Tn=u,zt!==null)if(Tn)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(s.stateNode)}catch(f){bt(s,n,f)}else try{zt.removeChild(s.stateNode)}catch(f){bt(s,n,f)}break;case 18:zt!==null&&(Tn?(t=zt,kv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Si(t)):kv(zt,s.stateNode));break;case 4:r=zt,u=Tn,zt=s.stateNode.containerInfo,Tn=!0,Uo(t,n,s),zt=r,Tn=u;break;case 0:case 11:case 14:case 15:Es(2,s,n),Qt||Es(4,s,n),Uo(t,n,s);break;case 1:Qt||(So(s,n),r=s.stateNode,typeof r.componentWillUnmount=="function"&&Nb(s,n,r)),Uo(t,n,s);break;case 21:Uo(t,n,s);break;case 22:Qt=(r=Qt)||s.memoizedState!==null,Uo(t,n,s),Qt=r;break;default:Uo(t,n,s)}}function Ib(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Si(t)}catch(s){bt(n,n.return,s)}}}function Hb(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Si(t)}catch(s){bt(n,n.return,s)}}function QC(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Db),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Db),n;default:throw Error(i(435,t.tag))}}function pc(t,n){var s=QC(t);n.forEach(function(r){if(!s.has(r)){s.add(r);var u=iR.bind(null,t,r);r.then(u,u)}})}function En(t,n){var s=n.deletions;if(s!==null)for(var r=0;r<s.length;r++){var u=s[r],f=t,x=n,R=x;e:for(;R!==null;){switch(R.tag){case 27:if(Ms(R.type)){zt=R.stateNode,Tn=!1;break e}break;case 5:zt=R.stateNode,Tn=!1;break e;case 3:case 4:zt=R.stateNode.containerInfo,Tn=!0;break e}R=R.return}if(zt===null)throw Error(i(160));Lb(f,x,u),zt=null,Tn=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Ub(n,t),n=n.sibling}var co=null;function Ub(t,n){var s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:En(n,t),Cn(t),r&4&&(Es(3,t,t.return),mr(3,t),Es(5,t,t.return));break;case 1:En(n,t),Cn(t),r&512&&(Qt||s===null||So(s,s.return)),r&64&&Ho&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?r:s.concat(r))));break;case 26:var u=co;if(En(n,t),Cn(t),r&512&&(Qt||s===null||So(s,s.return)),r&4){var f=s!==null?s.memoizedState:null;if(r=t.memoizedState,s===null)if(r===null)if(t.stateNode===null){e:{r=t.type,s=t.memoizedProps,u=u.ownerDocument||u;t:switch(r){case"title":f=u.getElementsByTagName("title")[0],(!f||f[Vi]||f[qt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(r),u.head.insertBefore(f,u.querySelector("head > title"))),dn(f,r,s),f[qt]=t,sn(f),r=f;break e;case"link":var x=Uv("link","href",u).get(r+(s.href||""));if(x){for(var R=0;R<x.length;R++)if(f=x[R],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(R,1);break t}}f=u.createElement(r),dn(f,r,s),u.head.appendChild(f);break;case"meta":if(x=Uv("meta","content",u).get(r+(s.content||""))){for(R=0;R<x.length;R++)if(f=x[R],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(R,1);break t}}f=u.createElement(r),dn(f,r,s),u.head.appendChild(f);break;default:throw Error(i(468,r))}f[qt]=t,sn(f),r=f}t.stateNode=r}else Bv(u,t.type,t.stateNode);else t.stateNode=Hv(u,r,t.memoizedProps);else f!==r?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,r===null?Bv(u,t.type,t.stateNode):Hv(u,r,t.memoizedProps)):r===null&&t.stateNode!==null&&qd(t,t.memoizedProps,s.memoizedProps)}break;case 27:En(n,t),Cn(t),r&512&&(Qt||s===null||So(s,s.return)),s!==null&&r&4&&qd(t,t.memoizedProps,s.memoizedProps);break;case 5:if(En(n,t),Cn(t),r&512&&(Qt||s===null||So(s,s.return)),t.flags&32){u=t.stateNode;try{Ya(u,"")}catch(_e){bt(t,t.return,_e)}}r&4&&t.stateNode!=null&&(u=t.memoizedProps,qd(t,u,s!==null?s.memoizedProps:u)),r&1024&&(Kd=!0);break;case 6:if(En(n,t),Cn(t),r&4){if(t.stateNode===null)throw Error(i(162));r=t.memoizedProps,s=t.stateNode;try{s.nodeValue=r}catch(_e){bt(t,t.return,_e)}}break;case 3:if(kc=null,u=co,co=Ac(n.containerInfo),En(n,t),co=u,Cn(t),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Si(n.containerInfo)}catch(_e){bt(t,t.return,_e)}Kd&&(Kd=!1,Bb(t));break;case 4:r=co,co=Ac(t.stateNode.containerInfo),En(n,t),Cn(t),co=r;break;case 12:En(n,t),Cn(t);break;case 31:En(n,t),Cn(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,pc(t,r)));break;case 13:En(n,t),Cn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(mc=le()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,pc(t,r)));break;case 22:u=t.memoizedState!==null;var V=s!==null&&s.memoizedState!==null,oe=Ho,ue=Qt;if(Ho=oe||u,Qt=ue||V,En(n,t),Qt=ue,Ho=oe,Cn(t),r&8192)e:for(n=t.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(s===null||V||Ho||Qt||ha(t)),s=null,n=t;;){if(n.tag===5||n.tag===26){if(s===null){V=s=n;try{if(f=V.stateNode,u)x=f.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{R=V.stateNode;var de=V.memoizedProps.style,ae=de!=null&&de.hasOwnProperty("display")?de.display:null;R.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(_e){bt(V,V.return,_e)}}}else if(n.tag===6){if(s===null){V=n;try{V.stateNode.nodeValue=u?"":V.memoizedProps}catch(_e){bt(V,V.return,_e)}}}else if(n.tag===18){if(s===null){V=n;try{var re=V.stateNode;u?Nv(re,!0):Nv(V.stateNode,!1)}catch(_e){bt(V,V.return,_e)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}r&4&&(r=t.updateQueue,r!==null&&(s=r.retryQueue,s!==null&&(r.retryQueue=null,pc(t,s))));break;case 19:En(n,t),Cn(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,pc(t,r)));break;case 30:break;case 21:break;default:En(n,t),Cn(t)}}function Cn(t){var n=t.flags;if(n&2){try{for(var s,r=t.return;r!==null;){if(jb(r)){s=r;break}r=r.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var u=s.stateNode,f=Gd(t);dc(t,f,u);break;case 5:var x=s.stateNode;s.flags&32&&(Ya(x,""),s.flags&=-33);var R=Gd(t);dc(t,R,x);break;case 3:case 4:var V=s.stateNode.containerInfo,oe=Gd(t);Xd(t,oe,V);break;default:throw Error(i(161))}}catch(ue){bt(t,t.return,ue)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Bb(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Bb(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Bo(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)zb(t,n.alternate,n),n=n.sibling}function ha(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Es(4,n,n.return),ha(n);break;case 1:So(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&Nb(n,n.return,s),ha(n);break;case 27:Cr(n.stateNode);case 26:case 5:So(n,n.return),ha(n);break;case 22:n.memoizedState===null&&ha(n);break;case 30:ha(n);break;default:ha(n)}t=t.sibling}}function Fo(t,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var r=n.alternate,u=t,f=n,x=f.flags;switch(f.tag){case 0:case 11:case 15:Fo(u,f,s),mr(4,f);break;case 1:if(Fo(u,f,s),r=f,u=r.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(oe){bt(r,r.return,oe)}if(r=f,u=r.updateQueue,u!==null){var R=r.stateNode;try{var V=u.shared.hiddenCallbacks;if(V!==null)for(u.shared.hiddenCallbacks=null,u=0;u<V.length;u++)by(V[u],R)}catch(oe){bt(r,r.return,oe)}}s&&x&64&&kb(f),gr(f,f.return);break;case 27:_b(f);case 26:case 5:Fo(u,f,s),s&&r===null&&x&4&&Mb(f),gr(f,f.return);break;case 12:Fo(u,f,s);break;case 31:Fo(u,f,s),s&&x&4&&Ib(u,f);break;case 13:Fo(u,f,s),s&&x&4&&Hb(u,f);break;case 22:f.memoizedState===null&&Fo(u,f,s),gr(f,f.return);break;case 30:break;default:Fo(u,f,s)}n=n.sibling}}function $d(t,n){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&nr(s))}function Wd(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&nr(t))}function uo(t,n,s,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Fb(t,n,s,r),n=n.sibling}function Fb(t,n,s,r){var u=n.flags;switch(n.tag){case 0:case 11:case 15:uo(t,n,s,r),u&2048&&mr(9,n);break;case 1:uo(t,n,s,r);break;case 3:uo(t,n,s,r),u&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&nr(t)));break;case 12:if(u&2048){uo(t,n,s,r),t=n.stateNode;try{var f=n.memoizedProps,x=f.id,R=f.onPostCommit;typeof R=="function"&&R(x,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(V){bt(n,n.return,V)}}else uo(t,n,s,r);break;case 31:uo(t,n,s,r);break;case 13:uo(t,n,s,r);break;case 23:break;case 22:f=n.stateNode,x=n.alternate,n.memoizedState!==null?f._visibility&2?uo(t,n,s,r):yr(t,n):f._visibility&2?uo(t,n,s,r):(f._visibility|=2,ui(t,n,s,r,(n.subtreeFlags&10256)!==0||!1)),u&2048&&$d(x,n);break;case 24:uo(t,n,s,r),u&2048&&Wd(n.alternate,n);break;default:uo(t,n,s,r)}}function ui(t,n,s,r,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=t,x=n,R=s,V=r,oe=x.flags;switch(x.tag){case 0:case 11:case 15:ui(f,x,R,V,u),mr(8,x);break;case 23:break;case 22:var ue=x.stateNode;x.memoizedState!==null?ue._visibility&2?ui(f,x,R,V,u):yr(f,x):(ue._visibility|=2,ui(f,x,R,V,u)),u&&oe&2048&&$d(x.alternate,x);break;case 24:ui(f,x,R,V,u),u&&oe&2048&&Wd(x.alternate,x);break;default:ui(f,x,R,V,u)}n=n.sibling}}function yr(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=t,r=n,u=r.flags;switch(r.tag){case 22:yr(s,r),u&2048&&$d(r.alternate,r);break;case 24:yr(s,r),u&2048&&Wd(r.alternate,r);break;default:yr(s,r)}n=n.sibling}}var br=8192;function fi(t,n,s){if(t.subtreeFlags&br)for(t=t.child;t!==null;)Vb(t,n,s),t=t.sibling}function Vb(t,n,s){switch(t.tag){case 26:fi(t,n,s),t.flags&br&&t.memoizedState!==null&&LR(s,co,t.memoizedState,t.memoizedProps);break;case 5:fi(t,n,s);break;case 3:case 4:var r=co;co=Ac(t.stateNode.containerInfo),fi(t,n,s),co=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=br,br=16777216,fi(t,n,s),br=r):fi(t,n,s));break;default:fi(t,n,s)}}function Yb(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function vr(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];an=r,Gb(r,t)}Yb(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qb(t),t=t.sibling}function qb(t){switch(t.tag){case 0:case 11:case 15:vr(t),t.flags&2048&&Es(9,t,t.return);break;case 3:vr(t);break;case 12:vr(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,hc(t)):vr(t);break;default:vr(t)}}function hc(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];an=r,Gb(r,t)}Yb(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Es(8,n,n.return),hc(n);break;case 22:s=n.stateNode,s._visibility&2&&(s._visibility&=-3,hc(n));break;default:hc(n)}t=t.sibling}}function Gb(t,n){for(;an!==null;){var s=an;switch(s.tag){case 0:case 11:case 15:Es(8,s,n);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var r=s.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:nr(s.memoizedState.cache)}if(r=s.child,r!==null)r.return=s,an=r;else e:for(s=t;an!==null;){r=an;var u=r.sibling,f=r.return;if(Pb(r),r===s){an=null;break e}if(u!==null){u.return=f,an=u;break e}an=f}}}var ZC={getCacheForType:function(t){var n=un(Kt),s=n.data.get(t);return s===void 0&&(s=t(),n.data.set(t,s)),s},cacheSignal:function(){return un(Kt).controller.signal}},JC=typeof WeakMap=="function"?WeakMap:Map,ht=0,Ot=null,ot=null,at=0,yt=0,Hn=null,Cs=!1,di=!1,Qd=!1,Vo=0,Bt=0,Rs=0,ma=0,Zd=0,Un=0,pi=0,xr=null,Rn=null,Jd=!1,mc=0,Xb=0,gc=1/0,yc=null,As=null,tn=0,Os=null,hi=null,Yo=0,ep=0,tp=null,Kb=null,Sr=0,np=null;function Bn(){return(ht&2)!==0&&at!==0?at&-at:P.T!==null?lp():bo()}function $b(){if(Un===0)if((at&536870912)===0||rt){var t=_t;_t<<=1,(_t&3932160)===0&&(_t=262144),Un=t}else Un=536870912;return t=Ln.current,t!==null&&(t.flags|=32),Un}function An(t,n,s){(t===Ot&&(yt===2||yt===9)||t.cancelPendingCommit!==null)&&(mi(t,0),ks(t,at,Un,!1)),Sn(t,s),((ht&2)===0||t!==Ot)&&(t===Ot&&((ht&2)===0&&(ma|=s),Bt===4&&ks(t,at,Un,!1)),wo(t))}function Wb(t,n,s){if((ht&6)!==0)throw Error(i(327));var r=!s&&(n&127)===0&&(n&t.expiredLanes)===0||It(t,n),u=r?nR(t,n):sp(t,n,!0),f=r;do{if(u===0){di&&!r&&ks(t,n,0,!1);break}else{if(s=t.current.alternate,f&&!eR(s)){u=sp(t,n,!1),f=!1;continue}if(u===2){if(f=n,t.errorRecoveryDisabledLanes&f)var x=0;else x=t.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var R=t;u=xr;var V=R.current.memoizedState.isDehydrated;if(V&&(mi(R,x).flags|=256),x=sp(R,x,!1),x!==2){if(Qd&&!V){R.errorRecoveryDisabledLanes|=f,ma|=f,u=4;break e}f=Rn,Rn=u,f!==null&&(Rn===null?Rn=f:Rn.push.apply(Rn,f))}u=x}if(f=!1,u!==2)continue}}if(u===1){mi(t,0),ks(t,n,0,!0);break}e:{switch(r=t,f=u,f){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:ks(r,n,Un,!Cs);break e;case 2:Rn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(u=mc+300-le(),10<u)){if(ks(r,n,Un,!Cs),Dt(r,0,!0)!==0)break e;Yo=n,r.timeoutHandle=Av(Qb.bind(null,r,s,Rn,yc,Jd,n,Un,ma,pi,Cs,f,"Throttled",-0,0),u);break e}Qb(r,s,Rn,yc,Jd,n,Un,ma,pi,Cs,f,null,-0,0)}}break}while(!0);wo(t)}function Qb(t,n,s,r,u,f,x,R,V,oe,ue,de,ae,re){if(t.timeoutHandle=-1,de=n.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ko},Vb(n,f,de);var _e=(f&62914560)===f?mc-le():(f&4194048)===f?Xb-le():0;if(_e=IR(de,_e),_e!==null){Yo=f,t.cancelPendingCommit=_e(av.bind(null,t,n,f,s,r,u,x,R,V,ue,de,null,ae,re)),ks(t,f,x,!oe);return}}av(t,n,f,s,r,u,x,R,V)}function eR(t){for(var n=t;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var r=0;r<s.length;r++){var u=s[r],f=u.getSnapshot;u=u.value;try{if(!zn(f(),u))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ks(t,n,s,r){n&=~Zd,n&=~ma,t.suspendedLanes|=n,t.pingedLanes&=~n,r&&(t.warmLanes|=n),r=t.expirationTimes;for(var u=n;0<u;){var f=31-ct(u),x=1<<f;r[f]=-1,u&=~x}s!==0&&_n(t,s,n)}function bc(){return(ht&6)===0?(wr(0),!1):!0}function op(){if(ot!==null){if(yt===0)var t=ot.return;else t=ot,_o=ia=null,vd(t),ai=null,sr=0,t=ot;for(;t!==null;)Ob(t.alternate,t),t=t.return;ot=null}}function mi(t,n){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,xR(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),Yo=0,op(),Ot=t,ot=s=Mo(t.current,null),at=n,yt=0,Hn=null,Cs=!1,di=It(t,n),Qd=!1,pi=Un=Zd=ma=Rs=Bt=0,Rn=xr=null,Jd=!1,(n&8)!==0&&(n|=n&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=n;0<r;){var u=31-ct(r),f=1<<u;n|=t[u],r&=~f}return Vo=n,Hl(),s}function Zb(t,n){Ke=null,P.H=dr,n===si||n===Xl?(n=hy(),yt=3):n===rd?(n=hy(),yt=4):yt=n===zd?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Hn=n,ot===null&&(Bt=1,rc(t,Kn(n,t.current)))}function Jb(){var t=Ln.current;return t===null?!0:(at&4194048)===at?Zn===null:(at&62914560)===at||(at&536870912)!==0?t===Zn:!1}function ev(){var t=P.H;return P.H=dr,t===null?dr:t}function tv(){var t=P.A;return P.A=ZC,t}function vc(){Bt=4,Cs||(at&4194048)!==at&&Ln.current!==null||(di=!0),(Rs&134217727)===0&&(ma&134217727)===0||Ot===null||ks(Ot,at,Un,!1)}function sp(t,n,s){var r=ht;ht|=2;var u=ev(),f=tv();(Ot!==t||at!==n)&&(yc=null,mi(t,n)),n=!1;var x=Bt;e:do try{if(yt!==0&&ot!==null){var R=ot,V=Hn;switch(yt){case 8:op(),x=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(n=!0);var oe=yt;if(yt=0,Hn=null,gi(t,R,V,oe),s&&di){x=0;break e}break;default:oe=yt,yt=0,Hn=null,gi(t,R,V,oe)}}tR(),x=Bt;break}catch(ue){Zb(t,ue)}while(!0);return n&&t.shellSuspendCounter++,_o=ia=null,ht=r,P.H=u,P.A=f,ot===null&&(Ot=null,at=0,Hl()),x}function tR(){for(;ot!==null;)nv(ot)}function nR(t,n){var s=ht;ht|=2;var r=ev(),u=tv();Ot!==t||at!==n?(yc=null,gc=le()+500,mi(t,n)):di=It(t,n);e:do try{if(yt!==0&&ot!==null){n=ot;var f=Hn;t:switch(yt){case 1:yt=0,Hn=null,gi(t,n,f,1);break;case 2:case 9:if(dy(f)){yt=0,Hn=null,ov(n);break}n=function(){yt!==2&&yt!==9||Ot!==t||(yt=7),wo(t)},f.then(n,n);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:dy(f)?(yt=0,Hn=null,ov(n)):(yt=0,Hn=null,gi(t,n,f,7));break;case 5:var x=null;switch(ot.tag){case 26:x=ot.memoizedState;case 5:case 27:var R=ot;if(x?Fv(x):R.stateNode.complete){yt=0,Hn=null;var V=R.sibling;if(V!==null)ot=V;else{var oe=R.return;oe!==null?(ot=oe,xc(oe)):ot=null}break t}}yt=0,Hn=null,gi(t,n,f,5);break;case 6:yt=0,Hn=null,gi(t,n,f,6);break;case 8:op(),Bt=6;break e;default:throw Error(i(462))}}oR();break}catch(ue){Zb(t,ue)}while(!0);return _o=ia=null,P.H=r,P.A=u,ht=s,ot!==null?0:(Ot=null,at=0,Hl(),Bt)}function oR(){for(;ot!==null&&!Ie();)nv(ot)}function nv(t){var n=Rb(t.alternate,t,Vo);t.memoizedProps=t.pendingProps,n===null?xc(t):ot=n}function ov(t){var n=t,s=n.alternate;switch(n.tag){case 15:case 0:n=xb(s,n,n.pendingProps,n.type,void 0,at);break;case 11:n=xb(s,n,n.pendingProps,n.type.render,n.ref,at);break;case 5:vd(n);default:Ob(s,n),n=ot=ty(n,Vo),n=Rb(s,n,Vo)}t.memoizedProps=t.pendingProps,n===null?xc(t):ot=n}function gi(t,n,s,r){_o=ia=null,vd(n),ai=null,sr=0;var u=n.return;try{if(qC(t,u,n,s,at)){Bt=1,rc(t,Kn(s,t.current)),ot=null;return}}catch(f){if(u!==null)throw ot=u,f;Bt=1,rc(t,Kn(s,t.current)),ot=null;return}n.flags&32768?(rt||r===1?t=!0:di||(at&536870912)!==0?t=!1:(Cs=t=!0,(r===2||r===9||r===3||r===6)&&(r=Ln.current,r!==null&&r.tag===13&&(r.flags|=16384))),sv(n,t)):xc(n)}function xc(t){var n=t;do{if((n.flags&32768)!==0){sv(n,Cs);return}t=n.return;var s=KC(n.alternate,n,Vo);if(s!==null){ot=s;return}if(n=n.sibling,n!==null){ot=n;return}ot=n=t}while(n!==null);Bt===0&&(Bt=5)}function sv(t,n){do{var s=$C(t.alternate,t);if(s!==null){s.flags&=32767,ot=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(t=t.sibling,t!==null)){ot=t;return}ot=t=s}while(t!==null);Bt=6,ot=null}function av(t,n,s,r,u,f,x,R,V){t.cancelPendingCommit=null;do Sc();while(tn!==0);if((ht&6)!==0)throw Error(i(327));if(n!==null){if(n===t.current)throw Error(i(177));if(f=n.lanes|n.childLanes,f|=Gf,Ro(t,s,f,x,R,V),t===Ot&&(ot=Ot=null,at=0),hi=n,Os=t,Yo=s,ep=f,tp=u,Kb=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,rR(xe,function(){return uv(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=P.T,P.T=null,u=q.p,q.p=2,x=ht,ht|=4;try{WC(t,n,s)}finally{ht=x,q.p=u,P.T=r}}tn=1,iv(),rv(),lv()}}function iv(){if(tn===1){tn=0;var t=Os,n=hi,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var r=q.p;q.p=2;var u=ht;ht|=4;try{Ub(n,t);var f=gp,x=Gg(t.containerInfo),R=f.focusedElem,V=f.selectionRange;if(x!==R&&R&&R.ownerDocument&&qg(R.ownerDocument.documentElement,R)){if(V!==null&&Bf(R)){var oe=V.start,ue=V.end;if(ue===void 0&&(ue=oe),"selectionStart"in R)R.selectionStart=oe,R.selectionEnd=Math.min(ue,R.value.length);else{var de=R.ownerDocument||document,ae=de&&de.defaultView||window;if(ae.getSelection){var re=ae.getSelection(),_e=R.textContent.length,Fe=Math.min(V.start,_e),Tt=V.end===void 0?Fe:Math.min(V.end,_e);!re.extend&&Fe>Tt&&(x=Tt,Tt=Fe,Fe=x);var te=Yg(R,Fe),G=Yg(R,Tt);if(te&&G&&(re.rangeCount!==1||re.anchorNode!==te.node||re.anchorOffset!==te.offset||re.focusNode!==G.node||re.focusOffset!==G.offset)){var ne=de.createRange();ne.setStart(te.node,te.offset),re.removeAllRanges(),Fe>Tt?(re.addRange(ne),re.extend(G.node,G.offset)):(ne.setEnd(G.node,G.offset),re.addRange(ne))}}}}for(de=[],re=R;re=re.parentNode;)re.nodeType===1&&de.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<de.length;R++){var fe=de[R];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}_c=!!mp,gp=mp=null}finally{ht=u,q.p=r,P.T=s}}t.current=n,tn=2}}function rv(){if(tn===2){tn=0;var t=Os,n=hi,s=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var r=q.p;q.p=2;var u=ht;ht|=4;try{zb(t,n.alternate,n)}finally{ht=u,q.p=r,P.T=s}}tn=3}}function lv(){if(tn===4||tn===3){tn=0,je();var t=Os,n=hi,s=Yo,r=Kb;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?tn=5:(tn=0,hi=Os=null,cv(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(As=null),io(s),n=n.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(Ae,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=P.T,u=q.p,q.p=2,P.T=null;try{for(var f=t.onRecoverableError,x=0;x<r.length;x++){var R=r[x];f(R.value,{componentStack:R.stack})}}finally{P.T=n,q.p=u}}(Yo&3)!==0&&Sc(),wo(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===np?Sr++:(Sr=0,np=t):Sr=0,wr(0)}}function cv(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,nr(n)))}function Sc(){return iv(),rv(),lv(),uv()}function uv(){if(tn!==5)return!1;var t=Os,n=ep;ep=0;var s=io(Yo),r=P.T,u=q.p;try{q.p=32>s?32:s,P.T=null,s=tp,tp=null;var f=Os,x=Yo;if(tn=0,hi=Os=null,Yo=0,(ht&6)!==0)throw Error(i(331));var R=ht;if(ht|=4,qb(f.current),Fb(f,f.current,x,s),ht=R,wr(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(Ae,f)}catch{}return!0}finally{q.p=u,P.T=r,cv(t,n)}}function fv(t,n,s){n=Kn(s,n),n=Dd(t.stateNode,n,2),t=Ss(t,n,2),t!==null&&(Sn(t,2),wo(t))}function bt(t,n,s){if(t.tag===3)fv(t,t,s);else for(;n!==null;){if(n.tag===3){fv(n,t,s);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(As===null||!As.has(r))){t=Kn(s,t),s=db(2),r=Ss(n,s,2),r!==null&&(pb(s,r,n,t),Sn(r,2),wo(r));break}}n=n.return}}function ap(t,n,s){var r=t.pingCache;if(r===null){r=t.pingCache=new JC;var u=new Set;r.set(n,u)}else u=r.get(n),u===void 0&&(u=new Set,r.set(n,u));u.has(s)||(Qd=!0,u.add(s),t=sR.bind(null,t,n,s),n.then(t,t))}function sR(t,n,s){var r=t.pingCache;r!==null&&r.delete(n),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,Ot===t&&(at&s)===s&&(Bt===4||Bt===3&&(at&62914560)===at&&300>le()-mc?(ht&2)===0&&mi(t,0):Zd|=s,pi===at&&(pi=0)),wo(t)}function dv(t,n){n===0&&(n=ln()),t=oa(t,n),t!==null&&(Sn(t,n),wo(t))}function aR(t){var n=t.memoizedState,s=0;n!==null&&(s=n.retryLane),dv(t,s)}function iR(t,n){var s=0;switch(t.tag){case 31:case 13:var r=t.stateNode,u=t.memoizedState;u!==null&&(s=u.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(n),dv(t,s)}function rR(t,n){return Re(t,n)}var wc=null,yi=null,ip=!1,Tc=!1,rp=!1,Ns=0;function wo(t){t!==yi&&t.next===null&&(yi===null?wc=yi=t:yi=yi.next=t),Tc=!0,ip||(ip=!0,cR())}function wr(t,n){if(!rp&&Tc){rp=!0;do for(var s=!1,r=wc;r!==null;){if(t!==0){var u=r.pendingLanes;if(u===0)var f=0;else{var x=r.suspendedLanes,R=r.pingedLanes;f=(1<<31-ct(42|t)+1)-1,f&=u&~(x&~R),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,gv(r,f))}else f=at,f=Dt(r,r===Ot?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||It(r,f)||(s=!0,gv(r,f));r=r.next}while(s);rp=!1}}function lR(){pv()}function pv(){Tc=ip=!1;var t=0;Ns!==0&&vR()&&(t=Ns);for(var n=le(),s=null,r=wc;r!==null;){var u=r.next,f=hv(r,n);f===0?(r.next=null,s===null?wc=u:s.next=u,u===null&&(yi=s)):(s=r,(t!==0||(f&3)!==0)&&(Tc=!0)),r=u}tn!==0&&tn!==5||wr(t),Ns!==0&&(Ns=0)}function hv(t,n){for(var s=t.suspendedLanes,r=t.pingedLanes,u=t.expirationTimes,f=t.pendingLanes&-62914561;0<f;){var x=31-ct(f),R=1<<x,V=u[x];V===-1?((R&s)===0||(R&r)!==0)&&(u[x]=jn(R,n)):V<=n&&(t.expiredLanes|=R),f&=~R}if(n=Ot,s=at,s=Dt(t,t===n?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,s===0||t===n&&(yt===2||yt===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&ke(r),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||It(t,s)){if(n=s&-s,n===t.callbackPriority)return n;switch(r!==null&&ke(r),io(s)){case 2:case 8:s=ce;break;case 32:s=xe;break;case 268435456:s=Lt;break;default:s=xe}return r=mv.bind(null,t),s=Re(s,r),t.callbackPriority=n,t.callbackNode=s,n}return r!==null&&r!==null&&ke(r),t.callbackPriority=2,t.callbackNode=null,2}function mv(t,n){if(tn!==0&&tn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(Sc()&&t.callbackNode!==s)return null;var r=at;return r=Dt(t,t===Ot?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(Wb(t,r,n),hv(t,le()),t.callbackNode!=null&&t.callbackNode===s?mv.bind(null,t):null)}function gv(t,n){if(Sc())return null;Wb(t,n,!0)}function cR(){SR(function(){(ht&6)!==0?Re(he,lR):pv()})}function lp(){if(Ns===0){var t=ni;t===0&&(t=xt,xt<<=1,(xt&261888)===0&&(xt=256)),Ns=t}return Ns}function yv(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ml(""+t)}function bv(t,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,t.id&&s.setAttribute("form",t.id),n.parentNode.insertBefore(s,n),t=new FormData(t),s.parentNode.removeChild(s),t}function uR(t,n,s,r,u){if(n==="submit"&&s&&s.stateNode===u){var f=yv((u[mn]||null).action),x=r.submitter;x&&(n=(n=x[mn]||null)?yv(n.formAction):x.getAttribute("formAction"),n!==null&&(f=n,x=null));var R=new zl("action","action",null,r,u);t.push({event:R,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ns!==0){var V=x?bv(u,x):new FormData(u);Od(s,{pending:!0,data:V,method:u.method,action:f},null,V)}}else typeof f=="function"&&(R.preventDefault(),V=x?bv(u,x):new FormData(u),Od(s,{pending:!0,data:V,method:u.method,action:f},f,V))},currentTarget:u}]})}}for(var cp=0;cp<qf.length;cp++){var up=qf[cp],fR=up.toLowerCase(),dR=up[0].toUpperCase()+up.slice(1);lo(fR,"on"+dR)}lo($g,"onAnimationEnd"),lo(Wg,"onAnimationIteration"),lo(Qg,"onAnimationStart"),lo("dblclick","onDoubleClick"),lo("focusin","onFocus"),lo("focusout","onBlur"),lo(OC,"onTransitionRun"),lo(kC,"onTransitionStart"),lo(NC,"onTransitionCancel"),lo(Zg,"onTransitionEnd"),Fa("onMouseEnter",["mouseout","mouseover"]),Fa("onMouseLeave",["mouseout","mouseover"]),Fa("onPointerEnter",["pointerout","pointerover"]),Fa("onPointerLeave",["pointerout","pointerover"]),Js("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Js("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Js("onBeforeInput",["compositionend","keypress","textInput","paste"]),Js("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Js("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Js("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tr));function vv(t,n){n=(n&4)!==0;for(var s=0;s<t.length;s++){var r=t[s],u=r.event;r=r.listeners;e:{var f=void 0;if(n)for(var x=r.length-1;0<=x;x--){var R=r[x],V=R.instance,oe=R.currentTarget;if(R=R.listener,V!==f&&u.isPropagationStopped())break e;f=R,u.currentTarget=oe;try{f(u)}catch(ue){Il(ue)}u.currentTarget=null,f=V}else for(x=0;x<r.length;x++){if(R=r[x],V=R.instance,oe=R.currentTarget,R=R.listener,V!==f&&u.isPropagationStopped())break e;f=R,u.currentTarget=oe;try{f(u)}catch(ue){Il(ue)}u.currentTarget=null,f=V}}}}function st(t,n){var s=n[Tf];s===void 0&&(s=n[Tf]=new Set);var r=t+"__bubble";s.has(r)||(xv(n,t,2,!1),s.add(r))}function fp(t,n,s){var r=0;n&&(r|=4),xv(s,t,r,n)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function dp(t){if(!t[Ec]){t[Ec]=!0,pg.forEach(function(s){s!=="selectionchange"&&(pR.has(s)||fp(s,!1,t),fp(s,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Ec]||(n[Ec]=!0,fp("selectionchange",!1,n))}}function xv(t,n,s,r){switch($v(n)){case 2:var u=BR;break;case 8:u=FR;break;default:u=Ap}s=u.bind(null,n,s,t),u=void 0,!jf||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),r?u!==void 0?t.addEventListener(n,s,{capture:!0,passive:u}):t.addEventListener(n,s,!0):u!==void 0?t.addEventListener(n,s,{passive:u}):t.addEventListener(n,s,!1)}function pp(t,n,s,r,u){var f=r;if((n&1)===0&&(n&2)===0&&r!==null)e:for(;;){if(r===null)return;var x=r.tag;if(x===3||x===4){var R=r.stateNode.containerInfo;if(R===u)break;if(x===4)for(x=r.return;x!==null;){var V=x.tag;if((V===3||V===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;R!==null;){if(x=Ha(R),x===null)return;if(V=x.tag,V===5||V===6||V===26||V===27){r=f=x;continue e}R=R.parentNode}}r=r.return}Cg(function(){var oe=f,ue=Nf(s),de=[];e:{var ae=Jg.get(t);if(ae!==void 0){var re=zl,_e=t;switch(t){case"keypress":if(_l(s)===0)break e;case"keydown":case"keyup":re=iC;break;case"focusin":_e="focus",re=Pf;break;case"focusout":_e="blur",re=Pf;break;case"beforeblur":case"afterblur":re=Pf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Og;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=KE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=cC;break;case $g:case Wg:case Qg:re=QE;break;case Zg:re=fC;break;case"scroll":case"scrollend":re=GE;break;case"wheel":re=pC;break;case"copy":case"cut":case"paste":re=JE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Ng;break;case"toggle":case"beforetoggle":re=mC}var Fe=(n&4)!==0,Tt=!Fe&&(t==="scroll"||t==="scrollend"),te=Fe?ae!==null?ae+"Capture":null:ae;Fe=[];for(var G=oe,ne;G!==null;){var fe=G;if(ne=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ne===null||te===null||(fe=qi(G,te),fe!=null&&Fe.push(Er(G,fe,ne))),Tt)break;G=G.return}0<Fe.length&&(ae=new re(ae,_e,null,s,ue),de.push({event:ae,listeners:Fe}))}}if((n&7)===0){e:{if(ae=t==="mouseover"||t==="pointerover",re=t==="mouseout"||t==="pointerout",ae&&s!==kf&&(_e=s.relatedTarget||s.fromElement)&&(Ha(_e)||_e[Ao]))break e;if((re||ae)&&(ae=ue.window===ue?ue:(ae=ue.ownerDocument)?ae.defaultView||ae.parentWindow:window,re?(_e=s.relatedTarget||s.toElement,re=oe,_e=_e?Ha(_e):null,_e!==null&&(Tt=c(_e),Fe=_e.tag,_e!==Tt||Fe!==5&&Fe!==27&&Fe!==6)&&(_e=null)):(re=null,_e=oe),re!==_e)){if(Fe=Og,fe="onMouseLeave",te="onMouseEnter",G="mouse",(t==="pointerout"||t==="pointerover")&&(Fe=Ng,fe="onPointerLeave",te="onPointerEnter",G="pointer"),Tt=re==null?ae:Yi(re),ne=_e==null?ae:Yi(_e),ae=new Fe(fe,G+"leave",re,s,ue),ae.target=Tt,ae.relatedTarget=ne,fe=null,Ha(ue)===oe&&(Fe=new Fe(te,G+"enter",_e,s,ue),Fe.target=ne,Fe.relatedTarget=Tt,fe=Fe),Tt=fe,re&&_e)t:{for(Fe=hR,te=re,G=_e,ne=0,fe=te;fe;fe=Fe(fe))ne++;fe=0;for(var Le=G;Le;Le=Fe(Le))fe++;for(;0<ne-fe;)te=Fe(te),ne--;for(;0<fe-ne;)G=Fe(G),fe--;for(;ne--;){if(te===G||G!==null&&te===G.alternate){Fe=te;break t}te=Fe(te),G=Fe(G)}Fe=null}else Fe=null;re!==null&&Sv(de,ae,re,Fe,!1),_e!==null&&Tt!==null&&Sv(de,Tt,_e,Fe,!0)}}e:{if(ae=oe?Yi(oe):window,re=ae.nodeName&&ae.nodeName.toLowerCase(),re==="select"||re==="input"&&ae.type==="file")var dt=Ig;else if(Pg(ae))if(Hg)dt=CC;else{dt=TC;var ze=wC}else re=ae.nodeName,!re||re.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?oe&&Of(oe.elementType)&&(dt=Ig):dt=EC;if(dt&&(dt=dt(t,oe))){Lg(de,dt,s,ue);break e}ze&&ze(t,ae,oe),t==="focusout"&&oe&&ae.type==="number"&&oe.memoizedProps.value!=null&&Af(ae,"number",ae.value)}switch(ze=oe?Yi(oe):window,t){case"focusin":(Pg(ze)||ze.contentEditable==="true")&&(Ka=ze,Ff=oe,Ji=null);break;case"focusout":Ji=Ff=Ka=null;break;case"mousedown":Vf=!0;break;case"contextmenu":case"mouseup":case"dragend":Vf=!1,Xg(de,s,ue);break;case"selectionchange":if(AC)break;case"keydown":case"keyup":Xg(de,s,ue)}var $e;if(If)e:{switch(t){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else Xa?Dg(t,s)&&(it="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(it="onCompositionStart");it&&(Mg&&s.locale!=="ko"&&(Xa||it!=="onCompositionStart"?it==="onCompositionEnd"&&Xa&&($e=Rg()):(hs=ue,_f="value"in hs?hs.value:hs.textContent,Xa=!0)),ze=Cc(oe,it),0<ze.length&&(it=new kg(it,t,null,s,ue),de.push({event:it,listeners:ze}),$e?it.data=$e:($e=zg(s),$e!==null&&(it.data=$e)))),($e=yC?bC(t,s):vC(t,s))&&(it=Cc(oe,"onBeforeInput"),0<it.length&&(ze=new kg("onBeforeInput","beforeinput",null,s,ue),de.push({event:ze,listeners:it}),ze.data=$e)),uR(de,t,oe,s,ue)}vv(de,n)})}function Er(t,n,s){return{instance:t,listener:n,currentTarget:s}}function Cc(t,n){for(var s=n+"Capture",r=[];t!==null;){var u=t,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=qi(t,s),u!=null&&r.unshift(Er(t,u,f)),u=qi(t,n),u!=null&&r.push(Er(t,u,f))),t.tag===3)return r;t=t.return}return[]}function hR(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Sv(t,n,s,r,u){for(var f=n._reactName,x=[];s!==null&&s!==r;){var R=s,V=R.alternate,oe=R.stateNode;if(R=R.tag,V!==null&&V===r)break;R!==5&&R!==26&&R!==27||oe===null||(V=oe,u?(oe=qi(s,f),oe!=null&&x.unshift(Er(s,oe,V))):u||(oe=qi(s,f),oe!=null&&x.push(Er(s,oe,V)))),s=s.return}x.length!==0&&t.push({event:n,listeners:x})}var mR=/\r\n?/g,gR=/\u0000|\uFFFD/g;function wv(t){return(typeof t=="string"?t:""+t).replace(mR,`
9
- `).replace(gR,"")}function Tv(t,n){return n=wv(n),wv(t)===n}function wt(t,n,s,r,u,f){switch(s){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||Ya(t,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&Ya(t,""+r);break;case"className":kl(t,"class",r);break;case"tabIndex":kl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":kl(t,s,r);break;case"style":Tg(t,r,f);break;case"data":if(n!=="object"){kl(t,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||s!=="href")){t.removeAttribute(s);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(s);break}r=Ml(""+r),t.setAttribute(s,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(n!=="input"&&wt(t,n,"name",u.name,u,null),wt(t,n,"formEncType",u.formEncType,u,null),wt(t,n,"formMethod",u.formMethod,u,null),wt(t,n,"formTarget",u.formTarget,u,null)):(wt(t,n,"encType",u.encType,u,null),wt(t,n,"method",u.method,u,null),wt(t,n,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(s);break}r=Ml(""+r),t.setAttribute(s,r);break;case"onClick":r!=null&&(t.onclick=ko);break;case"onScroll":r!=null&&st("scroll",t);break;case"onScrollEnd":r!=null&&st("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(s=r.__html,s!=null){if(u.children!=null)throw Error(i(60));t.innerHTML=s}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}s=Ml(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(s,""+r):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":r===!0?t.setAttribute(s,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(s,r):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(s,r):t.removeAttribute(s);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(s):t.setAttribute(s,r);break;case"popover":st("beforetoggle",t),st("toggle",t),Ol(t,"popover",r);break;case"xlinkActuate":Oo(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Oo(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Oo(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Oo(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Oo(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Oo(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Oo(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Oo(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Oo(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ol(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=YE.get(s)||s,Ol(t,s,r))}}function hp(t,n,s,r,u,f){switch(s){case"style":Tg(t,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(s=r.__html,s!=null){if(u.children!=null)throw Error(i(60));t.innerHTML=s}}break;case"children":typeof r=="string"?Ya(t,r):(typeof r=="number"||typeof r=="bigint")&&Ya(t,""+r);break;case"onScroll":r!=null&&st("scroll",t);break;case"onScrollEnd":r!=null&&st("scrollend",t);break;case"onClick":r!=null&&(t.onclick=ko);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hg.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),n=s.slice(2,u?s.length-7:void 0),f=t[mn]||null,f=f!=null?f[s]:null,typeof f=="function"&&t.removeEventListener(n,f,u),typeof r=="function")){typeof f!="function"&&f!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(n,r,u);break e}s in t?t[s]=r:r===!0?t.setAttribute(s,""):Ol(t,s,r)}}}function dn(t,n,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",t),st("load",t);var r=!1,u=!1,f;for(f in s)if(s.hasOwnProperty(f)){var x=s[f];if(x!=null)switch(f){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:wt(t,n,f,x,s,null)}}u&&wt(t,n,"srcSet",s.srcSet,s,null),r&&wt(t,n,"src",s.src,s,null);return;case"input":st("invalid",t);var R=f=x=u=null,V=null,oe=null;for(r in s)if(s.hasOwnProperty(r)){var ue=s[r];if(ue!=null)switch(r){case"name":u=ue;break;case"type":x=ue;break;case"checked":V=ue;break;case"defaultChecked":oe=ue;break;case"value":f=ue;break;case"defaultValue":R=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,n));break;default:wt(t,n,r,ue,s,null)}}vg(t,f,R,V,oe,x,u,!1);return;case"select":st("invalid",t),r=x=f=null;for(u in s)if(s.hasOwnProperty(u)&&(R=s[u],R!=null))switch(u){case"value":f=R;break;case"defaultValue":x=R;break;case"multiple":r=R;default:wt(t,n,u,R,s,null)}n=f,s=x,t.multiple=!!r,n!=null?Va(t,!!r,n,!1):s!=null&&Va(t,!!r,s,!0);return;case"textarea":st("invalid",t),f=u=r=null;for(x in s)if(s.hasOwnProperty(x)&&(R=s[x],R!=null))switch(x){case"value":r=R;break;case"defaultValue":u=R;break;case"children":f=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(i(91));break;default:wt(t,n,x,R,s,null)}Sg(t,r,u,f);return;case"option":for(V in s)s.hasOwnProperty(V)&&(r=s[V],r!=null)&&(V==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":wt(t,n,V,r,s,null));return;case"dialog":st("beforetoggle",t),st("toggle",t),st("cancel",t),st("close",t);break;case"iframe":case"object":st("load",t);break;case"video":case"audio":for(r=0;r<Tr.length;r++)st(Tr[r],t);break;case"image":st("error",t),st("load",t);break;case"details":st("toggle",t);break;case"embed":case"source":case"link":st("error",t),st("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in s)if(s.hasOwnProperty(oe)&&(r=s[oe],r!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:wt(t,n,oe,r,s,null)}return;default:if(Of(n)){for(ue in s)s.hasOwnProperty(ue)&&(r=s[ue],r!==void 0&&hp(t,n,ue,r,s,void 0));return}}for(R in s)s.hasOwnProperty(R)&&(r=s[R],r!=null&&wt(t,n,R,r,s,null))}function yR(t,n,s,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,x=null,R=null,V=null,oe=null,ue=null;for(re in s){var de=s[re];if(s.hasOwnProperty(re)&&de!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":V=de;default:r.hasOwnProperty(re)||wt(t,n,re,null,r,de)}}for(var ae in r){var re=r[ae];if(de=s[ae],r.hasOwnProperty(ae)&&(re!=null||de!=null))switch(ae){case"type":f=re;break;case"name":u=re;break;case"checked":oe=re;break;case"defaultChecked":ue=re;break;case"value":x=re;break;case"defaultValue":R=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,n));break;default:re!==de&&wt(t,n,ae,re,r,de)}}Rf(t,x,R,V,oe,ue,f,u);return;case"select":re=x=R=ae=null;for(f in s)if(V=s[f],s.hasOwnProperty(f)&&V!=null)switch(f){case"value":break;case"multiple":re=V;default:r.hasOwnProperty(f)||wt(t,n,f,null,r,V)}for(u in r)if(f=r[u],V=s[u],r.hasOwnProperty(u)&&(f!=null||V!=null))switch(u){case"value":ae=f;break;case"defaultValue":R=f;break;case"multiple":x=f;default:f!==V&&wt(t,n,u,f,r,V)}n=R,s=x,r=re,ae!=null?Va(t,!!s,ae,!1):!!r!=!!s&&(n!=null?Va(t,!!s,n,!0):Va(t,!!s,s?[]:"",!1));return;case"textarea":re=ae=null;for(R in s)if(u=s[R],s.hasOwnProperty(R)&&u!=null&&!r.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:wt(t,n,R,null,r,u)}for(x in r)if(u=r[x],f=s[x],r.hasOwnProperty(x)&&(u!=null||f!=null))switch(x){case"value":ae=u;break;case"defaultValue":re=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(i(91));break;default:u!==f&&wt(t,n,x,u,r,f)}xg(t,ae,re);return;case"option":for(var _e in s)ae=s[_e],s.hasOwnProperty(_e)&&ae!=null&&!r.hasOwnProperty(_e)&&(_e==="selected"?t.selected=!1:wt(t,n,_e,null,r,ae));for(V in r)ae=r[V],re=s[V],r.hasOwnProperty(V)&&ae!==re&&(ae!=null||re!=null)&&(V==="selected"?t.selected=ae&&typeof ae!="function"&&typeof ae!="symbol":wt(t,n,V,ae,r,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Fe in s)ae=s[Fe],s.hasOwnProperty(Fe)&&ae!=null&&!r.hasOwnProperty(Fe)&&wt(t,n,Fe,null,r,ae);for(oe in r)if(ae=r[oe],re=s[oe],r.hasOwnProperty(oe)&&ae!==re&&(ae!=null||re!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,n));break;default:wt(t,n,oe,ae,r,re)}return;default:if(Of(n)){for(var Tt in s)ae=s[Tt],s.hasOwnProperty(Tt)&&ae!==void 0&&!r.hasOwnProperty(Tt)&&hp(t,n,Tt,void 0,r,ae);for(ue in r)ae=r[ue],re=s[ue],!r.hasOwnProperty(ue)||ae===re||ae===void 0&&re===void 0||hp(t,n,ue,ae,r,re);return}}for(var te in s)ae=s[te],s.hasOwnProperty(te)&&ae!=null&&!r.hasOwnProperty(te)&&wt(t,n,te,null,r,ae);for(de in r)ae=r[de],re=s[de],!r.hasOwnProperty(de)||ae===re||ae==null&&re==null||wt(t,n,de,ae,r,re)}function Ev(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bR(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,s=performance.getEntriesByType("resource"),r=0;r<s.length;r++){var u=s[r],f=u.transferSize,x=u.initiatorType,R=u.duration;if(f&&R&&Ev(x)){for(x=0,R=u.responseEnd,r+=1;r<s.length;r++){var V=s[r],oe=V.startTime;if(oe>R)break;var ue=V.transferSize,de=V.initiatorType;ue&&Ev(de)&&(V=V.responseEnd,x+=ue*(V<R?1:(R-oe)/(V-oe)))}if(--r,n+=8*(f+x)/(u.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var mp=null,gp=null;function Rc(t){return t.nodeType===9?t:t.ownerDocument}function Cv(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Rv(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function yp(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var bp=null;function vR(){var t=window.event;return t&&t.type==="popstate"?t===bp?!1:(bp=t,!0):(bp=null,!1)}var Av=typeof setTimeout=="function"?setTimeout:void 0,xR=typeof clearTimeout=="function"?clearTimeout:void 0,Ov=typeof Promise=="function"?Promise:void 0,SR=typeof queueMicrotask=="function"?queueMicrotask:typeof Ov<"u"?function(t){return Ov.resolve(null).then(t).catch(wR)}:Av;function wR(t){setTimeout(function(){throw t})}function Ms(t){return t==="head"}function kv(t,n){var s=n,r=0;do{var u=s.nextSibling;if(t.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(r===0){t.removeChild(u),Si(n);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")Cr(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Cr(s);for(var f=s.firstChild;f;){var x=f.nextSibling,R=f.nodeName;f[Vi]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=x}}else s==="body"&&Cr(t.ownerDocument.body);s=u}while(s);Si(n)}function Nv(t,n){var s=t;t=0;do{var r=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),r&&r.nodeType===8)if(s=r.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=r}while(s)}function vp(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":vp(s),Ef(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function TR(t,n,s,r){for(;t.nodeType===1;){var u=s;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[Vi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(f=t.getAttribute("src"),(f!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=Jn(t.nextSibling),t===null)break}return null}function ER(t,n,s){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Jn(t.nextSibling),t===null))return null;return t}function Mv(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Jn(t.nextSibling),t===null))return null;return t}function xp(t){return t.data==="$?"||t.data==="$~"}function Sp(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function CR(t,n){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||s.readyState!=="loading")n();else{var r=function(){n(),s.removeEventListener("DOMContentLoaded",r)};s.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Jn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var wp=null;function jv(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(n===0)return Jn(t.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}t=t.nextSibling}return null}function _v(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return t;n--}else s!=="/$"&&s!=="/&"||n++}t=t.previousSibling}return null}function Dv(t,n,s){switch(n=Rc(s),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function Cr(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ef(t)}var eo=new Map,zv=new Set;function Ac(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var qo=q.d;q.d={f:RR,r:AR,D:OR,C:kR,L:NR,m:MR,X:_R,S:jR,M:DR};function RR(){var t=qo.f(),n=bc();return t||n}function AR(t){var n=Ua(t);n!==null&&n.tag===5&&n.type==="form"?Zy(n):qo.r(t)}var bi=typeof document>"u"?null:document;function Pv(t,n,s){var r=bi;if(r&&typeof n=="string"&&n){var u=Gn(n);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),zv.has(u)||(zv.add(u),t={rel:t,crossOrigin:s,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),dn(n,"link",t),sn(n),r.head.appendChild(n)))}}function OR(t){qo.D(t),Pv("dns-prefetch",t,null)}function kR(t,n){qo.C(t,n),Pv("preconnect",t,n)}function NR(t,n,s){qo.L(t,n,s);var r=bi;if(r&&t&&n){var u='link[rel="preload"][as="'+Gn(n)+'"]';n==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+Gn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+Gn(s.imageSizes)+'"]')):u+='[href="'+Gn(t)+'"]';var f=u;switch(n){case"style":f=vi(t);break;case"script":f=xi(t)}eo.has(f)||(t=v({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:t,as:n},s),eo.set(f,t),r.querySelector(u)!==null||n==="style"&&r.querySelector(Rr(f))||n==="script"&&r.querySelector(Ar(f))||(n=r.createElement("link"),dn(n,"link",t),sn(n),r.head.appendChild(n)))}}function MR(t,n){qo.m(t,n);var s=bi;if(s&&t){var r=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Gn(r)+'"][href="'+Gn(t)+'"]',f=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=xi(t)}if(!eo.has(f)&&(t=v({rel:"modulepreload",href:t},n),eo.set(f,t),s.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ar(f)))return}r=s.createElement("link"),dn(r,"link",t),sn(r),s.head.appendChild(r)}}}function jR(t,n,s){qo.S(t,n,s);var r=bi;if(r&&t){var u=Ba(r).hoistableStyles,f=vi(t);n=n||"default";var x=u.get(f);if(!x){var R={loading:0,preload:null};if(x=r.querySelector(Rr(f)))R.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":n},s),(s=eo.get(f))&&Tp(t,s);var V=x=r.createElement("link");sn(V),dn(V,"link",t),V._p=new Promise(function(oe,ue){V.onload=oe,V.onerror=ue}),V.addEventListener("load",function(){R.loading|=1}),V.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Oc(x,n,r)}x={type:"stylesheet",instance:x,count:1,state:R},u.set(f,x)}}}function _R(t,n){qo.X(t,n);var s=bi;if(s&&t){var r=Ba(s).hoistableScripts,u=xi(t),f=r.get(u);f||(f=s.querySelector(Ar(u)),f||(t=v({src:t,async:!0},n),(n=eo.get(u))&&Ep(t,n),f=s.createElement("script"),sn(f),dn(f,"link",t),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function DR(t,n){qo.M(t,n);var s=bi;if(s&&t){var r=Ba(s).hoistableScripts,u=xi(t),f=r.get(u);f||(f=s.querySelector(Ar(u)),f||(t=v({src:t,async:!0,type:"module"},n),(n=eo.get(u))&&Ep(t,n),f=s.createElement("script"),sn(f),dn(f,"link",t),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function Lv(t,n,s,r){var u=(u=ie.current)?Ac(u):null;if(!u)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=vi(s.href),s=Ba(u).hoistableStyles,r=s.get(n),r||(r={type:"style",instance:null,count:0,state:null},s.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=vi(s.href);var f=Ba(u).hoistableStyles,x=f.get(t);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(t,x),(f=u.querySelector(Rr(t)))&&!f._p&&(x.instance=f,x.state.loading=5),eo.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},eo.set(t,s),f||zR(u,t,s,x.state))),n&&r===null)throw Error(i(528,""));return x}if(n&&r!==null)throw Error(i(529,""));return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=xi(s),s=Ba(u).hoistableScripts,r=s.get(n),r||(r={type:"script",instance:null,count:0,state:null},s.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function vi(t){return'href="'+Gn(t)+'"'}function Rr(t){return'link[rel="stylesheet"]['+t+"]"}function Iv(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function zR(t,n,s,r){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=t.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),dn(n,"link",s),sn(n),t.head.appendChild(n))}function xi(t){return'[src="'+Gn(t)+'"]'}function Ar(t){return"script[async]"+t}function Hv(t,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var r=t.querySelector('style[data-href~="'+Gn(s.href)+'"]');if(r)return n.instance=r,sn(r),r;var u=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),sn(r),dn(r,"style",u),Oc(r,s.precedence,t),n.instance=r;case"stylesheet":u=vi(s.href);var f=t.querySelector(Rr(u));if(f)return n.state.loading|=4,n.instance=f,sn(f),f;r=Iv(s),(u=eo.get(u))&&Tp(r,u),f=(t.ownerDocument||t).createElement("link"),sn(f);var x=f;return x._p=new Promise(function(R,V){x.onload=R,x.onerror=V}),dn(f,"link",r),n.state.loading|=4,Oc(f,s.precedence,t),n.instance=f;case"script":return f=xi(s.src),(u=t.querySelector(Ar(f)))?(n.instance=u,sn(u),u):(r=s,(u=eo.get(f))&&(r=v({},s),Ep(r,u)),t=t.ownerDocument||t,u=t.createElement("script"),sn(u),dn(u,"link",r),t.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,Oc(r,s.precedence,t));return n.instance}function Oc(t,n,s){for(var r=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,f=u,x=0;x<r.length;x++){var R=r[x];if(R.dataset.precedence===n)f=R;else if(f!==u)break}f?f.parentNode.insertBefore(t,f.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(t,n.firstChild))}function Tp(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Ep(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var kc=null;function Uv(t,n,s){if(kc===null){var r=new Map,u=kc=new Map;u.set(s,r)}else u=kc,r=u.get(s),r||(r=new Map,u.set(s,r));if(r.has(t))return r;for(r.set(t,null),s=s.getElementsByTagName(t),u=0;u<s.length;u++){var f=s[u];if(!(f[Vi]||f[qt]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var x=f.getAttribute(n)||"";x=t+x;var R=r.get(x);R?R.push(f):r.set(x,[f])}}return r}function Bv(t,n,s){t=t.ownerDocument||t,t.head.insertBefore(s,n==="title"?t.querySelector("head > title"):null)}function PR(t,n,s){if(s===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Fv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function LR(t,n,s,r){if(s.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=vi(r.href),f=n.querySelector(Rr(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Nc.bind(t),n.then(t,t)),s.state.loading|=4,s.instance=f,sn(f);return}f=n.ownerDocument||n,r=Iv(r),(u=eo.get(u))&&Tp(r,u),f=f.createElement("link"),sn(f);var x=f;x._p=new Promise(function(R,V){x.onload=R,x.onerror=V}),dn(f,"link",r),s.instance=f}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Nc.bind(t),n.addEventListener("load",s),n.addEventListener("error",s))}}var Cp=0;function IR(t,n){return t.stylesheets&&t.count===0&&jc(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var r=setTimeout(function(){if(t.stylesheets&&jc(t,t.stylesheets),t.unsuspend){var f=t.unsuspend;t.unsuspend=null,f()}},6e4+n);0<t.imgBytes&&Cp===0&&(Cp=62500*bR());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&jc(t,t.stylesheets),t.unsuspend)){var f=t.unsuspend;t.unsuspend=null,f()}},(t.imgBytes>Cp?50:800)+n);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function Nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Mc=null;function jc(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Mc=new Map,n.forEach(HR,t),Mc=null,Nc.call(t))}function HR(t,n){if(!(n.state.loading&4)){var s=Mc.get(t);if(s)var r=s.get(null);else{s=new Map,Mc.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var x=u[f];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),r=x)}r&&s.set(null,r)}u=n.instance,x=u.getAttribute("data-precedence"),f=s.get(x)||r,f===r&&s.set(null,u),s.set(x,u),this.count++,r=Nc.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),f?f.parentNode.insertBefore(u,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),n.state.loading|=4}}var Or={$$typeof:k,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function UR(t,n,s,r,u,f,x,R,V){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yo(0),this.hiddenUpdates=yo(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function Vv(t,n,s,r,u,f,x,R,V,oe,ue,de){return t=new UR(t,n,s,x,V,oe,ue,de,R),n=1,f===!0&&(n|=24),f=Pn(3,null,null,n),t.current=f,f.stateNode=t,n=sd(),n.refCount++,t.pooledCache=n,n.refCount++,f.memoizedState={element:r,isDehydrated:s,cache:n},ld(f),t}function Yv(t){return t?(t=Qa,t):Qa}function qv(t,n,s,r,u,f){u=Yv(u),r.context===null?r.context=u:r.pendingContext=u,r=xs(n),r.payload={element:s},f=f===void 0?null:f,f!==null&&(r.callback=f),s=Ss(t,r,n),s!==null&&(An(s,t,n),ir(s,t,n))}function Gv(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<n?s:n}}function Rp(t,n){Gv(t,n),(t=t.alternate)&&Gv(t,n)}function Xv(t){if(t.tag===13||t.tag===31){var n=oa(t,67108864);n!==null&&An(n,t,67108864),Rp(t,67108864)}}function Kv(t){if(t.tag===13||t.tag===31){var n=Bn();n=Dn(n);var s=oa(t,n);s!==null&&An(s,t,n),Rp(t,n)}}var _c=!0;function BR(t,n,s,r){var u=P.T;P.T=null;var f=q.p;try{q.p=2,Ap(t,n,s,r)}finally{q.p=f,P.T=u}}function FR(t,n,s,r){var u=P.T;P.T=null;var f=q.p;try{q.p=8,Ap(t,n,s,r)}finally{q.p=f,P.T=u}}function Ap(t,n,s,r){if(_c){var u=Op(r);if(u===null)pp(t,n,r,Dc,s),Wv(t,r);else if(YR(u,t,n,s,r))r.stopPropagation();else if(Wv(t,r),n&4&&-1<VR.indexOf(t)){for(;u!==null;){var f=Ua(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var x=ft(f.pendingLanes);if(x!==0){var R=f;for(R.pendingLanes|=2,R.entangledLanes|=2;x;){var V=1<<31-ct(x);R.entanglements[1]|=V,x&=~V}wo(f),(ht&6)===0&&(gc=le()+500,wr(0))}}break;case 31:case 13:R=oa(f,2),R!==null&&An(R,f,2),bc(),Rp(f,2)}if(f=Op(r),f===null&&pp(t,n,r,Dc,s),f===u)break;u=f}u!==null&&r.stopPropagation()}else pp(t,n,r,null,s)}}function Op(t){return t=Nf(t),kp(t)}var Dc=null;function kp(t){if(Dc=null,t=Ha(t),t!==null){var n=c(t);if(n===null)t=null;else{var s=n.tag;if(s===13){if(t=d(n),t!==null)return t;t=null}else if(s===31){if(t=g(n),t!==null)return t;t=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Dc=t,null}function $v(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ve()){case he:return 2;case ce:return 8;case xe:case He:return 32;case Lt:return 268435456;default:return 32}default:return 32}}var Np=!1,js=null,_s=null,Ds=null,kr=new Map,Nr=new Map,zs=[],VR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Wv(t,n){switch(t){case"focusin":case"focusout":js=null;break;case"dragenter":case"dragleave":_s=null;break;case"mouseover":case"mouseout":Ds=null;break;case"pointerover":case"pointerout":kr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nr.delete(n.pointerId)}}function Mr(t,n,s,r,u,f){return t===null||t.nativeEvent!==f?(t={blockedOn:n,domEventName:s,eventSystemFlags:r,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Ua(n),n!==null&&Xv(n)),t):(t.eventSystemFlags|=r,n=t.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),t)}function YR(t,n,s,r,u){switch(n){case"focusin":return js=Mr(js,t,n,s,r,u),!0;case"dragenter":return _s=Mr(_s,t,n,s,r,u),!0;case"mouseover":return Ds=Mr(Ds,t,n,s,r,u),!0;case"pointerover":var f=u.pointerId;return kr.set(f,Mr(kr.get(f)||null,t,n,s,r,u)),!0;case"gotpointercapture":return f=u.pointerId,Nr.set(f,Mr(Nr.get(f)||null,t,n,s,r,u)),!0}return!1}function Qv(t){var n=Ha(t.target);if(n!==null){var s=c(n);if(s!==null){if(n=s.tag,n===13){if(n=d(s),n!==null){t.blockedOn=n,ps(t.priority,function(){Kv(s)});return}}else if(n===31){if(n=g(s),n!==null){t.blockedOn=n,ps(t.priority,function(){Kv(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function zc(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var s=Op(t.nativeEvent);if(s===null){s=t.nativeEvent;var r=new s.constructor(s.type,s);kf=r,s.target.dispatchEvent(r),kf=null}else return n=Ua(s),n!==null&&Xv(n),t.blockedOn=s,!1;n.shift()}return!0}function Zv(t,n,s){zc(t)&&s.delete(n)}function qR(){Np=!1,js!==null&&zc(js)&&(js=null),_s!==null&&zc(_s)&&(_s=null),Ds!==null&&zc(Ds)&&(Ds=null),kr.forEach(Zv),Nr.forEach(Zv)}function Pc(t,n){t.blockedOn===n&&(t.blockedOn=null,Np||(Np=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,qR)))}var Lc=null;function Jv(t){Lc!==t&&(Lc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Lc===t&&(Lc=null);for(var n=0;n<t.length;n+=3){var s=t[n],r=t[n+1],u=t[n+2];if(typeof r!="function"){if(kp(r||s)===null)continue;break}var f=Ua(s);f!==null&&(t.splice(n,3),n-=3,Od(f,{pending:!0,data:u,method:s.method,action:r},r,u))}}))}function Si(t){function n(V){return Pc(V,t)}js!==null&&Pc(js,t),_s!==null&&Pc(_s,t),Ds!==null&&Pc(Ds,t),kr.forEach(n),Nr.forEach(n);for(var s=0;s<zs.length;s++){var r=zs[s];r.blockedOn===t&&(r.blockedOn=null)}for(;0<zs.length&&(s=zs[0],s.blockedOn===null);)Qv(s),s.blockedOn===null&&zs.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(r=0;r<s.length;r+=3){var u=s[r],f=s[r+1],x=u[mn]||null;if(typeof f=="function")x||Jv(s);else if(x){var R=null;if(f&&f.hasAttribute("formAction")){if(u=f,x=f[mn]||null)R=x.formAction;else if(kp(u)!==null)continue}else R=x.action;typeof R=="function"?s[r+1]=R:(s.splice(r,3),r-=3),Jv(s)}}}function ex(){function t(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),r||setTimeout(s,20)}function s(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(s,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function Mp(t){this._internalRoot=t}Ic.prototype.render=Mp.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var s=n.current,r=Bn();qv(s,r,t,n,null,null)},Ic.prototype.unmount=Mp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;qv(t.current,2,null,t,null,null),bc(),n[Ao]=null}};function Ic(t){this._internalRoot=t}Ic.prototype.unstable_scheduleHydration=function(t){if(t){var n=bo();t={blockedOn:null,target:t,priority:n};for(var s=0;s<zs.length&&n!==0&&n<zs[s].priority;s++);zs.splice(s,0,t),s===0&&Qv(t)}};var tx=o.version;if(tx!=="19.2.4")throw Error(i(527,tx,"19.2.4"));q.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=h(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var GR={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{Ae=Hc.inject(GR),Ye=Hc}catch{}}return _r.createRoot=function(t,n){if(!l(t))throw Error(i(299));var s=!1,r="",u=lb,f=cb,x=ub;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Vv(t,1,!1,null,null,s,r,null,u,f,x,ex),t[Ao]=n.current,dp(t),new Mp(n)},_r.hydrateRoot=function(t,n,s){if(!l(t))throw Error(i(299));var r=!1,u="",f=lb,x=cb,R=ub,V=null;return s!=null&&(s.unstable_strictMode===!0&&(r=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(R=s.onRecoverableError),s.formState!==void 0&&(V=s.formState)),n=Vv(t,1,!0,n,s??null,r,u,V,f,x,R,ex),n.context=Yv(null),s=n.current,r=Bn(),r=Dn(r),u=xs(r),u.callback=null,Ss(s,u,r),s=r,n.current.lanes=s,Sn(n,s),wo(n),t[Ao]=n.current,dp(t),new Ic(n)},_r.version="19.2.4",_r}var fx;function sA(){if(fx)return Dp.exports;fx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(o){console.error(o)}}return e(),Dp.exports=oA(),Dp.exports}var aA=sA();function uS(e){var o,a,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(o=0;o<l;o++)e[o]&&(a=uS(e[o]))&&(i&&(i+=" "),i+=a)}else for(a in e)e[a]&&(i&&(i+=" "),i+=a);return i}function iA(){for(var e,o,a=0,i="",l=arguments.length;a<l;a++)(e=arguments[a])&&(o=uS(e))&&(i&&(i+=" "),i+=o);return i}function lt(...e){return iA(e)}const dx={};function Zt(e,o){const a=b.useRef(dx);return a.current===dx&&(a.current=e(o)),a}const dh=[];let ph;function rA(){return ph}function lA(e){dh.push(e)}function cl(e){const o=(a,i)=>{const l=Zt(cA).current;let c;try{ph=l;for(const d of dh)d.before(l);c=e(a,i);for(const d of dh)d.after(l);l.didInitialize=!0}finally{ph=void 0}return c};return o.displayName=e.displayName||e.name,o}function qh(e){return b.forwardRef(cl(e))}function cA(){return{didInitialize:!1}}function Ht(){}const ho=Object.freeze([]),Ct=Object.freeze({}),uA=()=>{},we=typeof document<"u"?b.useLayoutEffect:uA;function fA(e,o){return function(i,...l){const c=new URL(e);return c.searchParams.set("code",i.toString()),l.forEach(d=>c.searchParams.append("args[]",d)),`${o} error #${i}; visit ${c} for the full message.`}}const kt=fA("https://base-ui.com/production-error","Base UI"),fS=b.createContext(void 0);function Au(e){const o=b.useContext(fS);if(o===void 0&&!e)throw new Error(kt(72));return o}function Ou(e){b.useEffect(e,ho)}const Dr=0;class Mn{static create(){return new Mn}currentId=Dr;start(o,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Dr,a()},o)}isStarted(){return this.currentId!==Dr}clear=()=>{this.currentId!==Dr&&(clearTimeout(this.currentId),this.currentId=Dr)};disposeEffect=()=>this.clear}function on(){const e=Zt(Mn.create).current;return Ou(e.disposeEffect),e}function dA(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:pA,platform:hA,maxTouchPoints:mA}=dA(),ku=pA.toLowerCase(),Wr=hA.toLowerCase(),Nu=/^i(os$|p)/.test(Wr)||Wr==="macintel"&&mA>1,px="android",hh=Wr===px||ku.includes(px),Gh=!Nu&&Wr.startsWith("mac");Wr.startsWith("win");const gA=Gh||Nu,cs=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!cs&&ku.includes("firefox");!cs&&ku.includes("chrom");const dS=gA,Xh=/jsdom|happydom/.test(ku);function To(e){e.preventDefault(),e.stopPropagation()}function yA(e){return"nativeEvent"in e}function Mu(e){return e.pointerType===""&&e.isTrusted?!0:hh&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Kh(e){return Xh?!1:!hh&&e.width===0&&e.height===0||hh&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Bs(e,o){const a=["mouse","pen"];return o||a.push("",void 0),a.includes(e)}function bA(e){const o=e.type;return o==="click"||o==="mousedown"||o==="keydown"||o==="keyup"}function ju(){return typeof window<"u"}function pn(e){return $h(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function us(e){var o;return(o=($h(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function $h(e){return ju()?e instanceof Node||e instanceof Rt(e).Node:!1}function et(e){return ju()?e instanceof Element||e instanceof Rt(e).Element:!1}function vt(e){return ju()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function Oi(e){return!ju()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function ul(e){const{overflow:o,overflowX:a,overflowY:i,display:l}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(o+i+a)&&l!=="inline"&&l!=="contents"}function vA(e){return/^(table|td|th)$/.test(pn(e))}function _u(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const xA=/transform|translate|scale|rotate|perspective|filter/,SA=/paint|layout|strict|content/,ga=e=>!!e&&e!=="none";let Ip;function Wh(e){const o=et(e)?Fn(e):e;return ga(o.transform)||ga(o.translate)||ga(o.scale)||ga(o.rotate)||ga(o.perspective)||!Qh()&&(ga(o.backdropFilter)||ga(o.filter))||xA.test(o.willChange||"")||SA.test(o.contain||"")}function wA(e){let o=ts(e);for(;vt(o)&&!Wo(o);){if(Wh(o))return o;if(_u(o))return null;o=ts(o)}return null}function Qh(){return Ip==null&&(Ip=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ip}function Wo(e){return/^(html|body|#document)$/.test(pn(e))}function Fn(e){return Rt(e).getComputedStyle(e)}function Du(e){return et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(pn(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Oi(e)&&e.host||us(e);return Oi(o)?o.host:o}function pS(e){const o=ts(e);return Wo(o)?(e.ownerDocument||e).body:vt(o)&&ul(o)?o:pS(o)}function Qr(e,o,a){var i;o===void 0&&(o=[]),a===void 0&&(a=!0);const l=pS(e),c=l===((i=e.ownerDocument)==null?void 0:i.body),d=Rt(l);if(c){const g=mh(d);return o.concat(d,d.visualViewport||[],ul(l)?l:[],g&&a?Qr(g):[])}else return o.concat(l,Qr(l,[],a))}function mh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let o=e.activeElement;for(;o?.shadowRoot?.activeElement!=null;)o=o.shadowRoot.activeElement;return o}function De(e,o){if(!e||!o)return!1;const a=o.getRootNode?.();if(e.contains(o))return!0;if(a&&Oi(a)){let i=o;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Pt(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const gh="data-base-ui-focusable",hS="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",zu="ArrowLeft",Pu="ArrowRight",mS="ArrowUp",Zh="ArrowDown",gS="data-starting-style",TA="data-ending-style",EA={[gS]:""},CA={[TA]:""},fl={transitionStatus(e){return e==="starting"?EA:e==="ending"?CA:null}},RA="data-open",AA="data-closed",OA="data-anchor-hidden",yS="data-popup-open",kA="data-pressed",NA={[yS]:""},MA={[yS]:"",[kA]:""},jA={[RA]:""},_A={[AA]:""},DA={[OA]:""},Lu={open(e){return e?NA:null}},iu={open(e){return e?MA:null}},dl={open(e){return e?jA:_A},anchorHidden(e){return e?DA:null}},Iu={...dl,...fl},yh="data-trigger-disabled";function ru(e,o){if(!et(e))return!1;const a=e;if(o.hasElement(a))return!a.hasAttribute(yh);for(const[,i]of o.entries())if(De(i,a))return!i.hasAttribute(yh);return!1}function Hp(e,o){if(o==null)return!1;if("composedPath"in e)return e.composedPath().includes(o);const a=e;return a.target!=null&&o.contains(a.target)}function zA(e){return e.matches("html,body")}function Hu(e){return vt(e)&&e.matches(hS)}function PA(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${hS}`)!=null}function bh(e){return e?e.getAttribute("role")==="combobox"&&Hu(e):!1}function lu(e){if(!e||Xh)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function cu(e){return e?e.hasAttribute(gh)?e:e.querySelector(`[${gh}]`)||e:null}function LA(e,o){return o!=null&&!Bs(o)?0:typeof e=="function"?e():e}function Aa(e,o,a){const i=LA(e,a);return typeof i=="number"?i:i?.[o]}function hx(e){return typeof e=="function"?e():e}function bS(e,o){return o||e==="click"||e==="mousedown"}function IA(e){return e?.includes("mouse")&&e!=="mousedown"}const ns="none",os="trigger-press",Ft="trigger-hover",Ti="trigger-focus",Uu="outside-press",Yr="item-press",vS="close-press",Vs="focus-out",pl="escape-key",uu="list-navigation",xS="cancel-open",Hr="sibling-open",HA="disabled",Bu="imperative-action",UA="window-resize";function qe(e,o,a,i){let l=!1,c=!1;const d=Ct;return{reason:e,event:o??new Event("base-ui"),cancel(){l=!0},allowPropagation(){c=!0},get isCanceled(){return l},get isPropagationAllowed(){return c},trigger:a,...d}}const SS=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Mn,currentIdRef:{current:null},currentContextRef:{current:null}});function BA(e,o){e.current=o.current}function FA(e){const{children:o,delay:a,timeoutMs:i=0}=e,l=b.useRef(a),c=b.useRef(a),d=b.useRef(null),g=b.useRef(null),m=on();return we(()=>{if(c.current=a,!d.current){l.current=a;return}l.current={open:Aa(l.current,"open"),close:Aa(a,"close")}},[a,d,l,c]),p.jsx(SS.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:l,initialDelayRef:c,currentIdRef:d,timeoutMs:i,currentContextRef:g,timeout:m}),[i,m]),children:o})}function VA(e,o={open:!1}){const{open:a}=o,i="rootStore"in e?e.rootStore:e,l=i.useState("floatingId"),c=b.useContext(SS),{currentIdRef:d,delayRef:g,timeoutMs:m,initialDelayRef:h,currentContextRef:y,hasProvider:v,timeout:S}=c,[w,T]=b.useState(!1),A=b.useRef(a);return we(()=>{A.current=a},[a]),we(()=>{function N(){y.current?.setIsInstantPhase(!1),d.current=null,y.current=null,g.current=h.current,S.clear()}if(d.current&&!a&&d.current===l){if(T(!1),m){const C=l;return S.start(m,()=>{i.select("open")||d.current&&d.current!==C||N()}),()=>{(A.current||d.current!==C)&&S.clear()}}N()}},[a,l,d,g,m,h,y,S,i]),we(()=>{if(!a)return;const N=y.current,C=d.current;S.clear(),y.current={onOpenChange:i.setOpen,setIsInstantPhase:T},d.current=l,g.current={open:0,close:Aa(h.current,"close")},C!==null&&C!==l?(T(!0),N?.setIsInstantPhase(!0),N?.onOpenChange(!1,qe(ns))):(T(!1),N?.setIsInstantPhase(!1))},[a,l,i,d,g,h,y,S]),we(()=>()=>{if(d.current===l){if(y.current=null,!A.current)return;d.current=null,BA(g,h),S.clear()}},[y,d,g,l,h,S]),b.useMemo(()=>({activeIdRef:d,hasProvider:v,delayRef:g,isInstantPhase:w}),[d,v,g,w])}function Ge(e,o,a,i){return e.addEventListener(o,a,i),()=>{e.removeEventListener(o,a,i)}}function po(...e){return()=>{for(let o=0;o<e.length;o+=1){const a=e[o];a&&a()}}}function ss(e,o,a,i){const l=Zt(wS).current;return qA(l,e,o,a,i)&&TS(l,[e,o,a,i]),l.callback}function YA(e){const o=Zt(wS).current;return GA(o,e)&&TS(o,e),o.callback}function wS(){return{callback:null,cleanup:null,refs:[]}}function qA(e,o,a,i,l){return e.refs[0]!==o||e.refs[1]!==a||e.refs[2]!==i||e.refs[3]!==l}function GA(e,o){return e.refs.length!==o.length||e.refs.some((a,i)=>a!==o[i])}function TS(e,o){if(e.refs=o,o.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const i=Array(o.length).fill(null);for(let l=0;l<o.length;l+=1){const c=o[l];if(c!=null)switch(typeof c){case"function":{const d=c(a);typeof d=="function"&&(i[l]=d);break}case"object":{c.current=a;break}}}e.cleanup=()=>{for(let l=0;l<o.length;l+=1){const c=o[l];if(c!=null)switch(typeof c){case"function":{const d=i[l];typeof d=="function"?d():c(null);break}case"object":{c.current=null;break}}}}}}}function Vt(e){const o=Zt(XA,e).current;return o.next=e,we(o.effect),o}function XA(e){const o={current:e,next:e,effect:()=>{o.current=o.next}};return o}const Jh={...JR},Up=Jh.useInsertionEffect,KA=Up&&Up!==Jh.useLayoutEffect?Up:e=>e();function Ne(e){const o=Zt($A).current;return o.next=e,KA(o.effect),o.trampoline}function $A(){const e={next:void 0,callback:WA,trampoline:(...o)=>e.callback?.(...o),effect:()=>{e.callback=e.next}};return e}function WA(){}const Uc=null;class QA{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=o=>{this.isScheduled=!1;const a=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let l=0;l<a.length;l+=1)a[l]?.(o)};request(o){const a=this.nextId;return this.nextId+=1,this.callbacks.push(o),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(o){const a=o-this.startId;a<0||a>=this.callbacks.length||this.callbacks[a]!==null&&(this.callbacks[a]=null,this.callbacksCount-=1)}}let Bc=new QA;class Eo{static create(){return new Eo}static request(o){return Bc.request(o)}static cancel(o){return Bc.cancel(o)}currentId=Uc;request(o){this.cancel(),this.currentId=Bc.request(()=>{this.currentId=Uc,o()})}cancel=()=>{this.currentId!==Uc&&(Bc.cancel(this.currentId),this.currentId=Uc)};disposeEffect=()=>this.cancel}function ki(){const e=Zt(Eo.create).current;return Ou(e.disposeEffect),e}function We(e){return e?.ownerDocument||document}const ES={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Fu={...ES,position:"fixed",top:0,left:0},CS={...ES,position:"absolute"},as=b.forwardRef(function(o,a){const[i,l]=b.useState();we(()=>{dS&&cs&&l("button")},[]);const c={tabIndex:0,role:i};return p.jsx("span",{...o,ref:a,style:Fu,"aria-hidden":i?void 0:!0,...c,"data-base-ui-focus-guard":""})}),Ni=Math.min,Qo=Math.max,fu=Math.round,Fc=Math.floor,Zo=e=>({x:e,y:e}),ZA={left:"right",right:"left",bottom:"top",top:"bottom"};function RS(e,o,a){return Qo(e,Ni(o,a))}function Ys(e,o){return typeof e=="function"?e(o):e}function no(e){return e.split("-")[0]}function is(e){return e.split("-")[1]}function em(e){return e==="x"?"y":"x"}function tm(e){return e==="y"?"height":"width"}function to(e){const o=e[0];return o==="t"||o==="b"?"y":"x"}function nm(e){return em(to(e))}function JA(e,o,a){a===void 0&&(a=!1);const i=is(e),l=nm(e),c=tm(l);let d=l==="x"?i===(a?"end":"start")?"right":"left":i==="start"?"bottom":"top";return o.reference[c]>o.floating[c]&&(d=du(d)),[d,du(d)]}function eO(e){const o=du(e);return[vh(e),o,vh(o)]}function vh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mx=["left","right"],gx=["right","left"],tO=["top","bottom"],nO=["bottom","top"];function oO(e,o,a){switch(e){case"top":case"bottom":return a?o?gx:mx:o?mx:gx;case"left":case"right":return o?tO:nO;default:return[]}}function sO(e,o,a,i){const l=is(e);let c=oO(no(e),a==="start",i);return l&&(c=c.map(d=>d+"-"+l),o&&(c=c.concat(c.map(vh)))),c}function du(e){const o=no(e);return ZA[o]+e.slice(o.length)}function aO(e){var o,a,i,l;return{top:(o=e.top)!=null?o:0,right:(a=e.right)!=null?a:0,bottom:(i=e.bottom)!=null?i:0,left:(l=e.left)!=null?l:0}}function AS(e){return typeof e!="number"?aO(e):{top:e,right:e,bottom:e,left:e}}function Zr(e){const{x:o,y:a,width:i,height:l}=e;return{width:i,height:l,top:a,left:o,right:o+i,bottom:a+l,x:o,y:a}}function qr(e,o){return o<0||o>=e.length}function tu(e,o){return $o(e.current,{disabledIndices:o})}function xh(e,o){return $o(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:o})}function $o(e,{startingIndex:o=-1,decrement:a=!1,disabledIndices:i,amount:l=1}={}){let c=o;do c+=a?-l:l;while(c>=0&&c<=e.length-1&&Ei(e,c,i));return c}function Ei(e,o,a){if(typeof a=="function"?a(o):a?.includes(o)??!1)return!0;const l=e[o];return l?!Vu(l)||l.matches(":disabled")?!0:!a&&(l.hasAttribute("disabled")||l.getAttribute("aria-disabled")==="true"):!1}function iO(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Vu(e,o=e?Fn(e):null){return!e||!e.isConnected||!o||iO(o)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():o.display!=="none"&&o.display!=="contents"}const rO='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function lO(e){const o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return Oi(a)?a.host:null}function Sh(e){for(const o of Array.from(e.children))if(pn(o)==="summary")return o;return null}function cO(e,o){const a=Sh(o);return!!a&&(e===a||De(a,e))}function OS(e){const o=e?pn(e):"";return e!=null&&e.matches(rO)&&(o!=="summary"||e.parentElement!=null&&pn(e.parentElement)==="details"&&Sh(e.parentElement)===e)&&(o!=="details"||Sh(e)==null)&&(o!=="input"||e.type!=="hidden")}function kS(e){if(!OS(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let o=e;o;o=lO(o)){const a=o!==e,i=pn(o)==="slot";if(o.hasAttribute("inert")||a&&pn(o)==="details"&&!o.open&&!cO(e,o)||o.hasAttribute("hidden")||!i&&!uO(o,a))return!1}return!0}function uO(e,o){const a=Fn(e);return o?a.display!=="none":Vu(e,a)}function NS(e){const o=e.tabIndex;if(o<0){const a=pn(e);if(a==="details"||a==="audio"||a==="video"||vt(e)&&e.isContentEditable)return 0}return o}function Bp(e){if(pn(e)!=="input")return null;const o=e;return o.type==="radio"&&o.name!==""?o:null}function fO(e,o){const a=Bp(e);if(!a)return!0;const i=o.find(l=>{const c=Bp(l);return c?.name===a.name&&c.form===a.form&&c.checked});return i?i===a:o.find(l=>{const c=Bp(l);return c?.name===a.name&&c.form===a.form})===a}function MS(e){if(vt(e)&&pn(e)==="slot"){const o=e.assignedElements({flatten:!0});if(o.length>0)return o}return vt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function jS(e,o){MS(e).forEach(a=>{OS(a)&&o.push(a),jS(a,o)})}function _S(e,o,a){MS(e).forEach(i=>{vt(i)&&i.matches(o)&&a.push(i),_S(i,o,a)})}function om(e){return kS(e)&&NS(e)>=0}function DS(e){const o=[];return jS(e,o),o.filter(kS)}function hl(e){const o=DS(e);return o.filter(a=>NS(a)>=0&&fO(a,o))}function zS(e,o){const a=hl(e),i=a.length;if(i===0)return;const l=nn(We(e)),c=a.indexOf(l),d=c===-1?o===1?0:i-1:c+o;return a[d]}function sm(e){return zS(We(e).body,1)||e}function PS(e){return zS(We(e).body,-1)||e}function LS(e,o){if(!e)return null;const a=hl(We(e).body),i=a.length;if(i===0)return null;const l=a.indexOf(e);if(l===-1)return null;const c=(l+o+i)%i;return a[c]}function dO(e){return LS(e,1)}function pO(e){return LS(e,-1)}function Ci(e,o){const a=o||e.currentTarget,i=e.relatedTarget;return!i||!De(a,i)}function hO(e){hl(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function yx(e){const o=[];_S(e,"[data-tabindex]",o),o.forEach(a=>{const i=a.dataset.tabindex;delete a.dataset.tabindex,i?a.setAttribute("tabindex",i):a.removeAttribute("tabindex")})}function qs(e,o,a=!0){return e.filter(l=>l.parentId===o).flatMap(l=>[...!a||l.context?.open?[l]:[],...qs(e,l.id,a)])}function bx(e,o){let a=[],i=e.find(l=>l.id===o)?.parentId;for(;i;){const l=e.find(c=>c.id===i);i=l?.parentId,l&&(a=a.concat(l))}return a}function Jr(e){return`data-base-ui-${e}`}let Vc=0;function nu(e,o={}){const{preventScroll:a=!1,sync:i=!1,shouldFocus:l}=o;cancelAnimationFrame(Vc);function c(){l&&!l()||e?.focus({preventScroll:a})}if(i)return c(),Ht;const d=requestAnimationFrame(c);return Vc=d,()=>{Vc===d&&(cancelAnimationFrame(d),Vc=0)}}const Fp={inert:new WeakMap,"aria-hidden":new WeakMap},vx="data-base-ui-inert",wh={inert:new WeakSet,"aria-hidden":new WeakSet};let zr=new WeakMap,Vp=0;function mO(e){return wh[e]}function IS(e){return e?Oi(e)?e.host:IS(e.parentNode):null}const xx=(e,o)=>o.map(a=>{if(e.contains(a))return a;const i=IS(a);return e.contains(i)?i:null}).filter(a=>a!=null),Sx=e=>{const o=new Set;return e.forEach(a=>{let i=a;for(;i&&!o.has(i);)o.add(i),i=i.parentNode}),o},wx=(e,o,a)=>{const i=[],l=c=>{!c||a.has(c)||Array.from(c.children).forEach(d=>{pn(d)!=="script"&&(o.has(d)?l(d):i.push(d))})};return l(e),i};function gO(e,o,a,i,{mark:l=!0}){let c=null;i?c="inert":a&&(c="aria-hidden");let d=null,g=null;const m=xx(o,e),h=l?wx(o,Sx(m),new Set(m)):[],y=[],v=[];if(c){const S=Fp[c],w=mO(c);g=w,d=S;const T=xx(o,Array.from(o.querySelectorAll("[aria-live]"))),A=m.concat(T);wx(o,Sx(A),new Set(A)).forEach(C=>{const _=C.getAttribute(c),k=_!==null&&_!=="false",j=(S.get(C)||0)+1;S.set(C,j),y.push(C),j===1&&k&&w.add(C),k||C.setAttribute(c,c==="inert"?"":"true")})}return l&&h.forEach(S=>{const w=(zr.get(S)||0)+1;zr.set(S,w),v.push(S),w===1&&S.setAttribute(vx,"")}),Vp+=1,()=>{d&&y.forEach(S=>{const T=(d.get(S)||0)-1;d.set(S,T),T||(!g?.has(S)&&c&&S.removeAttribute(c),g?.delete(S))}),l&&v.forEach(S=>{const w=(zr.get(S)||0)-1;zr.set(S,w),w||S.removeAttribute(vx)}),Vp-=1,Vp||(Fp.inert=new WeakMap,Fp["aria-hidden"]=new WeakMap,wh.inert=new WeakSet,wh["aria-hidden"]=new WeakSet,zr=new WeakMap)}}function Tx(e,o={}){const{ariaHidden:a=!1,inert:i=!1,mark:l=!0}=o,c=We(e[0]).body;return gO(e,c,a,i,{mark:l})}var so=cS();let Ex=0;function yO(e,o="mui"){const[a,i]=b.useState(e),l=e||a;return b.useEffect(()=>{a==null&&(Ex+=1,i(`${o}-${Ex}`))},[a,o]),l}const Cx=Jh.useId;function Gs(e,o){if(Cx!==void 0){const a=Cx();return e??(o?`${o}-${a}`:a)}return yO(e,o)}const bO=parseInt(b.version,10);function am(e){return bO>=e}function Rx(e){if(!b.isValidElement(e))return null;const o=e,a=o.props;return(am(19)?a?.ref:o.ref)??null}function Th(e,o){if(e&&!o)return e;if(!e&&o)return o;if(e||o)return{...e,...o}}function vO(e,o){const a={};for(const i in e){const l=e[i];if(o?.hasOwnProperty(i)){const c=o[i](l);c!=null&&Object.assign(a,c);continue}l===!0?a[`data-${i.toLowerCase()}`]="":l&&(a[`data-${i.toLowerCase()}`]=l.toString())}return a}function xO(e,o){return typeof e=="function"?e(o):e}function SO(e,o){return typeof e=="function"?e(o):e}const im={};function oo(e,o,a,i,l){if(!a&&!i&&!l&&!e)return pu(o);let c=pu(e);return o&&(c=Ur(c,o)),a&&(c=Ur(c,a)),i&&(c=Ur(c,i)),l&&(c=Ur(c,l)),c}function wO(e){if(e.length===0)return im;if(e.length===1)return pu(e[0]);let o=pu(e[0]);for(let a=1;a<e.length;a+=1)o=Ur(o,e[a]);return o}function pu(e){return rm(e)?{...US(e,im)}:TO(e)}function Ur(e,o){return rm(o)?US(o,e):EO(e,o)}function TO(e){const o={...e};for(const a in o){const i=o[a];HS(a,i)&&(o[a]=BS(i))}return o}function EO(e,o){if(!o)return e;for(const a in o){const i=o[a];switch(a){case"style":{e[a]=Th(e.style,i);break}case"className":{e[a]=FS(e.className,i);break}default:HS(a,i)?e[a]=CO(e[a],i):e[a]=i}}return e}function HS(e,o){const a=e.charCodeAt(0),i=e.charCodeAt(1),l=e.charCodeAt(2);return a===111&&i===110&&l>=65&&l<=90&&(typeof o=="function"||typeof o>"u")}function rm(e){return typeof e=="function"}function US(e,o){return rm(e)?e(o):e??im}function CO(e,o){return o?e?(...a)=>{const i=a[0];if(VS(i)){const c=i;hu(c);const d=o(...a);return c.baseUIHandlerPrevented||e?.(...a),d}const l=o(...a);return e?.(...a),l}:BS(o):e}function BS(e){return e&&((...o)=>{const a=o[0];return VS(a)&&hu(a),e(...o)})}function hu(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function FS(e,o){return o?e?o+" "+e:o:e}function VS(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function nt(e,o,a={}){let i=o.render;a.enabled!==!1&&(i=kO(i));const l=RO(o,a,i);if(a.enabled===!1)return null;const c=a.state??Ct;return NO(e,i,l,c)}function RO(e,o,a){const{className:i,style:l}=e,{state:c=Ct,ref:d,props:g,stateAttributesMapping:m,enabled:h=!0}=o,y=h?xO(i,c):void 0,v=h?SO(l,c):void 0,S=h?vO(c,m):Ct,w=h&&g?AO(g):void 0,T=h?Th(S,w)??{}:Ct;return typeof document<"u"&&(h?Array.isArray(d)?T.ref=YA([T.ref,Rx(a),...d]):T.ref=ss(T.ref,Rx(a),d):ss(null,null)),h?(y!==void 0&&(T.className=FS(T.className,y)),v!==void 0&&(T.style=Th(T.style,v)),T):Ct}function AO(e){return Array.isArray(e)?wO(e):oo(void 0,e)}const OO=Symbol.for("react.lazy");function kO(e){if(e?.$$typeof!==OO)return e;const o=b.Children.toArray(e)[0];return b.isValidElement(o)?o:e}function NO(e,o,a,i){if(o){if(typeof o=="function")return o(a,i);const l=oo(a,o.props);return l.ref=a.ref,b.cloneElement(o,l)}if(e&&typeof e=="string")return MO(e,a);throw new Error(kt(8))}function MO(e,o){return e==="button"?b.createElement("button",{type:"button",...o,key:o.key}):e==="img"?b.createElement("img",{alt:"",...o,key:o.key}):b.createElement(e,o)}const jO=500,YS=500,_O={style:{transition:"none"}},qS="data-base-ui-click-trigger",DO="data-base-ui-swipe-ignore",zO="data-swipe-ignore",PO=`[${DO}]`,LO=`[${zO}]`,GS={fallbackAxisSide:"none"},lm={fallbackAxisSide:"end"},IO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},XS=b.createContext(null),KS=()=>b.useContext(XS),HO=Jr("portal");function $S(e={}){const{ref:o,container:a,componentProps:i=Ct,elementProps:l}=e,c=Gs(),g=KS()?.portalNode,[m,h]=b.useState(null),[y,v]=b.useState(null),S=Ne(N=>{N!==null&&v(N)}),w=b.useRef(null);we(()=>{if(a===null){w.current&&(w.current=null,v(null),h(null));return}const N=(a&&($h(a)?a:a.current))??g??document.body;if(N==null){w.current&&(w.current=null,v(null),h(null));return}w.current!==N&&(w.current=N,v(null),h(N))},[a,g]);const T=nt("div",i,{ref:[o,S],props:[{id:c,[HO]:""},l]}),A=m&&T?so.createPortal(T,m):null;return{node:y,nodeId:b.isValidElement(T)?T.props.id:void 0,subtree:A}}const Yu=b.forwardRef(function(o,a){const{render:i,className:l,style:c,children:d,container:g,portalOwnerRole:m,...h}=o,{node:y,nodeId:v,subtree:S}=$S({container:g,ref:a,componentProps:o,elementProps:h}),w=b.useRef(null),T=b.useRef(null),A=b.useRef(null),N=b.useRef(null),[C,_]=b.useState(null),k=b.useRef(!1),j=C?.modal,L=C?.open,z=!!C&&!C.modal&&C.open&&!!y;b.useEffect(()=>{if(!y||j)return;function U(Y){y&&Y.relatedTarget&&Ci(Y)&&(Y.type==="focusin"?k.current&&(yx(y),k.current=!1):(hO(y),k.current=!0))}return po(Ge(y,"focusin",U,!0),Ge(y,"focusout",U,!0))},[y,j]),we(()=>{!y||L!==!0||!k.current||(yx(y),k.current=!1)},[L,y]);const I=b.useMemo(()=>({beforeOutsideRef:w,afterOutsideRef:T,beforeInsideRef:A,afterInsideRef:N,portalNode:y,setFocusManagerState:_}),[y]);return p.jsxs(b.Fragment,{children:[S,p.jsxs(XS.Provider,{value:I,children:[z&&y&&p.jsx(as,{"data-type":"outside",ref:w,onFocus:U=>{if(Ci(U,y))A.current?.focus();else{const Y=C?C.domReference:null;PS(Y)?.focus()}}}),z&&y&&p.jsx("span",{role:m,"aria-owns":v,style:IO}),y&&so.createPortal(d,y),z&&y&&p.jsx(as,{"data-type":"outside",ref:T,onFocus:U=>{if(Ci(U,y))N.current?.focus();else{const Y=C?C.domReference:null;sm(Y)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,qe(Vs,U.nativeEvent))}}})]})]})});function WS(){const e=new Map;return{emit(o,a){e.get(o)?.forEach(i=>i(a))},on(o,a){e.has(o)||e.set(o,new Set),e.get(o).add(a)},off(o,a){e.get(o)?.delete(a)}}}class cm{nodesRef={current:[]};events=WS();addNode(o){this.nodesRef.current.push(o)}removeNode(o){const a=this.nodesRef.current.findIndex(i=>i===o);a!==-1&&this.nodesRef.current.splice(a,1)}}const QS=b.createContext(null),ZS=b.createContext(null),Xs=()=>b.useContext(QS)?.id||null,Ks=e=>{const o=b.useContext(ZS);return e??o};function um(e){const o=Gs(),a=Ks(e),i=Xs();return we(()=>{if(!o)return;const l={id:o,parentId:i};return a?.addNode(l),()=>{a?.removeNode(l)}},[a,o,i]),o}function JS(e){const{children:o,id:a}=e,i=Xs();return p.jsx(QS.Provider,{value:b.useMemo(()=>({id:a,parentId:i}),[a,i]),children:o})}function ew(e){const{children:o,externalTree:a}=e,i=Zt(()=>a??new cm).current;return p.jsx(ZS.Provider,{value:i,children:o})}function Go(e){return e==null?e:"current"in e?e.current:e}function UO(e,o){const a=Rt(Pt(e));return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?o||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof a.MouseEvent?o||(e.detail===0?"keyboard":"mouse"):""}const Ax=20;let Us=[];function fm(){Us=Us.filter(e=>e.deref()?.isConnected)}function Ox(e){fm(),e&&pn(e)!=="body"&&(Us.push(new WeakRef(e)),Us.length>Ax&&(Us=Us.slice(-Ax)))}function kx(){return fm(),Us[Us.length-1]?.deref()}function BO(e){return e?om(e)?e:hl(e)[0]||e:null}function Nx(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const a=DS(e).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return om(l)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),i=e.getAttribute("tabindex");a.length===0?i!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function qu(e){const{context:o,children:a,disabled:i=!1,initialFocus:l=!0,returnFocus:c=!0,restoreFocus:d=!1,modal:g=!0,closeOnFocusOut:m=!0,openInteractionType:h="",nextFocusableElement:y,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:T}=e,A="rootStore"in o?o.rootStore:o,N=A.useState("open"),C=A.useState("domReferenceElement"),_=A.useState("floatingElement"),{events:k,dataRef:j}=A.context,L=Ne(()=>j.current.floatingContext?.nodeId),z=l===!1,I=bh(C)&&z,U=Vt(l),Y=Vt(c),B=Vt(h),D=Vt(N),M=Ks(w),H=KS(),ee=b.useRef(!1),$=b.useRef(!1),P=b.useRef(!1),q=b.useRef(null),K=b.useRef(""),Z=b.useRef(""),Q=b.useRef(null),O=b.useRef(null),F=ss(Q,S,H?.beforeInsideRef),J=ss(O,H?.afterInsideRef),W=on(),se=on(),ie=ki(),me=H!=null,pe=cu(_),be=Ne((ye=pe)=>ye?hl(ye):[]),Ce=Ne(()=>T?.().filter(ye=>ye!=null)??[]);b.useEffect(()=>{if(i||!g)return;function ye(Te){Te.key==="Tab"&&De(pe,nn(We(pe)))&&be().length===0&&!I&&To(Te)}const ge=We(pe);return Ge(ge,"keydown",ye)},[i,pe,g,I,be]),b.useEffect(()=>{if(i||!N)return;const ye=We(pe);function ge(){P.current=!1}function Te(Be){const Ee=Pt(Be),Pe=Ce(),Se=De(_,Ee)||De(C,Ee)||De(H?.portalNode,Ee)||Pe.some(Re=>Re===Ee||De(Re,Ee));P.current=!Se,Z.current=Be.pointerType||"keyboard",Ee?.closest(`[${qS}]`)&&($.current=!0,se.start(0,()=>{$.current=!1}))}function Oe(){Z.current="keyboard"}return po(Ge(ye,"pointerdown",Te,!0),Ge(ye,"pointerup",ge,!0),Ge(ye,"pointercancel",ge,!0),Ge(ye,"keydown",Oe,!0),ge)},[i,_,C,pe,N,H,se,Ce]),b.useEffect(()=>{if(i||!m)return;const ye=We(pe);function ge(){$.current=!0,se.start(0,()=>{$.current=!1})}function Te(Pe){const Se=Pt(Pe);om(Se)&&(q.current=Se)}function Oe(Pe){const Se=Pe.relatedTarget,Re=Pe.currentTarget,ke=Pt(Pe);g&&Se==null&&ke!=null&&De(_,ke)&&Ox(ke),queueMicrotask(()=>{const Ie=L(),je=A.context.triggerElements,le=Ce(),ve=Se?.hasAttribute(Jr("focus-guard"))&&[Q.current,O.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,Go(v),Go(y)].includes(Se),he=!(De(C,Se)||De(_,Se)||De(Se,_)||De(H?.portalNode,Se)||le.some(ce=>ce===Se||De(ce,Se))||je.hasMatchingElement(ce=>De(ce,Se))||ve||M&&(qs(M.nodesRef.current,Ie).find(ce=>De(ce.context?.elements.floating,Se)||De(ce.context?.elements.domReference,Se))||bx(M.nodesRef.current,Ie).find(ce=>[ce.context?.elements.floating,cu(ce.context?.elements.floating)].includes(Se)||ce.context?.elements.domReference===Se)));if(Re===C&&pe&&Nx(pe),d&&Re!==C&&!Vu(ke)&&nn(ye)===ye.body){if(vt(pe)&&(pe.focus(),d==="popup")){ie.request(()=>{pe.focus()});return}const ce=be(),xe=q.current,He=(xe&&ce.includes(xe)?xe:null)||ce[ce.length-1]||pe;vt(He)&&He.focus()}if(j.current.insideReactTree){j.current.insideReactTree=!1;return}(I||!g)&&Se&&he&&!$.current&&(I||Se!==kx())&&(ee.current=!0,A.setOpen(!1,qe(Vs,Pe)))})}function Be(){P.current||(j.current.insideReactTree=!0,W.start(0,()=>{j.current.insideReactTree=!1}))}const Ee=vt(C)?C:null;if(!(!_&&!Ee))return po(Ee&&Ge(Ee,"focusout",Oe),Ee&&Ge(Ee,"pointerdown",ge),_&&Ge(_,"focusin",Te),_&&Ge(_,"focusout",Oe),_&&H&&Ge(_,"focusout",Be,!0))},[i,C,_,pe,g,M,H,A,m,d,be,I,L,j,W,se,ie,y,v,Ce]),b.useEffect(()=>{if(i||!_||!N)return;const ye=Array.from(H?.portalNode?.querySelectorAll(`[${Jr("portal")}]`)||[]),Te=(M?bx(M.nodesRef.current,L()):[]).find(Re=>bh(Re.context?.elements.domReference||null))?.context?.elements.domReference,Be=[...[_,...ye,Q.current,O.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...Ce()],Te,Go(v),Go(y),I?C:null].filter(Re=>Re!=null),Ee=Tx(Be,{ariaHidden:g||I,mark:!1}),Pe=[_,...ye].filter(Re=>Re!=null),Se=Tx(Pe);return()=>{Se(),Ee()}},[N,i,C,_,g,H,I,M,L,y,v,Ce]),we(()=>{if(!N||i||!vt(pe))return;K.current="",Z.current="";const ye=We(pe),ge=nn(ye);queueMicrotask(()=>{const Te=U.current,Oe=typeof Te=="function"?Te(B.current||""):Te;if(Oe===void 0||Oe===!1||De(pe,ge))return;let Ee=null;const Pe=()=>(Ee==null&&(Ee=be(pe)),Ee[0]||pe);let Se;Oe===!0||Oe===null?Se=Pe():Se=Go(Oe),Se=Se||Pe();const Re=De(pe,nn(ye));nu(Se,{preventScroll:Se===pe,shouldFocus(){if(!D.current)return!1;if(Re)return!0;const ke=nn(ye);return!(ke!==Se&&De(pe,ke))}})})},[i,N,pe,be,U,B,D]),we(()=>{if(i||!pe)return;const ye=We(pe),ge=nn(ye),Te=B.current==null;Ox(ge);function Oe(Ee){if(Ee.open||(K.current=UO(Ee.nativeEvent,Z.current)),Ee.reason===Ft&&Ee.nativeEvent.type==="mouseleave"&&(ee.current=!0),Ee.reason===Uu)if(Ee.nested)ee.current=!1;else if(Mu(Ee.nativeEvent)||Kh(Ee.nativeEvent))ee.current=!1;else{let Pe=!1;We(pe).createElement("div").focus({get preventScroll(){return Pe=!0,!1}}),Pe?ee.current=!1:ee.current=!0}}k.on("openchange",Oe);function Be(Ee){const Pe=Y.current;let Se=typeof Pe=="function"?Pe(Ee):Pe;if(Se===void 0||Se===!1)return null;Se===null&&(Se=!0);const Re=C?.isConnected?C:null,ke=ge?.isConnected&&pn(ge)!=="body"?ge:null;let Ie=Te?ke||Re:Re||ke;return Ie||(Ie=kx()||null),typeof Se=="boolean"?Ie:Go(Se)||Ie||null}return()=>{k.off("openchange",Oe);const Ee=nn(ye),Pe=Ce(),Se=De(_,Ee)||Pe.some(je=>je===Ee||De(je,Ee))||M&&qs(M.nodesRef.current,L(),!1).some(je=>De(je.context?.elements.floating,Ee)),Re=Y.current,ke=K.current,Ie=Be(ke);queueMicrotask(()=>{const je=BO(Ie),le=typeof Re!="boolean";if(Re&&!ee.current&&vt(je)&&(!(!le&&je!==Ee&&Ee!==ye.body)||Se)){const ve={preventScroll:!0};ke==="keyboard"&&(ve.focusVisible=!0),je.focus(ve)}ee.current=!1})}},[i,_,pe,Y,B,k,M,C,L,Ce]),we(()=>{if(!cs||N||!_)return;const ye=nn(We(_));!vt(ye)||!Hu(ye)||De(_,ye)&&ye.blur()},[N,_]),we(()=>{if(!(i||!H))return H.setFocusManagerState({modal:g,closeOnFocusOut:m,open:N,onOpenChange:A.setOpen,domReference:C}),()=>{H.setFocusManagerState(null)}},[i,H,g,N,A,m,C]),we(()=>{if(!(i||!pe))return Nx(pe),()=>{queueMicrotask(fm)}},[i,pe]);const Me=!i&&(g?!I:!0)&&(me||g);return p.jsxs(b.Fragment,{children:[Me&&p.jsx(as,{"data-type":"inside",ref:F,onFocus:ye=>{if(g){const ge=be();nu(ge[ge.length-1])}else H?.portalNode&&(ee.current=!1,Ci(ye,H.portalNode)?sm(C)?.focus():Go(v??H.beforeOutsideRef)?.focus())}}),a,Me&&p.jsx(as,{"data-type":"inside",ref:J,onFocus:ye=>{g?nu(be()[0]):H?.portalNode&&(m&&(ee.current=!0),Ci(ye,H.portalNode)?PS(C)?.focus():Go(y??H.afterOutsideRef)?.focus())}})]})}function Gu(e,o={}){const{enabled:a=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:d=!0,touchOpenDelay:g=0,reason:m=os}=o,h="rootStore"in e?e.rootStore:e,y=h.context.dataRef,v=b.useRef(void 0),S=ki(),w=on(),T=b.useMemo(()=>{function A(C,_,k,j){const L=qe(m,_,k);C&&j==="touch"&&g>0?w.start(g,()=>{h.setOpen(!0,L)}):h.setOpen(C,L)}function N(C,_,k){const j=y.current.openEvent,L=h.select("domReferenceElement")!==_;return C&&L||!C||!l?!0:j&&d?!k(j.type):!1}return{onPointerDown(C){v.current=Bs(C.pointerType,!0)&&Kh(C.nativeEvent)?"virtual":C.pointerType},onMouseDown(C){const _=v.current,k=C.nativeEvent,j=h.select("open");if(C.button!==0||i==="click"||Bs(_,!0)&&c)return;const L=N(j,C.currentTarget,U=>U==="click"||U==="mousedown"),z=Pt(k);if(Hu(z)){A(L,k,z,_);return}const I=C.currentTarget;S.request(()=>{A(L,k,I,_)})},onClick(C){if(i==="mousedown-only")return;const _=v.current;if(i==="mousedown"&&_){v.current=void 0;return}if(Bs(_,!0)&&c)return;const k=h.select("open"),j=N(k,C.currentTarget,L=>L==="click"||L==="mousedown"||L==="keydown"||L==="keyup");A(j,C.nativeEvent,C.currentTarget,_)},onKeyDown(){v.current=void 0}}},[y,i,c,m,h,d,l,S,w,g]);return b.useMemo(()=>a?{reference:T}:Ct,[a,T])}function FO(e,o){let a=null,i=null,l=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=o.axis==="x"||o.axis==="both",g=o.axis==="y"||o.axis==="both",m=["mouseenter","mousemove"].includes(o.dataRef.current.openEvent?.type||"")&&o.pointerType!=="touch";let h=c.width,y=c.height,v=c.x,S=c.y;return a==null&&o.x&&d&&(a=c.x-o.x),i==null&&o.y&&g&&(i=c.y-o.y),v-=a||0,S-=i||0,h=0,y=0,!l||m?(h=o.axis==="y"?c.width:0,y=o.axis==="x"?c.height:0,v=d&&o.x!=null?o.x:v,S=g&&o.y!=null?o.y:S):l&&!m&&(y=o.axis==="x"?c.height:y,h=o.axis==="y"?c.width:h),l=!0,{width:h,height:y,x:v,y:S,top:S,right:v+h,bottom:S+y,left:v}}}}function Mx(e){return e!=null&&e.clientX!=null}function VO(e,o={}){const{enabled:a=!0,axis:i="both"}=o,l="rootStore"in e?e.rootStore:e,c=l.useState("open"),d=l.useState("floatingElement"),g=l.useState("domReferenceElement"),m=l.context.dataRef,h=b.useRef(!1),y=b.useRef(null),[v,S]=b.useState(),[w,T]=b.useState([]),A=Ne(j=>{l.set("positionReference",j)}),N=Ne((j,L,z)=>{h.current||m.current.openEvent&&!Mx(m.current.openEvent)||l.set("positionReference",FO(z??g,{x:j,y:L,axis:i,dataRef:m,pointerType:v}))}),C=Ne(j=>{c?y.current||(N(j.clientX,j.clientY,j.currentTarget),T([])):N(j.clientX,j.clientY,j.currentTarget)}),_=Bs(v)?d:c;b.useEffect(()=>{if(!a){A(g);return}if(!_)return;function j(){y.current?.(),y.current=null}const L=Rt(d);function z(I){const U=Pt(I);De(d,U)?j():N(I.clientX,I.clientY)}return!m.current.openEvent||Mx(m.current.openEvent)?y.current=Ge(L,"mousemove",z):A(g),j},[_,a,d,m,g,l,N,A,w]),b.useEffect(()=>()=>{l.set("positionReference",null)},[l]),b.useEffect(()=>{a&&!d&&(h.current=!1)},[a,d]),b.useEffect(()=>{!a&&c&&(h.current=!0)},[a,c]);const k=b.useMemo(()=>{function j(L){S(L.pointerType)}return{onPointerDown:j,onPointerEnter:j,onMouseMove:C,onMouseEnter:C}},[C]);return b.useMemo(()=>a?{reference:k,trigger:k}:{},[a,k])}function YO(){return!1}function qO(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ml(e,o={}){const{enabled:a=!0,escapeKey:i=!0,outsidePress:l=!0,outsidePressEvent:c="sloppy",referencePress:d=YO,bubbles:g,externalTree:m}=o,h="rootStore"in e?e.rootStore:e,y=h.useState("open"),v=h.useState("floatingElement"),{dataRef:S,events:w}=h.context,T=Ks(m),A=Ne(typeof l=="function"?l:()=>!1),N=typeof l=="function"?A:l,C=N!==!1,_=Ne(()=>c),{escapeKey:k,outsidePress:j}=qO(g),L=b.useRef(!1),z=b.useRef(!1),I=b.useRef(!1),U=b.useRef(!1),Y=b.useRef(!1),B=b.useRef(""),D=b.useRef(null),M=on(),H=on(),ee=Ne(()=>{H.clear(),S.current.insideReactTree=!1}),$=Ne(W=>{const se=S.current.floatingContext?.nodeId;return(T?qs(T.nodesRef.current,se):[]).some(me=>me.context?.open&&!me.context.dataRef.current[W])}),P=Ne(W=>Hp(W,h.select("floatingElement"))||Hp(W,h.select("domReferenceElement"))),q=Ne(W=>{d()&&h.setOpen(!1,qe(os,W.nativeEvent))}),K=Ne(W=>{if(!y||!a||!i||W.key!=="Escape"||Y.current||!k&&$("__escapeKeyBubbles"))return;const se=yA(W)?W.nativeEvent:W,ie=qe(pl,se);h.setOpen(!1,ie),ie.isCanceled||W.preventDefault(),!k&&!ie.isPropagationAllowed&&W.stopPropagation()}),Z=Ne(()=>{S.current.insideReactTree=!0,H.start(0,ee)}),Q=Ne(W=>{if(!y||!a||W.button!==0)return;const se=Pt(W.nativeEvent);De(h.select("floatingElement"),se)&&(L.current||(L.current=!0,z.current=!1))}),O=Ne(W=>{!y||!a||(W.defaultPrevented||W.nativeEvent.defaultPrevented)&&L.current&&(z.current=!0)});b.useEffect(()=>{function W(se){se.open||(U.current=!1)}return w.on("openchange",W),()=>{w.off("openchange",W)}},[w]),b.useEffect(()=>{if(!y||!a)return y||(U.current=!1),ee;S.current.__escapeKeyBubbles=k,S.current.__outsidePressBubbles=j;const W=new Mn,se=new Mn,ie=We(v);function me(){W.clear(),Y.current=!0}function pe(){W.start(cs?5:0,()=>{Y.current=!1})}function be(){I.current=!0,se.start(0,()=>{I.current=!1})}function Ce(){L.current=!1,z.current=!1}function Me(){const he=B.current,ce=he==="pen"||!he?"mouse":he,xe=_(),He=typeof xe=="function"?xe():xe;return typeof He=="string"?He:He[ce]}function ye(he){const ce=Me();return ce==="intentional"&&he.type!=="click"||ce==="sloppy"&&he.type==="click"}function ge(he){const ce=S.current.floatingContext?.nodeId,xe=T&&qs(T.nodesRef.current,ce).some(He=>Hp(he,He.context?.elements.floating));return P(he)||xe}function Te(he){if(ye(he)){he.type!=="click"&&!P(he)&&(se.clear(),I.current=!1),ee();return}if(S.current.insideReactTree){ee();return}const ce=Pt(he),xe=`[${Jr("inert")}]`,He=et(ce)?ce.getRootNode():null,Lt=Array.from((Oi(He)?He:We(h.select("floatingElement"))).querySelectorAll(xe)),Yt=h.context.triggerElements;if(ce&&(Yt.hasElement(ce)||Yt.hasMatchingElement(Ae=>De(Ae,ce))))return;let ut=et(ce)?ce:null;for(;ut&&!Wo(ut);){const Ae=ts(ut);if(Wo(Ae)||!et(Ae))break;ut=Ae}if(!(Lt.length&&et(ce)&&!zA(ce)&&!De(ce,h.select("floatingElement"))&&Lt.every(Ae=>!De(ut,Ae)))){if(vt(ce)&&!("touches"in he)){const Ae=Wo(ce),Ye=Fn(ce),Qe=/auto|scroll/,ct=Ae||Qe.test(Ye.overflowX),en=Ae||Qe.test(Ye.overflowY),rn=ct&&ce.clientWidth>0&&ce.scrollWidth>ce.clientWidth,hn=en&&ce.clientHeight>0&&ce.scrollHeight>ce.clientHeight,xt=Ye.direction==="rtl",_t=hn&&(xt?he.offsetX<=ce.offsetWidth-ce.clientWidth:he.offsetX>ce.clientWidth),Ve=rn&&he.offsetY>ce.clientHeight;if(_t||Ve)return}if(!ge(he)){if(Me()==="intentional"){if(he.detail!==0&&!Mu(he)&&!U.current)return;if(I.current){se.clear(),I.current=!1;return}}typeof N=="function"&&!N(he)||$("__outsidePressBubbles")||(h.setOpen(!1,qe(Uu,he)),ee())}}}function Oe(he){Me()!=="sloppy"||he.pointerType==="touch"||!h.select("open")||!a||P(he)||Te(he)}function Be(he){if(Me()!=="sloppy"||!h.select("open")||!a||P(he))return;const ce=he.touches[0];ce&&(D.current={startTime:Date.now(),startX:ce.clientX,startY:ce.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},M.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function Ee(he,ce){const xe=Pt(he);if(!xe)return;const He=Ge(xe,he.type,()=>{ce(he),He()})}function Pe(he){B.current="touch",Ee(he,Be)}function Se(he){M.clear(),he.type==="pointerdown"&&(he.button===0&&(U.current=!0),B.current=he.pointerType),!(he.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)&&Ee(he,ce=>{ce.type==="pointerdown"?Oe(ce):Te(ce)})}function Re(he){if(he.type==="pointercancel"&&(U.current=!1),!L.current)return;const ce=z.current;if(Ce(),Me()==="intentional"){if(he.type==="pointercancel"){ce&&be();return}if(!ge(he)){if(ce){be();return}typeof N=="function"&&!N(he)||(se.clear(),I.current=!0,ee())}}}function ke(he){if(Me()!=="sloppy"||!D.current||P(he))return;const ce=he.touches[0];if(!ce)return;const xe=Math.abs(ce.clientX-D.current.startX),He=Math.abs(ce.clientY-D.current.startY),Lt=Math.sqrt(xe*xe+He*He);Lt>5&&(D.current.dismissOnTouchEnd=!0),Lt>10&&(Te(he),M.clear(),D.current=null)}function Ie(he){Ee(he,ke)}function je(he){Me()!=="sloppy"||!D.current||P(he)||(D.current.dismissOnTouchEnd&&Te(he),M.clear(),D.current=null)}function le(he){Ee(he,je)}const ve=po(i&&po(Ge(ie,"keydown",K),Ge(ie,"compositionstart",me),Ge(ie,"compositionend",pe)),C&&po(Ge(ie,"click",Se,!0),Ge(ie,"pointerdown",Se,!0),Ge(ie,"pointerup",Re,!0),Ge(ie,"pointercancel",Re,!0),Ge(ie,"mousedown",Se,!0),Ge(ie,"mouseup",Re,!0),Ge(ie,"touchstart",Pe,{capture:!0,passive:!0}),Ge(ie,"touchmove",Ie,{capture:!0,passive:!0}),Ge(ie,"touchend",le,{capture:!0,passive:!0})));return()=>{ve(),W.clear(),se.clear(),Ce(),I.current=!1,ee()}},[S,v,i,C,N,y,a,k,j,K,ee,_,$,P,T,h,M]);const F=b.useMemo(()=>({onKeyDown:K,onPointerDown:q,onClick:q}),[K,q]),J=b.useMemo(()=>({onKeyDown:K,onPointerDown:O,onMouseDown:O,onClickCapture:Z,onMouseDownCapture(W){Z(),Q(W)},onPointerDownCapture(W){Z(),Q(W)},onMouseUpCapture:Z,onTouchEndCapture:Z,onTouchMoveCapture:Z}),[K,Z,Q,O]);return b.useMemo(()=>a?{reference:F,floating:J,trigger:F}:{},[a,F,J])}function jx(e,o,a){let{reference:i,floating:l}=e;const c=to(o),d=nm(o),g=tm(d),m=no(o),h=c==="y",y=i.x+i.width/2-l.width/2,v=i.y+i.height/2-l.height/2,S=i[g]/2-l[g]/2;let w;switch(m){case"top":w={x:y,y:i.y-l.height};break;case"bottom":w={x:y,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:v};break;case"left":w={x:i.x-l.width,y:v};break;default:w={x:i.x,y:i.y}}const T=is(o);return T&&(w[d]+=S*(T==="end"?1:-1)*(a&&h?-1:1)),w}async function GO(e,o){var a;o===void 0&&(o={});const{x:i,y:l,platform:c,rects:d,elements:g,strategy:m}=e,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:S=!1,padding:w=0}=Ys(o,e),T=AS(w),N=g[S?v==="floating"?"reference":"floating":v],C=Zr(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(N)))==null||a?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(g.floating)),boundary:h,rootBoundary:y,strategy:m})),_=v==="floating"?{x:i,y:l,width:d.floating.width,height:d.floating.height}:d.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(g.floating)),j=await(c.isElement==null?void 0:c.isElement(k))&&await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1},L=Zr(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:_,offsetParent:k,strategy:m}):_);return{top:(C.top-L.top+T.top)/j.y,bottom:(L.bottom-C.bottom+T.bottom)/j.y,left:(C.left-L.left+T.left)/j.x,right:(L.right-C.right+T.right)/j.x}}const XO=50,KO=async(e,o,a)=>{const{placement:i="bottom",strategy:l="absolute",middleware:c=[],platform:d}=a,g=d.detectOverflow?d:{...d,detectOverflow:GO},m=await(d.isRTL==null?void 0:d.isRTL(o));let h=await d.getElementRects({reference:e,floating:o,strategy:l}),{x:y,y:v}=jx(h,i,m),S=i,w=0;const T={};for(let A=0;A<c.length;A++){const N=c[A];if(!N)continue;const{name:C,fn:_}=N,{x:k,y:j,data:L,reset:z}=await _({x:y,y:v,initialPlacement:i,placement:S,strategy:l,middlewareData:T,rects:h,platform:g,elements:{reference:e,floating:o}});y=k??y,v=j??v,T[C]={...T[C],...L},z&&w<XO&&(w++,typeof z=="object"&&(z.placement&&(S=z.placement),z.rects&&(h=z.rects===!0?await d.getElementRects({reference:e,floating:o,strategy:l}):z.rects),{x:y,y:v}=jx(h,S,m)),A=-1)}return{x:y,y:v,placement:S,strategy:l,middlewareData:T}},$O=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var a,i;const{placement:l,middlewareData:c,rects:d,initialPlacement:g,platform:m,elements:h}=o,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:A=!0,...N}=Ys(e,o);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=no(l),_=to(g),k=no(g)===g,j=await(m.isRTL==null?void 0:m.isRTL(h.floating)),L=S||(k||!A?[du(g)]:eO(g)),z=T!=="none";!S&&z&&L.push(...sO(g,A,T,j));const I=[g,...L],U=await m.detectOverflow(o,N),Y=[];let B=((i=c.flip)==null?void 0:i.overflows)||[];if(y&&Y.push(U[C]),v){const ee=JA(l,d,j);Y.push(U[ee[0]],U[ee[1]])}if(B=[...B,{placement:l,overflows:Y}],!Y.every(ee=>ee<=0)){var D,M;const ee=(((D=c.flip)==null?void 0:D.index)||0)+1,$=I[ee];if($&&(!(v==="alignment"?_!==to($):!1)||B.every(K=>to(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:ee,overflows:B},reset:{placement:$}};let P=(M=B.filter(q=>q.overflows[0]<=0).sort((q,K)=>q.overflows[1]-K.overflows[1])[0])==null?void 0:M.placement;if(!P)switch(w){case"bestFit":{var H;const q=(H=B.filter(K=>{if(z){const Z=to(K.placement);return Z===_||Z==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Z=>Z>0).reduce((Z,Q)=>Z+Q,0)]).sort((K,Z)=>K[1]-Z[1])[0])==null?void 0:H[0];q&&(P=q);break}case"initialPlacement":P=g;break}if(l!==P)return{reset:{placement:P}}}return{}}}},tw=new Set(["left","top"]);async function WO(e,o){const{placement:a,platform:i,elements:l}=e,c=await(i.isRTL==null?void 0:i.isRTL(l.floating)),d=no(a),g=is(a),m=to(a)==="y",h=tw.has(d)?-1:1,y=c&&m?-1:1,v=Ys(o,e);let{mainAxis:S,crossAxis:w,alignmentAxis:T}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return g&&typeof T=="number"&&(w=g==="end"?T*-1:T),m?{x:w*y,y:S*h}:{x:S*h,y:w*y}}const QO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var a,i;const{x:l,y:c,placement:d,middlewareData:g}=o,m=await WO(o,e);return d===((a=g.offset)==null?void 0:a.placement)&&(i=g.arrow)!=null&&i.alignmentOffset?{}:{x:l+m.x,y:c+m.y,data:{...m,placement:d}}}}},ZO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:a,y:i,placement:l,platform:c}=o,{mainAxis:d=!0,crossAxis:g=!1,limiter:m={fn:_=>{let{x:k,y:j}=_;return{x:k,y:j}}},...h}=Ys(e,o),y={x:a,y:i},v=await c.detectOverflow(o,h),S=to(l),w=em(S);let T=y[w],A=y[S];const N=(_,k)=>RS(k+v[_==="y"?"top":"left"],k,k-v[_==="y"?"bottom":"right"]);d&&(T=N(w,T)),g&&(A=N(S,A));const C=m.fn({...o,[w]:T,[S]:A});return{...C,data:{x:C.x-a,y:C.y-i,enabled:{[w]:d,[S]:g}}}}}},JO=function(e){return e===void 0&&(e={}),{options:e,fn(o){var a,i;const{x:l,y:c,placement:d,rects:g,middlewareData:m}=o,{offset:h=0,mainAxis:y=!0,crossAxis:v=!0}=Ys(e,o),S={x:l,y:c},w=to(d),T=em(w);let A=S[T],N=S[w];const C=Ys(h,o),_=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(a=C.mainAxis)!=null?a:0,crossAxis:(i=C.crossAxis)!=null?i:0};if(y){const L=T==="y"?"height":"width",z=g.reference[T]-g.floating[L]+_.mainAxis,I=g.reference[T]+g.reference[L]-_.mainAxis;A<z?A=z:A>I&&(A=I)}if(v){var k,j;const L=T==="y"?"width":"height",z=tw.has(no(d)),I=g.reference[w]-g.floating[L]+(z&&((k=m.offset)==null?void 0:k[w])||0)+(z?0:_.crossAxis),U=g.reference[w]+g.reference[L]+(z?0:((j=m.offset)==null?void 0:j[w])||0)-(z?_.crossAxis:0);N<I?N=I:N>U&&(N=U)}return{[T]:A,[w]:N}}}},e2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(o){const{placement:a,rects:i,platform:l,elements:c}=o,{apply:d=()=>{},...g}=Ys(e,o),m=await l.detectOverflow(o,g),h=no(a),y=is(a),v=to(a)==="y",{width:S,height:w}=i.floating;let T,A;h==="top"||h==="bottom"?(T=h,A=y===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(A=h,T=y==="end"?"top":"bottom");const N=w-m.top-m.bottom,C=S-m.left-m.right,_=Ni(w-m[T],N),k=Ni(S-m[A],C),j=o.middlewareData.shift,L=!j;let z=_,I=k;j!=null&&j.enabled.x&&(I=C),j!=null&&j.enabled.y&&(z=N),L&&!y&&(v?I=S-2*Qo(m.left,m.right):z=w-2*Qo(m.top,m.bottom)),await d({...o,availableWidth:I,availableHeight:z});const U=await l.getDimensions(c.floating);return S!==U.width||w!==U.height?{reset:{rects:!0}}:{}}}};function nw(e){const o=Fn(e);let a=parseFloat(o.width)||0,i=parseFloat(o.height)||0;const l=vt(e),c=l?e.offsetWidth:a,d=l?e.offsetHeight:i,g=fu(a)!==c||fu(i)!==d;return g&&(a=c,i=d),{width:a,height:i,$:g}}function dm(e){return et(e)?e:e.contextElement}function Ri(e){const o=dm(e);if(!vt(o))return Zo(1);const a=o.getBoundingClientRect(),{width:i,height:l,$:c}=nw(o);let d=(c?fu(a.width):a.width)/i,g=(c?fu(a.height):a.height)/l;return(!d||!Number.isFinite(d))&&(d=1),(!g||!Number.isFinite(g))&&(g=1),{x:d,y:g}}const t2=Zo(0);function ow(e){const o=Rt(e);return!Qh()||!o.visualViewport?t2:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function n2(e,o,a){return o===void 0&&(o=!1),!!a&&o&&a===Rt(e)}function Oa(e,o,a,i){o===void 0&&(o=!1),a===void 0&&(a=!1);const l=e.getBoundingClientRect(),c=dm(e);let d=Zo(1);o&&(i?et(i)&&(d=Ri(i)):d=Ri(e));const g=n2(c,a,i)?ow(c):Zo(0);let m=(l.left+g.x)/d.x,h=(l.top+g.y)/d.y,y=l.width/d.x,v=l.height/d.y;if(c&&i){const S=Rt(c),w=et(i)?Rt(i):i;let T=S,A=mh(T);for(;A&&w!==T;){const N=Ri(A),C=A.getBoundingClientRect(),_=Fn(A),k=C.left+(A.clientLeft+parseFloat(_.paddingLeft))*N.x,j=C.top+(A.clientTop+parseFloat(_.paddingTop))*N.y;m*=N.x,h*=N.y,y*=N.x,v*=N.y,m+=k,h+=j,T=Rt(A),A=mh(T)}}return Zr({width:y,height:v,x:m,y:h})}function Xu(e,o){const a=Du(e).scrollLeft;return o?o.left+a:Oa(us(e)).left+a}function sw(e,o){const a=e.getBoundingClientRect(),i=a.left+o.scrollLeft-Xu(e,a),l=a.top+o.scrollTop;return{x:i,y:l}}function o2(e){let{elements:o,rect:a,offsetParent:i,strategy:l}=e;const c=l==="fixed",d=us(i),g=o?_u(o.floating):!1;if(i===d||g&&c)return a;let m={scrollLeft:0,scrollTop:0},h=Zo(1);const y=Zo(0),v=vt(i);if((v||!c)&&((pn(i)!=="body"||ul(d))&&(m=Du(i)),v)){const w=Oa(i);h=Ri(i),y.x=w.x+i.clientLeft,y.y=w.y+i.clientTop}const S=d&&!v&&!c?sw(d,m):Zo(0);return{width:a.width*h.x,height:a.height*h.y,x:a.x*h.x-m.scrollLeft*h.x+y.x+S.x,y:a.y*h.y-m.scrollTop*h.y+y.y+S.y}}function s2(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function a2(e){const o=Du(e),a=e.ownerDocument.body,i=Qo(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),l=Qo(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let c=-o.scrollLeft+Xu(e);const d=-o.scrollTop;return Fn(a).direction==="rtl"&&(c+=Qo(e.clientWidth,a.clientWidth)-i),{width:i,height:l,x:c,y:d}}const i2=25;function r2(e,o,a){a===void 0&&(a="viewport");const i=a==="layoutViewport",l=Rt(e),c=us(e),d=l.visualViewport;let g=c.clientWidth,m=c.clientHeight,h=0,y=0;if(d){const S=!Qh()||o==="fixed";i?S||(h=-d.offsetLeft,y=-d.offsetTop):(g=d.width,m=d.height,S&&(h=d.offsetLeft,y=d.offsetTop))}if(Xu(c)<=0){const S=c.ownerDocument,w=S.body,T=getComputedStyle(w),A=S.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,N=Math.abs(c.clientWidth-w.clientWidth-A),C=getComputedStyle(c).scrollbarGutter==="stable both-edges"?N/2:N;C<=i2&&(g-=C)}return{width:g,height:m,x:h,y}}function l2(e,o){const a=Oa(e,!0,o==="fixed"),i=a.top+e.clientTop,l=a.left+e.clientLeft,c=Ri(e),d=e.clientWidth*c.x,g=e.clientHeight*c.y,m=l*c.x,h=i*c.y;return{width:d,height:g,x:m,y:h}}function _x(e,o,a){let i;if(o==="viewport"||o==="layoutViewport")i=r2(e,a,o);else if(o==="document")i=a2(us(e));else if(et(o))i=l2(o,a);else{const l=ow(e);i={x:o.x-l.x,y:o.y-l.y,width:o.width,height:o.height}}return Zr(i)}function c2(e,o){const a=o.get(e);if(a)return a;let i=Qr(e,[],!1).filter(g=>et(g)&&pn(g)!=="body"),l=null;const c=Fn(e).position==="fixed";let d=c?ts(e):e;for(;et(d)&&!Wo(d);){const g=Fn(d),m=Wh(d),h=l?l.position:c?"fixed":"";!m&&(h==="fixed"||h==="absolute"&&g.position==="static")?i=i.filter(v=>v!==d):l=g,d=ts(d)}return o.set(e,i),i}function u2(e){let{element:o,boundary:a,rootBoundary:i,strategy:l}=e;const d=[...a==="clippingAncestors"?_u(o)?[]:c2(o,this._c):[].concat(a),i],g=_x(o,d[0],l);let m=g.top,h=g.right,y=g.bottom,v=g.left;for(let S=1;S<d.length;S++){const w=_x(o,d[S],l);m=Qo(w.top,m),h=Ni(w.right,h),y=Ni(w.bottom,y),v=Qo(w.left,v)}return{width:h-v,height:y-m,x:v,y:m}}function f2(e){const{width:o,height:a}=nw(e);return{width:o,height:a}}function d2(e,o,a){const i=vt(o),l=us(o),c=a==="fixed",d=Oa(e,!0,c,o);let g={scrollLeft:0,scrollTop:0};const m=Zo(0);if((i||!c)&&((pn(o)!=="body"||ul(l))&&(g=Du(o)),i)){const S=Oa(o,!0,c,o);m.x=S.x+o.clientLeft,m.y=S.y+o.clientTop}!i&&l&&(m.x=Xu(l));const h=l&&!i&&!c?sw(l,g):Zo(0),y=d.left+g.scrollLeft-m.x-h.x,v=d.top+g.scrollTop-m.y-h.y;return{x:y,y:v,width:d.width,height:d.height}}function Yp(e){return Fn(e).position==="static"}function Dx(e,o){if(!vt(e)||Fn(e).position==="fixed")return null;if(o)return o(e);let a=e.offsetParent;return us(e)===a&&(a=a.ownerDocument.body),a}function aw(e,o){const a=Rt(e);if(_u(e))return a;if(!vt(e)){let l=ts(e);for(;l&&!Wo(l);){if(et(l)&&!Yp(l))return l;l=ts(l)}return a}let i=Dx(e,o);for(;i&&vA(i)&&Yp(i);)i=Dx(i,o);return i&&Wo(i)&&Yp(i)&&!Wh(i)?a:i||wA(e)||a}const p2=async function(e){const o=this.getOffsetParent||aw,a=this.getDimensions,i=await a(e.floating);return{reference:d2(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function h2(e){return Fn(e).direction==="rtl"}const iw={convertOffsetParentRelativeRectToViewportRelativeRect:o2,getDocumentElement:us,getClippingRect:u2,getOffsetParent:aw,getElementRects:p2,getClientRects:s2,getDimensions:f2,getScale:Ri,isElement:et,isRTL:h2};function rw(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function m2(e,o,a){let i=null,l;const c=us(e);function d(){var y;clearTimeout(l),(y=i)==null||y.disconnect(),i=null}function g(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),d();const S=e.getBoundingClientRect(),{left:w,top:T,width:A,height:N}=S;if(y||o(),!A||!N)return;const C=Fc(T),_=Fc(c.clientWidth-(w+A)),k=Fc(c.clientHeight-(T+N)),j=Fc(w),z={rootMargin:-C+"px "+-_+"px "+-k+"px "+-j+"px",threshold:Qo(0,Ni(1,v))||1};let I=!0;function U(Y){const B=Y[0].intersectionRatio;if(!rw(S,e.getBoundingClientRect()))return g();if(B!==v){if(!I)return g();B?g(!1,B):l=setTimeout(()=>{g(!1,1e-7)},1e3)}I=!1}try{i=new IntersectionObserver(U,{...z,root:c.ownerDocument})}catch{i=new IntersectionObserver(U,z)}i.observe(e)}const m=Rt(e),h=()=>g(a);return m.addEventListener("resize",h),g(!0),()=>{m.removeEventListener("resize",h),d()}}function zx(e,o,a,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,h=dm(e),y=l||c?[...h?Qr(h):[],...o?Qr(o):[]]:[];y.forEach(C=>{l&&C.addEventListener("scroll",a),c&&C.addEventListener("resize",a)});const v=h&&g?m2(h,a,c):null;let S=-1,w=null;d&&(w=new ResizeObserver(C=>{let[_]=C;_&&_.target===h&&w&&o&&(w.unobserve(o),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var k;(k=w)==null||k.observe(o)})),a()}),h&&!m&&w.observe(h),o&&w.observe(o));let T,A=m?Oa(e):null;m&&N();function N(){const C=Oa(e);A&&!rw(A,C)&&a(),A=C,T=requestAnimationFrame(N)}return a(),()=>{var C;y.forEach(_=>{l&&_.removeEventListener("scroll",a),c&&_.removeEventListener("resize",a)}),v?.(),(C=w)==null||C.disconnect(),w=null,m&&cancelAnimationFrame(T)}}const g2=QO,y2=ZO,b2=$O,v2=e2,x2=JO,S2=(e,o,a)=>{const i=new Map,l=a??{},c={...iw,...l.platform,_c:i};return KO(e,o,{...l,platform:c})};var w2=typeof document<"u",T2=function(){},ou=w2?b.useLayoutEffect:T2;function mu(e,o){if(e===o)return!0;if(typeof e!=typeof o)return!1;if(typeof e=="function"&&e.toString()===o.toString())return!0;let a,i,l;if(e&&o&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==o.length)return!1;for(i=a;i--!==0;)if(!mu(e[i],o[i]))return!1;return!0}if(l=Object.keys(e),a=l.length,a!==Object.keys(o).length)return!1;for(i=a;i--!==0;)if(!{}.hasOwnProperty.call(o,l[i]))return!1;for(i=a;i--!==0;){const c=l[i];if(!(c==="_owner"&&e.$$typeof)&&!mu(e[c],o[c]))return!1}return!0}return e!==e&&o!==o}function lw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Px(e,o){const a=lw(e);return Math.round(o*a)/a}function qp(e){const o=b.useRef(e);return ou(()=>{o.current=e}),o}function E2(e){e===void 0&&(e={});const{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:d}={},transform:g=!0,whileElementsMounted:m,open:h}=e,[y,v]=b.useState({x:0,y:0,strategy:a,placement:o,middlewareData:{},isPositioned:!1}),[S,w]=b.useState(i);mu(S,i)||w(i);const[T,A]=b.useState(null),[N,C]=b.useState(null),_=b.useCallback(K=>{K!==z.current&&(z.current=K,A(K))},[]),k=b.useCallback(K=>{K!==I.current&&(I.current=K,C(K))},[]),j=c||T,L=d||N,z=b.useRef(null),I=b.useRef(null),U=b.useRef(y),Y=m!=null,B=qp(m),D=qp(l),M=qp(h),H=b.useCallback(()=>{if(!z.current||!I.current)return;const K={placement:o,strategy:a,middleware:S};D.current&&(K.platform=D.current),S2(z.current,I.current,K).then(Z=>{const Q={...Z,isPositioned:M.current!==!1};ee.current&&!mu(U.current,Q)&&(U.current=Q,so.flushSync(()=>{v(Q)}))})},[S,o,a,D,M]);ou(()=>{h===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[h]);const ee=b.useRef(!1);ou(()=>(ee.current=!0,()=>{ee.current=!1}),[]),ou(()=>{if(j&&(z.current=j),L&&(I.current=L),j&&L){if(B.current)return B.current(j,L,H);H()}},[j,L,H,B,Y]);const $=b.useMemo(()=>({reference:z,floating:I,setReference:_,setFloating:k}),[_,k]),P=b.useMemo(()=>({reference:j,floating:L}),[j,L]),q=b.useMemo(()=>{const K={position:a,left:0,top:0};if(!P.floating)return K;const Z=Px(P.floating,y.x),Q=Px(P.floating,y.y);return g?{...K,transform:"translate("+Z+"px, "+Q+"px)",...lw(P.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Z,top:Q}},[a,g,P.floating,y.x,y.y]);return b.useMemo(()=>({...y,update:H,refs:$,elements:P,floatingStyles:q}),[y,H,$,P,q])}const C2=(e,o)=>{const a=g2(e);return{name:a.name,fn:a.fn,options:[e,o]}},R2=(e,o)=>{const a=y2(e);return{name:a.name,fn:a.fn,options:[e,o]}},A2=(e,o)=>({fn:x2(e).fn,options:[e,o]}),O2=(e,o)=>{const a=b2(e);return{name:a.name,fn:a.fn,options:[e,o]}},k2=(e,o)=>{const a=v2(e);return{name:a.name,fn:a.fn,options:[e,o]}};var Gp={exports:{}},Xp={};var Lx;function N2(){if(Lx)return Xp;Lx=1;var e=ll();function o(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var a=typeof Object.is=="function"?Object.is:o,i=e.useState,l=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function g(v,S){var w=S(),T=i({inst:{value:w,getSnapshot:S}}),A=T[0].inst,N=T[1];return c(function(){A.value=w,A.getSnapshot=S,m(A)&&N({inst:A})},[v,w,S]),l(function(){return m(A)&&N({inst:A}),v(function(){m(A)&&N({inst:A})})},[v]),d(w),w}function m(v){var S=v.getSnapshot;v=v.value;try{var w=S();return!a(v,w)}catch{return!0}}function h(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:g;return Xp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Xp}var Ix;function cw(){return Ix||(Ix=1,Gp.exports=N2()),Gp.exports}var pm=cw(),Kp={exports:{}},$p={};var Hx;function M2(){if(Hx)return $p;Hx=1;var e=ll(),o=cw();function a(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var i=typeof Object.is=="function"?Object.is:a,l=o.useSyncExternalStore,c=e.useRef,d=e.useEffect,g=e.useMemo,m=e.useDebugValue;return $p.useSyncExternalStoreWithSelector=function(h,y,v,S,w){var T=c(null);if(T.current===null){var A={hasValue:!1,value:null};T.current=A}else A=T.current;T=g(function(){function C(z){if(!_){if(_=!0,k=z,z=S(z),w!==void 0&&A.hasValue){var I=A.value;if(w(I,z))return j=I}return j=z}if(I=j,i(k,z))return I;var U=S(z);return w!==void 0&&w(I,U)?(k=z,I):(k=z,j=U)}var _=!1,k,j,L=v===void 0?null:v;return[function(){return C(y())},L===null?void 0:function(){return C(L())}]},[y,v,S,w]);var N=l(h,T[0],T[1]);return d(function(){A.hasValue=!0,A.value=N},[N]),m(N),N},$p}var Ux;function j2(){return Ux||(Ux=1,Kp.exports=M2()),Kp.exports}var _2=j2();const D2=am(19),z2=D2?L2:I2;function uw(e,o,a,i,l){return z2(e,o,a,i,l)}function P2(e,o,a,i,l){const c=b.useCallback(()=>o(e.getSnapshot(),a,i,l),[e,o,a,i,l]);return pm.useSyncExternalStore(e.subscribe,c,c)}lA({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let o=!1;for(let a=0;a<e.syncHooks.length;a+=1){const i=e.syncHooks[a],l=i.selector(i.store.state,i.a1,i.a2,i.a3);Object.is(i.value,l)||(o=!0,i.value=l)}return o&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=o=>{const a=new Set;for(const l of e.syncHooks)a.add(l.store);const i=[];for(const l of a)i.push(l.subscribe(o));return()=>{for(const l of i)l()}}),pm.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function L2(e,o,a,i,l){const c=rA();if(!c)return P2(e,o,a,i,l);const d=c.syncIndex;c.syncIndex+=1;let g;return c.didInitialize?(g=c.syncHooks[d],(g.store!==e||g.selector!==o||!Object.is(g.a1,a)||!Object.is(g.a2,i)||!Object.is(g.a3,l))&&(g.store!==e&&(c.didChangeStore=!0),g.store=e,g.selector=o,g.a1=a,g.a2=i,g.a3=l,g.value=o(e.getSnapshot(),a,i,l))):(g={store:e,selector:o,a1:a,a2:i,a3:l,value:o(e.getSnapshot(),a,i,l)},c.syncHooks.push(g)),g.value}function I2(e,o,a,i,l){return _2.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>o(c,a,i,l))}class H2{static create(o){return new this(o)}constructor(o){this.state=o,this.listeners=new Set,this.updateTick=0}subscribe=o=>(this.listeners.add(o),()=>{this.listeners.delete(o)});getSnapshot=()=>this.state;setState(o){if(this.state===o)return;this.state=o,this.updateTick+=1;const a=this.updateTick;for(const i of this.listeners){if(a!==this.updateTick)return;i(o)}}update(o){for(const a in o)if(!Object.is(this.state[a],o[a])){this.setState({...this.state,...o});return}}set(o,a){Object.is(this.state[o],a)||this.setState({...this.state,[o]:a})}notifyAll(){const o={...this.state};this.setState(o)}use(o,a,i,l){return uw(this,o,a,i,l)}}class Da extends H2{constructor(o,a={},i){super(o),this.context=a,this.selectors=i}useSyncedValue(o,a){b.useDebugValue(o);const i=this;we(()=>{i.state[o]!==a&&i.set(o,a)},[i,o,a])}useSyncedValueWithCleanup(o,a){const i=this;we(()=>(i.state[o]!==a&&i.set(o,a),()=>{i.set(o,void 0)}),[i,o,a])}useSyncedValues(o){const a=this,i=Object.values(o);we(()=>{a.update(o)},[a,...i])}useControlledProp(o,a){b.useDebugValue(o);const i=this,l=a!==void 0;we(()=>{l&&!Object.is(i.state[o],a)&&i.setState({...i.state,[o]:a})},[i,o,a,l])}select(o,a,i,l){const c=this.selectors[o];return c(this.state,a,i,l)}useState(o,a,i,l){return b.useDebugValue(o),uw(this,this.selectors[o],a,i,l)}useContextCallback(o,a){b.useDebugValue(o);const i=Ne(a??Ht);this.context[o]=i}useStateSetter(o){const a=b.useRef(void 0);return a.current===void 0&&(a.current=i=>{this.set(o,i)}),a.current}observe(o,a){let i;typeof o=="function"?i=o:i=this.selectors[o];let l=i(this.state);return a(l,l,this),this.subscribe(c=>{const d=i(c);if(!Object.is(l,d)){const g=l;l=d,a(d,g,this)}})}}const U2={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class hm extends Da{constructor(o){const{syncOnly:a,nested:i,onOpenChange:l,triggerElements:c,...d}=o;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:l,dataRef:{current:{}},events:WS(),nested:i,triggerElements:c},U2),this.syncOnly=a}syncOpenEvent=(o,a)=>{(!o||!this.state.open||a!=null&&bA(a))&&(this.context.dataRef.current.openEvent=o?a:void 0)};dispatchOpenChange=(o,a)=>{this.syncOpenEvent(o,a.event);const i={open:o,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",i)};setOpen=(o,a)=>{if(this.syncOnly){this.context.onOpenChange?.(o,a);return}this.dispatchOpenChange(o,a),this.context.onOpenChange?.(o,a)}}function fw(e){const{popupStore:o,treatPopupAsFloatingElement:a=!1,floatingRootContext:i,floatingId:l,nested:c,onOpenChange:d}=e,g=o.useState("open"),m=o.useState("activeTriggerElement"),h=o.useState(a?"popupElement":"positionerElement"),y=o.context.triggerElements,v=d,S=b.useRef(null);i===void 0&&S.current===null&&(S.current=new hm({open:g,transitionStatus:void 0,referenceElement:m,floatingElement:h,triggerElements:y,onOpenChange:v,floatingId:l,syncOnly:!0,nested:c}));const w=i??S.current;return o.useSyncedValue("floatingId",l),we(()=>{const T={open:g,floatingId:l,referenceElement:m,floatingElement:h};et(m)&&(T.domReferenceElement=m),w.state.positionReference===w.state.referenceElement&&(T.positionReference=m),w.update(T)},[g,l,m,h,w]),w.context.onOpenChange=v,w.context.nested=c,w}function mm(e,o=!1,a=!1,i=!1){const[l,c]=b.useState(e&&o?"idle":void 0),[d,g]=b.useState(e&&!i);return e&&!d&&(g(!0),c("starting")),!e&&d&&l!=="ending"&&!a&&c("ending"),!e&&!d&&l==="ending"&&c(void 0),we(()=>{if(!e&&d&&l!=="ending"&&a){const m=Eo.request(()=>{c("ending")});return()=>{Eo.cancel(m)}}},[e,d,l,a]),we(()=>{if(!e||o)return;const m=Eo.request(()=>{c(void 0)});return()=>{Eo.cancel(m)}},[o,e]),we(()=>{if(!e||!o)return;e&&d&&l!=="idle"&&c("starting");const m=Eo.request(()=>{c("idle")});return()=>{Eo.cancel(m)}},[o,e,d,l]),{mounted:d,setMounted:g,transitionStatus:l}}let Yc=null;function B2(e){if(!Yc){const o=[];Yc=o,queueMicrotask(()=>{Yc=null,so.flushSync(()=>{for(const a of o)a()})})}Yc.push(e)}function Ku(e,o=!1,a=!1){const i=ki();return Ne((l,c=null)=>{i.cancel();const d=Go(e);if(d==null)return;const g=d,m=()=>{if(!a){so.flushSync(l);return}B2(()=>{c?.aborted||l()})};if(typeof g.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){l();return}function h(){Promise.all(g.getAnimations().map(y=>y.finished)).then(()=>{c?.aborted||m()},()=>{if(c?.aborted)return;if(g.getAnimations().some(v=>v.pending||v.playState!=="finished")){h();return}m()})}if(o){const y=gS;if(!g.hasAttribute(y)){i.request(h);return}const v=new MutationObserver(()=>{g.hasAttribute(y)||(v.disconnect(),h())});v.observe(g,{attributes:!0,attributeFilter:[y]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0});return}i.request(h)})}function fs(e){const{enabled:o=!0,open:a,ref:i,batch:l=!1,onComplete:c}=e,d=Ne(c),g=Ku(i,a,l);b.useEffect(()=>{if(!o)return;const m=new AbortController;return g(d,m.signal),()=>{m.abort()}},[o,a,d,g])}const gl={tabIndex:-1,[gh]:""};function dw(e){return o=>o==="touch"?e.current:!0}function gm(e,o=!1){const a=Gs(),i=Xs()!=null,l=Zt(()=>e(a,i)).current;return fw({popupStore:l,treatPopupAsFloatingElement:o,floatingRootContext:l.state.floatingRootContext,floatingId:a,nested:i,onOpenChange:l.setOpen}),l}function $u({handle:e,store:o}){return we(()=>e.attachStore(o),[e,o]),null}function Bx(e){const o=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==o&&e.set("triggerCount",o)}function pw(e,o){const a=b.useRef(null);return Ne(i=>{const l=a.current;if(l!==null){if(l.element===i&&l.store===o&&l.id===e)return;a.current=null;const c=l.store;c.context.triggerElements.getById(l.id)===l.element&&(c.context.triggerElements.delete(l.id),Bx(c))}i!==null&&e!==void 0&&(a.current={store:o,id:e,element:i},o.context.triggerElements.add(e,i),Bx(o))})}function Wu(e,o,a,i=!1){let l=e.preventUnmountingOnClose;o?l=!1:i&&(l=!0);const c=a?.id??null;let d=e.activeTriggerId,g=e.activeTriggerElement;return(c||o)&&(d=c,g=a??null),{open:o,preventUnmountingOnClose:l,activeTriggerId:d,activeTriggerElement:g}}function ym(e){let o=!1;return e.preventUnmountOnClose=()=>{o=!0},()=>o}function F2(e,o,a,i={}){const l=a.reason,c=l===Ft,d=o&&l===Ti,g=!o&&(l===os||l===pl),m=ym(a);if(e.context.onOpenChange?.(o,a),a.isCanceled)return;i.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(o,a);const h=()=>{const y=Wu(e.state,o,a.trigger,m()),v={...i.extraState,...y};d?v.instantType="focus":g?v.instantType="dismiss":c&&(v.instantType=void 0),e.update(v)};c?so.flushSync(h):h()}function bm(e,o,a,i){const l=a.useState("isMountedByTrigger",e),c=pw(e,a),d=Ne(m=>{const h=a.select("open"),y=a.select("activeTriggerId");if(y===e){const v={activeTriggerElement:m,...h?i:null};a.update(v);return}if(y==null&&h){const v={activeTriggerId:e??null,activeTriggerElement:m,...i};a.update(v)}}),g=Ne(m=>{c(m),m&&d(m)});return we(()=>(g(o.current),()=>g(null)),[g,o,a,e]),we(()=>{if(l){const m={activeTriggerElement:o.current,...i};a.update(m)}},[l,a,o,...Object.values(i)]),{registerTrigger:g,isMountedByThisTrigger:l}}function Qu(e,o={}){const{closeOnActiveTriggerUnmount:a=!1}=o,i=b.useRef(null),l=e.useState("open"),c=e.useState("triggerCount"),d=e.useState("activeTriggerId"),g=e.useState("activeTriggerElement");we(()=>{if(!l){i.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const m=e.context.triggerElements.size,h={};e.state.triggerCount!==m&&(h.triggerCount=m);const y=e.select("activeTriggerId");let v=null;if(y){const S=e.context.triggerElements.getById(y);if(S)i.current=y,S!==e.state.activeTriggerElement&&(h.activeTriggerElement=S);else{for(const[w,T]of e.context.triggerElements.entries())if(T===e.state.activeTriggerElement){h.activeTriggerId=w,h.activeTriggerElement=T,i.current=w;break}h.activeTriggerId===void 0&&(i.current===y?v=y:i.current=null)}}else i.current=null;if(!v&&!y&&m===1){const S=e.context.triggerElements.entries().next();if(!S.done){const[w,T]=S.value;h.activeTriggerId=w,h.activeTriggerElement=T,i.current=w}}(h.triggerCount!==void 0||h.activeTriggerId!==void 0||h.activeTriggerElement!==void 0)&&e.update(h),v&&a&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===v&&!e.context.triggerElements.getById(v)){const S=qe(ns);e.setOpen(!1,S),S.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[l,e,c,d,g,a])}function Zu(e,o,a,i){const{mounted:l,setMounted:c,transitionStatus:d}=mm(e,!1,!1,i),g=o.useState("preventUnmountingOnClose"),m=e?!1:g;o.useSyncedValues({mounted:l,transitionStatus:d,preventUnmountingOnClose:m});const h=Ne(()=>{c(!1),o.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),a?.(),o.context.onOpenChangeComplete?.(!1)});return fs({enabled:l&&!e&&!m,open:e,ref:o.context.popupRef,onComplete(){e||h()}}),{forceUnmount:h,transitionStatus:d}}function Ju(e,o){e.useSyncedValues(o),we(()=>()=>{e.update({activeTriggerProps:Ct,inactiveTriggerProps:Ct,popupProps:Ct})},[e])}function hw(e,o){we(()=>{!o&&e.state.openMethod!==null&&e.set("openMethod",null)},[o,e]),we(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class yl{constructor(){this.idMap=new Map}add(o,a){this.idMap.set(o,a)}delete(o){this.idMap.delete(o)}hasElement(o){for(const a of this.idMap.values())if(a===o)return!0;return!1}hasMatchingElement(o){for(const a of this.idMap.values())if(o(a))return!0;return!1}getById(o){return this.idMap.get(o)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function ef(e,o,a=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new hm({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:o,syncOnly:!0,nested:a,onOpenChange:void 0}),floatingId:o,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ct,inactiveTriggerProps:Ct,popupProps:Ct}}const Gr=e=>e.triggerIdProp??e.activeTriggerId,vm=e=>e.openProp??e.open,Fx=e=>(e.popupElement?.id??e.floatingId)||void 0;function mw(e,o){return o!==void 0&&vm(e)&&Gr(e)===o}function V2(e,o){return mw(e,o)?!0:o!==void 0&&vm(e)&&Gr(e)==null&&e.triggerCount===1}const tf={open:vm,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Gr,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Fx,isTriggerActive:(e,o)=>o!==void 0&&Gr(e)===o,isOpenedByTrigger:(e,o)=>mw(e,o),isMountedByTrigger:(e,o)=>o!==void 0&&Gr(e)===o&&e.mounted,triggerProps:(e,o)=>o?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,o)=>V2(e,o)?Fx(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function xm(e){const o=b.useCallback(i=>e===void 0?Ht:e.subscribeStore(i),[e]),a=b.useCallback(()=>e===void 0?void 0:e.store,[e]);return pm.useSyncExternalStore(o,a,()=>e?.serverStore)}function Y2(e){const{open:o=!1,onOpenChange:a,elements:i={}}=e,l=Gs(),c=Xs()!=null,d=Zt(()=>new hm({open:o,transitionStatus:void 0,onOpenChange:a,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new yl,floatingId:l,syncOnly:!1,nested:c})).current;return we(()=>{const g={open:o,floatingId:l};i.reference!==void 0&&(g.referenceElement=i.reference,g.domReferenceElement=et(i.reference)?i.reference:null),i.floating!==void 0&&(g.floatingElement=i.floating),d.update(g)},[o,l,i.reference,i.floating,d]),d.context.onOpenChange=a,d.context.nested=c,d}function q2(e){return G2(e,e.rootContext)}function G2(e,o){const{nodeId:a,externalTree:i}=e,l=o.useState("referenceElement"),c=o.useState("floatingElement"),d=o.useState("domReferenceElement"),g=o.useState("open"),m=o.useState("floatingId"),[h,y]=b.useState(null),[v,S]=b.useState(void 0),[w,T]=b.useState(void 0),A=b.useRef(null),N=Ks(i),C=b.useMemo(()=>({reference:l,floating:c,domReference:d}),[l,c,d]),_=E2({...e,elements:{...C,...h&&{reference:h}}}),k=et(v)?v:null,j=w===void 0?o.state.floatingElement:w;o.useSyncedValue("referenceElement",v??null),o.useSyncedValue("domReferenceElement",v===void 0?d:k),o.useSyncedValue("floatingElement",j);const L=b.useCallback(D=>{const M=et(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;y(M),_.refs.setReference(M)},[_.refs]),z=b.useCallback(D=>{(et(D)||D===null)&&(A.current=D,S(D)),(et(_.refs.reference.current)||_.refs.reference.current===null||D!==null&&!et(D))&&_.refs.setReference(D)},[_.refs,S]),I=b.useCallback(D=>{T(D),_.refs.setFloating(D)},[_.refs]),U=b.useMemo(()=>({..._.refs,setReference:z,setFloating:I,setPositionReference:L,domReference:A}),[_.refs,z,I,L]),Y=b.useMemo(()=>({..._.elements,domReference:d}),[_.elements,d]),B=b.useMemo(()=>({..._,dataRef:o.context.dataRef,open:g,onOpenChange:o.setOpen,events:o.context.events,floatingId:m,refs:U,elements:Y,nodeId:a,rootStore:o}),[_,U,Y,a,o,g,m]);return we(()=>{d&&(A.current=d)},[d]),we(()=>{o.context.dataRef.current.floatingContext=B;const D=N?.nodesRef.current.find(M=>M.id===a);D&&(D.context=B)}),b.useMemo(()=>({..._,context:B,refs:U,elements:Y,rootStore:o}),[_,U,Y,B,o])}const Wp=Gh&&cs;function gw(e,o={}){const{enabled:a=!0,delay:i}=o,l="rootStore"in e?e.rootStore:e,{events:c,dataRef:d}=l.context,g=b.useRef(!1),m=b.useRef(null),h=b.useRef(!0),y=on();b.useEffect(()=>{const S=l.select("domReferenceElement");if(!a)return;const w=Rt(S);function T(){const C=l.select("domReferenceElement");!l.select("open")&&vt(C)&&C===nn(We(C))&&(g.current=!0,m.current=C)}function A(){h.current=!0}function N(){h.current=!1}return po(Ge(w,"blur",T),Wp&&Ge(w,"keydown",A,!0),Wp&&Ge(w,"pointerdown",N,!0))},[l,a]),b.useEffect(()=>{if(!a)return;function S(w){if(w.reason===os||w.reason===pl){const T=l.select("domReferenceElement");et(T)&&(m.current=T,g.current=!0)}}return c.on("openchange",S),()=>{c.off("openchange",S)}},[c,a,l]);const v=b.useMemo(()=>{function S(){g.current=!1,m.current=null}return{onMouseLeave(){S()},onFocus(w){const T=w.currentTarget;if(g.current){if(m.current===T)return;S()}const A=Pt(w.nativeEvent);if(et(A)){if(Wp&&!w.relatedTarget){if(!h.current&&!Hu(A))return}else if(!lu(A))return}const N=ru(w.relatedTarget,l.context.triggerElements),{nativeEvent:C,currentTarget:_}=w,k=typeof i=="function"?i():i;if(l.select("open")&&N||k===0||k===void 0){l.setOpen(!0,qe(Ti,C,_));return}y.start(k,()=>{g.current||l.setOpen(!0,qe(Ti,C,_))})},onBlur(w){S();const T=w.relatedTarget,A=w.nativeEvent,N=et(T)&&T.hasAttribute(Jr("focus-guard"))&&T.getAttribute("data-type")==="outside";y.start(0,()=>{const C=l.select("domReferenceElement"),_=nn(We(C));!T&&_===C||De(d.current.floatingContext?.refs.floating.current,_)||De(C,_)||N||ru(T??_,l.context.triggerElements)||l.setOpen(!1,qe(Ti,A))})}}},[d,i,l,y]);return b.useMemo(()=>a?{reference:v,trigger:v}:{},[a,v])}class Sm{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Mn,this.restTimeout=new Mn,this.handleCloseOptions=void 0}static create(){return new Sm}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const gu=new WeakMap;function yu(e){if(!e.performedPointerEventsMutation)return;const o=e.pointerEventsScopeElement;o&&gu.get(o)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),gu.delete(o)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function yw(e,o){const{scopeElement:a,referenceElement:i,floatingElement:l}=o,c=gu.get(a);c&&c!==e&&yu(c),yu(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=a,e.pointerEventsReferenceElement=i,e.pointerEventsFloatingElement=l,gu.set(a,e),a.style.pointerEvents="none",i.style.pointerEvents="auto",l.style.pointerEvents="auto"}function wm(e){const o=e.context.dataRef.current,a=Zt(()=>o.hoverInteractionState??Sm.create()).current;return o.hoverInteractionState||(o.hoverInteractionState=a),Ou(o.hoverInteractionState.disposeEffect),o.hoverInteractionState}function Tm(e,o={}){const{enabled:a=!0,closeDelay:i=0,nodeId:l}=o,c="rootStore"in e?e.rootStore:e,d=c.useState("open"),g=c.useState("floatingElement"),m=c.useState("domReferenceElement"),{dataRef:h}=c.context,y=Ks(),v=Xs(),S=wm(c),w=on(),T=Ne(()=>bS(h.current.openEvent?.type,S.interactedInside)),A=Ne(()=>IA(h.current.openEvent?.type)),N=Ne(()=>{yu(S)});we(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,N())},[d,S,N]),b.useEffect(()=>N,[N]),we(()=>{if(a&&d&&S.handleCloseOptions?.blockPointerEvents&&A()&&et(m)&&g){const C=m,_=g,k=We(g),j=y?.nodesRef.current.find(U=>U.id===v)?.context?.elements.floating;j&&(j.style.pointerEvents="");const L=S.pointerEventsScopeElement!==_?S.pointerEventsScopeElement:null,z=j!==_?j:null,I=S.handleCloseOptions?.getScope?.()??L??z??C.closest("[data-rootownerid]")??k.body;return yw(S,{scopeElement:I,referenceElement:C,floatingElement:_}),()=>{N()}}},[a,d,m,g,S,A,y,v,N]),b.useEffect(()=>{if(!a)return;function C(){return!!(y&&v&&qs(y.nodesRef.current,v).length>0)}function _(U){const Y=Aa(i,"close",S.pointerType),B=()=>{c.setOpen(!1,qe(Ft,U)),y?.events.emit("floating.closed",U)};Y?S.openChangeTimeout.start(Y,B):(S.openChangeTimeout.clear(),B())}function k(U){const Y=Pt(U);if(!PA(Y)){S.interactedInside=!1;return}S.interactedInside=Y?.closest("[aria-haspopup]")!=null}function j(){S.openChangeTimeout.clear(),w.clear(),y?.events.off("floating.closed",z),N()}function L(U){if(C()&&y){y.events.on("floating.closed",z);return}if(ru(U.relatedTarget,c.context.triggerElements))return;const Y=h.current.floatingContext?.nodeId??l,B=U.relatedTarget;if(!(y&&Y&&et(B)&&qs(y.nodesRef.current,Y,!1).some(M=>De(M.context?.elements.floating,B)))){if(S.handler){S.handler(U);return}N(),A()&&!T()&&_(U)}}function z(U){!y||!v||C()||w.start(0,()=>{y.events.off("floating.closed",z),c.setOpen(!1,qe(Ft,U)),y.events.emit("floating.closed",U)})}const I=g;return po(I&&Ge(I,"mouseenter",j),I&&Ge(I,"mouseleave",L),I&&Ge(I,"pointerdown",k,!0),()=>{y?.events.off("floating.closed",z)})},[a,g,c,h,i,l,A,T,N,S,y,v,w])}const X2={current:null};function nf(e,o={}){const{enabled:a=!0,delay:i=0,handleClose:l=null,mouseOnly:c=!1,restMs:d=0,move:g=!0,triggerElementRef:m=X2,externalTree:h,isActiveTrigger:y=!0,getHandleCloseContext:v,isClosing:S,shouldOpen:w,guardStaleOpen:T=!1}=o,A="rootStore"in e?e.rootStore:e,{dataRef:N,events:C}=A.context,_=Ks(h),k=wm(A),j=b.useRef(!1),L=Vt(l),z=Vt(i),I=Vt(d),U=Vt(a),Y=Vt(w),B=Vt(S),D=Ne(()=>bS(N.current.openEvent?.type,k.interactedInside)),M=Ne(()=>Y.current?.()!==!1),H=Ne((P,q,K)=>{const Z=A.context.triggerElements;if(Z.hasElement(q))return!P||!De(P,q);if(!et(K))return!1;const Q=K;return Z.hasMatchingElement(O=>De(O,Q))&&(!P||!De(P,Q))}),ee=Ne(()=>{if(!k.handler)return;We(A.select("domReferenceElement")).removeEventListener("mousemove",k.handler),k.handler=void 0}),$=Ne(()=>{yu(k)});return y&&(k.handleCloseOptions=l?.__options),b.useEffect(()=>ee,[ee]),b.useEffect(()=>{if(!a)return;function P(q){q.open?j.current=!1:(j.current=q.reason===Ft,ee(),k.openChangeTimeout.clear(),k.restTimeout.clear(),k.blockMouseMove=!0,k.restTimeoutPending=!1)}return C.on("openchange",P),()=>{C.off("openchange",P)}},[a,C,k,ee]),b.useEffect(()=>{if(!a)return;function P(F,J=!0){const W=Aa(z.current,"close",k.pointerType);W?k.openChangeTimeout.start(W,()=>{A.setOpen(!1,qe(Ft,F)),_?.events.emit("floating.closed",F)}):J&&(k.openChangeTimeout.clear(),A.setOpen(!1,qe(Ft,F)),_?.events.emit("floating.closed",F))}const q=m.current??(y?A.select("domReferenceElement"):null);if(!et(q))return;function K(F){if(k.openChangeTimeout.clear(),k.blockMouseMove=!1,c&&!Bs(k.pointerType))return;const J=hx(I.current),W=Aa(z.current,"open",k.pointerType),se=Pt(F),ie=F.currentTarget??null,me=A.select("domReferenceElement");let pe=ie;if(et(se)&&!A.context.triggerElements.hasElement(se)){for(const Ee of A.context.triggerElements.elements())if(De(Ee,se)){pe=Ee;break}}et(ie)&&et(me)&&!A.context.triggerElements.hasElement(ie)&&De(ie,me)&&(pe=me);const be=pe==null?!1:H(me,pe,se),Ce=A.select("open"),Me=B.current?.()??A.select("transitionStatus")==="ending",ye=!Ce&&Me&&j.current,ge=!be&&et(pe)&&et(me)&&De(me,pe)&&ye,Te=J>0&&!W,Oe=be&&(Ce||ye)||ge,Be=!Ce||be;if(Oe){M()&&A.setOpen(!0,qe(Ft,F,pe));return}Te||(W?k.openChangeTimeout.start(W,()=>{Be&&M()&&A.setOpen(!0,qe(Ft,F,pe))}):Be&&M()&&A.setOpen(!0,qe(Ft,F,pe)))}function Z(F){if(D()){$();return}ee();const J=A.select("domReferenceElement"),W=We(J);k.restTimeout.clear(),k.restTimeoutPending=!1;const se=N.current.floatingContext??v?.();if(ru(F.relatedTarget,A.context.triggerElements))return;if(L.current&&se){A.select("open")||k.openChangeTimeout.clear();const me=m.current;k.handler=L.current({...se,tree:_,x:F.clientX,y:F.clientY,onClose(){$(),ee(),U.current&&!D()&&me===A.select("domReferenceElement")&&P(F,!0)}}),W.addEventListener("mousemove",k.handler),k.handler(F);return}(k.pointerType!=="touch"||!De(A.select("floatingElement"),F.relatedTarget))&&P(F)}function Q(F){De(q,F.relatedTarget)||(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1)}const O=T?Ge(q,"mouseout",Q):void 0;return g?po(Ge(q,"mousemove",K,{once:!0}),Ge(q,"mouseenter",K),Ge(q,"mouseleave",Z),O):po(Ge(q,"mouseenter",K),Ge(q,"mouseleave",Z),O)},[ee,$,N,z,A,a,L,k,y,H,D,c,g,I,m,_,U,v,B,M,T]),b.useMemo(()=>{if(!a)return;function P(q){k.pointerType=q.pointerType}return{onPointerDown:P,onPointerEnter:P,onMouseMove(q){const{nativeEvent:K}=q,Z=q.currentTarget,Q=A.select("domReferenceElement"),O=A.select("open"),F=H(Q,Z,q.target);if(c&&!Bs(k.pointerType))return;if(O&&F&&k.handleCloseOptions?.blockPointerEvents){const se=A.select("floatingElement");if(se){const ie=k.handleCloseOptions?.getScope?.()??Z.ownerDocument.body;yw(k,{scopeElement:ie,referenceElement:Z,floatingElement:se})}}const J=hx(I.current);if(O&&!F||J===0||!F&&k.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;k.restTimeout.clear();function W(){if(k.restTimeoutPending=!1,D())return;const se=A.select("open");!k.blockMouseMove&&(!se||F)&&M()&&A.setOpen(!0,qe(Ft,K,Z))}k.pointerType==="touch"?so.flushSync(()=>{W()}):F&&O?W():(k.restTimeoutPending=!0,k.restTimeout.start(J,W))}}},[a,k,D,H,c,A,I,M])}const K2="Escape";function Vx(e){return cs&&e.movementX===0&&e.movementY===0}function of(e,o,a){switch(e){case"vertical":return o;case"horizontal":return a;default:return o||a}}function qc(e,o){return of(o,e===mS||e===Zh,e===zu||e===Pu)}function Qp(e,o,a){return of(o,e===Zh,a?e===zu:e===Pu)||e==="Enter"||e===" "||e===""}function $2(e,o,a){return of(o,a?e===zu:e===Pu,e===Zh)}function W2(e,o,a,i){const l=a?e===Pu:e===zu,c=e===mS;return o==="both"||o==="horizontal"&&i?e===K2:of(o,l,c)}function bw(e,o){const{listRef:a,activeIndex:i,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:d=null,allowEscape:g=!1,loopFocus:m=!1,nested:h=!1,rtl:y=!1,virtual:v=!1,focusItemOnOpen:S="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:T=!0,disabledIndices:A=void 0,orientation:N="vertical",parentOrientation:C,id:_,resetOnPointerLeave:k=!0,externalTree:j,grid:L}=o,z=L!=null,I="rootStore"in e?e.rootStore:e,U=I.useState("open"),Y=I.useState("floatingElement"),B=I.useState("domReferenceElement"),D=I.context.dataRef,M=cu(Y),H=bh(B),ee=Vt(M),$=Xs(),P=Ks(j),q=b.useRef(S),K=b.useRef(d??-1),Z=b.useRef(null),Q=b.useRef(!0),O=Ne(le=>{l(K.current===-1?null:K.current,le)}),F=b.useRef(!!Y),J=b.useRef(U),W=b.useRef(!1),se=b.useRef(!1),ie=b.useRef(null),me=Vt(A),pe=Vt(U),be=Vt(d),Ce=Vt(k),Me=ki(),ye=ki(),ge=Ne(()=>{function le(xe){v?P?.events.emit("virtualfocus",xe):ie.current=nu(xe,{sync:W.current,preventScroll:!0})}const ve=a.current[K.current],he=se.current;ve&&le(ve),(W.current?xe=>xe():xe=>Me.request(xe))(()=>{const xe=a.current[K.current]||ve;if(!xe)return;ve||le(xe),Se&&(he||!Q.current)&&xe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});we(()=>{D.current.orientation=N},[D,N]),we(()=>{c&&(U&&Y?(K.current=d??-1,q.current&&d!=null&&(se.current=!0,O())):F.current&&(K.current=-1,O()))},[c,U,Y,d,O]),we(()=>{if(c){if(!U){W.current=!1;return}if(Y)if(i==null){if(W.current=!1,be.current!=null)return;if(F.current&&(K.current=-1,ge()),(!J.current||!F.current)&&q.current&&(Z.current!=null||q.current===!0&&Z.current==null)){let le=0;const ve=()=>{a.current[0]==null?(le<2&&(le?ce=>ye.request(ce):queueMicrotask)(ve),le+=1):(K.current=Z.current==null||Qp(Z.current,N,y)||h?tu(a):xh(a),Z.current=null,O())};ve()}}else qr(a.current,i)||(K.current=i,ge(),se.current=!1)}},[c,U,Y,i,be,h,a,N,y,O,ge,ye]),we(()=>{if(!c||Y||!P||v||!F.current)return;const le=P.nodesRef.current,ve=le.find(xe=>xe.id===$)?.context?.elements.floating,he=nn(We(B??ve??null)),ce=le.some(xe=>xe.context&&De(xe.context.elements.floating,he));ve&&!ce&&Q.current&&ve.focus({preventScroll:!0})},[c,Y,B,P,$,v]),we(()=>{J.current=U,F.current=!!Y}),we(()=>{U||(Z.current=null,q.current=S)},[U,S]);const Te=i!=null,Oe=Ne(le=>{if(!pe.current)return;const ve=a.current.indexOf(le.currentTarget);ve!==-1&&(K.current!==ve||i!==ve)&&(K.current=ve,O(le))}),Be=Ne(()=>C??P?.nodesRef.current.find(le=>le.id===$)?.context?.dataRef?.current.orientation),Ee=Ne(()=>tu(a,me.current)),Pe=Ne(le=>{if(Q.current=!1,W.current=!0,le.which===229||!pe.current&&le.currentTarget===ee.current)return;if(h&&W2(le.key,N,y,z)){qc(le.key,Be())||To(le),I.setOpen(!1,qe(uu,le.nativeEvent)),vt(B)&&(v?P?.events.emit("virtualfocus",B):B.focus());return}const ve=K.current,he=tu(a,A),ce=xh(a,A);if(H||(le.key==="Home"&&(To(le),K.current=he,O(le)),le.key==="End"&&(To(le),K.current=ce,O(le))),L!=null){const xe=L(le,K.current,a,N,m,y,A,he,ce);if(xe!=null&&(K.current=xe,O(le)),N==="both")return}if(qc(le.key,N)){if(To(le),U&&!v&&nn(le.currentTarget.ownerDocument)===le.currentTarget){K.current=Qp(le.key,N,y)?he:ce,O(le);return}Qp(le.key,N,y)?m?ve>=ce?g&&ve!==a.current.length?K.current=-1:(W.current=!1,K.current=he):K.current=$o(a.current,{startingIndex:ve,disabledIndices:A}):K.current=Math.min(ce,$o(a.current,{startingIndex:ve,disabledIndices:A})):m?ve<=he?g&&ve!==-1?K.current=a.current.length:(W.current=!1,K.current=ce):K.current=$o(a.current,{startingIndex:ve,decrement:!0,disabledIndices:A}):K.current=Math.max(he,$o(a.current,{startingIndex:ve,decrement:!0,disabledIndices:A})),qr(a.current,K.current)&&(K.current=-1),O(le)}}),Se=b.useMemo(()=>({onFocus(ve){W.current=!0,Oe(ve)},onClick:({currentTarget:ve})=>ve.focus({preventScroll:!0}),onMouseMove(ve){Vx(ve)||(W.current=!0,se.current=!1,w&&Oe(ve))},onPointerLeave(ve){if(!pe.current||!Q.current||ve.pointerType==="touch")return;W.current=!0;const he=ve.relatedTarget;if(!(!w||a.current.includes(he))&&Ce.current&&(ie.current?.(),ie.current=null,K.current=-1,O(ve),!v)){const ce=ee.current,xe=nn(We(ce));ce&&De(ce,xe)&&ce.focus({preventScroll:!0})}}}),[Oe,pe,ee,w,a,O,Ce,v]),Re=b.useMemo(()=>v&&U&&Te&&{"aria-activedescendant":`${_}-${i}`},[v,U,Te,_,i]),ke=b.useMemo(()=>({...H?{}:Re,onKeyDown(le){if(le.key==="Tab"&&le.shiftKey&&U&&!v){const ve=Pt(le.nativeEvent);if(ve&&!De(ee.current,ve))return;To(le),I.setOpen(!1,qe(Vs,le.nativeEvent)),vt(B)&&B.focus();return}Pe(le)},onPointerMove(le){Vx(le)||(Q.current=!0)}}),[Re,Pe,ee,H,I,U,v,B]),Ie=b.useMemo(()=>{function le(ce){I.setOpen(!0,qe(uu,ce.nativeEvent,ce.currentTarget))}function ve(ce){S==="auto"&&Mu(ce.nativeEvent)&&(q.current=!v)}function he(ce){q.current=S,S==="auto"&&Kh(ce.nativeEvent)&&(q.current=!0)}return{onKeyDown(ce){const xe=I.select("open");Q.current=!1;const He=ce.key.startsWith("Arrow"),Lt=$2(ce.key,Be(),y),Yt=qc(ce.key,N),ut=(h?Lt:Yt)||ce.key==="Enter"||ce.key.trim()==="";if(v&&xe)return Pe(ce);if(!(!xe&&!T&&He)){if(ut){const Ae=qc(ce.key,Be());Z.current=h&&Ae?null:ce.key}if(h){Lt&&(To(ce),xe?(K.current=Ee(),O(ce)):le(ce));return}Yt&&(be.current!=null&&(K.current=be.current),To(ce),!xe&&T?le(ce):Pe(ce),xe&&O(ce))}},onFocus(ce){I.select("open")&&!v&&(K.current=-1,O(ce))},onPointerDown:he,onPointerEnter:he,onMouseDown:ve,onClick:ve}},[Pe,S,Ee,h,O,I,T,N,Be,y,be,v]),je=b.useMemo(()=>({...Re,...Ie}),[Re,Ie]);return b.useMemo(()=>c?{reference:je,floating:ke,item:Se,trigger:Ie}:{},[c,je,ke,Ie,Se])}function vw(e,o){const{listRef:a,elementsRef:i,activeIndex:l,onMatch:c,disabledIndices:d,onTyping:g,enabled:m=!0,resetMs:h=750,selectedIndex:y=null}=o,v="rootStore"in e?e.rootStore:e,S=v.useState("open"),w=on(),T=b.useRef(""),A=b.useRef(y??l??-1),N=b.useRef(null),C=Ne(j=>{function L(ee){return i?.current[ee]}function z(ee){const $=L(ee);return $&&!Vu($)||$?.matches(":disabled")?!1:d==null||!Ei(ho,ee,d)}function I(ee,$,P=0){if(ee.length===0)return-1;const q=(P%ee.length+ee.length)%ee.length,K=$.toLowerCase();for(let Z=0;Z<ee.length;Z+=1){const Q=(q+Z)%ee.length;if(!(!ee[Q]?.toLowerCase().startsWith(K)||!z(Q)))return Q}return-1}const U=a.current;if(T.current.length>0&&j.key===" "&&(To(j),g?.(!0)),T.current.length>0&&T.current[0]!==" "&&I(U,T.current)===-1&&j.key!==" "&&g?.(!1),U==null||j.key.length!==1||j.ctrlKey||j.metaKey||j.altKey)return;S&&j.key!==" "&&(To(j),g?.(!0));const Y=T.current==="";Y&&(A.current=y??l??-1),U.every((ee,$)=>ee&&z($)?ee[0]?.toLowerCase()!==ee[1]?.toLowerCase():!0)&&T.current===j.key&&(T.current="",A.current=N.current),T.current+=j.key,w.start(h,()=>{T.current="",A.current=N.current,g?.(!1)});const M=((Y?y??l??-1:A.current)??0)+1,H=I(U,T.current,M);H!==-1?(c?.(H),N.current=H):j.key!==" "&&(T.current="",g?.(!1))}),_=Ne(j=>{const L=j.relatedTarget,z=v.select("domReferenceElement"),I=v.select("floatingElement");De(z,L)||De(I,L)||(w.clear(),T.current="",A.current=N.current,g?.(!1))});we(()=>{!S&&y!==null||(w.clear(),N.current=null,T.current!==""&&(T.current=""))},[S,y,w]);const k=b.useMemo(()=>({onKeyDown:C,onBlur:_}),[C,_]);return b.useMemo(()=>m?{reference:k,floating:k}:{},[m,k])}const Yx=.1,Q2=Yx*Yx,Et=.5;function Gc(e,o,a,i,l,c){return i>=o!=c>=o&&e<=(l-a)*(o-i)/(c-i)+a}function Xc(e,o,a,i,l,c,d,g,m,h){let y=!1;return Gc(e,o,a,i,l,c)&&(y=!y),Gc(e,o,l,c,d,g)&&(y=!y),Gc(e,o,d,g,m,h)&&(y=!y),Gc(e,o,m,h,a,i)&&(y=!y),y}function Z2(e,o,a){return e>=a.x&&e<=a.x+a.width&&o>=a.y&&o<=a.y+a.height}function Kc(e,o,a,i,l,c){const d=Math.min(a,l),g=Math.max(a,l),m=Math.min(i,c),h=Math.max(i,c);return e>=d&&e<=g&&o>=m&&o<=h}function sf(e={}){const{blockPointerEvents:o=!1}=e,a=new Mn,i=({x:l,y:c,placement:d,elements:g,onClose:m,nodeId:h,tree:y})=>{const v=d?.split("-")[0];let S=!1,w=null,T=null,A=typeof performance<"u"?performance.now():0;function N(_,k){const j=performance.now(),L=j-A;if(w===null||T===null||L===0)return w=_,T=k,A=j,!1;const z=_-w,I=k-T,U=z*z+I*I,Y=L*L*Q2;return w=_,T=k,A=j,U<Y}function C(){a.clear(),m()}return function(k){a.clear();const j=g.domReference,L=g.floating;if(!j||!L||v==null||l==null||c==null)return;const{clientX:z,clientY:I}=k,U=Pt(k),Y=k.type==="mouseleave",B=De(L,U),D=De(j,U);if(B&&(S=!0,!Y))return;if(D&&(S=!1,!Y)){S=!0;return}if(Y&&et(k.relatedTarget)&&De(L,k.relatedTarget))return;function M(){return!!(y&&qs(y.nodesRef.current,h).length>0)}function H(){M()||C()}if(M())return;const ee=j.getBoundingClientRect(),$=L.getBoundingClientRect(),P=l>$.right-$.width/2,q=c>$.bottom-$.height/2,K=$.width>ee.width,Z=$.height>ee.height,Q=(K?ee:$).left,O=(K?ee:$).right,F=(Z?ee:$).top,J=(Z?ee:$).bottom;if(v==="top"&&c>=ee.bottom-1||v==="bottom"&&c<=ee.top+1||v==="left"&&l>=ee.right-1||v==="right"&&l<=ee.left+1){H();return}let W=!1;switch(v){case"top":W=Kc(z,I,Q,ee.top+1,O,$.bottom-1);break;case"bottom":W=Kc(z,I,Q,$.top+1,O,ee.bottom-1);break;case"left":W=Kc(z,I,$.right-1,J,ee.left+1,F);break;case"right":W=Kc(z,I,ee.right-1,J,$.left+1,F);break}if(W)return;if(S&&!Z2(z,I,ee)){H();return}if(!Y&&N(z,I)){H();return}let se=!1;switch(v){case"top":{const ie=K?Et/2:Et*4,me=K||P?l+ie:l-ie,pe=K?l-ie:P?l+ie:l-ie,be=c+Et+1,Ce=P||K?$.bottom-Et:$.top,Me=P?K?$.bottom-Et:$.top:$.bottom-Et;se=Xc(z,I,me,be,pe,be,$.left,Ce,$.right,Me);break}case"bottom":{const ie=K?Et/2:Et*4,me=K||P?l+ie:l-ie,pe=K?l-ie:P?l+ie:l-ie,be=c-Et,Ce=P||K?$.top+Et:$.bottom,Me=P?K?$.top+Et:$.bottom:$.top+Et;se=Xc(z,I,me,be,pe,be,$.left,Ce,$.right,Me);break}case"left":{const ie=Z?Et/2:Et*4,me=Z||q?c+ie:c-ie,pe=Z?c-ie:q?c+ie:c-ie,be=l+Et+1,Ce=q||Z?$.right-Et:$.left,Me=q?Z?$.right-Et:$.left:$.right-Et;se=Xc(z,I,Ce,$.top,Me,$.bottom,be,me,be,pe);break}case"right":{const ie=Z?Et/2:Et*4,me=Z||q?c+ie:c-ie,pe=Z?c-ie:q?c+ie:c-ie,be=l-Et,Ce=q||Z?$.left+Et:$.right,Me=q?Z?$.left+Et:$.right:$.left+Et;se=Xc(z,I,be,me,be,pe,Ce,$.top,Me,$.bottom);break}}se?S||a.start(40,H):H()}};return i.__options={...e,blockPointerEvents:o},i}const J2={...tf,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class ek extends Da{constructor(o,a,i){const l=new yl;super(tk(o,l,a,i),nk(l),J2)}setOpen=(o,a)=>{F2(this,o,a,{extraState:{openChangeReason:a.reason}})};cancelPendingOpen(o){this.state.floatingRootContext.dispatchOpenChange(!1,qe(os,o))}}function tk(e,o,a,i=!1){return{...ef(o,a,i),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function nk(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const ok=cl(function(o){const{disabled:a=!1,defaultOpen:i=!1,open:l,disableHoverablePopup:c=!1,trackCursorAxis:d="none",actionsRef:g,onOpenChange:m,onOpenChangeComplete:h,handle:y,triggerId:v,defaultTriggerId:S=null,children:w}=o,T=gm((D,M)=>new ek({open:i,openProp:l,activeTriggerId:S,triggerIdProp:v},D,M));T.useControlledProp("openProp",l),T.useControlledProp("triggerIdProp",v),T.useContextCallback("onOpenChange",m),T.useContextCallback("onOpenChangeComplete",h);const A=T.useState("open"),N=!a&&A,C=T.useState("activeTriggerId"),_=T.useState("mounted"),k=T.useState("payload");T.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:c,disabled:a}),Qu(T,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:j,transitionStatus:L}=Zu(N,T),z=T.useState("isInstantPhase"),I=T.useState("instantType"),U=T.useState("lastOpenChangeReason"),Y=b.useRef(null);we(()=>{A&&a&&T.setOpen(!1,qe(HA))},[A,a,T]),we(()=>{L==="ending"&&U===ns||L!=="ending"&&z?(I!=="delay"&&(Y.current=I),T.set("instantType","delay")):Y.current!==null&&(T.set("instantType",Y.current),Y.current=null)},[L,z,U,I,T]),we(()=>{N&&C==null&&T.set("payload",void 0)},[T,C,N]),b.useImperativeHandle(g,()=>({unmount:j,close:()=>T.setOpen(!1,qe(Bu))}),[j,T]);const B=N||_||!a&&d!=="none";return p.jsxs(fS.Provider,{value:T,children:[y&&p.jsx($u,{handle:y,store:T}),B&&p.jsx(sk,{store:T,disabled:a,trackCursorAxis:d}),typeof w=="function"?w({payload:k}):w]})});function sk({store:e,disabled:o,trackCursorAxis:a}){const i=e.useState("floatingRootContext"),l=ml(i,{enabled:!o,referencePress:()=>e.select("closeOnClick")}),c=VO(i,{enabled:!o&&a!=="none",axis:a==="none"?void 0:a}),d=b.useMemo(()=>oo(c.reference,l.reference),[c.reference,l.reference]);return Ju(e,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:l.floating??Ct}),null}function mo(e){return Gs(e,"base-ui")}const xw=b.createContext(void 0);function ak(){return b.useContext(xw)}const ik=600,Sw="data-base-ui-tooltip-trigger";function qx(e){if("composedPath"in e){const a=e.composedPath();for(let i=0;i<a.length;i+=1){const l=a[i];if(et(l))return l}}const o=e.target;return et(o)?o:null}function rk(e){let o=e;for(;o;){const a=o.closest(`[${Sw}]`);if(a)return a;const i=o.getRootNode();o="host"in i&&et(i.host)?i.host:null}return null}const lk=qh(function(o,a){const{render:i,className:l,style:c,handle:d,payload:g,disabled:m,delay:h,closeOnClick:y=!0,closeDelay:v,id:S,...w}=o,T=Au(!0),N=xm(d)??T;if(!N)throw new Error(kt(82));const C=mo(S),_=N.useState("isTriggerActive",C),k=N.useState("isOpenedByTrigger",C),j=N.useState("floatingRootContext"),L=b.useRef(null),z=v??0,{registerTrigger:I,isMountedByThisTrigger:U}=bm(C,L,N,{payload:g,closeOnClick:y,closeDelay:z}),Y=ak(),{activeIdRef:B,delayRef:D,isInstantPhase:M,hasProvider:H}=VA(j,{open:k}),ee=wm(j);N.useSyncedValue("isInstantPhase",M);const $=N.useState("disabled"),P=m??$,q=Vt(P),K=N.useState("trackCursorAxis"),Z=N.useState("disableHoverablePopup"),Q=b.useRef(!1),O=on(),F=b.useRef(void 0);function J(){return H&&B.current!=null?0:h??Y??ik}function W(ge){const Te=L.current;if(!Te||!ge)return!1;const Oe=rk(ge);return Oe!==null&&Oe!==Te&&De(Te,Oe)}function se(ge){const Te=W(ge);return Q.current=Te,Te&&(ee.openChangeTimeout.clear(),ee.restTimeout.clear(),ee.restTimeoutPending=!1,O.clear()),Te}const ie=nf(j,{enabled:!P,mouseOnly:!0,move:!1,handleClose:!Z&&K!=="both"?sf():null,restMs:J,delay(){return v==null&&H?{close:Aa(D.current,"close")}:{close:z}},triggerElementRef:L,isActiveTrigger:_,isClosing:()=>N.select("transitionStatus")==="ending",shouldOpen(){return!Q.current}}),me=gw(j,{enabled:!P}).reference,pe=ge=>{const Te=Q.current,Oe=qx(ge),Be=se(Oe),Ee=L.current,Pe=Ee&&Oe&&De(Ee,Oe);if(Be&&N.select("open")&&N.select("lastOpenChangeReason")===Ft){N.setOpen(!1,qe(Ft,ge));return}if(Te&&!Be&&Pe&&!q.current&&!N.select("open")&&Ee&&Bs(F.current)){const Se=()=>{!Q.current&&!q.current&&!N.select("open")&&N.setOpen(!0,qe(Ft,ge,Ee))},Re=J();Re===0?(O.clear(),Se()):O.start(Re,Se)}},be=N.useState("triggerProps",U);return nt("button",o,{state:{open:k},ref:[a,I,L],props:[ie,me,U||K!=="none"?be:void 0,{onMouseOver(ge){pe(ge.nativeEvent)},onFocus(ge){W(qx(ge.nativeEvent))&&ge.preventBaseUIHandler()},onMouseLeave(){Q.current=!1,O.clear(),F.current=void 0},onPointerEnter(ge){F.current=ge.pointerType},onPointerDown(ge){F.current=ge.pointerType,N.set("closeOnClick",y),y&&!N.select("open")&&N.cancelPendingOpen(ge.nativeEvent)},onClick(ge){y&&!N.select("open")&&N.cancelPendingOpen(ge.nativeEvent)},id:C,[yh]:P?"":void 0,[Sw]:P?void 0:""},w],stateAttributesMapping:Lu})}),ww=b.createContext(void 0);function ck(){const e=b.useContext(ww);if(e===void 0)throw new Error(kt(70));return e}const Tw=b.forwardRef(function(o,a){const{children:i,container:l,className:c,render:d,style:g,...m}=o,{node:h,subtree:y}=$S({container:l,ref:a,componentProps:o,elementProps:m});return!y&&!h?null:p.jsxs(b.Fragment,{children:[y,h&&so.createPortal(i,h)]})}),uk=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o;return Au().useState("mounted")||i?p.jsx(ww.Provider,{value:i,children:p.jsx(Tw,{ref:a,...l})}):null}),Ew=b.createContext(void 0);function fk(){const e=b.useContext(Ew);if(e===void 0)throw new Error(kt(71));return e}const dk=b.createContext(void 0);function af(){return b.useContext(dk)?.direction??"ltr"}const pk=e=>({name:"arrow",options:e,async fn(o){const{x:a,y:i,placement:l,rects:c,platform:d,elements:g,middlewareData:m}=o,{element:h,padding:y=0,offsetParent:v="real"}=Ys(e,o)||{};if(h==null)return{};const S=AS(y),w={x:a,y:i},T=nm(l),A=tm(T),N=await d.getDimensions(h),C=T==="y",_=C?"top":"left",k=C?"bottom":"right",j=C?"clientHeight":"clientWidth",L=c.reference[A]+c.reference[T]-w[T]-c.floating[A],z=w[T]-c.reference[T],I=v==="real"?await d.getOffsetParent?.(h):g.floating;let U=g.floating[j]||c.floating[A];(!U||!await d.isElement?.(I))&&(U=g.floating[j]||c.floating[A]);const Y=L/2-z/2,B=U/2-N[A]/2-1,D=Math.min(S[_],B),M=Math.min(S[k],B),H=D,ee=U-N[A]-M,$=U/2-N[A]/2+Y,P=RS(H,$,ee),q=!m.arrow&&is(l)!=null&&$!==P&&c.reference[A]/2-($<H?D:M)-N[A]/2<0,K=q?$<H?$-H:$-ee:0;return{[T]:w[T]+K,data:{[T]:P,centerOffset:$-P-K,...q&&{alignmentOffset:K}},reset:q}}}),hk=(e,o)=>{const{name:a,fn:i}=pk(e);return{name:a,fn:i,options:[e,o]}},mk={name:"hide",async fn(e){const{width:o,height:a,x:i,y:l}=e.rects.reference,c=o===0&&a===0&&i===0&&l===0,d=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:d.top-a>=0||d.right-o>=0||d.bottom-a>=0||d.left-o>=0||c}}}},gk={sideX:"left",sideY:"top"},yk="--available-width",bk="--available-height",vk="--anchor-width",xk="--anchor-height",Sk="--transform-origin",Gx=yk,Xx=bk;function Cw(e,o,a){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?a?"inline-start":"inline-end":"right",bottom:"bottom",left:i?a?"inline-end":"inline-start":"left"}[o]}function Kx(e,o,a){const{rects:i,placement:l}=e;return{side:Cw(o,no(l),a),align:is(l)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function rf(e){return wk(e,q2)}function wk(e,o){const{anchor:a,positionMethod:i="absolute",side:l="bottom",sideOffset:c=0,align:d="center",alignOffset:g=0,collisionBoundary:m,collisionPadding:h=5,sticky:y=!1,arrowPadding:v=5,disableAnchorTracking:S=!1,inline:w,keepMounted:T=!1,floatingRootContext:A,mounted:N,collisionAvoidance:C,shift:_,nodeId:k,adaptiveOrigin:j,lazyFlip:L=!1,externalTree:z}=e,[I,U]=b.useState(null);!N&&I!==null&&U(null);const Y=C.side||"flip",B=C.align||"flip",D=C.fallbackAxisSide||"end",M=_?.crossAxis??!1,H=_?.rootBoundary,ee=typeof a=="function"?a:void 0,$=Ne(ee),P=ee?$:a,q=Vt(a),K=Vt(N),Q=af()==="rtl",O=I||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Q?"left":"right","inline-start":Q?"right":"left"}[l],F=d==="center"?O:`${O}-${d}`;let J=h;typeof J=="number"?J={top:J,right:J,bottom:J,left:J}:J&&(J={top:J.top||0,right:J.right||0,bottom:J.bottom||0,left:J.left||0});const W=1,se=l==="bottom"?W:0,ie=l==="top"?W:0,me=l==="right"?W:0,pe=l==="left"?W:0,be={boundary:m==="clipping-ancestors"?"clippingAncestors":m,padding:J},Ce=b.useRef(null),Me=Vt(c),ye=Vt(g),ge=typeof c!="function"?c:0,Te=typeof g!="function"?g:0,Oe=[];w&&Oe.push(w),Oe.push(C2(Ve=>{const ft=Kx(Ve,l,Q),Dt=typeof Me.current=="function"?Me.current(ft):Me.current,It=typeof ye.current=="function"?ye.current(ft):ye.current;return{mainAxis:Dt,crossAxis:It,alignmentAxis:It}},[ge,Te,Q,l]));const Be=B==="none"&&Y!=="shift",Ee=!Be&&(y||M||Y==="shift"),Pe=Y==="none"?null:O2({...be,padding:{top:J.top+W+se,right:J.right+W+pe,bottom:J.bottom+W+ie,left:J.left+W+me},mainAxis:!M&&Y==="flip",crossAxis:B==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),Se=Be?null:R2({...be,rootBoundary:H,mainAxis:B!=="none",crossAxis:Ee,limiter:y||M?void 0:A2(Ve=>{if(!Ce.current)return{};const{width:ft,height:Dt}=Ce.current.getBoundingClientRect(),It=to(no(Ve.placement)),jn=It==="y"?ft:Dt,ln=It==="y"?J.left+J.right:J.top+J.bottom;return{offset:jn/2+ln/2}})},[be,y,M,H,J,B]);Y==="shift"||B==="shift"||d==="center"?Oe.push(Se,Pe):Oe.push(Pe,Se),Oe.push(k2({...be,apply({elements:{floating:Ve},availableWidth:ft,availableHeight:Dt,rects:It}){if(!K.current)return;const jn=Ve.style;jn.setProperty(Gx,`${ft}px`),jn.setProperty(Xx,`${Dt}px`);const ln=Rt(Ve).devicePixelRatio||1,{x:yo,y:Sn,width:Ro,height:_n}=It.reference,Ze=(Math.round((yo+Ro)*ln)-Math.round(yo*ln))/ln,At=(Math.round((Sn+_n)*ln)-Math.round(Sn*ln))/ln;jn.setProperty(vk,`${Ze}px`),jn.setProperty(xk,`${At}px`)}}),hk(Ve=>({element:Ce.current||We(Ve.elements.floating).createElement("div"),padding:Ce.current?v:0,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(Ve){const{elements:{floating:ft},middlewareData:Dt,placement:It,platform:jn,rects:ln,y:yo}=Ve,Sn=no(It),Ro=is(It),_n=to(Sn)==="y",Ze=Ce.current,At=typeof c=="function"?c(Kx(Ve,l,Q)):c;let Dn;if(!Ze&&Ro&&Math.abs(_n?Dt.shift?.x||0:Dt.shift?.y||0)<=1)Dn=Ro==="start"===(_n&&jn.isRTL?.(ft)===!0)?"100%":"0%";else{const bo=_n?Dt.arrow?.x||0:Dt.arrow?.y||0,ps=_n?Ze?.clientWidth||0:Ze?.clientHeight||0;Dn=`${bo+ps/2}px`}let io=Sn==="top"||Sn==="left"?`calc(100% + ${At}px)`:`${-At}px`;return Ee&&_n&&Math.abs(Dt.shift?.y||0)>At&&(io=`${ln.reference.y+ln.reference.height/2-yo}px`),ft.style.setProperty(Sk,_n?`${Dn} ${io}`:`${io} ${Dn}`),{}}},mk,j),we(()=>{!N&&A&&A.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[N,A]);const Re=b.useMemo(()=>({ancestorScroll:!S,elementResize:!S&&typeof ResizeObserver<"u",layoutShift:!S&&typeof IntersectionObserver<"u"}),[S]),{refs:ke,elements:Ie,x:je,y:le,middlewareData:ve,update:he,placement:ce,context:xe,isPositioned:He,floatingStyles:Lt}=o({rootContext:A,open:T?N:void 0,placement:F,middleware:Oe,strategy:i,whileElementsMounted:T?void 0:(...Ve)=>zx(...Ve,Re),nodeId:k,externalTree:z}),{sideX:Yt,sideY:ut}=ve.adaptiveOrigin||gk,Ae=He?i:"fixed",Ye=b.useMemo(()=>{let Ve;return He?j?Ve={position:Ae,[Yt]:je,[ut]:le}:Ve={...Lt,position:Ae}:Ve={position:Ae,top:0,left:0},Ve[Gx]="100vw",Ve[Xx]="100vh",He||(Ve.opacity=0),Ve},[j,Ae,Yt,je,ut,le,Lt,He]),Qe=b.useRef(null);we(()=>{if(!N)return;const Ve=q.current,ft=typeof Ve=="function"?Ve():Ve,It=($x(ft)?ft.current:ft)||null||null;It!==Qe.current&&(ke.setPositionReference(It),Qe.current=It)},[N,ke,P,q]),b.useEffect(()=>{if(!N)return;const Ve=q.current;typeof Ve!="function"&&$x(Ve)&&Ve.current!==Qe.current&&(ke.setPositionReference(Ve.current),Qe.current=Ve.current)},[N,ke,P,q]),b.useEffect(()=>{if(T&&N&&Ie.reference&&Ie.floating)return zx(Ie.reference,Ie.floating,he,Re)},[T,N,Ie,he,Re]);const ct=no(ce),en=Cw(l,ct,Q),rn=is(ce)||"center",hn=!!ve.hide?.referenceHidden;we(()=>{L&&N&&He&&ct!==O&&U(ct)},[L,N,He,ct,O]);const xt=b.useMemo(()=>({position:"absolute",top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),_t=ve.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:Ye,arrowStyles:xt,arrowRef:Ce,arrowUncentered:_t,side:en,align:rn,physicalSide:ct,anchorHidden:hn,refs:ke,context:xe,isPositioned:He,update:he}),[Ye,xt,Ce,_t,en,rn,ct,hn,ke,xe,He,he])}function $x(e){return e!=null&&"current"in e}function bl(e){return e==="starting"?_O:Ct}function lf(e,o,{styles:a,transitionStatus:i,props:l,refs:c,hidden:d,inert:g=!1}){const m={...a};return g&&(m.pointerEvents="none"),nt("div",e,{state:o,ref:c,props:[{role:"presentation",hidden:d,style:m},bl(i),l],stateAttributesMapping:dl})}const Tk=b.forwardRef(function(o,a){const{render:i,className:l,anchor:c,positionMethod:d="absolute",side:g="top",align:m="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:A=!1,collisionAvoidance:N=lm,style:C,..._}=o,k=Au(),j=ck(),L=k.useState("open"),z=k.useState("mounted"),I=k.useState("trackCursorAxis"),U=k.useState("disableHoverablePopup"),Y=k.useState("floatingRootContext"),B=k.useState("instantType"),D=k.useState("transitionStatus"),M=k.useState("adaptiveOrigin"),H=rf({anchor:c,positionMethod:d,floatingRootContext:Y,mounted:z,side:g,sideOffset:h,align:m,alignOffset:y,collisionBoundary:v,collisionPadding:S,sticky:T,arrowPadding:w,disableAnchorTracking:A,keepMounted:j,collisionAvoidance:N,adaptiveOrigin:M}),ee=b.useMemo(()=>({open:L,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:I!=="none"?"tracking-cursor":B}),[L,H.side,H.align,H.anchorHidden,I,B]),$=lf(o,ee,{styles:H.positionerStyles,transitionStatus:D,props:_,refs:[a,k.useStateSetter("positionerElement")],hidden:!z,inert:!L||I==="both"||U});return p.jsx(Ew.Provider,{value:H,children:$})}),Ek=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,g=Au(),{side:m,align:h}=fk(),y=g.useState("open"),v=g.useState("instantType"),S=g.useState("transitionStatus"),w=g.useState("popupProps"),T=g.useState("floatingRootContext"),A=g.useState("disabled"),N=g.useState("closeDelay");fs({open:y,ref:g.context.popupRef,onComplete(){y&&g.context.onOpenChangeComplete?.(!0)}}),Tm(T,{enabled:!A,closeDelay:N});const C=g.useStateSetter("popupElement");return nt("div",o,{state:{open:y,side:m,align:h,instant:v,transitionStatus:S},ref:[a,g.context.popupRef,C],props:[gl,w,bl(S),d],stateAttributesMapping:Iu})}),Ck=function(o){const{delay:a,closeDelay:i,timeout:l=400}=o,c=b.useMemo(()=>({open:a,close:i}),[a,i]);return p.jsx(xw.Provider,{value:a,children:p.jsx(FA,{delay:c,timeoutMs:l,children:o.children})})};function vl(e){return am(19)?e:e?"true":void 0}function Rk(e){const[o,a]=b.useState({current:e,previous:null});return Object.is(e,o.current)||a({current:e,previous:o.current}),o.previous}function Rw({label:e,shortcut:o,side:a="bottom",children:i}){return p.jsxs(ok,{children:[p.jsx(lk,{render:i}),p.jsx(uk,{children:p.jsx(Tk,{side:a,sideOffset:6,className:"z-[1000]",children:p.jsxs(Ek,{className:"rounded-md bg-fg px-2 py-1 text-xs text-surface shadow-popup data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity",children:[e,o?p.jsx("span",{className:"ml-2 opacity-60",children:o}):null]})})})]})}function Ak({children:e}){return p.jsx(Ck,{delay:500,closeDelay:0,children:e})}function Ok(e){return e.repeat&&(e.key==="Enter"||e.key===" ")}function Mi(e){Ok(e)&&e.target===e.currentTarget&&e.preventDefault()}function Aw(e){return e?o=>{Mi(o),e(o)}:Mi}const kk=200,Nk=2e3;function Mk(e,o,a){let i=null,l=!1;const c=()=>{l||(l=!0,e.removeEventListener("keydown",d,!0),e.removeEventListener("keyup",d,!0),e.clearTimeout(g),i!==null&&e.clearTimeout(i))},d=m=>{const h=m.key==="Enter"||m.key===" ";if(m.type==="keyup"){m.key===" "&&!a(m.target)&&m.preventDefault(),m.key===o&&i===null&&(i=e.setTimeout(c,kk));return}h&&!a(m.target)&&(m.preventDefault(),m.stopImmediatePropagation())},g=e.setTimeout(c,Nk);return e.addEventListener("keydown",d,!0),e.addEventListener("keyup",d,!0),c}const jk={primary:"bg-accent text-accent-fg hover:brightness-110 active:brightness-95",secondary:"bg-surface text-fg border border-line hover:bg-hover",ghost:"bg-transparent text-fg hover:bg-hover",danger:"bg-danger text-white hover:brightness-110"},_k={sm:"h-6 px-2 text-xs gap-1",md:"h-7 px-2.5 text-[13px] gap-1.5",lg:"h-8 px-3 text-[13px] gap-2"},tt=b.forwardRef(function({variant:o="secondary",size:a="md",icon:i,className:l,children:c,type:d="button",onKeyDown:g,...m},h){return p.jsxs("button",{ref:h,type:d,className:lt("inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-control font-medium transition-[background,filter]","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-45",jk[o],_k[a],l),...m,onKeyDown:Aw(g),children:[i,c]})}),Dk={sm:"size-6",md:"size-7",lg:"size-8"},za=b.forwardRef(function({label:o,icon:a,shortcut:i,active:l,size:c="md",noTooltip:d,className:g,type:m="button",onKeyDown:h,...y},v){const S=p.jsx("button",{ref:v,type:m,"aria-label":o,"aria-pressed":l===void 0?void 0:l,className:lt("inline-flex shrink-0 items-center justify-center rounded-control text-fg-muted transition-colors","hover:bg-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-40",l&&"bg-accent-soft text-accent hover:bg-accent-soft hover:text-accent",Dk[c],g),...y,onKeyDown:Aw(h),children:a});return d?S:p.jsx(Rw,{label:o,shortcut:i,children:S})}),Ow=b.createContext(void 0);function Em(e){const o=b.useContext(Ow);if(o===void 0&&!e)throw new Error(kt(33));return o}const kw=b.createContext(void 0);function $s(e){const o=b.useContext(kw);if(o===void 0&&!e)throw new Error(kt(36));return o}const zk=b.createContext(void 0);function Cm(e=!0){const o=b.useContext(zk);if(o===void 0&&!e)throw new Error(kt(25));return o}function el({controlled:e,default:o,name:a,state:i="value"}){const{current:l}=b.useRef(e!==void 0),[c,d]=b.useState(o),g=l&&e!==void 0?e:c,m=b.useCallback(h=>{l||d(h)},[]);return[g,m]}const Nw=b.createContext(void 0);function Rm(e=!1){const o=b.useContext(Nw);if(o===void 0&&!e)throw new Error(kt(16));return o}function Pk(e){const{focusableWhenDisabled:o,disabled:a,composite:i=!1,tabIndex:l=0,isNativeButton:c}=e,d=i&&o!==!1,g=i&&o===!1;return{props:b.useMemo(()=>{const h={onKeyDown(y){a&&o&&y.key!=="Tab"&&y.preventDefault()}};return i||(h.tabIndex=l,!c&&a&&(h.tabIndex=o?l:-1)),(c&&(o||d)||!c&&a)&&(h["aria-disabled"]=a),c&&(!o||g)&&(h.disabled=a),h},[i,a,o,d,g,c,l])}}function Xr(e,o,{detail:a=0}={}){e.dispatchEvent(new(Rt(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:a,shiftKey:o.shiftKey,ctrlKey:o.ctrlKey,altKey:o.altKey,metaKey:o.metaKey}))}function Co(e={}){const{disabled:o=!1,focusableWhenDisabled:a,tabIndex:i=0,native:l=!0,composite:c}=e,d=b.useRef(null),g=Rm(!0),m=c??g!==void 0,{props:h}=Pk({focusableWhenDisabled:a,disabled:o,composite:m,tabIndex:i,isNativeButton:l}),y=b.useCallback(()=>{const w=d.current;Zp(w)&&m&&o&&h.disabled===void 0&&w.disabled&&(w.disabled=!1)},[o,h.disabled,m]);we(y,[y]);const v=b.useCallback((w={})=>{const{onClick:T,onMouseDown:A,onKeyUp:N,onKeyDown:C,onPointerDown:_,...k}=w;return oo({onClick(j){if(o){j.preventDefault();return}T?.(j)},onMouseDown(j){o||A?.(j)},onKeyDown(j){if(o||(hu(j),C?.(j),j.baseUIHandlerPrevented))return;const L=j.target===j.currentTarget,z=j.currentTarget,I=Zp(z),U=!l&&Lk(z),Y=L&&(l?I:!U),B=j.key==="Enter",D=j.key===" ",M=z.getAttribute("role"),H=M?.startsWith("menuitem")||M==="option"||M==="gridcell";if(L&&m&&D){if(j.defaultPrevented&&H)return;j.preventDefault(),(!l||I)&&(j.preventBaseUIHandler(),Xr(z,j));return}if(!Y||l||!D&&!B){L&&U&&D&&j.preventDefault();return}j.defaultPrevented||(j.preventDefault(),B&&(j.preventBaseUIHandler(),Xr(z,j)))},onKeyUp(j){if(!o){if(hu(j),N?.(j),j.target===j.currentTarget&&l&&m&&Zp(j.currentTarget)&&j.key===" "){j.preventDefault();return}j.baseUIHandlerPrevented||j.target===j.currentTarget&&!l&&!m&&!j.defaultPrevented&&j.key===" "&&(j.preventBaseUIHandler(),Xr(j.currentTarget,j))}},onPointerDown(j){if(o){j.preventDefault();return}_?.(j)}},l?{type:"button"}:{role:"button"},h,k)},[o,h,m,l]),S=Ne(w=>{d.current=w,y()});return{getButtonProps:v,buttonRef:S}}function Zp(e){return vt(e)&&e.tagName==="BUTTON"}function Lk(e){return vt(e)&&e.tagName==="A"&&!!e.href}function Ik(e){const{closeOnClick:o,highlighted:a,id:i,nodeId:l,store:c,typingRef:d,itemRef:g,itemMetadata:m}=e,{events:h}=c.useState("floatingTreeRoot"),y=c.useState("open"),v=Cm(!0),S=v!==void 0;return b.useMemo(()=>({id:i,role:"menuitem",tabIndex:y&&a?0:-1,onKeyDown(w){w.key===" "&&d?.current&&w.preventDefault()},onMouseMove(w){l&&h.emit("itemhover",{nodeId:l,target:w.currentTarget})},onClick(w){o&&h.emit("close",{domEvent:w,reason:Yr})},onMouseUp(w){if(v){const T=v.initialCursorPointRef.current;if(v.initialCursorPointRef.current=null,S&&T&&Math.abs(w.clientX-T.x)<=1&&Math.abs(w.clientY-T.y)<=1||S&&!Gh&&w.button===2)return}g.current&&c.context.allowMouseUpTriggerRef.current&&(!S||w.button===2)&&m.type==="regular-item"&&Xr(g.current,w,{detail:1})}}),[o,a,i,h,l,y,c,d,g,v,S,m])}const Hk={type:"regular-item"};function Mw(e){const{closeOnClick:o,disabled:a,highlighted:i,id:l,store:c,typingRef:d=c.context.typingRef,nativeButton:g,itemMetadata:m,nodeId:h}=e,y=b.useRef(null),{getButtonProps:v,buttonRef:S}=Co({disabled:a,focusableWhenDisabled:!0,native:g,composite:!0}),w=Ik({closeOnClick:o,highlighted:i,id:l,nodeId:h,store:c,typingRef:d,itemRef:y,itemMetadata:m}),T=b.useCallback(N=>oo(w,{onMouseEnter(){m.type==="submenu-trigger"&&m.setActive()}},N,v),[w,v,m]),A=ss(y,S);return b.useMemo(()=>({getItemProps:T,itemRef:A}),[T,A])}const jw=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Uk(){return b.useContext(jw)}function cf(e={}){const{guess:o,label:a,metadata:i,textRef:l,index:c}=e,{register:d,unregister:g,subscribeMapChange:m,nextIndexRef:h}=Uk(),y=b.useRef(-1),[v,S]=b.useState(c==null&&o?()=>{if(y.current===-1){const N=h.current;h.current+=1,y.current=N}return y.current}:-1),w=c??v,T=b.useRef(null),A=b.useCallback(N=>{const C=T.current;C&&g(C),T.current=N,N&&d(N,{metadata:i??null,index:c??null,label:a,textRef:l})},[c,d,g,i,a,l]);return we(()=>{if(c==null)return m(N=>{const C=T.current?N.get(T.current)?.index:null;C!=null&&S(C)})},[c,m]),{ref:A,index:w}}const _w=b.forwardRef(function(o,a){const{render:i,className:l,id:c,label:d,nativeButton:g=!1,disabled:m=!1,closeOnClick:h=!0,style:y,...v}=o,S=cf({guess:!0,label:d}),w=Em(!0),T=mo(c),{store:A}=$s(),N=A.useState("disabled"),C=m||N,_=A.useState("isActive",S.index),k=A.useState("itemProps"),{getItemProps:j,itemRef:L}=Mw({closeOnClick:h,disabled:C,highlighted:_,id:T,store:A,nativeButton:g,nodeId:w?.context.nodeId,itemMetadata:Hk});return nt("div",o,{state:{disabled:C,highlighted:_},props:[k,v,j],ref:[L,a,S.ref]})}),Bk=b.createContext(void 0);function uf(e){return b.useContext(Bk)}const Eh="ArrowUp",Ch="ArrowDown",Rh="ArrowLeft",Ah="ArrowRight",Oh="Home",kh="End",xl=new Set([Eh,Ch,Rh,Ah,Oh,kh]),Fk="Shift",Vk=[Fk,"Control","Alt","Meta"];function Yk(e){return vt(e)&&e.tagName==="INPUT"}function Wx(e){return!!(Yk(e)&&e.selectionStart!=null||vt(e)&&e.tagName==="TEXTAREA")}function Qx(e,o,a,i){if(!e||!o||!o.scrollTo)return;let l=e.scrollLeft,c=e.scrollTop;const d=e.clientWidth<e.scrollWidth,g=e.clientHeight<e.scrollHeight;if(d&&i!=="vertical"){const m=Zx(e,o,"left"),h=$c(e),y=$c(o);a==="ltr"&&(m+o.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?l=m+o.offsetWidth+y.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:m-y.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(l=m-y.scrollMarginLeft-h.scrollPaddingLeft)),a==="rtl"&&(m-y.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft?l=m-y.scrollMarginLeft-h.scrollPaddingLeft:m+o.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(l=m+o.offsetWidth+y.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(g&&i!=="horizontal"){const m=Zx(e,o,"top"),h=$c(e),y=$c(o);m-y.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?c=m-y.scrollMarginTop-h.scrollPaddingTop:m+o.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(c=m+o.offsetHeight+y.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:l,top:c,behavior:"auto"})}function Zx(e,o,a){const i=a==="left"?"offsetLeft":"offsetTop";let l=0;for(;o.offsetParent&&(l+=o[i],o.offsetParent!==e);)o=o.offsetParent;return l}function $c(e){const o=getComputedStyle(e);return{scrollMarginTop:parseFloat(o.scrollMarginTop)||0,scrollMarginRight:parseFloat(o.scrollMarginRight)||0,scrollMarginBottom:parseFloat(o.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(o.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(o.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(o.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(o.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(o.scrollPaddingLeft)||0}}const Am=b.forwardRef(function(o,a){const{render:i,className:l,style:c,finalFocus:d,...g}=o,{store:m}=$s(),{side:h,align:y}=Em(),v=uf()!=null,S=m.useState("open"),w=m.useState("transitionStatus"),T=m.useState("popupProps"),A=m.useState("mounted"),N=m.useState("instantType"),C=m.useState("activeTriggerElement"),_=m.useState("parent"),k=m.useState("lastOpenChangeReason"),j=m.useState("rootId"),L=m.useState("floatingRootContext"),z=m.useState("floatingTreeRoot"),I=m.useState("closeDelay"),U=m.useState("hoverEnabled"),Y=m.useState("disabled"),B=m.useState("openMethod"),D=_.type==="context-menu";fs({open:S,ref:m.context.popupRef,onComplete(){S&&m.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function P(q){m.setOpen(!1,qe(q.reason,q.domEvent))}return z.events.on("close",P),()=>{z.events.off("close",P)}},[z.events,m]),Tm(L,{enabled:U&&!Y&&!D&&_.type!=="menubar",closeDelay:I});const M=m.useStateSetter("popupElement"),H={transitionStatus:w,side:h,align:y,open:S,nested:_.type==="menu",instant:N},ee=nt("div",o,{state:H,ref:[a,m.context.popupRef,M],stateAttributesMapping:Iu,props:[T,{onKeyDown(P){v&&xl.has(P.key)&&P.stopPropagation()}},bl(w),g,{"data-rootownerid":j}]});let $=_.type===void 0||D;return(C||_.type==="menubar"&&k!==Uu)&&($=!0),p.jsx(qu,{context:L,openInteractionType:B,modal:D,disabled:!A,returnFocus:d===void 0?$:d,initialFocus:_.type!=="menu",restoreFocus:!0,externalTree:_.type!=="menubar"?z:void 0,previousFocusableElement:C,nextFocusableElement:_.type===void 0?m.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?m.context.beforeContentFocusGuardRef:void 0,children:ee})}),Dw=b.createContext(void 0);function qk(){const e=b.useContext(Dw);if(e===void 0)throw new Error(kt(32));return e}const Om=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o,{store:c,parent:d}=$s();if(!(c.useState("mounted")||i))return null;const h=d.type==="menu"||d.type==="menubar"?"group":void 0;return p.jsx(Dw.Provider,{value:i,children:p.jsx(Yu,{ref:a,...l,portalOwnerRole:h})})});function km(e){const{children:o,elementsRef:a,labelsRef:i,onMapChange:l}=e,c=Ne(l),[,d]=b.useState(!1),g=Zt(Xk).current,m=Zt(Gk).current,h=b.useRef(0),y=b.useRef(!0),v=b.useRef(null),S=b.useRef(null),w=Ne(()=>{y.current||(y.current=!0,d(L=>!L))}),T=Ne((L,z)=>{m.set(L,z),w()}),A=Ne(L=>{m.delete(L),w()}),N=Ne(L=>{const z=new Map;return a.current.length=0,i&&(i.current.length=0),L.forEach(I=>{z.set(I.element,{...I.registration.metadata??{},index:I.index}),a.current[I.index]=I.element,i&&(i.current[I.index]=I.registration.label!==void 0?I.registration.label:I.registration.textRef?.current?.textContent??I.element.textContent)}),h.current=a.current.length,z});function C(L){if(S.current?.disconnect(),S.current=null,typeof MutationObserver!="function"||L.length<2)return;const z=new MutationObserver(U=>{if(!Wk(U))return;let Y=null;for(const B of L)if(B.isConnected){if(Y&&zw(Y,B)>0){z.disconnect(),w();return}Y=B}});S.current=z;const I=new Set;for(let U=1;U<L.length;U+=1){const Y=$k(L[U-1],L[U]);Y&&I.add(Y)}I.forEach(U=>z.observe(U,{childList:!0}))}const _=Ne(()=>{const[L,z]=Kk(m),I=N(L),U=v.current,Y=!U||U.length!==L.length||L.some((B,D)=>{const M=U[D];return B.index!==M.index||B.element!==M.element||B.registration.index!==M.registration.index||B.registration.metadata!==M.registration.metadata});C(z),v.current=L,y.current=!1,Y&&(g.forEach(B=>B(I)),c(I))});we(()=>(!y.current&&v.current&&N(v.current),()=>{a.current=[],i&&(i.current=[])}),[a,i,N]),we(()=>{y.current&&_()}),we(()=>()=>{S.current?.disconnect(),y.current=!0},[]);const k=Ne(L=>(g.add(L),()=>{g.delete(L)})),j=b.useMemo(()=>({register:T,unregister:A,subscribeMapChange:k,nextIndexRef:h}),[T,A,k,h]);return p.jsx(jw.Provider,{value:j,children:o})}function Gk(){return new Map}function Xk(){return new Set}function Kk(e){const o=new Set,a=[],i=[];e.forEach((c,d)=>{if(!d.isConnected)return;const g=c.index,m={index:g??-1,element:d,registration:c};g===null?i.push(m):g>=0&&(o.add(g),a.push(m))});let l=0;return i.sort((c,d)=>zw(c.element,d.element)),i.forEach(c=>{for(;o.has(l);)l+=1;c.index=l,a.push(c),l+=1}),o.size>0&&a.sort((c,d)=>c.index-d.index),[a,i.map(c=>c.element)]}function $k(e,o){let a=e.parentElement;for(;a&&!a.contains(o);)a=a.parentElement;return a}function Wk(e){for(const o of e)for(let a=0;a<o.removedNodes.length;a+=1)if(o.removedNodes[a].isConnected)return!0;return!1}function zw(e,o){return e.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const ff=b.forwardRef(function(o,a){const{cutout:i,...l}=o;let c;if(i){const d=i.getBoundingClientRect();c=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return p.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...l,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})});let Jx={},e0={},t0="";function df(e,o){return ul(e)?e:o}function n0(e,o,a){return/hidden|clip/.test(e.getComputedStyle(df(o,a)).overflowY)}function Qk(e){if(typeof document>"u")return!1;const o=We(e);return Rt(o).innerWidth-o.documentElement.clientWidth>0}function Zk(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const a=We(e),i=a.documentElement,l=a.body,c=df(i,l),d=c.style.overflowY,g=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",c.style.overflowY="scroll";const m=c.offsetWidth;c.style.overflowY="hidden";const h=c.offsetWidth;return c.style.overflowY=d,i.style.scrollbarGutter=g,m===h}function Jk(e){const o=We(e),a=o.documentElement,i=o.body,l=df(a,i),c={overflowY:l.style.overflowY,overflowX:l.style.overflowX};return Object.assign(l.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(l.style,c)}}function eN(e){const o=We(e),a=o.documentElement,i=o.body,l=Rt(a);let c=0,d=0,g=!1;const m=Eo.create();if(cs&&(l.visualViewport?.scale??1)!==1)return()=>{};function h(){const w=l.getComputedStyle(a),T=l.getComputedStyle(i),C=(w.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=a.scrollTop,d=a.scrollLeft,Jx={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},t0=a.style.scrollBehavior,e0={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const _=a.scrollHeight>a.clientHeight,k=a.scrollWidth>a.clientWidth,j=w.overflowY==="scroll"||T.overflowY==="scroll",L=w.overflowX==="scroll"||T.overflowX==="scroll",z=Math.max(0,l.innerWidth-i.clientWidth),I=Math.max(0,l.innerHeight-i.clientHeight),U=parseFloat(T.marginTop)+parseFloat(T.marginBottom),Y=parseFloat(T.marginLeft)+parseFloat(T.marginRight),B=df(a,i);if(g=Zk(e),g){a.style.scrollbarGutter=C,B.style.overflowY="hidden",B.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(_||j)&&(a.style.overflowY="scroll"),(k||L)&&(a.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:U||I?`calc(100dvh - ${U+I}px)`:"100dvh",width:Y||z?`calc(100vw - ${Y+z}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=c,i.scrollLeft=d,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,Jx),Object.assign(i.style,e0),g||(a.scrollTop=c,a.scrollLeft=d,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=t0)}function v(){y(),m.request(h)}h();const S=Ge(l,"resize",v);return()=>{m.cancel(),y(),typeof l.removeEventListener=="function"&&S()}}class tN{lockCount=0;restore=null;timeoutLock=Mn.create();timeoutUnlock=Mn.create();acquire(o){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(o)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(o){if(this.lockCount===0||this.restore!==null)return;const a=We(o),i=a.documentElement,l=a.body,c=Rt(i);if(n0(c,i,l)){const g=new c.MutationObserver(()=>{n0(c,i,l)||(g.disconnect(),this.restore=null,this.lock(o))}),m={attributes:!0};g.observe(i,m),g.observe(l,m),this.restore=()=>g.disconnect();return}const d=Nu||!Qk(o);this.restore=d?Jk(o):eN(o)}}const nN=new tN;function Pw(e=!0,o=null){we(()=>{if(e)return nN.acquire(o)},[e,o])}const oN=20;function Nm(e,o,a,i){const[l,c]=b.useState(!1);we(()=>{if(!e||!o||a==null){c(!1);return}const d=We(a).documentElement.clientWidth,g=a.offsetWidth;c(d>0&&g>0&&g>=d-oN)},[e,o,a]),Pw(e&&(!o||l),i)}const Mm=b.forwardRef(function(o,a){const{anchor:i,positionMethod:l="absolute",className:c,render:d,side:g,align:m,sideOffset:h=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:A=!1,collisionAvoidance:N=GS,style:C,..._}=o,{store:k}=$s(),j=qk(),L=Cm(!0),z=k.useState("parent"),I=k.useState("floatingRootContext"),U=k.useState("floatingTreeRoot"),Y=k.useState("mounted"),B=k.useState("open"),D=k.useState("modal"),M=k.useState("openMethod"),H=k.useState("activeTriggerElement"),ee=k.useState("transitionStatus"),$=k.useState("positionerElement"),P=k.useState("instantType"),q=k.useState("adaptiveOrigin"),K=k.useState("lastOpenChangeReason"),Z=k.useState("floatingNodeId"),Q=k.useState("floatingParentNodeId"),O=I.useState("domReferenceElement"),F=b.useRef(null),J=Ku($);let W=i,se=h,ie=y,me=m,pe=N;z.type==="context-menu"&&(W=i??z.context?.anchor,me=me??"start",!g&&me!=="center"&&(ie=o.alignOffset??2,se=o.sideOffset??-5));let be=g,Ce=me;z.type==="menu"?(be=be??"inline-end",Ce=Ce??"start",pe=o.collisionAvoidance??lm):z.type==="menubar"&&(be=be??(z.context.orientation==="vertical"?"inline-end":"bottom"),Ce=Ce??"start");const Me=z.type==="context-menu",ye=rf({anchor:W,floatingRootContext:I,positionMethod:L?"fixed":l,mounted:Y,side:be,sideOffset:se,align:Ce,alignOffset:ie,arrowPadding:Me?0:w,collisionBoundary:v,collisionPadding:S,sticky:T,nodeId:Z,keepMounted:j,disableAnchorTracking:A,collisionAvoidance:pe,shift:Me?{crossAxis:!("side"in pe&&pe.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:U,adaptiveOrigin:q});b.useEffect(()=>{function Re(ke){ke.open&&(ke.parentNodeId===Z&&k.set("hoverEnabled",!1),ke.nodeId!==Z&&ke.parentNodeId===k.select("floatingParentNodeId")&&k.setOpen(!1,qe(Hr)))}return U.events.on("menuopenchange",Re),()=>{U.events.off("menuopenchange",Re)}},[k,U.events,Z]),b.useEffect(()=>{if(k.select("floatingParentNodeId")==null)return;function Re(ke){if(ke.open||ke.nodeId!==k.select("floatingParentNodeId"))return;const Ie=ke.reason??Hr;k.setOpen(!1,qe(Ie))}return U.events.on("menuopenchange",Re),()=>{U.events.off("menuopenchange",Re)}},[U.events,k]);const ge=on();b.useEffect(()=>{B||ge.clear()},[B,ge]),b.useEffect(()=>{function Re(ke){if(!(!B||ke.nodeId!==k.select("floatingParentNodeId")))if(ke.target&&H&&H!==ke.target){const Ie=k.select("closeDelay");Ie>0?ge.isStarted()||ge.start(Ie,()=>{k.setOpen(!1,qe(Hr))}):k.setOpen(!1,qe(Hr))}else ge.clear()}return U.events.on("itemhover",Re),()=>{U.events.off("itemhover",Re)}},[U.events,B,H,k,ge]),b.useEffect(()=>{const Re={open:B,nodeId:Z,parentNodeId:Q,reason:k.select("lastOpenChangeReason")};U.events.emit("menuopenchange",Re)},[U.events,B,k,Z,Q]),we(()=>{const Re=O,ke=F.current;if(Re&&(F.current=Re),ke&&Re&&Re!==ke){k.set("instantType",void 0);const Ie=new AbortController;return J(()=>{k.set("instantType","trigger-change")},Ie.signal),()=>{Ie.abort()}}},[O,J,k]);const Te={open:B,side:ye.side,align:ye.align,anchorHidden:ye.anchorHidden,nested:z.type==="menu",instant:P},Oe=z.type==="menubar"&&z.context.modal;Nm(B&&(Oe||D&&K!==Ft),M==="touch",$,H);const Ee=lf(o,Te,{styles:ye.positionerStyles,transitionStatus:ee,props:_,refs:[a,k.useStateSetter("positionerElement")],hidden:!Y,inert:!B}),Pe=Y&&z.type!=="menu"&&(z.type!=="menubar"&&D&&K!==Ft||z.type==="menubar"&&z.context.modal);let Se=null;return z.type==="menubar"?Se=z.context.contentElement:z.type===void 0&&(Se=H),p.jsxs(Ow.Provider,{value:ye,children:[Pe&&p.jsx(ff,{ref:z.type==="context-menu"||z.type==="nested-context-menu"?z.context.internalBackdropRef:null,inert:vl(!B),cutout:Se}),p.jsx(JS,{id:Z,children:p.jsx(km,{elementsRef:k.context.itemDomElements,labelsRef:k.context.itemLabels,children:Ee})})]})}),sN=b.createContext(null);function Lw(e){return b.useContext(sN)}function aN(e){const o=b.useRef(""),a=b.useCallback(l=>{l.defaultPrevented||(o.current=l.pointerType,e(l,l.pointerType))},[e]);return{onClick:b.useCallback(l=>{if(l.detail===0){e(l,"keyboard");return}"pointerType"in l?e(l,l.pointerType):e(l,o.current),o.current=""},[e]),onPointerDown:a}}function jm(e,o){const a=b.useRef(e),i=Ne(o);we(()=>{a.current!==e&&i(a.current),a.current=e},[e,i])}function Iw(e,o){const a=Ne((c,d)=>{(typeof e=="function"?e():e)||o(d||(Nu?"touch":""))}),{onClick:i,onPointerDown:l}=aN(a);return b.useMemo(()=>({onClick:i,onPointerDown:l}),[i,l])}function Hw(e){const[o,a]=b.useState(null),i=Iw(e,a);return jm(e,l=>{l&&!e&&a(null)}),b.useMemo(()=>({openMethod:o,triggerProps:i}),[o,i])}const iN={...tf,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,o)=>e.activeIndex===o,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class rN extends Da{constructor(o,a,i=!1){const l=new yl,c=cN(l,a,i,o);super(c,lN(l),iN),this.unsubscribeParentListener=this.observe("parent",d=>{if(this.unsubscribeParentListener?.(),d.type==="menu"){let g=d.store.select("rootId"),m=d.store.select("floatingTreeRoot"),h=d.store.select("keyboardEventRelay");this.unsubscribeParentListener=d.store.subscribe(()=>{const y=d.store.select("rootId"),v=d.store.select("floatingTreeRoot"),S=d.store.select("keyboardEventRelay");g===y&&m===v&&h===S||(g=y,m=v,h=S,this.notifyAll())}),this.context.allowMouseUpTriggerRef=d.store.context.allowMouseUpTriggerRef;return}d.type!==void 0&&(this.context.allowMouseUpTriggerRef=d.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(o,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:o,eventDetails:a})}unsubscribeParentListener=null}function lN(e){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function cN(e,o,a=!1,i){return{...ef(e,o,a),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new cm,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ct,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...i}}const Uw=b.createContext(void 0);function Bw(){return b.useContext(Uw)}const _m=cl(function(o){const{children:a,open:i,onOpenChange:l,onOpenChangeComplete:c,defaultOpen:d=!1,disabled:g=!1,modal:m,loopFocus:h=!0,orientation:y="vertical",actionsRef:v,closeParentOnEsc:S=!1,handle:w,triggerId:T,defaultTriggerId:A=null,highlightItemOnHover:N=!0}=o,C=Cm(!0),_=$s(!0),k=Lw(!0),j=Bw(),L=b.useMemo(()=>j&&_?{type:"menu",store:_.store}:k?{type:"menubar",context:k}:C&&!_?{type:"context-menu",context:C}:{type:void 0},[C,_,k,j]),z=Gs(),I=Gs(),U=Xs(),Y=L.type==="menu"?L.store:void 0,B=(i??d)&&Y?.state.transitionStatus==="starting",D=Zt(()=>B?Y?.state.instantType:void 0).current,M=uN({open:d,openProp:i,activeTriggerId:A,triggerIdProp:T,parent:L,disabled:g,highlightItemOnHover:N,modal:L.type===void 0?m:void 0,rootId:z,instantType:D},I,U!=null);M.useControlledProp("openProp",i),M.useControlledProp("triggerIdProp",T),M.useContextCallback("onOpenChangeComplete",c);const H=M.useState("floatingTreeRoot"),ee=um(H),$=M.useState("open"),P=M.useState("activeTriggerElement"),q=M.useState("positionerElement"),K=M.useState("hoverEnabled"),Z=M.useState("disabled"),Q=M.useState("lastOpenChangeReason"),O=M.useState("parent"),F=M.useState("activeIndex"),J=M.useState("payload"),W=M.useState("floatingParentNodeId"),se=b.useRef(null),ie=b.useRef(O.type!=="context-menu"),me=on(),pe=b.useRef(!0),be=on(),Ce=W!=null,{openMethod:Me,triggerProps:ye}=Hw($);M.useSyncedValues({disabled:g,highlightItemOnHover:N,modal:O.type===void 0?m:void 0,openMethod:Me,rootId:z}),Qu(M);const{forceUnmount:ge,transitionStatus:Te}=Zu($,M,()=>{M.set("allowMouseEnter",!1)},B),Oe=Ku(M.context.popupRef);b.useEffect(()=>{if(D===void 0)return;const Ae=()=>{M.state.instantType===D&&M.set("instantType",void 0)};if(!$){Ae();return}if(Te!==void 0)return;if(M.context.popupRef.current==null){Ae();return}const Ye=new AbortController;return Oe(Ae,Ye.signal),()=>{Ye.abort()}},[D,$,Te,Oe,M]),we(()=>{C&&!_?M.update({parent:{type:"context-menu",context:C},floatingNodeId:ee,floatingParentNodeId:U}):_&&M.update({floatingNodeId:ee,floatingParentNodeId:U})},[C,_,ee,U,M]),b.useEffect(()=>{if($||(se.current=null),O.type==="context-menu"){if(!$){me.clear(),ie.current=!1;return}me.start(500,()=>{ie.current=!0})}},[me,$,O.type]),we(()=>{!$&&!K&&M.set("hoverEnabled",!0)},[$,K,M]);const Be=Ne((Ae,Ye)=>{const Qe=Ye.reason;if(!Ae&&!M.select("open")||$===Ae&&Ye.trigger===P&&Q===Qe)return;const ct=ym(Ye);if(!Ae&&Ye.trigger==null&&(Ye.trigger=P??void 0),l?.(Ae,Ye),Ye.isCanceled)return;M.state.floatingRootContext.dispatchOpenChange(Ae,Ye);const en=Ye.event;if(Ae===!1&&en?.type==="click"&&en.pointerType==="touch"&&!pe.current)return;Ae&&Qe===Ti?(pe.current=!1,be.start(300,()=>{pe.current=!0})):(pe.current=!0,be.clear());const rn=(Qe===os||Qe===Yr)&&en.detail===0,hn=!Ae&&(Qe===pl||Qe==null);se.current=Ye.event;const xt=Wu(M.state,Ae,Ye.trigger,ct());xt.openChangeReason=Qe,O.type==="menubar"&&(Qe===Ti||Qe===Vs||Qe===Ft||Qe===uu||Qe===Hr)?xt.instantType="group":rn||hn?xt.instantType=rn?"click":"dismiss":xt.instantType=void 0,M.update(xt)}),Ee=fw({popupStore:M,floatingRootContext:M.state.floatingRootContext,floatingId:I,nested:U!=null,onOpenChange:Be}),Pe=Ee.context.events;we(()=>{const Ae=({open:Ye,eventDetails:Qe})=>Be(Ye,Qe);return Pe.on("setOpen",Ae),()=>{Pe?.off("setOpen",Ae)}},[Pe,Be]);const Se=b.useCallback(()=>{M.setOpen(!1,qe(Bu))},[M]);b.useImperativeHandle(v,()=>({unmount:ge,close:Se}),[ge,Se]);let Re;O.type==="context-menu"&&(Re=O.context),b.useImperativeHandle(Re?.positionerRef,()=>q,[q]),b.useImperativeHandle(Re?.actionsRef,()=>({setOpen:Be}),[Be]);const ke=ml(Ee,{enabled:!Z,bubbles:{escapeKey:S&&O.type==="menu"},outsidePress(){return O.type!=="context-menu"||se.current?.type==="contextmenu"?!0:ie.current},externalTree:Ce?H:void 0}),Ie=af(),je=b.useCallback(Ae=>{M.select("activeIndex")!==Ae&&M.set("activeIndex",Ae)},[M]),le=bw(Ee,{enabled:!Z,listRef:M.context.itemDomElements,activeIndex:F,nested:O.type!==void 0,loopFocus:h,orientation:y,parentOrientation:O.type==="menubar"?O.context.orientation:void 0,rtl:Ie==="rtl",disabledIndices:ho,onNavigate:je,openOnArrowKeyDown:O.type!=="context-menu",externalTree:Ce?H:void 0,focusItemOnHover:N}),ve=b.useCallback(Ae=>{M.context.typingRef.current=Ae},[M]),he=vw(Ee,{enabled:!Z,listRef:M.context.itemLabels,elementsRef:M.context.itemDomElements,activeIndex:F,resetMs:jO,onMatch:Ae=>{$&&Ae!==F&&M.set("activeIndex",Ae)},onTyping:ve}),ce=b.useMemo(()=>{const Ae=oo(he.reference,le.reference,ke.reference,{onMouseMove(){M.set("allowMouseEnter",!0)}},ye);return Ae["aria-haspopup"]="menu",Ae["aria-expanded"]=$,Ae},[M,he.reference,le.reference,ke.reference,ye,$]),xe=b.useMemo(()=>{const Ae=oo(le.trigger,ke.trigger,ye);return Ae["aria-haspopup"]="menu",Ae["aria-expanded"]=!1,Ae},[le.trigger,ke.trigger,ye]);Zt(()=>(M.update({inactiveTriggerProps:xe}),null));const He=b.useMemo(()=>oo(gl,{id:I,role:"menu","aria-orientation":y==="horizontal"?"horizontal":void 0,"aria-labelledby":P?.id,onMouseMove(){M.set("allowMouseEnter",!0),O.type==="menu"&&M.set("hoverEnabled",!1)},onClick(){M.select("hoverEnabled")&&M.set("hoverEnabled",!1)},onKeyDown(Ae){const Ye=M.select("keyboardEventRelay");Ye&&!Ae.isPropagationStopped()&&Ye(Ae)}},he.floating,le.floating,ke.floating),[P,I,y,O.type,M,he.floating,le.floating,ke.floating]),Lt=le.item??Ct;Ju(M,{floatingRootContext:Ee,activeTriggerProps:ce,inactiveTriggerProps:xe,popupProps:He,itemProps:Lt});const Yt=b.useMemo(()=>({store:M,parent:L}),[M,L]),ut=p.jsxs(kw.Provider,{value:Yt,children:[w&&p.jsx($u,{handle:w,store:M}),typeof a=="function"?a({payload:J}):a]});return O.type===void 0||O.type==="context-menu"?p.jsx(ew,{externalTree:H,children:ut}):ut});function uN(e,o,a){return Zt(()=>new rN(e,o,a)).current}function fN(e){const o=$s().store,a=b.useMemo(()=>({parentMenu:o}),[o]);return p.jsx(Uw.Provider,{value:a,children:p.jsx(_m,{...e})})}const Wc=5;function Fw(e,o){const a=dN(o);return e.clientX>=a.left-Wc&&e.clientX<=a.right+Wc&&e.clientY>=a.top-Wc&&e.clientY<=a.bottom+Wc}function dN(e){const o=e.getBoundingClientRect(),a=Rt(e);if(Xh)return o;const i=a.getComputedStyle(e,"::before"),l=a.getComputedStyle(e,"::after");if(!(i.content!=="none"||l.content!=="none"))return o;const d=parseFloat(i.width)||0,g=parseFloat(i.height)||0,m=parseFloat(l.width)||0,h=parseFloat(l.height)||0,y=Math.max(o.width,d,m),v=Math.max(o.height,g,h),S=y-o.width,w=v-o.height;return{left:o.left-S/2,right:o.right+S/2,top:o.top-w/2,bottom:o.bottom+w/2}}function pN(e={}){const{highlightItemOnHover:o,highlightedIndex:a,onHighlightedIndexChange:i}=Rm(),{ref:l,index:c}=cf(e),d=a===c,g=b.useRef(null),m=ss(l,g);return{compositeProps:{tabIndex:d?0:-1,onFocus(){i(c)},onMouseMove(){const y=g.current;if(!o||!y)return;const v=y.hasAttribute("disabled")||y.ariaDisabled==="true";!d&&!v&&y.focus()}},compositeRef:m,index:c}}function Vw(e){const{render:o,className:a,style:i,state:l=Ct,props:c=ho,refs:d=ho,metadata:g,stateAttributesMapping:m,tag:h="div",...y}=e,{compositeProps:v,compositeRef:S}=pN({metadata:g});return nt(h,e,{state:l,ref:[S,...d],props:[v,...c,y],stateAttributesMapping:m})}function Yw(e){if(vt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Wo(e))return Yw(ts(e))}function qw(e,o){const a=b.useRef(null);function i(c){so.flushSync(()=>{e.setOpen(!1,qe(Vs,c.nativeEvent,c.currentTarget))}),pO(a.current)?.focus()}function l(c){const d=e.select("positionerElement");if(d&&Ci(c,d))e.context.beforeContentFocusGuardRef.current?.focus();else{so.flushSync(()=>{e.setOpen(!1,qe(Vs,c.nativeEvent,c.currentTarget))});let g=dO(e.context.triggerFocusTargetRef.current||o.current);for(;g!==null&&De(d,g);){const m=g;if(g=sm(g),g===m)break}g?.focus()}}return{preFocusGuardRef:a,handlePreFocusGuardFocus:i,handleFocusTargetFocus:l}}function hN(e){const{enabled:o=!0,mouseDownAction:a,open:i}=e,l=b.useRef(!1);return b.useMemo(()=>o?{onMouseDown:c=>{(a==="open"&&!i||a==="close"&&i)&&(l.current=!0,We(c.currentTarget).addEventListener("click",()=>{l.current=!1},{once:!0}))},onClick:c=>{l.current&&(l.current=!1,c.preventBaseUIHandler())}}:Ct,[o,a,i])}const Gw=qh(function(o,a){const{render:i,className:l,style:c,disabled:d=!1,nativeButton:g=!0,id:m,openOnHover:h,delay:y=100,closeDelay:v=0,handle:S,payload:w,...T}=o,A=$s(!0),C=xm(S)??A?.store;if(!C)throw new Error(kt(85));const _=mo(m),k=C.useState("isTriggerActive",_),j=C.useState("floatingRootContext"),L=C.useState("isOpenedByTrigger",_),z=C.useState("triggerPopupId",_),I=b.useRef(null),U=gN(),Y=Rm(!0),B=Ks(),D=b.useMemo(()=>B??new cm,[B]),M=um(D),H=Xs(),{registerTrigger:ee,isMountedByThisTrigger:$}=bm(_,I,C,{payload:w,closeDelay:v,parent:U,floatingTreeRoot:D,floatingNodeId:M,floatingParentNodeId:H,keyboardEventRelay:Y?.relayKeyboardEvent}),P=U.type==="menubar",q=C.useState("disabled"),K=d||q||P&&U.context.disabled,{getButtonProps:Z,buttonRef:Q}=Co({disabled:K,native:g});b.useEffect(()=>{!L&&U.type===void 0&&(C.context.allowMouseUpTriggerRef.current=!1)},[C,L,U.type]);const O=b.useRef(null),F=on(),J=Ne(Re=>{if(!O.current)return;F.clear(),C.context.allowMouseUpTriggerRef.current=!1;const ke=Re.target;De(O.current,ke)||De(C.select("positionerElement"),ke)||ke===O.current||ke!=null&&Yw(ke)===C.select("rootId")||Fw(Re,O.current)||D.events.emit("close",{domEvent:Re,reason:xS})});b.useEffect(()=>{L&&C.select("lastOpenChangeReason")===Ft&&We(O.current).addEventListener("mouseup",J,{once:!0})},[L,J,C]);const W=P&&U.context.hasSubmenuOpen,ie=nf(j,{enabled:(h??W)&&!K&&(!P||W&&!$),handleClose:sf({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:U.type===void 0?y:void 0,delay:{close:v},triggerElementRef:I,externalTree:D,isActiveTrigger:k,isClosing:()=>C.select("transitionStatus")==="ending"}),me=mN(L,C.select("lastOpenChangeReason")),pe=Gu(j,{enabled:!K,event:L&&P?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:U.type===void 0?me:!1}),be=gw(j,{enabled:!K&&W}),Ce=hN({open:L,enabled:P,mouseDownAction:"open"}),Me=b.useMemo(()=>oo(be.reference,pe.reference),[be.reference,pe.reference]),ye=C.useState("triggerProps",$),{preFocusGuardRef:ge,handlePreFocusGuardFocus:Te,handleFocusTargetFocus:Oe}=qw(C,I),Be={disabled:K,open:L},Ee=[O,a,Q,ee,I],Pe=[Me,ie??Ct,ye,{"aria-haspopup":"menu","aria-controls":z,id:_,onMouseDown:Re=>{if(C.select("open"))return;F.start(200,()=>{C.context.allowMouseUpTriggerRef.current=!0}),We(Re.currentTarget).addEventListener("mouseup",J,{once:!0})}},P?{role:"menuitem"}:{},Ce,T,Z],Se=nt("button",o,{enabled:!P,stateAttributesMapping:iu,state:Be,ref:Ee,props:Pe});return P?p.jsx(Vw,{tag:"button",render:i,className:l,style:c,state:Be,refs:Ee,props:Pe,stateAttributesMapping:iu}):L?p.jsxs(b.Fragment,{children:[p.jsx(as,{ref:ge,onFocus:Te},`${_}-pre-focus-guard`),p.jsx(b.Fragment,{children:Se},_),p.jsx(as,{ref:C.context.triggerFocusTargetRef,onFocus:Oe},`${_}-post-focus-guard`)]}):p.jsx(b.Fragment,{children:Se},_)});function mN(e,o){const a=on(),[i,l]=b.useState(!1);return we(()=>{e&&o===Ft?(l(!0),a.start(YS,()=>{l(!1)})):e||(a.clear(),l(!1))},[e,o,a]),i}function gN(){const e=Lw();return b.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const yN=b.forwardRef(function(o,a){const{className:i,render:l,orientation:c="horizontal",style:d,...g}=o;return nt("div",o,{state:{orientation:c},ref:a,props:[{role:"separator","aria-orientation":c},g]})});function Xw(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const bN={"aria-expanded":void 0},vN=b.forwardRef(function(o,a){const{render:i,className:l,style:c,label:d,id:g,nativeButton:m=!1,openOnHover:h=!0,delay:y=100,closeDelay:v=0,disabled:S=!1,...w}=o,T=Bw();if(!T?.parentMenu)throw new Error(kt(37));const A=cf({guess:!0,label:d}),N=Em(),{store:C}=$s(),_=mo(g),k=C.useState("open"),j=C.useState("floatingRootContext"),L=C.useState("floatingTreeRoot"),z=C.useState("triggerPopupId",_),I=pw(_,C),U=Ne(Me=>{I(Me),Me!==null&&C.select("open")&&C.select("activeTriggerId")==null&&C.update({activeTriggerId:_??null,activeTriggerElement:Me,closeDelay:v})}),Y=b.useRef(null),B=b.useCallback(Me=>{Y.current=Me,C.set("activeTriggerElement",Me)},[C]);we(()=>(U(Y.current),()=>U(null)),[U,_,C]),C.useSyncedValue("closeDelay",v);const D=T.parentMenu,M=C.useState("disabled"),H=D.useState("disabled"),ee=S||M||H,$=D.useState("itemProps"),P=D.useState("isActive",A.index),q=b.useMemo(()=>({type:"submenu-trigger",setActive(){D.select("highlightItemOnHover")&&D.set("activeIndex",A.index)}}),[D,A.index]),{getItemProps:K,itemRef:Z}=Mw({closeOnClick:!1,disabled:ee,highlighted:P,id:_,store:C,typingRef:D.context.typingRef,nativeButton:m,itemMetadata:q,nodeId:N?.context.nodeId}),Q=C.useState("hoverEnabled"),O=nf(j,{enabled:Q&&h&&!ee,handleClose:sf({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:y,delay:{open:y,close:v},shouldOpen:y>0?()=>D.select("allowMouseEnter"):void 0,triggerElementRef:Y,externalTree:L,isClosing:()=>C.select("transitionStatus")==="ending",guardStaleOpen:!0}),J=Gu(j,{enabled:!ee,event:"mousedown",toggle:!h,ignoreMouse:h,stickIfOpen:!1}).reference??Ct,W=C.useState("triggerProps",!0);delete W.id;const se={disabled:ee,highlighted:P,open:k},ie=C.useState("openMethod"),pe=C.useState("lastOpenChangeReason")===uu||ie==="keyboard";return nt("div",o,{state:se,stateAttributesMapping:Lu,props:[J,O,W,$,k&&pe&&dS?bN:void 0,{"aria-controls":z,tabIndex:k||P?0:-1,onBlur(){P&&D.set("activeIndex",null)}},w,K],ref:[a,A.ref,Z,U,B]})});const xN=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function SN(e,o,a=[]){if(o==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:xN(e),size:24,node:o,...a.length>0?{aliases:a}:{}}}const wN=e=>{let o="",a=!1;for(const i of e){if(i==="-"||i==="_"||i<=" "){a=o.length>0;continue}o.length===0?o+=i.toLowerCase():o+=a?i.toUpperCase():i,a=!1}return o};const TN=e=>{const o=wN(e);return o.charAt(0).toUpperCase()+o.slice(1)};const Nh=(...e)=>e.filter((o,a,i)=>!!o&&o.trim()!==""&&i.indexOf(o)===a).join(" ").trim();const ya={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Jp(e){return e!=null}function EN(e,o={}){const a=o.attributeNames??{},i=S=>a[S]??S,l=e.size??e.width??ya.width,c=e.size??e.height??ya.height,d=e.aliases?.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`)??[],g=[...e.name?[`lucide-${e.name}`]:[],...d],m=o.className?.split(" ").filter(Boolean)??[],h=o.includeDefaultClasses===!1?Nh(...m):Nh("lucide",...g,...m),y=o.absoluteStrokeWidth?Number(o.strokeWidth??ya["stroke-width"])*Number(e.size??e.width??ya.width)/Number(o.size??o.width??ya.width):o.strokeWidth??ya["stroke-width"];return["svg",{...Object.entries(ya).reduce((S,[w,T])=>(S[i(w)]=T,S),{}),..."color"in o&&o.color&&{[i("stroke")]:o.color},..."size"in o&&Jp(o.size)&&{[i("width")]:o.size,[i("height")]:o.size},..."width"in o&&Jp(o.width)&&{[i("width")]:o.width},..."height"in o&&Jp(o.height)&&{[i("height")]:o.height},[i("stroke-width")]:y,...h&&{[i("class")]:h},[i("viewBox")]:`0 0 ${l} ${c}`,...o.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in o&&o.attributes},e.node.map(S=>{const[w,T,A]=S,N=o.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...T}:T;return A?[w,N,A]:[w,N]})]}function CN(e,o={}){return EN(e,{...o,attributeNames:{...o.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const RN=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},AN=b.createContext({}),ON=()=>b.useContext(AN),kN=b.forwardRef(({color:e,size:o,width:a,height:i,strokeWidth:l,absoluteStrokeWidth:c,nonScalingStroke:d,className:g="",children:m,iconNode:h=[],icon:y={node:h,aliases:[],size:24},...v},S)=>{const{size:w=24,strokeWidth:T=2,absoluteStrokeWidth:A=!1,nonScalingStroke:N=!1,color:C="currentColor",className:_=""}=ON()??{},k=!!m||RN(v),[j,L,z=[]]=CN(y,{color:e??C,width:a??o??w,height:i??o??w,strokeWidth:l??T,absoluteStrokeWidth:c??A,nonScalingStroke:d??N,className:Nh(_,g),hasA11yProp:k,attributes:v});return b.createElement(j,{ref:S,...L},[...z.map(([I,U])=>b.createElement(I,U)),...Array.isArray(m)?m:[m]])});function Ue(e,o=[],a=[]){const i=typeof e=="string"?SN(e,o,a):e,l=b.forwardRef(({className:c,...d},g)=>b.createElement(kN,{ref:g,icon:i,className:c,...d}));return i.name&&(l.displayName=TN(i.name)),l}const Kw={name:"building-complex",size:24,node:[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],aliases:["building-2"]};Kw.node;const NN=Ue(Kw);const $w={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};$w.node;const Li=Ue($w);const Ww={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Ww.node;const ka=Ue(Ww);const Qw={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Qw.node;const Dm=Ue(Qw);const Zw={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Zw.node;const MN=Ue(Zw);const Jw={name:"cloud-alert",size:24,node:[["path",{d:"M12 12v4",key:"tww15h"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.128 16.949A7 7 0 1 1 15.71 8h1.79a1 1 0 0 1 0 9h-1.642",key:"1namsd"}]]};Jw.node;const jN=Ue(Jw);const eT={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};eT.node;const zm=Ue(eT);const tT={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};tT.node;const nT=Ue(tT);const oT={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};oT.node;const sT=Ue(oT);const aT={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};aT.node;const tl=Ue(aT);const iT={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};iT.node;const _N=Ue(iT);const rT={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};rT.node;const lT=Ue(rT);const cT={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};cT.node;const DN=Ue(cT);const uT={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};uT.node;const Sl=Ue(uT);const fT={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};fT.node;const zN=Ue(fT);const dT={name:"file-plus",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};dT.node;const PN=Ue(dT);const pT={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};pT.node;const LN=Ue(pT);const hT={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};hT.node;const IN=Ue(hT);const mT={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};mT.node;const gT=Ue(mT);const yT={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};yT.node;const Pm=Ue(yT);const bT={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};bT.node;const HN=Ue(bT);const vT={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};vT.node;const xT=Ue(vT);const ST={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};ST.node;const Lm=Ue(ST);const wT={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};wT.node;const UN=Ue(wT);const TT={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};TT.node;const ao=Ue(TT);const ET={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};ET.node;const BN=Ue(ET);const CT={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};CT.node;const pf=Ue(CT);const RT={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};RT.node;const FN=Ue(RT);const AT={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};AT.node;const Im=Ue(AT);const OT={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};OT.node;const Hm=Ue(OT);const kT={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};kT.node;const VN=Ue(kT);const NT={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};NT.node;const YN=Ue(NT);const MT={name:"pencil",size:24,node:[["path",{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-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};MT.node;const Um=Ue(MT);const jT={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};jT.node;const qN=Ue(jT);const _T={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};_T.node;const GN=Ue(_T);const DT={name:"play",size:24,node:[["path",{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",key:"10ikf1"}]]};DT.node;const XN=Ue(DT);const zT={name:"presentation",size:24,node:[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]};zT.node;const KN=Ue(zT);const PT={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};PT.node;const $N=Ue(PT);const LT={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};LT.node;const WN=Ue(LT);const IT={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};IT.node;const HT=Ue(IT);const UT={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};UT.node;const BT=Ue(UT);const FT={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};FT.node;const QN=Ue(FT);const VT={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};VT.node;const ZN=Ue(VT);const YT={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};YT.node;const JN=Ue(YT);const qT={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};qT.node;const eM=Ue(qT);const GT={name:"share",size:24,node:[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]};GT.node;const tM=Ue(GT);const XT={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};XT.node;const KT=Ue(XT);const $T={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};$T.node;const wl=Ue($T);const WT={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};WT.node;const nM=Ue(WT);const QT={name:"user-check",size:24,node:[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};QT.node;const oM=Ue(QT);const ZT={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};ZT.node;const Br=Ue(ZT);const JT={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};JT.node;const sM=Ue(JT);const e1={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};e1.node;const Tl=Ue(e1),Mh=500,aM=8;function iM(e,o,a){return a<e.at||a-e.at>Mh?!1:Math.hypot(o.clientX-e.x,o.clientY-e.y)<=aM}const o0=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"];function rM(e,o,a=Date.now){let i=!1,l=!1,c=0;const d=()=>{if(!l){l=!0,e.clearTimeout(c);for(const h of o0)e.removeEventListener(h,m,!0)}},g=()=>{i?c=e.setTimeout(g,Mh):d()},m=h=>{const y=h.type==="pointerdown"||h.type==="mousedown";!(i&&!y)&&!iM(o,h,a())||(h.preventDefault(),h.stopImmediatePropagation(),y?i=!0:(h.type==="click"||h.type==="dblclick")&&(i=!1))};for(const h of o0)e.addEventListener(h,m,!0);return c=e.setTimeout(g,Math.max(0,Mh-(a()-o.at))),d}function lM(e){e.detail<1||!e.view||rM(e.view,{x:e.clientX,y:e.clientY,at:Date.now()})}const Bm="rounded-lg bg-surface p-1 text-[13px] text-fg shadow-popup outline-none origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0",t1="flex h-7 min-w-40 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover data-[disabled]:opacity-40";function nl({trigger:e,children:o,side:a="bottom",align:i="start",open:l,onOpenChange:c}){return p.jsxs(_m,{open:l,onOpenChange:c?d=>c(d):void 0,children:[p.jsx(Gw,{render:e,onKeyDown:Mi}),p.jsx(Om,{children:p.jsx(Mm,{side:a,align:i,sideOffset:6,className:"z-[1000]",children:p.jsx(Am,{className:Bm,children:o})})})]})}function Nt({children:e,onSelect:o,icon:a,shortcut:i,disabled:l,danger:c}){return p.jsxs(_w,{className:lt(t1,c&&"text-danger"),disabled:l,onClick:d=>{lM(d.nativeEvent),o?.()},onKeyDown:Mi,children:[p.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:a}),p.jsx("span",{className:"flex-1",children:e}),i?p.jsx("span",{className:"ml-4 text-xs text-fg-subtle",children:i}):null]})}function Ko(){return p.jsx(yN,{className:"mx-1 my-1 h-px bg-line"})}function ji({children:e}){return p.jsx("div",{className:"px-2 py-1 text-xs text-fg-subtle",children:e})}function s0({label:e,icon:o,children:a}){return p.jsxs(fN,{children:[p.jsxs(vN,{className:t1,onKeyDown:Mi,children:[p.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:o}),p.jsx("span",{className:"flex-1",children:e}),p.jsx(Dm,{className:"size-3.5 text-fg-subtle"})]}),p.jsx(Om,{children:p.jsx(Mm,{sideOffset:4,className:"z-[1000]",children:p.jsx(Am,{className:Bm,children:a})})})]})}const n1=b.createContext(void 0);function Pa(e){const o=b.useContext(n1);if(!e&&o===void 0)throw new Error(kt(27));return o}const cM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,forceRender:d=!1,...g}=o,m=Pa(),h=m.useState("open"),y=m.useState("nested"),v=m.useState("mounted"),S=m.useState("transitionStatus");return nt("div",o,{state:{open:h,transitionStatus:S},ref:[m.context.backdropRef,a],stateAttributesMapping:Iu,props:[{role:"presentation",hidden:!v,style:{userSelect:"none",WebkitUserSelect:"none"}},g],enabled:d||!y})}),uM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,disabled:d=!1,nativeButton:g=!0,...m}=o,h=Pa(),y=h.useState("open"),{getButtonProps:v,buttonRef:S}=Co({disabled:d,native:g}),w={disabled:d};function T(A){y&&h.setOpen(!1,qe(vS,A.nativeEvent))}return nt("button",o,{state:w,ref:[a,S],props:[{onClick:T},m,v]})}),fM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,...g}=o,m=Pa(),h=mo(d);return m.useSyncedValueWithCleanup("descriptionElementId",h),nt("p",o,{ref:a,props:[{id:h},g]})}),o1=b.createContext(void 0);function dM(){const e=b.useContext(o1);if(e===void 0)throw new Error(kt(26));return e}const pM="--nested-dialogs",hM="data-nested-dialog-open",mM={...dl,...fl,nestedDialogOpen(e){return e?{[hM]:""}:null}},gM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,finalFocus:d,initialFocus:g,...m}=o,h=Pa(),y=h.useState("descriptionElementId"),v=h.useState("disablePointerDismissal"),S=h.useState("floatingRootContext"),w=h.useState("popupProps"),T=h.useState("modal"),A=h.useState("mounted"),N=h.useState("nested"),C=h.useState("nestedOpenDialogCount"),_=h.useState("open"),k=h.useState("openMethod"),j=h.useState("titleElementId"),L=h.useState("transitionStatus"),z=h.useState("role"),I=S.useState("floatingId");dM(),fs({open:_,ref:h.context.popupRef,onComplete(){_&&h.context.onOpenChangeComplete?.(!0)}});const U=g===void 0?dw(h.context.popupRef):g,Y=C>0,B=h.useStateSetter("popupElement"),M=nt("div",o,{state:{open:_,nested:N,transitionStatus:L,nestedDialogOpen:Y},props:[w,{id:I,"aria-labelledby":j,"aria-describedby":y,role:z,...gl,hidden:!A,onKeyDown(H){xl.has(H.key)&&H.stopPropagation()},style:{[pM]:C}},m],ref:[a,h.context.popupRef,B],stateAttributesMapping:mM});return p.jsx(qu,{context:S,openInteractionType:k,disabled:!A,closeOnFocusOut:!v,initialFocus:U,returnFocus:d,modal:T!==!1,restoreFocus:"popup",children:M})}),yM=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o,c=Pa(),d=c.useState("mounted"),g=c.useState("modal"),m=c.useState("open");return d||i?p.jsx(o1.Provider,{value:i,children:p.jsxs(Yu,{ref:a,...l,children:[d&&g===!0&&p.jsx(ff,{ref:c.context.internalBackdropRef,inert:vl(!m)}),o.children]})}):null});function bM({store:e,parentContext:o,isDrawer:a}){const i=e.useState("open"),l=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,h]=b.useState(0),[y,v]=b.useState(0),S=m===0,w=ml(g,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(T){if(!e.context.outsidePressEnabledRef.current||"button"in T&&T.button!==0)return!1;if("touches"in T){if(T.type==="touchend"){if(T.changedTouches.length!==1||T.touches.length!==0)return!1}else if(T.touches.length!==1)return!1}const A=Pt(T);if(S&&!l){if(c){const N=e.context.internalBackdropRef.current,C=e.context.backdropRef.current;return N||C?N===A||C===A||De(A,d)&&!A?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return Pw(i&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(T,A)=>{h(T),v(A)}),we(()=>(o?.onNestedDialogOpen&&(i?o.onNestedDialogOpen(m+1,y+(a?1:0)):o.onNestedDialogOpen(0,0)),()=>{o?.onNestedDialogOpen&&i&&o.onNestedDialogOpen(0,0)}),[a,i,m,y,o]),Ju(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:m,nestedOpenDrawerCount:y}),null}const vM={...tf,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class xM extends Da{constructor(o,a,i){const l=new yl,c=SM(o,l,a,i);super(c,wM(l),vM)}setOpen=(o,a)=>{a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!o&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(o,a),!a.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(o,a),this.update(Wu(this.state,o,a.trigger)))}}function SM(e,o,a,i=!1){return{...ef(o,a,i),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function wM(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function TM(e,o){const{children:a,open:i,defaultOpen:l=!1,onOpenChange:c,onOpenChangeComplete:d,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:h,handle:y,triggerId:v,defaultTriggerId:S=null}=o,w=e==="drawer",T=m,A=g,N="dialog",C=Pa(!0),_=C!=null,k={modal:T,disablePointerDismissal:A,nested:_,role:N},j=gm((B,D)=>new xM({open:l,openProp:i,activeTriggerId:S,triggerIdProp:v,...k},B,D),!0);j.useControlledProp("openProp",i),j.useControlledProp("triggerIdProp",v),j.useSyncedValues(k),j.useContextCallback("onOpenChange",c),j.useContextCallback("onOpenChangeComplete",d);const L=j.useState("open"),z=j.useState("mounted"),I=j.useState("payload");hw(j,L),Qu(j);const{forceUnmount:U}=Zu(L,j);b.useImperativeHandle(h,()=>({unmount:U,close:()=>j.setOpen(!1,qe(Bu))}),[U,j]);const Y=L||z;return p.jsxs(n1.Provider,{value:j,children:[y&&p.jsx($u,{handle:y,store:j}),Y&&p.jsx(bM,{store:j,parentContext:C?.context,isDrawer:w}),typeof a=="function"?a({payload:I}):a]})}const EM=cl(function(o){return TM("dialog",o)}),CM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,...g}=o,m=Pa(),h=mo(d);return m.useSyncedValueWithCleanup("titleElementId",h),nt("h2",o,{ref:a,props:[{id:h},g]})}),s1=b.createContext(void 0);function Ii(e){const o=b.useContext(s1);if(o===void 0&&!e)throw new Error(kt(47));return o}const RM={...tf,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class AM extends Da{constructor(o,a,i){const l=new yl;super(OM(o,l,a,i),kM(l),RM)}setOpen=(o,a)=>{const i=a.reason===Ft,l=a.reason===os&&a.event.detail===0,c=!o&&(a.reason===pl||a.reason==null),d=ym(a),g=this.select("activeTriggerId");if(!o&&a.reason===vS&&a.trigger==null&&g!=null&&(a.trigger=this.context.triggerElements.getById(g)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(o,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(o,a);const m=()=>{const y=Wu(this.state,o,a.trigger,d());y.openChangeReason=a.reason,this.update(y)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(YS,()=>{this.set("stickIfOpen",!1)}),so.flushSync(m)):m();let h;l?h="click":c?h="dismiss":a.reason===Vs&&(h="focus"),this.set("instantType",h)}}function OM(e,o,a,i=!1){const l={...ef(o,a,i),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return l.open&&e?.mounted===void 0&&(l.mounted=!0),l}function kM(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new Mn,triggerElements:e}}const a0=cl(function({props:o}){const{children:a,open:i,defaultOpen:l=!1,onOpenChange:c,onOpenChangeComplete:d,modal:g=!1,handle:m,triggerId:h,defaultTriggerId:y=null}=o,v=MM(m,{modal:g,open:l,openProp:i,activeTriggerId:y,triggerIdProp:h});v.useControlledProp("openProp",i),v.useControlledProp("triggerIdProp",h);const S=v.useState("open"),w=v.useState("mounted"),T=v.useState("payload");v.useContextCallback("onOpenChange",c),v.useContextCallback("onOpenChangeComplete",d),hw(v,S),Qu(v);const{forceUnmount:A}=Zu(S,v,()=>{v.update({stickIfOpen:!0,openChangeReason:null})});v.useSyncedValues({modal:g}),b.useEffect(()=>{S||v.context.stickIfOpenTimeout.clear()},[v,S]),b.useImperativeHandle(o.actionsRef,()=>({unmount:A,close:()=>v.setOpen(!1,qe(Bu))}),[A,v]);const N=S||w;return p.jsxs(s1.Provider,{value:v,children:[m&&p.jsx($u,{handle:m,store:v}),N&&p.jsx(jM,{store:v,modal:g}),typeof a=="function"?a({payload:T}):a]})});function NM(e){return Ii(!0)?p.jsx(a0,{props:e}):p.jsx(ew,{children:p.jsx(a0,{props:e})})}function MM(e,o){const a=gm((i,l)=>new AM(o,i,l));return b.useEffect(()=>a.context.stickIfOpenTimeout.disposeEffect(),[a]),a}function jM({store:e,modal:o}){const a=e.useState("floatingRootContext"),i=ml(a,{outsidePressEvent:{mouse:o==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),l=i.reference,c=i.floating;return Ju(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:c}),null}const _M=300,DM=qh(function(o,a){const{render:i,className:l,style:c,disabled:d=!1,nativeButton:g=!0,handle:m,payload:h,openOnHover:y=!1,delay:v=_M,closeDelay:S=0,id:w,...T}=o,A=Ii(!0),C=xm(m)??A;if(!C)throw new Error(kt(74));const _=mo(w),k=C.useState("isTriggerActive",_),j=C.useState("floatingRootContext"),L=C.useState("isOpenedByTrigger",_),z=C.useState("triggerPopupId",_),I=b.useRef(null),{registerTrigger:U,isMountedByThisTrigger:Y}=bm(_,I,C,{payload:h,disabled:d,openOnHover:y,closeDelay:S}),B=C.useState("openChangeReason"),D=C.useState("stickIfOpen"),M=C.useState("openMethod"),H=C.useState("focusManagerModal"),ee=nf(j,{enabled:!d&&y&&(M!=="touch"||B!==os),mouseOnly:!0,move:!1,handleClose:sf(),restMs:v,delay:{close:S},triggerElementRef:I,isActiveTrigger:k,isClosing:()=>C.select("transitionStatus")==="ending"}),$=Gu(j,{stickIfOpen:D}),P=Iw(()=>C.select("open"),me=>{C.set("openMethod",me)}),q=C.useState("triggerProps",Y),{getButtonProps:K,buttonRef:Z}=Co({disabled:d,native:g}),Q={open(me){return me&&B===os?iu.open(me):Lu.open(me)}},{preFocusGuardRef:O,handlePreFocusGuardFocus:F,handleFocusTargetFocus:J}=qw(C,I),se=nt("button",o,{state:{disabled:d,open:L},ref:[Z,a,U,I],props:[$.reference,ee,q,P,{[qS]:"",id:_,"aria-haspopup":"dialog","aria-expanded":L,"aria-controls":z},T,K],stateAttributesMapping:Q}),ie=p.jsx(b.Fragment,{children:se},_);return Y&&!H?p.jsxs(b.Fragment,{children:[p.jsx(as,{ref:O,onFocus:F}),ie,p.jsx(as,{ref:C.context.triggerFocusTargetRef,onFocus:J})]}):ie}),a1=b.createContext(void 0);function zM(){const e=b.useContext(a1);if(e===void 0)throw new Error(kt(45));return e}const PM=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o;return Ii().useState("mounted")||i?p.jsx(a1.Provider,{value:i,children:p.jsx(Yu,{ref:a,...l})}):null}),i1=b.createContext(void 0);function r1(){const e=b.useContext(i1);if(!e)throw new Error(kt(46));return e}const LM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,anchor:d,positionMethod:g,side:m,align:h,sideOffset:y,alignOffset:v,collisionBoundary:S="clipping-ancestors",collisionPadding:w,arrowPadding:T,sticky:A,disableAnchorTracking:N=!1,collisionAvoidance:C=lm,..._}=o,k=Ii(),j=zM(),L=um(),z=k.useState("floatingRootContext"),I=k.useState("mounted"),U=k.useState("open"),Y=k.useState("openChangeReason"),B=k.useState("activeTriggerElement"),D=k.useState("modal"),M=k.useState("openMethod"),H=k.useState("positionerElement"),ee=k.useState("instantType"),$=k.useState("transitionStatus"),P=k.useState("adaptiveOrigin"),q=b.useRef(null),K=Ku(H),Z=rf({anchor:d,floatingRootContext:z,positionMethod:g,mounted:I,side:m,sideOffset:y,align:h,alignOffset:v,arrowPadding:T,collisionBoundary:S,collisionPadding:w,sticky:A,disableAnchorTracking:N,keepMounted:j,nodeId:L,collisionAvoidance:C,adaptiveOrigin:P}),Q=z.useState("domReferenceElement");we(()=>{const se=Q,ie=q.current;if(se&&(q.current=se),ie&&se&&se!==ie){k.set("instantType",void 0);const me=new AbortController;return K(()=>{k.set("instantType","trigger-change")},me.signal),()=>{me.abort()}}},[Q,K,k]);const O=D===!0&&Y!==Ft;Nm(U&&O,M==="touch",H,B);const F=k.useStateSetter("positionerElement"),J={open:U,side:Z.side,align:Z.align,anchorHidden:Z.anchorHidden,instant:ee},W=lf(o,J,{styles:Z.positionerStyles,transitionStatus:$,props:_,refs:[a,F],hidden:!I,inert:!U});return p.jsxs(i1.Provider,{value:Z,children:[I&&O&&p.jsx(ff,{inert:vl(!U),cutout:B}),p.jsx(JS,{id:L,children:W})]})}),IM=b.createContext(void 0);function HM(){const[e,o]=b.useState(0),a=Ne(()=>(o(l=>l+1),()=>{o(l=>Math.max(0,l-1))}));return{context:b.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}const UM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,initialFocus:d,finalFocus:g,...m}=o,h=Ii(),y=r1(),v=uf()!=null,{context:S,hasClosePart:w}=HM(),T=h.useState("open"),A=h.useState("openMethod"),N=h.useState("instantType"),C=h.useState("transitionStatus"),_=h.useState("popupProps"),k=h.useState("titleElementId"),j=h.useState("descriptionElementId"),L=h.useState("modal"),z=h.useState("mounted"),I=h.useState("openChangeReason"),U=h.useState("activeTriggerElement"),Y=h.useState("floatingRootContext"),B=Y.useState("floatingId"),D=h.useState("disabled"),M=h.useState("openOnHover"),H=h.useState("closeDelay");fs({open:T,ref:h.context.popupRef,onComplete(){T&&h.context.onOpenChangeComplete?.(!0)}}),Tm(Y,{enabled:M&&!D,closeDelay:H});const ee=d===void 0?dw(h.context.popupRef):d,$=L!==!1&&w;h.useSyncedValue("focusManagerModal",$);const P=h.useStateSetter("popupElement"),q={open:T,side:y.side,align:y.align,instant:N,transitionStatus:C},K=nt("div",o,{state:q,ref:[a,h.context.popupRef,P],props:[_,{id:B,role:"dialog",...gl,"aria-labelledby":k,"aria-describedby":j,onKeyDown(Z){v&&xl.has(Z.key)&&Z.stopPropagation()}},bl(C),m],stateAttributesMapping:Iu});return p.jsx(qu,{context:Y,openInteractionType:A,modal:$,disabled:!z||I===Ft,initialFocus:ee,returnFocus:g,restoreFocus:"popup",previousFocusableElement:vt(U)?U:void 0,nextFocusableElement:h.context.triggerFocusTargetRef,beforeContentFocusGuardRef:h.context.beforeContentFocusGuardRef,children:p.jsx(IM.Provider,{value:S,children:K})})}),BM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,m=Ii().useState("open"),{arrowRef:h,side:y,align:v,arrowUncentered:S,arrowStyles:w}=r1();return nt("div",o,{state:{open:m,side:y,align:v,uncentered:S},ref:[a,h],props:[{style:w,"aria-hidden":!0},d],stateAttributesMapping:dl})});function l1({open:e,onOpenChange:o,title:a,description:i,children:l,footer:c,className:d}){return p.jsx(EM,{open:e,onOpenChange:g=>o(g),children:p.jsxs(yM,{children:[p.jsx(cM,{className:"fixed inset-0 z-[900] bg-black/30 transition-opacity data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"}),p.jsxs(gM,{className:lt("fixed left-1/2 top-1/2 z-[901] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-surface p-5 text-fg shadow-popup outline-none","transition-[opacity,transform] data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",d),children:[p.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[p.jsxs("div",{className:"flex-1",children:[p.jsx(CM,{className:"text-[15px] font-semibold",children:a}),i?p.jsx(fM,{className:"mt-1 text-fg-muted",children:i}):null]}),p.jsx(uM,{"aria-label":"Close",className:"rounded-md p-1 text-fg-muted hover:bg-hover",children:p.jsx(Tl,{className:"size-4"})})]}),l,c?p.jsx("div",{className:"mt-4 flex justify-end gap-2",children:c}):null]})]})})}function FM({open:e,onOpenChange:o,title:a,description:i,confirmLabel:l="Confirm",danger:c,onConfirm:d}){return p.jsx(l1,{open:e,onOpenChange:o,title:a,description:i,footer:p.jsxs(p.Fragment,{children:[p.jsx(tt,{onClick:()=>o(!1),children:"Cancel"}),p.jsx(tt,{variant:c?"danger":"primary",onClick:()=>{d(),o(!1)},children:l})]})})}const VM="data-valid",YM="data-invalid",qM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},GM={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},XM={disabled:!1,...GM},c1={valid(e){return e===null?null:e?{[VM]:""}:{[YM]:""}}},KM={invalid:void 0,name:void 0,validityData:{state:qM,errors:[],error:"",value:"",initialValue:null},setValidityData:Ht,disabled:void 0,setTouched:Ht,setDirty:Ht,setFilled:Ht,setFocused:Ht,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:XM,registerFieldControl:Ht,validation:{getValidationProps:(e,o=Ct)=>o,inputRef:{current:null},registeredInputs:new Map,registerInput:Ht,getInputControl:()=>null,commit:async()=>{},change:Ht}},$M=b.createContext(KM);function hf(e=!0){const o=b.useContext($M);if(o.setValidityData===Ht&&!e)throw new Error(kt(28));return o}const WM=b.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Ht,validationMode:"onSubmit",submitCountRef:{current:0}});function u1(){return b.useContext(WM)}const QM=b.createContext({controlId:void 0,registerControlId:Ht,resetControlId:Ht,labelId:void 0,setLabelId:Ht,messageIds:[],setMessageIds:Ht,getDescriptionProps:e=>e});function Fm(){return b.useContext(QM)}function Vm(e={}){const{id:o,enabled:a=!0}=e,{controlId:i,registerControlId:l,resetControlId:c}=Fm(),d=mo(),g=Zt(()=>Symbol()),m=b.useRef(!1),h=b.useRef(!1),y=Ne(()=>{!m.current||l===Ht||(m.current=!1,l(g.current,void 0))});return we(()=>{if(!a||l===Ht){y();return}let v;if(o!==void 0)h.current=!0,v=o;else if(h.current)v=d;else{c();return}if(v===void 0){y();return}m.current=!0,l(g.current,v)},[o,a,l,c,d,g,y]),we(()=>y,[y]),(a?i:void 0)??o??d}function Fr(e,o=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(o,Math.min(e,a))}function f1(e,o,a,i,l=!0,c){const{registerFieldControl:d}=hf(),g=Zt(()=>Symbol());we(()=>{const m=g.current;if(!l){d(m,void 0);return}d(m,{controlRef:e,getValue:i,id:o,name:c,value:a})},[e,l,i,o,c,d,g,a]),we(()=>{const m=g.current;return()=>{d(m,void 0)}},[d,g])}function ZM(e){const o=b.useRef(!0);o.current&&(o.current=!1,e())}const d1=b.createContext(void 0),p1=b.createContext(void 0),h1=b.createContext(void 0);function ds(){const e=b.useContext(d1);if(e===void 0)throw new Error(kt(60));return e}function mf(){const e=b.useContext(p1);if(e===void 0)throw new Error(kt(101));return e}function m1(){const e=b.useContext(h1);if(e===void 0)throw new Error(kt(61));return e}function JM(e,o,a=Object.is){const{length:i}=e;if(i!==o.length)return!1;for(let l=0;l<i;l+=1)if(!a(e[l],o[l]))return!1;return!0}const g1=(e,o)=>Object.is(e,o);function Na(e,o,a){return e==null||o==null?Object.is(e,o):a(e,o)}function ej(e,o,a){return Array.isArray(e)&&Array.isArray(o)?!JM(e,o,(i,l)=>Na(i,l,a)):e!==o}function jh(e,o,a){return e?e.some(i=>i===void 0?!1:Na(o,i,a)):!1}function su(e,o,a){return e?e.findIndex(i=>i===void 0?!1:Na(i,o,a)):-1}function tj(e,o){if(o!==g1)return i=>jh(e,i,o);const a=new Set(e);return a.delete(void 0),i=>a.has(i)&&(i!==0||e.some(l=>Object.is(i,l)))}function y1(e,o,a,i){const l=i&&Array.isArray(o)?e.findIndex(tj(o,a)):su(e,o,a);return l===-1?null:l}function nj(e,o,a,i,l,c){return jh(i,o,l)?c!=null&&e>c&&jh(i,a[c],l)?c:e:e===c?y1(a,i,l,!0):c}function oj(e,o,a){return e.filter(i=>!Na(o,i,a))}function _h(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function sj(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function b1(e){return sj(e?.[0])}function aj(e){return b1(e)?e.flatMap(o=>o.items):e}function ij(e){if(!Array.isArray(e))return e!=null&&"null"in e;const o=e;if(b1(o)){for(const a of o)for(const i of a.items)if(i&&i.value==null&&i.label!=null)return!0;return!1}for(const a of o)if(a&&a.value==null&&a.label!=null)return!0;return!1}function v1(e,o){if(o&&e!=null)return o(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return _h(e)}function wi(e,o){return o&&e!=null?o(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?_h(e.value):_h(e)}function x1(e,o,a){function i(){return v1(e,a)}if(a&&e!=null)return a(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(o&&!Array.isArray(o))return(Object.hasOwn(o,e)?o[e]:void 0)??i();if(Array.isArray(o)){const c=aj(o);if(e==null||typeof e!="object"){const d=c.find(g=>g.value===e);return d&&d.label!=null?d.label:i()}if("value"in e){const d=c.find(g=>g&&g.value===e.value);if(d&&d.label!=null)return d.label}}return i()}function rj(e,o,a){return e.reduce((i,l,c)=>(c>0&&i.push(", "),i.push(p.jsx(b.Fragment,{children:x1(l,o,a)},c)),i),[])}const lj={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:o,multiple:a,itemToStringValue:i}=e;return o==null?!1:a&&Array.isArray(o)?o.length>0:wi(o,i)!==""},hasNullItemLabel:(e,o)=>o?ij(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,o)=>e.activeIndex===o,isSelected:(e,o)=>{const a=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(l=>Na(o,l,a)):Na(o,i,a)},isSelectedByFocus:(e,o)=>e.selectedIndex===o,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},Xo=1;function S1(e,o){return Math.max(0,e-o)}function cj(e,o){if(o<=0)return 0;const a=Fr(e,0,o),i=a,l=o-a,c=i<=Xo,d=l<=Xo;return c&&d?i<=l?0:o:c?0:d?o:a}function uj(e){const{id:o,value:a,defaultValue:i=null,onValueChange:l,open:c,defaultOpen:d=!1,onOpenChange:g,name:m,form:h,autoComplete:y,disabled:v=!1,readOnly:S=!1,required:w=!1,modal:T=!0,actionsRef:A,inputRef:N,onOpenChangeComplete:C,items:_,multiple:k=!1,itemToStringLabel:j,itemToStringValue:L,isItemEqualToValue:z=g1,highlightItemOnHover:I=!0,children:U}=e,{clearErrors:Y}=u1(),{setDirty:B,setTouched:D,setFocused:M,validityData:H,setFilled:ee,name:$,disabled:P,validation:q,validationMode:K}=hf(),Z=Vm({id:o}),Q=P||v,O=$??m,[F,J]=el({controlled:a,default:k?i??ho:i,name:"Select",state:"value"}),[W,se]=el({controlled:c,default:d,name:"Select",state:"open"}),ie=b.useRef([]),me=b.useRef([]),pe=b.useRef(null),be=b.useRef(null),Ce=b.useRef(0),Me=b.useRef(null),ye=b.useRef([]),ge=b.useRef(!1),Te=b.useRef(null),Oe=b.useRef(null),Be=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Ee=b.useRef(!1),Pe=b.useRef(F),{mounted:Se,setMounted:Re,transitionStatus:ke}=mm(W),{openMethod:Ie,triggerProps:je}=Hw(W),le=Zt(()=>new Da({id:Z,labelId:void 0,modal:T,multiple:k,itemToStringLabel:j,itemToStringValue:L,isItemEqualToValue:z,value:F,open:W,mounted:Se,transitionStatus:ke,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Ct,triggerProps:Ct,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Ht,setOpen:Ht,handleScrollArrowVisibility:Ht,onOpenChangeComplete:Ht,listRef:ie,popupRef:pe,scrollHandlerRef:be,scrollArrowsMountedCountRef:Ce,valueRef:Me,valuesRef:ye,labelsRef:me,typingRef:ge,selectionRef:Be,firstItemTextRef:Te,selectedItemTextRef:Oe,alignItemWithTriggerActiveRef:Ee,initialValueRef:Pe},lj)).current,ve=le.useState("activeIndex"),he=le.useState("selectedIndex"),ce=le.useState("triggerElement"),xe=le.useState("positionerElement"),He=Rk(Ie),Lt=Ie??He,Yt=b.useMemo(()=>k?"":wi(F,L),[k,F,L]),ut=b.useMemo(()=>k&&Array.isArray(F)?F.map(Ze=>wi(Ze,L)):wi(F,L),[k,F,L]),Ae=Vt(ce),Ye=Ne(()=>ut);f1(Ae,Z,F,Ye,!Q,m);const Qe=k?Array.isArray(F)&&F.length>0:F!=null&&Yt!=="";we(()=>{ee(Qe)},[Qe,ee]),we(function(){const At=y1(ye.current,F,z,k);At===null&&(Oe.current=null),!W&&le.set("selectedIndex",At)},[k,W,F,z,le]),jm(F,()=>{Y(O),B(ej(F,H.initialValue,z)),q.change(F)});const ct=Ne((Ze,At)=>{g?.(Ze,At),!At.isCanceled&&(se(Ze),!Ze&&(At.reason===Vs||At.reason===Uu)&&(D(!0),M(!1),K==="onBlur"&&q.commit(F)))}),en=Ne(()=>{Re(!1),le.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C?.(!1)});fs({enabled:!A,open:W,ref:pe,onComplete(){W||en()}}),b.useImperativeHandle(A,()=>({unmount:en}),[en]);const rn=Ne((Ze,At)=>{l?.(Ze,At),!At.isCanceled&&J(Ze)}),hn=Ne(Ze=>{const At=S1(Ze.scrollHeight,Ze.clientHeight),Dn=cj(Ze.scrollTop,At),io=Dn>0,bo=Dn<At;le.set("scrollUpArrowVisible",io),le.set("scrollDownArrowVisible",bo)}),xt=Y2({open:W,onOpenChange:ct,elements:{reference:ce,floating:xe}}),_t=Gu(xt,{enabled:!Q,event:"mousedown"}),Ve=ml(xt),ft=bw(xt,{enabled:!Q,listRef:ie,activeIndex:ve,selectedIndex:he,disabledIndices:ho,onNavigate(Ze){Ze===null&&!W||le.set("activeIndex",Ze)},focusItemOnHover:I}),Dt=vw(xt,{enabled:!Q&&(W||!S&&!k),listRef:me,activeIndex:ve,selectedIndex:he,disabledIndices:Ze=>Xw(ie.current[Ze]),onMatch(Ze){W?le.set("activeIndex",Ze):rn(ye.current[Ze],qe(ns))},onTyping(Ze){ge.current=Ze}}),It=b.useMemo(()=>oo(Dt.reference,ft.reference,Ve.reference,_t.reference,je),[_t.reference,Dt.reference,ft.reference,Ve.reference,je]),jn=b.useMemo(()=>oo(gl,Dt.floating,ft.floating,Ve.floating),[Dt.floating,ft.floating,Ve.floating]),ln=ft.item??Ct;le.useContextCallback("setValue",rn),le.useContextCallback("setOpen",ct),le.useContextCallback("handleScrollArrowVisibility",hn),le.useContextCallback("onOpenChangeComplete",C),ZM(()=>{le.update({popupProps:jn,triggerProps:It})}),le.useSyncedValues({id:Z,modal:T,multiple:k,value:F,open:W,mounted:Se,transitionStatus:ke,popupProps:jn,triggerProps:It,items:_,itemToStringLabel:j,itemToStringValue:L,isItemEqualToValue:z,openMethod:Lt});const yo=b.useMemo(()=>({disabled:Q,readOnly:S,required:w,multiple:k,highlightItemOnHover:I,itemProps:ln}),[Q,S,w,k,I,ln]),Sn=ss(N,q.inputRef),Ro=k?void 0:O,_n=b.useMemo(()=>!k||!Array.isArray(F)||!O?null:F.map(Ze=>{const At=wi(Ze,L);return p.jsx("input",{type:"hidden",form:h,name:O,value:At,disabled:Q},At)}),[k,F,h,O,L,Q]);return p.jsxs(d1.Provider,{value:le,children:[p.jsx(p1.Provider,{value:yo,children:p.jsx(h1.Provider,{value:xt,children:U})}),p.jsx("input",{...q.getValidationProps(Q,{onFocus(){le.state.triggerElement?.focus({focusVisible:!0})},onChange(Ze){if(Ze.nativeEvent.defaultPrevented||Q||S)return;const At=Ze.currentTarget.value,Dn=qe(ns,Ze.nativeEvent);function io(){if(k)return;const bo=At.toLowerCase();let ps=ye.current.findIndex(qt=>wi(qt,L).toLowerCase()===bo||v1(qt,j).toLowerCase()===bo);ps===-1&&(ps=ye.current.findIndex((qt,mn)=>{const Ao=me.current[mn];return Ao!=null&&Ao.toLowerCase()===bo}));const ro=ye.current[ps];ro!=null&&rn(ro,Dn)}le.set("forceMount",!0),queueMicrotask(io)}}),id:Z&&Ro==null?`${Z}-hidden-input`:void 0,form:h,name:Ro,autoComplete:y,value:Yt,disabled:Q,required:w&&!(k&&Qe),readOnly:S,ref:Sn,style:O?CS:Fu,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),_n]})}function fj(e,o){return e??o}const dj="data-popup-side",pj=400,hj={...iu,...c1,popupSide:e=>e?{[dj]:e}:null,value:()=>null},mj=b.forwardRef(function(o,a){const{render:i,className:l,id:c,disabled:d=!1,nativeButton:g=!0,style:m,...h}=o,{setTouched:y,setFocused:v,validationMode:S,validation:w,state:T,disabled:A}=hf(),{labelId:N}=Fm(),C=ds(),{readOnly:_,required:k,disabled:j}=mf(),L=A||j||d,z=C.useState("open"),I=C.useState("mounted"),U=C.useState("value"),Y=C.useState("triggerProps"),B=C.useState("positionerElement"),D=C.useState("listElement"),M=C.useState("popupSide"),H=C.useState("id"),ee=C.useState("labelId"),$=C.useState("hasSelectedValue"),P=I&&B?M:null,q=c??H,K=fj(N,ee);Vm({id:c});const Z=Vt(B),Q=b.useRef(null),{getButtonProps:O,buttonRef:F}=Co({disabled:L,native:g}),J=C.useStateSetter("triggerElement"),W=on(),se=on(),ie=on();b.useEffect(()=>{if(z)return ie.start(pj,()=>{C.context.selectionRef.current.allowUnselectedMouseUp=!0,C.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ie.clear()};C.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},se.clear()},[z,C,se,ie]);const me=oo(Y,{id:q,role:"combobox","aria-expanded":z,"aria-haspopup":"listbox","aria-controls":z?D?.id??cu(B)?.id:void 0,"aria-labelledby":K,"aria-readonly":_||void 0,"aria-required":k||void 0,tabIndex:L?-1:0,onFocus(Ce){v(!0),z&&C.context.alignItemWithTriggerActiveRef.current&&C.context.setOpen(!1,qe(ns,Ce.nativeEvent)),W.start(0,()=>{C.set("forceMount",!0)})},onBlur(Ce){De(B,Ce.relatedTarget)||(y(!0),v(!1),S==="onBlur"&&w.commit(U))},onMouseDown(Ce){if(z)return;const Me=We(Ce.currentTarget);function ye(ge){if(!Q.current)return;const Te=ge.target;De(Q.current,Te)||De(Z.current,Te)||Fw(ge,Q.current)||C.context.setOpen(!1,qe(xS,ge))}se.start(0,()=>{Me.addEventListener("mouseup",ye,{once:!0})})}},h,O),pe=w.getValidationProps(L,me);pe.role="combobox";const be={...T,open:z,disabled:L,value:U,readOnly:_,popupSide:P,placeholder:!$};return nt("button",o,{ref:[a,Q,F,J],state:be,stateAttributesMapping:hj,props:pe})}),gj={value:()=>null},yj=b.forwardRef(function(o,a){const{className:i,render:l,children:c,placeholder:d,style:g,...m}=o,h=ds(),y=h.useState("value"),v=h.useState("items"),S=h.useState("itemToStringLabel"),w=h.useState("hasSelectedValue"),T=!w&&d!=null&&c==null,A=h.useState("hasNullItemLabel",T),N={value:y,placeholder:!w};let C=null;return typeof c=="function"?C=c(y):c!=null?C=c:T&&!A?C=d:Array.isArray(y)?C=rj(y,v,S):C=x1(y,v,S),nt("span",o,{state:N,ref:[a,h.context.valueRef],props:[{children:C},m],stateAttributesMapping:gj})}),bj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,h={open:ds().useState("open")};return nt("span",o,{state:h,ref:a,props:[{"aria-hidden":!0,children:"▼"},d],stateAttributesMapping:Lu})}),vj=b.forwardRef(function(o,a){const i=ds(),l=i.useState("mounted"),c=i.useState("forceMount");return l||c?p.jsx(Yu,{ref:a,...o}):null}),w1=b.createContext(void 0);function T1(){const e=b.useContext(w1);if(!e)throw new Error(kt(59));return e}function bu(e,o){e&&Object.assign(e.style,o)}const E1={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},xj={position:"fixed"},Sj=b.forwardRef(function(o,a){const{anchor:i,className:l,render:c,positionMethod:d,side:g,align:m,sideOffset:h,alignOffset:y,collisionBoundary:v="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:T,disableAnchorTracking:A,alignItemWithTrigger:N=!0,collisionAvoidance:C=GS,style:_,...k}=o,j=ds(),L=m1(),z=j.useState("open"),I=j.useState("mounted"),U=j.useState("modal"),Y=j.useState("value"),B=j.useState("openMethod"),D=j.useState("positionerElement"),M=j.useState("triggerElement"),H=j.useState("isItemEqualToValue"),ee=j.useState("transitionStatus"),$=b.useRef(null),P=b.useRef(null),[q,K]=b.useState(N),Z=I&&q&&B!=="touch";!I&&q!==N&&K(N),b.useImperativeHandle(j.context.alignItemWithTriggerActiveRef,()=>Z),Nm((Z||U)&&z,B==="touch",D,M);const Q=rf({anchor:i,floatingRootContext:L,positionMethod:d,mounted:I,side:g,sideOffset:h,align:m,alignOffset:y,arrowPadding:w,collisionBoundary:v,collisionPadding:S,sticky:T,disableAnchorTracking:A??Z,collisionAvoidance:C,keepMounted:!0}),O=Z?"none":Q.side,F=Z?xj:Q.positionerStyles,J={open:z,side:O,align:Q.align,anchorHidden:Q.anchorHidden};we(()=>{j.set("popupSide",Q.side)},[j,Q.side]);const W=j.useStateSetter("positionerElement"),se=lf(o,J,{styles:F,transitionStatus:ee,props:k,refs:[a,W],hidden:!I,inert:!z}),ie=b.useRef(0),me=Ne(be=>{if(j.context.valuesRef.current.length===0)return;const Ce=ie.current;ie.current=be.size;const Me=qe(ns);if(Ce!==0&&!j.state.multiple&&Y!==null&&su(j.context.valuesRef.current,Y,H)===-1){const ge=j.context.initialValueRef.current,Oe=ge!=null&&su(j.context.valuesRef.current,ge,H)!==-1?ge:null;j.context.setValue(Oe,Me),Oe===null&&(j.set("selectedIndex",null),j.context.selectedItemTextRef.current=null)}if(Ce!==0&&j.state.multiple&&Array.isArray(Y)){const ye=Y.filter(ge=>su(j.context.valuesRef.current,ge,H)!==-1);ye.length!==Y.length&&(j.context.setValue(ye,Me),ye.length===0&&(j.set("selectedIndex",null),j.context.selectedItemTextRef.current=null))}if(z&&Z){j.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};bu(D,ye),bu(j.context.popupRef.current,ye)}}),pe=b.useMemo(()=>({...Q,side:O,alignItemWithTriggerActive:Z,setControlledAlignItemWithTrigger:K,scrollUpArrowRef:$,scrollDownArrowRef:P}),[Q,O,Z,K]);return p.jsx(km,{elementsRef:j.context.listRef,labelsRef:j.context.labelsRef,onMapChange:me,children:p.jsxs(w1.Provider,{value:pe,children:[I&&U&&p.jsx(ff,{inert:vl(!z),cutout:M}),se]})})}),Qc="base-ui-disable-scrollbar",Dh={className:Qc,getElement(e){return p.jsx("style",{nonce:e,href:Qc,precedence:"base-ui:low",children:`.${Qc}{scrollbar-width:none}.${Qc}::-webkit-scrollbar{display:none}`})}},wj=b.createContext(void 0),Tj={disableStyleElements:!1};function Ej(){return b.useContext(wj)??Tj}const i0="--transform-origin",Cj={...dl,...fl},Rj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,finalFocus:d,...g}=o,m=ds(),{multiple:h,readOnly:y,highlightItemOnHover:v}=mf(),S=m1(),{side:w,align:T,alignItemWithTriggerActive:A,isPositioned:N,setControlledAlignItemWithTrigger:C}=T1(),_=uf()!=null,k=af(),{nonce:j,disableStyleElements:L}=Ej(),z=m.useState("id"),I=m.useState("open"),U=m.useState("openMethod"),Y=m.useState("mounted"),B=m.useState("popupProps"),D=m.useState("transitionStatus"),M=m.useState("triggerElement"),H=m.useState("positionerElement"),ee=m.useState("listElement"),$=b.useRef(!1),P=b.useRef(!1),q=b.useRef({}),K=ki(),Z=Ne(J=>{if(!H||!m.context.popupRef.current||!P.current)return;const W=H.style.top==="0px",se=H.style.bottom==="0px";if($.current||!A||!W&&!se){m.context.handleScrollArrowVisibility(J);return}const ie=l0(H),me=Vr(H.getBoundingClientRect().height,"y",ie),pe=We(H),be=Rt(H),Ce=be.getComputedStyle(H),Me=parseFloat(Ce.marginTop),ye=parseFloat(Ce.marginBottom),ge=r0(be.getComputedStyle(m.context.popupRef.current)),Te=Math.min(pe.documentElement.clientHeight-Me-ye,ge),Oe=J.scrollTop,Be=Zc(J);let Ee=null;const Pe=Ie=>{H.style.height=`${Ie}px`},Se=W?Be-Oe:Oe,Re=Math.min(me+Se,Te);if(Se<=Xo){const Ie=Fr(Se,0,Te-me);Ie>0&&Pe(me+Ie),J.scrollTop=W?Be:0,Te-(me+Ie)<=Xo&&($.current=!0),m.context.handleScrollArrowVisibility(J);return}if(Te-Re>Xo)Ee=W?1/0:0;else if(se&&Oe<Be){const Ie=me+Se-Te;Ee=Oe-(Se-Ie)}const ke=Math.ceil(Re);if(ke!==0&&Pe(ke),Ee!=null){const Ie=Fr(Ee,0,Zc(J));Math.abs(J.scrollTop-Ie)>Xo&&(J.scrollTop=Ie)}ke>=Te-Xo&&($.current=!0),m.context.handleScrollArrowVisibility(J)});b.useImperativeHandle(m.context.scrollHandlerRef,()=>Z,[Z]),fs({open:I,ref:m.context.popupRef,onComplete(){I&&m.context.onOpenChangeComplete(!0)}});const Q={open:I,transitionStatus:D,side:w,align:T};we(()=>{!H||!m.context.popupRef.current||Object.keys(q.current).length||(q.current={top:H.style.top||"0",left:H.style.left||"0",right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[m,H]),we(()=>{I||A||(P.current=!1,$.current=!1,bu(H,q.current))},[I,A,H]),we(()=>{const J=m.context.popupRef.current;if(!I||!M||!H||!J||A&&!N||m.state.transitionStatus==="ending")return;if(P.current=!0,J.style.removeProperty(i0),!A){K.request(()=>m.context.handleScrollArrowVisibility(ee||J));return}const W=Aj(J);try{let se=m.context.selectedItemTextRef.current;se?.isConnected||(se=!m.select("hasSelectedValue")&&m.context.firstItemTextRef.current?.isConnected?m.context.firstItemTextRef.current:null);const ie=m.context.valueRef.current,me=Rt(H),pe=me.getComputedStyle(H),be=me.getComputedStyle(J),Ce=We(M),Me=l0(M),ye=Jc(M.getBoundingClientRect(),Me),ge=Jc(H.getBoundingClientRect(),Me),Te=ye.height,Oe=ee||J,Be=Oe.scrollHeight,Ee=parseFloat(be.borderBottomWidth),Pe=parseFloat(pe.marginTop)||10,Se=parseFloat(pe.marginBottom)||10,Re=parseFloat(pe.minHeight)||100,ke=r0(be),Ie=5,je=5,le=20,ve=Ce.documentElement.clientHeight-Pe-Se,he=Ce.documentElement.clientWidth,ce=ve-ye.bottom+Te;let xe,He=k==="rtl"?ye.right-ge.width:ye.left,Lt=0;if(se&&ie){const _t=Jc(ie.getBoundingClientRect(),Me);xe=Jc(se.getBoundingClientRect(),Me),He=ge.left+(k==="rtl"?_t.right-xe.right:_t.left-xe.left);const Ve=_t.top-ye.top+_t.height/2;Lt=xe.top-ge.top+xe.height/2-Ve}const Yt=ce+Lt+Se+Ee;let ut=Math.min(ve,Yt);const Ae=ve-Pe-Se,Ye=Yt-ut,Qe=he-je;H.style.left=`${Fr(He,Ie,Qe-ge.width)}px`,H.style.height=`${ut}px`,H.style.maxHeight="none",H.style.marginTop=`${Pe}px`,H.style.marginBottom=`${Se}px`,J.style.height="100%";const ct=Zc(Oe),en=Ye>=ct-Xo;en&&(ut=Math.min(ve,ge.height)-(Ye-ct));const rn=ye.top<le||ye.bottom>ve-le||Math.ceil(ut)+Xo<Math.min(Be,Re),hn=(me.visualViewport?.scale??1)!==1&&cs;if(rn||hn){bu(H,q.current),C(!1);return}const xt=Math.max(Re,ut);if(en){const _t=Math.max(0,ve-Yt);H.style.top=ge.height>=Ae?"0":`${_t}px`,H.style.height=`${ut}px`,Oe.scrollTop=Zc(Oe)}else H.style.bottom="0",Oe.scrollTop=Ye;if(xe){const _t=ge.top,Ve=ge.height,ft=xe.top+xe.height/2,Dt=Fr(Ve>0?(ft-_t)/Ve*100:50,0,100);J.style.setProperty(i0,`50% ${Dt}%`)}(xt===ve||ut>=ke)&&($.current=!0),m.context.handleScrollArrowVisibility(Oe),v&&m.state.selectedIndex===null&&m.state.activeIndex===null&&m.context.listRef.current[0]!=null&&m.set("activeIndex",0)}finally{W()}},[m,I,H,M,A,C,K,ee,v,k,N]),b.useEffect(()=>{if(!A||!H||!I)return;const J=Rt(H);function W(se){m.context.setOpen(!1,qe(UA,se))}return Ge(J,"resize",W)},[m,A,H,I]);const O={...ee?{role:"presentation"}:{role:"listbox","aria-multiselectable":h||void 0,"aria-readonly":y||void 0,id:`${z}-list`},onKeyDown(J){_&&xl.has(J.key)&&J.stopPropagation()},onScroll(J){ee||Z(J.currentTarget)},...A&&{style:ee?{height:"100%"}:E1},className:!ee&&A?Dh.className:void 0},F=nt("div",o,{ref:[a,m.context.popupRef],state:Q,stateAttributesMapping:Cj,props:[B,O,bl(D),g]});return p.jsxs(b.Fragment,{children:[!L&&Dh.getElement(j),p.jsx(qu,{context:S,modal:!1,disabled:!Y,openInteractionType:U,returnFocus:d,restoreFocus:!0,children:F})]})});function r0(e){const o=e.maxHeight;return o.endsWith("px")&&parseFloat(o)||1/0}function Zc(e){return S1(e.scrollHeight,e.clientHeight)}function l0(e){return iw.getScale(e)}function Vr(e,o,a){return e/a[o]}function Jc(e,o){return Zr({x:Vr(e.x,"x",o),y:Vr(e.y,"y",o),width:Vr(e.width,"x",o),height:Vr(e.height,"y",o)})}const c0=[["transform","none"],["scale","1"],["translate","0 0"]];function Aj(e){const{style:o}=e,a={};for(const[i,l]of c0)a[i]=o.getPropertyValue(i),o.setProperty(i,l,"important");return()=>{for(const[i]of c0){const l=a[i];l?o.setProperty(i,l):o.removeProperty(i)}}}const Oj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,g=ds(),{multiple:m,readOnly:h}=mf(),{alignItemWithTriggerActive:y}=T1(),v=g.useState("hasScrollArrows"),S=g.useState("openMethod"),T={id:`${g.useState("id")}-list`,role:"listbox","aria-multiselectable":m||void 0,"aria-readonly":h||void 0,onScroll(N){g.context.scrollHandlerRef.current?.(N.currentTarget)},...y&&{style:E1},className:v&&S!=="touch"?Dh.className:void 0},A=g.useStateSetter("listElement");return nt("div",o,{ref:[a,A],props:[T,d]})}),C1=b.createContext(void 0);function Ym(){const e=b.useContext(C1);if(!e)throw new Error(kt(57));return e}const kj=b.memo(b.forwardRef(function(o,a){const{render:i,className:l,style:c,value:d=null,label:g,disabled:m=!1,nativeButton:h=!1,...y}=o,v=b.useRef(null),S=cf({guess:!0,label:g,textRef:v}),w=ds(),{itemProps:T,multiple:A,disabled:N,readOnly:C}=mf(),_=N||m,k=w.useState("isActive",S.index),j=w.useState("open"),L=w.useState("isSelected",d),z=w.useState("isSelectedByFocus",S.index),I=w.useState("isItemEqualToValue"),U=S.index,Y=b.useRef(null);we(()=>{const Q=w.context.valuesRef.current;return Q[U]=d,()=>{delete Q[U]}},[U,d,w]),we(()=>{const Q=w.state.value,O=w.state.selectedIndex;let F=O,J;A&&Array.isArray(Q)?(F=nj(U,d,w.context.valuesRef.current,Q,I,O),J=F===U,U===O&&!J&&(w.context.selectedItemTextRef.current=null)):(J=Q!==void 0&&Na(d,Q,I),J&&(F=U)),w.set("selectedIndex",F),J&&v.current&&(w.context.selectedItemTextRef.current=v.current)},[U,A,I,w,d]);const B=b.useRef("mouse"),D=b.useRef(!1),{getButtonProps:M,buttonRef:H}=Co({disabled:_,focusableWhenDisabled:!0,native:h,composite:!0}),ee={disabled:_,selected:L,highlighted:k};function $(Q){if(N||C)return;const O=w.state.value;if(A){const F=Array.isArray(O)?O:[],J=L?oj(F,d,I):[...F,d];w.context.setValue(J,qe(Yr,Q))}else w.context.setValue(d,qe(Yr,Q)),w.context.setOpen(!1,qe(Yr,Q))}function P(){w.context.selectionRef.current.dragY=0}const q={role:"option","aria-selected":L,tabIndex:j&&k?0:-1,onKeyDown(Q){w.set("activeIndex",U),Q.key===" "&&w.context.typingRef.current&&Q.preventDefault()},onClick(Q){const O=B.current!=="touch",F=Q.nativeEvent.pointerType,J=O&&Mu(Q.nativeEvent)&&(F!==void 0||k),W=O&&!J&&!D.current;D.current=!1,!(_||W)&&$(Q.nativeEvent)},onPointerEnter(Q){B.current=Q.pointerType},onPointerMove(Q){if(Q.pointerType==="mouse"&&Q.buttons===1){const O=w.context.selectionRef.current;O.dragY+=Q.movementY,O.dragY**2>=64&&(O.allowUnselectedMouseUp=!0)}},onPointerDown(Q){B.current=Q.pointerType,D.current=!0,P()},onMouseUp(){if(P(),_||B.current==="touch"||D.current)return;const Q=!w.context.selectionRef.current.allowSelectedMouseUp&&L,O=!w.context.selectionRef.current.allowUnselectedMouseUp&&!L;Q||O||(D.current=!0,Y.current?.click(),D.current=!1)}},K=nt("div",o,{ref:[H,a,S.ref,Y],state:ee,props:[T,q,y,M]}),Z=b.useMemo(()=>({selected:L,index:U,textRef:v,selectedByFocus:z}),[L,U,v,z]);return p.jsx(C1.Provider,{value:Z,children:K})})),Nj=b.forwardRef(function(o,a){const{selected:i}=Ym();return o.keepMounted||i?p.jsx(Mj,{...o,ref:a}):null}),Mj=b.memo(b.forwardRef((e,o)=>{const{render:a,className:i,style:l,keepMounted:c,...d}=e,{selected:g}=Ym(),m=b.useRef(null),{transitionStatus:h,setMounted:y}=mm(g),S=nt("span",e,{ref:[o,m],state:{selected:g,transitionStatus:h},props:[{"aria-hidden":!0,children:"✔️"},d],stateAttributesMapping:fl});return fs({batch:!0,enabled:!g,open:g,ref:m,onComplete(){g||y(!1)}}),S})),jj=b.memo(b.forwardRef(function(o,a){const{index:i,textRef:l,selectedByFocus:c}=Ym(),d=ds(),{render:g,className:m,style:h,...y}=o,v=b.useCallback(w=>{w&&(i===0&&(d.context.firstItemTextRef.current=w),c&&(d.context.selectedItemTextRef.current=w))},[d,i,c]);return nt("div",o,{ref:[v,a,l],props:y})})),R1=b.createContext(void 0);function _j(){const e=b.useContext(R1);if(e===void 0)throw new Error(kt(63));return e}const Dj="data-checked",zj="data-unchecked",A1={...c1,checked(e){return e?{[Dj]:""}:{[zj]:""}}};function Pj(e,o,a,i=!0,l){const[c,d]=b.useState(),g=mo(l?`${l}-label`:void 0),m=e??o??c;return we(()=>{const h=e||o||!i?void 0:Lj(a.current,g);c!==h&&d(h)}),m}function Lj(e,o){const a=Ij(e);if(a)return!a.id&&o&&(a.id=o),a.id||void 0}function Ij(e){if(!e)return;const o=e.parentElement;if(o&&o.tagName==="LABEL")return o;const a=e.id;if(a){const l=e.nextElementSibling;if(l&&l.htmlFor===a)return l}const i=e.labels;return i&&i[0]}const Hj=b.forwardRef(function(o,a){const{checked:i,className:l,defaultChecked:c,"aria-labelledby":d,form:g,id:m,inputRef:h,name:y,nativeButton:v=!1,onCheckedChange:S,readOnly:w=!1,required:T=!1,disabled:A=!1,render:N,uncheckedValue:C,value:_,style:k,...j}=o,{clearErrors:L}=u1(),{state:z,setTouched:I,setDirty:U,validityData:Y,setFilled:B,setFocused:D,validationMode:M,disabled:H,name:ee,validation:$}=hf(),{labelId:P}=Fm(),q=H||A,K=ee??y,Z=b.useRef(null),Q=ss(Z,h,$.inputRef),O=b.useRef(null),F=mo(),J=Vm({id:m}),W=v?void 0:J,[se,ie]=el({controlled:i,default:!!c,name:"Switch",state:"checked"});f1(O,F,se,void 0,!q,y),we(()=>{B(se)},[se,B]),jm(se,()=>{L(K),U(se!==Y.initialValue),$.change(se)});const{getButtonProps:me,buttonRef:pe}=Co({disabled:q,native:v}),be=Pj(d,P,Z,!v,W),Ce={id:v?J:F,role:"switch","aria-checked":se,"aria-readonly":w||void 0,"aria-required":T||void 0,"aria-labelledby":be,onFocus(){q||D(!0)},onBlur(){const Te=Z.current;!Te||q||(I(!0),D(!1),M==="onBlur"&&$.commit(Te.checked))},onClick(Te){if(w||q)return;Te.preventDefault();const Oe=Z.current;Oe&&Xr(Oe,Te)}},Me={...$.getValidationProps(q),checked:se,disabled:q,form:g,id:W,name:K,required:T,style:K?CS:Fu,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:Q,onChange(Te){if(Te.nativeEvent.defaultPrevented)return;if(w){Te.preventDefault();return}const Oe=Te.currentTarget.checked,Be=qe(ns,Te.nativeEvent);S?.(Oe,Be),!Be.isCanceled&&ie(Oe)},onClick(Te){Te.stopPropagation()},onFocus(){O.current?.focus()},..._!==void 0?{value:_}:Ct},ye=b.useMemo(()=>({...z,checked:se,disabled:q,readOnly:w,required:T}),[z,se,q,w,T]),ge=nt("span",o,{state:ye,ref:[a,O,pe],props:[Ce,j,me,Te=>$.getValidationProps(q,Te)],stateAttributesMapping:A1});return p.jsxs(R1.Provider,{value:ye,children:[ge,!se&&K&&C!==void 0&&p.jsx("input",{type:"hidden",form:g,name:K,value:C,disabled:q}),p.jsx("input",{...Me,suppressHydrationWarning:!0})]})}),Uj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,g=_j();return nt("span",o,{state:g,ref:a,stateAttributesMapping:A1,props:d})}),O1="data-composite-item-active";function Bj(e){const{loopFocus:o=!0,orientation:a="both",grid:i,onLoop:l,direction:c,highlightedIndex:d,onHighlightedIndexChange:g,rootRef:m,enableHomeAndEndKeys:h=!1,stopEventPropagation:y,disabledIndices:v,modifierKeys:S=ho}=e,[w,T]=b.useState(0),A=i!=null,N=b.useRef(null),C=ss(N,m),_=b.useRef([]),k=b.useRef(!1),j=b.useRef(null),L=d??w,z=Ne((D,M=!1)=>{if(j.current=_.current[D]??null,(g??T)(D),M){const H=_.current[D];Qx(N.current,H,c,a)}}),I=Ne(D=>{if(D.size===0)return;if(k.current){const $=_.current,P=$.indexOf(j.current);if(P===-1){const q=$[L];!q||Ei($,L,v)?z(Fj($,v)):j.current=q}else P!==L&&z(P);return}k.current=!0;const M=Array.from(D.keys()),H=M.find($=>$?.hasAttribute(O1))??null,ee=H?D.get(H)?.index??-1:-1;if(ee!==-1)z(ee);else if(Ei(M,L,v)){const $=$o(M,{disabledIndices:v});qr(M,$)||z($)}Qx(N.current,H,c,a)});we(()=>{if(v==null||d!=null||!k.current)return;const D=_.current;if(Ei(D,L,v)){const M=$o(D,{disabledIndices:v});qr(D,M)||z(M)}},[v,d,L,_,z]);const U=Ne((D,M,H)=>l?l(D,M,H,_):H),Y=Ne(D=>{const M=D.key===Oh||D.key===kh;if(!xl.has(D.key)||!h&&M||Vj(D,S)||!N.current)return;const ee=c==="rtl",$=ee?Rh:Ah,P=ee?Ah:Rh,q=a==="vertical"?Ch:$,K=a==="vertical"?Eh:P,Z=Pt(D.nativeEvent);if(Z!=null&&Wx(Z)&&!Xw(Z)){const se=Z.selectionStart,ie=Z.selectionEnd,me=Z.value;if(se==null||D.shiftKey||se!==ie||D.key!==K&&se<me.length||D.key!==q&&se>0)return}let Q=L;const O=tu(_,v),F=xh(_,v);i!=null&&(Q=i({disabledIndices:v,elementsRef:_,event:D,highlightedIndex:L,loopFocus:o,maxIndex:F,minIndex:O,onLoop:U,orientation:a,rtl:ee}));const J=a!=="vertical"&&D.key===$||a!=="horizontal"&&D.key===Ch,W=a!=="vertical"&&D.key===P||a!=="horizontal"&&D.key===Eh;h&&(D.key===Oh?Q=O:D.key===kh&&(Q=F)),Q===L&&(J||W)&&(o&&Q===F&&J?(Q=O,l&&(Q=l(D,L,Q,_))):o&&Q===O&&W?(Q=F,l&&(Q=l(D,L,Q,_))):Q=$o(_.current,{startingIndex:Q,decrement:W,disabledIndices:v})),Q!==L&&!qr(_.current,Q)&&(y&&D.stopPropagation(),(A||M||J||W)&&D.preventDefault(),z(Q,!0),queueMicrotask(()=>{_.current[Q]?.focus()}))});return{props:{ref:C,onFocus(D){const M=N.current,H=Pt(D.nativeEvent);!M||H==null||!Wx(H)||H.setSelectionRange(0,H.value.length)},onKeyDown:Y},highlightedIndex:L,onHighlightedIndexChange:z,elementsRef:_,onMapChange:I,relayKeyboardEvent:Y}}function Fj(e,o){let a=-1;for(let i=0;i<e.length;i+=1){const l=e[i];if(!(!l||Ei(e,i,o))){if(l.hasAttribute(O1))return i;a===-1&&(a=i)}}return Math.max(a,0)}function Vj(e,o){for(const a of Vk)if(!o.includes(a)&&e.getModifierState(a))return!0;return!1}function Yj(e){const{render:o,className:a,style:i,refs:l=ho,props:c=ho,state:d=Ct,stateAttributesMapping:g,highlightedIndex:m,onHighlightedIndexChange:h,orientation:y,grid:v,loopFocus:S,onLoop:w,enableHomeAndEndKeys:T,onMapChange:A,stopEventPropagation:N=!0,rootRef:C,disabledIndices:_,modifierKeys:k,highlightItemOnHover:j=!1,tag:L="div",...z}=e,I=af(),{props:U,highlightedIndex:Y,onHighlightedIndexChange:B,elementsRef:D,onMapChange:M,relayKeyboardEvent:H}=Bj({grid:v,loopFocus:S,onLoop:w,orientation:y,highlightedIndex:m,onHighlightedIndexChange:h,rootRef:C,stopEventPropagation:N,enableHomeAndEndKeys:T,direction:I,disabledIndices:_,modifierKeys:k}),ee=nt(L,e,{state:d,ref:l,props:[U,...c,z],stateAttributesMapping:g}),$=b.useMemo(()=>({highlightedIndex:Y,onHighlightedIndexChange:B,highlightItemOnHover:j,relayKeyboardEvent:H}),[Y,B,j,H]);return p.jsx(Nw.Provider,{value:$,children:p.jsx(km,{elementsRef:D,onMapChange:P=>{A?.(P),M(P)},children:ee})})}const qj=b.createContext(void 0);function Gj(){return b.useContext(qj)}const k1=b.createContext(void 0);function Xj(){return b.useContext(k1)}const Kj=b.forwardRef(function(o,a){const{defaultValue:i,disabled:l=!1,loopFocus:c=!0,onValueChange:d,orientation:g="horizontal",multiple:m=!1,value:h,className:y,render:v,style:S,...w}=o,T=uf(),A=Gj(),N=i??ho,C=h!==void 0||i!==void 0,_=(T?.disabled??!1)||(A?.disabled??!1)||l,[k,j]=el({controlled:h,default:N,name:"ToggleGroup",state:"value"}),L=Ne((B,D,M)=>{let H;m?(H=k.slice(),D?H.push(B):H.splice(k.indexOf(B),1)):H=D?[B]:[],d?.(H,M),!M.isCanceled&&j(H)}),z={disabled:_,multiple:m,orientation:g},I=b.useMemo(()=>({disabled:_,setGroupValue:L,value:k,isValueInitialized:C}),[_,L,k,C]),U={role:"group"},Y=nt("div",o,{enabled:!!T,state:z,ref:a,props:[U,w]});return p.jsx(k1.Provider,{value:I,children:T?Y:p.jsx(Yj,{render:v,className:y,style:S,state:z,refs:[a],props:[U,w],loopFocus:c,enableHomeAndEndKeys:!0,orientation:g})})}),$j=b.forwardRef(function(o,a){const{className:i,defaultPressed:l=!1,disabled:c=!1,form:d,onPressedChange:g,pressed:m,render:h,type:y,value:v,nativeButton:S=!0,style:w,...T}=o,A=mo(v||void 0),N=Xj(),C=N?.value??[],_=(c||N?.disabled)??!1,[k,j]=el({controlled:N?A!==void 0&&C.indexOf(A)>-1:m,default:l,name:"Toggle",state:"pressed"}),{getButtonProps:L,buttonRef:z}=Co({disabled:_,native:S}),I={disabled:_,pressed:k},U=[z,a],Y=[{"aria-pressed":k,onClick(M){const H=!k,ee=qe(ns,M.nativeEvent);g?.(H,ee),!ee.isCanceled&&(A&&N?.setGroupValue?.(A,H,ee),!ee.isCanceled&&j(H))}},T,L],B=nt("button",o,{enabled:!N,state:I,ref:U,props:Y}),D=b.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return N?p.jsx(Vw,{tag:"button",render:h,className:i,style:w,metadata:D,state:I,refs:U,props:Y}):B}),N1="h-7 w-full min-w-0 rounded-control border border-line bg-surface-2 px-2 text-[13px] text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:bg-surface",ol=b.forwardRef(function({className:o,...a},i){return p.jsx("input",{ref:i,"data-ui-field":"",className:lt(N1,o),...a})});function Wj({value:e,options:o,onChange:a,placeholder:i="—",className:l,...c}){return p.jsxs(uj,{value:e,onValueChange:d=>d!==null&&a(d),children:[p.jsxs(mj,{"aria-label":c["aria-label"],"data-ui-field":"",className:lt(N1,"flex items-center justify-between gap-1 text-left",l),children:[p.jsx(yj,{children:d=>o.find(g=>g.value===d)?.label??p.jsx("span",{className:"text-fg-subtle",children:i})}),p.jsx(bj,{children:p.jsx(ka,{className:"size-3.5 text-fg-subtle"})})]}),p.jsx(vj,{children:p.jsx(Sj,{sideOffset:4,className:"z-[1000]",alignItemWithTrigger:!1,children:p.jsx(Rj,{className:lt(Bm,"max-h-80 overflow-auto"),children:p.jsx(Oj,{children:o.map(d=>p.jsxs(kj,{value:d.value,className:"flex h-7 min-w-32 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover",children:[p.jsx("span",{className:"flex size-4 items-center justify-center",children:p.jsx(Nj,{children:p.jsx(Li,{className:"size-3.5"})})}),p.jsx(jj,{children:d.label})]},d.value))})})})})]})}function Qj({value:e,options:o,onChange:a,onRepick:i,className:l,...c}){return p.jsx(Kj,{value:e===null?[]:[e],onValueChange:d=>{const g=d[0];g!==void 0?a(g):e!==null&&i?.(e)},"aria-label":c["aria-label"],"data-ui-field":"",className:lt("flex h-7 items-center gap-0.5 rounded-control bg-surface-2 p-0.5",l),children:o.map(d=>p.jsx($j,{value:d.value,"aria-label":d.title,title:d.title,className:"flex h-full flex-1 items-center justify-center whitespace-nowrap rounded-[4px] px-1.5 text-fg-muted outline-none hover:text-fg data-[pressed]:bg-surface data-[pressed]:text-fg data-[pressed]:shadow-sm focus-visible:outline-2 focus-visible:outline-accent",children:d.label},d.value))})}function M1({checked:e,onChange:o,disabled:a,...i}){return p.jsx(Hj,{checked:e,disabled:a,onCheckedChange:l=>o(l),onKeyDown:Mi,"aria-label":i["aria-label"],className:"relative inline-flex h-4 w-7 shrink-0 items-center rounded-full bg-line-strong p-0.5 transition-colors data-[checked]:bg-accent disabled:opacity-40",children:p.jsx(Uj,{className:"size-3 rounded-full bg-white shadow transition-transform data-[checked]:translate-x-3"})})}function Zj(e,o){const a=Rt(e).getComputedStyle(e).transform;let i=0,l=0,c=1;if(a&&a!=="none"){const d=a.match(/matrix(?:3d)?\(([^)]+)\)/);if(d){const g=d[1].split(", ").map(parseFloat);g.length===6?(i=g[4],l=g[5],c=Math.sqrt(g[0]*g[0]+g[1]*g[1])):g.length===16&&(i=g[12],l=g[13],c=g[0])}}return{x:i,y:l,scale:c}}const j1=b.createContext(void 0);function gf(){const e=b.useContext(j1);if(!e)throw new Error(kt(73));return e}let u0=0;function _1(e){return u0+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${u0}`}function eh(e,o){if(typeof e=="string")return{description:e};if(typeof e=="function"){const a=e(o);return typeof a=="string"?{description:a}:a}return e}function th(e){const o=new Map;let a=0,i=0;return e.forEach((l,c)=>{const d=l.transitionStatus==="ending";o.set(l.id,{value:l,domIndex:c,visibleIndex:d?-1:a,offsetY:i}),i+=l.height||0,d||(a+=1)}),o}function nh(e,o){let a=0;return e.map(i=>{if(i.transitionStatus==="ending")return i;const l=a>=o;return a+=1,i.limited===l?i:{...i,limited:l}})}const fo={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,o)=>e.toastMetadata.get(o)?.value,toastIndex:(e,o)=>e.toastMetadata.get(o)?.domIndex??-1,toastOffsetY:(e,o)=>e.toastMetadata.get(o)?.offsetY??0,toastVisibleIndex:(e,o)=>e.toastMetadata.get(o)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement};class Jj extends Da{timers=new Map;areTimersPaused=!1;constructor(o){super({...o,toastMetadata:th(o.toasts)},{},fo)}setViewport=o=>{this.set("viewport",o)};syncProviderProps(o,a){const i=this.state.limit!==a;if(this.state.timeout===o&&!i)return;const l={timeout:o,limit:a};if(i){const c=nh(this.state.toasts,a);l.toasts=c,l.toastMetadata=th(c)}this.update(l)}disposeEffect=()=>()=>{this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear()};removeToast(o,a=!1){const i=fo.toastIndex(this.state,o);if(i===-1)return;const l=this.state.toasts[i];a||l?.onRemove?.();const c=[...this.state.toasts];c.splice(i,1),this.setToasts(c)}addToast=o=>{const{timeout:a,limit:i}=this.state,l=o.id||_1("toast");if(o.id){const m=fo.toast(this.state,o.id);if(m)if(m.transitionStatus==="ending")this.removeToast(o.id,!0);else{const{id:h,transitionStatus:y,...v}=o;return this.updateToastInternal(o.id,v,!0,!0),o.id}}const c={...o,id:l,updateKey:0,transitionStatus:"starting"},d=[c,...this.state.toasts];this.setToasts(nh(d,i));const g=c.timeout??a;return c.type!=="loading"&&g>0&&this.scheduleTimer(l,g,()=>this.closeToast(l)),fo.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),l};updateToast=(o,a)=>{const i=fo.toast(this.state,o);!i||i.transitionStatus==="ending"||this.updateToastInternal(o,typeof a=="function"?a(i):a,!1,!0)};updateToastInternal=(o,a,i=!1,l=!1)=>{const{timeout:c,toasts:d}=this.state,g=fo.toast(this.state,o);if(!g||g.transitionStatus==="ending")return;const m={...g,...a,...l&&{updateKey:g.updateKey+1}};this.setToasts(d.map(N=>N.id===o?m:N));const h=m.timeout??c,y=g.timeout??c,v=Object.hasOwn(a,"timeout"),S=m.transitionStatus!=="ending"&&m.type!=="loading"&&h>0,w=this.timers.has(o),T=y!==h,A=g.type==="loading";if(!S&&w){this.clearTimer(o);return}S&&(!w||T||v||A||i)&&(this.clearTimer(o),this.scheduleTimer(o,h,()=>this.closeToast(o)),fo.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=o=>{const a=o===void 0,{limit:i,toasts:l}=this.state;let c;if(a)c=l,this.clearTimers();else{const m=fo.toast(this.state,o);if(!m)return;c=[m],this.clearTimer(o)}const d=l.map(m=>a||m.id===o?{...m,transitionStatus:"ending",height:0}:m),g=nh(d,i);this.setToasts(g,!g.some(m=>m.transitionStatus!=="ending")),c.forEach(m=>{m.transitionStatus!=="ending"&&m.onClose?.()}),this.handleFocusManagement(o)};promiseToast=(o,a)=>{const i=eh(a.loading),l=this.addToast({...i,type:"loading"}),c=o.then(d=>{const g=eh(a.success,d);return this.updateToast(l,{...g,type:"success",timeout:g.timeout}),d}).catch(d=>{const g=eh(a.error,d);return this.updateToast(l,{...g,type:"error",timeout:g.timeout}),Promise.reject(d)});return{}.hasOwnProperty.call(a,"setPromise")&&a.setPromise(c),c};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(o=>{o.timeout&&(o.timeout.clear(),o.remaining=Math.max(o.remaining-(Date.now()-o.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((o,a)=>{o.remaining=o.remaining>0?o.remaining:o.delay,o.timeout??=Mn.create(),o.timeout.start(o.remaining,()=>{this.handleTimerFired(a),o.callback()}),o.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=o=>{if(o.pointerType!=="touch")return;const a=Pt(o);De(this.state.viewport,a)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(o,a,i){const l=Date.now(),d=!fo.expandedOrOutOfFocus(this.state)?Mn.create():void 0;d?.start(a,()=>{this.handleTimerFired(o),i()}),this.timers.set(o,{timeout:d,start:l,delay:a,remaining:a,callback:i})}clearTimers(){this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(o){this.timers.get(o)?.timeout?.clear(),this.timers.delete(o),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(o){this.timers.delete(o),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(o,a=o.length===0){const i={toasts:o,toastMetadata:th(o)};a&&(i.hovering=!1,i.focused=!1),this.update(i)}handleFocusManagement(o){const a=nn(We(this.state.viewport));if(!this.state.viewport||!De(this.state.viewport,a)||!lu(a))return;if(o===void 0){this.restoreFocusToPrevElement();return}const i=fo.toasts(this.state),l=fo.toastIndex(this.state,o),c=(g,m)=>{for(let h=g;h>=0&&h<i.length;h+=m)if(i[h].transitionStatus!=="ending")return i[h];return null},d=c(l+1,1)??c(l-1,-1);d?d.ref?.current?.focus():this.restoreFocusToPrevElement()}}const e_=function(o){const{children:a,timeout:i=5e3,limit:l=3,toastManager:c}=o,d=Zt(()=>new Jj({timeout:i,limit:l,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Ou(d.disposeEffect),b.useEffect(function(){return c?c[" subscribe"](({action:h,options:y})=>{const v=y.id;h==="promise"&&y.promise?d.promiseToast(y.promise,y):h==="update"&&v?d.updateToast(v,y.updates):h==="close"?d.closeToast(v):d.addToast(y)}):void 0},[d,c]),p.jsxs(j1.Provider,{value:d,children:[p.jsx(t_,{store:d,timeout:i,limit:l}),a]})};function t_(e){const{store:o,timeout:a,limit:i}=e;return we(()=>{o.syncProviderProps(a,i)},[o,a,i]),null}const n_="--toast-frontmost-height",o_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,children:d,...g}=o,m=gf(),h=on(),y=b.useRef(!1),v=b.useRef(!1),S=b.useRef(!1),w=m.useState("isEmpty"),T=m.useState("toasts"),A=m.useState("focused"),N=m.useState("expanded"),C=m.useState("prevFocusElement"),_=T[0]?.height,k=T.some(Z=>Z.transitionStatus==="ending"),j=T.filter(Z=>Z.priority==="high");b.useEffect(()=>{const Z=m.state.viewport;if(!Z||w)return;const Q=Rt(Z),O=We(Z);function F(se){se.key==="F6"&&Pt(se)!==Z&&(se.preventDefault(),m.set("prevFocusElement",nn(O)),Z?.focus({preventScroll:!0}),m.pauseTimers(),m.set("focused",!0))}function J(se){Pt(se)===Q&&(m.set("isWindowFocused",!1),m.pauseTimers())}function W(se){if(se.relatedTarget)return;const ie=Pt(se),me=nn(We(Z));(ie===Q||!De(Z,ie)||!lu(me))&&m.resumeTimers(),h.start(0,()=>m.set("isWindowFocused",!0))}return po(Ge(Q,"keydown",F),Ge(Q,"blur",J,!0),Ge(Q,"focus",W,!0),Ge(O,"pointerdown",m.handleDocumentPointerDown,!0))},[m,h,w]);function L(Z){y.current=!0;const Q=Z.relatedTarget===m.state.viewport?T.find(O=>O.transitionStatus!=="ending"&&!O.limited):void 0;Q?Q.ref?.current?.focus():m.restoreFocusToPrevElement()}function z(Z){Z.key==="Tab"&&Z.shiftKey&&Pt(Z.nativeEvent)===m.state.viewport&&(Z.preventDefault(),m.restoreFocusToPrevElement())}function I(){m.state.toasts.some(Q=>Q.transitionStatus==="ending")||S.current||!v.current||(m.state.isWindowFocused&&m.resumeTimers(),m.set("hovering",!1),v.current=!1)}b.useEffect(I,[k,m]);function U(){m.pauseTimers(),m.set("hovering",!0),v.current=!1}function Y(){m.state.isWindowFocused&&m.resumeTimers()}function B(){v.current=!0,I()}function D(Z){Z.pointerType==="touch"&&(S.current=!0)}function M(Z){Z.pointerType==="touch"&&(S.current=!1,I())}function H(){if(y.current){y.current=!1;return}A||lu(nn(We(m.state.viewport)))&&(m.set("focused",!0),m.pauseTimers())}function ee(Z){!A||De(m.state.viewport,Z.relatedTarget)||(m.set("focused",!1),Y())}const $={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:U,onMouseMove:U,onMouseLeave:B,onFocus:H,onBlur:ee,onKeyDown:z,onClick:H,onPointerDown:D,onPointerUp:M,onPointerCancel:M,style:{[n_]:_?`${_}px`:void 0}},P={expanded:N},q=!w&&C&&p.jsx(as,{onFocus:L}),K=nt("div",o,{ref:[a,m.setViewport],state:P,props:[$,g,{children:p.jsxs(b.Fragment,{children:[q,d,q]})}]});return p.jsxs(b.Fragment,{children:[q,K,!A&&j.length>0&&p.jsx("div",{style:Fu,children:j.map(Z=>p.jsxs("div",{role:"alert","aria-atomic":!0,children:[p.jsx("div",{children:Z.title}),p.jsx("div",{children:Z.description})]},Z.id))})]})}),D1=b.createContext(void 0);function yf(){const e=b.useContext(D1);if(!e)throw new Error(kt(66));return e}function oh(e,o,a){switch(e){case"up":return-a;case"down":return a;case"left":return-o;case"right":return o;default:return 0}}const s_="--toast-index",a_="--toast-offset-y",i_="--toast-height",r_="--toast-swipe-movement-x",l_="--toast-swipe-movement-y",c_="data-swipe-direction",u_={...fl,swipeDirection(e){return e?{[c_]:e}:null}},f0=40,f_=10,d0=.5,d_=1,p_=`${PO},${LO}`,h_=b.forwardRef(function(o,a){const{toast:i,render:l,className:c,swipeDirection:d=["down","right"],style:g,...m}=o,h=i.positionerProps?.anchor!==void 0;let y=[];h||(y=Array.isArray(d)?d:[d]);const v=y.length>0,S=gf(),[w,T]=b.useState(void 0),[A,N]=b.useState(!1),[C,_]=b.useState(!1),[k,j]=b.useState({x:0,y:0}),[L,z]=b.useState({x:0,y:0,scale:1}),[I,U]=b.useState(),[Y,B]=b.useState(),[D,M]=b.useState(null),H=b.useRef(null),ee=b.useRef(void 0),$=b.useRef({x:0,y:0}),P=b.useRef({x:0,y:0,scale:1}),q=b.useRef(void 0),K=b.useRef(0),Z=b.useRef(!1),Q=b.useRef({x:0,y:0}),O=b.useRef(!1),F=b.useRef({x:0,y:0}),J=b.useRef(null),W=b.useRef(null),se=S.useState("toastIndex",i.id),ie=S.useState("toastVisibleIndex",i.id),me=S.useState("toastOffsetY",i.id),pe=S.useState("focused"),be=S.useState("expanded");fs({open:i.transitionStatus!=="ending",ref:H,onComplete(){i.transitionStatus==="ending"&&S.removeToast(i.id)}});const Ce=Ne((je=!1)=>{const le=H.current;if(!le)return;const ve=le.style.height;le.style.height="auto";const he=le.offsetHeight;le.style.height=ve;function ce(){S.updateToastInternal(i.id,{ref:H,height:he,transitionStatus:void 0})}je?so.flushSync(ce):ce()});we(()=>{const je=ee.current;i.transitionStatus!=="starting"&&je===i.id||(je!==void 0&&(T(void 0),z({x:0,y:0,scale:1}),Me({x:0,y:0})),ee.current=i.id,Ce())},[Ce,i.id,i.transitionStatus]);function Me(je){F.current=je,j(je)}we(()=>()=>{W.current?.abort()},[]);function ye(je,le){const ve=xe=>xe>0?xe**d0:-(Math.abs(xe)**d0),he=je>0&&!y.includes("right")||je<0&&!y.includes("left"),ce=le>0&&!y.includes("down")||le<0&&!y.includes("up");return{x:he?ve(je):je,y:ce?ve(le):le}}const ge=Ne(je=>{if(je.pointerId!==J.current)return;J.current=null,W.current?.abort(),W.current=null,N(!1),_(!1),M(null);const le=P.current;if(je.type==="pointercancel"||Z.current){Me({x:le.x,y:le.y}),T(void 0);return}const ve=F.current,he=ve.x-le.x,ce=ve.y-le.y;let xe;for(const He of y)if(oh(He,he,ce)>f0){xe=He;break}xe?(T(xe),S.closeToast(i.id)):(Me({x:le.x,y:le.y}),T(void 0))});function Te(je){if(je.button!==0||(je.pointerType==="touch"&&S.pauseTimers(),Pt(je.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${p_}`)))return;Z.current=!1,q.current=void 0,K.current=0,J.current=je.pointerId,$.current={x:je.clientX,y:je.clientY},Q.current=$.current;const he=je.currentTarget,ce=Zj(he);P.current=ce,z(ce),Me({x:ce.x,y:ce.y}),S.set("hovering",!0),N(!0),_(!1),M(null),O.current=!0,W.current?.abort();const xe=new AbortController;W.current=xe;const He=We(he);He.addEventListener("pointerup",ge,{signal:xe.signal}),He.addEventListener("pointercancel",ge,{signal:xe.signal}),he.setPointerCapture?.(je.pointerId)}function Oe(je){if(je.pointerId!==J.current)return;je.preventDefault(),O.current&&($.current={x:je.clientX,y:je.clientY},O.current=!1);const{clientY:le,clientX:ve,movementX:he,movementY:ce}=je;(ce<0&&le>Q.current.y||ce>0&&le<Q.current.y)&&(Q.current={x:Q.current.x,y:le}),(he<0&&ve>Q.current.x||he>0&&ve<Q.current.x)&&(Q.current={x:ve,y:Q.current.y});const xe=ve-$.current.x,He=le-$.current.y,Lt=le-Q.current.y,Yt=ve-Q.current.x;let ut=D;if(!C&&Math.sqrt(xe*xe+He*He)>=d_){_(!0);const xt=y.includes("left")||y.includes("right"),_t=y.includes("up")||y.includes("down");if(xt&&_t){const Ve=Math.abs(xe),ft=Math.abs(He);ut=Ve>ft?"horizontal":"vertical",M(ut)}}let Ae;if(!q.current)ut==="vertical"?He>0?Ae="down":He<0&&(Ae="up"):ut==="horizontal"?xe>0?Ae="right":xe<0&&(Ae="left"):Math.abs(xe)>=Math.abs(He)?Ae=xe>0?"right":"left":Ae=He>0?"down":"up",Ae&&y.includes(Ae)&&(q.current=Ae,K.current=oh(Ae,xe,He),T(Ae));else{const hn=q.current,xt=oh(hn,Yt,Lt);xt>f0?(Z.current=!1,T(hn)):!(y.includes("left")&&y.includes("right"))&&!(y.includes("up")&&y.includes("down"))&&K.current-xt>=f_&&(Z.current=!0)}const Ye=ye(xe,He);let Qe=P.current.x,ct=P.current.y;const en=y.includes("left")||y.includes("right"),rn=y.includes("up")||y.includes("down");ut!=="vertical"&&en&&(Qe+=Ye.x),ut!=="horizontal"&&rn&&(ct+=Ye.y),Me({x:Qe,y:ct})}function Be(je){if(je.key==="Escape"){if(!H.current||!De(H.current,nn(We(H.current))))return;S.closeToast(i.id)}}b.useEffect(()=>{const je=H.current;if(!v||!je)return;function le(ve){J.current===null||!De(je,Pt(ve))||ve.preventDefault()}return Ge(je,"touchmove",le,{passive:!1})},[v]);function Ee(){const je=k.x-L.x,le=k.y-L.y;return{transition:A?"none":void 0,transform:A?`translateX(${k.x}px) translateY(${k.y}px) scale(${L.scale})`:void 0,[r_]:`${je}px`,[l_]:`${le}px`}}const Pe=i.priority==="high",Se={role:Pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":I,"aria-describedby":Y,"aria-hidden":Pe&&!pe?!0:void 0,onPointerDown:v?Te:void 0,onPointerMove:v?Oe:void 0,onPointerUp:v?ge:void 0,onPointerCancel:v?ge:void 0,onKeyDown:Be,inert:vl(i.limited),style:{...Ee(),[s_]:i.transitionStatus==="ending"?se:ie,[a_]:`${me}px`,[i_]:i.height?`${i.height}px`:void 0}},Re=b.useMemo(()=>({toast:i,setTitleId:U,setDescriptionId:B,recalculateHeight:Ce,visibleIndex:ie,expanded:be}),[i,U,B,Ce,ie,be]),ke={transitionStatus:i.transitionStatus,expanded:be,limited:i.limited||!1,type:i.type,swiping:A,swipeDirection:w},Ie=nt("div",o,{ref:[a,H],state:ke,stateAttributesMapping:u_,props:[Se,m]});return p.jsx(D1.Provider,{value:Re,children:Ie})}),m_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,{visibleIndex:g,expanded:m,recalculateHeight:h}=yf(),y=b.useRef(null);we(()=>{h();const w=y.current;if(!w||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;const T=new ResizeObserver(()=>h(!0)),A=new MutationObserver(()=>h(!0));return T.observe(w),A.observe(w,{childList:!0,subtree:!0,characterData:!0}),()=>{T.disconnect(),A.disconnect()}},[h]);const v=g>0;return nt("div",o,{ref:[a,y],state:{expanded:m,behind:v},props:d})});function z1(e){return e==null||typeof e=="boolean"||e===""?!1:Array.isArray(e)?e.some(z1):!0}function P1(e){return b.isValidElement(e)&&z1(e.props.children)}function L1(e,o,a){const{toast:i,setTitleId:l,setDescriptionId:c}=yf(),d=a==="title"?l:c,g=o??(a==="title"?i.title:i.description);return{id:Gs(e),children:g,type:i.type,setId:d}}function I1(e,o,a){const i=P1(e);return we(()=>{if(i)return a(o),()=>{a(l=>l===o?void 0:l)}},[i,o,a]),i?e:null}const g_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,children:g,...m}=o,{id:h,children:y,type:v,setId:S}=L1(d,g,"description"),T=nt("p",o,{ref:a,state:{type:v},props:{...m,id:h,children:y}});return I1(T,h,S)}),y_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,children:g,...m}=o,{id:h,children:y,type:v,setId:S}=L1(d,g,"title"),T=nt("h2",o,{ref:a,state:{type:v},props:{...m,id:h,children:y}});return I1(T,h,S)}),b_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,disabled:d,nativeButton:g=!0,...m}=o,h=gf(),{toast:y,expanded:v}=yf(),[S,w]=b.useState(!1),{getButtonProps:T,buttonRef:A}=Co({disabled:d,native:g}),N={type:y.type};return nt("button",o,{ref:[a,A],state:N,props:[{"aria-hidden":!v&&!S,onClick(){h.closeToast(y.id)},onFocus(){w(!0)},onBlur(){w(!1)}},m,T]})}),v_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,disabled:d,nativeButton:g=!0,...m}=o,{toast:h}=yf(),y=h.actionProps?.children??m.children,{getButtonProps:v,buttonRef:S}=Co({disabled:d,native:g}),w={type:h.type},T=nt("button",o,{ref:[a,S],state:w,props:[m,h.actionProps,v,{children:y}]});return P1(T)?T:null}),x_=b.forwardRef(function(o,a){return p.jsx(Tw,{ref:a,...o})});function S_(){const e=gf(),o=e.useState("toasts");return b.useMemo(()=>({toasts:o,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[o,e])}function w_(){const e=new Set;function o(a){e.forEach(i=>i(a))}return{" subscribe":function(i){return e.add(i),()=>{e.delete(i)}},add(a){const i=a.id||_1("toast"),l={...a,id:i,transitionStatus:"starting"};return o({action:"add",options:l}),i},close(a){o({action:"close",options:{id:a}})},update(a,i){o({action:"update",options:{id:a,updates:i}})},promise(a,i){let l=a;return o({action:"promise",options:{...i,promise:a,setPromise(c){l=c}}}),l}}}function p0({icon:e,title:o,children:a}){return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-fg-muted",children:[e?p.jsx("div",{className:"text-fg-subtle",children:e}):null,p.jsx("div",{className:"text-[15px] font-semibold text-fg",children:o}),a?p.jsx("div",{className:"max-w-sm",children:a}):null]})}const Ma=w_();function T_(e){if(e.repeat||e.key!=="Enter"&&e.key!==" ")return;const o=e.currentTarget.closest("[data-toast]")??e.currentTarget,a=o.ownerDocument.defaultView;a&&Mk(a,e.key,i=>i instanceof a.Node&&o.contains(i))}function E_(){const{toasts:e}=S_();return e.map(o=>p.jsxs(h_,{toast:o,"data-toast":"",className:"pointer-events-auto flex w-80 items-start gap-3 rounded-lg bg-surface p-3 text-fg shadow-popup transition-[opacity,transform] data-[starting-style]:translate-y-2 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",children:[p.jsxs(m_,{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[p.jsx(y_,{className:"text-[13px] font-semibold"}),p.jsx(g_,{className:"text-xs text-fg-muted"}),o.actionProps?p.jsx(v_,{className:"mt-1 self-start rounded px-2 py-0.5 text-xs font-medium text-accent hover:bg-hover"}):null]}),p.jsx(b_,{"aria-label":"Dismiss",onKeyDown:T_,className:"rounded p-0.5 text-fg-muted hover:bg-hover",children:p.jsx(Tl,{className:"size-3.5"})})]},o.id))}function C_({children:e}){return p.jsxs(e_,{toastManager:Ma,timeout:4e3,children:[e,p.jsx(x_,{children:p.jsx(o_,{className:"pointer-events-none fixed bottom-4 right-4 z-[1100] flex flex-col gap-2",children:p.jsx(E_,{})})})]})}const R_=["a[href]","button","iframe","input","select","textarea","summary","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])","[tabindex]"].join(", "),A_="audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function O_(e){return!(e.tabIndex>=0||!e.hasAttribute("tabindex")&&e.matches(A_))||e.getAttribute("aria-hidden")==="true"||e.matches(":disabled")?!1:typeof e.checkVisibility!="function"||e.checkVisibility({visibilityProperty:!0})}function k_(e){return Array.from(e.querySelectorAll(R_)).filter(O_)}function N_(e){const o=a=>!/visible|hidden|clip/.test(a);return e.scrollWidth>e.clientWidth+1&&o(e.overflowX)||e.scrollHeight>e.clientHeight+1&&o(e.overflowY)}function M_(e){const[o,a]=b.useState(!1);return b.useLayoutEffect(()=>{const i=e.current,l=i?.ownerDocument.defaultView;if(!i||!l)return;const c=()=>{const y=l.getComputedStyle(i);a(N_({scrollWidth:i.scrollWidth,clientWidth:i.clientWidth,scrollHeight:i.scrollHeight,clientHeight:i.clientHeight,overflowX:y.overflowX,overflowY:y.overflowY}))};if(c(),typeof l.ResizeObserver!="function")return;const d=new l.ResizeObserver(c),g=new Set,m=y=>{if(y.nodeType!==1)return;const v=y;if(l.getComputedStyle(v).display==="contents"){v.childNodes.forEach(m);return}g.has(v)||(g.add(v),d.observe(v))};d.observe(i),i.childNodes.forEach(m);const h=new l.MutationObserver(y=>{for(const v of y)v.addedNodes.forEach(m);for(const v of g)i.contains(v)||(d.unobserve(v),g.delete(v));c()});return h.observe(i,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),h.disconnect()}},[e]),o}b.forwardRef(function({label:o,className:a,...i},l){const c=b.useRef(null),d=b.useCallback(w=>{c.current=w,typeof l=="function"?l(w):l&&(l.current=w)},[l]),g=M_(c),[m,h]=b.useState(!1),[y,v]=b.useState(null);b.useLayoutEffect(()=>{const w=c.current,T=w?.ownerDocument.defaultView;if(!g||!w||!T)return;const A=()=>{h(k_(w).length===0),v(w.closest('[role="dialog"], [role="alertdialog"]')?.getAttribute("aria-labelledby")??null)};A();const N=new T.MutationObserver(A);return N.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex","disabled","hidden","href","contenteditable"]}),()=>N.disconnect()},[g]);const S=g&&m;return p.jsx("div",{ref:d,...S?{role:"group",tabIndex:0,"aria-labelledby":o===void 0?y??void 0:void 0,"aria-label":o??(y===null?"Panel content":void 0)}:{},className:lt(S&&"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",a),...i})});const j_={blur:{label:"Blur",unit:"px",min:0,max:200,step:1,identity:0,initial:4},brightness:{label:"Brightness",unit:"%",min:0,max:500,step:1,identity:100,initial:120},contrast:{label:"Contrast",unit:"%",min:0,max:500,step:1,identity:100,initial:120},grayscale:{label:"Grayscale",unit:"%",min:0,max:100,step:1,identity:0,initial:100},saturate:{label:"Saturate",unit:"%",min:0,max:500,step:1,identity:100,initial:150},"hue-rotate":{label:"Hue rotate",unit:"deg",min:-360,max:360,step:1,identity:0,initial:90},invert:{label:"Invert",unit:"%",min:0,max:100,step:1,identity:0,initial:100},sepia:{label:"Sepia",unit:"%",min:0,max:100,step:1,identity:0,initial:100},opacity:{label:"Opacity",unit:"%",min:0,max:100,step:1,identity:100,initial:50}};[...Object.keys(j_)];const __={cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",copyLink:"Copy link",loading:"Loading…",justNow:"just now",never:"never",agent:"Agent",delete:"Delete",rename:"Rename",duplicate:"Duplicate",copyName:"Name of the copy",documentTabs:"Document tabs",pin:"Pin",unpin:"Unpin",open:"Open",save:"Save",updated:"Updated {when}",pinned:"Pinned",unpinned:"Unpinned",duplicated:"Duplicated",couldNotPin:"Could not pin: {error}",couldNotUnpin:"Could not unpin: {error}",couldNotRename:"Could not rename: {error}",couldNotDuplicate:"Could not duplicate: {error}",couldNotDelete:"Could not delete: {error}",statusNone:"No session",statusWorking:"Working",statusIdle:"Idle",statusWaiting:"Waiting",statusOffline:"Offline",working:"{agent} is working…",artifactOptions:"Artifact options",artifactName:"Artifact name",comments:"Comments",doneCommenting:"Done commenting",openComment:"1 open comment",openComments:"{count} open comments",commentOptions:"Comment options",showAllComments:"Show all comments",hideComments:"Hide comments",share:"Share",sharedOnNetwork:"Shared with your network",onlyThisComputer:"Only this computer",ask:"Ask {agent}",hideAsk:"Hide",openHarnessSession:"Open the {harness} session",messageAgent:"Message {agent} about this artifact",switchArtifact:"Switch artifact",inThisSession:"In this session",recent:"Recent",allArtifacts:"All artifacts",export:"Export",openSession:"Open session",offline:"offline",versionHistory:"Version history",peopleHere:"Here now",peopleHereNames:"Here now: {names}",peopleMore:"+{count}",youOtherTab:"You, in another tab",yourOtherTab:"your other tab",follow:"Follow",stopFollow:"Stop",followName:"Follow {name}",stopFollowingName:"Stop following {name}",followingName:"Following {name}",followingYou:"Following you",followingToast:"Following {name}. Press Escape to stop.",stoppedFollowingLeft:"Stopped following: {name} left.",openInNewTab:"Open in new tab",refresh:"Refresh",storage:"Storage",inThisFolder:"{size} in this folder",copyPath:"Copy path",linkCopied:"Link copied",linkCopiedNetwork:"Link copied. It is shared on your network now, so others there can open it.",pathCopied:"Path copied",deleteTitle:'Delete "{title}"?',deleteBody:"It leaves your artifacts. Its folder stays where it is: {root}",shareTitle:"Share this artifact",peopleWithAccess:"People with access",joinedPeople:"People who joined",noneJoined:"Nobody has joined yet. Send someone a link below.",online:"Online",seenAgo:"Seen {when}",guestPaused:"Link off: no access until it is back on",changeRole:"Change {name}'s role",roleLinkOff:"Link off",remove:"Remove",removeGuest:"Remove {name}",removeTitle:"Remove {name}?",removeBody:"They lose access to this artifact. They can join again with a link.",you:"(you)",thisComputer:"This computer",owner:"Owner",generalAccess:"General access",onLan:"Anyone on your network with a link",onlyHereSub:"Nobody else can open the links.",onLanSub:"People on the same Wi-Fi or LAN open it with a link; the link sets their role.",onNetworkAt:"On this network at {addresses}",onTailnet:"Tailscale: {address}, for people on your tailnet from any network (copy it from a link's More menu)",noAddress:"This computer has no local network address.",whereOff:"Only this computer can open these links for now. Copying one opens this to your network.",inviteLinks:"Invite links",roleEditor:"Editor",roleCommenter:"Commenter",roleViewer:"Viewer",linkEditor:"Can edit",linkCommenter:"Can comment",linkViewer:"Can view",noteEditor:"Edit and comment",noteCommenter:"Comment, no edits",noteViewer:"Read only",linkOff:"Off: nobody can join with it",turnOn:"Turn on",more:"More",moreFor:"More: {role}",copyTailnet:"Copy Tailscale link",copyTailnetNote:"For people on your tailnet, off this network ({address})",turnOnLink:"Turn on link",turnOffLink:"Turn off link",turnOffNote:"Whoever joined with it loses access until it is back on",resetLink:"Reset link",resetNote:"A new address; whoever joined with the old one is removed",resetTitle:'Reset the "{role}" link?',resetBody:"The old link stops working and the people who joined with it lose access.",plainHttp:"This is plain HTTP: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a link that went further.",cannotShare:"{type} pages can't be shared on the network yet: only this computer opens it.",shareError:"Could not do that: {error}",shareNoAnswer:"The sharing settings did not load: the Open Artifact service is not answering. Try again in a moment.",sendingTitle:"Sending this to someone?",sendingBody:"Share the link instead of a file and they will always have the latest changes.",invitePeople:"Invite people",allLinksOff:"All the links are off. Invite people to turn one on.",joinsAs:"People who open this link join as {role}. Invite people to give another role.",standaloneShare:"Manage network sharing in the Open Artifact app or with the share CLI command.",onlyHereLink:"Only this computer can open the link.",nothingToExport:"Nothing to export yet.",exportOptions:"Asks for options first",archiveLabel:"Whole folder (.zip)",destinationDescription:"Asks {agent} to export it there",destinationRequestLabel:"Export to {label}",destinationSent:"Asked {agent} to export to {label}",archiveDescription:"Everything here, to back up or move",archiveStarted:"Downloading {name}",archiveHint:"The whole folder in one zip, to back up, move to another computer or send to someone. Unzip it and open it with the same type to carry on; share links and this computer's server state are left out.",archiveTooLarge:"The folder is over what a zip holds (4 GiB or 65,535 files): copy the folder itself instead.",archiveUnsupported:"{type} folders can't be zipped here: copy the folder itself instead.",archiveFailed:"Could not zip the folder: {error}",exportBusy:"Another export is running. Try {label} again in a moment.",exportUnsupported:"{label} can't be exported right now.",exportFailed:"Could not export {label}.",saving:"Saving…",reconnecting:"Reconnecting…",notSaved:"Not saved",notSavedTitle:"The page could not save its last changes.",saveRetry:"Couldn't save — retry",readOnly:"Read-only",readOnlyTitle:"Nothing can be saved here",leaveLosesWork:"Leave? Changes that are not saved yet will be lost.",actionSaveNow:"Save now",actionOpenFind:"Find",actionUndo:"Undo",actionRedo:"Redo",actionEditPage:"Edit page",actionUsePage:"Use this page",actionCommentSelection:"Comment on selection",actionOpenPageList:"Pages",actionHandOffCode:"Hand off to code",whyOlderVersion:"You are viewing an older version",whyAgentWorking:"{agent} is working",whyDraftOpen:"Close the open draft first",whyCommentsOn:"Turn off comment mode first",whyNeedsAgent:"Needs an agent session",whyUnsaved:"Save first",whyOther:"Not available right now",noOwner:"No session owns this artifact",noOwnerNote:"What you send waits until a session takes it over: one you pick here, or one that adopts or writes it.",assignTo:"Hand it to a session",assignPick:"Session to hand it to",assignButton:"Hand over",assigning:"Handing over…",assigned:"Handed to {session}: it has what waited, and gets what you send from now on.",couldNotAssign:"Could not hand it over: {error}",noSessionsOnline:"No agent session is online now. To have one take it over, paste this into it:",copyTakeOver:"Copy take-over prompt",ownerNote:"Messages go to the {harness} session that made this artifact.",agentIdle:"{agent} is idle",agentWaiting:"{agent} is waiting",sessionOffline:"The session is offline",offlineNote:"{agent} sees what you send the next time the {harness} session works.",askPlaceholder:"What should change?",sendToAgent:"Send to {agent}",sendToConversation:"Put in the {agent} conversation",sending:"Sending…",sent:"Sent.",sentInbox:"{agent} will see it the next time the session works.",sentDrafted:"It is in the {agent} conversation now: send it there.",notDelivered:"Not delivered.",notSent:"Not sent: {error}",viaDelivered:"delivered",viaDrafted:"in the conversation, for you to send",viaInbox:"waiting for the session",viaFailed:"not delivered",askCloudOnline:"{agent} is connected: it gets this now.",askCloudOffline:"{agent} will get this when its computer is back online.",askCloudMcp:"{agent} will see this the next time it works on the artifact.",askCloudNone:"No agent is connected to this site for you. Connect a computer or an MCP client; the request waits until then.",askCloudNoneOther:"The owner has no agent connected to this site. The request waits until they connect one.",sentCloudDelivered:"Delivered: {agent} has it now.",sentCloudOffline:"Sent. {agent} will get it when its computer is back online.",sentCloudMcp:"Sent. {agent} will see it the next time it works on the artifact.",sentCloudNone:"Sent. It waits until an agent is connected.",viaWaitingAgent:"waiting for the agent",statusConnected:"Connected",statusNoAgent:"No agent",emptyTitle:"This artifact is empty",emptyBody:"Nothing of {type} has been written to {root} yet. An agent writes it: send it this.",startSession:"Start a session with {agent}",startBlank:"Start blank",startingBlank:"Starting…",emptyOrBlank:"Or start it blank and write it yourself: it opens in its editor.",couldNotStartBlank:"Could not start it blank: {error}",promptCopied:"Copied: paste it into any agent session that has the Artifact tool.",sentToSession:"Sent to a new session.",problemTitle:"This artifact cannot open here",noPage:"No page.",readOnlyNewer:"Read-only here: {type} {release} wrote this artifact and this computer has {version}. Update Open Artifact (open-artifact runtime update, or update the app it came with) to edit it.",folder:"Folder: {root}",askToLook:"Ask {agent} to look",problemAsk:"The artifact page could not open: {problem}",noBoot:"No artifact to show. Open one from the home page.",tryAgain:"Try again",bootFailed:"The page did not open: {error}",frameNotOpen:"The page is not open any more (its server may have restarted), and opening it again did not work.",frameNotGranted:"This page is not open to you here any more.",homeTitle:"Open Artifact",homeSub:"The artifacts and types every agent on this computer shares.",artifacts:"Artifacts",types:"Types",newArtifact:"New artifact",moreActions:"More actions",backToSession:"Back to session",noArtifacts:"No artifacts yet. Ask an agent to make one with the Artifact tool, or start one here.",pageOpen:"Open now",typeMissing:"Type not installed",deleted:'Deleted "{title}". Its folder stays.',undo:"Undo",restored:"Restored",couldNotRestore:"Could not restore: {error}",couldNotLoad:"Could not load: {error}",typeRoots:"Type roots: {roots}",noTypes:"No types found.",disabled:"Disabled",shadowedBy:"Overridden by {root}",newOf:"New {type}",create:"Create",createBlank:"Create and open",createType:"Type",createGroupBlank:"Start right away",createGroupBlankHint:"Opens blank in its editor: write it yourself, with or without an agent.",createGroupAgent:"Make with an agent",createGroupAgentHint:"An agent builds these: make it, then hand it to an agent.",createGroupCustom:"Your types",createGroupCustomHint:"Types made on this computer.",title:"Title",folderOptional:"Folder (optional)",folderHint:"Default: a new folder in the home workspace",needTitle:"Give it a title first.",couldNotCreate:"Could not create it: {error}",renameArtifact:"Rename artifact",cannotCreateYet:"No type that can be made here is installed and turned on.",newType:"New type",newTypeDescription:"A folder with a page, a manifest and a SKILL.md. Your agent builds it out from there.",typeId:"Id",typeIdHint:"Lower case letters, digits and dashes, e.g. trip-planner",typeName:"Name (optional)",typeTemplate:"Template",templatePage:"Page",templatePageHint:"The content is files beside the page",templateData:"Data",templateDataHint:"The content is records in a database",typeScope:"Where",scopeUser:"For me",scopeUserHint:"Your own types folder, in every project",scopeProject:"This project",scopeProjectHint:"The project folder’s .agents/artifact-types, shared with it",projectFolder:"Project folder",projectFolderHint:"An absolute path, e.g. /Users/me/code/app",needTypeId:"Give it an id first.",needProjectFolder:"Give the project folder as an absolute path.",couldNotMakeType:"Could not make the type: {error}",typeMade:"Type {id} is ready",typeMadeAt:"Its folder:",typeMadePrompt:"Ask your agent to build it out:",typeCheckWarnings:"{count} warnings from types check",done:"Done",typesExplain:"A type is a folder: your own in {user}, a project’s in its .agents/artifact-types (limited until you trust the project), and the built-in ones. A type of the same id in a nearer folder overrides the others.",typesExplainNoUser:"A type is a folder: a project’s in its .agents/artifact-types (limited until you trust the project), and the built-in ones.",projectTypes:"Project {dir}",projectUntrusted:"Not trusted: its types work, but their pages reach only their own origin and the sites they list, and none starts a program of its own, until you trust it.",trustProject:"Trust this project",untrustProject:"Stop trusting",couldNotTrust:"Could not change trust: {error}",turnTypeOn:"Turn {type} on",turnTypeOff:"Turn {type} off",couldNotToggleType:"Could not change the type: {error}",sourceBuiltin:"built in",sourceLocal:"yours",sourceInstalled:"installed",typeCapabilities:"Uses: {list}",typeNetwork:"Reaches: {list}",noNetwork:"Does not reach the network",installedFrom:"From {source}",installType:"Install type",installTypeDescription:"A type package (.oatype) someone shared: choose the file, or give its https address. You see what it is before anything is installed.",installTypeCheck:"Read this before you install it: its page runs in your browser, and agents are given its SKILL.md.",chooseTypePackage:"Choose a .oatype file",typePackageUrl:"Or its address",readPackage:"Read",installAs:"Install as (optional)",installAsHint:"Another id, when one of that id is installed already or you want it under another name",needPackage:"Choose a file or give an address first.",couldNotReadPackage:"Could not read the package: {error}",packageId:"Id",packageSource:"From",packagePublisher:"Published by",packagePublisherText:"{name} (their account on {site})",packageSite:"Site",packageSiteRemote:"{site}, through your remote {remote}",packageSitePublic:"{site}, its public address, without signing in",packageCapabilities:"Page may use",noCapabilities:"Nothing declared",packageNetwork:"May reach",packageReplaces:"Replaces",packageReplacesText:"{version}, from {source}",packageSkill:"Its SKILL.md ({path}, {chars} characters, {lines} lines), what agents are told when they make one:",packageNoSkill:"It has no SKILL.md.",packageThirdParty:"Its SKILL.md, title and description are the publisher’s. Agents are told they cannot grant permissions or widen a task.",installTypeAs:"Install {id}",updateTypeTitle:"Update {id}",updateType:"Update",uninstallType:"Uninstall",uninstallConfirm:"Uninstall {type}? Its artifacts stay in their folders; they open again once it is installed again.",typeInstalled:"{type} {version} is installed",typeUpdated:"{type} is now {version}",typeUninstalled:"{type} is uninstalled",couldNotInstall:"Could not install it: {error}",couldNotUninstall:"Could not uninstall it: {error}",cannotShareCloud:"{type} artifacts can't be shared here yet.",signIn:"Sign in",signOut:"Sign out",signOutFailed:"Could not sign out: {error}",accountOf:"Account: {name}",sharedWithOthers:"Shared with others",addPeople:"Add people",addPeoplePlaceholder:"Email, or @domain for everyone there",add:"Add",addInvalid:"Not an email address or @domain: {entries}",roleFor:"Role for the people you add",memberPending:"Invited: has not signed in yet",memberDomain:"Everyone at {domain}",memberGroup:"Group",removeAccess:"Remove access",removeMemberBody:"They lose access to this artifact. You can add them again.",noMembers:"Nobody else is added yet.",accessRestricted:"Restricted",accessRestrictedSub:"Only the people added here can open it.",accessLink:"Anyone with the link",accessLinkSub:"Whoever has one of the links below gets its role.",accessPublic:"Public",accessPublicSub:"Anyone can open it as a viewer; the links below give more.",shareSettings:"Settings",viewersCanExport:"Viewers can download and export",editorsCanAsk:"Editors can ask {agent}",ownedBy:"Owned by {name}",yourRole:"Your role: {role}",onlyOwnerShares:"Only the owner can change who has access.",emptyBodyCloud:"Nothing of {type} has been written yet. An agent writes it: send it this.",homeSubCloud:"Your artifacts and the ones shared with you.",noArtifactsCloud:"No artifacts yet. Publish one from an agent with the Artifact tool, or ask someone to share one with you.",pubTitle:"Publish to the web",pubIntro:"Give it a web address that works even when this computer is off. You choose who can open it there.",pubDataNote:"Publishing this dashboard publishes its data too: this computer runs its live queries and puts the rows on the site, where everyone who can open it sees them.",pubDataPending:"Its live data isn’t on the site yet: the page there shows no figures until you publish the data.",pubDataConfirm:"Publish its data",pubDataAsOf:"Data on the site as of {time}, refreshed from this computer.",pubDataNone:"Its data is published; the first rows are on their way.",pubDataFailed:"The last refresh failed: {reason}",pubDataRefresh:"Refresh now",pubDataRefreshing:"Refreshing…",pubDataStop:"Stop publishing data",pubDataStopTitle:"Stop publishing its data?",pubDataStopBody:"The rows are removed from {host} and this computer stops refreshing them. The dashboard stays published there, with no figures until you publish its data again.",pubConnectSite:"Connect a site…",pubConnectAnother:"Connect another site…",pubAddress:"Site address",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"The web address of an Open Artifact site you have an account on.",pubName:"Name",pubNameHint:"A short name to tell your sites apart, like work.",pubConnect:"Connect",pubConnecting:"Connecting…",pubCodeTitle:"Approve this computer on {host}",pubCodeBody:"Check that the page shows this code, then approve.",pubCodeOpened:"The approval page opened in your browser. If you don’t see it, open it here:",pubOpenApproval:"Open approval page",pubWaitingApproval:"Waiting for you to approve…",pubConnected:"Connected to {host} as {name}.",pubTryAgain:"Try again",pubSignedInAs:"Signed in as {name}",pubStateConnected:"Connected",pubStateConnecting:"Connecting…",pubStateUnreachable:"Can't be reached",pubStateSignedOut:"Signed out",pubPublish:"Publish",pubPublishing:"Publishing…",pubReconnect:"Connect again",pubPublishedAt:"Published on {host}",pubOpen:"Open",pubManage:"Who can open it is set on its web page: open it and use Share there.",pubManageLink:"Manage access on the web",pubOpensThere:"Opening it on this computer now takes you to its web address while the site can be reached.",pubUnpublish:"Unpublish",pubUnpublishing:"Unpublishing…",unpubTitle:"Unpublish this artifact?",unpubBody:"The web copy goes to the trash on {host} and its web address stops working. This folder stays on this computer, with the latest changes from the web.",pubInSync:"Up to date",pubInSyncAt:"Up to date · synced {when}",pubWaitingOne:"1 change waiting to be sent",pubWaiting:"{count} changes waiting to be sent",pubOffline:"Can't reach {host}: changes are kept here and sent when it is back.",pubSignedOutSync:"Signed out of {host}: changes are kept here. Connect again to send them.",pubSyncFailed:"The last sync failed: {error}",pubCloudMark:"Published to the web",pubCloudAt:"Published at {url}",pubHostEmpty:"Type the site’s address.",pubHostInvalid:"That is not a web address. Type it like https://artifacts.example.com.",pubHostNotHttps:"The address must start with https:// (plain http only works for this computer or a private network, like 192.168.1.20, nas.lan or 192-168-1-20.nip.io).",pubInsecureWarning:"Plain http: what you publish travels unencrypted. Use it only on a network you trust.",pubAutoSwitch:"Publish new artifacts automatically",pubAutoHint:"Artifacts created from now on go to {host} by themselves. Earlier ones stay as they are.",pubAutoNoSite:"Choose a default site to publish to.",pubDefaultSite:"Default site",pubDefaultMark:"default",pubAutoPublishing:"Being published to {host} automatically…",pubAutoSignedOut:"Waiting to be published to {host}: this computer is not signed in there yet.",pubAutoUnreachable:"Waiting to be published: can't reach {host}. It is tried again by itself.",pubAutoFailed:"Not published to {host} yet: {error} It is tried again by itself.",pubApprovalTitle:"Approve this computer on {host}",pubApprovalBody:"This computer was set up to publish to {host}. Open the approval page, check that it shows this code, and approve.",pubCloudSettingsFailed:"Could not change the setting: {error}",pubNameInvalid:"Use letters, digits, - and _ (up to 32), like work.",pubNameTaken:"That name is already used for another site. Choose another name.",pubNoDaemon:"Open Artifact on this computer did not answer. Check that it is running, then try again.",pubConnectDenied:"The connection was refused on {host}. Try again if that was a mistake.",pubConnectExpired:"The code ran out before it was approved. Try again and approve within a few minutes.",pubConnectUnreachable:"Can't reach {host}. Check the address and your connection, then try again.",pubConnectNotHost:"{host} does not look like an Open Artifact site. Check the address.",pubConnectFailed:"Could not connect: {error}",pubIdTaken:"{host} already has an artifact with this one’s id that is still published there (maybe from another computer) or is someone else’s. Unpublish it there first (one you unpublished is replaced when you publish again), or duplicate this artifact and publish the copy.",pubAlreadyElsewhere:"It is already published to another site. Unpublish it there first.",pubTooLarge:"It is too large for {host}. Remove big files from its folder, then try again.",pubSignedOut:"You are signed out of {host}. Connect again, then try again.",pubNotAllowed:"{host} did not allow it: your account there may not be able to publish.",pubUnreachable:"Can't reach {host} right now. Try again once it is back.",pubUnsupported:"{host} cannot take this kind of artifact yet.",pubFailed:"Could not publish: {error}",unpubUnreachable:"Can't reach {host} to bring its latest version here first. Try again once it is back.",unpubFailed:"Could not unpublish: {error}",openOnWeb:"Open on the web",copyWebLink:"Copy web link",webLinkCopied:"Web link copied",signOutAccess:"Sign out, here and of your organisation’s sign-in",upload:"Upload",uploadHint:"Upload an artifact: the .zip from “Whole folder (.zip)” in its Export tab.",uploadDrop:"Drop the .zip to upload it",uploadSending:"Uploading {name}… {percent}%",uploadSendingSize:"Uploading {name}…",uploadChecking:"Checking {name}…",uploadOpening:"Uploaded {name}. Opening it…",uploadNotZip:"That file is not a .zip. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadNotArtifact:"That zip is not an Open Artifact folder. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadTooLargeLimit:"That zip is too large: this site takes up to {limit}. Remove big files from the folder, then try again.",uploadTooLarge:"That zip is too large for this site. Remove big files from the folder, then try again.",uploadTooLargeSaid:"That zip is too large for this site: {error} Remove big files from the folder, then try again.",uploadSignedOut:"You are signed out. Sign in again, then upload it.",uploadNotAllowed:"This site does not let you upload artifacts.",uploadConflict:"Something on the site got in the way. Try again.",uploadTypeMissing:"This site cannot open {type} artifacts yet.",uploadBusy:"Too many tries at once. Wait a moment, then try again.",uploadNoAnswer:"The site did not answer. Check your connection, then try again.",uploadFailed:"Could not upload it: {error}",dismiss:"Dismiss",trash:"Trash",trashEmpty:"The trash is empty.",trashNote:"Nobody it was shared with can open an artifact while it is in the trash.",trashedWhen:"Moved to the trash {when}",trashKeptDays:"Deleted for good after {days} days in the trash.",trashKeptOneDay:"Deleted for good after 1 day in the trash.",trashKeptForever:"Kept here until you delete it forever.",restore:"Restore",restoredTitle:'Restored "{title}"',deleteForever:"Delete forever",purgeTitle:'Delete "{title}" forever?',purgeBody:"This cannot be undone. It is removed from this site, and everyone it was shared with loses access to it.",purged:'Deleted "{title}" forever',purgeNotTrashed:"It is not in the trash any more.",purgeGone:"It is already gone.",couldNotPurge:"Could not delete it: {error}",moveToTrash:"Move to trash",movedToTrash:'Moved "{title}" to the trash.',siteTypesNote:"Types people on this site published from their computers. An agent connected to this site can make artifacts of them; you can also install one on your computer.",siteTypesYouMayPublish:"You may publish one here: open-artifact types publish <id> --remote <this site>.",siteTypesNoPublish:"Publishing here: {why}",siteTypesEmptyTitle:"No types yet",siteTypesEmpty:"Nobody has shared a type with everyone on this site yet.",siteTypesBack:"All types on this site",siteTypeBy:"By {name}, updated {when}",siteTypeUnnamedPublisher:"someone without a name",siteTypePrivate:"Private",siteTypeLink:"Anyone with the link",siteTypeSite:"Everyone on this site",siteTypeDelisted:"Unpublished",siteTypeDelistedNote:"Unpublished: it is no longer listed and no new artifacts can be made of it. Artifacts of it still open.",siteTypeDelistedManage:"To list it again, publish it again from your computer: open-artifact types publish {id} --remote <this site>.",siteTypePublisher:"Published by",siteTypeUpdated:"Updated",siteTypeInstall:"Install on your computer",siteTypeInstallNote:"Run this in a terminal on your computer. It shows everything above again and asks before installing.",siteTypeDownload:"Download the package (.oatype)",siteTypeSkillNote:"What agents are told when they make an artifact of this type. Written by its publisher.",siteTypeNoSkill:"This type has no SKILL.md.",siteTypeManage:"Manage",siteTypeWhoSees:"Who sees it",siteTypeVisibilityNote:"Private: only you and the site admins. Anyone with the link: whoever has this page’s address. Everyone on this site: listed for every member.",siteTypeUnpublish:"Unpublish",siteTypeUnpublishTitle:'Unpublish "{name}"?',siteTypeUnpublishBody:"Nobody can make new artifacts of it. If artifacts of it exist, they keep opening and it is only delisted; otherwise it is removed from this site.",siteTypeRemoved:'Removed "{name}" from this site',siteTypeDelistedNow:'Unpublished "{name}": {count} artifact(s) of it keep opening',siteTypeCouldNot:"Could not do that: {error}",siteTypeGoneTitle:"Removed",siteTypeGone:"This type is no longer on this site.",connectedSitesLoading:"Reading the types on your sites…",connectedSitesNone:"Types on the sites you connect appear here. To connect a site, open an artifact, choose Publish to the web, then Connect a site….",connectedSitesFailed:"Could not read the types on your sites: {error}",connectedSiteTitle:"On {name} ({host})",connectedSiteNote:"Types people published to this site. Installing one shows you everything about it first, and nothing is installed until you confirm.",connectedSiteEmpty:"No types on this site are shared with you yet.",connectedSiteRetry:"Retry",siteTypeInstallHere:"Install",siteTypeUpdateHere:"Update to {version}",siteTypeUpdateNote:"Installed here: {local} (as {id}). On the site: {version}.",siteTypeInstallAsOther:"Install under another id",siteTypeClashNote:"Another type on this computer is called {id}: install this one under another id.",siteTypeInstalledHere:"Installed",siteTypeInstalledAs:"Installed as {id}",siteTypePublishedHere:"Published from this computer",siteTypeOpenPage:"Open its page",siteTypeClashHint:"Another type on this computer has this id. Give this one another id under Install as, then press Read.",shareOnNetwork:"Share on this network instead",shareOnNetworkSub:"Links from here open this computer’s copy, not the web page."},D_={cancel:"取消",close:"关闭",copy:"复制",copied:"已复制",copyLink:"复制链接",loading:"加载中…",justNow:"刚刚",never:"从未",agent:"Agent",delete:"删除",rename:"重命名",duplicate:"复制一份",copyName:"副本名称",documentTabs:"文档标签页",pin:"置顶",unpin:"取消置顶",open:"打开",save:"保存",updated:"更新于 {when}",pinned:"已置顶",unpinned:"已取消置顶",duplicated:"已复制一份",couldNotPin:"没能置顶:{error}",couldNotUnpin:"没能取消置顶:{error}",couldNotRename:"没能重命名:{error}",couldNotDuplicate:"没能复制:{error}",couldNotDelete:"没能删除:{error}",statusNone:"无会话",statusWorking:"工作中",statusIdle:"空闲",statusWaiting:"等待中",statusOffline:"离线",working:"{agent} 正在工作…",artifactOptions:"作品选项",artifactName:"作品名",comments:"评论",doneCommenting:"结束评论",openComment:"1 条未解决的评论",openComments:"{count} 条未解决的评论",commentOptions:"评论选项",showAllComments:"显示全部评论",hideComments:"隐藏评论",share:"分享",sharedOnNetwork:"已分享到局域网",onlyThisComputer:"仅这台电脑",ask:"问 {agent}",hideAsk:"收起",openHarnessSession:"打开 {harness} 会话",messageAgent:"就这个作品给 {agent} 发消息",switchArtifact:"切换作品",inThisSession:"这个会话里的",recent:"最近",allArtifacts:"所有作品",export:"导出",openSession:"打开会话",offline:"离线",versionHistory:"版本历史",peopleHere:"正在查看",peopleHereNames:"正在查看:{names}",youOtherTab:"你(另一个标签页)",yourOtherTab:"你的另一个标签页",follow:"跟随",stopFollow:"停止",followName:"跟随 {name}",stopFollowingName:"停止跟随 {name}",followingName:"正在跟随 {name}",followingYou:"正在跟随你",followingToast:"正在跟随 {name},按 Esc 停止。",stoppedFollowingLeft:"{name} 已离开,停止跟随。",openInNewTab:"在新标签页打开",refresh:"刷新",storage:"存储",inThisFolder:"这个文件夹 {size}",copyPath:"复制路径",linkCopied:"链接已复制",linkCopiedNetwork:"链接已复制,已顺手分享到局域网,同一网络的人可以打开。",pathCopied:"路径已复制",deleteTitle:"删除「{title}」?",deleteBody:"它会移出作品列表,文件夹保留在原处:{root}",shareTitle:"分享这份内容",peopleWithAccess:"有权访问的人",joinedPeople:"加入的人",noneJoined:"还没有人加入。把下面的链接发给对方。",online:"在线",seenAgo:"{when}来过",guestPaused:"链接已关闭,暂时无法访问",changeRole:"更改「{name}」的角色",roleLinkOff:"链接已关闭",remove:"移出",removeGuest:"移出 {name}",removeTitle:"移出「{name}」?",removeBody:"对方将无法再访问这份内容,之后仍可以用链接重新加入。",you:"(你)",thisComputer:"这台电脑",owner:"所有者",generalAccess:"一般访问权限",onLan:"同一网络里有链接的人",onlyHereSub:"别人打不开这些链接。",onLanSub:"同一 Wi-Fi 或局域网里的人用链接打开,链接决定角色。",onNetworkAt:"在这个网络上:{addresses}",onTailnet:"Tailscale:{address},同一 tailnet 的人在别的网络也能打开(复制在链接的「更多」里)",noAddress:"这台电脑没有局域网地址。",whereOff:"现在只有这台电脑能打开这些链接。复制链接会顺手分享到局域网。",inviteLinks:"邀请链接",roleEditor:"编辑者",roleCommenter:"评论者",roleViewer:"查看者",linkEditor:"可编辑",linkCommenter:"可评论",linkViewer:"可查看",noteEditor:"编辑和评论",noteCommenter:"只能评论",noteViewer:"只读",linkOff:"已关闭:没人能用它加入",turnOn:"开启",more:"更多",moreFor:"更多:{role}",copyTailnet:"复制 Tailscale 链接",copyTailnetNote:"给同一 tailnet 里不在这个网络的人({address})",turnOnLink:"开启链接",turnOffLink:"关闭链接",turnOffNote:"用它加入的人暂时无法访问",resetLink:"重置链接",resetNote:"换一个新地址,用旧链接加入的人会被移出",resetTitle:"重置「{role}」链接?",resetBody:"旧链接会失效,通过它加入的人也会失去访问权限。",plainHttp:"这是明文 HTTP:同一网络的人能看到传输内容。链接就是权限:拿到链接的人就有对应角色,只发给该有的人;传出去了就重置链接。",cannotShare:"{type} 的页面暂时不能分享到网络:只有这台电脑能打开。",shareError:"没做成:{error}",shareNoAnswer:"分享设置没有加载出来:Open Artifact 服务没有响应,稍后再试。",sendingTitle:"要发给别人?",sendingBody:"发链接而不是文件,对方看到的总是最新版本。",invitePeople:"邀请别人",allLinksOff:"所有链接都关着。去邀请页打开一条。",joinsAs:"用这条链接打开的人以{role}身份加入。要给别的角色,去邀请页。",standaloneShare:"可在 Open Artifact 应用或 CLI 的 share 命令中管理网络分享。",onlyHereLink:"只有这台电脑能打开这个链接。",nothingToExport:"还没有可导出的内容。",exportOptions:"会先询问导出选项",archiveLabel:"整个文件夹(.zip)",destinationDescription:"请 {agent} 导出到这里",destinationRequestLabel:"导出到 {label}",destinationSent:"已请 {agent} 导出到 {label}",archiveDescription:"这里的全部内容,用来备份或搬走",archiveStarted:"开始下载 {name}",archiveHint:"整个文件夹打成了一个 zip,可以备份、换电脑或发给别人。解压后用同一个类型打开就能接着用;分享链接和这台电脑上的服务器状态不在里面。",archiveTooLarge:"文件夹超过了 zip 的上限(4 GiB 或 65535 个文件),请直接复制文件夹。",archiveUnsupported:"{type} 的文件夹在这里打不了包,请直接复制文件夹。",archiveFailed:"没能打包:{error}",exportBusy:"另一个导出正在进行,请稍后再导出 {label}。",exportUnsupported:"现在无法导出 {label}。",exportFailed:"无法导出 {label}。",saving:"正在保存…",reconnecting:"正在重新连接…",notSaved:"未保存",notSavedTitle:"页面没能保存最近的修改。",saveRetry:"保存失败,点击重试",readOnly:"只读",readOnlyTitle:"这里的内容无法保存",leaveLosesWork:"确定离开?尚未保存的修改会丢失。",actionSaveNow:"立即保存",actionOpenFind:"查找",actionUndo:"撤销",actionRedo:"重做",actionEditPage:"编辑页面",actionUsePage:"使用这个页面",actionCommentSelection:"评论选中内容",actionOpenPageList:"页面列表",actionHandOffCode:"交给代码处理",whyOlderVersion:"你正在查看旧版本",whyAgentWorking:"{agent} 正在工作",whyDraftOpen:"请先关闭打开的草稿",whyCommentsOn:"请先退出评论模式",whyNeedsAgent:"需要一个智能体会话",whyUnsaved:"请先保存",whyOther:"暂时不可用",noOwner:"没有会话拥有这个作品",noOwnerNote:"发出的消息会等到有会话接手:你在这里选的会话,或者 adopt 或改动它的会话。",assignTo:"交给一个会话",assignPick:"要交给的会话",assignButton:"交给它",assigning:"正在交接…",assigned:"已交给 {session}:它收到了之前等着的消息,之后你发的也会到它那里。",couldNotAssign:"没能交接:{error}",noSessionsOnline:"现在没有在线的 Agent 会话。想让某个会话接手,把这段粘贴给它:",copyTakeOver:"复制接手提示",ownerNote:"消息会发给做这个作品的 {harness} 会话。",agentIdle:"{agent} 空闲",agentWaiting:"{agent} 在等待",sessionOffline:"会话离线",offlineNote:"{harness} 会话下次工作时,{agent} 会看到你发的消息。",askPlaceholder:"想改什么?",sendToAgent:"发给 {agent}",sendToConversation:"放进 {agent} 的对话",sending:"发送中…",sent:"已发送。",sentInbox:"会话下次工作时 {agent} 会看到。",sentDrafted:"已放进 {agent} 的对话:到那里发出去。",notDelivered:"没送达。",notSent:"没发出去:{error}",viaDelivered:"已送达",viaDrafted:"在对话里,等你发出",viaInbox:"等会话处理",viaFailed:"没送达",askCloudOnline:"{agent} 已连接:它现在就会收到。",askCloudOffline:"{agent} 所在的电脑重新上线后,它会收到。",askCloudMcp:"{agent} 下次处理这个作品时会看到。",askCloudNone:"这个站点上还没有连接你的 Agent。连接一台电脑或一个 MCP 客户端;在那之前,请求会一直等着。",askCloudNoneOther:"所有者还没有在这个站点上连接 Agent。请求会等到他们连接为止。",sentCloudDelivered:"已送达:{agent} 现在就收到了。",sentCloudOffline:"已发送。{agent} 所在的电脑重新上线后,它会收到。",sentCloudMcp:"已发送。{agent} 下次处理这个作品时会看到。",sentCloudNone:"已发送。会等到有 Agent 连接为止。",viaWaitingAgent:"等 Agent 接收",statusConnected:"已连接",statusNoAgent:"无 Agent",emptyTitle:"这个作品还是空的",emptyBody:"{root} 里还没有写入 {type} 的内容。由 Agent 来写:把下面这段发给它。",startSession:"和 {agent} 开个新会话",startBlank:"从空白开始",startingBlank:"正在准备…",emptyOrBlank:"也可以从空白开始自己写:会直接进入编辑器。",couldNotStartBlank:"没能从空白开始:{error}",promptCopied:"已复制:粘贴到任意装了 Artifact 工具的 Agent 会话里。",sentToSession:"已发到新会话。",problemTitle:"这个作品在这里打不开",noPage:"没有页面。",readOnlyNewer:"在这里只读:这个作品由 {type} {release} 写入,这台电脑上是 {version}。更新 Open Artifact(open-artifact runtime update,或更新附带它的应用)后才能编辑。",folder:"文件夹:{root}",askToLook:"让 {agent} 看看",problemAsk:"作品页打不开:{problem}",noBoot:"没有要显示的作品。从主页打开一个。",tryAgain:"重试",bootFailed:"页面没有打开:{error}",frameNotOpen:"页面已经不在打开状态(它的服务可能重启过),重新打开也没成功。",frameNotGranted:"这个页面在这里已经不对你开放了。",homeTitle:"Open Artifact",homeSub:"本机所有 Agent 共用的作品和类型。",artifacts:"作品",types:"类型",newArtifact:"新建作品",moreActions:"更多操作",backToSession:"回到会话",noArtifacts:"还没有作品。让 Agent 用 Artifact 工具创建一个,或者在这里新建。",pageOpen:"已打开",typeMissing:"类型没有安装",deleted:"已删除「{title}」,文件夹保留。",undo:"撤销",restored:"已恢复",couldNotRestore:"没能恢复:{error}",couldNotLoad:"读取失败:{error}",typeRoots:"类型根目录:{roots}",noTypes:"没有找到类型。",disabled:"已停用",shadowedBy:"被 {root} 覆盖",newOf:"新建 {type}",create:"创建",createBlank:"创建并打开",createType:"类型",createGroupBlank:"直接开始",createGroupBlankHint:"建好就进编辑器,从空白开始自己写,用不用 Agent 都行。",createGroupAgent:"和 Agent 一起做",createGroupAgentHint:"这类作品要 Agent 来搭:建好后交给 Agent。",createGroupCustom:"你做的类型",createGroupCustomHint:"在这台电脑上做的类型。",title:"标题",folderOptional:"文件夹(可不填)",folderHint:"默认:主工作区里新建一个文件夹",needTitle:"先写个标题。",couldNotCreate:"没建成:{error}",renameArtifact:"重命名作品",cannotCreateYet:"没有能在这里新建、并且已启用的类型。",newType:"新建类型",newTypeDescription:"一个文件夹,里面有页面、清单和 SKILL.md,之后由你的 agent 接着完善。",typeId:"Id",typeIdHint:"小写字母、数字和短横线,例如 trip-planner",typeName:"名称(可不填)",typeTemplate:"模板",templatePage:"页面",templatePageHint:"内容存成页面旁边的文件",templateData:"数据",templateDataHint:"内容存成数据库里的记录",typeScope:"放在哪里",scopeUser:"我自己的",scopeUserHint:"你自己的类型文件夹,每个项目都能用",scopeProject:"这个项目",scopeProjectHint:"项目文件夹里的 .agents/artifact-types,跟着项目走",projectFolder:"项目文件夹",projectFolderHint:"绝对路径,例如 /Users/me/code/app",needTypeId:"先写个 id。",needProjectFolder:"项目文件夹要写绝对路径。",couldNotMakeType:"没建成类型:{error}",typeMade:"类型 {id} 建好了",typeMadeAt:"它的文件夹:",typeMadePrompt:"把这段话交给你的 agent,让它接着完善:",typeCheckWarnings:"types check 有 {count} 条提醒",done:"完成",typesExplain:"类型就是一个文件夹:你自己的放在 {user},项目的放在项目的 .agents/artifact-types(信任这个项目之前会受限制),另外还有内置类型。同一个 id,离得更近的文件夹优先。",typesExplainNoUser:"类型就是一个文件夹:项目的放在项目的 .agents/artifact-types(信任这个项目之前会受限制),另外还有内置类型。",projectTypes:"项目 {dir}",projectUntrusted:"未信任:它的类型可以用,但在你信任这个项目之前,页面只能访问自己的来源和它列出的网站,也不会启动它自己的程序。",trustProject:"信任这个项目",untrustProject:"取消信任",couldNotTrust:"没能修改信任设置:{error}",turnTypeOn:"启用 {type}",turnTypeOff:"停用 {type}",couldNotToggleType:"没能修改这个类型:{error}",sourceBuiltin:"内置",sourceLocal:"自己的",sourceInstalled:"已安装",typeCapabilities:"用到:{list}",typeNetwork:"会访问:{list}",noNetwork:"不访问外部网络",installedFrom:"来源:{source}",installType:"安装类型",installTypeDescription:"别人分享的类型包(.oatype):选择文件,或者填它的 https 地址。安装之前会先给你看它是什么。",installTypeCheck:"安装之前请先看一遍:它的页面在你的浏览器里运行,agent 会拿到它的 SKILL.md。",chooseTypePackage:"选择 .oatype 文件",typePackageUrl:"或者填地址",readPackage:"读取",installAs:"安装成(可不填)",installAsHint:"换一个 id:已经装了同 id 的类型,或者想用别的名字时填",needPackage:"先选文件或者填地址。",couldNotReadPackage:"没能读取这个包:{error}",packageId:"Id",packageSource:"来源",packagePublisher:"发布者",packagePublisherText:"{name}({site} 上的账号)",packageSite:"站点",packageSiteRemote:"{site},通过你的远端 {remote}",packageSitePublic:"{site},公开地址,不登录",packageCapabilities:"页面会用到",noCapabilities:"没有声明",packageNetwork:"会访问",packageReplaces:"替换",packageReplacesText:"{version},来自 {source}",packageSkill:"它的 SKILL.md({path},{chars} 个字符,{lines} 行),agent 做这种作品时会拿到这段说明:",packageNoSkill:"它没有 SKILL.md。",packageThirdParty:"SKILL.md、标题和简介都是发布者写的。agent 会被告知:这些内容不能授权,也不能扩大任务。",installTypeAs:"安装 {id}",updateTypeTitle:"更新 {id}",updateType:"更新",uninstallType:"卸载",uninstallConfirm:"卸载 {type}?它的作品还留在各自的文件夹里,重新安装后就能再打开。",typeInstalled:"{type} {version} 已安装",typeUpdated:"{type} 已更新到 {version}",typeUninstalled:"{type} 已卸载",couldNotInstall:"没能安装:{error}",couldNotUninstall:"没能卸载:{error}",cannotShareCloud:"{type} 作品暂时不能在这里分享。",signIn:"登录",signOut:"退出登录",signOutFailed:"没能退出登录:{error}",accountOf:"账号:{name}",sharedWithOthers:"已分享给他人",addPeople:"添加成员",addPeoplePlaceholder:"邮箱,或 @域名(该域名下所有人)",add:"添加",addInvalid:"不是邮箱地址或 @域名:{entries}",roleFor:"新加成员的角色",memberPending:"已邀请,还没登录过",memberDomain:"{domain} 的所有人",memberGroup:"群组",removeAccess:"移除访问权限",removeMemberBody:"对方将无法再访问这份内容,之后可以再加回来。",noMembers:"还没有添加其他人。",accessRestricted:"受限",accessRestrictedSub:"只有这里添加的人能打开。",accessLink:"知道链接的任何人",accessLinkSub:"拿到下面某条链接的人获得对应角色。",accessPublic:"公开",accessPublicSub:"任何人都能以查看者身份打开;下面的链接可以给更多权限。",shareSettings:"设置",viewersCanExport:"查看者可以下载和导出",editorsCanAsk:"编辑者可以向 {agent} 提需求",ownedBy:"所有者:{name}",yourRole:"你的角色:{role}",onlyOwnerShares:"只有所有者能更改谁可以访问。",emptyBodyCloud:"还没有写入任何 {type} 内容。由 Agent 来写:把下面这段发给它。",homeSubCloud:"你的作品,以及别人分享给你的。",noArtifactsCloud:"还没有作品。让 Agent 用 Artifact 工具发布一个,或者请别人分享给你。",pubTitle:"发布到网上",pubIntro:"给它一个网址,这台电脑关机也能打开。在那边由你决定谁能打开。",pubDataNote:"发布这个仪表盘也会发布它的数据:这台电脑运行它的实时查询,把结果放到站点上,能打开它的人都看得到。",pubDataPending:"它的实时数据还没上站点:在你发布数据之前,那边的页面没有数字。",pubDataConfirm:"发布它的数据",pubDataAsOf:"站点上的数据截至 {time},由这台电脑刷新。",pubDataNone:"它的数据已发布,第一批结果正在上传。",pubDataFailed:"上次刷新失败:{reason}",pubDataRefresh:"现在刷新",pubDataRefreshing:"正在刷新…",pubDataStop:"停止发布数据",pubDataStopTitle:"停止发布它的数据?",pubDataStopBody:"数据会从 {host} 上删掉,这台电脑也不再刷新它们。仪表盘仍发布在那里,只是在你再次发布数据之前没有数字。",pubConnectSite:"连接一个站点…",pubConnectAnother:"再连接一个站点…",pubAddress:"站点地址",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"你有账号的 Open Artifact 站点的网址。",pubName:"名称",pubNameHint:"用来区分不同站点的简短名字,比如 work。",pubConnect:"连接",pubConnecting:"正在连接…",pubCodeTitle:"在 {host} 上批准这台电脑",pubCodeBody:"确认页面上显示的是这个代码,然后点批准。",pubCodeOpened:"已在浏览器里打开批准页面。没看到的话,从这里打开:",pubOpenApproval:"打开批准页面",pubWaitingApproval:"等你批准…",pubConnected:"已连接到 {host},账号 {name}。",pubTryAgain:"重试",pubSignedInAs:"账号:{name}",pubStateConnected:"已连接",pubStateConnecting:"正在连接…",pubStateUnreachable:"连不上",pubStateSignedOut:"已退出登录",pubPublish:"发布",pubPublishing:"正在发布…",pubReconnect:"重新连接",pubPublishedAt:"已发布到 {host}",pubOpen:"打开",pubManage:"谁能打开,在它的网页上设置:打开后点那里的“分享”。",pubManageLink:"到网上管理访问权限",pubOpensThere:"站点连得上时,在这台电脑上打开它会直接跳到网址。",pubUnpublish:"取消发布",pubUnpublishing:"正在取消发布…",unpubTitle:"取消发布这份内容?",unpubBody:"网上那份会移到 {host} 的回收站,网址随之失效。这个文件夹留在这台电脑上,并带上网上的最新改动。",pubInSync:"已同步",pubInSyncAt:"已同步 · {when}",pubWaitingOne:"有 1 处改动等待发送",pubWaiting:"有 {count} 处改动等待发送",pubOffline:"连不上 {host}:改动先保存在这里,恢复后自动发送。",pubSignedOutSync:"已退出 {host} 的登录:改动先保存在这里,重新连接后发送。",pubSyncFailed:"上次同步失败:{error}",pubCloudMark:"已发布到网上",pubCloudAt:"已发布:{url}",pubHostEmpty:"请填写站点地址。",pubHostInvalid:"这不是网址。请按 https://artifacts.example.com 这样填写。",pubHostNotHttps:"地址必须以 https:// 开头(http 只能用于本机或内网地址,比如 192.168.1.20、nas.lan、192-168-1-20.nip.io)。",pubInsecureWarning:"这是明文 http:发布的内容不加密传输。只在你信任的网络里使用。",pubAutoSwitch:"自动发布新建的作品",pubAutoHint:"从现在起新建的作品会自动发布到 {host},之前的保持不变。",pubAutoNoSite:"先选一个默认站点。",pubDefaultSite:"默认站点",pubDefaultMark:"默认",pubAutoPublishing:"正在自动发布到 {host}…",pubAutoSignedOut:"等待发布到 {host}:这台电脑还没在那边登录。",pubAutoUnreachable:"等待发布:连不上 {host},稍后会自动重试。",pubAutoFailed:"还没发布到 {host}:{error} 稍后会自动重试。",pubApprovalTitle:"在 {host} 上批准这台电脑",pubApprovalBody:"这台电脑已设置为发布到 {host}。打开批准页面,确认显示的是这个代码,然后批准。",pubCloudSettingsFailed:"没能修改设置:{error}",pubNameInvalid:"只能用字母、数字、- 和 _(最多 32 个),比如 work。",pubNameTaken:"这个名称已经用于另一个站点,换一个名称。",pubNoDaemon:"这台电脑上的 Open Artifact 没有响应。确认它在运行后再试。",pubConnectDenied:"{host} 拒绝了这次连接。如果是误操作,再试一次。",pubConnectExpired:"代码在批准前过期了。请重试,并在几分钟内批准。",pubConnectUnreachable:"连不上 {host}。检查地址和网络后再试。",pubConnectNotHost:"{host} 看起来不是 Open Artifact 站点,请检查地址。",pubConnectFailed:"连接失败:{error}",pubIdTaken:"{host} 上已经有一份同样 id 的作品,它仍在那边发布着(可能是从另一台电脑发布的),或者属于别人。先在那边取消发布(你取消发布过的作品,再次发布时会被替换),或者复制这份作品后发布副本。",pubAlreadyElsewhere:"它已经发布到另一个站点了,先在那边取消发布。",pubTooLarge:"它对 {host} 来说太大了。把文件夹里的大文件移走后再试。",pubSignedOut:"你已退出 {host} 的登录。重新连接后再试。",pubNotAllowed:"{host} 不允许这样做:你在那边的账号可能没有发布权限。",pubUnreachable:"暂时连不上 {host},恢复后再试。",pubUnsupported:"{host} 暂时不支持这类作品。",pubFailed:"发布失败:{error}",unpubUnreachable:"连不上 {host},没法先把网上的最新版本取回来。恢复后再试。",unpubFailed:"取消发布失败:{error}",openOnWeb:"在网上打开",copyWebLink:"复制网址",webLinkCopied:"网址已复制",signOutAccess:"退出登录(同时退出组织的统一登录)",upload:"上传",uploadHint:"上传一个作品:在它的“导出”里选“整个文件夹(.zip)”得到的 .zip。",uploadDrop:"松开即可上传这个 .zip",uploadSending:"正在上传 {name}… {percent}%",uploadSendingSize:"正在上传 {name}…",uploadChecking:"正在检查 {name}…",uploadOpening:"{name} 已上传,正在打开…",uploadNotZip:"这不是 .zip 文件。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadNotArtifact:"这个 zip 不是 Open Artifact 作品文件夹。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadTooLargeLimit:"这个 zip 太大了:这个站点最多接收 {limit}。把文件夹里的大文件删掉后再试。",uploadTooLarge:"这个 zip 对这个站点来说太大了。把文件夹里的大文件删掉后再试。",uploadTooLargeSaid:"这个 zip 对这个站点来说太大了:{error} 把文件夹里的大文件删掉后再试。",uploadSignedOut:"你已退出登录。重新登录后再上传。",uploadNotAllowed:"这个站点不允许你上传作品。",uploadConflict:"站点那边出了点冲突,再试一次。",uploadTypeMissing:"这个站点暂时打不开 {type} 作品。",uploadBusy:"尝试太频繁了,稍等一会儿再试。",uploadNoAnswer:"站点没有响应。检查网络后再试。",uploadFailed:"没能上传:{error}",dismiss:"关闭",trash:"回收站",trashEmpty:"回收站是空的。",trashNote:"作品在回收站里时,分享过的人都打不开它。",trashedWhen:"{when}移到回收站",trashKeptDays:"在回收站里放满 {days} 天后会被永久删除。",trashKeptOneDay:"在回收站里放满 1 天后会被永久删除。",trashKeptForever:"会一直留在这里,直到你永久删除。",restore:"恢复",restoredTitle:"已恢复「{title}」",deleteForever:"永久删除",purgeTitle:"永久删除「{title}」?",purgeBody:"删除后无法撤销。它会从这个站点上移除,分享过的人也都无法再打开。",purged:"已永久删除「{title}」",purgeNotTrashed:"它已经不在回收站里了。",purgeGone:"它已经不存在了。",couldNotPurge:"没能删除:{error}",moveToTrash:"移到回收站",movedToTrash:"已把「{title}」移到回收站。",siteTypesNote:"这个站点上的人从自己电脑发布的类型。连到这个站点的 agent 可以用它们做作品;你也可以把某个类型安装到自己电脑上。",siteTypesYouMayPublish:"你可以在这里发布类型:open-artifact types publish <id> --remote <这个站点>。",siteTypesNoPublish:"在这里发布:{why}",siteTypesEmptyTitle:"还没有类型",siteTypesEmpty:"还没有人把类型分享给这个站点上的所有人。",siteTypesBack:"这个站点上的全部类型",siteTypeBy:"{name} 发布,{when}更新",siteTypeUnnamedPublisher:"一位没有名字的用户",siteTypePrivate:"私有",siteTypeLink:"有链接的人",siteTypeSite:"站点上的所有人",siteTypeDelisted:"已下架",siteTypeDelistedNote:"已下架:不再列出,也不能再用它做新作品。已有的作品照常能打开。",siteTypeDelistedManage:"想重新列出,就从你的电脑再发布一次:open-artifact types publish {id} --remote <这个站点>。",siteTypePublisher:"发布者",siteTypeUpdated:"更新于",siteTypeInstall:"安装到你的电脑",siteTypeInstallNote:"在你电脑的终端里运行这条命令。它会把上面这些信息再给你看一遍,问过你才安装。",siteTypeDownload:"下载安装包(.oatype)",siteTypeSkillNote:"agent 用这个类型做作品时读到的说明,由发布者编写。",siteTypeNoSkill:"这个类型没有 SKILL.md。",siteTypeManage:"管理",siteTypeWhoSees:"谁能看到",siteTypeVisibilityNote:"私有:只有你和站点管理员。有链接的人:拿到这个页面地址的人。站点上的所有人:列给每位成员。",siteTypeUnpublish:"下架",siteTypeUnpublishTitle:"下架「{name}」?",siteTypeUnpublishBody:"之后谁都不能再用它做新作品。如果已经有它的作品,这些作品照常能打开,类型只是不再列出;如果没有,就从这个站点上删除。",siteTypeRemoved:"已从这个站点删除「{name}」",siteTypeDelistedNow:"已下架「{name}」:它的 {count} 个作品照常能打开",siteTypeCouldNot:"没能完成:{error}",siteTypeGoneTitle:"已删除",siteTypeGone:"这个类型已经不在这个站点上了。",connectedSitesLoading:"正在读取你连接的站点上的类型…",connectedSitesNone:"你连接的站点上的类型会显示在这里。要连接站点,打开一个作品,点「发布到网上」,再选「连接一个站点…」。",connectedSitesFailed:"没能读取你连接的站点上的类型:{error}",connectedSiteTitle:"{name}({host})上的类型",connectedSiteNote:"这个站点上的人发布的类型。安装前会先把它的全部信息给你看,你确认之前什么都不会装。",connectedSiteEmpty:"这个站点上还没有分享给你的类型。",connectedSiteRetry:"重试",siteTypeInstallHere:"安装",siteTypeUpdateHere:"更新到 {version}",siteTypeUpdateNote:"这台电脑上装的是 {local}(id 为 {id}),站点上是 {version}。",siteTypeInstallAsOther:"换个 id 安装",siteTypeClashNote:"这台电脑上已有另一个叫 {id} 的类型:这个要换个 id 安装。",siteTypeInstalledHere:"已安装",siteTypeInstalledAs:"已安装,id 为 {id}",siteTypePublishedHere:"从这台电脑发布",siteTypeOpenPage:"打开它的页面",siteTypeClashHint:"这台电脑上已有同 id 的另一个类型。在「安装成」里给它换个 id,再点「读取」。",shareOnNetwork:"改为在本地网络里分享",shareOnNetworkSub:"这里的链接打开的是这台电脑上的副本,不是网页版。"};function z_(e){return e&&/^zh\b/i.test(e)?"zh-CN":"en"}const qm=z_(typeof navigator>"u"?void 0:navigator.language);function P_(e,o){return o?e.replace(/\{(\w+)\}/g,(a,i)=>i in o?String(o[i]):a):e}function L_(e,o,a){return P_((e==="zh-CN"?D_[o]:void 0)??__[o],a)}function E(e,o){return L_(qm,e,o)}const I_=/^art_[0-9a-z]{10,40}$/;function H_(e){if(typeof e!="string")return null;const o=/^open-artifact:\/\/artifact\/([^/?#]+)/.exec(e.trim()),a=o?o[1]:e.trim();return I_.test(a)?a:null}const h0={blank:["docs","sheets","whiteboard","slides","design-system"],agent:["design","data","motion","page"]};function U_(e){return h0.blank.includes(e)?"blank":h0.agent.includes(e)?"agent":null}const gt={artifacts:"artifacts",artifact:"artifact",types:"types",harnesses:"harnesses",desktopSettings:"desktop.settings",events:"events",share:"artifact.share",archive:"artifact.archive",thumbnail:"artifacts.thumbnail",restore:"artifacts.restore",open:"artifacts.open",boot:"artifacts.boot",preview:"artifacts.preview",create:"artifacts.create",blank:"artifacts.blank",add:"artifacts.add",relocate:"artifacts.relocate",assign:"artifacts.assign",update:"artifacts.update",duplicate:"artifacts.duplicate",delete:"artifacts.delete",ask:"artifacts.ask",adopt:"artifacts.adopt",tools:"tools",embed:"embed",view:"view",typesNew:"types.new",typesCheck:"types.check",typesFrom:"types.from",typesEnable:"types.enable",typesDisable:"types.disable",typesTrust:"types.trust",typesPreview:"types.preview",typesInstall:"types.install",typesUninstall:"types.uninstall",typesUpdate:"types.update",typesPublish:"types.publish",typesUnpublish:"types.unpublish",typesSites:"types.sites",typesServers:"types.servers",typesRestart:"types.restart",import:"artifacts.import"},B_="[Artifact comment sent to agent]",F_="[Artifact edit request sent to agent]",V_="[Artifact task finished]",Y_="[Open Artifact] ",q_="open-artifact-shell",Sa={shell:"open_artifact_shell",id:"open_artifact_id",comment:"comment",panel:"panel"},ja=/^#slide-(?:~[A-Za-z0-9_-]{1,64}(?:\.only(?:\.[0-9]{1,4}\.[0-9]{1,4})?)?|[0-9]{1,4})$/,G_="#view-inline",bf=/^#[0-9a-f]{8}-[0-9a-f]{4}(?:\.[^\s#]{1,500})?$/,X_=["not_open","not_granted"],H1=1e4,K_=["saved","actions","formats","shareNotice","peers"],U1=/^[A-Za-z0-9_.:-]{1,128}$/,$_=24,W_=["text/plain","text/html","image/png","image/svg+xml"],Q_=/^[A-Za-z0-9_-]{1,64}$/,Z_=64*1024*1024,J_=1,eD=/^[a-z][a-z0-9]{0,23}$/,m0="not run: the artifact was updated",tD=1,nD=8,oD=8e3,g0="oa_view",sD=(e,o=oD)=>typeof e=="string"?e.slice(0,o):"",Pr=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function aD(e){if(!Pr(e))return null;if(e.openArtifact==="goto"){const i=sD(e.hash,2e3);return i?{openArtifact:"goto",hash:i}:null}if(e.openArtifact!=="host_hello")return null;const o=Pr(e.caps)?e.caps:{},a={openArtifact:"host_hello",caps:{...o.sessions===!0?{sessions:!0}:{},...o.toolbar===!0?{toolbar:!0}:{},...o.artifacts===!0?{artifacts:!0}:{},...o.switcher===!0?{switcher:!0}:{}}};if(typeof e.agentName=="string"&&e.agentName.trim()&&(a.agentName=e.agentName.trim().slice(0,80)),typeof e.harness=="string"&&e.harness&&(a.harness=e.harness.slice(0,64)),Number.isInteger(e.protocol)&&(a.protocol=e.protocol),Pr(e.theme)&&(e.theme.scheme==="light"||e.theme.scheme==="dark")&&(a.theme={scheme:e.theme.scheme,...typeof e.theme.accent=="string"&&/^#[0-9a-f]{6}$/i.test(e.theme.accent)?{accent:e.theme.accent}:{}}),Array.isArray(e.destinations)&&(a.destinations=e.destinations.filter(i=>Pr(i)&&typeof i.id=="string"&&!!i.id&&typeof i.label=="string"&&!!i.label.trim()).slice(0,nD).map(i=>({id:i.id.slice(0,64),label:i.label.trim().slice(0,80)}))),Pr(e.library)){const i={};typeof e.library.harness=="string"&&e.library.harness&&(i.harness=e.library.harness.slice(0,64)),typeof e.library.workspace=="string"&&e.library.workspace&&(i.workspace=e.library.workspace.slice(0,4096)),(i.harness||i.workspace)&&(a.library=i)}return a}function B1(e){return!!e&&typeof e=="object"&&typeof e.openArtifact=="string"}const iD=["quickstart","list","publish","read","open","call","adopt","delete","share"],rD=["get","list","query","set","update","delete","str_replace","batch"],lD=["read","reply","resolve","reopen","wait"],cD=["share","export"],uD={type:"object",properties:{action:{type:"string",enum:iD,description:"What to do: quickstart, list, publish, read, open, call, adopt, delete or share. Omitted: publish."},intent:{type:"string",description:"quickstart: what is being made (design, design-system, slides, whiteboard, document, data, sheets, motion, page, other), or a few words about it."},scope:{type:"string",enum:["types","mine","all"],description:"list: types (the installed types), mine (this session's and this workspace's artifacts; the default) or all (every artifact)."},type:{type:"string",description:"list: only artifacts of this type (an id, or open-artifact://type/<id>). quickstart: the type already chosen (an id), to get its create call and steps without matching."},query:{type:"string",description:"list: only artifacts whose title contains this text."},limit:{type:"integer",description:"list: how many to return (default 50, at most 200)."},cursor:{type:"string",description:"list: the next_cursor of the previous page."},type_url:{type:"string",description:"publish without url: the type to create from (open-artifact://type/<id>, from quickstart). read without url: the type to describe."},title:{type:"string",description:"publish without url: the new artifact's name. quickstart: the name it will have, to find similar ones."},folder:{type:"string",description:"publish without url, or adopt: where the artifact's folder goes (absolute, or relative to the workspace). Default <workspace>/artifacts/<slug>."},url:{type:"string",description:"An artifact: open-artifact://artifact/<id>, as publish returned it."},files:{type:"object",additionalProperties:!0,description:'publish with url: files to write under the artifact root, as {"rel/path": "text"} or {"rel/path": {"content": "...", "encoding": "base64"}}; null deletes.'},if_match:{type:"object",additionalProperties:!0,description:'publish with url: {"rel/path": sha256 | null | "*"}. Write only while the file still has the sha256 you read, does not exist (null), or anyway ("*"). One mismatch writes nothing and returns the current versions.'},check:{type:"boolean",description:"publish with url: run the type's check action after writing; its result comes back as check."},capabilities:{type:"object",additionalProperties:!0,description:'publish, page artifacts only: the runtime capabilities the page may use, as {"db": true, "assets": true, ...}. Omitted: kept; {}: none; otherwise the whole set. With url it may be given without files.'},open:{type:"string",enum:["after_first_write","now","never"],description:"publish without url: after_first_write (the default) opens the page in your app once your first write lands; now opens it at once; never leaves it closed. Where your app cannot show pages by itself the result says so: open view_url in your app's built-in browser, if you have one."},related:{type:"boolean",description:"quickstart: list existing artifacts the recommended type can build on, such as design systems (default true)."},path:{type:"string",description:"read: one file or folder under the root (omitted: the record and the file list)."},paths:{type:"array",items:{type:"string"},description:"read: several files under the root at once."},name:{type:"string",description:"call: the action's name (check, upload, ...; read with url lists them)."},args:{type:"object",additionalProperties:!0,description:"call: the action's arguments. upload: {file: absolute path, name?, group?}."},panel:{type:"string",enum:cD,description:"open: also open the page's Share panel (share), for the person to share it on the network, or its Export tab (export), for them to download a file."},cloud:{type:"string",description:"share: publish the artifact to this cloud remote (its name, as `open-artifact remote list` shows it). It works only on a remote the person set up and let agents publish to (agentMayPublish); otherwise the person publishes it, from the Share panel or with `open-artifact publish <id> --remote <name>`."}}},fD={type:"object",properties:{action:{type:"string",enum:rD,description:"What to do: get, list, query, set, update, delete, str_replace or batch."},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>)."},collection:{type:"string",description:"The collection: alone for list / query (query needs it), with doc_id for one document."},doc_id:{type:"string",description:"With collection: the document to get / set / update / delete / str_replace."},path:{type:"string",description:"collection/doc_id, instead of the two."},data:{type:"object",additionalProperties:!0,description:"set / update: the document's fields."},file_path:{type:"string",description:"set / update: a JSON file holding the fields, instead of data."},if_match:{description:'set / update / delete / str_replace: the sha256 get returned (write only if unchanged), null (only if it does not exist) or "*" (replace whatever is there).'},field:{type:"string",description:"str_replace: the text field, as a dot path (body, notes.text)."},old:{type:"string",description:"str_replace: the passage to replace; it must occur exactly once."},new:{type:"string",description:"str_replace: the passage that replaces it."},where:{type:"array",items:{type:"object",additionalProperties:!0},description:"query: [{field, op, value}], all must hold. op: ==, !=, <, <=, >, >=, in, not-in (up to 30 values), array-contains."},order_by:{type:"object",additionalProperties:!0,description:'query: {field, dir: "asc" | "desc"}.'},limit:{type:"integer",description:"list / query: how many documents (default 100, at most 1000)."},cursor:{type:"string",description:"list / query: the next_cursor of the previous page."},out_file:{type:"string",description:"get / list / query: write the result to this JSON file (absolute, or relative to the workspace) and return only its path and counts."},writes:{type:"array",items:{type:"object",additionalProperties:!0},description:"batch: [{op: set|update|delete|str_replace, path | collection+doc_id, data | file_path, if_match?, field?, old?, new?}], at most 500."}},required:["action","url"]},dD={type:"object",properties:{action:{type:"string",enum:lD,description:"What to do: read, reply, resolve, reopen or wait."},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>). wait: optional."},thread_id:{type:"string",description:'reply / resolve / reopen: the thread (after ";thread=" in the message).'},text:{type:"string",description:"reply: the answer."},resolve:{type:"boolean",description:"reply: resolve the thread too."},all:{type:"boolean",description:"read: resolved threads too."},since:{type:"string",description:"read: only threads with a message at or after this time (ISO 8601)."},acknowledge_duplicate:{type:"boolean",description:"reply: send the same text as your last reply in this thread again, on purpose."},timeout_ms:{type:"number",description:"wait: how long (default 600000)."}},required:["action"]},y0={Artifact:uD,ArtifactData:fD,ArtifactComments:dD},pD={Artifact:["Make and change artifacts: typed folders of files that open as live pages the person can view, edit, comment on and export. Actions:","- quickstart {intent, type?}: call first for a new artifact; recommends a type (or takes the one given) and returns the call that creates it, the steps for this app and similar artifacts that already exist.",'- list {scope: "mine" | "all" | "types", type?, query?}: find existing artifacts, or the installed types.',"- publish {type_url, title, folder?, open?}: create an artifact; the result carries its root folder and the type's instructions. publish {url, files, if_match?, check?}: write files when you have no file tools of your own. A page artifact also takes capabilities (on create or write): the runtime capabilities its page may use.","- read {url, path? | paths?}: the artifact's record, files and actions, or some of its files with their sha256. read {type_url}: a type's instructions, before creating.",`- open {url, panel?}: show it to the person in the computer's browser (or the app, when it shows pages), once its content is written. When your app has a built-in browser, open view_url there instead. panel "share" or "export" opens its Share panel or Export tab for them.`,"- call {url, name, args?}: run one of the type's actions (check, upload, ...). A long one answers {task, pending: true}; its result comes later as a message.","- adopt {url | folder}: take over an artifact, or add an existing folder. Only when the person asks.","- share {url}: whether it is shared on the local network, and its links. Only the person changes that, in the page's Share panel.","- delete {url}: forget an artifact; its folder stays. Only when the person asks."].join(`
9
+ `).replace(gR,"")}function Tv(t,n){return n=wv(n),wv(t)===n}function wt(t,n,s,r,u,f){switch(s){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||Ya(t,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&Ya(t,""+r);break;case"className":kl(t,"class",r);break;case"tabIndex":kl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":kl(t,s,r);break;case"style":Tg(t,r,f);break;case"data":if(n!=="object"){kl(t,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||s!=="href")){t.removeAttribute(s);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(s);break}r=Ml(""+r),t.setAttribute(s,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(n!=="input"&&wt(t,n,"name",u.name,u,null),wt(t,n,"formEncType",u.formEncType,u,null),wt(t,n,"formMethod",u.formMethod,u,null),wt(t,n,"formTarget",u.formTarget,u,null)):(wt(t,n,"encType",u.encType,u,null),wt(t,n,"method",u.method,u,null),wt(t,n,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(s);break}r=Ml(""+r),t.setAttribute(s,r);break;case"onClick":r!=null&&(t.onclick=ko);break;case"onScroll":r!=null&&st("scroll",t);break;case"onScrollEnd":r!=null&&st("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(s=r.__html,s!=null){if(u.children!=null)throw Error(i(60));t.innerHTML=s}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}s=Ml(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(s,""+r):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":r===!0?t.setAttribute(s,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(s,r):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(s,r):t.removeAttribute(s);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(s):t.setAttribute(s,r);break;case"popover":st("beforetoggle",t),st("toggle",t),Ol(t,"popover",r);break;case"xlinkActuate":Oo(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Oo(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Oo(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Oo(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Oo(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Oo(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Oo(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Oo(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Oo(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ol(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=YE.get(s)||s,Ol(t,s,r))}}function hp(t,n,s,r,u,f){switch(s){case"style":Tg(t,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(s=r.__html,s!=null){if(u.children!=null)throw Error(i(60));t.innerHTML=s}}break;case"children":typeof r=="string"?Ya(t,r):(typeof r=="number"||typeof r=="bigint")&&Ya(t,""+r);break;case"onScroll":r!=null&&st("scroll",t);break;case"onScrollEnd":r!=null&&st("scrollend",t);break;case"onClick":r!=null&&(t.onclick=ko);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hg.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),n=s.slice(2,u?s.length-7:void 0),f=t[mn]||null,f=f!=null?f[s]:null,typeof f=="function"&&t.removeEventListener(n,f,u),typeof r=="function")){typeof f!="function"&&f!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(n,r,u);break e}s in t?t[s]=r:r===!0?t.setAttribute(s,""):Ol(t,s,r)}}}function dn(t,n,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",t),st("load",t);var r=!1,u=!1,f;for(f in s)if(s.hasOwnProperty(f)){var x=s[f];if(x!=null)switch(f){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:wt(t,n,f,x,s,null)}}u&&wt(t,n,"srcSet",s.srcSet,s,null),r&&wt(t,n,"src",s.src,s,null);return;case"input":st("invalid",t);var R=f=x=u=null,V=null,oe=null;for(r in s)if(s.hasOwnProperty(r)){var ue=s[r];if(ue!=null)switch(r){case"name":u=ue;break;case"type":x=ue;break;case"checked":V=ue;break;case"defaultChecked":oe=ue;break;case"value":f=ue;break;case"defaultValue":R=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,n));break;default:wt(t,n,r,ue,s,null)}}vg(t,f,R,V,oe,x,u,!1);return;case"select":st("invalid",t),r=x=f=null;for(u in s)if(s.hasOwnProperty(u)&&(R=s[u],R!=null))switch(u){case"value":f=R;break;case"defaultValue":x=R;break;case"multiple":r=R;default:wt(t,n,u,R,s,null)}n=f,s=x,t.multiple=!!r,n!=null?Va(t,!!r,n,!1):s!=null&&Va(t,!!r,s,!0);return;case"textarea":st("invalid",t),f=u=r=null;for(x in s)if(s.hasOwnProperty(x)&&(R=s[x],R!=null))switch(x){case"value":r=R;break;case"defaultValue":u=R;break;case"children":f=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(i(91));break;default:wt(t,n,x,R,s,null)}Sg(t,r,u,f);return;case"option":for(V in s)s.hasOwnProperty(V)&&(r=s[V],r!=null)&&(V==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":wt(t,n,V,r,s,null));return;case"dialog":st("beforetoggle",t),st("toggle",t),st("cancel",t),st("close",t);break;case"iframe":case"object":st("load",t);break;case"video":case"audio":for(r=0;r<Tr.length;r++)st(Tr[r],t);break;case"image":st("error",t),st("load",t);break;case"details":st("toggle",t);break;case"embed":case"source":case"link":st("error",t),st("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in s)if(s.hasOwnProperty(oe)&&(r=s[oe],r!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:wt(t,n,oe,r,s,null)}return;default:if(Of(n)){for(ue in s)s.hasOwnProperty(ue)&&(r=s[ue],r!==void 0&&hp(t,n,ue,r,s,void 0));return}}for(R in s)s.hasOwnProperty(R)&&(r=s[R],r!=null&&wt(t,n,R,r,s,null))}function yR(t,n,s,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,x=null,R=null,V=null,oe=null,ue=null;for(re in s){var de=s[re];if(s.hasOwnProperty(re)&&de!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":V=de;default:r.hasOwnProperty(re)||wt(t,n,re,null,r,de)}}for(var ae in r){var re=r[ae];if(de=s[ae],r.hasOwnProperty(ae)&&(re!=null||de!=null))switch(ae){case"type":f=re;break;case"name":u=re;break;case"checked":oe=re;break;case"defaultChecked":ue=re;break;case"value":x=re;break;case"defaultValue":R=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,n));break;default:re!==de&&wt(t,n,ae,re,r,de)}}Rf(t,x,R,V,oe,ue,f,u);return;case"select":re=x=R=ae=null;for(f in s)if(V=s[f],s.hasOwnProperty(f)&&V!=null)switch(f){case"value":break;case"multiple":re=V;default:r.hasOwnProperty(f)||wt(t,n,f,null,r,V)}for(u in r)if(f=r[u],V=s[u],r.hasOwnProperty(u)&&(f!=null||V!=null))switch(u){case"value":ae=f;break;case"defaultValue":R=f;break;case"multiple":x=f;default:f!==V&&wt(t,n,u,f,r,V)}n=R,s=x,r=re,ae!=null?Va(t,!!s,ae,!1):!!r!=!!s&&(n!=null?Va(t,!!s,n,!0):Va(t,!!s,s?[]:"",!1));return;case"textarea":re=ae=null;for(R in s)if(u=s[R],s.hasOwnProperty(R)&&u!=null&&!r.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:wt(t,n,R,null,r,u)}for(x in r)if(u=r[x],f=s[x],r.hasOwnProperty(x)&&(u!=null||f!=null))switch(x){case"value":ae=u;break;case"defaultValue":re=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(i(91));break;default:u!==f&&wt(t,n,x,u,r,f)}xg(t,ae,re);return;case"option":for(var _e in s)ae=s[_e],s.hasOwnProperty(_e)&&ae!=null&&!r.hasOwnProperty(_e)&&(_e==="selected"?t.selected=!1:wt(t,n,_e,null,r,ae));for(V in r)ae=r[V],re=s[V],r.hasOwnProperty(V)&&ae!==re&&(ae!=null||re!=null)&&(V==="selected"?t.selected=ae&&typeof ae!="function"&&typeof ae!="symbol":wt(t,n,V,ae,r,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Fe in s)ae=s[Fe],s.hasOwnProperty(Fe)&&ae!=null&&!r.hasOwnProperty(Fe)&&wt(t,n,Fe,null,r,ae);for(oe in r)if(ae=r[oe],re=s[oe],r.hasOwnProperty(oe)&&ae!==re&&(ae!=null||re!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,n));break;default:wt(t,n,oe,ae,r,re)}return;default:if(Of(n)){for(var Tt in s)ae=s[Tt],s.hasOwnProperty(Tt)&&ae!==void 0&&!r.hasOwnProperty(Tt)&&hp(t,n,Tt,void 0,r,ae);for(ue in r)ae=r[ue],re=s[ue],!r.hasOwnProperty(ue)||ae===re||ae===void 0&&re===void 0||hp(t,n,ue,ae,r,re);return}}for(var te in s)ae=s[te],s.hasOwnProperty(te)&&ae!=null&&!r.hasOwnProperty(te)&&wt(t,n,te,null,r,ae);for(de in r)ae=r[de],re=s[de],!r.hasOwnProperty(de)||ae===re||ae==null&&re==null||wt(t,n,de,ae,r,re)}function Ev(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bR(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,s=performance.getEntriesByType("resource"),r=0;r<s.length;r++){var u=s[r],f=u.transferSize,x=u.initiatorType,R=u.duration;if(f&&R&&Ev(x)){for(x=0,R=u.responseEnd,r+=1;r<s.length;r++){var V=s[r],oe=V.startTime;if(oe>R)break;var ue=V.transferSize,de=V.initiatorType;ue&&Ev(de)&&(V=V.responseEnd,x+=ue*(V<R?1:(R-oe)/(V-oe)))}if(--r,n+=8*(f+x)/(u.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var mp=null,gp=null;function Rc(t){return t.nodeType===9?t:t.ownerDocument}function Cv(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Rv(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function yp(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var bp=null;function vR(){var t=window.event;return t&&t.type==="popstate"?t===bp?!1:(bp=t,!0):(bp=null,!1)}var Av=typeof setTimeout=="function"?setTimeout:void 0,xR=typeof clearTimeout=="function"?clearTimeout:void 0,Ov=typeof Promise=="function"?Promise:void 0,SR=typeof queueMicrotask=="function"?queueMicrotask:typeof Ov<"u"?function(t){return Ov.resolve(null).then(t).catch(wR)}:Av;function wR(t){setTimeout(function(){throw t})}function Ms(t){return t==="head"}function kv(t,n){var s=n,r=0;do{var u=s.nextSibling;if(t.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(r===0){t.removeChild(u),Si(n);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")Cr(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Cr(s);for(var f=s.firstChild;f;){var x=f.nextSibling,R=f.nodeName;f[Vi]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=x}}else s==="body"&&Cr(t.ownerDocument.body);s=u}while(s);Si(n)}function Nv(t,n){var s=t;t=0;do{var r=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),r&&r.nodeType===8)if(s=r.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=r}while(s)}function vp(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":vp(s),Ef(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function TR(t,n,s,r){for(;t.nodeType===1;){var u=s;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[Vi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(f=t.getAttribute("src"),(f!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=Jn(t.nextSibling),t===null)break}return null}function ER(t,n,s){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Jn(t.nextSibling),t===null))return null;return t}function Mv(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Jn(t.nextSibling),t===null))return null;return t}function xp(t){return t.data==="$?"||t.data==="$~"}function Sp(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function CR(t,n){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||s.readyState!=="loading")n();else{var r=function(){n(),s.removeEventListener("DOMContentLoaded",r)};s.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Jn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var wp=null;function jv(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(n===0)return Jn(t.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}t=t.nextSibling}return null}function _v(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return t;n--}else s!=="/$"&&s!=="/&"||n++}t=t.previousSibling}return null}function Dv(t,n,s){switch(n=Rc(s),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function Cr(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ef(t)}var eo=new Map,zv=new Set;function Ac(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var qo=q.d;q.d={f:RR,r:AR,D:OR,C:kR,L:NR,m:MR,X:_R,S:jR,M:DR};function RR(){var t=qo.f(),n=bc();return t||n}function AR(t){var n=Ua(t);n!==null&&n.tag===5&&n.type==="form"?Zy(n):qo.r(t)}var bi=typeof document>"u"?null:document;function Pv(t,n,s){var r=bi;if(r&&typeof n=="string"&&n){var u=Gn(n);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),zv.has(u)||(zv.add(u),t={rel:t,crossOrigin:s,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),dn(n,"link",t),sn(n),r.head.appendChild(n)))}}function OR(t){qo.D(t),Pv("dns-prefetch",t,null)}function kR(t,n){qo.C(t,n),Pv("preconnect",t,n)}function NR(t,n,s){qo.L(t,n,s);var r=bi;if(r&&t&&n){var u='link[rel="preload"][as="'+Gn(n)+'"]';n==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+Gn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+Gn(s.imageSizes)+'"]')):u+='[href="'+Gn(t)+'"]';var f=u;switch(n){case"style":f=vi(t);break;case"script":f=xi(t)}eo.has(f)||(t=v({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:t,as:n},s),eo.set(f,t),r.querySelector(u)!==null||n==="style"&&r.querySelector(Rr(f))||n==="script"&&r.querySelector(Ar(f))||(n=r.createElement("link"),dn(n,"link",t),sn(n),r.head.appendChild(n)))}}function MR(t,n){qo.m(t,n);var s=bi;if(s&&t){var r=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Gn(r)+'"][href="'+Gn(t)+'"]',f=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=xi(t)}if(!eo.has(f)&&(t=v({rel:"modulepreload",href:t},n),eo.set(f,t),s.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ar(f)))return}r=s.createElement("link"),dn(r,"link",t),sn(r),s.head.appendChild(r)}}}function jR(t,n,s){qo.S(t,n,s);var r=bi;if(r&&t){var u=Ba(r).hoistableStyles,f=vi(t);n=n||"default";var x=u.get(f);if(!x){var R={loading:0,preload:null};if(x=r.querySelector(Rr(f)))R.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":n},s),(s=eo.get(f))&&Tp(t,s);var V=x=r.createElement("link");sn(V),dn(V,"link",t),V._p=new Promise(function(oe,ue){V.onload=oe,V.onerror=ue}),V.addEventListener("load",function(){R.loading|=1}),V.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Oc(x,n,r)}x={type:"stylesheet",instance:x,count:1,state:R},u.set(f,x)}}}function _R(t,n){qo.X(t,n);var s=bi;if(s&&t){var r=Ba(s).hoistableScripts,u=xi(t),f=r.get(u);f||(f=s.querySelector(Ar(u)),f||(t=v({src:t,async:!0},n),(n=eo.get(u))&&Ep(t,n),f=s.createElement("script"),sn(f),dn(f,"link",t),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function DR(t,n){qo.M(t,n);var s=bi;if(s&&t){var r=Ba(s).hoistableScripts,u=xi(t),f=r.get(u);f||(f=s.querySelector(Ar(u)),f||(t=v({src:t,async:!0,type:"module"},n),(n=eo.get(u))&&Ep(t,n),f=s.createElement("script"),sn(f),dn(f,"link",t),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function Lv(t,n,s,r){var u=(u=ie.current)?Ac(u):null;if(!u)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=vi(s.href),s=Ba(u).hoistableStyles,r=s.get(n),r||(r={type:"style",instance:null,count:0,state:null},s.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=vi(s.href);var f=Ba(u).hoistableStyles,x=f.get(t);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(t,x),(f=u.querySelector(Rr(t)))&&!f._p&&(x.instance=f,x.state.loading=5),eo.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},eo.set(t,s),f||zR(u,t,s,x.state))),n&&r===null)throw Error(i(528,""));return x}if(n&&r!==null)throw Error(i(529,""));return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=xi(s),s=Ba(u).hoistableScripts,r=s.get(n),r||(r={type:"script",instance:null,count:0,state:null},s.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function vi(t){return'href="'+Gn(t)+'"'}function Rr(t){return'link[rel="stylesheet"]['+t+"]"}function Iv(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function zR(t,n,s,r){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=t.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),dn(n,"link",s),sn(n),t.head.appendChild(n))}function xi(t){return'[src="'+Gn(t)+'"]'}function Ar(t){return"script[async]"+t}function Hv(t,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var r=t.querySelector('style[data-href~="'+Gn(s.href)+'"]');if(r)return n.instance=r,sn(r),r;var u=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),sn(r),dn(r,"style",u),Oc(r,s.precedence,t),n.instance=r;case"stylesheet":u=vi(s.href);var f=t.querySelector(Rr(u));if(f)return n.state.loading|=4,n.instance=f,sn(f),f;r=Iv(s),(u=eo.get(u))&&Tp(r,u),f=(t.ownerDocument||t).createElement("link"),sn(f);var x=f;return x._p=new Promise(function(R,V){x.onload=R,x.onerror=V}),dn(f,"link",r),n.state.loading|=4,Oc(f,s.precedence,t),n.instance=f;case"script":return f=xi(s.src),(u=t.querySelector(Ar(f)))?(n.instance=u,sn(u),u):(r=s,(u=eo.get(f))&&(r=v({},s),Ep(r,u)),t=t.ownerDocument||t,u=t.createElement("script"),sn(u),dn(u,"link",r),t.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,Oc(r,s.precedence,t));return n.instance}function Oc(t,n,s){for(var r=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,f=u,x=0;x<r.length;x++){var R=r[x];if(R.dataset.precedence===n)f=R;else if(f!==u)break}f?f.parentNode.insertBefore(t,f.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(t,n.firstChild))}function Tp(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Ep(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var kc=null;function Uv(t,n,s){if(kc===null){var r=new Map,u=kc=new Map;u.set(s,r)}else u=kc,r=u.get(s),r||(r=new Map,u.set(s,r));if(r.has(t))return r;for(r.set(t,null),s=s.getElementsByTagName(t),u=0;u<s.length;u++){var f=s[u];if(!(f[Vi]||f[qt]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var x=f.getAttribute(n)||"";x=t+x;var R=r.get(x);R?R.push(f):r.set(x,[f])}}return r}function Bv(t,n,s){t=t.ownerDocument||t,t.head.insertBefore(s,n==="title"?t.querySelector("head > title"):null)}function PR(t,n,s){if(s===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Fv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function LR(t,n,s,r){if(s.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=vi(r.href),f=n.querySelector(Rr(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Nc.bind(t),n.then(t,t)),s.state.loading|=4,s.instance=f,sn(f);return}f=n.ownerDocument||n,r=Iv(r),(u=eo.get(u))&&Tp(r,u),f=f.createElement("link"),sn(f);var x=f;x._p=new Promise(function(R,V){x.onload=R,x.onerror=V}),dn(f,"link",r),s.instance=f}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Nc.bind(t),n.addEventListener("load",s),n.addEventListener("error",s))}}var Cp=0;function IR(t,n){return t.stylesheets&&t.count===0&&jc(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var r=setTimeout(function(){if(t.stylesheets&&jc(t,t.stylesheets),t.unsuspend){var f=t.unsuspend;t.unsuspend=null,f()}},6e4+n);0<t.imgBytes&&Cp===0&&(Cp=62500*bR());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&jc(t,t.stylesheets),t.unsuspend)){var f=t.unsuspend;t.unsuspend=null,f()}},(t.imgBytes>Cp?50:800)+n);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function Nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Mc=null;function jc(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Mc=new Map,n.forEach(HR,t),Mc=null,Nc.call(t))}function HR(t,n){if(!(n.state.loading&4)){var s=Mc.get(t);if(s)var r=s.get(null);else{s=new Map,Mc.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var x=u[f];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),r=x)}r&&s.set(null,r)}u=n.instance,x=u.getAttribute("data-precedence"),f=s.get(x)||r,f===r&&s.set(null,u),s.set(x,u),this.count++,r=Nc.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),f?f.parentNode.insertBefore(u,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),n.state.loading|=4}}var Or={$$typeof:k,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function UR(t,n,s,r,u,f,x,R,V){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yo(0),this.hiddenUpdates=yo(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function Vv(t,n,s,r,u,f,x,R,V,oe,ue,de){return t=new UR(t,n,s,x,V,oe,ue,de,R),n=1,f===!0&&(n|=24),f=Pn(3,null,null,n),t.current=f,f.stateNode=t,n=sd(),n.refCount++,t.pooledCache=n,n.refCount++,f.memoizedState={element:r,isDehydrated:s,cache:n},ld(f),t}function Yv(t){return t?(t=Qa,t):Qa}function qv(t,n,s,r,u,f){u=Yv(u),r.context===null?r.context=u:r.pendingContext=u,r=xs(n),r.payload={element:s},f=f===void 0?null:f,f!==null&&(r.callback=f),s=Ss(t,r,n),s!==null&&(An(s,t,n),ir(s,t,n))}function Gv(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<n?s:n}}function Rp(t,n){Gv(t,n),(t=t.alternate)&&Gv(t,n)}function Xv(t){if(t.tag===13||t.tag===31){var n=oa(t,67108864);n!==null&&An(n,t,67108864),Rp(t,67108864)}}function Kv(t){if(t.tag===13||t.tag===31){var n=Bn();n=Dn(n);var s=oa(t,n);s!==null&&An(s,t,n),Rp(t,n)}}var _c=!0;function BR(t,n,s,r){var u=P.T;P.T=null;var f=q.p;try{q.p=2,Ap(t,n,s,r)}finally{q.p=f,P.T=u}}function FR(t,n,s,r){var u=P.T;P.T=null;var f=q.p;try{q.p=8,Ap(t,n,s,r)}finally{q.p=f,P.T=u}}function Ap(t,n,s,r){if(_c){var u=Op(r);if(u===null)pp(t,n,r,Dc,s),Wv(t,r);else if(YR(u,t,n,s,r))r.stopPropagation();else if(Wv(t,r),n&4&&-1<VR.indexOf(t)){for(;u!==null;){var f=Ua(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var x=ft(f.pendingLanes);if(x!==0){var R=f;for(R.pendingLanes|=2,R.entangledLanes|=2;x;){var V=1<<31-ct(x);R.entanglements[1]|=V,x&=~V}wo(f),(ht&6)===0&&(gc=le()+500,wr(0))}}break;case 31:case 13:R=oa(f,2),R!==null&&An(R,f,2),bc(),Rp(f,2)}if(f=Op(r),f===null&&pp(t,n,r,Dc,s),f===u)break;u=f}u!==null&&r.stopPropagation()}else pp(t,n,r,null,s)}}function Op(t){return t=Nf(t),kp(t)}var Dc=null;function kp(t){if(Dc=null,t=Ha(t),t!==null){var n=c(t);if(n===null)t=null;else{var s=n.tag;if(s===13){if(t=d(n),t!==null)return t;t=null}else if(s===31){if(t=g(n),t!==null)return t;t=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Dc=t,null}function $v(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ve()){case he:return 2;case ce:return 8;case xe:case He:return 32;case Lt:return 268435456;default:return 32}default:return 32}}var Np=!1,js=null,_s=null,Ds=null,kr=new Map,Nr=new Map,zs=[],VR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Wv(t,n){switch(t){case"focusin":case"focusout":js=null;break;case"dragenter":case"dragleave":_s=null;break;case"mouseover":case"mouseout":Ds=null;break;case"pointerover":case"pointerout":kr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nr.delete(n.pointerId)}}function Mr(t,n,s,r,u,f){return t===null||t.nativeEvent!==f?(t={blockedOn:n,domEventName:s,eventSystemFlags:r,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Ua(n),n!==null&&Xv(n)),t):(t.eventSystemFlags|=r,n=t.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),t)}function YR(t,n,s,r,u){switch(n){case"focusin":return js=Mr(js,t,n,s,r,u),!0;case"dragenter":return _s=Mr(_s,t,n,s,r,u),!0;case"mouseover":return Ds=Mr(Ds,t,n,s,r,u),!0;case"pointerover":var f=u.pointerId;return kr.set(f,Mr(kr.get(f)||null,t,n,s,r,u)),!0;case"gotpointercapture":return f=u.pointerId,Nr.set(f,Mr(Nr.get(f)||null,t,n,s,r,u)),!0}return!1}function Qv(t){var n=Ha(t.target);if(n!==null){var s=c(n);if(s!==null){if(n=s.tag,n===13){if(n=d(s),n!==null){t.blockedOn=n,ps(t.priority,function(){Kv(s)});return}}else if(n===31){if(n=g(s),n!==null){t.blockedOn=n,ps(t.priority,function(){Kv(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function zc(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var s=Op(t.nativeEvent);if(s===null){s=t.nativeEvent;var r=new s.constructor(s.type,s);kf=r,s.target.dispatchEvent(r),kf=null}else return n=Ua(s),n!==null&&Xv(n),t.blockedOn=s,!1;n.shift()}return!0}function Zv(t,n,s){zc(t)&&s.delete(n)}function qR(){Np=!1,js!==null&&zc(js)&&(js=null),_s!==null&&zc(_s)&&(_s=null),Ds!==null&&zc(Ds)&&(Ds=null),kr.forEach(Zv),Nr.forEach(Zv)}function Pc(t,n){t.blockedOn===n&&(t.blockedOn=null,Np||(Np=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,qR)))}var Lc=null;function Jv(t){Lc!==t&&(Lc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Lc===t&&(Lc=null);for(var n=0;n<t.length;n+=3){var s=t[n],r=t[n+1],u=t[n+2];if(typeof r!="function"){if(kp(r||s)===null)continue;break}var f=Ua(s);f!==null&&(t.splice(n,3),n-=3,Od(f,{pending:!0,data:u,method:s.method,action:r},r,u))}}))}function Si(t){function n(V){return Pc(V,t)}js!==null&&Pc(js,t),_s!==null&&Pc(_s,t),Ds!==null&&Pc(Ds,t),kr.forEach(n),Nr.forEach(n);for(var s=0;s<zs.length;s++){var r=zs[s];r.blockedOn===t&&(r.blockedOn=null)}for(;0<zs.length&&(s=zs[0],s.blockedOn===null);)Qv(s),s.blockedOn===null&&zs.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(r=0;r<s.length;r+=3){var u=s[r],f=s[r+1],x=u[mn]||null;if(typeof f=="function")x||Jv(s);else if(x){var R=null;if(f&&f.hasAttribute("formAction")){if(u=f,x=f[mn]||null)R=x.formAction;else if(kp(u)!==null)continue}else R=x.action;typeof R=="function"?s[r+1]=R:(s.splice(r,3),r-=3),Jv(s)}}}function ex(){function t(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),r||setTimeout(s,20)}function s(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(s,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function Mp(t){this._internalRoot=t}Ic.prototype.render=Mp.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var s=n.current,r=Bn();qv(s,r,t,n,null,null)},Ic.prototype.unmount=Mp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;qv(t.current,2,null,t,null,null),bc(),n[Ao]=null}};function Ic(t){this._internalRoot=t}Ic.prototype.unstable_scheduleHydration=function(t){if(t){var n=bo();t={blockedOn:null,target:t,priority:n};for(var s=0;s<zs.length&&n!==0&&n<zs[s].priority;s++);zs.splice(s,0,t),s===0&&Qv(t)}};var tx=o.version;if(tx!=="19.2.4")throw Error(i(527,tx,"19.2.4"));q.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=h(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var GR={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{Ae=Hc.inject(GR),Ye=Hc}catch{}}return _r.createRoot=function(t,n){if(!l(t))throw Error(i(299));var s=!1,r="",u=lb,f=cb,x=ub;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Vv(t,1,!1,null,null,s,r,null,u,f,x,ex),t[Ao]=n.current,dp(t),new Mp(n)},_r.hydrateRoot=function(t,n,s){if(!l(t))throw Error(i(299));var r=!1,u="",f=lb,x=cb,R=ub,V=null;return s!=null&&(s.unstable_strictMode===!0&&(r=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(R=s.onRecoverableError),s.formState!==void 0&&(V=s.formState)),n=Vv(t,1,!0,n,s??null,r,u,V,f,x,R,ex),n.context=Yv(null),s=n.current,r=Bn(),r=Dn(r),u=xs(r),u.callback=null,Ss(s,u,r),s=r,n.current.lanes=s,Sn(n,s),wo(n),t[Ao]=n.current,dp(t),new Ic(n)},_r.version="19.2.4",_r}var fx;function sA(){if(fx)return Dp.exports;fx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(o){console.error(o)}}return e(),Dp.exports=oA(),Dp.exports}var aA=sA();function uS(e){var o,a,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(o=0;o<l;o++)e[o]&&(a=uS(e[o]))&&(i&&(i+=" "),i+=a)}else for(a in e)e[a]&&(i&&(i+=" "),i+=a);return i}function iA(){for(var e,o,a=0,i="",l=arguments.length;a<l;a++)(e=arguments[a])&&(o=uS(e))&&(i&&(i+=" "),i+=o);return i}function lt(...e){return iA(e)}const dx={};function Zt(e,o){const a=b.useRef(dx);return a.current===dx&&(a.current=e(o)),a}const dh=[];let ph;function rA(){return ph}function lA(e){dh.push(e)}function cl(e){const o=(a,i)=>{const l=Zt(cA).current;let c;try{ph=l;for(const d of dh)d.before(l);c=e(a,i);for(const d of dh)d.after(l);l.didInitialize=!0}finally{ph=void 0}return c};return o.displayName=e.displayName||e.name,o}function qh(e){return b.forwardRef(cl(e))}function cA(){return{didInitialize:!1}}function Ht(){}const ho=Object.freeze([]),Ct=Object.freeze({}),uA=()=>{},we=typeof document<"u"?b.useLayoutEffect:uA;function fA(e,o){return function(i,...l){const c=new URL(e);return c.searchParams.set("code",i.toString()),l.forEach(d=>c.searchParams.append("args[]",d)),`${o} error #${i}; visit ${c} for the full message.`}}const kt=fA("https://base-ui.com/production-error","Base UI"),fS=b.createContext(void 0);function Au(e){const o=b.useContext(fS);if(o===void 0&&!e)throw new Error(kt(72));return o}function Ou(e){b.useEffect(e,ho)}const Dr=0;class Mn{static create(){return new Mn}currentId=Dr;start(o,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Dr,a()},o)}isStarted(){return this.currentId!==Dr}clear=()=>{this.currentId!==Dr&&(clearTimeout(this.currentId),this.currentId=Dr)};disposeEffect=()=>this.clear}function on(){const e=Zt(Mn.create).current;return Ou(e.disposeEffect),e}function dA(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:pA,platform:hA,maxTouchPoints:mA}=dA(),ku=pA.toLowerCase(),Wr=hA.toLowerCase(),Nu=/^i(os$|p)/.test(Wr)||Wr==="macintel"&&mA>1,px="android",hh=Wr===px||ku.includes(px),Gh=!Nu&&Wr.startsWith("mac");Wr.startsWith("win");const gA=Gh||Nu,cs=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!cs&&ku.includes("firefox");!cs&&ku.includes("chrom");const dS=gA,Xh=/jsdom|happydom/.test(ku);function To(e){e.preventDefault(),e.stopPropagation()}function yA(e){return"nativeEvent"in e}function Mu(e){return e.pointerType===""&&e.isTrusted?!0:hh&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Kh(e){return Xh?!1:!hh&&e.width===0&&e.height===0||hh&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Bs(e,o){const a=["mouse","pen"];return o||a.push("",void 0),a.includes(e)}function bA(e){const o=e.type;return o==="click"||o==="mousedown"||o==="keydown"||o==="keyup"}function ju(){return typeof window<"u"}function pn(e){return $h(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function us(e){var o;return(o=($h(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function $h(e){return ju()?e instanceof Node||e instanceof Rt(e).Node:!1}function et(e){return ju()?e instanceof Element||e instanceof Rt(e).Element:!1}function vt(e){return ju()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function Oi(e){return!ju()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function ul(e){const{overflow:o,overflowX:a,overflowY:i,display:l}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(o+i+a)&&l!=="inline"&&l!=="contents"}function vA(e){return/^(table|td|th)$/.test(pn(e))}function _u(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const xA=/transform|translate|scale|rotate|perspective|filter/,SA=/paint|layout|strict|content/,ga=e=>!!e&&e!=="none";let Ip;function Wh(e){const o=et(e)?Fn(e):e;return ga(o.transform)||ga(o.translate)||ga(o.scale)||ga(o.rotate)||ga(o.perspective)||!Qh()&&(ga(o.backdropFilter)||ga(o.filter))||xA.test(o.willChange||"")||SA.test(o.contain||"")}function wA(e){let o=ts(e);for(;vt(o)&&!Wo(o);){if(Wh(o))return o;if(_u(o))return null;o=ts(o)}return null}function Qh(){return Ip==null&&(Ip=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ip}function Wo(e){return/^(html|body|#document)$/.test(pn(e))}function Fn(e){return Rt(e).getComputedStyle(e)}function Du(e){return et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(pn(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Oi(e)&&e.host||us(e);return Oi(o)?o.host:o}function pS(e){const o=ts(e);return Wo(o)?(e.ownerDocument||e).body:vt(o)&&ul(o)?o:pS(o)}function Qr(e,o,a){var i;o===void 0&&(o=[]),a===void 0&&(a=!0);const l=pS(e),c=l===((i=e.ownerDocument)==null?void 0:i.body),d=Rt(l);if(c){const g=mh(d);return o.concat(d,d.visualViewport||[],ul(l)?l:[],g&&a?Qr(g):[])}else return o.concat(l,Qr(l,[],a))}function mh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let o=e.activeElement;for(;o?.shadowRoot?.activeElement!=null;)o=o.shadowRoot.activeElement;return o}function De(e,o){if(!e||!o)return!1;const a=o.getRootNode?.();if(e.contains(o))return!0;if(a&&Oi(a)){let i=o;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Pt(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const gh="data-base-ui-focusable",hS="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",zu="ArrowLeft",Pu="ArrowRight",mS="ArrowUp",Zh="ArrowDown",gS="data-starting-style",TA="data-ending-style",EA={[gS]:""},CA={[TA]:""},fl={transitionStatus(e){return e==="starting"?EA:e==="ending"?CA:null}},RA="data-open",AA="data-closed",OA="data-anchor-hidden",yS="data-popup-open",kA="data-pressed",NA={[yS]:""},MA={[yS]:"",[kA]:""},jA={[RA]:""},_A={[AA]:""},DA={[OA]:""},Lu={open(e){return e?NA:null}},iu={open(e){return e?MA:null}},dl={open(e){return e?jA:_A},anchorHidden(e){return e?DA:null}},Iu={...dl,...fl},yh="data-trigger-disabled";function ru(e,o){if(!et(e))return!1;const a=e;if(o.hasElement(a))return!a.hasAttribute(yh);for(const[,i]of o.entries())if(De(i,a))return!i.hasAttribute(yh);return!1}function Hp(e,o){if(o==null)return!1;if("composedPath"in e)return e.composedPath().includes(o);const a=e;return a.target!=null&&o.contains(a.target)}function zA(e){return e.matches("html,body")}function Hu(e){return vt(e)&&e.matches(hS)}function PA(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${hS}`)!=null}function bh(e){return e?e.getAttribute("role")==="combobox"&&Hu(e):!1}function lu(e){if(!e||Xh)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function cu(e){return e?e.hasAttribute(gh)?e:e.querySelector(`[${gh}]`)||e:null}function LA(e,o){return o!=null&&!Bs(o)?0:typeof e=="function"?e():e}function Aa(e,o,a){const i=LA(e,a);return typeof i=="number"?i:i?.[o]}function hx(e){return typeof e=="function"?e():e}function bS(e,o){return o||e==="click"||e==="mousedown"}function IA(e){return e?.includes("mouse")&&e!=="mousedown"}const ns="none",os="trigger-press",Ft="trigger-hover",Ti="trigger-focus",Uu="outside-press",Yr="item-press",vS="close-press",Vs="focus-out",pl="escape-key",uu="list-navigation",xS="cancel-open",Hr="sibling-open",HA="disabled",Bu="imperative-action",UA="window-resize";function qe(e,o,a,i){let l=!1,c=!1;const d=Ct;return{reason:e,event:o??new Event("base-ui"),cancel(){l=!0},allowPropagation(){c=!0},get isCanceled(){return l},get isPropagationAllowed(){return c},trigger:a,...d}}const SS=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Mn,currentIdRef:{current:null},currentContextRef:{current:null}});function BA(e,o){e.current=o.current}function FA(e){const{children:o,delay:a,timeoutMs:i=0}=e,l=b.useRef(a),c=b.useRef(a),d=b.useRef(null),g=b.useRef(null),m=on();return we(()=>{if(c.current=a,!d.current){l.current=a;return}l.current={open:Aa(l.current,"open"),close:Aa(a,"close")}},[a,d,l,c]),p.jsx(SS.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:l,initialDelayRef:c,currentIdRef:d,timeoutMs:i,currentContextRef:g,timeout:m}),[i,m]),children:o})}function VA(e,o={open:!1}){const{open:a}=o,i="rootStore"in e?e.rootStore:e,l=i.useState("floatingId"),c=b.useContext(SS),{currentIdRef:d,delayRef:g,timeoutMs:m,initialDelayRef:h,currentContextRef:y,hasProvider:v,timeout:S}=c,[w,T]=b.useState(!1),A=b.useRef(a);return we(()=>{A.current=a},[a]),we(()=>{function N(){y.current?.setIsInstantPhase(!1),d.current=null,y.current=null,g.current=h.current,S.clear()}if(d.current&&!a&&d.current===l){if(T(!1),m){const C=l;return S.start(m,()=>{i.select("open")||d.current&&d.current!==C||N()}),()=>{(A.current||d.current!==C)&&S.clear()}}N()}},[a,l,d,g,m,h,y,S,i]),we(()=>{if(!a)return;const N=y.current,C=d.current;S.clear(),y.current={onOpenChange:i.setOpen,setIsInstantPhase:T},d.current=l,g.current={open:0,close:Aa(h.current,"close")},C!==null&&C!==l?(T(!0),N?.setIsInstantPhase(!0),N?.onOpenChange(!1,qe(ns))):(T(!1),N?.setIsInstantPhase(!1))},[a,l,i,d,g,h,y,S]),we(()=>()=>{if(d.current===l){if(y.current=null,!A.current)return;d.current=null,BA(g,h),S.clear()}},[y,d,g,l,h,S]),b.useMemo(()=>({activeIdRef:d,hasProvider:v,delayRef:g,isInstantPhase:w}),[d,v,g,w])}function Ge(e,o,a,i){return e.addEventListener(o,a,i),()=>{e.removeEventListener(o,a,i)}}function po(...e){return()=>{for(let o=0;o<e.length;o+=1){const a=e[o];a&&a()}}}function ss(e,o,a,i){const l=Zt(wS).current;return qA(l,e,o,a,i)&&TS(l,[e,o,a,i]),l.callback}function YA(e){const o=Zt(wS).current;return GA(o,e)&&TS(o,e),o.callback}function wS(){return{callback:null,cleanup:null,refs:[]}}function qA(e,o,a,i,l){return e.refs[0]!==o||e.refs[1]!==a||e.refs[2]!==i||e.refs[3]!==l}function GA(e,o){return e.refs.length!==o.length||e.refs.some((a,i)=>a!==o[i])}function TS(e,o){if(e.refs=o,o.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const i=Array(o.length).fill(null);for(let l=0;l<o.length;l+=1){const c=o[l];if(c!=null)switch(typeof c){case"function":{const d=c(a);typeof d=="function"&&(i[l]=d);break}case"object":{c.current=a;break}}}e.cleanup=()=>{for(let l=0;l<o.length;l+=1){const c=o[l];if(c!=null)switch(typeof c){case"function":{const d=i[l];typeof d=="function"?d():c(null);break}case"object":{c.current=null;break}}}}}}}function Vt(e){const o=Zt(XA,e).current;return o.next=e,we(o.effect),o}function XA(e){const o={current:e,next:e,effect:()=>{o.current=o.next}};return o}const Jh={...JR},Up=Jh.useInsertionEffect,KA=Up&&Up!==Jh.useLayoutEffect?Up:e=>e();function Ne(e){const o=Zt($A).current;return o.next=e,KA(o.effect),o.trampoline}function $A(){const e={next:void 0,callback:WA,trampoline:(...o)=>e.callback?.(...o),effect:()=>{e.callback=e.next}};return e}function WA(){}const Uc=null;class QA{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=o=>{this.isScheduled=!1;const a=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let l=0;l<a.length;l+=1)a[l]?.(o)};request(o){const a=this.nextId;return this.nextId+=1,this.callbacks.push(o),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(o){const a=o-this.startId;a<0||a>=this.callbacks.length||this.callbacks[a]!==null&&(this.callbacks[a]=null,this.callbacksCount-=1)}}let Bc=new QA;class Eo{static create(){return new Eo}static request(o){return Bc.request(o)}static cancel(o){return Bc.cancel(o)}currentId=Uc;request(o){this.cancel(),this.currentId=Bc.request(()=>{this.currentId=Uc,o()})}cancel=()=>{this.currentId!==Uc&&(Bc.cancel(this.currentId),this.currentId=Uc)};disposeEffect=()=>this.cancel}function ki(){const e=Zt(Eo.create).current;return Ou(e.disposeEffect),e}function We(e){return e?.ownerDocument||document}const ES={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Fu={...ES,position:"fixed",top:0,left:0},CS={...ES,position:"absolute"},as=b.forwardRef(function(o,a){const[i,l]=b.useState();we(()=>{dS&&cs&&l("button")},[]);const c={tabIndex:0,role:i};return p.jsx("span",{...o,ref:a,style:Fu,"aria-hidden":i?void 0:!0,...c,"data-base-ui-focus-guard":""})}),Ni=Math.min,Qo=Math.max,fu=Math.round,Fc=Math.floor,Zo=e=>({x:e,y:e}),ZA={left:"right",right:"left",bottom:"top",top:"bottom"};function RS(e,o,a){return Qo(e,Ni(o,a))}function Ys(e,o){return typeof e=="function"?e(o):e}function no(e){return e.split("-")[0]}function is(e){return e.split("-")[1]}function em(e){return e==="x"?"y":"x"}function tm(e){return e==="y"?"height":"width"}function to(e){const o=e[0];return o==="t"||o==="b"?"y":"x"}function nm(e){return em(to(e))}function JA(e,o,a){a===void 0&&(a=!1);const i=is(e),l=nm(e),c=tm(l);let d=l==="x"?i===(a?"end":"start")?"right":"left":i==="start"?"bottom":"top";return o.reference[c]>o.floating[c]&&(d=du(d)),[d,du(d)]}function eO(e){const o=du(e);return[vh(e),o,vh(o)]}function vh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mx=["left","right"],gx=["right","left"],tO=["top","bottom"],nO=["bottom","top"];function oO(e,o,a){switch(e){case"top":case"bottom":return a?o?gx:mx:o?mx:gx;case"left":case"right":return o?tO:nO;default:return[]}}function sO(e,o,a,i){const l=is(e);let c=oO(no(e),a==="start",i);return l&&(c=c.map(d=>d+"-"+l),o&&(c=c.concat(c.map(vh)))),c}function du(e){const o=no(e);return ZA[o]+e.slice(o.length)}function aO(e){var o,a,i,l;return{top:(o=e.top)!=null?o:0,right:(a=e.right)!=null?a:0,bottom:(i=e.bottom)!=null?i:0,left:(l=e.left)!=null?l:0}}function AS(e){return typeof e!="number"?aO(e):{top:e,right:e,bottom:e,left:e}}function Zr(e){const{x:o,y:a,width:i,height:l}=e;return{width:i,height:l,top:a,left:o,right:o+i,bottom:a+l,x:o,y:a}}function qr(e,o){return o<0||o>=e.length}function tu(e,o){return $o(e.current,{disabledIndices:o})}function xh(e,o){return $o(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:o})}function $o(e,{startingIndex:o=-1,decrement:a=!1,disabledIndices:i,amount:l=1}={}){let c=o;do c+=a?-l:l;while(c>=0&&c<=e.length-1&&Ei(e,c,i));return c}function Ei(e,o,a){if(typeof a=="function"?a(o):a?.includes(o)??!1)return!0;const l=e[o];return l?!Vu(l)||l.matches(":disabled")?!0:!a&&(l.hasAttribute("disabled")||l.getAttribute("aria-disabled")==="true"):!1}function iO(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Vu(e,o=e?Fn(e):null){return!e||!e.isConnected||!o||iO(o)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():o.display!=="none"&&o.display!=="contents"}const rO='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function lO(e){const o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return Oi(a)?a.host:null}function Sh(e){for(const o of Array.from(e.children))if(pn(o)==="summary")return o;return null}function cO(e,o){const a=Sh(o);return!!a&&(e===a||De(a,e))}function OS(e){const o=e?pn(e):"";return e!=null&&e.matches(rO)&&(o!=="summary"||e.parentElement!=null&&pn(e.parentElement)==="details"&&Sh(e.parentElement)===e)&&(o!=="details"||Sh(e)==null)&&(o!=="input"||e.type!=="hidden")}function kS(e){if(!OS(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let o=e;o;o=lO(o)){const a=o!==e,i=pn(o)==="slot";if(o.hasAttribute("inert")||a&&pn(o)==="details"&&!o.open&&!cO(e,o)||o.hasAttribute("hidden")||!i&&!uO(o,a))return!1}return!0}function uO(e,o){const a=Fn(e);return o?a.display!=="none":Vu(e,a)}function NS(e){const o=e.tabIndex;if(o<0){const a=pn(e);if(a==="details"||a==="audio"||a==="video"||vt(e)&&e.isContentEditable)return 0}return o}function Bp(e){if(pn(e)!=="input")return null;const o=e;return o.type==="radio"&&o.name!==""?o:null}function fO(e,o){const a=Bp(e);if(!a)return!0;const i=o.find(l=>{const c=Bp(l);return c?.name===a.name&&c.form===a.form&&c.checked});return i?i===a:o.find(l=>{const c=Bp(l);return c?.name===a.name&&c.form===a.form})===a}function MS(e){if(vt(e)&&pn(e)==="slot"){const o=e.assignedElements({flatten:!0});if(o.length>0)return o}return vt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function jS(e,o){MS(e).forEach(a=>{OS(a)&&o.push(a),jS(a,o)})}function _S(e,o,a){MS(e).forEach(i=>{vt(i)&&i.matches(o)&&a.push(i),_S(i,o,a)})}function om(e){return kS(e)&&NS(e)>=0}function DS(e){const o=[];return jS(e,o),o.filter(kS)}function hl(e){const o=DS(e);return o.filter(a=>NS(a)>=0&&fO(a,o))}function zS(e,o){const a=hl(e),i=a.length;if(i===0)return;const l=nn(We(e)),c=a.indexOf(l),d=c===-1?o===1?0:i-1:c+o;return a[d]}function sm(e){return zS(We(e).body,1)||e}function PS(e){return zS(We(e).body,-1)||e}function LS(e,o){if(!e)return null;const a=hl(We(e).body),i=a.length;if(i===0)return null;const l=a.indexOf(e);if(l===-1)return null;const c=(l+o+i)%i;return a[c]}function dO(e){return LS(e,1)}function pO(e){return LS(e,-1)}function Ci(e,o){const a=o||e.currentTarget,i=e.relatedTarget;return!i||!De(a,i)}function hO(e){hl(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function yx(e){const o=[];_S(e,"[data-tabindex]",o),o.forEach(a=>{const i=a.dataset.tabindex;delete a.dataset.tabindex,i?a.setAttribute("tabindex",i):a.removeAttribute("tabindex")})}function qs(e,o,a=!0){return e.filter(l=>l.parentId===o).flatMap(l=>[...!a||l.context?.open?[l]:[],...qs(e,l.id,a)])}function bx(e,o){let a=[],i=e.find(l=>l.id===o)?.parentId;for(;i;){const l=e.find(c=>c.id===i);i=l?.parentId,l&&(a=a.concat(l))}return a}function Jr(e){return`data-base-ui-${e}`}let Vc=0;function nu(e,o={}){const{preventScroll:a=!1,sync:i=!1,shouldFocus:l}=o;cancelAnimationFrame(Vc);function c(){l&&!l()||e?.focus({preventScroll:a})}if(i)return c(),Ht;const d=requestAnimationFrame(c);return Vc=d,()=>{Vc===d&&(cancelAnimationFrame(d),Vc=0)}}const Fp={inert:new WeakMap,"aria-hidden":new WeakMap},vx="data-base-ui-inert",wh={inert:new WeakSet,"aria-hidden":new WeakSet};let zr=new WeakMap,Vp=0;function mO(e){return wh[e]}function IS(e){return e?Oi(e)?e.host:IS(e.parentNode):null}const xx=(e,o)=>o.map(a=>{if(e.contains(a))return a;const i=IS(a);return e.contains(i)?i:null}).filter(a=>a!=null),Sx=e=>{const o=new Set;return e.forEach(a=>{let i=a;for(;i&&!o.has(i);)o.add(i),i=i.parentNode}),o},wx=(e,o,a)=>{const i=[],l=c=>{!c||a.has(c)||Array.from(c.children).forEach(d=>{pn(d)!=="script"&&(o.has(d)?l(d):i.push(d))})};return l(e),i};function gO(e,o,a,i,{mark:l=!0}){let c=null;i?c="inert":a&&(c="aria-hidden");let d=null,g=null;const m=xx(o,e),h=l?wx(o,Sx(m),new Set(m)):[],y=[],v=[];if(c){const S=Fp[c],w=mO(c);g=w,d=S;const T=xx(o,Array.from(o.querySelectorAll("[aria-live]"))),A=m.concat(T);wx(o,Sx(A),new Set(A)).forEach(C=>{const _=C.getAttribute(c),k=_!==null&&_!=="false",j=(S.get(C)||0)+1;S.set(C,j),y.push(C),j===1&&k&&w.add(C),k||C.setAttribute(c,c==="inert"?"":"true")})}return l&&h.forEach(S=>{const w=(zr.get(S)||0)+1;zr.set(S,w),v.push(S),w===1&&S.setAttribute(vx,"")}),Vp+=1,()=>{d&&y.forEach(S=>{const T=(d.get(S)||0)-1;d.set(S,T),T||(!g?.has(S)&&c&&S.removeAttribute(c),g?.delete(S))}),l&&v.forEach(S=>{const w=(zr.get(S)||0)-1;zr.set(S,w),w||S.removeAttribute(vx)}),Vp-=1,Vp||(Fp.inert=new WeakMap,Fp["aria-hidden"]=new WeakMap,wh.inert=new WeakSet,wh["aria-hidden"]=new WeakSet,zr=new WeakMap)}}function Tx(e,o={}){const{ariaHidden:a=!1,inert:i=!1,mark:l=!0}=o,c=We(e[0]).body;return gO(e,c,a,i,{mark:l})}var so=cS();let Ex=0;function yO(e,o="mui"){const[a,i]=b.useState(e),l=e||a;return b.useEffect(()=>{a==null&&(Ex+=1,i(`${o}-${Ex}`))},[a,o]),l}const Cx=Jh.useId;function Gs(e,o){if(Cx!==void 0){const a=Cx();return e??(o?`${o}-${a}`:a)}return yO(e,o)}const bO=parseInt(b.version,10);function am(e){return bO>=e}function Rx(e){if(!b.isValidElement(e))return null;const o=e,a=o.props;return(am(19)?a?.ref:o.ref)??null}function Th(e,o){if(e&&!o)return e;if(!e&&o)return o;if(e||o)return{...e,...o}}function vO(e,o){const a={};for(const i in e){const l=e[i];if(o?.hasOwnProperty(i)){const c=o[i](l);c!=null&&Object.assign(a,c);continue}l===!0?a[`data-${i.toLowerCase()}`]="":l&&(a[`data-${i.toLowerCase()}`]=l.toString())}return a}function xO(e,o){return typeof e=="function"?e(o):e}function SO(e,o){return typeof e=="function"?e(o):e}const im={};function oo(e,o,a,i,l){if(!a&&!i&&!l&&!e)return pu(o);let c=pu(e);return o&&(c=Ur(c,o)),a&&(c=Ur(c,a)),i&&(c=Ur(c,i)),l&&(c=Ur(c,l)),c}function wO(e){if(e.length===0)return im;if(e.length===1)return pu(e[0]);let o=pu(e[0]);for(let a=1;a<e.length;a+=1)o=Ur(o,e[a]);return o}function pu(e){return rm(e)?{...US(e,im)}:TO(e)}function Ur(e,o){return rm(o)?US(o,e):EO(e,o)}function TO(e){const o={...e};for(const a in o){const i=o[a];HS(a,i)&&(o[a]=BS(i))}return o}function EO(e,o){if(!o)return e;for(const a in o){const i=o[a];switch(a){case"style":{e[a]=Th(e.style,i);break}case"className":{e[a]=FS(e.className,i);break}default:HS(a,i)?e[a]=CO(e[a],i):e[a]=i}}return e}function HS(e,o){const a=e.charCodeAt(0),i=e.charCodeAt(1),l=e.charCodeAt(2);return a===111&&i===110&&l>=65&&l<=90&&(typeof o=="function"||typeof o>"u")}function rm(e){return typeof e=="function"}function US(e,o){return rm(e)?e(o):e??im}function CO(e,o){return o?e?(...a)=>{const i=a[0];if(VS(i)){const c=i;hu(c);const d=o(...a);return c.baseUIHandlerPrevented||e?.(...a),d}const l=o(...a);return e?.(...a),l}:BS(o):e}function BS(e){return e&&((...o)=>{const a=o[0];return VS(a)&&hu(a),e(...o)})}function hu(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function FS(e,o){return o?e?o+" "+e:o:e}function VS(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function nt(e,o,a={}){let i=o.render;a.enabled!==!1&&(i=kO(i));const l=RO(o,a,i);if(a.enabled===!1)return null;const c=a.state??Ct;return NO(e,i,l,c)}function RO(e,o,a){const{className:i,style:l}=e,{state:c=Ct,ref:d,props:g,stateAttributesMapping:m,enabled:h=!0}=o,y=h?xO(i,c):void 0,v=h?SO(l,c):void 0,S=h?vO(c,m):Ct,w=h&&g?AO(g):void 0,T=h?Th(S,w)??{}:Ct;return typeof document<"u"&&(h?Array.isArray(d)?T.ref=YA([T.ref,Rx(a),...d]):T.ref=ss(T.ref,Rx(a),d):ss(null,null)),h?(y!==void 0&&(T.className=FS(T.className,y)),v!==void 0&&(T.style=Th(T.style,v)),T):Ct}function AO(e){return Array.isArray(e)?wO(e):oo(void 0,e)}const OO=Symbol.for("react.lazy");function kO(e){if(e?.$$typeof!==OO)return e;const o=b.Children.toArray(e)[0];return b.isValidElement(o)?o:e}function NO(e,o,a,i){if(o){if(typeof o=="function")return o(a,i);const l=oo(a,o.props);return l.ref=a.ref,b.cloneElement(o,l)}if(e&&typeof e=="string")return MO(e,a);throw new Error(kt(8))}function MO(e,o){return e==="button"?b.createElement("button",{type:"button",...o,key:o.key}):e==="img"?b.createElement("img",{alt:"",...o,key:o.key}):b.createElement(e,o)}const jO=500,YS=500,_O={style:{transition:"none"}},qS="data-base-ui-click-trigger",DO="data-base-ui-swipe-ignore",zO="data-swipe-ignore",PO=`[${DO}]`,LO=`[${zO}]`,GS={fallbackAxisSide:"none"},lm={fallbackAxisSide:"end"},IO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},XS=b.createContext(null),KS=()=>b.useContext(XS),HO=Jr("portal");function $S(e={}){const{ref:o,container:a,componentProps:i=Ct,elementProps:l}=e,c=Gs(),g=KS()?.portalNode,[m,h]=b.useState(null),[y,v]=b.useState(null),S=Ne(N=>{N!==null&&v(N)}),w=b.useRef(null);we(()=>{if(a===null){w.current&&(w.current=null,v(null),h(null));return}const N=(a&&($h(a)?a:a.current))??g??document.body;if(N==null){w.current&&(w.current=null,v(null),h(null));return}w.current!==N&&(w.current=N,v(null),h(N))},[a,g]);const T=nt("div",i,{ref:[o,S],props:[{id:c,[HO]:""},l]}),A=m&&T?so.createPortal(T,m):null;return{node:y,nodeId:b.isValidElement(T)?T.props.id:void 0,subtree:A}}const Yu=b.forwardRef(function(o,a){const{render:i,className:l,style:c,children:d,container:g,portalOwnerRole:m,...h}=o,{node:y,nodeId:v,subtree:S}=$S({container:g,ref:a,componentProps:o,elementProps:h}),w=b.useRef(null),T=b.useRef(null),A=b.useRef(null),N=b.useRef(null),[C,_]=b.useState(null),k=b.useRef(!1),j=C?.modal,L=C?.open,z=!!C&&!C.modal&&C.open&&!!y;b.useEffect(()=>{if(!y||j)return;function U(Y){y&&Y.relatedTarget&&Ci(Y)&&(Y.type==="focusin"?k.current&&(yx(y),k.current=!1):(hO(y),k.current=!0))}return po(Ge(y,"focusin",U,!0),Ge(y,"focusout",U,!0))},[y,j]),we(()=>{!y||L!==!0||!k.current||(yx(y),k.current=!1)},[L,y]);const I=b.useMemo(()=>({beforeOutsideRef:w,afterOutsideRef:T,beforeInsideRef:A,afterInsideRef:N,portalNode:y,setFocusManagerState:_}),[y]);return p.jsxs(b.Fragment,{children:[S,p.jsxs(XS.Provider,{value:I,children:[z&&y&&p.jsx(as,{"data-type":"outside",ref:w,onFocus:U=>{if(Ci(U,y))A.current?.focus();else{const Y=C?C.domReference:null;PS(Y)?.focus()}}}),z&&y&&p.jsx("span",{role:m,"aria-owns":v,style:IO}),y&&so.createPortal(d,y),z&&y&&p.jsx(as,{"data-type":"outside",ref:T,onFocus:U=>{if(Ci(U,y))N.current?.focus();else{const Y=C?C.domReference:null;sm(Y)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,qe(Vs,U.nativeEvent))}}})]})]})});function WS(){const e=new Map;return{emit(o,a){e.get(o)?.forEach(i=>i(a))},on(o,a){e.has(o)||e.set(o,new Set),e.get(o).add(a)},off(o,a){e.get(o)?.delete(a)}}}class cm{nodesRef={current:[]};events=WS();addNode(o){this.nodesRef.current.push(o)}removeNode(o){const a=this.nodesRef.current.findIndex(i=>i===o);a!==-1&&this.nodesRef.current.splice(a,1)}}const QS=b.createContext(null),ZS=b.createContext(null),Xs=()=>b.useContext(QS)?.id||null,Ks=e=>{const o=b.useContext(ZS);return e??o};function um(e){const o=Gs(),a=Ks(e),i=Xs();return we(()=>{if(!o)return;const l={id:o,parentId:i};return a?.addNode(l),()=>{a?.removeNode(l)}},[a,o,i]),o}function JS(e){const{children:o,id:a}=e,i=Xs();return p.jsx(QS.Provider,{value:b.useMemo(()=>({id:a,parentId:i}),[a,i]),children:o})}function ew(e){const{children:o,externalTree:a}=e,i=Zt(()=>a??new cm).current;return p.jsx(ZS.Provider,{value:i,children:o})}function Go(e){return e==null?e:"current"in e?e.current:e}function UO(e,o){const a=Rt(Pt(e));return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?o||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof a.MouseEvent?o||(e.detail===0?"keyboard":"mouse"):""}const Ax=20;let Us=[];function fm(){Us=Us.filter(e=>e.deref()?.isConnected)}function Ox(e){fm(),e&&pn(e)!=="body"&&(Us.push(new WeakRef(e)),Us.length>Ax&&(Us=Us.slice(-Ax)))}function kx(){return fm(),Us[Us.length-1]?.deref()}function BO(e){return e?om(e)?e:hl(e)[0]||e:null}function Nx(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const a=DS(e).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return om(l)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),i=e.getAttribute("tabindex");a.length===0?i!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function qu(e){const{context:o,children:a,disabled:i=!1,initialFocus:l=!0,returnFocus:c=!0,restoreFocus:d=!1,modal:g=!0,closeOnFocusOut:m=!0,openInteractionType:h="",nextFocusableElement:y,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:T}=e,A="rootStore"in o?o.rootStore:o,N=A.useState("open"),C=A.useState("domReferenceElement"),_=A.useState("floatingElement"),{events:k,dataRef:j}=A.context,L=Ne(()=>j.current.floatingContext?.nodeId),z=l===!1,I=bh(C)&&z,U=Vt(l),Y=Vt(c),B=Vt(h),D=Vt(N),M=Ks(w),H=KS(),ee=b.useRef(!1),$=b.useRef(!1),P=b.useRef(!1),q=b.useRef(null),K=b.useRef(""),Z=b.useRef(""),Q=b.useRef(null),O=b.useRef(null),F=ss(Q,S,H?.beforeInsideRef),J=ss(O,H?.afterInsideRef),W=on(),se=on(),ie=ki(),me=H!=null,pe=cu(_),be=Ne((ye=pe)=>ye?hl(ye):[]),Ce=Ne(()=>T?.().filter(ye=>ye!=null)??[]);b.useEffect(()=>{if(i||!g)return;function ye(Te){Te.key==="Tab"&&De(pe,nn(We(pe)))&&be().length===0&&!I&&To(Te)}const ge=We(pe);return Ge(ge,"keydown",ye)},[i,pe,g,I,be]),b.useEffect(()=>{if(i||!N)return;const ye=We(pe);function ge(){P.current=!1}function Te(Be){const Ee=Pt(Be),Pe=Ce(),Se=De(_,Ee)||De(C,Ee)||De(H?.portalNode,Ee)||Pe.some(Re=>Re===Ee||De(Re,Ee));P.current=!Se,Z.current=Be.pointerType||"keyboard",Ee?.closest(`[${qS}]`)&&($.current=!0,se.start(0,()=>{$.current=!1}))}function Oe(){Z.current="keyboard"}return po(Ge(ye,"pointerdown",Te,!0),Ge(ye,"pointerup",ge,!0),Ge(ye,"pointercancel",ge,!0),Ge(ye,"keydown",Oe,!0),ge)},[i,_,C,pe,N,H,se,Ce]),b.useEffect(()=>{if(i||!m)return;const ye=We(pe);function ge(){$.current=!0,se.start(0,()=>{$.current=!1})}function Te(Pe){const Se=Pt(Pe);om(Se)&&(q.current=Se)}function Oe(Pe){const Se=Pe.relatedTarget,Re=Pe.currentTarget,ke=Pt(Pe);g&&Se==null&&ke!=null&&De(_,ke)&&Ox(ke),queueMicrotask(()=>{const Ie=L(),je=A.context.triggerElements,le=Ce(),ve=Se?.hasAttribute(Jr("focus-guard"))&&[Q.current,O.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,Go(v),Go(y)].includes(Se),he=!(De(C,Se)||De(_,Se)||De(Se,_)||De(H?.portalNode,Se)||le.some(ce=>ce===Se||De(ce,Se))||je.hasMatchingElement(ce=>De(ce,Se))||ve||M&&(qs(M.nodesRef.current,Ie).find(ce=>De(ce.context?.elements.floating,Se)||De(ce.context?.elements.domReference,Se))||bx(M.nodesRef.current,Ie).find(ce=>[ce.context?.elements.floating,cu(ce.context?.elements.floating)].includes(Se)||ce.context?.elements.domReference===Se)));if(Re===C&&pe&&Nx(pe),d&&Re!==C&&!Vu(ke)&&nn(ye)===ye.body){if(vt(pe)&&(pe.focus(),d==="popup")){ie.request(()=>{pe.focus()});return}const ce=be(),xe=q.current,He=(xe&&ce.includes(xe)?xe:null)||ce[ce.length-1]||pe;vt(He)&&He.focus()}if(j.current.insideReactTree){j.current.insideReactTree=!1;return}(I||!g)&&Se&&he&&!$.current&&(I||Se!==kx())&&(ee.current=!0,A.setOpen(!1,qe(Vs,Pe)))})}function Be(){P.current||(j.current.insideReactTree=!0,W.start(0,()=>{j.current.insideReactTree=!1}))}const Ee=vt(C)?C:null;if(!(!_&&!Ee))return po(Ee&&Ge(Ee,"focusout",Oe),Ee&&Ge(Ee,"pointerdown",ge),_&&Ge(_,"focusin",Te),_&&Ge(_,"focusout",Oe),_&&H&&Ge(_,"focusout",Be,!0))},[i,C,_,pe,g,M,H,A,m,d,be,I,L,j,W,se,ie,y,v,Ce]),b.useEffect(()=>{if(i||!_||!N)return;const ye=Array.from(H?.portalNode?.querySelectorAll(`[${Jr("portal")}]`)||[]),Te=(M?bx(M.nodesRef.current,L()):[]).find(Re=>bh(Re.context?.elements.domReference||null))?.context?.elements.domReference,Be=[...[_,...ye,Q.current,O.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...Ce()],Te,Go(v),Go(y),I?C:null].filter(Re=>Re!=null),Ee=Tx(Be,{ariaHidden:g||I,mark:!1}),Pe=[_,...ye].filter(Re=>Re!=null),Se=Tx(Pe);return()=>{Se(),Ee()}},[N,i,C,_,g,H,I,M,L,y,v,Ce]),we(()=>{if(!N||i||!vt(pe))return;K.current="",Z.current="";const ye=We(pe),ge=nn(ye);queueMicrotask(()=>{const Te=U.current,Oe=typeof Te=="function"?Te(B.current||""):Te;if(Oe===void 0||Oe===!1||De(pe,ge))return;let Ee=null;const Pe=()=>(Ee==null&&(Ee=be(pe)),Ee[0]||pe);let Se;Oe===!0||Oe===null?Se=Pe():Se=Go(Oe),Se=Se||Pe();const Re=De(pe,nn(ye));nu(Se,{preventScroll:Se===pe,shouldFocus(){if(!D.current)return!1;if(Re)return!0;const ke=nn(ye);return!(ke!==Se&&De(pe,ke))}})})},[i,N,pe,be,U,B,D]),we(()=>{if(i||!pe)return;const ye=We(pe),ge=nn(ye),Te=B.current==null;Ox(ge);function Oe(Ee){if(Ee.open||(K.current=UO(Ee.nativeEvent,Z.current)),Ee.reason===Ft&&Ee.nativeEvent.type==="mouseleave"&&(ee.current=!0),Ee.reason===Uu)if(Ee.nested)ee.current=!1;else if(Mu(Ee.nativeEvent)||Kh(Ee.nativeEvent))ee.current=!1;else{let Pe=!1;We(pe).createElement("div").focus({get preventScroll(){return Pe=!0,!1}}),Pe?ee.current=!1:ee.current=!0}}k.on("openchange",Oe);function Be(Ee){const Pe=Y.current;let Se=typeof Pe=="function"?Pe(Ee):Pe;if(Se===void 0||Se===!1)return null;Se===null&&(Se=!0);const Re=C?.isConnected?C:null,ke=ge?.isConnected&&pn(ge)!=="body"?ge:null;let Ie=Te?ke||Re:Re||ke;return Ie||(Ie=kx()||null),typeof Se=="boolean"?Ie:Go(Se)||Ie||null}return()=>{k.off("openchange",Oe);const Ee=nn(ye),Pe=Ce(),Se=De(_,Ee)||Pe.some(je=>je===Ee||De(je,Ee))||M&&qs(M.nodesRef.current,L(),!1).some(je=>De(je.context?.elements.floating,Ee)),Re=Y.current,ke=K.current,Ie=Be(ke);queueMicrotask(()=>{const je=BO(Ie),le=typeof Re!="boolean";if(Re&&!ee.current&&vt(je)&&(!(!le&&je!==Ee&&Ee!==ye.body)||Se)){const ve={preventScroll:!0};ke==="keyboard"&&(ve.focusVisible=!0),je.focus(ve)}ee.current=!1})}},[i,_,pe,Y,B,k,M,C,L,Ce]),we(()=>{if(!cs||N||!_)return;const ye=nn(We(_));!vt(ye)||!Hu(ye)||De(_,ye)&&ye.blur()},[N,_]),we(()=>{if(!(i||!H))return H.setFocusManagerState({modal:g,closeOnFocusOut:m,open:N,onOpenChange:A.setOpen,domReference:C}),()=>{H.setFocusManagerState(null)}},[i,H,g,N,A,m,C]),we(()=>{if(!(i||!pe))return Nx(pe),()=>{queueMicrotask(fm)}},[i,pe]);const Me=!i&&(g?!I:!0)&&(me||g);return p.jsxs(b.Fragment,{children:[Me&&p.jsx(as,{"data-type":"inside",ref:F,onFocus:ye=>{if(g){const ge=be();nu(ge[ge.length-1])}else H?.portalNode&&(ee.current=!1,Ci(ye,H.portalNode)?sm(C)?.focus():Go(v??H.beforeOutsideRef)?.focus())}}),a,Me&&p.jsx(as,{"data-type":"inside",ref:J,onFocus:ye=>{g?nu(be()[0]):H?.portalNode&&(m&&(ee.current=!0),Ci(ye,H.portalNode)?PS(C)?.focus():Go(y??H.afterOutsideRef)?.focus())}})]})}function Gu(e,o={}){const{enabled:a=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:d=!0,touchOpenDelay:g=0,reason:m=os}=o,h="rootStore"in e?e.rootStore:e,y=h.context.dataRef,v=b.useRef(void 0),S=ki(),w=on(),T=b.useMemo(()=>{function A(C,_,k,j){const L=qe(m,_,k);C&&j==="touch"&&g>0?w.start(g,()=>{h.setOpen(!0,L)}):h.setOpen(C,L)}function N(C,_,k){const j=y.current.openEvent,L=h.select("domReferenceElement")!==_;return C&&L||!C||!l?!0:j&&d?!k(j.type):!1}return{onPointerDown(C){v.current=Bs(C.pointerType,!0)&&Kh(C.nativeEvent)?"virtual":C.pointerType},onMouseDown(C){const _=v.current,k=C.nativeEvent,j=h.select("open");if(C.button!==0||i==="click"||Bs(_,!0)&&c)return;const L=N(j,C.currentTarget,U=>U==="click"||U==="mousedown"),z=Pt(k);if(Hu(z)){A(L,k,z,_);return}const I=C.currentTarget;S.request(()=>{A(L,k,I,_)})},onClick(C){if(i==="mousedown-only")return;const _=v.current;if(i==="mousedown"&&_){v.current=void 0;return}if(Bs(_,!0)&&c)return;const k=h.select("open"),j=N(k,C.currentTarget,L=>L==="click"||L==="mousedown"||L==="keydown"||L==="keyup");A(j,C.nativeEvent,C.currentTarget,_)},onKeyDown(){v.current=void 0}}},[y,i,c,m,h,d,l,S,w,g]);return b.useMemo(()=>a?{reference:T}:Ct,[a,T])}function FO(e,o){let a=null,i=null,l=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=o.axis==="x"||o.axis==="both",g=o.axis==="y"||o.axis==="both",m=["mouseenter","mousemove"].includes(o.dataRef.current.openEvent?.type||"")&&o.pointerType!=="touch";let h=c.width,y=c.height,v=c.x,S=c.y;return a==null&&o.x&&d&&(a=c.x-o.x),i==null&&o.y&&g&&(i=c.y-o.y),v-=a||0,S-=i||0,h=0,y=0,!l||m?(h=o.axis==="y"?c.width:0,y=o.axis==="x"?c.height:0,v=d&&o.x!=null?o.x:v,S=g&&o.y!=null?o.y:S):l&&!m&&(y=o.axis==="x"?c.height:y,h=o.axis==="y"?c.width:h),l=!0,{width:h,height:y,x:v,y:S,top:S,right:v+h,bottom:S+y,left:v}}}}function Mx(e){return e!=null&&e.clientX!=null}function VO(e,o={}){const{enabled:a=!0,axis:i="both"}=o,l="rootStore"in e?e.rootStore:e,c=l.useState("open"),d=l.useState("floatingElement"),g=l.useState("domReferenceElement"),m=l.context.dataRef,h=b.useRef(!1),y=b.useRef(null),[v,S]=b.useState(),[w,T]=b.useState([]),A=Ne(j=>{l.set("positionReference",j)}),N=Ne((j,L,z)=>{h.current||m.current.openEvent&&!Mx(m.current.openEvent)||l.set("positionReference",FO(z??g,{x:j,y:L,axis:i,dataRef:m,pointerType:v}))}),C=Ne(j=>{c?y.current||(N(j.clientX,j.clientY,j.currentTarget),T([])):N(j.clientX,j.clientY,j.currentTarget)}),_=Bs(v)?d:c;b.useEffect(()=>{if(!a){A(g);return}if(!_)return;function j(){y.current?.(),y.current=null}const L=Rt(d);function z(I){const U=Pt(I);De(d,U)?j():N(I.clientX,I.clientY)}return!m.current.openEvent||Mx(m.current.openEvent)?y.current=Ge(L,"mousemove",z):A(g),j},[_,a,d,m,g,l,N,A,w]),b.useEffect(()=>()=>{l.set("positionReference",null)},[l]),b.useEffect(()=>{a&&!d&&(h.current=!1)},[a,d]),b.useEffect(()=>{!a&&c&&(h.current=!0)},[a,c]);const k=b.useMemo(()=>{function j(L){S(L.pointerType)}return{onPointerDown:j,onPointerEnter:j,onMouseMove:C,onMouseEnter:C}},[C]);return b.useMemo(()=>a?{reference:k,trigger:k}:{},[a,k])}function YO(){return!1}function qO(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ml(e,o={}){const{enabled:a=!0,escapeKey:i=!0,outsidePress:l=!0,outsidePressEvent:c="sloppy",referencePress:d=YO,bubbles:g,externalTree:m}=o,h="rootStore"in e?e.rootStore:e,y=h.useState("open"),v=h.useState("floatingElement"),{dataRef:S,events:w}=h.context,T=Ks(m),A=Ne(typeof l=="function"?l:()=>!1),N=typeof l=="function"?A:l,C=N!==!1,_=Ne(()=>c),{escapeKey:k,outsidePress:j}=qO(g),L=b.useRef(!1),z=b.useRef(!1),I=b.useRef(!1),U=b.useRef(!1),Y=b.useRef(!1),B=b.useRef(""),D=b.useRef(null),M=on(),H=on(),ee=Ne(()=>{H.clear(),S.current.insideReactTree=!1}),$=Ne(W=>{const se=S.current.floatingContext?.nodeId;return(T?qs(T.nodesRef.current,se):[]).some(me=>me.context?.open&&!me.context.dataRef.current[W])}),P=Ne(W=>Hp(W,h.select("floatingElement"))||Hp(W,h.select("domReferenceElement"))),q=Ne(W=>{d()&&h.setOpen(!1,qe(os,W.nativeEvent))}),K=Ne(W=>{if(!y||!a||!i||W.key!=="Escape"||Y.current||!k&&$("__escapeKeyBubbles"))return;const se=yA(W)?W.nativeEvent:W,ie=qe(pl,se);h.setOpen(!1,ie),ie.isCanceled||W.preventDefault(),!k&&!ie.isPropagationAllowed&&W.stopPropagation()}),Z=Ne(()=>{S.current.insideReactTree=!0,H.start(0,ee)}),Q=Ne(W=>{if(!y||!a||W.button!==0)return;const se=Pt(W.nativeEvent);De(h.select("floatingElement"),se)&&(L.current||(L.current=!0,z.current=!1))}),O=Ne(W=>{!y||!a||(W.defaultPrevented||W.nativeEvent.defaultPrevented)&&L.current&&(z.current=!0)});b.useEffect(()=>{function W(se){se.open||(U.current=!1)}return w.on("openchange",W),()=>{w.off("openchange",W)}},[w]),b.useEffect(()=>{if(!y||!a)return y||(U.current=!1),ee;S.current.__escapeKeyBubbles=k,S.current.__outsidePressBubbles=j;const W=new Mn,se=new Mn,ie=We(v);function me(){W.clear(),Y.current=!0}function pe(){W.start(cs?5:0,()=>{Y.current=!1})}function be(){I.current=!0,se.start(0,()=>{I.current=!1})}function Ce(){L.current=!1,z.current=!1}function Me(){const he=B.current,ce=he==="pen"||!he?"mouse":he,xe=_(),He=typeof xe=="function"?xe():xe;return typeof He=="string"?He:He[ce]}function ye(he){const ce=Me();return ce==="intentional"&&he.type!=="click"||ce==="sloppy"&&he.type==="click"}function ge(he){const ce=S.current.floatingContext?.nodeId,xe=T&&qs(T.nodesRef.current,ce).some(He=>Hp(he,He.context?.elements.floating));return P(he)||xe}function Te(he){if(ye(he)){he.type!=="click"&&!P(he)&&(se.clear(),I.current=!1),ee();return}if(S.current.insideReactTree){ee();return}const ce=Pt(he),xe=`[${Jr("inert")}]`,He=et(ce)?ce.getRootNode():null,Lt=Array.from((Oi(He)?He:We(h.select("floatingElement"))).querySelectorAll(xe)),Yt=h.context.triggerElements;if(ce&&(Yt.hasElement(ce)||Yt.hasMatchingElement(Ae=>De(Ae,ce))))return;let ut=et(ce)?ce:null;for(;ut&&!Wo(ut);){const Ae=ts(ut);if(Wo(Ae)||!et(Ae))break;ut=Ae}if(!(Lt.length&&et(ce)&&!zA(ce)&&!De(ce,h.select("floatingElement"))&&Lt.every(Ae=>!De(ut,Ae)))){if(vt(ce)&&!("touches"in he)){const Ae=Wo(ce),Ye=Fn(ce),Qe=/auto|scroll/,ct=Ae||Qe.test(Ye.overflowX),en=Ae||Qe.test(Ye.overflowY),rn=ct&&ce.clientWidth>0&&ce.scrollWidth>ce.clientWidth,hn=en&&ce.clientHeight>0&&ce.scrollHeight>ce.clientHeight,xt=Ye.direction==="rtl",_t=hn&&(xt?he.offsetX<=ce.offsetWidth-ce.clientWidth:he.offsetX>ce.clientWidth),Ve=rn&&he.offsetY>ce.clientHeight;if(_t||Ve)return}if(!ge(he)){if(Me()==="intentional"){if(he.detail!==0&&!Mu(he)&&!U.current)return;if(I.current){se.clear(),I.current=!1;return}}typeof N=="function"&&!N(he)||$("__outsidePressBubbles")||(h.setOpen(!1,qe(Uu,he)),ee())}}}function Oe(he){Me()!=="sloppy"||he.pointerType==="touch"||!h.select("open")||!a||P(he)||Te(he)}function Be(he){if(Me()!=="sloppy"||!h.select("open")||!a||P(he))return;const ce=he.touches[0];ce&&(D.current={startTime:Date.now(),startX:ce.clientX,startY:ce.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},M.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function Ee(he,ce){const xe=Pt(he);if(!xe)return;const He=Ge(xe,he.type,()=>{ce(he),He()})}function Pe(he){B.current="touch",Ee(he,Be)}function Se(he){M.clear(),he.type==="pointerdown"&&(he.button===0&&(U.current=!0),B.current=he.pointerType),!(he.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)&&Ee(he,ce=>{ce.type==="pointerdown"?Oe(ce):Te(ce)})}function Re(he){if(he.type==="pointercancel"&&(U.current=!1),!L.current)return;const ce=z.current;if(Ce(),Me()==="intentional"){if(he.type==="pointercancel"){ce&&be();return}if(!ge(he)){if(ce){be();return}typeof N=="function"&&!N(he)||(se.clear(),I.current=!0,ee())}}}function ke(he){if(Me()!=="sloppy"||!D.current||P(he))return;const ce=he.touches[0];if(!ce)return;const xe=Math.abs(ce.clientX-D.current.startX),He=Math.abs(ce.clientY-D.current.startY),Lt=Math.sqrt(xe*xe+He*He);Lt>5&&(D.current.dismissOnTouchEnd=!0),Lt>10&&(Te(he),M.clear(),D.current=null)}function Ie(he){Ee(he,ke)}function je(he){Me()!=="sloppy"||!D.current||P(he)||(D.current.dismissOnTouchEnd&&Te(he),M.clear(),D.current=null)}function le(he){Ee(he,je)}const ve=po(i&&po(Ge(ie,"keydown",K),Ge(ie,"compositionstart",me),Ge(ie,"compositionend",pe)),C&&po(Ge(ie,"click",Se,!0),Ge(ie,"pointerdown",Se,!0),Ge(ie,"pointerup",Re,!0),Ge(ie,"pointercancel",Re,!0),Ge(ie,"mousedown",Se,!0),Ge(ie,"mouseup",Re,!0),Ge(ie,"touchstart",Pe,{capture:!0,passive:!0}),Ge(ie,"touchmove",Ie,{capture:!0,passive:!0}),Ge(ie,"touchend",le,{capture:!0,passive:!0})));return()=>{ve(),W.clear(),se.clear(),Ce(),I.current=!1,ee()}},[S,v,i,C,N,y,a,k,j,K,ee,_,$,P,T,h,M]);const F=b.useMemo(()=>({onKeyDown:K,onPointerDown:q,onClick:q}),[K,q]),J=b.useMemo(()=>({onKeyDown:K,onPointerDown:O,onMouseDown:O,onClickCapture:Z,onMouseDownCapture(W){Z(),Q(W)},onPointerDownCapture(W){Z(),Q(W)},onMouseUpCapture:Z,onTouchEndCapture:Z,onTouchMoveCapture:Z}),[K,Z,Q,O]);return b.useMemo(()=>a?{reference:F,floating:J,trigger:F}:{},[a,F,J])}function jx(e,o,a){let{reference:i,floating:l}=e;const c=to(o),d=nm(o),g=tm(d),m=no(o),h=c==="y",y=i.x+i.width/2-l.width/2,v=i.y+i.height/2-l.height/2,S=i[g]/2-l[g]/2;let w;switch(m){case"top":w={x:y,y:i.y-l.height};break;case"bottom":w={x:y,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:v};break;case"left":w={x:i.x-l.width,y:v};break;default:w={x:i.x,y:i.y}}const T=is(o);return T&&(w[d]+=S*(T==="end"?1:-1)*(a&&h?-1:1)),w}async function GO(e,o){var a;o===void 0&&(o={});const{x:i,y:l,platform:c,rects:d,elements:g,strategy:m}=e,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:S=!1,padding:w=0}=Ys(o,e),T=AS(w),N=g[S?v==="floating"?"reference":"floating":v],C=Zr(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(N)))==null||a?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(g.floating)),boundary:h,rootBoundary:y,strategy:m})),_=v==="floating"?{x:i,y:l,width:d.floating.width,height:d.floating.height}:d.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(g.floating)),j=await(c.isElement==null?void 0:c.isElement(k))&&await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1},L=Zr(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:_,offsetParent:k,strategy:m}):_);return{top:(C.top-L.top+T.top)/j.y,bottom:(L.bottom-C.bottom+T.bottom)/j.y,left:(C.left-L.left+T.left)/j.x,right:(L.right-C.right+T.right)/j.x}}const XO=50,KO=async(e,o,a)=>{const{placement:i="bottom",strategy:l="absolute",middleware:c=[],platform:d}=a,g=d.detectOverflow?d:{...d,detectOverflow:GO},m=await(d.isRTL==null?void 0:d.isRTL(o));let h=await d.getElementRects({reference:e,floating:o,strategy:l}),{x:y,y:v}=jx(h,i,m),S=i,w=0;const T={};for(let A=0;A<c.length;A++){const N=c[A];if(!N)continue;const{name:C,fn:_}=N,{x:k,y:j,data:L,reset:z}=await _({x:y,y:v,initialPlacement:i,placement:S,strategy:l,middlewareData:T,rects:h,platform:g,elements:{reference:e,floating:o}});y=k??y,v=j??v,T[C]={...T[C],...L},z&&w<XO&&(w++,typeof z=="object"&&(z.placement&&(S=z.placement),z.rects&&(h=z.rects===!0?await d.getElementRects({reference:e,floating:o,strategy:l}):z.rects),{x:y,y:v}=jx(h,S,m)),A=-1)}return{x:y,y:v,placement:S,strategy:l,middlewareData:T}},$O=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var a,i;const{placement:l,middlewareData:c,rects:d,initialPlacement:g,platform:m,elements:h}=o,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:A=!0,...N}=Ys(e,o);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=no(l),_=to(g),k=no(g)===g,j=await(m.isRTL==null?void 0:m.isRTL(h.floating)),L=S||(k||!A?[du(g)]:eO(g)),z=T!=="none";!S&&z&&L.push(...sO(g,A,T,j));const I=[g,...L],U=await m.detectOverflow(o,N),Y=[];let B=((i=c.flip)==null?void 0:i.overflows)||[];if(y&&Y.push(U[C]),v){const ee=JA(l,d,j);Y.push(U[ee[0]],U[ee[1]])}if(B=[...B,{placement:l,overflows:Y}],!Y.every(ee=>ee<=0)){var D,M;const ee=(((D=c.flip)==null?void 0:D.index)||0)+1,$=I[ee];if($&&(!(v==="alignment"?_!==to($):!1)||B.every(K=>to(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:ee,overflows:B},reset:{placement:$}};let P=(M=B.filter(q=>q.overflows[0]<=0).sort((q,K)=>q.overflows[1]-K.overflows[1])[0])==null?void 0:M.placement;if(!P)switch(w){case"bestFit":{var H;const q=(H=B.filter(K=>{if(z){const Z=to(K.placement);return Z===_||Z==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Z=>Z>0).reduce((Z,Q)=>Z+Q,0)]).sort((K,Z)=>K[1]-Z[1])[0])==null?void 0:H[0];q&&(P=q);break}case"initialPlacement":P=g;break}if(l!==P)return{reset:{placement:P}}}return{}}}},tw=new Set(["left","top"]);async function WO(e,o){const{placement:a,platform:i,elements:l}=e,c=await(i.isRTL==null?void 0:i.isRTL(l.floating)),d=no(a),g=is(a),m=to(a)==="y",h=tw.has(d)?-1:1,y=c&&m?-1:1,v=Ys(o,e);let{mainAxis:S,crossAxis:w,alignmentAxis:T}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return g&&typeof T=="number"&&(w=g==="end"?T*-1:T),m?{x:w*y,y:S*h}:{x:S*h,y:w*y}}const QO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var a,i;const{x:l,y:c,placement:d,middlewareData:g}=o,m=await WO(o,e);return d===((a=g.offset)==null?void 0:a.placement)&&(i=g.arrow)!=null&&i.alignmentOffset?{}:{x:l+m.x,y:c+m.y,data:{...m,placement:d}}}}},ZO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:a,y:i,placement:l,platform:c}=o,{mainAxis:d=!0,crossAxis:g=!1,limiter:m={fn:_=>{let{x:k,y:j}=_;return{x:k,y:j}}},...h}=Ys(e,o),y={x:a,y:i},v=await c.detectOverflow(o,h),S=to(l),w=em(S);let T=y[w],A=y[S];const N=(_,k)=>RS(k+v[_==="y"?"top":"left"],k,k-v[_==="y"?"bottom":"right"]);d&&(T=N(w,T)),g&&(A=N(S,A));const C=m.fn({...o,[w]:T,[S]:A});return{...C,data:{x:C.x-a,y:C.y-i,enabled:{[w]:d,[S]:g}}}}}},JO=function(e){return e===void 0&&(e={}),{options:e,fn(o){var a,i;const{x:l,y:c,placement:d,rects:g,middlewareData:m}=o,{offset:h=0,mainAxis:y=!0,crossAxis:v=!0}=Ys(e,o),S={x:l,y:c},w=to(d),T=em(w);let A=S[T],N=S[w];const C=Ys(h,o),_=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(a=C.mainAxis)!=null?a:0,crossAxis:(i=C.crossAxis)!=null?i:0};if(y){const L=T==="y"?"height":"width",z=g.reference[T]-g.floating[L]+_.mainAxis,I=g.reference[T]+g.reference[L]-_.mainAxis;A<z?A=z:A>I&&(A=I)}if(v){var k,j;const L=T==="y"?"width":"height",z=tw.has(no(d)),I=g.reference[w]-g.floating[L]+(z&&((k=m.offset)==null?void 0:k[w])||0)+(z?0:_.crossAxis),U=g.reference[w]+g.reference[L]+(z?0:((j=m.offset)==null?void 0:j[w])||0)-(z?_.crossAxis:0);N<I?N=I:N>U&&(N=U)}return{[T]:A,[w]:N}}}},e2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(o){const{placement:a,rects:i,platform:l,elements:c}=o,{apply:d=()=>{},...g}=Ys(e,o),m=await l.detectOverflow(o,g),h=no(a),y=is(a),v=to(a)==="y",{width:S,height:w}=i.floating;let T,A;h==="top"||h==="bottom"?(T=h,A=y===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(A=h,T=y==="end"?"top":"bottom");const N=w-m.top-m.bottom,C=S-m.left-m.right,_=Ni(w-m[T],N),k=Ni(S-m[A],C),j=o.middlewareData.shift,L=!j;let z=_,I=k;j!=null&&j.enabled.x&&(I=C),j!=null&&j.enabled.y&&(z=N),L&&!y&&(v?I=S-2*Qo(m.left,m.right):z=w-2*Qo(m.top,m.bottom)),await d({...o,availableWidth:I,availableHeight:z});const U=await l.getDimensions(c.floating);return S!==U.width||w!==U.height?{reset:{rects:!0}}:{}}}};function nw(e){const o=Fn(e);let a=parseFloat(o.width)||0,i=parseFloat(o.height)||0;const l=vt(e),c=l?e.offsetWidth:a,d=l?e.offsetHeight:i,g=fu(a)!==c||fu(i)!==d;return g&&(a=c,i=d),{width:a,height:i,$:g}}function dm(e){return et(e)?e:e.contextElement}function Ri(e){const o=dm(e);if(!vt(o))return Zo(1);const a=o.getBoundingClientRect(),{width:i,height:l,$:c}=nw(o);let d=(c?fu(a.width):a.width)/i,g=(c?fu(a.height):a.height)/l;return(!d||!Number.isFinite(d))&&(d=1),(!g||!Number.isFinite(g))&&(g=1),{x:d,y:g}}const t2=Zo(0);function ow(e){const o=Rt(e);return!Qh()||!o.visualViewport?t2:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function n2(e,o,a){return o===void 0&&(o=!1),!!a&&o&&a===Rt(e)}function Oa(e,o,a,i){o===void 0&&(o=!1),a===void 0&&(a=!1);const l=e.getBoundingClientRect(),c=dm(e);let d=Zo(1);o&&(i?et(i)&&(d=Ri(i)):d=Ri(e));const g=n2(c,a,i)?ow(c):Zo(0);let m=(l.left+g.x)/d.x,h=(l.top+g.y)/d.y,y=l.width/d.x,v=l.height/d.y;if(c&&i){const S=Rt(c),w=et(i)?Rt(i):i;let T=S,A=mh(T);for(;A&&w!==T;){const N=Ri(A),C=A.getBoundingClientRect(),_=Fn(A),k=C.left+(A.clientLeft+parseFloat(_.paddingLeft))*N.x,j=C.top+(A.clientTop+parseFloat(_.paddingTop))*N.y;m*=N.x,h*=N.y,y*=N.x,v*=N.y,m+=k,h+=j,T=Rt(A),A=mh(T)}}return Zr({width:y,height:v,x:m,y:h})}function Xu(e,o){const a=Du(e).scrollLeft;return o?o.left+a:Oa(us(e)).left+a}function sw(e,o){const a=e.getBoundingClientRect(),i=a.left+o.scrollLeft-Xu(e,a),l=a.top+o.scrollTop;return{x:i,y:l}}function o2(e){let{elements:o,rect:a,offsetParent:i,strategy:l}=e;const c=l==="fixed",d=us(i),g=o?_u(o.floating):!1;if(i===d||g&&c)return a;let m={scrollLeft:0,scrollTop:0},h=Zo(1);const y=Zo(0),v=vt(i);if((v||!c)&&((pn(i)!=="body"||ul(d))&&(m=Du(i)),v)){const w=Oa(i);h=Ri(i),y.x=w.x+i.clientLeft,y.y=w.y+i.clientTop}const S=d&&!v&&!c?sw(d,m):Zo(0);return{width:a.width*h.x,height:a.height*h.y,x:a.x*h.x-m.scrollLeft*h.x+y.x+S.x,y:a.y*h.y-m.scrollTop*h.y+y.y+S.y}}function s2(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function a2(e){const o=Du(e),a=e.ownerDocument.body,i=Qo(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),l=Qo(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let c=-o.scrollLeft+Xu(e);const d=-o.scrollTop;return Fn(a).direction==="rtl"&&(c+=Qo(e.clientWidth,a.clientWidth)-i),{width:i,height:l,x:c,y:d}}const i2=25;function r2(e,o,a){a===void 0&&(a="viewport");const i=a==="layoutViewport",l=Rt(e),c=us(e),d=l.visualViewport;let g=c.clientWidth,m=c.clientHeight,h=0,y=0;if(d){const S=!Qh()||o==="fixed";i?S||(h=-d.offsetLeft,y=-d.offsetTop):(g=d.width,m=d.height,S&&(h=d.offsetLeft,y=d.offsetTop))}if(Xu(c)<=0){const S=c.ownerDocument,w=S.body,T=getComputedStyle(w),A=S.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,N=Math.abs(c.clientWidth-w.clientWidth-A),C=getComputedStyle(c).scrollbarGutter==="stable both-edges"?N/2:N;C<=i2&&(g-=C)}return{width:g,height:m,x:h,y}}function l2(e,o){const a=Oa(e,!0,o==="fixed"),i=a.top+e.clientTop,l=a.left+e.clientLeft,c=Ri(e),d=e.clientWidth*c.x,g=e.clientHeight*c.y,m=l*c.x,h=i*c.y;return{width:d,height:g,x:m,y:h}}function _x(e,o,a){let i;if(o==="viewport"||o==="layoutViewport")i=r2(e,a,o);else if(o==="document")i=a2(us(e));else if(et(o))i=l2(o,a);else{const l=ow(e);i={x:o.x-l.x,y:o.y-l.y,width:o.width,height:o.height}}return Zr(i)}function c2(e,o){const a=o.get(e);if(a)return a;let i=Qr(e,[],!1).filter(g=>et(g)&&pn(g)!=="body"),l=null;const c=Fn(e).position==="fixed";let d=c?ts(e):e;for(;et(d)&&!Wo(d);){const g=Fn(d),m=Wh(d),h=l?l.position:c?"fixed":"";!m&&(h==="fixed"||h==="absolute"&&g.position==="static")?i=i.filter(v=>v!==d):l=g,d=ts(d)}return o.set(e,i),i}function u2(e){let{element:o,boundary:a,rootBoundary:i,strategy:l}=e;const d=[...a==="clippingAncestors"?_u(o)?[]:c2(o,this._c):[].concat(a),i],g=_x(o,d[0],l);let m=g.top,h=g.right,y=g.bottom,v=g.left;for(let S=1;S<d.length;S++){const w=_x(o,d[S],l);m=Qo(w.top,m),h=Ni(w.right,h),y=Ni(w.bottom,y),v=Qo(w.left,v)}return{width:h-v,height:y-m,x:v,y:m}}function f2(e){const{width:o,height:a}=nw(e);return{width:o,height:a}}function d2(e,o,a){const i=vt(o),l=us(o),c=a==="fixed",d=Oa(e,!0,c,o);let g={scrollLeft:0,scrollTop:0};const m=Zo(0);if((i||!c)&&((pn(o)!=="body"||ul(l))&&(g=Du(o)),i)){const S=Oa(o,!0,c,o);m.x=S.x+o.clientLeft,m.y=S.y+o.clientTop}!i&&l&&(m.x=Xu(l));const h=l&&!i&&!c?sw(l,g):Zo(0),y=d.left+g.scrollLeft-m.x-h.x,v=d.top+g.scrollTop-m.y-h.y;return{x:y,y:v,width:d.width,height:d.height}}function Yp(e){return Fn(e).position==="static"}function Dx(e,o){if(!vt(e)||Fn(e).position==="fixed")return null;if(o)return o(e);let a=e.offsetParent;return us(e)===a&&(a=a.ownerDocument.body),a}function aw(e,o){const a=Rt(e);if(_u(e))return a;if(!vt(e)){let l=ts(e);for(;l&&!Wo(l);){if(et(l)&&!Yp(l))return l;l=ts(l)}return a}let i=Dx(e,o);for(;i&&vA(i)&&Yp(i);)i=Dx(i,o);return i&&Wo(i)&&Yp(i)&&!Wh(i)?a:i||wA(e)||a}const p2=async function(e){const o=this.getOffsetParent||aw,a=this.getDimensions,i=await a(e.floating);return{reference:d2(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function h2(e){return Fn(e).direction==="rtl"}const iw={convertOffsetParentRelativeRectToViewportRelativeRect:o2,getDocumentElement:us,getClippingRect:u2,getOffsetParent:aw,getElementRects:p2,getClientRects:s2,getDimensions:f2,getScale:Ri,isElement:et,isRTL:h2};function rw(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function m2(e,o,a){let i=null,l;const c=us(e);function d(){var y;clearTimeout(l),(y=i)==null||y.disconnect(),i=null}function g(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),d();const S=e.getBoundingClientRect(),{left:w,top:T,width:A,height:N}=S;if(y||o(),!A||!N)return;const C=Fc(T),_=Fc(c.clientWidth-(w+A)),k=Fc(c.clientHeight-(T+N)),j=Fc(w),z={rootMargin:-C+"px "+-_+"px "+-k+"px "+-j+"px",threshold:Qo(0,Ni(1,v))||1};let I=!0;function U(Y){const B=Y[0].intersectionRatio;if(!rw(S,e.getBoundingClientRect()))return g();if(B!==v){if(!I)return g();B?g(!1,B):l=setTimeout(()=>{g(!1,1e-7)},1e3)}I=!1}try{i=new IntersectionObserver(U,{...z,root:c.ownerDocument})}catch{i=new IntersectionObserver(U,z)}i.observe(e)}const m=Rt(e),h=()=>g(a);return m.addEventListener("resize",h),g(!0),()=>{m.removeEventListener("resize",h),d()}}function zx(e,o,a,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,h=dm(e),y=l||c?[...h?Qr(h):[],...o?Qr(o):[]]:[];y.forEach(C=>{l&&C.addEventListener("scroll",a),c&&C.addEventListener("resize",a)});const v=h&&g?m2(h,a,c):null;let S=-1,w=null;d&&(w=new ResizeObserver(C=>{let[_]=C;_&&_.target===h&&w&&o&&(w.unobserve(o),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var k;(k=w)==null||k.observe(o)})),a()}),h&&!m&&w.observe(h),o&&w.observe(o));let T,A=m?Oa(e):null;m&&N();function N(){const C=Oa(e);A&&!rw(A,C)&&a(),A=C,T=requestAnimationFrame(N)}return a(),()=>{var C;y.forEach(_=>{l&&_.removeEventListener("scroll",a),c&&_.removeEventListener("resize",a)}),v?.(),(C=w)==null||C.disconnect(),w=null,m&&cancelAnimationFrame(T)}}const g2=QO,y2=ZO,b2=$O,v2=e2,x2=JO,S2=(e,o,a)=>{const i=new Map,l=a??{},c={...iw,...l.platform,_c:i};return KO(e,o,{...l,platform:c})};var w2=typeof document<"u",T2=function(){},ou=w2?b.useLayoutEffect:T2;function mu(e,o){if(e===o)return!0;if(typeof e!=typeof o)return!1;if(typeof e=="function"&&e.toString()===o.toString())return!0;let a,i,l;if(e&&o&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==o.length)return!1;for(i=a;i--!==0;)if(!mu(e[i],o[i]))return!1;return!0}if(l=Object.keys(e),a=l.length,a!==Object.keys(o).length)return!1;for(i=a;i--!==0;)if(!{}.hasOwnProperty.call(o,l[i]))return!1;for(i=a;i--!==0;){const c=l[i];if(!(c==="_owner"&&e.$$typeof)&&!mu(e[c],o[c]))return!1}return!0}return e!==e&&o!==o}function lw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Px(e,o){const a=lw(e);return Math.round(o*a)/a}function qp(e){const o=b.useRef(e);return ou(()=>{o.current=e}),o}function E2(e){e===void 0&&(e={});const{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:d}={},transform:g=!0,whileElementsMounted:m,open:h}=e,[y,v]=b.useState({x:0,y:0,strategy:a,placement:o,middlewareData:{},isPositioned:!1}),[S,w]=b.useState(i);mu(S,i)||w(i);const[T,A]=b.useState(null),[N,C]=b.useState(null),_=b.useCallback(K=>{K!==z.current&&(z.current=K,A(K))},[]),k=b.useCallback(K=>{K!==I.current&&(I.current=K,C(K))},[]),j=c||T,L=d||N,z=b.useRef(null),I=b.useRef(null),U=b.useRef(y),Y=m!=null,B=qp(m),D=qp(l),M=qp(h),H=b.useCallback(()=>{if(!z.current||!I.current)return;const K={placement:o,strategy:a,middleware:S};D.current&&(K.platform=D.current),S2(z.current,I.current,K).then(Z=>{const Q={...Z,isPositioned:M.current!==!1};ee.current&&!mu(U.current,Q)&&(U.current=Q,so.flushSync(()=>{v(Q)}))})},[S,o,a,D,M]);ou(()=>{h===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[h]);const ee=b.useRef(!1);ou(()=>(ee.current=!0,()=>{ee.current=!1}),[]),ou(()=>{if(j&&(z.current=j),L&&(I.current=L),j&&L){if(B.current)return B.current(j,L,H);H()}},[j,L,H,B,Y]);const $=b.useMemo(()=>({reference:z,floating:I,setReference:_,setFloating:k}),[_,k]),P=b.useMemo(()=>({reference:j,floating:L}),[j,L]),q=b.useMemo(()=>{const K={position:a,left:0,top:0};if(!P.floating)return K;const Z=Px(P.floating,y.x),Q=Px(P.floating,y.y);return g?{...K,transform:"translate("+Z+"px, "+Q+"px)",...lw(P.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Z,top:Q}},[a,g,P.floating,y.x,y.y]);return b.useMemo(()=>({...y,update:H,refs:$,elements:P,floatingStyles:q}),[y,H,$,P,q])}const C2=(e,o)=>{const a=g2(e);return{name:a.name,fn:a.fn,options:[e,o]}},R2=(e,o)=>{const a=y2(e);return{name:a.name,fn:a.fn,options:[e,o]}},A2=(e,o)=>({fn:x2(e).fn,options:[e,o]}),O2=(e,o)=>{const a=b2(e);return{name:a.name,fn:a.fn,options:[e,o]}},k2=(e,o)=>{const a=v2(e);return{name:a.name,fn:a.fn,options:[e,o]}};var Gp={exports:{}},Xp={};var Lx;function N2(){if(Lx)return Xp;Lx=1;var e=ll();function o(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var a=typeof Object.is=="function"?Object.is:o,i=e.useState,l=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function g(v,S){var w=S(),T=i({inst:{value:w,getSnapshot:S}}),A=T[0].inst,N=T[1];return c(function(){A.value=w,A.getSnapshot=S,m(A)&&N({inst:A})},[v,w,S]),l(function(){return m(A)&&N({inst:A}),v(function(){m(A)&&N({inst:A})})},[v]),d(w),w}function m(v){var S=v.getSnapshot;v=v.value;try{var w=S();return!a(v,w)}catch{return!0}}function h(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:g;return Xp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Xp}var Ix;function cw(){return Ix||(Ix=1,Gp.exports=N2()),Gp.exports}var pm=cw(),Kp={exports:{}},$p={};var Hx;function M2(){if(Hx)return $p;Hx=1;var e=ll(),o=cw();function a(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var i=typeof Object.is=="function"?Object.is:a,l=o.useSyncExternalStore,c=e.useRef,d=e.useEffect,g=e.useMemo,m=e.useDebugValue;return $p.useSyncExternalStoreWithSelector=function(h,y,v,S,w){var T=c(null);if(T.current===null){var A={hasValue:!1,value:null};T.current=A}else A=T.current;T=g(function(){function C(z){if(!_){if(_=!0,k=z,z=S(z),w!==void 0&&A.hasValue){var I=A.value;if(w(I,z))return j=I}return j=z}if(I=j,i(k,z))return I;var U=S(z);return w!==void 0&&w(I,U)?(k=z,I):(k=z,j=U)}var _=!1,k,j,L=v===void 0?null:v;return[function(){return C(y())},L===null?void 0:function(){return C(L())}]},[y,v,S,w]);var N=l(h,T[0],T[1]);return d(function(){A.hasValue=!0,A.value=N},[N]),m(N),N},$p}var Ux;function j2(){return Ux||(Ux=1,Kp.exports=M2()),Kp.exports}var _2=j2();const D2=am(19),z2=D2?L2:I2;function uw(e,o,a,i,l){return z2(e,o,a,i,l)}function P2(e,o,a,i,l){const c=b.useCallback(()=>o(e.getSnapshot(),a,i,l),[e,o,a,i,l]);return pm.useSyncExternalStore(e.subscribe,c,c)}lA({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let o=!1;for(let a=0;a<e.syncHooks.length;a+=1){const i=e.syncHooks[a],l=i.selector(i.store.state,i.a1,i.a2,i.a3);Object.is(i.value,l)||(o=!0,i.value=l)}return o&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=o=>{const a=new Set;for(const l of e.syncHooks)a.add(l.store);const i=[];for(const l of a)i.push(l.subscribe(o));return()=>{for(const l of i)l()}}),pm.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function L2(e,o,a,i,l){const c=rA();if(!c)return P2(e,o,a,i,l);const d=c.syncIndex;c.syncIndex+=1;let g;return c.didInitialize?(g=c.syncHooks[d],(g.store!==e||g.selector!==o||!Object.is(g.a1,a)||!Object.is(g.a2,i)||!Object.is(g.a3,l))&&(g.store!==e&&(c.didChangeStore=!0),g.store=e,g.selector=o,g.a1=a,g.a2=i,g.a3=l,g.value=o(e.getSnapshot(),a,i,l))):(g={store:e,selector:o,a1:a,a2:i,a3:l,value:o(e.getSnapshot(),a,i,l)},c.syncHooks.push(g)),g.value}function I2(e,o,a,i,l){return _2.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>o(c,a,i,l))}class H2{static create(o){return new this(o)}constructor(o){this.state=o,this.listeners=new Set,this.updateTick=0}subscribe=o=>(this.listeners.add(o),()=>{this.listeners.delete(o)});getSnapshot=()=>this.state;setState(o){if(this.state===o)return;this.state=o,this.updateTick+=1;const a=this.updateTick;for(const i of this.listeners){if(a!==this.updateTick)return;i(o)}}update(o){for(const a in o)if(!Object.is(this.state[a],o[a])){this.setState({...this.state,...o});return}}set(o,a){Object.is(this.state[o],a)||this.setState({...this.state,[o]:a})}notifyAll(){const o={...this.state};this.setState(o)}use(o,a,i,l){return uw(this,o,a,i,l)}}class Da extends H2{constructor(o,a={},i){super(o),this.context=a,this.selectors=i}useSyncedValue(o,a){b.useDebugValue(o);const i=this;we(()=>{i.state[o]!==a&&i.set(o,a)},[i,o,a])}useSyncedValueWithCleanup(o,a){const i=this;we(()=>(i.state[o]!==a&&i.set(o,a),()=>{i.set(o,void 0)}),[i,o,a])}useSyncedValues(o){const a=this,i=Object.values(o);we(()=>{a.update(o)},[a,...i])}useControlledProp(o,a){b.useDebugValue(o);const i=this,l=a!==void 0;we(()=>{l&&!Object.is(i.state[o],a)&&i.setState({...i.state,[o]:a})},[i,o,a,l])}select(o,a,i,l){const c=this.selectors[o];return c(this.state,a,i,l)}useState(o,a,i,l){return b.useDebugValue(o),uw(this,this.selectors[o],a,i,l)}useContextCallback(o,a){b.useDebugValue(o);const i=Ne(a??Ht);this.context[o]=i}useStateSetter(o){const a=b.useRef(void 0);return a.current===void 0&&(a.current=i=>{this.set(o,i)}),a.current}observe(o,a){let i;typeof o=="function"?i=o:i=this.selectors[o];let l=i(this.state);return a(l,l,this),this.subscribe(c=>{const d=i(c);if(!Object.is(l,d)){const g=l;l=d,a(d,g,this)}})}}const U2={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class hm extends Da{constructor(o){const{syncOnly:a,nested:i,onOpenChange:l,triggerElements:c,...d}=o;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:l,dataRef:{current:{}},events:WS(),nested:i,triggerElements:c},U2),this.syncOnly=a}syncOpenEvent=(o,a)=>{(!o||!this.state.open||a!=null&&bA(a))&&(this.context.dataRef.current.openEvent=o?a:void 0)};dispatchOpenChange=(o,a)=>{this.syncOpenEvent(o,a.event);const i={open:o,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",i)};setOpen=(o,a)=>{if(this.syncOnly){this.context.onOpenChange?.(o,a);return}this.dispatchOpenChange(o,a),this.context.onOpenChange?.(o,a)}}function fw(e){const{popupStore:o,treatPopupAsFloatingElement:a=!1,floatingRootContext:i,floatingId:l,nested:c,onOpenChange:d}=e,g=o.useState("open"),m=o.useState("activeTriggerElement"),h=o.useState(a?"popupElement":"positionerElement"),y=o.context.triggerElements,v=d,S=b.useRef(null);i===void 0&&S.current===null&&(S.current=new hm({open:g,transitionStatus:void 0,referenceElement:m,floatingElement:h,triggerElements:y,onOpenChange:v,floatingId:l,syncOnly:!0,nested:c}));const w=i??S.current;return o.useSyncedValue("floatingId",l),we(()=>{const T={open:g,floatingId:l,referenceElement:m,floatingElement:h};et(m)&&(T.domReferenceElement=m),w.state.positionReference===w.state.referenceElement&&(T.positionReference=m),w.update(T)},[g,l,m,h,w]),w.context.onOpenChange=v,w.context.nested=c,w}function mm(e,o=!1,a=!1,i=!1){const[l,c]=b.useState(e&&o?"idle":void 0),[d,g]=b.useState(e&&!i);return e&&!d&&(g(!0),c("starting")),!e&&d&&l!=="ending"&&!a&&c("ending"),!e&&!d&&l==="ending"&&c(void 0),we(()=>{if(!e&&d&&l!=="ending"&&a){const m=Eo.request(()=>{c("ending")});return()=>{Eo.cancel(m)}}},[e,d,l,a]),we(()=>{if(!e||o)return;const m=Eo.request(()=>{c(void 0)});return()=>{Eo.cancel(m)}},[o,e]),we(()=>{if(!e||!o)return;e&&d&&l!=="idle"&&c("starting");const m=Eo.request(()=>{c("idle")});return()=>{Eo.cancel(m)}},[o,e,d,l]),{mounted:d,setMounted:g,transitionStatus:l}}let Yc=null;function B2(e){if(!Yc){const o=[];Yc=o,queueMicrotask(()=>{Yc=null,so.flushSync(()=>{for(const a of o)a()})})}Yc.push(e)}function Ku(e,o=!1,a=!1){const i=ki();return Ne((l,c=null)=>{i.cancel();const d=Go(e);if(d==null)return;const g=d,m=()=>{if(!a){so.flushSync(l);return}B2(()=>{c?.aborted||l()})};if(typeof g.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){l();return}function h(){Promise.all(g.getAnimations().map(y=>y.finished)).then(()=>{c?.aborted||m()},()=>{if(c?.aborted)return;if(g.getAnimations().some(v=>v.pending||v.playState!=="finished")){h();return}m()})}if(o){const y=gS;if(!g.hasAttribute(y)){i.request(h);return}const v=new MutationObserver(()=>{g.hasAttribute(y)||(v.disconnect(),h())});v.observe(g,{attributes:!0,attributeFilter:[y]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0});return}i.request(h)})}function fs(e){const{enabled:o=!0,open:a,ref:i,batch:l=!1,onComplete:c}=e,d=Ne(c),g=Ku(i,a,l);b.useEffect(()=>{if(!o)return;const m=new AbortController;return g(d,m.signal),()=>{m.abort()}},[o,a,d,g])}const gl={tabIndex:-1,[gh]:""};function dw(e){return o=>o==="touch"?e.current:!0}function gm(e,o=!1){const a=Gs(),i=Xs()!=null,l=Zt(()=>e(a,i)).current;return fw({popupStore:l,treatPopupAsFloatingElement:o,floatingRootContext:l.state.floatingRootContext,floatingId:a,nested:i,onOpenChange:l.setOpen}),l}function $u({handle:e,store:o}){return we(()=>e.attachStore(o),[e,o]),null}function Bx(e){const o=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==o&&e.set("triggerCount",o)}function pw(e,o){const a=b.useRef(null);return Ne(i=>{const l=a.current;if(l!==null){if(l.element===i&&l.store===o&&l.id===e)return;a.current=null;const c=l.store;c.context.triggerElements.getById(l.id)===l.element&&(c.context.triggerElements.delete(l.id),Bx(c))}i!==null&&e!==void 0&&(a.current={store:o,id:e,element:i},o.context.triggerElements.add(e,i),Bx(o))})}function Wu(e,o,a,i=!1){let l=e.preventUnmountingOnClose;o?l=!1:i&&(l=!0);const c=a?.id??null;let d=e.activeTriggerId,g=e.activeTriggerElement;return(c||o)&&(d=c,g=a??null),{open:o,preventUnmountingOnClose:l,activeTriggerId:d,activeTriggerElement:g}}function ym(e){let o=!1;return e.preventUnmountOnClose=()=>{o=!0},()=>o}function F2(e,o,a,i={}){const l=a.reason,c=l===Ft,d=o&&l===Ti,g=!o&&(l===os||l===pl),m=ym(a);if(e.context.onOpenChange?.(o,a),a.isCanceled)return;i.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(o,a);const h=()=>{const y=Wu(e.state,o,a.trigger,m()),v={...i.extraState,...y};d?v.instantType="focus":g?v.instantType="dismiss":c&&(v.instantType=void 0),e.update(v)};c?so.flushSync(h):h()}function bm(e,o,a,i){const l=a.useState("isMountedByTrigger",e),c=pw(e,a),d=Ne(m=>{const h=a.select("open"),y=a.select("activeTriggerId");if(y===e){const v={activeTriggerElement:m,...h?i:null};a.update(v);return}if(y==null&&h){const v={activeTriggerId:e??null,activeTriggerElement:m,...i};a.update(v)}}),g=Ne(m=>{c(m),m&&d(m)});return we(()=>(g(o.current),()=>g(null)),[g,o,a,e]),we(()=>{if(l){const m={activeTriggerElement:o.current,...i};a.update(m)}},[l,a,o,...Object.values(i)]),{registerTrigger:g,isMountedByThisTrigger:l}}function Qu(e,o={}){const{closeOnActiveTriggerUnmount:a=!1}=o,i=b.useRef(null),l=e.useState("open"),c=e.useState("triggerCount"),d=e.useState("activeTriggerId"),g=e.useState("activeTriggerElement");we(()=>{if(!l){i.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const m=e.context.triggerElements.size,h={};e.state.triggerCount!==m&&(h.triggerCount=m);const y=e.select("activeTriggerId");let v=null;if(y){const S=e.context.triggerElements.getById(y);if(S)i.current=y,S!==e.state.activeTriggerElement&&(h.activeTriggerElement=S);else{for(const[w,T]of e.context.triggerElements.entries())if(T===e.state.activeTriggerElement){h.activeTriggerId=w,h.activeTriggerElement=T,i.current=w;break}h.activeTriggerId===void 0&&(i.current===y?v=y:i.current=null)}}else i.current=null;if(!v&&!y&&m===1){const S=e.context.triggerElements.entries().next();if(!S.done){const[w,T]=S.value;h.activeTriggerId=w,h.activeTriggerElement=T,i.current=w}}(h.triggerCount!==void 0||h.activeTriggerId!==void 0||h.activeTriggerElement!==void 0)&&e.update(h),v&&a&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===v&&!e.context.triggerElements.getById(v)){const S=qe(ns);e.setOpen(!1,S),S.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[l,e,c,d,g,a])}function Zu(e,o,a,i){const{mounted:l,setMounted:c,transitionStatus:d}=mm(e,!1,!1,i),g=o.useState("preventUnmountingOnClose"),m=e?!1:g;o.useSyncedValues({mounted:l,transitionStatus:d,preventUnmountingOnClose:m});const h=Ne(()=>{c(!1),o.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),a?.(),o.context.onOpenChangeComplete?.(!1)});return fs({enabled:l&&!e&&!m,open:e,ref:o.context.popupRef,onComplete(){e||h()}}),{forceUnmount:h,transitionStatus:d}}function Ju(e,o){e.useSyncedValues(o),we(()=>()=>{e.update({activeTriggerProps:Ct,inactiveTriggerProps:Ct,popupProps:Ct})},[e])}function hw(e,o){we(()=>{!o&&e.state.openMethod!==null&&e.set("openMethod",null)},[o,e]),we(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class yl{constructor(){this.idMap=new Map}add(o,a){this.idMap.set(o,a)}delete(o){this.idMap.delete(o)}hasElement(o){for(const a of this.idMap.values())if(a===o)return!0;return!1}hasMatchingElement(o){for(const a of this.idMap.values())if(o(a))return!0;return!1}getById(o){return this.idMap.get(o)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function ef(e,o,a=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new hm({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:o,syncOnly:!0,nested:a,onOpenChange:void 0}),floatingId:o,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ct,inactiveTriggerProps:Ct,popupProps:Ct}}const Gr=e=>e.triggerIdProp??e.activeTriggerId,vm=e=>e.openProp??e.open,Fx=e=>(e.popupElement?.id??e.floatingId)||void 0;function mw(e,o){return o!==void 0&&vm(e)&&Gr(e)===o}function V2(e,o){return mw(e,o)?!0:o!==void 0&&vm(e)&&Gr(e)==null&&e.triggerCount===1}const tf={open:vm,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Gr,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Fx,isTriggerActive:(e,o)=>o!==void 0&&Gr(e)===o,isOpenedByTrigger:(e,o)=>mw(e,o),isMountedByTrigger:(e,o)=>o!==void 0&&Gr(e)===o&&e.mounted,triggerProps:(e,o)=>o?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,o)=>V2(e,o)?Fx(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function xm(e){const o=b.useCallback(i=>e===void 0?Ht:e.subscribeStore(i),[e]),a=b.useCallback(()=>e===void 0?void 0:e.store,[e]);return pm.useSyncExternalStore(o,a,()=>e?.serverStore)}function Y2(e){const{open:o=!1,onOpenChange:a,elements:i={}}=e,l=Gs(),c=Xs()!=null,d=Zt(()=>new hm({open:o,transitionStatus:void 0,onOpenChange:a,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new yl,floatingId:l,syncOnly:!1,nested:c})).current;return we(()=>{const g={open:o,floatingId:l};i.reference!==void 0&&(g.referenceElement=i.reference,g.domReferenceElement=et(i.reference)?i.reference:null),i.floating!==void 0&&(g.floatingElement=i.floating),d.update(g)},[o,l,i.reference,i.floating,d]),d.context.onOpenChange=a,d.context.nested=c,d}function q2(e){return G2(e,e.rootContext)}function G2(e,o){const{nodeId:a,externalTree:i}=e,l=o.useState("referenceElement"),c=o.useState("floatingElement"),d=o.useState("domReferenceElement"),g=o.useState("open"),m=o.useState("floatingId"),[h,y]=b.useState(null),[v,S]=b.useState(void 0),[w,T]=b.useState(void 0),A=b.useRef(null),N=Ks(i),C=b.useMemo(()=>({reference:l,floating:c,domReference:d}),[l,c,d]),_=E2({...e,elements:{...C,...h&&{reference:h}}}),k=et(v)?v:null,j=w===void 0?o.state.floatingElement:w;o.useSyncedValue("referenceElement",v??null),o.useSyncedValue("domReferenceElement",v===void 0?d:k),o.useSyncedValue("floatingElement",j);const L=b.useCallback(D=>{const M=et(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;y(M),_.refs.setReference(M)},[_.refs]),z=b.useCallback(D=>{(et(D)||D===null)&&(A.current=D,S(D)),(et(_.refs.reference.current)||_.refs.reference.current===null||D!==null&&!et(D))&&_.refs.setReference(D)},[_.refs,S]),I=b.useCallback(D=>{T(D),_.refs.setFloating(D)},[_.refs]),U=b.useMemo(()=>({..._.refs,setReference:z,setFloating:I,setPositionReference:L,domReference:A}),[_.refs,z,I,L]),Y=b.useMemo(()=>({..._.elements,domReference:d}),[_.elements,d]),B=b.useMemo(()=>({..._,dataRef:o.context.dataRef,open:g,onOpenChange:o.setOpen,events:o.context.events,floatingId:m,refs:U,elements:Y,nodeId:a,rootStore:o}),[_,U,Y,a,o,g,m]);return we(()=>{d&&(A.current=d)},[d]),we(()=>{o.context.dataRef.current.floatingContext=B;const D=N?.nodesRef.current.find(M=>M.id===a);D&&(D.context=B)}),b.useMemo(()=>({..._,context:B,refs:U,elements:Y,rootStore:o}),[_,U,Y,B,o])}const Wp=Gh&&cs;function gw(e,o={}){const{enabled:a=!0,delay:i}=o,l="rootStore"in e?e.rootStore:e,{events:c,dataRef:d}=l.context,g=b.useRef(!1),m=b.useRef(null),h=b.useRef(!0),y=on();b.useEffect(()=>{const S=l.select("domReferenceElement");if(!a)return;const w=Rt(S);function T(){const C=l.select("domReferenceElement");!l.select("open")&&vt(C)&&C===nn(We(C))&&(g.current=!0,m.current=C)}function A(){h.current=!0}function N(){h.current=!1}return po(Ge(w,"blur",T),Wp&&Ge(w,"keydown",A,!0),Wp&&Ge(w,"pointerdown",N,!0))},[l,a]),b.useEffect(()=>{if(!a)return;function S(w){if(w.reason===os||w.reason===pl){const T=l.select("domReferenceElement");et(T)&&(m.current=T,g.current=!0)}}return c.on("openchange",S),()=>{c.off("openchange",S)}},[c,a,l]);const v=b.useMemo(()=>{function S(){g.current=!1,m.current=null}return{onMouseLeave(){S()},onFocus(w){const T=w.currentTarget;if(g.current){if(m.current===T)return;S()}const A=Pt(w.nativeEvent);if(et(A)){if(Wp&&!w.relatedTarget){if(!h.current&&!Hu(A))return}else if(!lu(A))return}const N=ru(w.relatedTarget,l.context.triggerElements),{nativeEvent:C,currentTarget:_}=w,k=typeof i=="function"?i():i;if(l.select("open")&&N||k===0||k===void 0){l.setOpen(!0,qe(Ti,C,_));return}y.start(k,()=>{g.current||l.setOpen(!0,qe(Ti,C,_))})},onBlur(w){S();const T=w.relatedTarget,A=w.nativeEvent,N=et(T)&&T.hasAttribute(Jr("focus-guard"))&&T.getAttribute("data-type")==="outside";y.start(0,()=>{const C=l.select("domReferenceElement"),_=nn(We(C));!T&&_===C||De(d.current.floatingContext?.refs.floating.current,_)||De(C,_)||N||ru(T??_,l.context.triggerElements)||l.setOpen(!1,qe(Ti,A))})}}},[d,i,l,y]);return b.useMemo(()=>a?{reference:v,trigger:v}:{},[a,v])}class Sm{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Mn,this.restTimeout=new Mn,this.handleCloseOptions=void 0}static create(){return new Sm}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const gu=new WeakMap;function yu(e){if(!e.performedPointerEventsMutation)return;const o=e.pointerEventsScopeElement;o&&gu.get(o)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),gu.delete(o)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function yw(e,o){const{scopeElement:a,referenceElement:i,floatingElement:l}=o,c=gu.get(a);c&&c!==e&&yu(c),yu(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=a,e.pointerEventsReferenceElement=i,e.pointerEventsFloatingElement=l,gu.set(a,e),a.style.pointerEvents="none",i.style.pointerEvents="auto",l.style.pointerEvents="auto"}function wm(e){const o=e.context.dataRef.current,a=Zt(()=>o.hoverInteractionState??Sm.create()).current;return o.hoverInteractionState||(o.hoverInteractionState=a),Ou(o.hoverInteractionState.disposeEffect),o.hoverInteractionState}function Tm(e,o={}){const{enabled:a=!0,closeDelay:i=0,nodeId:l}=o,c="rootStore"in e?e.rootStore:e,d=c.useState("open"),g=c.useState("floatingElement"),m=c.useState("domReferenceElement"),{dataRef:h}=c.context,y=Ks(),v=Xs(),S=wm(c),w=on(),T=Ne(()=>bS(h.current.openEvent?.type,S.interactedInside)),A=Ne(()=>IA(h.current.openEvent?.type)),N=Ne(()=>{yu(S)});we(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,N())},[d,S,N]),b.useEffect(()=>N,[N]),we(()=>{if(a&&d&&S.handleCloseOptions?.blockPointerEvents&&A()&&et(m)&&g){const C=m,_=g,k=We(g),j=y?.nodesRef.current.find(U=>U.id===v)?.context?.elements.floating;j&&(j.style.pointerEvents="");const L=S.pointerEventsScopeElement!==_?S.pointerEventsScopeElement:null,z=j!==_?j:null,I=S.handleCloseOptions?.getScope?.()??L??z??C.closest("[data-rootownerid]")??k.body;return yw(S,{scopeElement:I,referenceElement:C,floatingElement:_}),()=>{N()}}},[a,d,m,g,S,A,y,v,N]),b.useEffect(()=>{if(!a)return;function C(){return!!(y&&v&&qs(y.nodesRef.current,v).length>0)}function _(U){const Y=Aa(i,"close",S.pointerType),B=()=>{c.setOpen(!1,qe(Ft,U)),y?.events.emit("floating.closed",U)};Y?S.openChangeTimeout.start(Y,B):(S.openChangeTimeout.clear(),B())}function k(U){const Y=Pt(U);if(!PA(Y)){S.interactedInside=!1;return}S.interactedInside=Y?.closest("[aria-haspopup]")!=null}function j(){S.openChangeTimeout.clear(),w.clear(),y?.events.off("floating.closed",z),N()}function L(U){if(C()&&y){y.events.on("floating.closed",z);return}if(ru(U.relatedTarget,c.context.triggerElements))return;const Y=h.current.floatingContext?.nodeId??l,B=U.relatedTarget;if(!(y&&Y&&et(B)&&qs(y.nodesRef.current,Y,!1).some(M=>De(M.context?.elements.floating,B)))){if(S.handler){S.handler(U);return}N(),A()&&!T()&&_(U)}}function z(U){!y||!v||C()||w.start(0,()=>{y.events.off("floating.closed",z),c.setOpen(!1,qe(Ft,U)),y.events.emit("floating.closed",U)})}const I=g;return po(I&&Ge(I,"mouseenter",j),I&&Ge(I,"mouseleave",L),I&&Ge(I,"pointerdown",k,!0),()=>{y?.events.off("floating.closed",z)})},[a,g,c,h,i,l,A,T,N,S,y,v,w])}const X2={current:null};function nf(e,o={}){const{enabled:a=!0,delay:i=0,handleClose:l=null,mouseOnly:c=!1,restMs:d=0,move:g=!0,triggerElementRef:m=X2,externalTree:h,isActiveTrigger:y=!0,getHandleCloseContext:v,isClosing:S,shouldOpen:w,guardStaleOpen:T=!1}=o,A="rootStore"in e?e.rootStore:e,{dataRef:N,events:C}=A.context,_=Ks(h),k=wm(A),j=b.useRef(!1),L=Vt(l),z=Vt(i),I=Vt(d),U=Vt(a),Y=Vt(w),B=Vt(S),D=Ne(()=>bS(N.current.openEvent?.type,k.interactedInside)),M=Ne(()=>Y.current?.()!==!1),H=Ne((P,q,K)=>{const Z=A.context.triggerElements;if(Z.hasElement(q))return!P||!De(P,q);if(!et(K))return!1;const Q=K;return Z.hasMatchingElement(O=>De(O,Q))&&(!P||!De(P,Q))}),ee=Ne(()=>{if(!k.handler)return;We(A.select("domReferenceElement")).removeEventListener("mousemove",k.handler),k.handler=void 0}),$=Ne(()=>{yu(k)});return y&&(k.handleCloseOptions=l?.__options),b.useEffect(()=>ee,[ee]),b.useEffect(()=>{if(!a)return;function P(q){q.open?j.current=!1:(j.current=q.reason===Ft,ee(),k.openChangeTimeout.clear(),k.restTimeout.clear(),k.blockMouseMove=!0,k.restTimeoutPending=!1)}return C.on("openchange",P),()=>{C.off("openchange",P)}},[a,C,k,ee]),b.useEffect(()=>{if(!a)return;function P(F,J=!0){const W=Aa(z.current,"close",k.pointerType);W?k.openChangeTimeout.start(W,()=>{A.setOpen(!1,qe(Ft,F)),_?.events.emit("floating.closed",F)}):J&&(k.openChangeTimeout.clear(),A.setOpen(!1,qe(Ft,F)),_?.events.emit("floating.closed",F))}const q=m.current??(y?A.select("domReferenceElement"):null);if(!et(q))return;function K(F){if(k.openChangeTimeout.clear(),k.blockMouseMove=!1,c&&!Bs(k.pointerType))return;const J=hx(I.current),W=Aa(z.current,"open",k.pointerType),se=Pt(F),ie=F.currentTarget??null,me=A.select("domReferenceElement");let pe=ie;if(et(se)&&!A.context.triggerElements.hasElement(se)){for(const Ee of A.context.triggerElements.elements())if(De(Ee,se)){pe=Ee;break}}et(ie)&&et(me)&&!A.context.triggerElements.hasElement(ie)&&De(ie,me)&&(pe=me);const be=pe==null?!1:H(me,pe,se),Ce=A.select("open"),Me=B.current?.()??A.select("transitionStatus")==="ending",ye=!Ce&&Me&&j.current,ge=!be&&et(pe)&&et(me)&&De(me,pe)&&ye,Te=J>0&&!W,Oe=be&&(Ce||ye)||ge,Be=!Ce||be;if(Oe){M()&&A.setOpen(!0,qe(Ft,F,pe));return}Te||(W?k.openChangeTimeout.start(W,()=>{Be&&M()&&A.setOpen(!0,qe(Ft,F,pe))}):Be&&M()&&A.setOpen(!0,qe(Ft,F,pe)))}function Z(F){if(D()){$();return}ee();const J=A.select("domReferenceElement"),W=We(J);k.restTimeout.clear(),k.restTimeoutPending=!1;const se=N.current.floatingContext??v?.();if(ru(F.relatedTarget,A.context.triggerElements))return;if(L.current&&se){A.select("open")||k.openChangeTimeout.clear();const me=m.current;k.handler=L.current({...se,tree:_,x:F.clientX,y:F.clientY,onClose(){$(),ee(),U.current&&!D()&&me===A.select("domReferenceElement")&&P(F,!0)}}),W.addEventListener("mousemove",k.handler),k.handler(F);return}(k.pointerType!=="touch"||!De(A.select("floatingElement"),F.relatedTarget))&&P(F)}function Q(F){De(q,F.relatedTarget)||(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1)}const O=T?Ge(q,"mouseout",Q):void 0;return g?po(Ge(q,"mousemove",K,{once:!0}),Ge(q,"mouseenter",K),Ge(q,"mouseleave",Z),O):po(Ge(q,"mouseenter",K),Ge(q,"mouseleave",Z),O)},[ee,$,N,z,A,a,L,k,y,H,D,c,g,I,m,_,U,v,B,M,T]),b.useMemo(()=>{if(!a)return;function P(q){k.pointerType=q.pointerType}return{onPointerDown:P,onPointerEnter:P,onMouseMove(q){const{nativeEvent:K}=q,Z=q.currentTarget,Q=A.select("domReferenceElement"),O=A.select("open"),F=H(Q,Z,q.target);if(c&&!Bs(k.pointerType))return;if(O&&F&&k.handleCloseOptions?.blockPointerEvents){const se=A.select("floatingElement");if(se){const ie=k.handleCloseOptions?.getScope?.()??Z.ownerDocument.body;yw(k,{scopeElement:ie,referenceElement:Z,floatingElement:se})}}const J=hx(I.current);if(O&&!F||J===0||!F&&k.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;k.restTimeout.clear();function W(){if(k.restTimeoutPending=!1,D())return;const se=A.select("open");!k.blockMouseMove&&(!se||F)&&M()&&A.setOpen(!0,qe(Ft,K,Z))}k.pointerType==="touch"?so.flushSync(()=>{W()}):F&&O?W():(k.restTimeoutPending=!0,k.restTimeout.start(J,W))}}},[a,k,D,H,c,A,I,M])}const K2="Escape";function Vx(e){return cs&&e.movementX===0&&e.movementY===0}function of(e,o,a){switch(e){case"vertical":return o;case"horizontal":return a;default:return o||a}}function qc(e,o){return of(o,e===mS||e===Zh,e===zu||e===Pu)}function Qp(e,o,a){return of(o,e===Zh,a?e===zu:e===Pu)||e==="Enter"||e===" "||e===""}function $2(e,o,a){return of(o,a?e===zu:e===Pu,e===Zh)}function W2(e,o,a,i){const l=a?e===Pu:e===zu,c=e===mS;return o==="both"||o==="horizontal"&&i?e===K2:of(o,l,c)}function bw(e,o){const{listRef:a,activeIndex:i,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:d=null,allowEscape:g=!1,loopFocus:m=!1,nested:h=!1,rtl:y=!1,virtual:v=!1,focusItemOnOpen:S="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:T=!0,disabledIndices:A=void 0,orientation:N="vertical",parentOrientation:C,id:_,resetOnPointerLeave:k=!0,externalTree:j,grid:L}=o,z=L!=null,I="rootStore"in e?e.rootStore:e,U=I.useState("open"),Y=I.useState("floatingElement"),B=I.useState("domReferenceElement"),D=I.context.dataRef,M=cu(Y),H=bh(B),ee=Vt(M),$=Xs(),P=Ks(j),q=b.useRef(S),K=b.useRef(d??-1),Z=b.useRef(null),Q=b.useRef(!0),O=Ne(le=>{l(K.current===-1?null:K.current,le)}),F=b.useRef(!!Y),J=b.useRef(U),W=b.useRef(!1),se=b.useRef(!1),ie=b.useRef(null),me=Vt(A),pe=Vt(U),be=Vt(d),Ce=Vt(k),Me=ki(),ye=ki(),ge=Ne(()=>{function le(xe){v?P?.events.emit("virtualfocus",xe):ie.current=nu(xe,{sync:W.current,preventScroll:!0})}const ve=a.current[K.current],he=se.current;ve&&le(ve),(W.current?xe=>xe():xe=>Me.request(xe))(()=>{const xe=a.current[K.current]||ve;if(!xe)return;ve||le(xe),Se&&(he||!Q.current)&&xe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});we(()=>{D.current.orientation=N},[D,N]),we(()=>{c&&(U&&Y?(K.current=d??-1,q.current&&d!=null&&(se.current=!0,O())):F.current&&(K.current=-1,O()))},[c,U,Y,d,O]),we(()=>{if(c){if(!U){W.current=!1;return}if(Y)if(i==null){if(W.current=!1,be.current!=null)return;if(F.current&&(K.current=-1,ge()),(!J.current||!F.current)&&q.current&&(Z.current!=null||q.current===!0&&Z.current==null)){let le=0;const ve=()=>{a.current[0]==null?(le<2&&(le?ce=>ye.request(ce):queueMicrotask)(ve),le+=1):(K.current=Z.current==null||Qp(Z.current,N,y)||h?tu(a):xh(a),Z.current=null,O())};ve()}}else qr(a.current,i)||(K.current=i,ge(),se.current=!1)}},[c,U,Y,i,be,h,a,N,y,O,ge,ye]),we(()=>{if(!c||Y||!P||v||!F.current)return;const le=P.nodesRef.current,ve=le.find(xe=>xe.id===$)?.context?.elements.floating,he=nn(We(B??ve??null)),ce=le.some(xe=>xe.context&&De(xe.context.elements.floating,he));ve&&!ce&&Q.current&&ve.focus({preventScroll:!0})},[c,Y,B,P,$,v]),we(()=>{J.current=U,F.current=!!Y}),we(()=>{U||(Z.current=null,q.current=S)},[U,S]);const Te=i!=null,Oe=Ne(le=>{if(!pe.current)return;const ve=a.current.indexOf(le.currentTarget);ve!==-1&&(K.current!==ve||i!==ve)&&(K.current=ve,O(le))}),Be=Ne(()=>C??P?.nodesRef.current.find(le=>le.id===$)?.context?.dataRef?.current.orientation),Ee=Ne(()=>tu(a,me.current)),Pe=Ne(le=>{if(Q.current=!1,W.current=!0,le.which===229||!pe.current&&le.currentTarget===ee.current)return;if(h&&W2(le.key,N,y,z)){qc(le.key,Be())||To(le),I.setOpen(!1,qe(uu,le.nativeEvent)),vt(B)&&(v?P?.events.emit("virtualfocus",B):B.focus());return}const ve=K.current,he=tu(a,A),ce=xh(a,A);if(H||(le.key==="Home"&&(To(le),K.current=he,O(le)),le.key==="End"&&(To(le),K.current=ce,O(le))),L!=null){const xe=L(le,K.current,a,N,m,y,A,he,ce);if(xe!=null&&(K.current=xe,O(le)),N==="both")return}if(qc(le.key,N)){if(To(le),U&&!v&&nn(le.currentTarget.ownerDocument)===le.currentTarget){K.current=Qp(le.key,N,y)?he:ce,O(le);return}Qp(le.key,N,y)?m?ve>=ce?g&&ve!==a.current.length?K.current=-1:(W.current=!1,K.current=he):K.current=$o(a.current,{startingIndex:ve,disabledIndices:A}):K.current=Math.min(ce,$o(a.current,{startingIndex:ve,disabledIndices:A})):m?ve<=he?g&&ve!==-1?K.current=a.current.length:(W.current=!1,K.current=ce):K.current=$o(a.current,{startingIndex:ve,decrement:!0,disabledIndices:A}):K.current=Math.max(he,$o(a.current,{startingIndex:ve,decrement:!0,disabledIndices:A})),qr(a.current,K.current)&&(K.current=-1),O(le)}}),Se=b.useMemo(()=>({onFocus(ve){W.current=!0,Oe(ve)},onClick:({currentTarget:ve})=>ve.focus({preventScroll:!0}),onMouseMove(ve){Vx(ve)||(W.current=!0,se.current=!1,w&&Oe(ve))},onPointerLeave(ve){if(!pe.current||!Q.current||ve.pointerType==="touch")return;W.current=!0;const he=ve.relatedTarget;if(!(!w||a.current.includes(he))&&Ce.current&&(ie.current?.(),ie.current=null,K.current=-1,O(ve),!v)){const ce=ee.current,xe=nn(We(ce));ce&&De(ce,xe)&&ce.focus({preventScroll:!0})}}}),[Oe,pe,ee,w,a,O,Ce,v]),Re=b.useMemo(()=>v&&U&&Te&&{"aria-activedescendant":`${_}-${i}`},[v,U,Te,_,i]),ke=b.useMemo(()=>({...H?{}:Re,onKeyDown(le){if(le.key==="Tab"&&le.shiftKey&&U&&!v){const ve=Pt(le.nativeEvent);if(ve&&!De(ee.current,ve))return;To(le),I.setOpen(!1,qe(Vs,le.nativeEvent)),vt(B)&&B.focus();return}Pe(le)},onPointerMove(le){Vx(le)||(Q.current=!0)}}),[Re,Pe,ee,H,I,U,v,B]),Ie=b.useMemo(()=>{function le(ce){I.setOpen(!0,qe(uu,ce.nativeEvent,ce.currentTarget))}function ve(ce){S==="auto"&&Mu(ce.nativeEvent)&&(q.current=!v)}function he(ce){q.current=S,S==="auto"&&Kh(ce.nativeEvent)&&(q.current=!0)}return{onKeyDown(ce){const xe=I.select("open");Q.current=!1;const He=ce.key.startsWith("Arrow"),Lt=$2(ce.key,Be(),y),Yt=qc(ce.key,N),ut=(h?Lt:Yt)||ce.key==="Enter"||ce.key.trim()==="";if(v&&xe)return Pe(ce);if(!(!xe&&!T&&He)){if(ut){const Ae=qc(ce.key,Be());Z.current=h&&Ae?null:ce.key}if(h){Lt&&(To(ce),xe?(K.current=Ee(),O(ce)):le(ce));return}Yt&&(be.current!=null&&(K.current=be.current),To(ce),!xe&&T?le(ce):Pe(ce),xe&&O(ce))}},onFocus(ce){I.select("open")&&!v&&(K.current=-1,O(ce))},onPointerDown:he,onPointerEnter:he,onMouseDown:ve,onClick:ve}},[Pe,S,Ee,h,O,I,T,N,Be,y,be,v]),je=b.useMemo(()=>({...Re,...Ie}),[Re,Ie]);return b.useMemo(()=>c?{reference:je,floating:ke,item:Se,trigger:Ie}:{},[c,je,ke,Ie,Se])}function vw(e,o){const{listRef:a,elementsRef:i,activeIndex:l,onMatch:c,disabledIndices:d,onTyping:g,enabled:m=!0,resetMs:h=750,selectedIndex:y=null}=o,v="rootStore"in e?e.rootStore:e,S=v.useState("open"),w=on(),T=b.useRef(""),A=b.useRef(y??l??-1),N=b.useRef(null),C=Ne(j=>{function L(ee){return i?.current[ee]}function z(ee){const $=L(ee);return $&&!Vu($)||$?.matches(":disabled")?!1:d==null||!Ei(ho,ee,d)}function I(ee,$,P=0){if(ee.length===0)return-1;const q=(P%ee.length+ee.length)%ee.length,K=$.toLowerCase();for(let Z=0;Z<ee.length;Z+=1){const Q=(q+Z)%ee.length;if(!(!ee[Q]?.toLowerCase().startsWith(K)||!z(Q)))return Q}return-1}const U=a.current;if(T.current.length>0&&j.key===" "&&(To(j),g?.(!0)),T.current.length>0&&T.current[0]!==" "&&I(U,T.current)===-1&&j.key!==" "&&g?.(!1),U==null||j.key.length!==1||j.ctrlKey||j.metaKey||j.altKey)return;S&&j.key!==" "&&(To(j),g?.(!0));const Y=T.current==="";Y&&(A.current=y??l??-1),U.every((ee,$)=>ee&&z($)?ee[0]?.toLowerCase()!==ee[1]?.toLowerCase():!0)&&T.current===j.key&&(T.current="",A.current=N.current),T.current+=j.key,w.start(h,()=>{T.current="",A.current=N.current,g?.(!1)});const M=((Y?y??l??-1:A.current)??0)+1,H=I(U,T.current,M);H!==-1?(c?.(H),N.current=H):j.key!==" "&&(T.current="",g?.(!1))}),_=Ne(j=>{const L=j.relatedTarget,z=v.select("domReferenceElement"),I=v.select("floatingElement");De(z,L)||De(I,L)||(w.clear(),T.current="",A.current=N.current,g?.(!1))});we(()=>{!S&&y!==null||(w.clear(),N.current=null,T.current!==""&&(T.current=""))},[S,y,w]);const k=b.useMemo(()=>({onKeyDown:C,onBlur:_}),[C,_]);return b.useMemo(()=>m?{reference:k,floating:k}:{},[m,k])}const Yx=.1,Q2=Yx*Yx,Et=.5;function Gc(e,o,a,i,l,c){return i>=o!=c>=o&&e<=(l-a)*(o-i)/(c-i)+a}function Xc(e,o,a,i,l,c,d,g,m,h){let y=!1;return Gc(e,o,a,i,l,c)&&(y=!y),Gc(e,o,l,c,d,g)&&(y=!y),Gc(e,o,d,g,m,h)&&(y=!y),Gc(e,o,m,h,a,i)&&(y=!y),y}function Z2(e,o,a){return e>=a.x&&e<=a.x+a.width&&o>=a.y&&o<=a.y+a.height}function Kc(e,o,a,i,l,c){const d=Math.min(a,l),g=Math.max(a,l),m=Math.min(i,c),h=Math.max(i,c);return e>=d&&e<=g&&o>=m&&o<=h}function sf(e={}){const{blockPointerEvents:o=!1}=e,a=new Mn,i=({x:l,y:c,placement:d,elements:g,onClose:m,nodeId:h,tree:y})=>{const v=d?.split("-")[0];let S=!1,w=null,T=null,A=typeof performance<"u"?performance.now():0;function N(_,k){const j=performance.now(),L=j-A;if(w===null||T===null||L===0)return w=_,T=k,A=j,!1;const z=_-w,I=k-T,U=z*z+I*I,Y=L*L*Q2;return w=_,T=k,A=j,U<Y}function C(){a.clear(),m()}return function(k){a.clear();const j=g.domReference,L=g.floating;if(!j||!L||v==null||l==null||c==null)return;const{clientX:z,clientY:I}=k,U=Pt(k),Y=k.type==="mouseleave",B=De(L,U),D=De(j,U);if(B&&(S=!0,!Y))return;if(D&&(S=!1,!Y)){S=!0;return}if(Y&&et(k.relatedTarget)&&De(L,k.relatedTarget))return;function M(){return!!(y&&qs(y.nodesRef.current,h).length>0)}function H(){M()||C()}if(M())return;const ee=j.getBoundingClientRect(),$=L.getBoundingClientRect(),P=l>$.right-$.width/2,q=c>$.bottom-$.height/2,K=$.width>ee.width,Z=$.height>ee.height,Q=(K?ee:$).left,O=(K?ee:$).right,F=(Z?ee:$).top,J=(Z?ee:$).bottom;if(v==="top"&&c>=ee.bottom-1||v==="bottom"&&c<=ee.top+1||v==="left"&&l>=ee.right-1||v==="right"&&l<=ee.left+1){H();return}let W=!1;switch(v){case"top":W=Kc(z,I,Q,ee.top+1,O,$.bottom-1);break;case"bottom":W=Kc(z,I,Q,$.top+1,O,ee.bottom-1);break;case"left":W=Kc(z,I,$.right-1,J,ee.left+1,F);break;case"right":W=Kc(z,I,ee.right-1,J,$.left+1,F);break}if(W)return;if(S&&!Z2(z,I,ee)){H();return}if(!Y&&N(z,I)){H();return}let se=!1;switch(v){case"top":{const ie=K?Et/2:Et*4,me=K||P?l+ie:l-ie,pe=K?l-ie:P?l+ie:l-ie,be=c+Et+1,Ce=P||K?$.bottom-Et:$.top,Me=P?K?$.bottom-Et:$.top:$.bottom-Et;se=Xc(z,I,me,be,pe,be,$.left,Ce,$.right,Me);break}case"bottom":{const ie=K?Et/2:Et*4,me=K||P?l+ie:l-ie,pe=K?l-ie:P?l+ie:l-ie,be=c-Et,Ce=P||K?$.top+Et:$.bottom,Me=P?K?$.top+Et:$.bottom:$.top+Et;se=Xc(z,I,me,be,pe,be,$.left,Ce,$.right,Me);break}case"left":{const ie=Z?Et/2:Et*4,me=Z||q?c+ie:c-ie,pe=Z?c-ie:q?c+ie:c-ie,be=l+Et+1,Ce=q||Z?$.right-Et:$.left,Me=q?Z?$.right-Et:$.left:$.right-Et;se=Xc(z,I,Ce,$.top,Me,$.bottom,be,me,be,pe);break}case"right":{const ie=Z?Et/2:Et*4,me=Z||q?c+ie:c-ie,pe=Z?c-ie:q?c+ie:c-ie,be=l-Et,Ce=q||Z?$.left+Et:$.right,Me=q?Z?$.left+Et:$.right:$.left+Et;se=Xc(z,I,be,me,be,pe,Ce,$.top,Me,$.bottom);break}}se?S||a.start(40,H):H()}};return i.__options={...e,blockPointerEvents:o},i}const J2={...tf,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class ek extends Da{constructor(o,a,i){const l=new yl;super(tk(o,l,a,i),nk(l),J2)}setOpen=(o,a)=>{F2(this,o,a,{extraState:{openChangeReason:a.reason}})};cancelPendingOpen(o){this.state.floatingRootContext.dispatchOpenChange(!1,qe(os,o))}}function tk(e,o,a,i=!1){return{...ef(o,a,i),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function nk(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const ok=cl(function(o){const{disabled:a=!1,defaultOpen:i=!1,open:l,disableHoverablePopup:c=!1,trackCursorAxis:d="none",actionsRef:g,onOpenChange:m,onOpenChangeComplete:h,handle:y,triggerId:v,defaultTriggerId:S=null,children:w}=o,T=gm((D,M)=>new ek({open:i,openProp:l,activeTriggerId:S,triggerIdProp:v},D,M));T.useControlledProp("openProp",l),T.useControlledProp("triggerIdProp",v),T.useContextCallback("onOpenChange",m),T.useContextCallback("onOpenChangeComplete",h);const A=T.useState("open"),N=!a&&A,C=T.useState("activeTriggerId"),_=T.useState("mounted"),k=T.useState("payload");T.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:c,disabled:a}),Qu(T,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:j,transitionStatus:L}=Zu(N,T),z=T.useState("isInstantPhase"),I=T.useState("instantType"),U=T.useState("lastOpenChangeReason"),Y=b.useRef(null);we(()=>{A&&a&&T.setOpen(!1,qe(HA))},[A,a,T]),we(()=>{L==="ending"&&U===ns||L!=="ending"&&z?(I!=="delay"&&(Y.current=I),T.set("instantType","delay")):Y.current!==null&&(T.set("instantType",Y.current),Y.current=null)},[L,z,U,I,T]),we(()=>{N&&C==null&&T.set("payload",void 0)},[T,C,N]),b.useImperativeHandle(g,()=>({unmount:j,close:()=>T.setOpen(!1,qe(Bu))}),[j,T]);const B=N||_||!a&&d!=="none";return p.jsxs(fS.Provider,{value:T,children:[y&&p.jsx($u,{handle:y,store:T}),B&&p.jsx(sk,{store:T,disabled:a,trackCursorAxis:d}),typeof w=="function"?w({payload:k}):w]})});function sk({store:e,disabled:o,trackCursorAxis:a}){const i=e.useState("floatingRootContext"),l=ml(i,{enabled:!o,referencePress:()=>e.select("closeOnClick")}),c=VO(i,{enabled:!o&&a!=="none",axis:a==="none"?void 0:a}),d=b.useMemo(()=>oo(c.reference,l.reference),[c.reference,l.reference]);return Ju(e,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:l.floating??Ct}),null}function mo(e){return Gs(e,"base-ui")}const xw=b.createContext(void 0);function ak(){return b.useContext(xw)}const ik=600,Sw="data-base-ui-tooltip-trigger";function qx(e){if("composedPath"in e){const a=e.composedPath();for(let i=0;i<a.length;i+=1){const l=a[i];if(et(l))return l}}const o=e.target;return et(o)?o:null}function rk(e){let o=e;for(;o;){const a=o.closest(`[${Sw}]`);if(a)return a;const i=o.getRootNode();o="host"in i&&et(i.host)?i.host:null}return null}const lk=qh(function(o,a){const{render:i,className:l,style:c,handle:d,payload:g,disabled:m,delay:h,closeOnClick:y=!0,closeDelay:v,id:S,...w}=o,T=Au(!0),N=xm(d)??T;if(!N)throw new Error(kt(82));const C=mo(S),_=N.useState("isTriggerActive",C),k=N.useState("isOpenedByTrigger",C),j=N.useState("floatingRootContext"),L=b.useRef(null),z=v??0,{registerTrigger:I,isMountedByThisTrigger:U}=bm(C,L,N,{payload:g,closeOnClick:y,closeDelay:z}),Y=ak(),{activeIdRef:B,delayRef:D,isInstantPhase:M,hasProvider:H}=VA(j,{open:k}),ee=wm(j);N.useSyncedValue("isInstantPhase",M);const $=N.useState("disabled"),P=m??$,q=Vt(P),K=N.useState("trackCursorAxis"),Z=N.useState("disableHoverablePopup"),Q=b.useRef(!1),O=on(),F=b.useRef(void 0);function J(){return H&&B.current!=null?0:h??Y??ik}function W(ge){const Te=L.current;if(!Te||!ge)return!1;const Oe=rk(ge);return Oe!==null&&Oe!==Te&&De(Te,Oe)}function se(ge){const Te=W(ge);return Q.current=Te,Te&&(ee.openChangeTimeout.clear(),ee.restTimeout.clear(),ee.restTimeoutPending=!1,O.clear()),Te}const ie=nf(j,{enabled:!P,mouseOnly:!0,move:!1,handleClose:!Z&&K!=="both"?sf():null,restMs:J,delay(){return v==null&&H?{close:Aa(D.current,"close")}:{close:z}},triggerElementRef:L,isActiveTrigger:_,isClosing:()=>N.select("transitionStatus")==="ending",shouldOpen(){return!Q.current}}),me=gw(j,{enabled:!P}).reference,pe=ge=>{const Te=Q.current,Oe=qx(ge),Be=se(Oe),Ee=L.current,Pe=Ee&&Oe&&De(Ee,Oe);if(Be&&N.select("open")&&N.select("lastOpenChangeReason")===Ft){N.setOpen(!1,qe(Ft,ge));return}if(Te&&!Be&&Pe&&!q.current&&!N.select("open")&&Ee&&Bs(F.current)){const Se=()=>{!Q.current&&!q.current&&!N.select("open")&&N.setOpen(!0,qe(Ft,ge,Ee))},Re=J();Re===0?(O.clear(),Se()):O.start(Re,Se)}},be=N.useState("triggerProps",U);return nt("button",o,{state:{open:k},ref:[a,I,L],props:[ie,me,U||K!=="none"?be:void 0,{onMouseOver(ge){pe(ge.nativeEvent)},onFocus(ge){W(qx(ge.nativeEvent))&&ge.preventBaseUIHandler()},onMouseLeave(){Q.current=!1,O.clear(),F.current=void 0},onPointerEnter(ge){F.current=ge.pointerType},onPointerDown(ge){F.current=ge.pointerType,N.set("closeOnClick",y),y&&!N.select("open")&&N.cancelPendingOpen(ge.nativeEvent)},onClick(ge){y&&!N.select("open")&&N.cancelPendingOpen(ge.nativeEvent)},id:C,[yh]:P?"":void 0,[Sw]:P?void 0:""},w],stateAttributesMapping:Lu})}),ww=b.createContext(void 0);function ck(){const e=b.useContext(ww);if(e===void 0)throw new Error(kt(70));return e}const Tw=b.forwardRef(function(o,a){const{children:i,container:l,className:c,render:d,style:g,...m}=o,{node:h,subtree:y}=$S({container:l,ref:a,componentProps:o,elementProps:m});return!y&&!h?null:p.jsxs(b.Fragment,{children:[y,h&&so.createPortal(i,h)]})}),uk=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o;return Au().useState("mounted")||i?p.jsx(ww.Provider,{value:i,children:p.jsx(Tw,{ref:a,...l})}):null}),Ew=b.createContext(void 0);function fk(){const e=b.useContext(Ew);if(e===void 0)throw new Error(kt(71));return e}const dk=b.createContext(void 0);function af(){return b.useContext(dk)?.direction??"ltr"}const pk=e=>({name:"arrow",options:e,async fn(o){const{x:a,y:i,placement:l,rects:c,platform:d,elements:g,middlewareData:m}=o,{element:h,padding:y=0,offsetParent:v="real"}=Ys(e,o)||{};if(h==null)return{};const S=AS(y),w={x:a,y:i},T=nm(l),A=tm(T),N=await d.getDimensions(h),C=T==="y",_=C?"top":"left",k=C?"bottom":"right",j=C?"clientHeight":"clientWidth",L=c.reference[A]+c.reference[T]-w[T]-c.floating[A],z=w[T]-c.reference[T],I=v==="real"?await d.getOffsetParent?.(h):g.floating;let U=g.floating[j]||c.floating[A];(!U||!await d.isElement?.(I))&&(U=g.floating[j]||c.floating[A]);const Y=L/2-z/2,B=U/2-N[A]/2-1,D=Math.min(S[_],B),M=Math.min(S[k],B),H=D,ee=U-N[A]-M,$=U/2-N[A]/2+Y,P=RS(H,$,ee),q=!m.arrow&&is(l)!=null&&$!==P&&c.reference[A]/2-($<H?D:M)-N[A]/2<0,K=q?$<H?$-H:$-ee:0;return{[T]:w[T]+K,data:{[T]:P,centerOffset:$-P-K,...q&&{alignmentOffset:K}},reset:q}}}),hk=(e,o)=>{const{name:a,fn:i}=pk(e);return{name:a,fn:i,options:[e,o]}},mk={name:"hide",async fn(e){const{width:o,height:a,x:i,y:l}=e.rects.reference,c=o===0&&a===0&&i===0&&l===0,d=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:d.top-a>=0||d.right-o>=0||d.bottom-a>=0||d.left-o>=0||c}}}},gk={sideX:"left",sideY:"top"},yk="--available-width",bk="--available-height",vk="--anchor-width",xk="--anchor-height",Sk="--transform-origin",Gx=yk,Xx=bk;function Cw(e,o,a){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?a?"inline-start":"inline-end":"right",bottom:"bottom",left:i?a?"inline-end":"inline-start":"left"}[o]}function Kx(e,o,a){const{rects:i,placement:l}=e;return{side:Cw(o,no(l),a),align:is(l)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function rf(e){return wk(e,q2)}function wk(e,o){const{anchor:a,positionMethod:i="absolute",side:l="bottom",sideOffset:c=0,align:d="center",alignOffset:g=0,collisionBoundary:m,collisionPadding:h=5,sticky:y=!1,arrowPadding:v=5,disableAnchorTracking:S=!1,inline:w,keepMounted:T=!1,floatingRootContext:A,mounted:N,collisionAvoidance:C,shift:_,nodeId:k,adaptiveOrigin:j,lazyFlip:L=!1,externalTree:z}=e,[I,U]=b.useState(null);!N&&I!==null&&U(null);const Y=C.side||"flip",B=C.align||"flip",D=C.fallbackAxisSide||"end",M=_?.crossAxis??!1,H=_?.rootBoundary,ee=typeof a=="function"?a:void 0,$=Ne(ee),P=ee?$:a,q=Vt(a),K=Vt(N),Q=af()==="rtl",O=I||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Q?"left":"right","inline-start":Q?"right":"left"}[l],F=d==="center"?O:`${O}-${d}`;let J=h;typeof J=="number"?J={top:J,right:J,bottom:J,left:J}:J&&(J={top:J.top||0,right:J.right||0,bottom:J.bottom||0,left:J.left||0});const W=1,se=l==="bottom"?W:0,ie=l==="top"?W:0,me=l==="right"?W:0,pe=l==="left"?W:0,be={boundary:m==="clipping-ancestors"?"clippingAncestors":m,padding:J},Ce=b.useRef(null),Me=Vt(c),ye=Vt(g),ge=typeof c!="function"?c:0,Te=typeof g!="function"?g:0,Oe=[];w&&Oe.push(w),Oe.push(C2(Ve=>{const ft=Kx(Ve,l,Q),Dt=typeof Me.current=="function"?Me.current(ft):Me.current,It=typeof ye.current=="function"?ye.current(ft):ye.current;return{mainAxis:Dt,crossAxis:It,alignmentAxis:It}},[ge,Te,Q,l]));const Be=B==="none"&&Y!=="shift",Ee=!Be&&(y||M||Y==="shift"),Pe=Y==="none"?null:O2({...be,padding:{top:J.top+W+se,right:J.right+W+pe,bottom:J.bottom+W+ie,left:J.left+W+me},mainAxis:!M&&Y==="flip",crossAxis:B==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),Se=Be?null:R2({...be,rootBoundary:H,mainAxis:B!=="none",crossAxis:Ee,limiter:y||M?void 0:A2(Ve=>{if(!Ce.current)return{};const{width:ft,height:Dt}=Ce.current.getBoundingClientRect(),It=to(no(Ve.placement)),jn=It==="y"?ft:Dt,ln=It==="y"?J.left+J.right:J.top+J.bottom;return{offset:jn/2+ln/2}})},[be,y,M,H,J,B]);Y==="shift"||B==="shift"||d==="center"?Oe.push(Se,Pe):Oe.push(Pe,Se),Oe.push(k2({...be,apply({elements:{floating:Ve},availableWidth:ft,availableHeight:Dt,rects:It}){if(!K.current)return;const jn=Ve.style;jn.setProperty(Gx,`${ft}px`),jn.setProperty(Xx,`${Dt}px`);const ln=Rt(Ve).devicePixelRatio||1,{x:yo,y:Sn,width:Ro,height:_n}=It.reference,Ze=(Math.round((yo+Ro)*ln)-Math.round(yo*ln))/ln,At=(Math.round((Sn+_n)*ln)-Math.round(Sn*ln))/ln;jn.setProperty(vk,`${Ze}px`),jn.setProperty(xk,`${At}px`)}}),hk(Ve=>({element:Ce.current||We(Ve.elements.floating).createElement("div"),padding:Ce.current?v:0,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(Ve){const{elements:{floating:ft},middlewareData:Dt,placement:It,platform:jn,rects:ln,y:yo}=Ve,Sn=no(It),Ro=is(It),_n=to(Sn)==="y",Ze=Ce.current,At=typeof c=="function"?c(Kx(Ve,l,Q)):c;let Dn;if(!Ze&&Ro&&Math.abs(_n?Dt.shift?.x||0:Dt.shift?.y||0)<=1)Dn=Ro==="start"===(_n&&jn.isRTL?.(ft)===!0)?"100%":"0%";else{const bo=_n?Dt.arrow?.x||0:Dt.arrow?.y||0,ps=_n?Ze?.clientWidth||0:Ze?.clientHeight||0;Dn=`${bo+ps/2}px`}let io=Sn==="top"||Sn==="left"?`calc(100% + ${At}px)`:`${-At}px`;return Ee&&_n&&Math.abs(Dt.shift?.y||0)>At&&(io=`${ln.reference.y+ln.reference.height/2-yo}px`),ft.style.setProperty(Sk,_n?`${Dn} ${io}`:`${io} ${Dn}`),{}}},mk,j),we(()=>{!N&&A&&A.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[N,A]);const Re=b.useMemo(()=>({ancestorScroll:!S,elementResize:!S&&typeof ResizeObserver<"u",layoutShift:!S&&typeof IntersectionObserver<"u"}),[S]),{refs:ke,elements:Ie,x:je,y:le,middlewareData:ve,update:he,placement:ce,context:xe,isPositioned:He,floatingStyles:Lt}=o({rootContext:A,open:T?N:void 0,placement:F,middleware:Oe,strategy:i,whileElementsMounted:T?void 0:(...Ve)=>zx(...Ve,Re),nodeId:k,externalTree:z}),{sideX:Yt,sideY:ut}=ve.adaptiveOrigin||gk,Ae=He?i:"fixed",Ye=b.useMemo(()=>{let Ve;return He?j?Ve={position:Ae,[Yt]:je,[ut]:le}:Ve={...Lt,position:Ae}:Ve={position:Ae,top:0,left:0},Ve[Gx]="100vw",Ve[Xx]="100vh",He||(Ve.opacity=0),Ve},[j,Ae,Yt,je,ut,le,Lt,He]),Qe=b.useRef(null);we(()=>{if(!N)return;const Ve=q.current,ft=typeof Ve=="function"?Ve():Ve,It=($x(ft)?ft.current:ft)||null||null;It!==Qe.current&&(ke.setPositionReference(It),Qe.current=It)},[N,ke,P,q]),b.useEffect(()=>{if(!N)return;const Ve=q.current;typeof Ve!="function"&&$x(Ve)&&Ve.current!==Qe.current&&(ke.setPositionReference(Ve.current),Qe.current=Ve.current)},[N,ke,P,q]),b.useEffect(()=>{if(T&&N&&Ie.reference&&Ie.floating)return zx(Ie.reference,Ie.floating,he,Re)},[T,N,Ie,he,Re]);const ct=no(ce),en=Cw(l,ct,Q),rn=is(ce)||"center",hn=!!ve.hide?.referenceHidden;we(()=>{L&&N&&He&&ct!==O&&U(ct)},[L,N,He,ct,O]);const xt=b.useMemo(()=>({position:"absolute",top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),_t=ve.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:Ye,arrowStyles:xt,arrowRef:Ce,arrowUncentered:_t,side:en,align:rn,physicalSide:ct,anchorHidden:hn,refs:ke,context:xe,isPositioned:He,update:he}),[Ye,xt,Ce,_t,en,rn,ct,hn,ke,xe,He,he])}function $x(e){return e!=null&&"current"in e}function bl(e){return e==="starting"?_O:Ct}function lf(e,o,{styles:a,transitionStatus:i,props:l,refs:c,hidden:d,inert:g=!1}){const m={...a};return g&&(m.pointerEvents="none"),nt("div",e,{state:o,ref:c,props:[{role:"presentation",hidden:d,style:m},bl(i),l],stateAttributesMapping:dl})}const Tk=b.forwardRef(function(o,a){const{render:i,className:l,anchor:c,positionMethod:d="absolute",side:g="top",align:m="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:A=!1,collisionAvoidance:N=lm,style:C,..._}=o,k=Au(),j=ck(),L=k.useState("open"),z=k.useState("mounted"),I=k.useState("trackCursorAxis"),U=k.useState("disableHoverablePopup"),Y=k.useState("floatingRootContext"),B=k.useState("instantType"),D=k.useState("transitionStatus"),M=k.useState("adaptiveOrigin"),H=rf({anchor:c,positionMethod:d,floatingRootContext:Y,mounted:z,side:g,sideOffset:h,align:m,alignOffset:y,collisionBoundary:v,collisionPadding:S,sticky:T,arrowPadding:w,disableAnchorTracking:A,keepMounted:j,collisionAvoidance:N,adaptiveOrigin:M}),ee=b.useMemo(()=>({open:L,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:I!=="none"?"tracking-cursor":B}),[L,H.side,H.align,H.anchorHidden,I,B]),$=lf(o,ee,{styles:H.positionerStyles,transitionStatus:D,props:_,refs:[a,k.useStateSetter("positionerElement")],hidden:!z,inert:!L||I==="both"||U});return p.jsx(Ew.Provider,{value:H,children:$})}),Ek=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,g=Au(),{side:m,align:h}=fk(),y=g.useState("open"),v=g.useState("instantType"),S=g.useState("transitionStatus"),w=g.useState("popupProps"),T=g.useState("floatingRootContext"),A=g.useState("disabled"),N=g.useState("closeDelay");fs({open:y,ref:g.context.popupRef,onComplete(){y&&g.context.onOpenChangeComplete?.(!0)}}),Tm(T,{enabled:!A,closeDelay:N});const C=g.useStateSetter("popupElement");return nt("div",o,{state:{open:y,side:m,align:h,instant:v,transitionStatus:S},ref:[a,g.context.popupRef,C],props:[gl,w,bl(S),d],stateAttributesMapping:Iu})}),Ck=function(o){const{delay:a,closeDelay:i,timeout:l=400}=o,c=b.useMemo(()=>({open:a,close:i}),[a,i]);return p.jsx(xw.Provider,{value:a,children:p.jsx(FA,{delay:c,timeoutMs:l,children:o.children})})};function vl(e){return am(19)?e:e?"true":void 0}function Rk(e){const[o,a]=b.useState({current:e,previous:null});return Object.is(e,o.current)||a({current:e,previous:o.current}),o.previous}function Rw({label:e,shortcut:o,side:a="bottom",children:i}){return p.jsxs(ok,{children:[p.jsx(lk,{render:i}),p.jsx(uk,{children:p.jsx(Tk,{side:a,sideOffset:6,className:"z-[1000]",children:p.jsxs(Ek,{className:"rounded-md bg-fg px-2 py-1 text-xs text-surface shadow-popup data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity",children:[e,o?p.jsx("span",{className:"ml-2 opacity-60",children:o}):null]})})})]})}function Ak({children:e}){return p.jsx(Ck,{delay:500,closeDelay:0,children:e})}function Ok(e){return e.repeat&&(e.key==="Enter"||e.key===" ")}function Mi(e){Ok(e)&&e.target===e.currentTarget&&e.preventDefault()}function Aw(e){return e?o=>{Mi(o),e(o)}:Mi}const kk=200,Nk=2e3;function Mk(e,o,a){let i=null,l=!1;const c=()=>{l||(l=!0,e.removeEventListener("keydown",d,!0),e.removeEventListener("keyup",d,!0),e.clearTimeout(g),i!==null&&e.clearTimeout(i))},d=m=>{const h=m.key==="Enter"||m.key===" ";if(m.type==="keyup"){m.key===" "&&!a(m.target)&&m.preventDefault(),m.key===o&&i===null&&(i=e.setTimeout(c,kk));return}h&&!a(m.target)&&(m.preventDefault(),m.stopImmediatePropagation())},g=e.setTimeout(c,Nk);return e.addEventListener("keydown",d,!0),e.addEventListener("keyup",d,!0),c}const jk={primary:"bg-accent text-accent-fg hover:brightness-110 active:brightness-95",secondary:"bg-surface text-fg border border-line hover:bg-hover",ghost:"bg-transparent text-fg hover:bg-hover",danger:"bg-danger text-white hover:brightness-110"},_k={sm:"h-6 px-2 text-xs gap-1",md:"h-7 px-2.5 text-[13px] gap-1.5",lg:"h-8 px-3 text-[13px] gap-2"},tt=b.forwardRef(function({variant:o="secondary",size:a="md",icon:i,className:l,children:c,type:d="button",onKeyDown:g,...m},h){return p.jsxs("button",{ref:h,type:d,className:lt("inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-control font-medium transition-[background,filter]","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-45",jk[o],_k[a],l),...m,onKeyDown:Aw(g),children:[i,c]})}),Dk={sm:"size-6",md:"size-7",lg:"size-8"},za=b.forwardRef(function({label:o,icon:a,shortcut:i,active:l,size:c="md",noTooltip:d,className:g,type:m="button",onKeyDown:h,...y},v){const S=p.jsx("button",{ref:v,type:m,"aria-label":o,"aria-pressed":l===void 0?void 0:l,className:lt("inline-flex shrink-0 items-center justify-center rounded-control text-fg-muted transition-colors","hover:bg-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-40",l&&"bg-accent-soft text-accent hover:bg-accent-soft hover:text-accent",Dk[c],g),...y,onKeyDown:Aw(h),children:a});return d?S:p.jsx(Rw,{label:o,shortcut:i,children:S})}),Ow=b.createContext(void 0);function Em(e){const o=b.useContext(Ow);if(o===void 0&&!e)throw new Error(kt(33));return o}const kw=b.createContext(void 0);function $s(e){const o=b.useContext(kw);if(o===void 0&&!e)throw new Error(kt(36));return o}const zk=b.createContext(void 0);function Cm(e=!0){const o=b.useContext(zk);if(o===void 0&&!e)throw new Error(kt(25));return o}function el({controlled:e,default:o,name:a,state:i="value"}){const{current:l}=b.useRef(e!==void 0),[c,d]=b.useState(o),g=l&&e!==void 0?e:c,m=b.useCallback(h=>{l||d(h)},[]);return[g,m]}const Nw=b.createContext(void 0);function Rm(e=!1){const o=b.useContext(Nw);if(o===void 0&&!e)throw new Error(kt(16));return o}function Pk(e){const{focusableWhenDisabled:o,disabled:a,composite:i=!1,tabIndex:l=0,isNativeButton:c}=e,d=i&&o!==!1,g=i&&o===!1;return{props:b.useMemo(()=>{const h={onKeyDown(y){a&&o&&y.key!=="Tab"&&y.preventDefault()}};return i||(h.tabIndex=l,!c&&a&&(h.tabIndex=o?l:-1)),(c&&(o||d)||!c&&a)&&(h["aria-disabled"]=a),c&&(!o||g)&&(h.disabled=a),h},[i,a,o,d,g,c,l])}}function Xr(e,o,{detail:a=0}={}){e.dispatchEvent(new(Rt(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:a,shiftKey:o.shiftKey,ctrlKey:o.ctrlKey,altKey:o.altKey,metaKey:o.metaKey}))}function Co(e={}){const{disabled:o=!1,focusableWhenDisabled:a,tabIndex:i=0,native:l=!0,composite:c}=e,d=b.useRef(null),g=Rm(!0),m=c??g!==void 0,{props:h}=Pk({focusableWhenDisabled:a,disabled:o,composite:m,tabIndex:i,isNativeButton:l}),y=b.useCallback(()=>{const w=d.current;Zp(w)&&m&&o&&h.disabled===void 0&&w.disabled&&(w.disabled=!1)},[o,h.disabled,m]);we(y,[y]);const v=b.useCallback((w={})=>{const{onClick:T,onMouseDown:A,onKeyUp:N,onKeyDown:C,onPointerDown:_,...k}=w;return oo({onClick(j){if(o){j.preventDefault();return}T?.(j)},onMouseDown(j){o||A?.(j)},onKeyDown(j){if(o||(hu(j),C?.(j),j.baseUIHandlerPrevented))return;const L=j.target===j.currentTarget,z=j.currentTarget,I=Zp(z),U=!l&&Lk(z),Y=L&&(l?I:!U),B=j.key==="Enter",D=j.key===" ",M=z.getAttribute("role"),H=M?.startsWith("menuitem")||M==="option"||M==="gridcell";if(L&&m&&D){if(j.defaultPrevented&&H)return;j.preventDefault(),(!l||I)&&(j.preventBaseUIHandler(),Xr(z,j));return}if(!Y||l||!D&&!B){L&&U&&D&&j.preventDefault();return}j.defaultPrevented||(j.preventDefault(),B&&(j.preventBaseUIHandler(),Xr(z,j)))},onKeyUp(j){if(!o){if(hu(j),N?.(j),j.target===j.currentTarget&&l&&m&&Zp(j.currentTarget)&&j.key===" "){j.preventDefault();return}j.baseUIHandlerPrevented||j.target===j.currentTarget&&!l&&!m&&!j.defaultPrevented&&j.key===" "&&(j.preventBaseUIHandler(),Xr(j.currentTarget,j))}},onPointerDown(j){if(o){j.preventDefault();return}_?.(j)}},l?{type:"button"}:{role:"button"},h,k)},[o,h,m,l]),S=Ne(w=>{d.current=w,y()});return{getButtonProps:v,buttonRef:S}}function Zp(e){return vt(e)&&e.tagName==="BUTTON"}function Lk(e){return vt(e)&&e.tagName==="A"&&!!e.href}function Ik(e){const{closeOnClick:o,highlighted:a,id:i,nodeId:l,store:c,typingRef:d,itemRef:g,itemMetadata:m}=e,{events:h}=c.useState("floatingTreeRoot"),y=c.useState("open"),v=Cm(!0),S=v!==void 0;return b.useMemo(()=>({id:i,role:"menuitem",tabIndex:y&&a?0:-1,onKeyDown(w){w.key===" "&&d?.current&&w.preventDefault()},onMouseMove(w){l&&h.emit("itemhover",{nodeId:l,target:w.currentTarget})},onClick(w){o&&h.emit("close",{domEvent:w,reason:Yr})},onMouseUp(w){if(v){const T=v.initialCursorPointRef.current;if(v.initialCursorPointRef.current=null,S&&T&&Math.abs(w.clientX-T.x)<=1&&Math.abs(w.clientY-T.y)<=1||S&&!Gh&&w.button===2)return}g.current&&c.context.allowMouseUpTriggerRef.current&&(!S||w.button===2)&&m.type==="regular-item"&&Xr(g.current,w,{detail:1})}}),[o,a,i,h,l,y,c,d,g,v,S,m])}const Hk={type:"regular-item"};function Mw(e){const{closeOnClick:o,disabled:a,highlighted:i,id:l,store:c,typingRef:d=c.context.typingRef,nativeButton:g,itemMetadata:m,nodeId:h}=e,y=b.useRef(null),{getButtonProps:v,buttonRef:S}=Co({disabled:a,focusableWhenDisabled:!0,native:g,composite:!0}),w=Ik({closeOnClick:o,highlighted:i,id:l,nodeId:h,store:c,typingRef:d,itemRef:y,itemMetadata:m}),T=b.useCallback(N=>oo(w,{onMouseEnter(){m.type==="submenu-trigger"&&m.setActive()}},N,v),[w,v,m]),A=ss(y,S);return b.useMemo(()=>({getItemProps:T,itemRef:A}),[T,A])}const jw=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Uk(){return b.useContext(jw)}function cf(e={}){const{guess:o,label:a,metadata:i,textRef:l,index:c}=e,{register:d,unregister:g,subscribeMapChange:m,nextIndexRef:h}=Uk(),y=b.useRef(-1),[v,S]=b.useState(c==null&&o?()=>{if(y.current===-1){const N=h.current;h.current+=1,y.current=N}return y.current}:-1),w=c??v,T=b.useRef(null),A=b.useCallback(N=>{const C=T.current;C&&g(C),T.current=N,N&&d(N,{metadata:i??null,index:c??null,label:a,textRef:l})},[c,d,g,i,a,l]);return we(()=>{if(c==null)return m(N=>{const C=T.current?N.get(T.current)?.index:null;C!=null&&S(C)})},[c,m]),{ref:A,index:w}}const _w=b.forwardRef(function(o,a){const{render:i,className:l,id:c,label:d,nativeButton:g=!1,disabled:m=!1,closeOnClick:h=!0,style:y,...v}=o,S=cf({guess:!0,label:d}),w=Em(!0),T=mo(c),{store:A}=$s(),N=A.useState("disabled"),C=m||N,_=A.useState("isActive",S.index),k=A.useState("itemProps"),{getItemProps:j,itemRef:L}=Mw({closeOnClick:h,disabled:C,highlighted:_,id:T,store:A,nativeButton:g,nodeId:w?.context.nodeId,itemMetadata:Hk});return nt("div",o,{state:{disabled:C,highlighted:_},props:[k,v,j],ref:[L,a,S.ref]})}),Bk=b.createContext(void 0);function uf(e){return b.useContext(Bk)}const Eh="ArrowUp",Ch="ArrowDown",Rh="ArrowLeft",Ah="ArrowRight",Oh="Home",kh="End",xl=new Set([Eh,Ch,Rh,Ah,Oh,kh]),Fk="Shift",Vk=[Fk,"Control","Alt","Meta"];function Yk(e){return vt(e)&&e.tagName==="INPUT"}function Wx(e){return!!(Yk(e)&&e.selectionStart!=null||vt(e)&&e.tagName==="TEXTAREA")}function Qx(e,o,a,i){if(!e||!o||!o.scrollTo)return;let l=e.scrollLeft,c=e.scrollTop;const d=e.clientWidth<e.scrollWidth,g=e.clientHeight<e.scrollHeight;if(d&&i!=="vertical"){const m=Zx(e,o,"left"),h=$c(e),y=$c(o);a==="ltr"&&(m+o.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?l=m+o.offsetWidth+y.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:m-y.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(l=m-y.scrollMarginLeft-h.scrollPaddingLeft)),a==="rtl"&&(m-y.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft?l=m-y.scrollMarginLeft-h.scrollPaddingLeft:m+o.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(l=m+o.offsetWidth+y.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(g&&i!=="horizontal"){const m=Zx(e,o,"top"),h=$c(e),y=$c(o);m-y.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?c=m-y.scrollMarginTop-h.scrollPaddingTop:m+o.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(c=m+o.offsetHeight+y.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:l,top:c,behavior:"auto"})}function Zx(e,o,a){const i=a==="left"?"offsetLeft":"offsetTop";let l=0;for(;o.offsetParent&&(l+=o[i],o.offsetParent!==e);)o=o.offsetParent;return l}function $c(e){const o=getComputedStyle(e);return{scrollMarginTop:parseFloat(o.scrollMarginTop)||0,scrollMarginRight:parseFloat(o.scrollMarginRight)||0,scrollMarginBottom:parseFloat(o.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(o.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(o.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(o.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(o.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(o.scrollPaddingLeft)||0}}const Am=b.forwardRef(function(o,a){const{render:i,className:l,style:c,finalFocus:d,...g}=o,{store:m}=$s(),{side:h,align:y}=Em(),v=uf()!=null,S=m.useState("open"),w=m.useState("transitionStatus"),T=m.useState("popupProps"),A=m.useState("mounted"),N=m.useState("instantType"),C=m.useState("activeTriggerElement"),_=m.useState("parent"),k=m.useState("lastOpenChangeReason"),j=m.useState("rootId"),L=m.useState("floatingRootContext"),z=m.useState("floatingTreeRoot"),I=m.useState("closeDelay"),U=m.useState("hoverEnabled"),Y=m.useState("disabled"),B=m.useState("openMethod"),D=_.type==="context-menu";fs({open:S,ref:m.context.popupRef,onComplete(){S&&m.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function P(q){m.setOpen(!1,qe(q.reason,q.domEvent))}return z.events.on("close",P),()=>{z.events.off("close",P)}},[z.events,m]),Tm(L,{enabled:U&&!Y&&!D&&_.type!=="menubar",closeDelay:I});const M=m.useStateSetter("popupElement"),H={transitionStatus:w,side:h,align:y,open:S,nested:_.type==="menu",instant:N},ee=nt("div",o,{state:H,ref:[a,m.context.popupRef,M],stateAttributesMapping:Iu,props:[T,{onKeyDown(P){v&&xl.has(P.key)&&P.stopPropagation()}},bl(w),g,{"data-rootownerid":j}]});let $=_.type===void 0||D;return(C||_.type==="menubar"&&k!==Uu)&&($=!0),p.jsx(qu,{context:L,openInteractionType:B,modal:D,disabled:!A,returnFocus:d===void 0?$:d,initialFocus:_.type!=="menu",restoreFocus:!0,externalTree:_.type!=="menubar"?z:void 0,previousFocusableElement:C,nextFocusableElement:_.type===void 0?m.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?m.context.beforeContentFocusGuardRef:void 0,children:ee})}),Dw=b.createContext(void 0);function qk(){const e=b.useContext(Dw);if(e===void 0)throw new Error(kt(32));return e}const Om=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o,{store:c,parent:d}=$s();if(!(c.useState("mounted")||i))return null;const h=d.type==="menu"||d.type==="menubar"?"group":void 0;return p.jsx(Dw.Provider,{value:i,children:p.jsx(Yu,{ref:a,...l,portalOwnerRole:h})})});function km(e){const{children:o,elementsRef:a,labelsRef:i,onMapChange:l}=e,c=Ne(l),[,d]=b.useState(!1),g=Zt(Xk).current,m=Zt(Gk).current,h=b.useRef(0),y=b.useRef(!0),v=b.useRef(null),S=b.useRef(null),w=Ne(()=>{y.current||(y.current=!0,d(L=>!L))}),T=Ne((L,z)=>{m.set(L,z),w()}),A=Ne(L=>{m.delete(L),w()}),N=Ne(L=>{const z=new Map;return a.current.length=0,i&&(i.current.length=0),L.forEach(I=>{z.set(I.element,{...I.registration.metadata??{},index:I.index}),a.current[I.index]=I.element,i&&(i.current[I.index]=I.registration.label!==void 0?I.registration.label:I.registration.textRef?.current?.textContent??I.element.textContent)}),h.current=a.current.length,z});function C(L){if(S.current?.disconnect(),S.current=null,typeof MutationObserver!="function"||L.length<2)return;const z=new MutationObserver(U=>{if(!Wk(U))return;let Y=null;for(const B of L)if(B.isConnected){if(Y&&zw(Y,B)>0){z.disconnect(),w();return}Y=B}});S.current=z;const I=new Set;for(let U=1;U<L.length;U+=1){const Y=$k(L[U-1],L[U]);Y&&I.add(Y)}I.forEach(U=>z.observe(U,{childList:!0}))}const _=Ne(()=>{const[L,z]=Kk(m),I=N(L),U=v.current,Y=!U||U.length!==L.length||L.some((B,D)=>{const M=U[D];return B.index!==M.index||B.element!==M.element||B.registration.index!==M.registration.index||B.registration.metadata!==M.registration.metadata});C(z),v.current=L,y.current=!1,Y&&(g.forEach(B=>B(I)),c(I))});we(()=>(!y.current&&v.current&&N(v.current),()=>{a.current=[],i&&(i.current=[])}),[a,i,N]),we(()=>{y.current&&_()}),we(()=>()=>{S.current?.disconnect(),y.current=!0},[]);const k=Ne(L=>(g.add(L),()=>{g.delete(L)})),j=b.useMemo(()=>({register:T,unregister:A,subscribeMapChange:k,nextIndexRef:h}),[T,A,k,h]);return p.jsx(jw.Provider,{value:j,children:o})}function Gk(){return new Map}function Xk(){return new Set}function Kk(e){const o=new Set,a=[],i=[];e.forEach((c,d)=>{if(!d.isConnected)return;const g=c.index,m={index:g??-1,element:d,registration:c};g===null?i.push(m):g>=0&&(o.add(g),a.push(m))});let l=0;return i.sort((c,d)=>zw(c.element,d.element)),i.forEach(c=>{for(;o.has(l);)l+=1;c.index=l,a.push(c),l+=1}),o.size>0&&a.sort((c,d)=>c.index-d.index),[a,i.map(c=>c.element)]}function $k(e,o){let a=e.parentElement;for(;a&&!a.contains(o);)a=a.parentElement;return a}function Wk(e){for(const o of e)for(let a=0;a<o.removedNodes.length;a+=1)if(o.removedNodes[a].isConnected)return!0;return!1}function zw(e,o){return e.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const ff=b.forwardRef(function(o,a){const{cutout:i,...l}=o;let c;if(i){const d=i.getBoundingClientRect();c=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return p.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...l,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})});let Jx={},e0={},t0="";function df(e,o){return ul(e)?e:o}function n0(e,o,a){return/hidden|clip/.test(e.getComputedStyle(df(o,a)).overflowY)}function Qk(e){if(typeof document>"u")return!1;const o=We(e);return Rt(o).innerWidth-o.documentElement.clientWidth>0}function Zk(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const a=We(e),i=a.documentElement,l=a.body,c=df(i,l),d=c.style.overflowY,g=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",c.style.overflowY="scroll";const m=c.offsetWidth;c.style.overflowY="hidden";const h=c.offsetWidth;return c.style.overflowY=d,i.style.scrollbarGutter=g,m===h}function Jk(e){const o=We(e),a=o.documentElement,i=o.body,l=df(a,i),c={overflowY:l.style.overflowY,overflowX:l.style.overflowX};return Object.assign(l.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(l.style,c)}}function eN(e){const o=We(e),a=o.documentElement,i=o.body,l=Rt(a);let c=0,d=0,g=!1;const m=Eo.create();if(cs&&(l.visualViewport?.scale??1)!==1)return()=>{};function h(){const w=l.getComputedStyle(a),T=l.getComputedStyle(i),C=(w.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=a.scrollTop,d=a.scrollLeft,Jx={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},t0=a.style.scrollBehavior,e0={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const _=a.scrollHeight>a.clientHeight,k=a.scrollWidth>a.clientWidth,j=w.overflowY==="scroll"||T.overflowY==="scroll",L=w.overflowX==="scroll"||T.overflowX==="scroll",z=Math.max(0,l.innerWidth-i.clientWidth),I=Math.max(0,l.innerHeight-i.clientHeight),U=parseFloat(T.marginTop)+parseFloat(T.marginBottom),Y=parseFloat(T.marginLeft)+parseFloat(T.marginRight),B=df(a,i);if(g=Zk(e),g){a.style.scrollbarGutter=C,B.style.overflowY="hidden",B.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(_||j)&&(a.style.overflowY="scroll"),(k||L)&&(a.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:U||I?`calc(100dvh - ${U+I}px)`:"100dvh",width:Y||z?`calc(100vw - ${Y+z}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=c,i.scrollLeft=d,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,Jx),Object.assign(i.style,e0),g||(a.scrollTop=c,a.scrollLeft=d,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=t0)}function v(){y(),m.request(h)}h();const S=Ge(l,"resize",v);return()=>{m.cancel(),y(),typeof l.removeEventListener=="function"&&S()}}class tN{lockCount=0;restore=null;timeoutLock=Mn.create();timeoutUnlock=Mn.create();acquire(o){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(o)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(o){if(this.lockCount===0||this.restore!==null)return;const a=We(o),i=a.documentElement,l=a.body,c=Rt(i);if(n0(c,i,l)){const g=new c.MutationObserver(()=>{n0(c,i,l)||(g.disconnect(),this.restore=null,this.lock(o))}),m={attributes:!0};g.observe(i,m),g.observe(l,m),this.restore=()=>g.disconnect();return}const d=Nu||!Qk(o);this.restore=d?Jk(o):eN(o)}}const nN=new tN;function Pw(e=!0,o=null){we(()=>{if(e)return nN.acquire(o)},[e,o])}const oN=20;function Nm(e,o,a,i){const[l,c]=b.useState(!1);we(()=>{if(!e||!o||a==null){c(!1);return}const d=We(a).documentElement.clientWidth,g=a.offsetWidth;c(d>0&&g>0&&g>=d-oN)},[e,o,a]),Pw(e&&(!o||l),i)}const Mm=b.forwardRef(function(o,a){const{anchor:i,positionMethod:l="absolute",className:c,render:d,side:g,align:m,sideOffset:h=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:A=!1,collisionAvoidance:N=GS,style:C,..._}=o,{store:k}=$s(),j=qk(),L=Cm(!0),z=k.useState("parent"),I=k.useState("floatingRootContext"),U=k.useState("floatingTreeRoot"),Y=k.useState("mounted"),B=k.useState("open"),D=k.useState("modal"),M=k.useState("openMethod"),H=k.useState("activeTriggerElement"),ee=k.useState("transitionStatus"),$=k.useState("positionerElement"),P=k.useState("instantType"),q=k.useState("adaptiveOrigin"),K=k.useState("lastOpenChangeReason"),Z=k.useState("floatingNodeId"),Q=k.useState("floatingParentNodeId"),O=I.useState("domReferenceElement"),F=b.useRef(null),J=Ku($);let W=i,se=h,ie=y,me=m,pe=N;z.type==="context-menu"&&(W=i??z.context?.anchor,me=me??"start",!g&&me!=="center"&&(ie=o.alignOffset??2,se=o.sideOffset??-5));let be=g,Ce=me;z.type==="menu"?(be=be??"inline-end",Ce=Ce??"start",pe=o.collisionAvoidance??lm):z.type==="menubar"&&(be=be??(z.context.orientation==="vertical"?"inline-end":"bottom"),Ce=Ce??"start");const Me=z.type==="context-menu",ye=rf({anchor:W,floatingRootContext:I,positionMethod:L?"fixed":l,mounted:Y,side:be,sideOffset:se,align:Ce,alignOffset:ie,arrowPadding:Me?0:w,collisionBoundary:v,collisionPadding:S,sticky:T,nodeId:Z,keepMounted:j,disableAnchorTracking:A,collisionAvoidance:pe,shift:Me?{crossAxis:!("side"in pe&&pe.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:U,adaptiveOrigin:q});b.useEffect(()=>{function Re(ke){ke.open&&(ke.parentNodeId===Z&&k.set("hoverEnabled",!1),ke.nodeId!==Z&&ke.parentNodeId===k.select("floatingParentNodeId")&&k.setOpen(!1,qe(Hr)))}return U.events.on("menuopenchange",Re),()=>{U.events.off("menuopenchange",Re)}},[k,U.events,Z]),b.useEffect(()=>{if(k.select("floatingParentNodeId")==null)return;function Re(ke){if(ke.open||ke.nodeId!==k.select("floatingParentNodeId"))return;const Ie=ke.reason??Hr;k.setOpen(!1,qe(Ie))}return U.events.on("menuopenchange",Re),()=>{U.events.off("menuopenchange",Re)}},[U.events,k]);const ge=on();b.useEffect(()=>{B||ge.clear()},[B,ge]),b.useEffect(()=>{function Re(ke){if(!(!B||ke.nodeId!==k.select("floatingParentNodeId")))if(ke.target&&H&&H!==ke.target){const Ie=k.select("closeDelay");Ie>0?ge.isStarted()||ge.start(Ie,()=>{k.setOpen(!1,qe(Hr))}):k.setOpen(!1,qe(Hr))}else ge.clear()}return U.events.on("itemhover",Re),()=>{U.events.off("itemhover",Re)}},[U.events,B,H,k,ge]),b.useEffect(()=>{const Re={open:B,nodeId:Z,parentNodeId:Q,reason:k.select("lastOpenChangeReason")};U.events.emit("menuopenchange",Re)},[U.events,B,k,Z,Q]),we(()=>{const Re=O,ke=F.current;if(Re&&(F.current=Re),ke&&Re&&Re!==ke){k.set("instantType",void 0);const Ie=new AbortController;return J(()=>{k.set("instantType","trigger-change")},Ie.signal),()=>{Ie.abort()}}},[O,J,k]);const Te={open:B,side:ye.side,align:ye.align,anchorHidden:ye.anchorHidden,nested:z.type==="menu",instant:P},Oe=z.type==="menubar"&&z.context.modal;Nm(B&&(Oe||D&&K!==Ft),M==="touch",$,H);const Ee=lf(o,Te,{styles:ye.positionerStyles,transitionStatus:ee,props:_,refs:[a,k.useStateSetter("positionerElement")],hidden:!Y,inert:!B}),Pe=Y&&z.type!=="menu"&&(z.type!=="menubar"&&D&&K!==Ft||z.type==="menubar"&&z.context.modal);let Se=null;return z.type==="menubar"?Se=z.context.contentElement:z.type===void 0&&(Se=H),p.jsxs(Ow.Provider,{value:ye,children:[Pe&&p.jsx(ff,{ref:z.type==="context-menu"||z.type==="nested-context-menu"?z.context.internalBackdropRef:null,inert:vl(!B),cutout:Se}),p.jsx(JS,{id:Z,children:p.jsx(km,{elementsRef:k.context.itemDomElements,labelsRef:k.context.itemLabels,children:Ee})})]})}),sN=b.createContext(null);function Lw(e){return b.useContext(sN)}function aN(e){const o=b.useRef(""),a=b.useCallback(l=>{l.defaultPrevented||(o.current=l.pointerType,e(l,l.pointerType))},[e]);return{onClick:b.useCallback(l=>{if(l.detail===0){e(l,"keyboard");return}"pointerType"in l?e(l,l.pointerType):e(l,o.current),o.current=""},[e]),onPointerDown:a}}function jm(e,o){const a=b.useRef(e),i=Ne(o);we(()=>{a.current!==e&&i(a.current),a.current=e},[e,i])}function Iw(e,o){const a=Ne((c,d)=>{(typeof e=="function"?e():e)||o(d||(Nu?"touch":""))}),{onClick:i,onPointerDown:l}=aN(a);return b.useMemo(()=>({onClick:i,onPointerDown:l}),[i,l])}function Hw(e){const[o,a]=b.useState(null),i=Iw(e,a);return jm(e,l=>{l&&!e&&a(null)}),b.useMemo(()=>({openMethod:o,triggerProps:i}),[o,i])}const iN={...tf,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,o)=>e.activeIndex===o,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class rN extends Da{constructor(o,a,i=!1){const l=new yl,c=cN(l,a,i,o);super(c,lN(l),iN),this.unsubscribeParentListener=this.observe("parent",d=>{if(this.unsubscribeParentListener?.(),d.type==="menu"){let g=d.store.select("rootId"),m=d.store.select("floatingTreeRoot"),h=d.store.select("keyboardEventRelay");this.unsubscribeParentListener=d.store.subscribe(()=>{const y=d.store.select("rootId"),v=d.store.select("floatingTreeRoot"),S=d.store.select("keyboardEventRelay");g===y&&m===v&&h===S||(g=y,m=v,h=S,this.notifyAll())}),this.context.allowMouseUpTriggerRef=d.store.context.allowMouseUpTriggerRef;return}d.type!==void 0&&(this.context.allowMouseUpTriggerRef=d.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(o,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:o,eventDetails:a})}unsubscribeParentListener=null}function lN(e){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function cN(e,o,a=!1,i){return{...ef(e,o,a),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new cm,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ct,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...i}}const Uw=b.createContext(void 0);function Bw(){return b.useContext(Uw)}const _m=cl(function(o){const{children:a,open:i,onOpenChange:l,onOpenChangeComplete:c,defaultOpen:d=!1,disabled:g=!1,modal:m,loopFocus:h=!0,orientation:y="vertical",actionsRef:v,closeParentOnEsc:S=!1,handle:w,triggerId:T,defaultTriggerId:A=null,highlightItemOnHover:N=!0}=o,C=Cm(!0),_=$s(!0),k=Lw(!0),j=Bw(),L=b.useMemo(()=>j&&_?{type:"menu",store:_.store}:k?{type:"menubar",context:k}:C&&!_?{type:"context-menu",context:C}:{type:void 0},[C,_,k,j]),z=Gs(),I=Gs(),U=Xs(),Y=L.type==="menu"?L.store:void 0,B=(i??d)&&Y?.state.transitionStatus==="starting",D=Zt(()=>B?Y?.state.instantType:void 0).current,M=uN({open:d,openProp:i,activeTriggerId:A,triggerIdProp:T,parent:L,disabled:g,highlightItemOnHover:N,modal:L.type===void 0?m:void 0,rootId:z,instantType:D},I,U!=null);M.useControlledProp("openProp",i),M.useControlledProp("triggerIdProp",T),M.useContextCallback("onOpenChangeComplete",c);const H=M.useState("floatingTreeRoot"),ee=um(H),$=M.useState("open"),P=M.useState("activeTriggerElement"),q=M.useState("positionerElement"),K=M.useState("hoverEnabled"),Z=M.useState("disabled"),Q=M.useState("lastOpenChangeReason"),O=M.useState("parent"),F=M.useState("activeIndex"),J=M.useState("payload"),W=M.useState("floatingParentNodeId"),se=b.useRef(null),ie=b.useRef(O.type!=="context-menu"),me=on(),pe=b.useRef(!0),be=on(),Ce=W!=null,{openMethod:Me,triggerProps:ye}=Hw($);M.useSyncedValues({disabled:g,highlightItemOnHover:N,modal:O.type===void 0?m:void 0,openMethod:Me,rootId:z}),Qu(M);const{forceUnmount:ge,transitionStatus:Te}=Zu($,M,()=>{M.set("allowMouseEnter",!1)},B),Oe=Ku(M.context.popupRef);b.useEffect(()=>{if(D===void 0)return;const Ae=()=>{M.state.instantType===D&&M.set("instantType",void 0)};if(!$){Ae();return}if(Te!==void 0)return;if(M.context.popupRef.current==null){Ae();return}const Ye=new AbortController;return Oe(Ae,Ye.signal),()=>{Ye.abort()}},[D,$,Te,Oe,M]),we(()=>{C&&!_?M.update({parent:{type:"context-menu",context:C},floatingNodeId:ee,floatingParentNodeId:U}):_&&M.update({floatingNodeId:ee,floatingParentNodeId:U})},[C,_,ee,U,M]),b.useEffect(()=>{if($||(se.current=null),O.type==="context-menu"){if(!$){me.clear(),ie.current=!1;return}me.start(500,()=>{ie.current=!0})}},[me,$,O.type]),we(()=>{!$&&!K&&M.set("hoverEnabled",!0)},[$,K,M]);const Be=Ne((Ae,Ye)=>{const Qe=Ye.reason;if(!Ae&&!M.select("open")||$===Ae&&Ye.trigger===P&&Q===Qe)return;const ct=ym(Ye);if(!Ae&&Ye.trigger==null&&(Ye.trigger=P??void 0),l?.(Ae,Ye),Ye.isCanceled)return;M.state.floatingRootContext.dispatchOpenChange(Ae,Ye);const en=Ye.event;if(Ae===!1&&en?.type==="click"&&en.pointerType==="touch"&&!pe.current)return;Ae&&Qe===Ti?(pe.current=!1,be.start(300,()=>{pe.current=!0})):(pe.current=!0,be.clear());const rn=(Qe===os||Qe===Yr)&&en.detail===0,hn=!Ae&&(Qe===pl||Qe==null);se.current=Ye.event;const xt=Wu(M.state,Ae,Ye.trigger,ct());xt.openChangeReason=Qe,O.type==="menubar"&&(Qe===Ti||Qe===Vs||Qe===Ft||Qe===uu||Qe===Hr)?xt.instantType="group":rn||hn?xt.instantType=rn?"click":"dismiss":xt.instantType=void 0,M.update(xt)}),Ee=fw({popupStore:M,floatingRootContext:M.state.floatingRootContext,floatingId:I,nested:U!=null,onOpenChange:Be}),Pe=Ee.context.events;we(()=>{const Ae=({open:Ye,eventDetails:Qe})=>Be(Ye,Qe);return Pe.on("setOpen",Ae),()=>{Pe?.off("setOpen",Ae)}},[Pe,Be]);const Se=b.useCallback(()=>{M.setOpen(!1,qe(Bu))},[M]);b.useImperativeHandle(v,()=>({unmount:ge,close:Se}),[ge,Se]);let Re;O.type==="context-menu"&&(Re=O.context),b.useImperativeHandle(Re?.positionerRef,()=>q,[q]),b.useImperativeHandle(Re?.actionsRef,()=>({setOpen:Be}),[Be]);const ke=ml(Ee,{enabled:!Z,bubbles:{escapeKey:S&&O.type==="menu"},outsidePress(){return O.type!=="context-menu"||se.current?.type==="contextmenu"?!0:ie.current},externalTree:Ce?H:void 0}),Ie=af(),je=b.useCallback(Ae=>{M.select("activeIndex")!==Ae&&M.set("activeIndex",Ae)},[M]),le=bw(Ee,{enabled:!Z,listRef:M.context.itemDomElements,activeIndex:F,nested:O.type!==void 0,loopFocus:h,orientation:y,parentOrientation:O.type==="menubar"?O.context.orientation:void 0,rtl:Ie==="rtl",disabledIndices:ho,onNavigate:je,openOnArrowKeyDown:O.type!=="context-menu",externalTree:Ce?H:void 0,focusItemOnHover:N}),ve=b.useCallback(Ae=>{M.context.typingRef.current=Ae},[M]),he=vw(Ee,{enabled:!Z,listRef:M.context.itemLabels,elementsRef:M.context.itemDomElements,activeIndex:F,resetMs:jO,onMatch:Ae=>{$&&Ae!==F&&M.set("activeIndex",Ae)},onTyping:ve}),ce=b.useMemo(()=>{const Ae=oo(he.reference,le.reference,ke.reference,{onMouseMove(){M.set("allowMouseEnter",!0)}},ye);return Ae["aria-haspopup"]="menu",Ae["aria-expanded"]=$,Ae},[M,he.reference,le.reference,ke.reference,ye,$]),xe=b.useMemo(()=>{const Ae=oo(le.trigger,ke.trigger,ye);return Ae["aria-haspopup"]="menu",Ae["aria-expanded"]=!1,Ae},[le.trigger,ke.trigger,ye]);Zt(()=>(M.update({inactiveTriggerProps:xe}),null));const He=b.useMemo(()=>oo(gl,{id:I,role:"menu","aria-orientation":y==="horizontal"?"horizontal":void 0,"aria-labelledby":P?.id,onMouseMove(){M.set("allowMouseEnter",!0),O.type==="menu"&&M.set("hoverEnabled",!1)},onClick(){M.select("hoverEnabled")&&M.set("hoverEnabled",!1)},onKeyDown(Ae){const Ye=M.select("keyboardEventRelay");Ye&&!Ae.isPropagationStopped()&&Ye(Ae)}},he.floating,le.floating,ke.floating),[P,I,y,O.type,M,he.floating,le.floating,ke.floating]),Lt=le.item??Ct;Ju(M,{floatingRootContext:Ee,activeTriggerProps:ce,inactiveTriggerProps:xe,popupProps:He,itemProps:Lt});const Yt=b.useMemo(()=>({store:M,parent:L}),[M,L]),ut=p.jsxs(kw.Provider,{value:Yt,children:[w&&p.jsx($u,{handle:w,store:M}),typeof a=="function"?a({payload:J}):a]});return O.type===void 0||O.type==="context-menu"?p.jsx(ew,{externalTree:H,children:ut}):ut});function uN(e,o,a){return Zt(()=>new rN(e,o,a)).current}function fN(e){const o=$s().store,a=b.useMemo(()=>({parentMenu:o}),[o]);return p.jsx(Uw.Provider,{value:a,children:p.jsx(_m,{...e})})}const Wc=5;function Fw(e,o){const a=dN(o);return e.clientX>=a.left-Wc&&e.clientX<=a.right+Wc&&e.clientY>=a.top-Wc&&e.clientY<=a.bottom+Wc}function dN(e){const o=e.getBoundingClientRect(),a=Rt(e);if(Xh)return o;const i=a.getComputedStyle(e,"::before"),l=a.getComputedStyle(e,"::after");if(!(i.content!=="none"||l.content!=="none"))return o;const d=parseFloat(i.width)||0,g=parseFloat(i.height)||0,m=parseFloat(l.width)||0,h=parseFloat(l.height)||0,y=Math.max(o.width,d,m),v=Math.max(o.height,g,h),S=y-o.width,w=v-o.height;return{left:o.left-S/2,right:o.right+S/2,top:o.top-w/2,bottom:o.bottom+w/2}}function pN(e={}){const{highlightItemOnHover:o,highlightedIndex:a,onHighlightedIndexChange:i}=Rm(),{ref:l,index:c}=cf(e),d=a===c,g=b.useRef(null),m=ss(l,g);return{compositeProps:{tabIndex:d?0:-1,onFocus(){i(c)},onMouseMove(){const y=g.current;if(!o||!y)return;const v=y.hasAttribute("disabled")||y.ariaDisabled==="true";!d&&!v&&y.focus()}},compositeRef:m,index:c}}function Vw(e){const{render:o,className:a,style:i,state:l=Ct,props:c=ho,refs:d=ho,metadata:g,stateAttributesMapping:m,tag:h="div",...y}=e,{compositeProps:v,compositeRef:S}=pN({metadata:g});return nt(h,e,{state:l,ref:[S,...d],props:[v,...c,y],stateAttributesMapping:m})}function Yw(e){if(vt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Wo(e))return Yw(ts(e))}function qw(e,o){const a=b.useRef(null);function i(c){so.flushSync(()=>{e.setOpen(!1,qe(Vs,c.nativeEvent,c.currentTarget))}),pO(a.current)?.focus()}function l(c){const d=e.select("positionerElement");if(d&&Ci(c,d))e.context.beforeContentFocusGuardRef.current?.focus();else{so.flushSync(()=>{e.setOpen(!1,qe(Vs,c.nativeEvent,c.currentTarget))});let g=dO(e.context.triggerFocusTargetRef.current||o.current);for(;g!==null&&De(d,g);){const m=g;if(g=sm(g),g===m)break}g?.focus()}}return{preFocusGuardRef:a,handlePreFocusGuardFocus:i,handleFocusTargetFocus:l}}function hN(e){const{enabled:o=!0,mouseDownAction:a,open:i}=e,l=b.useRef(!1);return b.useMemo(()=>o?{onMouseDown:c=>{(a==="open"&&!i||a==="close"&&i)&&(l.current=!0,We(c.currentTarget).addEventListener("click",()=>{l.current=!1},{once:!0}))},onClick:c=>{l.current&&(l.current=!1,c.preventBaseUIHandler())}}:Ct,[o,a,i])}const Gw=qh(function(o,a){const{render:i,className:l,style:c,disabled:d=!1,nativeButton:g=!0,id:m,openOnHover:h,delay:y=100,closeDelay:v=0,handle:S,payload:w,...T}=o,A=$s(!0),C=xm(S)??A?.store;if(!C)throw new Error(kt(85));const _=mo(m),k=C.useState("isTriggerActive",_),j=C.useState("floatingRootContext"),L=C.useState("isOpenedByTrigger",_),z=C.useState("triggerPopupId",_),I=b.useRef(null),U=gN(),Y=Rm(!0),B=Ks(),D=b.useMemo(()=>B??new cm,[B]),M=um(D),H=Xs(),{registerTrigger:ee,isMountedByThisTrigger:$}=bm(_,I,C,{payload:w,closeDelay:v,parent:U,floatingTreeRoot:D,floatingNodeId:M,floatingParentNodeId:H,keyboardEventRelay:Y?.relayKeyboardEvent}),P=U.type==="menubar",q=C.useState("disabled"),K=d||q||P&&U.context.disabled,{getButtonProps:Z,buttonRef:Q}=Co({disabled:K,native:g});b.useEffect(()=>{!L&&U.type===void 0&&(C.context.allowMouseUpTriggerRef.current=!1)},[C,L,U.type]);const O=b.useRef(null),F=on(),J=Ne(Re=>{if(!O.current)return;F.clear(),C.context.allowMouseUpTriggerRef.current=!1;const ke=Re.target;De(O.current,ke)||De(C.select("positionerElement"),ke)||ke===O.current||ke!=null&&Yw(ke)===C.select("rootId")||Fw(Re,O.current)||D.events.emit("close",{domEvent:Re,reason:xS})});b.useEffect(()=>{L&&C.select("lastOpenChangeReason")===Ft&&We(O.current).addEventListener("mouseup",J,{once:!0})},[L,J,C]);const W=P&&U.context.hasSubmenuOpen,ie=nf(j,{enabled:(h??W)&&!K&&(!P||W&&!$),handleClose:sf({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:U.type===void 0?y:void 0,delay:{close:v},triggerElementRef:I,externalTree:D,isActiveTrigger:k,isClosing:()=>C.select("transitionStatus")==="ending"}),me=mN(L,C.select("lastOpenChangeReason")),pe=Gu(j,{enabled:!K,event:L&&P?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:U.type===void 0?me:!1}),be=gw(j,{enabled:!K&&W}),Ce=hN({open:L,enabled:P,mouseDownAction:"open"}),Me=b.useMemo(()=>oo(be.reference,pe.reference),[be.reference,pe.reference]),ye=C.useState("triggerProps",$),{preFocusGuardRef:ge,handlePreFocusGuardFocus:Te,handleFocusTargetFocus:Oe}=qw(C,I),Be={disabled:K,open:L},Ee=[O,a,Q,ee,I],Pe=[Me,ie??Ct,ye,{"aria-haspopup":"menu","aria-controls":z,id:_,onMouseDown:Re=>{if(C.select("open"))return;F.start(200,()=>{C.context.allowMouseUpTriggerRef.current=!0}),We(Re.currentTarget).addEventListener("mouseup",J,{once:!0})}},P?{role:"menuitem"}:{},Ce,T,Z],Se=nt("button",o,{enabled:!P,stateAttributesMapping:iu,state:Be,ref:Ee,props:Pe});return P?p.jsx(Vw,{tag:"button",render:i,className:l,style:c,state:Be,refs:Ee,props:Pe,stateAttributesMapping:iu}):L?p.jsxs(b.Fragment,{children:[p.jsx(as,{ref:ge,onFocus:Te},`${_}-pre-focus-guard`),p.jsx(b.Fragment,{children:Se},_),p.jsx(as,{ref:C.context.triggerFocusTargetRef,onFocus:Oe},`${_}-post-focus-guard`)]}):p.jsx(b.Fragment,{children:Se},_)});function mN(e,o){const a=on(),[i,l]=b.useState(!1);return we(()=>{e&&o===Ft?(l(!0),a.start(YS,()=>{l(!1)})):e||(a.clear(),l(!1))},[e,o,a]),i}function gN(){const e=Lw();return b.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const yN=b.forwardRef(function(o,a){const{className:i,render:l,orientation:c="horizontal",style:d,...g}=o;return nt("div",o,{state:{orientation:c},ref:a,props:[{role:"separator","aria-orientation":c},g]})});function Xw(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const bN={"aria-expanded":void 0},vN=b.forwardRef(function(o,a){const{render:i,className:l,style:c,label:d,id:g,nativeButton:m=!1,openOnHover:h=!0,delay:y=100,closeDelay:v=0,disabled:S=!1,...w}=o,T=Bw();if(!T?.parentMenu)throw new Error(kt(37));const A=cf({guess:!0,label:d}),N=Em(),{store:C}=$s(),_=mo(g),k=C.useState("open"),j=C.useState("floatingRootContext"),L=C.useState("floatingTreeRoot"),z=C.useState("triggerPopupId",_),I=pw(_,C),U=Ne(Me=>{I(Me),Me!==null&&C.select("open")&&C.select("activeTriggerId")==null&&C.update({activeTriggerId:_??null,activeTriggerElement:Me,closeDelay:v})}),Y=b.useRef(null),B=b.useCallback(Me=>{Y.current=Me,C.set("activeTriggerElement",Me)},[C]);we(()=>(U(Y.current),()=>U(null)),[U,_,C]),C.useSyncedValue("closeDelay",v);const D=T.parentMenu,M=C.useState("disabled"),H=D.useState("disabled"),ee=S||M||H,$=D.useState("itemProps"),P=D.useState("isActive",A.index),q=b.useMemo(()=>({type:"submenu-trigger",setActive(){D.select("highlightItemOnHover")&&D.set("activeIndex",A.index)}}),[D,A.index]),{getItemProps:K,itemRef:Z}=Mw({closeOnClick:!1,disabled:ee,highlighted:P,id:_,store:C,typingRef:D.context.typingRef,nativeButton:m,itemMetadata:q,nodeId:N?.context.nodeId}),Q=C.useState("hoverEnabled"),O=nf(j,{enabled:Q&&h&&!ee,handleClose:sf({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:y,delay:{open:y,close:v},shouldOpen:y>0?()=>D.select("allowMouseEnter"):void 0,triggerElementRef:Y,externalTree:L,isClosing:()=>C.select("transitionStatus")==="ending",guardStaleOpen:!0}),J=Gu(j,{enabled:!ee,event:"mousedown",toggle:!h,ignoreMouse:h,stickIfOpen:!1}).reference??Ct,W=C.useState("triggerProps",!0);delete W.id;const se={disabled:ee,highlighted:P,open:k},ie=C.useState("openMethod"),pe=C.useState("lastOpenChangeReason")===uu||ie==="keyboard";return nt("div",o,{state:se,stateAttributesMapping:Lu,props:[J,O,W,$,k&&pe&&dS?bN:void 0,{"aria-controls":z,tabIndex:k||P?0:-1,onBlur(){P&&D.set("activeIndex",null)}},w,K],ref:[a,A.ref,Z,U,B]})});const xN=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function SN(e,o,a=[]){if(o==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:xN(e),size:24,node:o,...a.length>0?{aliases:a}:{}}}const wN=e=>{let o="",a=!1;for(const i of e){if(i==="-"||i==="_"||i<=" "){a=o.length>0;continue}o.length===0?o+=i.toLowerCase():o+=a?i.toUpperCase():i,a=!1}return o};const TN=e=>{const o=wN(e);return o.charAt(0).toUpperCase()+o.slice(1)};const Nh=(...e)=>e.filter((o,a,i)=>!!o&&o.trim()!==""&&i.indexOf(o)===a).join(" ").trim();const ya={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Jp(e){return e!=null}function EN(e,o={}){const a=o.attributeNames??{},i=S=>a[S]??S,l=e.size??e.width??ya.width,c=e.size??e.height??ya.height,d=e.aliases?.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`)??[],g=[...e.name?[`lucide-${e.name}`]:[],...d],m=o.className?.split(" ").filter(Boolean)??[],h=o.includeDefaultClasses===!1?Nh(...m):Nh("lucide",...g,...m),y=o.absoluteStrokeWidth?Number(o.strokeWidth??ya["stroke-width"])*Number(e.size??e.width??ya.width)/Number(o.size??o.width??ya.width):o.strokeWidth??ya["stroke-width"];return["svg",{...Object.entries(ya).reduce((S,[w,T])=>(S[i(w)]=T,S),{}),..."color"in o&&o.color&&{[i("stroke")]:o.color},..."size"in o&&Jp(o.size)&&{[i("width")]:o.size,[i("height")]:o.size},..."width"in o&&Jp(o.width)&&{[i("width")]:o.width},..."height"in o&&Jp(o.height)&&{[i("height")]:o.height},[i("stroke-width")]:y,...h&&{[i("class")]:h},[i("viewBox")]:`0 0 ${l} ${c}`,...o.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in o&&o.attributes},e.node.map(S=>{const[w,T,A]=S,N=o.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...T}:T;return A?[w,N,A]:[w,N]})]}function CN(e,o={}){return EN(e,{...o,attributeNames:{...o.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const RN=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},AN=b.createContext({}),ON=()=>b.useContext(AN),kN=b.forwardRef(({color:e,size:o,width:a,height:i,strokeWidth:l,absoluteStrokeWidth:c,nonScalingStroke:d,className:g="",children:m,iconNode:h=[],icon:y={node:h,aliases:[],size:24},...v},S)=>{const{size:w=24,strokeWidth:T=2,absoluteStrokeWidth:A=!1,nonScalingStroke:N=!1,color:C="currentColor",className:_=""}=ON()??{},k=!!m||RN(v),[j,L,z=[]]=CN(y,{color:e??C,width:a??o??w,height:i??o??w,strokeWidth:l??T,absoluteStrokeWidth:c??A,nonScalingStroke:d??N,className:Nh(_,g),hasA11yProp:k,attributes:v});return b.createElement(j,{ref:S,...L},[...z.map(([I,U])=>b.createElement(I,U)),...Array.isArray(m)?m:[m]])});function Ue(e,o=[],a=[]){const i=typeof e=="string"?SN(e,o,a):e,l=b.forwardRef(({className:c,...d},g)=>b.createElement(kN,{ref:g,icon:i,className:c,...d}));return i.name&&(l.displayName=TN(i.name)),l}const Kw={name:"building-complex",size:24,node:[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],aliases:["building-2"]};Kw.node;const NN=Ue(Kw);const $w={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};$w.node;const Li=Ue($w);const Ww={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Ww.node;const ka=Ue(Ww);const Qw={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Qw.node;const Dm=Ue(Qw);const Zw={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Zw.node;const MN=Ue(Zw);const Jw={name:"cloud-alert",size:24,node:[["path",{d:"M12 12v4",key:"tww15h"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.128 16.949A7 7 0 1 1 15.71 8h1.79a1 1 0 0 1 0 9h-1.642",key:"1namsd"}]]};Jw.node;const jN=Ue(Jw);const eT={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};eT.node;const zm=Ue(eT);const tT={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};tT.node;const nT=Ue(tT);const oT={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};oT.node;const sT=Ue(oT);const aT={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};aT.node;const tl=Ue(aT);const iT={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};iT.node;const _N=Ue(iT);const rT={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};rT.node;const lT=Ue(rT);const cT={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};cT.node;const DN=Ue(cT);const uT={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};uT.node;const Sl=Ue(uT);const fT={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};fT.node;const zN=Ue(fT);const dT={name:"file-plus",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};dT.node;const PN=Ue(dT);const pT={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};pT.node;const LN=Ue(pT);const hT={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};hT.node;const IN=Ue(hT);const mT={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};mT.node;const gT=Ue(mT);const yT={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};yT.node;const Pm=Ue(yT);const bT={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};bT.node;const HN=Ue(bT);const vT={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};vT.node;const xT=Ue(vT);const ST={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};ST.node;const Lm=Ue(ST);const wT={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};wT.node;const UN=Ue(wT);const TT={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};TT.node;const ao=Ue(TT);const ET={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};ET.node;const BN=Ue(ET);const CT={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};CT.node;const pf=Ue(CT);const RT={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};RT.node;const FN=Ue(RT);const AT={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};AT.node;const Im=Ue(AT);const OT={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};OT.node;const Hm=Ue(OT);const kT={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};kT.node;const VN=Ue(kT);const NT={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};NT.node;const YN=Ue(NT);const MT={name:"pencil",size:24,node:[["path",{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-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};MT.node;const Um=Ue(MT);const jT={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};jT.node;const qN=Ue(jT);const _T={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};_T.node;const GN=Ue(_T);const DT={name:"play",size:24,node:[["path",{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",key:"10ikf1"}]]};DT.node;const XN=Ue(DT);const zT={name:"presentation",size:24,node:[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]};zT.node;const KN=Ue(zT);const PT={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};PT.node;const $N=Ue(PT);const LT={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};LT.node;const WN=Ue(LT);const IT={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};IT.node;const HT=Ue(IT);const UT={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};UT.node;const BT=Ue(UT);const FT={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};FT.node;const QN=Ue(FT);const VT={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};VT.node;const ZN=Ue(VT);const YT={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};YT.node;const JN=Ue(YT);const qT={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};qT.node;const eM=Ue(qT);const GT={name:"share",size:24,node:[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]};GT.node;const tM=Ue(GT);const XT={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};XT.node;const KT=Ue(XT);const $T={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};$T.node;const wl=Ue($T);const WT={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};WT.node;const nM=Ue(WT);const QT={name:"user-check",size:24,node:[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};QT.node;const oM=Ue(QT);const ZT={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};ZT.node;const Br=Ue(ZT);const JT={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};JT.node;const sM=Ue(JT);const e1={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};e1.node;const Tl=Ue(e1),Mh=500,aM=8;function iM(e,o,a){return a<e.at||a-e.at>Mh?!1:Math.hypot(o.clientX-e.x,o.clientY-e.y)<=aM}const o0=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"];function rM(e,o,a=Date.now){let i=!1,l=!1,c=0;const d=()=>{if(!l){l=!0,e.clearTimeout(c);for(const h of o0)e.removeEventListener(h,m,!0)}},g=()=>{i?c=e.setTimeout(g,Mh):d()},m=h=>{const y=h.type==="pointerdown"||h.type==="mousedown";!(i&&!y)&&!iM(o,h,a())||(h.preventDefault(),h.stopImmediatePropagation(),y?i=!0:(h.type==="click"||h.type==="dblclick")&&(i=!1))};for(const h of o0)e.addEventListener(h,m,!0);return c=e.setTimeout(g,Math.max(0,Mh-(a()-o.at))),d}function lM(e){e.detail<1||!e.view||rM(e.view,{x:e.clientX,y:e.clientY,at:Date.now()})}const Bm="rounded-lg bg-surface p-1 text-[13px] text-fg shadow-popup outline-none origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0",t1="flex h-7 min-w-40 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover data-[disabled]:opacity-40";function nl({trigger:e,children:o,side:a="bottom",align:i="start",open:l,onOpenChange:c}){return p.jsxs(_m,{open:l,onOpenChange:c?d=>c(d):void 0,children:[p.jsx(Gw,{render:e,onKeyDown:Mi}),p.jsx(Om,{children:p.jsx(Mm,{side:a,align:i,sideOffset:6,className:"z-[1000]",children:p.jsx(Am,{className:Bm,children:o})})})]})}function Nt({children:e,onSelect:o,icon:a,shortcut:i,disabled:l,danger:c}){return p.jsxs(_w,{className:lt(t1,c&&"text-danger"),disabled:l,onClick:d=>{lM(d.nativeEvent),o?.()},onKeyDown:Mi,children:[p.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:a}),p.jsx("span",{className:"flex-1",children:e}),i?p.jsx("span",{className:"ml-4 text-xs text-fg-subtle",children:i}):null]})}function Ko(){return p.jsx(yN,{className:"mx-1 my-1 h-px bg-line"})}function ji({children:e}){return p.jsx("div",{className:"px-2 py-1 text-xs text-fg-subtle",children:e})}function s0({label:e,icon:o,children:a}){return p.jsxs(fN,{children:[p.jsxs(vN,{className:t1,onKeyDown:Mi,children:[p.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:o}),p.jsx("span",{className:"flex-1",children:e}),p.jsx(Dm,{className:"size-3.5 text-fg-subtle"})]}),p.jsx(Om,{children:p.jsx(Mm,{sideOffset:4,className:"z-[1000]",children:p.jsx(Am,{className:Bm,children:a})})})]})}const n1=b.createContext(void 0);function Pa(e){const o=b.useContext(n1);if(!e&&o===void 0)throw new Error(kt(27));return o}const cM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,forceRender:d=!1,...g}=o,m=Pa(),h=m.useState("open"),y=m.useState("nested"),v=m.useState("mounted"),S=m.useState("transitionStatus");return nt("div",o,{state:{open:h,transitionStatus:S},ref:[m.context.backdropRef,a],stateAttributesMapping:Iu,props:[{role:"presentation",hidden:!v,style:{userSelect:"none",WebkitUserSelect:"none"}},g],enabled:d||!y})}),uM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,disabled:d=!1,nativeButton:g=!0,...m}=o,h=Pa(),y=h.useState("open"),{getButtonProps:v,buttonRef:S}=Co({disabled:d,native:g}),w={disabled:d};function T(A){y&&h.setOpen(!1,qe(vS,A.nativeEvent))}return nt("button",o,{state:w,ref:[a,S],props:[{onClick:T},m,v]})}),fM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,...g}=o,m=Pa(),h=mo(d);return m.useSyncedValueWithCleanup("descriptionElementId",h),nt("p",o,{ref:a,props:[{id:h},g]})}),o1=b.createContext(void 0);function dM(){const e=b.useContext(o1);if(e===void 0)throw new Error(kt(26));return e}const pM="--nested-dialogs",hM="data-nested-dialog-open",mM={...dl,...fl,nestedDialogOpen(e){return e?{[hM]:""}:null}},gM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,finalFocus:d,initialFocus:g,...m}=o,h=Pa(),y=h.useState("descriptionElementId"),v=h.useState("disablePointerDismissal"),S=h.useState("floatingRootContext"),w=h.useState("popupProps"),T=h.useState("modal"),A=h.useState("mounted"),N=h.useState("nested"),C=h.useState("nestedOpenDialogCount"),_=h.useState("open"),k=h.useState("openMethod"),j=h.useState("titleElementId"),L=h.useState("transitionStatus"),z=h.useState("role"),I=S.useState("floatingId");dM(),fs({open:_,ref:h.context.popupRef,onComplete(){_&&h.context.onOpenChangeComplete?.(!0)}});const U=g===void 0?dw(h.context.popupRef):g,Y=C>0,B=h.useStateSetter("popupElement"),M=nt("div",o,{state:{open:_,nested:N,transitionStatus:L,nestedDialogOpen:Y},props:[w,{id:I,"aria-labelledby":j,"aria-describedby":y,role:z,...gl,hidden:!A,onKeyDown(H){xl.has(H.key)&&H.stopPropagation()},style:{[pM]:C}},m],ref:[a,h.context.popupRef,B],stateAttributesMapping:mM});return p.jsx(qu,{context:S,openInteractionType:k,disabled:!A,closeOnFocusOut:!v,initialFocus:U,returnFocus:d,modal:T!==!1,restoreFocus:"popup",children:M})}),yM=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o,c=Pa(),d=c.useState("mounted"),g=c.useState("modal"),m=c.useState("open");return d||i?p.jsx(o1.Provider,{value:i,children:p.jsxs(Yu,{ref:a,...l,children:[d&&g===!0&&p.jsx(ff,{ref:c.context.internalBackdropRef,inert:vl(!m)}),o.children]})}):null});function bM({store:e,parentContext:o,isDrawer:a}){const i=e.useState("open"),l=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),g=e.useState("floatingRootContext"),[m,h]=b.useState(0),[y,v]=b.useState(0),S=m===0,w=ml(g,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(T){if(!e.context.outsidePressEnabledRef.current||"button"in T&&T.button!==0)return!1;if("touches"in T){if(T.type==="touchend"){if(T.changedTouches.length!==1||T.touches.length!==0)return!1}else if(T.touches.length!==1)return!1}const A=Pt(T);if(S&&!l){if(c){const N=e.context.internalBackdropRef.current,C=e.context.backdropRef.current;return N||C?N===A||C===A||De(A,d)&&!A?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return Pw(i&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(T,A)=>{h(T),v(A)}),we(()=>(o?.onNestedDialogOpen&&(i?o.onNestedDialogOpen(m+1,y+(a?1:0)):o.onNestedDialogOpen(0,0)),()=>{o?.onNestedDialogOpen&&i&&o.onNestedDialogOpen(0,0)}),[a,i,m,y,o]),Ju(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:m,nestedOpenDrawerCount:y}),null}const vM={...tf,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class xM extends Da{constructor(o,a,i){const l=new yl,c=SM(o,l,a,i);super(c,wM(l),vM)}setOpen=(o,a)=>{a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!o&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(o,a),!a.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(o,a),this.update(Wu(this.state,o,a.trigger)))}}function SM(e,o,a,i=!1){return{...ef(o,a,i),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function wM(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function TM(e,o){const{children:a,open:i,defaultOpen:l=!1,onOpenChange:c,onOpenChangeComplete:d,disablePointerDismissal:g=!1,modal:m=!0,actionsRef:h,handle:y,triggerId:v,defaultTriggerId:S=null}=o,w=e==="drawer",T=m,A=g,N="dialog",C=Pa(!0),_=C!=null,k={modal:T,disablePointerDismissal:A,nested:_,role:N},j=gm((B,D)=>new xM({open:l,openProp:i,activeTriggerId:S,triggerIdProp:v,...k},B,D),!0);j.useControlledProp("openProp",i),j.useControlledProp("triggerIdProp",v),j.useSyncedValues(k),j.useContextCallback("onOpenChange",c),j.useContextCallback("onOpenChangeComplete",d);const L=j.useState("open"),z=j.useState("mounted"),I=j.useState("payload");hw(j,L),Qu(j);const{forceUnmount:U}=Zu(L,j);b.useImperativeHandle(h,()=>({unmount:U,close:()=>j.setOpen(!1,qe(Bu))}),[U,j]);const Y=L||z;return p.jsxs(n1.Provider,{value:j,children:[y&&p.jsx($u,{handle:y,store:j}),Y&&p.jsx(bM,{store:j,parentContext:C?.context,isDrawer:w}),typeof a=="function"?a({payload:I}):a]})}const EM=cl(function(o){return TM("dialog",o)}),CM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,...g}=o,m=Pa(),h=mo(d);return m.useSyncedValueWithCleanup("titleElementId",h),nt("h2",o,{ref:a,props:[{id:h},g]})}),s1=b.createContext(void 0);function Ii(e){const o=b.useContext(s1);if(o===void 0&&!e)throw new Error(kt(47));return o}const RM={...tf,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class AM extends Da{constructor(o,a,i){const l=new yl;super(OM(o,l,a,i),kM(l),RM)}setOpen=(o,a)=>{const i=a.reason===Ft,l=a.reason===os&&a.event.detail===0,c=!o&&(a.reason===pl||a.reason==null),d=ym(a),g=this.select("activeTriggerId");if(!o&&a.reason===vS&&a.trigger==null&&g!=null&&(a.trigger=this.context.triggerElements.getById(g)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(o,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(o,a);const m=()=>{const y=Wu(this.state,o,a.trigger,d());y.openChangeReason=a.reason,this.update(y)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(YS,()=>{this.set("stickIfOpen",!1)}),so.flushSync(m)):m();let h;l?h="click":c?h="dismiss":a.reason===Vs&&(h="focus"),this.set("instantType",h)}}function OM(e,o,a,i=!1){const l={...ef(o,a,i),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return l.open&&e?.mounted===void 0&&(l.mounted=!0),l}function kM(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new Mn,triggerElements:e}}const a0=cl(function({props:o}){const{children:a,open:i,defaultOpen:l=!1,onOpenChange:c,onOpenChangeComplete:d,modal:g=!1,handle:m,triggerId:h,defaultTriggerId:y=null}=o,v=MM(m,{modal:g,open:l,openProp:i,activeTriggerId:y,triggerIdProp:h});v.useControlledProp("openProp",i),v.useControlledProp("triggerIdProp",h);const S=v.useState("open"),w=v.useState("mounted"),T=v.useState("payload");v.useContextCallback("onOpenChange",c),v.useContextCallback("onOpenChangeComplete",d),hw(v,S),Qu(v);const{forceUnmount:A}=Zu(S,v,()=>{v.update({stickIfOpen:!0,openChangeReason:null})});v.useSyncedValues({modal:g}),b.useEffect(()=>{S||v.context.stickIfOpenTimeout.clear()},[v,S]),b.useImperativeHandle(o.actionsRef,()=>({unmount:A,close:()=>v.setOpen(!1,qe(Bu))}),[A,v]);const N=S||w;return p.jsxs(s1.Provider,{value:v,children:[m&&p.jsx($u,{handle:m,store:v}),N&&p.jsx(jM,{store:v,modal:g}),typeof a=="function"?a({payload:T}):a]})});function NM(e){return Ii(!0)?p.jsx(a0,{props:e}):p.jsx(ew,{children:p.jsx(a0,{props:e})})}function MM(e,o){const a=gm((i,l)=>new AM(o,i,l));return b.useEffect(()=>a.context.stickIfOpenTimeout.disposeEffect(),[a]),a}function jM({store:e,modal:o}){const a=e.useState("floatingRootContext"),i=ml(a,{outsidePressEvent:{mouse:o==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),l=i.reference,c=i.floating;return Ju(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:c}),null}const _M=300,DM=qh(function(o,a){const{render:i,className:l,style:c,disabled:d=!1,nativeButton:g=!0,handle:m,payload:h,openOnHover:y=!1,delay:v=_M,closeDelay:S=0,id:w,...T}=o,A=Ii(!0),C=xm(m)??A;if(!C)throw new Error(kt(74));const _=mo(w),k=C.useState("isTriggerActive",_),j=C.useState("floatingRootContext"),L=C.useState("isOpenedByTrigger",_),z=C.useState("triggerPopupId",_),I=b.useRef(null),{registerTrigger:U,isMountedByThisTrigger:Y}=bm(_,I,C,{payload:h,disabled:d,openOnHover:y,closeDelay:S}),B=C.useState("openChangeReason"),D=C.useState("stickIfOpen"),M=C.useState("openMethod"),H=C.useState("focusManagerModal"),ee=nf(j,{enabled:!d&&y&&(M!=="touch"||B!==os),mouseOnly:!0,move:!1,handleClose:sf(),restMs:v,delay:{close:S},triggerElementRef:I,isActiveTrigger:k,isClosing:()=>C.select("transitionStatus")==="ending"}),$=Gu(j,{stickIfOpen:D}),P=Iw(()=>C.select("open"),me=>{C.set("openMethod",me)}),q=C.useState("triggerProps",Y),{getButtonProps:K,buttonRef:Z}=Co({disabled:d,native:g}),Q={open(me){return me&&B===os?iu.open(me):Lu.open(me)}},{preFocusGuardRef:O,handlePreFocusGuardFocus:F,handleFocusTargetFocus:J}=qw(C,I),se=nt("button",o,{state:{disabled:d,open:L},ref:[Z,a,U,I],props:[$.reference,ee,q,P,{[qS]:"",id:_,"aria-haspopup":"dialog","aria-expanded":L,"aria-controls":z},T,K],stateAttributesMapping:Q}),ie=p.jsx(b.Fragment,{children:se},_);return Y&&!H?p.jsxs(b.Fragment,{children:[p.jsx(as,{ref:O,onFocus:F}),ie,p.jsx(as,{ref:C.context.triggerFocusTargetRef,onFocus:J})]}):ie}),a1=b.createContext(void 0);function zM(){const e=b.useContext(a1);if(e===void 0)throw new Error(kt(45));return e}const PM=b.forwardRef(function(o,a){const{keepMounted:i=!1,...l}=o;return Ii().useState("mounted")||i?p.jsx(a1.Provider,{value:i,children:p.jsx(Yu,{ref:a,...l})}):null}),i1=b.createContext(void 0);function r1(){const e=b.useContext(i1);if(!e)throw new Error(kt(46));return e}const LM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,anchor:d,positionMethod:g,side:m,align:h,sideOffset:y,alignOffset:v,collisionBoundary:S="clipping-ancestors",collisionPadding:w,arrowPadding:T,sticky:A,disableAnchorTracking:N=!1,collisionAvoidance:C=lm,..._}=o,k=Ii(),j=zM(),L=um(),z=k.useState("floatingRootContext"),I=k.useState("mounted"),U=k.useState("open"),Y=k.useState("openChangeReason"),B=k.useState("activeTriggerElement"),D=k.useState("modal"),M=k.useState("openMethod"),H=k.useState("positionerElement"),ee=k.useState("instantType"),$=k.useState("transitionStatus"),P=k.useState("adaptiveOrigin"),q=b.useRef(null),K=Ku(H),Z=rf({anchor:d,floatingRootContext:z,positionMethod:g,mounted:I,side:m,sideOffset:y,align:h,alignOffset:v,arrowPadding:T,collisionBoundary:S,collisionPadding:w,sticky:A,disableAnchorTracking:N,keepMounted:j,nodeId:L,collisionAvoidance:C,adaptiveOrigin:P}),Q=z.useState("domReferenceElement");we(()=>{const se=Q,ie=q.current;if(se&&(q.current=se),ie&&se&&se!==ie){k.set("instantType",void 0);const me=new AbortController;return K(()=>{k.set("instantType","trigger-change")},me.signal),()=>{me.abort()}}},[Q,K,k]);const O=D===!0&&Y!==Ft;Nm(U&&O,M==="touch",H,B);const F=k.useStateSetter("positionerElement"),J={open:U,side:Z.side,align:Z.align,anchorHidden:Z.anchorHidden,instant:ee},W=lf(o,J,{styles:Z.positionerStyles,transitionStatus:$,props:_,refs:[a,F],hidden:!I,inert:!U});return p.jsxs(i1.Provider,{value:Z,children:[I&&O&&p.jsx(ff,{inert:vl(!U),cutout:B}),p.jsx(JS,{id:L,children:W})]})}),IM=b.createContext(void 0);function HM(){const[e,o]=b.useState(0),a=Ne(()=>(o(l=>l+1),()=>{o(l=>Math.max(0,l-1))}));return{context:b.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}const UM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,initialFocus:d,finalFocus:g,...m}=o,h=Ii(),y=r1(),v=uf()!=null,{context:S,hasClosePart:w}=HM(),T=h.useState("open"),A=h.useState("openMethod"),N=h.useState("instantType"),C=h.useState("transitionStatus"),_=h.useState("popupProps"),k=h.useState("titleElementId"),j=h.useState("descriptionElementId"),L=h.useState("modal"),z=h.useState("mounted"),I=h.useState("openChangeReason"),U=h.useState("activeTriggerElement"),Y=h.useState("floatingRootContext"),B=Y.useState("floatingId"),D=h.useState("disabled"),M=h.useState("openOnHover"),H=h.useState("closeDelay");fs({open:T,ref:h.context.popupRef,onComplete(){T&&h.context.onOpenChangeComplete?.(!0)}}),Tm(Y,{enabled:M&&!D,closeDelay:H});const ee=d===void 0?dw(h.context.popupRef):d,$=L!==!1&&w;h.useSyncedValue("focusManagerModal",$);const P=h.useStateSetter("popupElement"),q={open:T,side:y.side,align:y.align,instant:N,transitionStatus:C},K=nt("div",o,{state:q,ref:[a,h.context.popupRef,P],props:[_,{id:B,role:"dialog",...gl,"aria-labelledby":k,"aria-describedby":j,onKeyDown(Z){v&&xl.has(Z.key)&&Z.stopPropagation()}},bl(C),m],stateAttributesMapping:Iu});return p.jsx(qu,{context:Y,openInteractionType:A,modal:$,disabled:!z||I===Ft,initialFocus:ee,returnFocus:g,restoreFocus:"popup",previousFocusableElement:vt(U)?U:void 0,nextFocusableElement:h.context.triggerFocusTargetRef,beforeContentFocusGuardRef:h.context.beforeContentFocusGuardRef,children:p.jsx(IM.Provider,{value:S,children:K})})}),BM=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,m=Ii().useState("open"),{arrowRef:h,side:y,align:v,arrowUncentered:S,arrowStyles:w}=r1();return nt("div",o,{state:{open:m,side:y,align:v,uncentered:S},ref:[a,h],props:[{style:w,"aria-hidden":!0},d],stateAttributesMapping:dl})});function l1({open:e,onOpenChange:o,title:a,description:i,children:l,footer:c,className:d}){return p.jsx(EM,{open:e,onOpenChange:g=>o(g),children:p.jsxs(yM,{children:[p.jsx(cM,{className:"fixed inset-0 z-[900] bg-black/30 transition-opacity data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"}),p.jsxs(gM,{className:lt("fixed left-1/2 top-1/2 z-[901] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-surface p-5 text-fg shadow-popup outline-none","transition-[opacity,transform] data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",d),children:[p.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[p.jsxs("div",{className:"flex-1",children:[p.jsx(CM,{className:"text-[15px] font-semibold",children:a}),i?p.jsx(fM,{className:"mt-1 text-fg-muted",children:i}):null]}),p.jsx(uM,{"aria-label":"Close",className:"rounded-md p-1 text-fg-muted hover:bg-hover",children:p.jsx(Tl,{className:"size-4"})})]}),l,c?p.jsx("div",{className:"mt-4 flex justify-end gap-2",children:c}):null]})]})})}function FM({open:e,onOpenChange:o,title:a,description:i,confirmLabel:l="Confirm",danger:c,onConfirm:d}){return p.jsx(l1,{open:e,onOpenChange:o,title:a,description:i,footer:p.jsxs(p.Fragment,{children:[p.jsx(tt,{onClick:()=>o(!1),children:"Cancel"}),p.jsx(tt,{variant:c?"danger":"primary",onClick:()=>{d(),o(!1)},children:l})]})})}const VM="data-valid",YM="data-invalid",qM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},GM={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},XM={disabled:!1,...GM},c1={valid(e){return e===null?null:e?{[VM]:""}:{[YM]:""}}},KM={invalid:void 0,name:void 0,validityData:{state:qM,errors:[],error:"",value:"",initialValue:null},setValidityData:Ht,disabled:void 0,setTouched:Ht,setDirty:Ht,setFilled:Ht,setFocused:Ht,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:XM,registerFieldControl:Ht,validation:{getValidationProps:(e,o=Ct)=>o,inputRef:{current:null},registeredInputs:new Map,registerInput:Ht,getInputControl:()=>null,commit:async()=>{},change:Ht}},$M=b.createContext(KM);function hf(e=!0){const o=b.useContext($M);if(o.setValidityData===Ht&&!e)throw new Error(kt(28));return o}const WM=b.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Ht,validationMode:"onSubmit",submitCountRef:{current:0}});function u1(){return b.useContext(WM)}const QM=b.createContext({controlId:void 0,registerControlId:Ht,resetControlId:Ht,labelId:void 0,setLabelId:Ht,messageIds:[],setMessageIds:Ht,getDescriptionProps:e=>e});function Fm(){return b.useContext(QM)}function Vm(e={}){const{id:o,enabled:a=!0}=e,{controlId:i,registerControlId:l,resetControlId:c}=Fm(),d=mo(),g=Zt(()=>Symbol()),m=b.useRef(!1),h=b.useRef(!1),y=Ne(()=>{!m.current||l===Ht||(m.current=!1,l(g.current,void 0))});return we(()=>{if(!a||l===Ht){y();return}let v;if(o!==void 0)h.current=!0,v=o;else if(h.current)v=d;else{c();return}if(v===void 0){y();return}m.current=!0,l(g.current,v)},[o,a,l,c,d,g,y]),we(()=>y,[y]),(a?i:void 0)??o??d}function Fr(e,o=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(o,Math.min(e,a))}function f1(e,o,a,i,l=!0,c){const{registerFieldControl:d}=hf(),g=Zt(()=>Symbol());we(()=>{const m=g.current;if(!l){d(m,void 0);return}d(m,{controlRef:e,getValue:i,id:o,name:c,value:a})},[e,l,i,o,c,d,g,a]),we(()=>{const m=g.current;return()=>{d(m,void 0)}},[d,g])}function ZM(e){const o=b.useRef(!0);o.current&&(o.current=!1,e())}const d1=b.createContext(void 0),p1=b.createContext(void 0),h1=b.createContext(void 0);function ds(){const e=b.useContext(d1);if(e===void 0)throw new Error(kt(60));return e}function mf(){const e=b.useContext(p1);if(e===void 0)throw new Error(kt(101));return e}function m1(){const e=b.useContext(h1);if(e===void 0)throw new Error(kt(61));return e}function JM(e,o,a=Object.is){const{length:i}=e;if(i!==o.length)return!1;for(let l=0;l<i;l+=1)if(!a(e[l],o[l]))return!1;return!0}const g1=(e,o)=>Object.is(e,o);function Na(e,o,a){return e==null||o==null?Object.is(e,o):a(e,o)}function ej(e,o,a){return Array.isArray(e)&&Array.isArray(o)?!JM(e,o,(i,l)=>Na(i,l,a)):e!==o}function jh(e,o,a){return e?e.some(i=>i===void 0?!1:Na(o,i,a)):!1}function su(e,o,a){return e?e.findIndex(i=>i===void 0?!1:Na(i,o,a)):-1}function tj(e,o){if(o!==g1)return i=>jh(e,i,o);const a=new Set(e);return a.delete(void 0),i=>a.has(i)&&(i!==0||e.some(l=>Object.is(i,l)))}function y1(e,o,a,i){const l=i&&Array.isArray(o)?e.findIndex(tj(o,a)):su(e,o,a);return l===-1?null:l}function nj(e,o,a,i,l,c){return jh(i,o,l)?c!=null&&e>c&&jh(i,a[c],l)?c:e:e===c?y1(a,i,l,!0):c}function oj(e,o,a){return e.filter(i=>!Na(o,i,a))}function _h(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function sj(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function b1(e){return sj(e?.[0])}function aj(e){return b1(e)?e.flatMap(o=>o.items):e}function ij(e){if(!Array.isArray(e))return e!=null&&"null"in e;const o=e;if(b1(o)){for(const a of o)for(const i of a.items)if(i&&i.value==null&&i.label!=null)return!0;return!1}for(const a of o)if(a&&a.value==null&&a.label!=null)return!0;return!1}function v1(e,o){if(o&&e!=null)return o(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return _h(e)}function wi(e,o){return o&&e!=null?o(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?_h(e.value):_h(e)}function x1(e,o,a){function i(){return v1(e,a)}if(a&&e!=null)return a(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(o&&!Array.isArray(o))return(Object.hasOwn(o,e)?o[e]:void 0)??i();if(Array.isArray(o)){const c=aj(o);if(e==null||typeof e!="object"){const d=c.find(g=>g.value===e);return d&&d.label!=null?d.label:i()}if("value"in e){const d=c.find(g=>g&&g.value===e.value);if(d&&d.label!=null)return d.label}}return i()}function rj(e,o,a){return e.reduce((i,l,c)=>(c>0&&i.push(", "),i.push(p.jsx(b.Fragment,{children:x1(l,o,a)},c)),i),[])}const lj={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:o,multiple:a,itemToStringValue:i}=e;return o==null?!1:a&&Array.isArray(o)?o.length>0:wi(o,i)!==""},hasNullItemLabel:(e,o)=>o?ij(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,o)=>e.activeIndex===o,isSelected:(e,o)=>{const a=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(l=>Na(o,l,a)):Na(o,i,a)},isSelectedByFocus:(e,o)=>e.selectedIndex===o,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},Xo=1;function S1(e,o){return Math.max(0,e-o)}function cj(e,o){if(o<=0)return 0;const a=Fr(e,0,o),i=a,l=o-a,c=i<=Xo,d=l<=Xo;return c&&d?i<=l?0:o:c?0:d?o:a}function uj(e){const{id:o,value:a,defaultValue:i=null,onValueChange:l,open:c,defaultOpen:d=!1,onOpenChange:g,name:m,form:h,autoComplete:y,disabled:v=!1,readOnly:S=!1,required:w=!1,modal:T=!0,actionsRef:A,inputRef:N,onOpenChangeComplete:C,items:_,multiple:k=!1,itemToStringLabel:j,itemToStringValue:L,isItemEqualToValue:z=g1,highlightItemOnHover:I=!0,children:U}=e,{clearErrors:Y}=u1(),{setDirty:B,setTouched:D,setFocused:M,validityData:H,setFilled:ee,name:$,disabled:P,validation:q,validationMode:K}=hf(),Z=Vm({id:o}),Q=P||v,O=$??m,[F,J]=el({controlled:a,default:k?i??ho:i,name:"Select",state:"value"}),[W,se]=el({controlled:c,default:d,name:"Select",state:"open"}),ie=b.useRef([]),me=b.useRef([]),pe=b.useRef(null),be=b.useRef(null),Ce=b.useRef(0),Me=b.useRef(null),ye=b.useRef([]),ge=b.useRef(!1),Te=b.useRef(null),Oe=b.useRef(null),Be=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Ee=b.useRef(!1),Pe=b.useRef(F),{mounted:Se,setMounted:Re,transitionStatus:ke}=mm(W),{openMethod:Ie,triggerProps:je}=Hw(W),le=Zt(()=>new Da({id:Z,labelId:void 0,modal:T,multiple:k,itemToStringLabel:j,itemToStringValue:L,isItemEqualToValue:z,value:F,open:W,mounted:Se,transitionStatus:ke,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Ct,triggerProps:Ct,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Ht,setOpen:Ht,handleScrollArrowVisibility:Ht,onOpenChangeComplete:Ht,listRef:ie,popupRef:pe,scrollHandlerRef:be,scrollArrowsMountedCountRef:Ce,valueRef:Me,valuesRef:ye,labelsRef:me,typingRef:ge,selectionRef:Be,firstItemTextRef:Te,selectedItemTextRef:Oe,alignItemWithTriggerActiveRef:Ee,initialValueRef:Pe},lj)).current,ve=le.useState("activeIndex"),he=le.useState("selectedIndex"),ce=le.useState("triggerElement"),xe=le.useState("positionerElement"),He=Rk(Ie),Lt=Ie??He,Yt=b.useMemo(()=>k?"":wi(F,L),[k,F,L]),ut=b.useMemo(()=>k&&Array.isArray(F)?F.map(Ze=>wi(Ze,L)):wi(F,L),[k,F,L]),Ae=Vt(ce),Ye=Ne(()=>ut);f1(Ae,Z,F,Ye,!Q,m);const Qe=k?Array.isArray(F)&&F.length>0:F!=null&&Yt!=="";we(()=>{ee(Qe)},[Qe,ee]),we(function(){const At=y1(ye.current,F,z,k);At===null&&(Oe.current=null),!W&&le.set("selectedIndex",At)},[k,W,F,z,le]),jm(F,()=>{Y(O),B(ej(F,H.initialValue,z)),q.change(F)});const ct=Ne((Ze,At)=>{g?.(Ze,At),!At.isCanceled&&(se(Ze),!Ze&&(At.reason===Vs||At.reason===Uu)&&(D(!0),M(!1),K==="onBlur"&&q.commit(F)))}),en=Ne(()=>{Re(!1),le.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C?.(!1)});fs({enabled:!A,open:W,ref:pe,onComplete(){W||en()}}),b.useImperativeHandle(A,()=>({unmount:en}),[en]);const rn=Ne((Ze,At)=>{l?.(Ze,At),!At.isCanceled&&J(Ze)}),hn=Ne(Ze=>{const At=S1(Ze.scrollHeight,Ze.clientHeight),Dn=cj(Ze.scrollTop,At),io=Dn>0,bo=Dn<At;le.set("scrollUpArrowVisible",io),le.set("scrollDownArrowVisible",bo)}),xt=Y2({open:W,onOpenChange:ct,elements:{reference:ce,floating:xe}}),_t=Gu(xt,{enabled:!Q,event:"mousedown"}),Ve=ml(xt),ft=bw(xt,{enabled:!Q,listRef:ie,activeIndex:ve,selectedIndex:he,disabledIndices:ho,onNavigate(Ze){Ze===null&&!W||le.set("activeIndex",Ze)},focusItemOnHover:I}),Dt=vw(xt,{enabled:!Q&&(W||!S&&!k),listRef:me,activeIndex:ve,selectedIndex:he,disabledIndices:Ze=>Xw(ie.current[Ze]),onMatch(Ze){W?le.set("activeIndex",Ze):rn(ye.current[Ze],qe(ns))},onTyping(Ze){ge.current=Ze}}),It=b.useMemo(()=>oo(Dt.reference,ft.reference,Ve.reference,_t.reference,je),[_t.reference,Dt.reference,ft.reference,Ve.reference,je]),jn=b.useMemo(()=>oo(gl,Dt.floating,ft.floating,Ve.floating),[Dt.floating,ft.floating,Ve.floating]),ln=ft.item??Ct;le.useContextCallback("setValue",rn),le.useContextCallback("setOpen",ct),le.useContextCallback("handleScrollArrowVisibility",hn),le.useContextCallback("onOpenChangeComplete",C),ZM(()=>{le.update({popupProps:jn,triggerProps:It})}),le.useSyncedValues({id:Z,modal:T,multiple:k,value:F,open:W,mounted:Se,transitionStatus:ke,popupProps:jn,triggerProps:It,items:_,itemToStringLabel:j,itemToStringValue:L,isItemEqualToValue:z,openMethod:Lt});const yo=b.useMemo(()=>({disabled:Q,readOnly:S,required:w,multiple:k,highlightItemOnHover:I,itemProps:ln}),[Q,S,w,k,I,ln]),Sn=ss(N,q.inputRef),Ro=k?void 0:O,_n=b.useMemo(()=>!k||!Array.isArray(F)||!O?null:F.map(Ze=>{const At=wi(Ze,L);return p.jsx("input",{type:"hidden",form:h,name:O,value:At,disabled:Q},At)}),[k,F,h,O,L,Q]);return p.jsxs(d1.Provider,{value:le,children:[p.jsx(p1.Provider,{value:yo,children:p.jsx(h1.Provider,{value:xt,children:U})}),p.jsx("input",{...q.getValidationProps(Q,{onFocus(){le.state.triggerElement?.focus({focusVisible:!0})},onChange(Ze){if(Ze.nativeEvent.defaultPrevented||Q||S)return;const At=Ze.currentTarget.value,Dn=qe(ns,Ze.nativeEvent);function io(){if(k)return;const bo=At.toLowerCase();let ps=ye.current.findIndex(qt=>wi(qt,L).toLowerCase()===bo||v1(qt,j).toLowerCase()===bo);ps===-1&&(ps=ye.current.findIndex((qt,mn)=>{const Ao=me.current[mn];return Ao!=null&&Ao.toLowerCase()===bo}));const ro=ye.current[ps];ro!=null&&rn(ro,Dn)}le.set("forceMount",!0),queueMicrotask(io)}}),id:Z&&Ro==null?`${Z}-hidden-input`:void 0,form:h,name:Ro,autoComplete:y,value:Yt,disabled:Q,required:w&&!(k&&Qe),readOnly:S,ref:Sn,style:O?CS:Fu,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),_n]})}function fj(e,o){return e??o}const dj="data-popup-side",pj=400,hj={...iu,...c1,popupSide:e=>e?{[dj]:e}:null,value:()=>null},mj=b.forwardRef(function(o,a){const{render:i,className:l,id:c,disabled:d=!1,nativeButton:g=!0,style:m,...h}=o,{setTouched:y,setFocused:v,validationMode:S,validation:w,state:T,disabled:A}=hf(),{labelId:N}=Fm(),C=ds(),{readOnly:_,required:k,disabled:j}=mf(),L=A||j||d,z=C.useState("open"),I=C.useState("mounted"),U=C.useState("value"),Y=C.useState("triggerProps"),B=C.useState("positionerElement"),D=C.useState("listElement"),M=C.useState("popupSide"),H=C.useState("id"),ee=C.useState("labelId"),$=C.useState("hasSelectedValue"),P=I&&B?M:null,q=c??H,K=fj(N,ee);Vm({id:c});const Z=Vt(B),Q=b.useRef(null),{getButtonProps:O,buttonRef:F}=Co({disabled:L,native:g}),J=C.useStateSetter("triggerElement"),W=on(),se=on(),ie=on();b.useEffect(()=>{if(z)return ie.start(pj,()=>{C.context.selectionRef.current.allowUnselectedMouseUp=!0,C.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ie.clear()};C.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},se.clear()},[z,C,se,ie]);const me=oo(Y,{id:q,role:"combobox","aria-expanded":z,"aria-haspopup":"listbox","aria-controls":z?D?.id??cu(B)?.id:void 0,"aria-labelledby":K,"aria-readonly":_||void 0,"aria-required":k||void 0,tabIndex:L?-1:0,onFocus(Ce){v(!0),z&&C.context.alignItemWithTriggerActiveRef.current&&C.context.setOpen(!1,qe(ns,Ce.nativeEvent)),W.start(0,()=>{C.set("forceMount",!0)})},onBlur(Ce){De(B,Ce.relatedTarget)||(y(!0),v(!1),S==="onBlur"&&w.commit(U))},onMouseDown(Ce){if(z)return;const Me=We(Ce.currentTarget);function ye(ge){if(!Q.current)return;const Te=ge.target;De(Q.current,Te)||De(Z.current,Te)||Fw(ge,Q.current)||C.context.setOpen(!1,qe(xS,ge))}se.start(0,()=>{Me.addEventListener("mouseup",ye,{once:!0})})}},h,O),pe=w.getValidationProps(L,me);pe.role="combobox";const be={...T,open:z,disabled:L,value:U,readOnly:_,popupSide:P,placeholder:!$};return nt("button",o,{ref:[a,Q,F,J],state:be,stateAttributesMapping:hj,props:pe})}),gj={value:()=>null},yj=b.forwardRef(function(o,a){const{className:i,render:l,children:c,placeholder:d,style:g,...m}=o,h=ds(),y=h.useState("value"),v=h.useState("items"),S=h.useState("itemToStringLabel"),w=h.useState("hasSelectedValue"),T=!w&&d!=null&&c==null,A=h.useState("hasNullItemLabel",T),N={value:y,placeholder:!w};let C=null;return typeof c=="function"?C=c(y):c!=null?C=c:T&&!A?C=d:Array.isArray(y)?C=rj(y,v,S):C=x1(y,v,S),nt("span",o,{state:N,ref:[a,h.context.valueRef],props:[{children:C},m],stateAttributesMapping:gj})}),bj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,h={open:ds().useState("open")};return nt("span",o,{state:h,ref:a,props:[{"aria-hidden":!0,children:"▼"},d],stateAttributesMapping:Lu})}),vj=b.forwardRef(function(o,a){const i=ds(),l=i.useState("mounted"),c=i.useState("forceMount");return l||c?p.jsx(Yu,{ref:a,...o}):null}),w1=b.createContext(void 0);function T1(){const e=b.useContext(w1);if(!e)throw new Error(kt(59));return e}function bu(e,o){e&&Object.assign(e.style,o)}const E1={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},xj={position:"fixed"},Sj=b.forwardRef(function(o,a){const{anchor:i,className:l,render:c,positionMethod:d,side:g,align:m,sideOffset:h,alignOffset:y,collisionBoundary:v="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:T,disableAnchorTracking:A,alignItemWithTrigger:N=!0,collisionAvoidance:C=GS,style:_,...k}=o,j=ds(),L=m1(),z=j.useState("open"),I=j.useState("mounted"),U=j.useState("modal"),Y=j.useState("value"),B=j.useState("openMethod"),D=j.useState("positionerElement"),M=j.useState("triggerElement"),H=j.useState("isItemEqualToValue"),ee=j.useState("transitionStatus"),$=b.useRef(null),P=b.useRef(null),[q,K]=b.useState(N),Z=I&&q&&B!=="touch";!I&&q!==N&&K(N),b.useImperativeHandle(j.context.alignItemWithTriggerActiveRef,()=>Z),Nm((Z||U)&&z,B==="touch",D,M);const Q=rf({anchor:i,floatingRootContext:L,positionMethod:d,mounted:I,side:g,sideOffset:h,align:m,alignOffset:y,arrowPadding:w,collisionBoundary:v,collisionPadding:S,sticky:T,disableAnchorTracking:A??Z,collisionAvoidance:C,keepMounted:!0}),O=Z?"none":Q.side,F=Z?xj:Q.positionerStyles,J={open:z,side:O,align:Q.align,anchorHidden:Q.anchorHidden};we(()=>{j.set("popupSide",Q.side)},[j,Q.side]);const W=j.useStateSetter("positionerElement"),se=lf(o,J,{styles:F,transitionStatus:ee,props:k,refs:[a,W],hidden:!I,inert:!z}),ie=b.useRef(0),me=Ne(be=>{if(j.context.valuesRef.current.length===0)return;const Ce=ie.current;ie.current=be.size;const Me=qe(ns);if(Ce!==0&&!j.state.multiple&&Y!==null&&su(j.context.valuesRef.current,Y,H)===-1){const ge=j.context.initialValueRef.current,Oe=ge!=null&&su(j.context.valuesRef.current,ge,H)!==-1?ge:null;j.context.setValue(Oe,Me),Oe===null&&(j.set("selectedIndex",null),j.context.selectedItemTextRef.current=null)}if(Ce!==0&&j.state.multiple&&Array.isArray(Y)){const ye=Y.filter(ge=>su(j.context.valuesRef.current,ge,H)!==-1);ye.length!==Y.length&&(j.context.setValue(ye,Me),ye.length===0&&(j.set("selectedIndex",null),j.context.selectedItemTextRef.current=null))}if(z&&Z){j.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};bu(D,ye),bu(j.context.popupRef.current,ye)}}),pe=b.useMemo(()=>({...Q,side:O,alignItemWithTriggerActive:Z,setControlledAlignItemWithTrigger:K,scrollUpArrowRef:$,scrollDownArrowRef:P}),[Q,O,Z,K]);return p.jsx(km,{elementsRef:j.context.listRef,labelsRef:j.context.labelsRef,onMapChange:me,children:p.jsxs(w1.Provider,{value:pe,children:[I&&U&&p.jsx(ff,{inert:vl(!z),cutout:M}),se]})})}),Qc="base-ui-disable-scrollbar",Dh={className:Qc,getElement(e){return p.jsx("style",{nonce:e,href:Qc,precedence:"base-ui:low",children:`.${Qc}{scrollbar-width:none}.${Qc}::-webkit-scrollbar{display:none}`})}},wj=b.createContext(void 0),Tj={disableStyleElements:!1};function Ej(){return b.useContext(wj)??Tj}const i0="--transform-origin",Cj={...dl,...fl},Rj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,finalFocus:d,...g}=o,m=ds(),{multiple:h,readOnly:y,highlightItemOnHover:v}=mf(),S=m1(),{side:w,align:T,alignItemWithTriggerActive:A,isPositioned:N,setControlledAlignItemWithTrigger:C}=T1(),_=uf()!=null,k=af(),{nonce:j,disableStyleElements:L}=Ej(),z=m.useState("id"),I=m.useState("open"),U=m.useState("openMethod"),Y=m.useState("mounted"),B=m.useState("popupProps"),D=m.useState("transitionStatus"),M=m.useState("triggerElement"),H=m.useState("positionerElement"),ee=m.useState("listElement"),$=b.useRef(!1),P=b.useRef(!1),q=b.useRef({}),K=ki(),Z=Ne(J=>{if(!H||!m.context.popupRef.current||!P.current)return;const W=H.style.top==="0px",se=H.style.bottom==="0px";if($.current||!A||!W&&!se){m.context.handleScrollArrowVisibility(J);return}const ie=l0(H),me=Vr(H.getBoundingClientRect().height,"y",ie),pe=We(H),be=Rt(H),Ce=be.getComputedStyle(H),Me=parseFloat(Ce.marginTop),ye=parseFloat(Ce.marginBottom),ge=r0(be.getComputedStyle(m.context.popupRef.current)),Te=Math.min(pe.documentElement.clientHeight-Me-ye,ge),Oe=J.scrollTop,Be=Zc(J);let Ee=null;const Pe=Ie=>{H.style.height=`${Ie}px`},Se=W?Be-Oe:Oe,Re=Math.min(me+Se,Te);if(Se<=Xo){const Ie=Fr(Se,0,Te-me);Ie>0&&Pe(me+Ie),J.scrollTop=W?Be:0,Te-(me+Ie)<=Xo&&($.current=!0),m.context.handleScrollArrowVisibility(J);return}if(Te-Re>Xo)Ee=W?1/0:0;else if(se&&Oe<Be){const Ie=me+Se-Te;Ee=Oe-(Se-Ie)}const ke=Math.ceil(Re);if(ke!==0&&Pe(ke),Ee!=null){const Ie=Fr(Ee,0,Zc(J));Math.abs(J.scrollTop-Ie)>Xo&&(J.scrollTop=Ie)}ke>=Te-Xo&&($.current=!0),m.context.handleScrollArrowVisibility(J)});b.useImperativeHandle(m.context.scrollHandlerRef,()=>Z,[Z]),fs({open:I,ref:m.context.popupRef,onComplete(){I&&m.context.onOpenChangeComplete(!0)}});const Q={open:I,transitionStatus:D,side:w,align:T};we(()=>{!H||!m.context.popupRef.current||Object.keys(q.current).length||(q.current={top:H.style.top||"0",left:H.style.left||"0",right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[m,H]),we(()=>{I||A||(P.current=!1,$.current=!1,bu(H,q.current))},[I,A,H]),we(()=>{const J=m.context.popupRef.current;if(!I||!M||!H||!J||A&&!N||m.state.transitionStatus==="ending")return;if(P.current=!0,J.style.removeProperty(i0),!A){K.request(()=>m.context.handleScrollArrowVisibility(ee||J));return}const W=Aj(J);try{let se=m.context.selectedItemTextRef.current;se?.isConnected||(se=!m.select("hasSelectedValue")&&m.context.firstItemTextRef.current?.isConnected?m.context.firstItemTextRef.current:null);const ie=m.context.valueRef.current,me=Rt(H),pe=me.getComputedStyle(H),be=me.getComputedStyle(J),Ce=We(M),Me=l0(M),ye=Jc(M.getBoundingClientRect(),Me),ge=Jc(H.getBoundingClientRect(),Me),Te=ye.height,Oe=ee||J,Be=Oe.scrollHeight,Ee=parseFloat(be.borderBottomWidth),Pe=parseFloat(pe.marginTop)||10,Se=parseFloat(pe.marginBottom)||10,Re=parseFloat(pe.minHeight)||100,ke=r0(be),Ie=5,je=5,le=20,ve=Ce.documentElement.clientHeight-Pe-Se,he=Ce.documentElement.clientWidth,ce=ve-ye.bottom+Te;let xe,He=k==="rtl"?ye.right-ge.width:ye.left,Lt=0;if(se&&ie){const _t=Jc(ie.getBoundingClientRect(),Me);xe=Jc(se.getBoundingClientRect(),Me),He=ge.left+(k==="rtl"?_t.right-xe.right:_t.left-xe.left);const Ve=_t.top-ye.top+_t.height/2;Lt=xe.top-ge.top+xe.height/2-Ve}const Yt=ce+Lt+Se+Ee;let ut=Math.min(ve,Yt);const Ae=ve-Pe-Se,Ye=Yt-ut,Qe=he-je;H.style.left=`${Fr(He,Ie,Qe-ge.width)}px`,H.style.height=`${ut}px`,H.style.maxHeight="none",H.style.marginTop=`${Pe}px`,H.style.marginBottom=`${Se}px`,J.style.height="100%";const ct=Zc(Oe),en=Ye>=ct-Xo;en&&(ut=Math.min(ve,ge.height)-(Ye-ct));const rn=ye.top<le||ye.bottom>ve-le||Math.ceil(ut)+Xo<Math.min(Be,Re),hn=(me.visualViewport?.scale??1)!==1&&cs;if(rn||hn){bu(H,q.current),C(!1);return}const xt=Math.max(Re,ut);if(en){const _t=Math.max(0,ve-Yt);H.style.top=ge.height>=Ae?"0":`${_t}px`,H.style.height=`${ut}px`,Oe.scrollTop=Zc(Oe)}else H.style.bottom="0",Oe.scrollTop=Ye;if(xe){const _t=ge.top,Ve=ge.height,ft=xe.top+xe.height/2,Dt=Fr(Ve>0?(ft-_t)/Ve*100:50,0,100);J.style.setProperty(i0,`50% ${Dt}%`)}(xt===ve||ut>=ke)&&($.current=!0),m.context.handleScrollArrowVisibility(Oe),v&&m.state.selectedIndex===null&&m.state.activeIndex===null&&m.context.listRef.current[0]!=null&&m.set("activeIndex",0)}finally{W()}},[m,I,H,M,A,C,K,ee,v,k,N]),b.useEffect(()=>{if(!A||!H||!I)return;const J=Rt(H);function W(se){m.context.setOpen(!1,qe(UA,se))}return Ge(J,"resize",W)},[m,A,H,I]);const O={...ee?{role:"presentation"}:{role:"listbox","aria-multiselectable":h||void 0,"aria-readonly":y||void 0,id:`${z}-list`},onKeyDown(J){_&&xl.has(J.key)&&J.stopPropagation()},onScroll(J){ee||Z(J.currentTarget)},...A&&{style:ee?{height:"100%"}:E1},className:!ee&&A?Dh.className:void 0},F=nt("div",o,{ref:[a,m.context.popupRef],state:Q,stateAttributesMapping:Cj,props:[B,O,bl(D),g]});return p.jsxs(b.Fragment,{children:[!L&&Dh.getElement(j),p.jsx(qu,{context:S,modal:!1,disabled:!Y,openInteractionType:U,returnFocus:d,restoreFocus:!0,children:F})]})});function r0(e){const o=e.maxHeight;return o.endsWith("px")&&parseFloat(o)||1/0}function Zc(e){return S1(e.scrollHeight,e.clientHeight)}function l0(e){return iw.getScale(e)}function Vr(e,o,a){return e/a[o]}function Jc(e,o){return Zr({x:Vr(e.x,"x",o),y:Vr(e.y,"y",o),width:Vr(e.width,"x",o),height:Vr(e.height,"y",o)})}const c0=[["transform","none"],["scale","1"],["translate","0 0"]];function Aj(e){const{style:o}=e,a={};for(const[i,l]of c0)a[i]=o.getPropertyValue(i),o.setProperty(i,l,"important");return()=>{for(const[i]of c0){const l=a[i];l?o.setProperty(i,l):o.removeProperty(i)}}}const Oj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,g=ds(),{multiple:m,readOnly:h}=mf(),{alignItemWithTriggerActive:y}=T1(),v=g.useState("hasScrollArrows"),S=g.useState("openMethod"),T={id:`${g.useState("id")}-list`,role:"listbox","aria-multiselectable":m||void 0,"aria-readonly":h||void 0,onScroll(N){g.context.scrollHandlerRef.current?.(N.currentTarget)},...y&&{style:E1},className:v&&S!=="touch"?Dh.className:void 0},A=g.useStateSetter("listElement");return nt("div",o,{ref:[a,A],props:[T,d]})}),C1=b.createContext(void 0);function Ym(){const e=b.useContext(C1);if(!e)throw new Error(kt(57));return e}const kj=b.memo(b.forwardRef(function(o,a){const{render:i,className:l,style:c,value:d=null,label:g,disabled:m=!1,nativeButton:h=!1,...y}=o,v=b.useRef(null),S=cf({guess:!0,label:g,textRef:v}),w=ds(),{itemProps:T,multiple:A,disabled:N,readOnly:C}=mf(),_=N||m,k=w.useState("isActive",S.index),j=w.useState("open"),L=w.useState("isSelected",d),z=w.useState("isSelectedByFocus",S.index),I=w.useState("isItemEqualToValue"),U=S.index,Y=b.useRef(null);we(()=>{const Q=w.context.valuesRef.current;return Q[U]=d,()=>{delete Q[U]}},[U,d,w]),we(()=>{const Q=w.state.value,O=w.state.selectedIndex;let F=O,J;A&&Array.isArray(Q)?(F=nj(U,d,w.context.valuesRef.current,Q,I,O),J=F===U,U===O&&!J&&(w.context.selectedItemTextRef.current=null)):(J=Q!==void 0&&Na(d,Q,I),J&&(F=U)),w.set("selectedIndex",F),J&&v.current&&(w.context.selectedItemTextRef.current=v.current)},[U,A,I,w,d]);const B=b.useRef("mouse"),D=b.useRef(!1),{getButtonProps:M,buttonRef:H}=Co({disabled:_,focusableWhenDisabled:!0,native:h,composite:!0}),ee={disabled:_,selected:L,highlighted:k};function $(Q){if(N||C)return;const O=w.state.value;if(A){const F=Array.isArray(O)?O:[],J=L?oj(F,d,I):[...F,d];w.context.setValue(J,qe(Yr,Q))}else w.context.setValue(d,qe(Yr,Q)),w.context.setOpen(!1,qe(Yr,Q))}function P(){w.context.selectionRef.current.dragY=0}const q={role:"option","aria-selected":L,tabIndex:j&&k?0:-1,onKeyDown(Q){w.set("activeIndex",U),Q.key===" "&&w.context.typingRef.current&&Q.preventDefault()},onClick(Q){const O=B.current!=="touch",F=Q.nativeEvent.pointerType,J=O&&Mu(Q.nativeEvent)&&(F!==void 0||k),W=O&&!J&&!D.current;D.current=!1,!(_||W)&&$(Q.nativeEvent)},onPointerEnter(Q){B.current=Q.pointerType},onPointerMove(Q){if(Q.pointerType==="mouse"&&Q.buttons===1){const O=w.context.selectionRef.current;O.dragY+=Q.movementY,O.dragY**2>=64&&(O.allowUnselectedMouseUp=!0)}},onPointerDown(Q){B.current=Q.pointerType,D.current=!0,P()},onMouseUp(){if(P(),_||B.current==="touch"||D.current)return;const Q=!w.context.selectionRef.current.allowSelectedMouseUp&&L,O=!w.context.selectionRef.current.allowUnselectedMouseUp&&!L;Q||O||(D.current=!0,Y.current?.click(),D.current=!1)}},K=nt("div",o,{ref:[H,a,S.ref,Y],state:ee,props:[T,q,y,M]}),Z=b.useMemo(()=>({selected:L,index:U,textRef:v,selectedByFocus:z}),[L,U,v,z]);return p.jsx(C1.Provider,{value:Z,children:K})})),Nj=b.forwardRef(function(o,a){const{selected:i}=Ym();return o.keepMounted||i?p.jsx(Mj,{...o,ref:a}):null}),Mj=b.memo(b.forwardRef((e,o)=>{const{render:a,className:i,style:l,keepMounted:c,...d}=e,{selected:g}=Ym(),m=b.useRef(null),{transitionStatus:h,setMounted:y}=mm(g),S=nt("span",e,{ref:[o,m],state:{selected:g,transitionStatus:h},props:[{"aria-hidden":!0,children:"✔️"},d],stateAttributesMapping:fl});return fs({batch:!0,enabled:!g,open:g,ref:m,onComplete(){g||y(!1)}}),S})),jj=b.memo(b.forwardRef(function(o,a){const{index:i,textRef:l,selectedByFocus:c}=Ym(),d=ds(),{render:g,className:m,style:h,...y}=o,v=b.useCallback(w=>{w&&(i===0&&(d.context.firstItemTextRef.current=w),c&&(d.context.selectedItemTextRef.current=w))},[d,i,c]);return nt("div",o,{ref:[v,a,l],props:y})})),R1=b.createContext(void 0);function _j(){const e=b.useContext(R1);if(e===void 0)throw new Error(kt(63));return e}const Dj="data-checked",zj="data-unchecked",A1={...c1,checked(e){return e?{[Dj]:""}:{[zj]:""}}};function Pj(e,o,a,i=!0,l){const[c,d]=b.useState(),g=mo(l?`${l}-label`:void 0),m=e??o??c;return we(()=>{const h=e||o||!i?void 0:Lj(a.current,g);c!==h&&d(h)}),m}function Lj(e,o){const a=Ij(e);if(a)return!a.id&&o&&(a.id=o),a.id||void 0}function Ij(e){if(!e)return;const o=e.parentElement;if(o&&o.tagName==="LABEL")return o;const a=e.id;if(a){const l=e.nextElementSibling;if(l&&l.htmlFor===a)return l}const i=e.labels;return i&&i[0]}const Hj=b.forwardRef(function(o,a){const{checked:i,className:l,defaultChecked:c,"aria-labelledby":d,form:g,id:m,inputRef:h,name:y,nativeButton:v=!1,onCheckedChange:S,readOnly:w=!1,required:T=!1,disabled:A=!1,render:N,uncheckedValue:C,value:_,style:k,...j}=o,{clearErrors:L}=u1(),{state:z,setTouched:I,setDirty:U,validityData:Y,setFilled:B,setFocused:D,validationMode:M,disabled:H,name:ee,validation:$}=hf(),{labelId:P}=Fm(),q=H||A,K=ee??y,Z=b.useRef(null),Q=ss(Z,h,$.inputRef),O=b.useRef(null),F=mo(),J=Vm({id:m}),W=v?void 0:J,[se,ie]=el({controlled:i,default:!!c,name:"Switch",state:"checked"});f1(O,F,se,void 0,!q,y),we(()=>{B(se)},[se,B]),jm(se,()=>{L(K),U(se!==Y.initialValue),$.change(se)});const{getButtonProps:me,buttonRef:pe}=Co({disabled:q,native:v}),be=Pj(d,P,Z,!v,W),Ce={id:v?J:F,role:"switch","aria-checked":se,"aria-readonly":w||void 0,"aria-required":T||void 0,"aria-labelledby":be,onFocus(){q||D(!0)},onBlur(){const Te=Z.current;!Te||q||(I(!0),D(!1),M==="onBlur"&&$.commit(Te.checked))},onClick(Te){if(w||q)return;Te.preventDefault();const Oe=Z.current;Oe&&Xr(Oe,Te)}},Me={...$.getValidationProps(q),checked:se,disabled:q,form:g,id:W,name:K,required:T,style:K?CS:Fu,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:Q,onChange(Te){if(Te.nativeEvent.defaultPrevented)return;if(w){Te.preventDefault();return}const Oe=Te.currentTarget.checked,Be=qe(ns,Te.nativeEvent);S?.(Oe,Be),!Be.isCanceled&&ie(Oe)},onClick(Te){Te.stopPropagation()},onFocus(){O.current?.focus()},..._!==void 0?{value:_}:Ct},ye=b.useMemo(()=>({...z,checked:se,disabled:q,readOnly:w,required:T}),[z,se,q,w,T]),ge=nt("span",o,{state:ye,ref:[a,O,pe],props:[Ce,j,me,Te=>$.getValidationProps(q,Te)],stateAttributesMapping:A1});return p.jsxs(R1.Provider,{value:ye,children:[ge,!se&&K&&C!==void 0&&p.jsx("input",{type:"hidden",form:g,name:K,value:C,disabled:q}),p.jsx("input",{...Me,suppressHydrationWarning:!0})]})}),Uj=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,g=_j();return nt("span",o,{state:g,ref:a,stateAttributesMapping:A1,props:d})}),O1="data-composite-item-active";function Bj(e){const{loopFocus:o=!0,orientation:a="both",grid:i,onLoop:l,direction:c,highlightedIndex:d,onHighlightedIndexChange:g,rootRef:m,enableHomeAndEndKeys:h=!1,stopEventPropagation:y,disabledIndices:v,modifierKeys:S=ho}=e,[w,T]=b.useState(0),A=i!=null,N=b.useRef(null),C=ss(N,m),_=b.useRef([]),k=b.useRef(!1),j=b.useRef(null),L=d??w,z=Ne((D,M=!1)=>{if(j.current=_.current[D]??null,(g??T)(D),M){const H=_.current[D];Qx(N.current,H,c,a)}}),I=Ne(D=>{if(D.size===0)return;if(k.current){const $=_.current,P=$.indexOf(j.current);if(P===-1){const q=$[L];!q||Ei($,L,v)?z(Fj($,v)):j.current=q}else P!==L&&z(P);return}k.current=!0;const M=Array.from(D.keys()),H=M.find($=>$?.hasAttribute(O1))??null,ee=H?D.get(H)?.index??-1:-1;if(ee!==-1)z(ee);else if(Ei(M,L,v)){const $=$o(M,{disabledIndices:v});qr(M,$)||z($)}Qx(N.current,H,c,a)});we(()=>{if(v==null||d!=null||!k.current)return;const D=_.current;if(Ei(D,L,v)){const M=$o(D,{disabledIndices:v});qr(D,M)||z(M)}},[v,d,L,_,z]);const U=Ne((D,M,H)=>l?l(D,M,H,_):H),Y=Ne(D=>{const M=D.key===Oh||D.key===kh;if(!xl.has(D.key)||!h&&M||Vj(D,S)||!N.current)return;const ee=c==="rtl",$=ee?Rh:Ah,P=ee?Ah:Rh,q=a==="vertical"?Ch:$,K=a==="vertical"?Eh:P,Z=Pt(D.nativeEvent);if(Z!=null&&Wx(Z)&&!Xw(Z)){const se=Z.selectionStart,ie=Z.selectionEnd,me=Z.value;if(se==null||D.shiftKey||se!==ie||D.key!==K&&se<me.length||D.key!==q&&se>0)return}let Q=L;const O=tu(_,v),F=xh(_,v);i!=null&&(Q=i({disabledIndices:v,elementsRef:_,event:D,highlightedIndex:L,loopFocus:o,maxIndex:F,minIndex:O,onLoop:U,orientation:a,rtl:ee}));const J=a!=="vertical"&&D.key===$||a!=="horizontal"&&D.key===Ch,W=a!=="vertical"&&D.key===P||a!=="horizontal"&&D.key===Eh;h&&(D.key===Oh?Q=O:D.key===kh&&(Q=F)),Q===L&&(J||W)&&(o&&Q===F&&J?(Q=O,l&&(Q=l(D,L,Q,_))):o&&Q===O&&W?(Q=F,l&&(Q=l(D,L,Q,_))):Q=$o(_.current,{startingIndex:Q,decrement:W,disabledIndices:v})),Q!==L&&!qr(_.current,Q)&&(y&&D.stopPropagation(),(A||M||J||W)&&D.preventDefault(),z(Q,!0),queueMicrotask(()=>{_.current[Q]?.focus()}))});return{props:{ref:C,onFocus(D){const M=N.current,H=Pt(D.nativeEvent);!M||H==null||!Wx(H)||H.setSelectionRange(0,H.value.length)},onKeyDown:Y},highlightedIndex:L,onHighlightedIndexChange:z,elementsRef:_,onMapChange:I,relayKeyboardEvent:Y}}function Fj(e,o){let a=-1;for(let i=0;i<e.length;i+=1){const l=e[i];if(!(!l||Ei(e,i,o))){if(l.hasAttribute(O1))return i;a===-1&&(a=i)}}return Math.max(a,0)}function Vj(e,o){for(const a of Vk)if(!o.includes(a)&&e.getModifierState(a))return!0;return!1}function Yj(e){const{render:o,className:a,style:i,refs:l=ho,props:c=ho,state:d=Ct,stateAttributesMapping:g,highlightedIndex:m,onHighlightedIndexChange:h,orientation:y,grid:v,loopFocus:S,onLoop:w,enableHomeAndEndKeys:T,onMapChange:A,stopEventPropagation:N=!0,rootRef:C,disabledIndices:_,modifierKeys:k,highlightItemOnHover:j=!1,tag:L="div",...z}=e,I=af(),{props:U,highlightedIndex:Y,onHighlightedIndexChange:B,elementsRef:D,onMapChange:M,relayKeyboardEvent:H}=Bj({grid:v,loopFocus:S,onLoop:w,orientation:y,highlightedIndex:m,onHighlightedIndexChange:h,rootRef:C,stopEventPropagation:N,enableHomeAndEndKeys:T,direction:I,disabledIndices:_,modifierKeys:k}),ee=nt(L,e,{state:d,ref:l,props:[U,...c,z],stateAttributesMapping:g}),$=b.useMemo(()=>({highlightedIndex:Y,onHighlightedIndexChange:B,highlightItemOnHover:j,relayKeyboardEvent:H}),[Y,B,j,H]);return p.jsx(Nw.Provider,{value:$,children:p.jsx(km,{elementsRef:D,onMapChange:P=>{A?.(P),M(P)},children:ee})})}const qj=b.createContext(void 0);function Gj(){return b.useContext(qj)}const k1=b.createContext(void 0);function Xj(){return b.useContext(k1)}const Kj=b.forwardRef(function(o,a){const{defaultValue:i,disabled:l=!1,loopFocus:c=!0,onValueChange:d,orientation:g="horizontal",multiple:m=!1,value:h,className:y,render:v,style:S,...w}=o,T=uf(),A=Gj(),N=i??ho,C=h!==void 0||i!==void 0,_=(T?.disabled??!1)||(A?.disabled??!1)||l,[k,j]=el({controlled:h,default:N,name:"ToggleGroup",state:"value"}),L=Ne((B,D,M)=>{let H;m?(H=k.slice(),D?H.push(B):H.splice(k.indexOf(B),1)):H=D?[B]:[],d?.(H,M),!M.isCanceled&&j(H)}),z={disabled:_,multiple:m,orientation:g},I=b.useMemo(()=>({disabled:_,setGroupValue:L,value:k,isValueInitialized:C}),[_,L,k,C]),U={role:"group"},Y=nt("div",o,{enabled:!!T,state:z,ref:a,props:[U,w]});return p.jsx(k1.Provider,{value:I,children:T?Y:p.jsx(Yj,{render:v,className:y,style:S,state:z,refs:[a],props:[U,w],loopFocus:c,enableHomeAndEndKeys:!0,orientation:g})})}),$j=b.forwardRef(function(o,a){const{className:i,defaultPressed:l=!1,disabled:c=!1,form:d,onPressedChange:g,pressed:m,render:h,type:y,value:v,nativeButton:S=!0,style:w,...T}=o,A=mo(v||void 0),N=Xj(),C=N?.value??[],_=(c||N?.disabled)??!1,[k,j]=el({controlled:N?A!==void 0&&C.indexOf(A)>-1:m,default:l,name:"Toggle",state:"pressed"}),{getButtonProps:L,buttonRef:z}=Co({disabled:_,native:S}),I={disabled:_,pressed:k},U=[z,a],Y=[{"aria-pressed":k,onClick(M){const H=!k,ee=qe(ns,M.nativeEvent);g?.(H,ee),!ee.isCanceled&&(A&&N?.setGroupValue?.(A,H,ee),!ee.isCanceled&&j(H))}},T,L],B=nt("button",o,{enabled:!N,state:I,ref:U,props:Y}),D=b.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return N?p.jsx(Vw,{tag:"button",render:h,className:i,style:w,metadata:D,state:I,refs:U,props:Y}):B}),N1="h-7 w-full min-w-0 rounded-control border border-line bg-surface-2 px-2 text-[13px] text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:bg-surface",ol=b.forwardRef(function({className:o,...a},i){return p.jsx("input",{ref:i,"data-ui-field":"",className:lt(N1,o),...a})});function Wj({value:e,options:o,onChange:a,placeholder:i="—",className:l,...c}){return p.jsxs(uj,{value:e,onValueChange:d=>d!==null&&a(d),children:[p.jsxs(mj,{"aria-label":c["aria-label"],"data-ui-field":"",className:lt(N1,"flex items-center justify-between gap-1 text-left",l),children:[p.jsx(yj,{children:d=>o.find(g=>g.value===d)?.label??p.jsx("span",{className:"text-fg-subtle",children:i})}),p.jsx(bj,{children:p.jsx(ka,{className:"size-3.5 text-fg-subtle"})})]}),p.jsx(vj,{children:p.jsx(Sj,{sideOffset:4,className:"z-[1000]",alignItemWithTrigger:!1,children:p.jsx(Rj,{className:lt(Bm,"max-h-80 overflow-auto"),children:p.jsx(Oj,{children:o.map(d=>p.jsxs(kj,{value:d.value,className:"flex h-7 min-w-32 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover",children:[p.jsx("span",{className:"flex size-4 items-center justify-center",children:p.jsx(Nj,{children:p.jsx(Li,{className:"size-3.5"})})}),p.jsx(jj,{children:d.label})]},d.value))})})})})]})}function Qj({value:e,options:o,onChange:a,onRepick:i,className:l,...c}){return p.jsx(Kj,{value:e===null?[]:[e],onValueChange:d=>{const g=d[0];g!==void 0?a(g):e!==null&&i?.(e)},"aria-label":c["aria-label"],"data-ui-field":"",className:lt("flex h-7 items-center gap-0.5 rounded-control bg-surface-2 p-0.5",l),children:o.map(d=>p.jsx($j,{value:d.value,"aria-label":d.title,title:d.title,className:"flex h-full flex-1 items-center justify-center whitespace-nowrap rounded-[4px] px-1.5 text-fg-muted outline-none hover:text-fg data-[pressed]:bg-surface data-[pressed]:text-fg data-[pressed]:shadow-sm focus-visible:outline-2 focus-visible:outline-accent",children:d.label},d.value))})}function M1({checked:e,onChange:o,disabled:a,...i}){return p.jsx(Hj,{checked:e,disabled:a,onCheckedChange:l=>o(l),onKeyDown:Mi,"aria-label":i["aria-label"],className:"relative inline-flex h-4 w-7 shrink-0 items-center rounded-full bg-line-strong p-0.5 transition-colors data-[checked]:bg-accent disabled:opacity-40",children:p.jsx(Uj,{className:"size-3 rounded-full bg-white shadow transition-transform data-[checked]:translate-x-3"})})}function Zj(e,o){const a=Rt(e).getComputedStyle(e).transform;let i=0,l=0,c=1;if(a&&a!=="none"){const d=a.match(/matrix(?:3d)?\(([^)]+)\)/);if(d){const g=d[1].split(", ").map(parseFloat);g.length===6?(i=g[4],l=g[5],c=Math.sqrt(g[0]*g[0]+g[1]*g[1])):g.length===16&&(i=g[12],l=g[13],c=g[0])}}return{x:i,y:l,scale:c}}const j1=b.createContext(void 0);function gf(){const e=b.useContext(j1);if(!e)throw new Error(kt(73));return e}let u0=0;function _1(e){return u0+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${u0}`}function eh(e,o){if(typeof e=="string")return{description:e};if(typeof e=="function"){const a=e(o);return typeof a=="string"?{description:a}:a}return e}function th(e){const o=new Map;let a=0,i=0;return e.forEach((l,c)=>{const d=l.transitionStatus==="ending";o.set(l.id,{value:l,domIndex:c,visibleIndex:d?-1:a,offsetY:i}),i+=l.height||0,d||(a+=1)}),o}function nh(e,o){let a=0;return e.map(i=>{if(i.transitionStatus==="ending")return i;const l=a>=o;return a+=1,i.limited===l?i:{...i,limited:l}})}const fo={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,o)=>e.toastMetadata.get(o)?.value,toastIndex:(e,o)=>e.toastMetadata.get(o)?.domIndex??-1,toastOffsetY:(e,o)=>e.toastMetadata.get(o)?.offsetY??0,toastVisibleIndex:(e,o)=>e.toastMetadata.get(o)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement};class Jj extends Da{timers=new Map;areTimersPaused=!1;constructor(o){super({...o,toastMetadata:th(o.toasts)},{},fo)}setViewport=o=>{this.set("viewport",o)};syncProviderProps(o,a){const i=this.state.limit!==a;if(this.state.timeout===o&&!i)return;const l={timeout:o,limit:a};if(i){const c=nh(this.state.toasts,a);l.toasts=c,l.toastMetadata=th(c)}this.update(l)}disposeEffect=()=>()=>{this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear()};removeToast(o,a=!1){const i=fo.toastIndex(this.state,o);if(i===-1)return;const l=this.state.toasts[i];a||l?.onRemove?.();const c=[...this.state.toasts];c.splice(i,1),this.setToasts(c)}addToast=o=>{const{timeout:a,limit:i}=this.state,l=o.id||_1("toast");if(o.id){const m=fo.toast(this.state,o.id);if(m)if(m.transitionStatus==="ending")this.removeToast(o.id,!0);else{const{id:h,transitionStatus:y,...v}=o;return this.updateToastInternal(o.id,v,!0,!0),o.id}}const c={...o,id:l,updateKey:0,transitionStatus:"starting"},d=[c,...this.state.toasts];this.setToasts(nh(d,i));const g=c.timeout??a;return c.type!=="loading"&&g>0&&this.scheduleTimer(l,g,()=>this.closeToast(l)),fo.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),l};updateToast=(o,a)=>{const i=fo.toast(this.state,o);!i||i.transitionStatus==="ending"||this.updateToastInternal(o,typeof a=="function"?a(i):a,!1,!0)};updateToastInternal=(o,a,i=!1,l=!1)=>{const{timeout:c,toasts:d}=this.state,g=fo.toast(this.state,o);if(!g||g.transitionStatus==="ending")return;const m={...g,...a,...l&&{updateKey:g.updateKey+1}};this.setToasts(d.map(N=>N.id===o?m:N));const h=m.timeout??c,y=g.timeout??c,v=Object.hasOwn(a,"timeout"),S=m.transitionStatus!=="ending"&&m.type!=="loading"&&h>0,w=this.timers.has(o),T=y!==h,A=g.type==="loading";if(!S&&w){this.clearTimer(o);return}S&&(!w||T||v||A||i)&&(this.clearTimer(o),this.scheduleTimer(o,h,()=>this.closeToast(o)),fo.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=o=>{const a=o===void 0,{limit:i,toasts:l}=this.state;let c;if(a)c=l,this.clearTimers();else{const m=fo.toast(this.state,o);if(!m)return;c=[m],this.clearTimer(o)}const d=l.map(m=>a||m.id===o?{...m,transitionStatus:"ending",height:0}:m),g=nh(d,i);this.setToasts(g,!g.some(m=>m.transitionStatus!=="ending")),c.forEach(m=>{m.transitionStatus!=="ending"&&m.onClose?.()}),this.handleFocusManagement(o)};promiseToast=(o,a)=>{const i=eh(a.loading),l=this.addToast({...i,type:"loading"}),c=o.then(d=>{const g=eh(a.success,d);return this.updateToast(l,{...g,type:"success",timeout:g.timeout}),d}).catch(d=>{const g=eh(a.error,d);return this.updateToast(l,{...g,type:"error",timeout:g.timeout}),Promise.reject(d)});return{}.hasOwnProperty.call(a,"setPromise")&&a.setPromise(c),c};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(o=>{o.timeout&&(o.timeout.clear(),o.remaining=Math.max(o.remaining-(Date.now()-o.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((o,a)=>{o.remaining=o.remaining>0?o.remaining:o.delay,o.timeout??=Mn.create(),o.timeout.start(o.remaining,()=>{this.handleTimerFired(a),o.callback()}),o.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=o=>{if(o.pointerType!=="touch")return;const a=Pt(o);De(this.state.viewport,a)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(o,a,i){const l=Date.now(),d=!fo.expandedOrOutOfFocus(this.state)?Mn.create():void 0;d?.start(a,()=>{this.handleTimerFired(o),i()}),this.timers.set(o,{timeout:d,start:l,delay:a,remaining:a,callback:i})}clearTimers(){this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(o){this.timers.get(o)?.timeout?.clear(),this.timers.delete(o),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(o){this.timers.delete(o),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(o,a=o.length===0){const i={toasts:o,toastMetadata:th(o)};a&&(i.hovering=!1,i.focused=!1),this.update(i)}handleFocusManagement(o){const a=nn(We(this.state.viewport));if(!this.state.viewport||!De(this.state.viewport,a)||!lu(a))return;if(o===void 0){this.restoreFocusToPrevElement();return}const i=fo.toasts(this.state),l=fo.toastIndex(this.state,o),c=(g,m)=>{for(let h=g;h>=0&&h<i.length;h+=m)if(i[h].transitionStatus!=="ending")return i[h];return null},d=c(l+1,1)??c(l-1,-1);d?d.ref?.current?.focus():this.restoreFocusToPrevElement()}}const e_=function(o){const{children:a,timeout:i=5e3,limit:l=3,toastManager:c}=o,d=Zt(()=>new Jj({timeout:i,limit:l,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Ou(d.disposeEffect),b.useEffect(function(){return c?c[" subscribe"](({action:h,options:y})=>{const v=y.id;h==="promise"&&y.promise?d.promiseToast(y.promise,y):h==="update"&&v?d.updateToast(v,y.updates):h==="close"?d.closeToast(v):d.addToast(y)}):void 0},[d,c]),p.jsxs(j1.Provider,{value:d,children:[p.jsx(t_,{store:d,timeout:i,limit:l}),a]})};function t_(e){const{store:o,timeout:a,limit:i}=e;return we(()=>{o.syncProviderProps(a,i)},[o,a,i]),null}const n_="--toast-frontmost-height",o_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,children:d,...g}=o,m=gf(),h=on(),y=b.useRef(!1),v=b.useRef(!1),S=b.useRef(!1),w=m.useState("isEmpty"),T=m.useState("toasts"),A=m.useState("focused"),N=m.useState("expanded"),C=m.useState("prevFocusElement"),_=T[0]?.height,k=T.some(Z=>Z.transitionStatus==="ending"),j=T.filter(Z=>Z.priority==="high");b.useEffect(()=>{const Z=m.state.viewport;if(!Z||w)return;const Q=Rt(Z),O=We(Z);function F(se){se.key==="F6"&&Pt(se)!==Z&&(se.preventDefault(),m.set("prevFocusElement",nn(O)),Z?.focus({preventScroll:!0}),m.pauseTimers(),m.set("focused",!0))}function J(se){Pt(se)===Q&&(m.set("isWindowFocused",!1),m.pauseTimers())}function W(se){if(se.relatedTarget)return;const ie=Pt(se),me=nn(We(Z));(ie===Q||!De(Z,ie)||!lu(me))&&m.resumeTimers(),h.start(0,()=>m.set("isWindowFocused",!0))}return po(Ge(Q,"keydown",F),Ge(Q,"blur",J,!0),Ge(Q,"focus",W,!0),Ge(O,"pointerdown",m.handleDocumentPointerDown,!0))},[m,h,w]);function L(Z){y.current=!0;const Q=Z.relatedTarget===m.state.viewport?T.find(O=>O.transitionStatus!=="ending"&&!O.limited):void 0;Q?Q.ref?.current?.focus():m.restoreFocusToPrevElement()}function z(Z){Z.key==="Tab"&&Z.shiftKey&&Pt(Z.nativeEvent)===m.state.viewport&&(Z.preventDefault(),m.restoreFocusToPrevElement())}function I(){m.state.toasts.some(Q=>Q.transitionStatus==="ending")||S.current||!v.current||(m.state.isWindowFocused&&m.resumeTimers(),m.set("hovering",!1),v.current=!1)}b.useEffect(I,[k,m]);function U(){m.pauseTimers(),m.set("hovering",!0),v.current=!1}function Y(){m.state.isWindowFocused&&m.resumeTimers()}function B(){v.current=!0,I()}function D(Z){Z.pointerType==="touch"&&(S.current=!0)}function M(Z){Z.pointerType==="touch"&&(S.current=!1,I())}function H(){if(y.current){y.current=!1;return}A||lu(nn(We(m.state.viewport)))&&(m.set("focused",!0),m.pauseTimers())}function ee(Z){!A||De(m.state.viewport,Z.relatedTarget)||(m.set("focused",!1),Y())}const $={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:U,onMouseMove:U,onMouseLeave:B,onFocus:H,onBlur:ee,onKeyDown:z,onClick:H,onPointerDown:D,onPointerUp:M,onPointerCancel:M,style:{[n_]:_?`${_}px`:void 0}},P={expanded:N},q=!w&&C&&p.jsx(as,{onFocus:L}),K=nt("div",o,{ref:[a,m.setViewport],state:P,props:[$,g,{children:p.jsxs(b.Fragment,{children:[q,d,q]})}]});return p.jsxs(b.Fragment,{children:[q,K,!A&&j.length>0&&p.jsx("div",{style:Fu,children:j.map(Z=>p.jsxs("div",{role:"alert","aria-atomic":!0,children:[p.jsx("div",{children:Z.title}),p.jsx("div",{children:Z.description})]},Z.id))})]})}),D1=b.createContext(void 0);function yf(){const e=b.useContext(D1);if(!e)throw new Error(kt(66));return e}function oh(e,o,a){switch(e){case"up":return-a;case"down":return a;case"left":return-o;case"right":return o;default:return 0}}const s_="--toast-index",a_="--toast-offset-y",i_="--toast-height",r_="--toast-swipe-movement-x",l_="--toast-swipe-movement-y",c_="data-swipe-direction",u_={...fl,swipeDirection(e){return e?{[c_]:e}:null}},f0=40,f_=10,d0=.5,d_=1,p_=`${PO},${LO}`,h_=b.forwardRef(function(o,a){const{toast:i,render:l,className:c,swipeDirection:d=["down","right"],style:g,...m}=o,h=i.positionerProps?.anchor!==void 0;let y=[];h||(y=Array.isArray(d)?d:[d]);const v=y.length>0,S=gf(),[w,T]=b.useState(void 0),[A,N]=b.useState(!1),[C,_]=b.useState(!1),[k,j]=b.useState({x:0,y:0}),[L,z]=b.useState({x:0,y:0,scale:1}),[I,U]=b.useState(),[Y,B]=b.useState(),[D,M]=b.useState(null),H=b.useRef(null),ee=b.useRef(void 0),$=b.useRef({x:0,y:0}),P=b.useRef({x:0,y:0,scale:1}),q=b.useRef(void 0),K=b.useRef(0),Z=b.useRef(!1),Q=b.useRef({x:0,y:0}),O=b.useRef(!1),F=b.useRef({x:0,y:0}),J=b.useRef(null),W=b.useRef(null),se=S.useState("toastIndex",i.id),ie=S.useState("toastVisibleIndex",i.id),me=S.useState("toastOffsetY",i.id),pe=S.useState("focused"),be=S.useState("expanded");fs({open:i.transitionStatus!=="ending",ref:H,onComplete(){i.transitionStatus==="ending"&&S.removeToast(i.id)}});const Ce=Ne((je=!1)=>{const le=H.current;if(!le)return;const ve=le.style.height;le.style.height="auto";const he=le.offsetHeight;le.style.height=ve;function ce(){S.updateToastInternal(i.id,{ref:H,height:he,transitionStatus:void 0})}je?so.flushSync(ce):ce()});we(()=>{const je=ee.current;i.transitionStatus!=="starting"&&je===i.id||(je!==void 0&&(T(void 0),z({x:0,y:0,scale:1}),Me({x:0,y:0})),ee.current=i.id,Ce())},[Ce,i.id,i.transitionStatus]);function Me(je){F.current=je,j(je)}we(()=>()=>{W.current?.abort()},[]);function ye(je,le){const ve=xe=>xe>0?xe**d0:-(Math.abs(xe)**d0),he=je>0&&!y.includes("right")||je<0&&!y.includes("left"),ce=le>0&&!y.includes("down")||le<0&&!y.includes("up");return{x:he?ve(je):je,y:ce?ve(le):le}}const ge=Ne(je=>{if(je.pointerId!==J.current)return;J.current=null,W.current?.abort(),W.current=null,N(!1),_(!1),M(null);const le=P.current;if(je.type==="pointercancel"||Z.current){Me({x:le.x,y:le.y}),T(void 0);return}const ve=F.current,he=ve.x-le.x,ce=ve.y-le.y;let xe;for(const He of y)if(oh(He,he,ce)>f0){xe=He;break}xe?(T(xe),S.closeToast(i.id)):(Me({x:le.x,y:le.y}),T(void 0))});function Te(je){if(je.button!==0||(je.pointerType==="touch"&&S.pauseTimers(),Pt(je.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${p_}`)))return;Z.current=!1,q.current=void 0,K.current=0,J.current=je.pointerId,$.current={x:je.clientX,y:je.clientY},Q.current=$.current;const he=je.currentTarget,ce=Zj(he);P.current=ce,z(ce),Me({x:ce.x,y:ce.y}),S.set("hovering",!0),N(!0),_(!1),M(null),O.current=!0,W.current?.abort();const xe=new AbortController;W.current=xe;const He=We(he);He.addEventListener("pointerup",ge,{signal:xe.signal}),He.addEventListener("pointercancel",ge,{signal:xe.signal}),he.setPointerCapture?.(je.pointerId)}function Oe(je){if(je.pointerId!==J.current)return;je.preventDefault(),O.current&&($.current={x:je.clientX,y:je.clientY},O.current=!1);const{clientY:le,clientX:ve,movementX:he,movementY:ce}=je;(ce<0&&le>Q.current.y||ce>0&&le<Q.current.y)&&(Q.current={x:Q.current.x,y:le}),(he<0&&ve>Q.current.x||he>0&&ve<Q.current.x)&&(Q.current={x:ve,y:Q.current.y});const xe=ve-$.current.x,He=le-$.current.y,Lt=le-Q.current.y,Yt=ve-Q.current.x;let ut=D;if(!C&&Math.sqrt(xe*xe+He*He)>=d_){_(!0);const xt=y.includes("left")||y.includes("right"),_t=y.includes("up")||y.includes("down");if(xt&&_t){const Ve=Math.abs(xe),ft=Math.abs(He);ut=Ve>ft?"horizontal":"vertical",M(ut)}}let Ae;if(!q.current)ut==="vertical"?He>0?Ae="down":He<0&&(Ae="up"):ut==="horizontal"?xe>0?Ae="right":xe<0&&(Ae="left"):Math.abs(xe)>=Math.abs(He)?Ae=xe>0?"right":"left":Ae=He>0?"down":"up",Ae&&y.includes(Ae)&&(q.current=Ae,K.current=oh(Ae,xe,He),T(Ae));else{const hn=q.current,xt=oh(hn,Yt,Lt);xt>f0?(Z.current=!1,T(hn)):!(y.includes("left")&&y.includes("right"))&&!(y.includes("up")&&y.includes("down"))&&K.current-xt>=f_&&(Z.current=!0)}const Ye=ye(xe,He);let Qe=P.current.x,ct=P.current.y;const en=y.includes("left")||y.includes("right"),rn=y.includes("up")||y.includes("down");ut!=="vertical"&&en&&(Qe+=Ye.x),ut!=="horizontal"&&rn&&(ct+=Ye.y),Me({x:Qe,y:ct})}function Be(je){if(je.key==="Escape"){if(!H.current||!De(H.current,nn(We(H.current))))return;S.closeToast(i.id)}}b.useEffect(()=>{const je=H.current;if(!v||!je)return;function le(ve){J.current===null||!De(je,Pt(ve))||ve.preventDefault()}return Ge(je,"touchmove",le,{passive:!1})},[v]);function Ee(){const je=k.x-L.x,le=k.y-L.y;return{transition:A?"none":void 0,transform:A?`translateX(${k.x}px) translateY(${k.y}px) scale(${L.scale})`:void 0,[r_]:`${je}px`,[l_]:`${le}px`}}const Pe=i.priority==="high",Se={role:Pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":I,"aria-describedby":Y,"aria-hidden":Pe&&!pe?!0:void 0,onPointerDown:v?Te:void 0,onPointerMove:v?Oe:void 0,onPointerUp:v?ge:void 0,onPointerCancel:v?ge:void 0,onKeyDown:Be,inert:vl(i.limited),style:{...Ee(),[s_]:i.transitionStatus==="ending"?se:ie,[a_]:`${me}px`,[i_]:i.height?`${i.height}px`:void 0}},Re=b.useMemo(()=>({toast:i,setTitleId:U,setDescriptionId:B,recalculateHeight:Ce,visibleIndex:ie,expanded:be}),[i,U,B,Ce,ie,be]),ke={transitionStatus:i.transitionStatus,expanded:be,limited:i.limited||!1,type:i.type,swiping:A,swipeDirection:w},Ie=nt("div",o,{ref:[a,H],state:ke,stateAttributesMapping:u_,props:[Se,m]});return p.jsx(D1.Provider,{value:Re,children:Ie})}),m_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,...d}=o,{visibleIndex:g,expanded:m,recalculateHeight:h}=yf(),y=b.useRef(null);we(()=>{h();const w=y.current;if(!w||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;const T=new ResizeObserver(()=>h(!0)),A=new MutationObserver(()=>h(!0));return T.observe(w),A.observe(w,{childList:!0,subtree:!0,characterData:!0}),()=>{T.disconnect(),A.disconnect()}},[h]);const v=g>0;return nt("div",o,{ref:[a,y],state:{expanded:m,behind:v},props:d})});function z1(e){return e==null||typeof e=="boolean"||e===""?!1:Array.isArray(e)?e.some(z1):!0}function P1(e){return b.isValidElement(e)&&z1(e.props.children)}function L1(e,o,a){const{toast:i,setTitleId:l,setDescriptionId:c}=yf(),d=a==="title"?l:c,g=o??(a==="title"?i.title:i.description);return{id:Gs(e),children:g,type:i.type,setId:d}}function I1(e,o,a){const i=P1(e);return we(()=>{if(i)return a(o),()=>{a(l=>l===o?void 0:l)}},[i,o,a]),i?e:null}const g_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,children:g,...m}=o,{id:h,children:y,type:v,setId:S}=L1(d,g,"description"),T=nt("p",o,{ref:a,state:{type:v},props:{...m,id:h,children:y}});return I1(T,h,S)}),y_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,id:d,children:g,...m}=o,{id:h,children:y,type:v,setId:S}=L1(d,g,"title"),T=nt("h2",o,{ref:a,state:{type:v},props:{...m,id:h,children:y}});return I1(T,h,S)}),b_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,disabled:d,nativeButton:g=!0,...m}=o,h=gf(),{toast:y,expanded:v}=yf(),[S,w]=b.useState(!1),{getButtonProps:T,buttonRef:A}=Co({disabled:d,native:g}),N={type:y.type};return nt("button",o,{ref:[a,A],state:N,props:[{"aria-hidden":!v&&!S,onClick(){h.closeToast(y.id)},onFocus(){w(!0)},onBlur(){w(!1)}},m,T]})}),v_=b.forwardRef(function(o,a){const{render:i,className:l,style:c,disabled:d,nativeButton:g=!0,...m}=o,{toast:h}=yf(),y=h.actionProps?.children??m.children,{getButtonProps:v,buttonRef:S}=Co({disabled:d,native:g}),w={type:h.type},T=nt("button",o,{ref:[a,S],state:w,props:[m,h.actionProps,v,{children:y}]});return P1(T)?T:null}),x_=b.forwardRef(function(o,a){return p.jsx(Tw,{ref:a,...o})});function S_(){const e=gf(),o=e.useState("toasts");return b.useMemo(()=>({toasts:o,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[o,e])}function w_(){const e=new Set;function o(a){e.forEach(i=>i(a))}return{" subscribe":function(i){return e.add(i),()=>{e.delete(i)}},add(a){const i=a.id||_1("toast"),l={...a,id:i,transitionStatus:"starting"};return o({action:"add",options:l}),i},close(a){o({action:"close",options:{id:a}})},update(a,i){o({action:"update",options:{id:a,updates:i}})},promise(a,i){let l=a;return o({action:"promise",options:{...i,promise:a,setPromise(c){l=c}}}),l}}}function p0({icon:e,title:o,children:a}){return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-fg-muted",children:[e?p.jsx("div",{className:"text-fg-subtle",children:e}):null,p.jsx("div",{className:"text-[15px] font-semibold text-fg",children:o}),a?p.jsx("div",{className:"max-w-sm",children:a}):null]})}const Ma=w_();function T_(e){if(e.repeat||e.key!=="Enter"&&e.key!==" ")return;const o=e.currentTarget.closest("[data-toast]")??e.currentTarget,a=o.ownerDocument.defaultView;a&&Mk(a,e.key,i=>i instanceof a.Node&&o.contains(i))}function E_(){const{toasts:e}=S_();return e.map(o=>p.jsxs(h_,{toast:o,"data-toast":"",className:"pointer-events-auto flex w-80 items-start gap-3 rounded-lg bg-surface p-3 text-fg shadow-popup transition-[opacity,transform] data-[starting-style]:translate-y-2 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",children:[p.jsxs(m_,{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[p.jsx(y_,{className:"text-[13px] font-semibold"}),p.jsx(g_,{className:"text-xs text-fg-muted"}),o.actionProps?p.jsx(v_,{className:"mt-1 self-start rounded px-2 py-0.5 text-xs font-medium text-accent hover:bg-hover"}):null]}),p.jsx(b_,{"aria-label":"Dismiss",onKeyDown:T_,className:"rounded p-0.5 text-fg-muted hover:bg-hover",children:p.jsx(Tl,{className:"size-3.5"})})]},o.id))}function C_({children:e}){return p.jsxs(e_,{toastManager:Ma,timeout:4e3,children:[e,p.jsx(x_,{children:p.jsx(o_,{className:"pointer-events-none fixed bottom-4 right-4 z-[1100] flex flex-col gap-2",children:p.jsx(E_,{})})})]})}const R_=["a[href]","button","iframe","input","select","textarea","summary","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])","[tabindex]"].join(", "),A_="audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function O_(e){return!(e.tabIndex>=0||!e.hasAttribute("tabindex")&&e.matches(A_))||e.getAttribute("aria-hidden")==="true"||e.matches(":disabled")?!1:typeof e.checkVisibility!="function"||e.checkVisibility({visibilityProperty:!0})}function k_(e){return Array.from(e.querySelectorAll(R_)).filter(O_)}function N_(e){const o=a=>!/visible|hidden|clip/.test(a);return e.scrollWidth>e.clientWidth+1&&o(e.overflowX)||e.scrollHeight>e.clientHeight+1&&o(e.overflowY)}function M_(e){const[o,a]=b.useState(!1);return b.useLayoutEffect(()=>{const i=e.current,l=i?.ownerDocument.defaultView;if(!i||!l)return;const c=()=>{const y=l.getComputedStyle(i);a(N_({scrollWidth:i.scrollWidth,clientWidth:i.clientWidth,scrollHeight:i.scrollHeight,clientHeight:i.clientHeight,overflowX:y.overflowX,overflowY:y.overflowY}))};if(c(),typeof l.ResizeObserver!="function")return;const d=new l.ResizeObserver(c),g=new Set,m=y=>{if(y.nodeType!==1)return;const v=y;if(l.getComputedStyle(v).display==="contents"){v.childNodes.forEach(m);return}g.has(v)||(g.add(v),d.observe(v))};d.observe(i),i.childNodes.forEach(m);const h=new l.MutationObserver(y=>{for(const v of y)v.addedNodes.forEach(m);for(const v of g)i.contains(v)||(d.unobserve(v),g.delete(v));c()});return h.observe(i,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),h.disconnect()}},[e]),o}b.forwardRef(function({label:o,className:a,...i},l){const c=b.useRef(null),d=b.useCallback(w=>{c.current=w,typeof l=="function"?l(w):l&&(l.current=w)},[l]),g=M_(c),[m,h]=b.useState(!1),[y,v]=b.useState(null);b.useLayoutEffect(()=>{const w=c.current,T=w?.ownerDocument.defaultView;if(!g||!w||!T)return;const A=()=>{h(k_(w).length===0),v(w.closest('[role="dialog"], [role="alertdialog"]')?.getAttribute("aria-labelledby")??null)};A();const N=new T.MutationObserver(A);return N.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex","disabled","hidden","href","contenteditable"]}),()=>N.disconnect()},[g]);const S=g&&m;return p.jsx("div",{ref:d,...S?{role:"group",tabIndex:0,"aria-labelledby":o===void 0?y??void 0:void 0,"aria-label":o??(y===null?"Panel content":void 0)}:{},className:lt(S&&"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",a),...i})});const j_={blur:{label:"Blur",unit:"px",min:0,max:200,step:1,identity:0,initial:4},brightness:{label:"Brightness",unit:"%",min:0,max:500,step:1,identity:100,initial:120},contrast:{label:"Contrast",unit:"%",min:0,max:500,step:1,identity:100,initial:120},grayscale:{label:"Grayscale",unit:"%",min:0,max:100,step:1,identity:0,initial:100},saturate:{label:"Saturate",unit:"%",min:0,max:500,step:1,identity:100,initial:150},"hue-rotate":{label:"Hue rotate",unit:"deg",min:-360,max:360,step:1,identity:0,initial:90},invert:{label:"Invert",unit:"%",min:0,max:100,step:1,identity:0,initial:100},sepia:{label:"Sepia",unit:"%",min:0,max:100,step:1,identity:0,initial:100},opacity:{label:"Opacity",unit:"%",min:0,max:100,step:1,identity:100,initial:50}};[...Object.keys(j_)];const __={cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",copyLink:"Copy link",loading:"Loading…",justNow:"just now",never:"never",agent:"Agent",delete:"Delete",rename:"Rename",duplicate:"Duplicate",copyName:"Name of the copy",documentTabs:"Document tabs",pin:"Pin",unpin:"Unpin",open:"Open",save:"Save",updated:"Updated {when}",pinned:"Pinned",unpinned:"Unpinned",duplicated:"Duplicated",couldNotPin:"Could not pin: {error}",couldNotUnpin:"Could not unpin: {error}",couldNotRename:"Could not rename: {error}",couldNotDuplicate:"Could not duplicate: {error}",couldNotDelete:"Could not delete: {error}",statusNone:"No session",statusWorking:"Working",statusIdle:"Idle",statusWaiting:"Waiting",statusOffline:"Offline",working:"{agent} is working…",artifactOptions:"Artifact options",artifactName:"Artifact name",comments:"Comments",doneCommenting:"Done commenting",openComment:"1 open comment",openComments:"{count} open comments",commentOptions:"Comment options",showAllComments:"Show all comments",hideComments:"Hide comments",share:"Share",sharedOnNetwork:"Shared with your network",onlyThisComputer:"Only this computer",ask:"Ask {agent}",hideAsk:"Hide",openHarnessSession:"Open the {harness} session",messageAgent:"Message {agent} about this artifact",switchArtifact:"Switch artifact",inThisSession:"In this session",recent:"Recent",allArtifacts:"All artifacts",export:"Export",openSession:"Open session",offline:"offline",versionHistory:"Version history",peopleHere:"Here now",peopleHereNames:"Here now: {names}",peopleMore:"+{count}",youOtherTab:"You, in another tab",yourOtherTab:"your other tab",follow:"Follow",stopFollow:"Stop",followName:"Follow {name}",stopFollowingName:"Stop following {name}",followingName:"Following {name}",followingYou:"Following you",followingToast:"Following {name}. Press Escape to stop.",stoppedFollowingLeft:"Stopped following: {name} left.",openInNewTab:"Open in new tab",refresh:"Refresh",storage:"Storage",inThisFolder:"{size} in this folder",copyPath:"Copy path",linkCopied:"Link copied",linkCopiedNetwork:"Link copied. It is shared on your network now, so others there can open it.",pathCopied:"Path copied",deleteTitle:'Delete "{title}"?',deleteBody:"It leaves your artifacts. Its folder stays where it is: {root}",shareTitle:"Share this artifact",peopleWithAccess:"People with access",joinedPeople:"People who joined",noneJoined:"Nobody has joined yet. Send someone a link below.",online:"Online",seenAgo:"Seen {when}",guestPaused:"Link off: no access until it is back on",changeRole:"Change {name}'s role",roleLinkOff:"Link off",remove:"Remove",removeGuest:"Remove {name}",removeTitle:"Remove {name}?",removeBody:"They lose access to this artifact. They can join again with a link.",you:"(you)",thisComputer:"This computer",owner:"Owner",generalAccess:"General access",onLan:"Anyone on your network with a link",onlyHereSub:"Nobody else can open the links.",onLanSub:"People on the same Wi-Fi or LAN open it with a link; the link sets their role.",onNetworkAt:"On this network at {addresses}",onTailnet:"Tailscale: {address}, for people on your tailnet from any network (copy it from a link's More menu)",noAddress:"This computer has no local network address.",whereOff:"Only this computer can open these links for now. Copying one opens this to your network.",inviteLinks:"Invite links",roleEditor:"Editor",roleCommenter:"Commenter",roleViewer:"Viewer",linkEditor:"Can edit",linkCommenter:"Can comment",linkViewer:"Can view",noteEditor:"Edit and comment",noteCommenter:"Comment, no edits",noteViewer:"Read only",linkOff:"Off: nobody can join with it",turnOn:"Turn on",more:"More",moreFor:"More: {role}",copyTailnet:"Copy Tailscale link",copyTailnetNote:"For people on your tailnet, off this network ({address})",turnOnLink:"Turn on link",turnOffLink:"Turn off link",turnOffNote:"Whoever joined with it loses access until it is back on",resetLink:"Reset link",resetNote:"A new address; whoever joined with the old one is removed",resetTitle:'Reset the "{role}" link?',resetBody:"The old link stops working and the people who joined with it lose access.",plainHttp:"This is plain HTTP: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a link that went further.",cannotShare:"{type} pages can't be shared on the network yet: only this computer opens it.",shareError:"Could not do that: {error}",shareNoAnswer:"The sharing settings did not load: the Open Artifact service is not answering. Try again in a moment.",sendingTitle:"Sending this to someone?",sendingBody:"Share the link instead of a file and they will always have the latest changes.",invitePeople:"Invite people",allLinksOff:"All the links are off. Invite people to turn one on.",joinsAs:"People who open this link join as {role}. Invite people to give another role.",standaloneShare:"Manage network sharing in the Open Artifact app or with the share CLI command.",onlyHereLink:"Only this computer can open the link.",nothingToExport:"Nothing to export yet.",exportOptions:"Asks for options first",archiveLabel:"Whole folder (.zip)",destinationDescription:"Asks {agent} to export it there",destinationRequestLabel:"Export to {label}",destinationSent:"Asked {agent} to export to {label}",archiveDescription:"Everything here, to back up or move",archiveStarted:"Downloading {name}",archiveHint:"The whole folder in one zip, to back up, move to another computer or send to someone. Unzip it and open it with the same type to carry on; share links and this computer's server state are left out.",archiveTooLarge:"The folder is over what a zip holds (4 GiB or 65,535 files): copy the folder itself instead.",archiveUnsupported:"{type} folders can't be zipped here: copy the folder itself instead.",archiveFailed:"Could not zip the folder: {error}",exportBusy:"Another export is running. Try {label} again in a moment.",exportUnsupported:"{label} can't be exported right now.",exportFailed:"Could not export {label}.",saving:"Saving…",reconnecting:"Reconnecting…",notSaved:"Not saved",notSavedTitle:"The page could not save its last changes.",saveRetry:"Couldn't save — retry",readOnly:"Read-only",readOnlyTitle:"Nothing can be saved here",leaveLosesWork:"Leave? Changes that are not saved yet will be lost.",actionSaveNow:"Save now",actionOpenFind:"Find",actionUndo:"Undo",actionRedo:"Redo",actionEditPage:"Edit page",actionUsePage:"Use this page",actionCommentSelection:"Comment on selection",actionOpenPageList:"Pages",actionHandOffCode:"Hand off to code",whyOlderVersion:"You are viewing an older version",whyAgentWorking:"{agent} is working",whyDraftOpen:"Close the open draft first",whyCommentsOn:"Turn off comment mode first",whyNeedsAgent:"Needs an agent session",whyUnsaved:"Save first",whyOther:"Not available right now",noOwner:"No session owns this artifact",noOwnerNote:"What you send waits until a session takes it over: one you pick here, or one that adopts or writes it.",assignTo:"Hand it to a session",assignPick:"Session to hand it to",assignButton:"Hand over",assigning:"Handing over…",assigned:"Handed to {session}: it has what waited, and gets what you send from now on.",couldNotAssign:"Could not hand it over: {error}",noSessionsOnline:"No agent session is online now. To have one take it over, paste this into it:",copyTakeOver:"Copy take-over prompt",ownerNote:"Messages go to the {harness} session that made this artifact.",agentIdle:"{agent} is idle",agentWaiting:"{agent} is waiting",sessionOffline:"The session is offline",offlineNote:"{agent} sees what you send the next time the {harness} session works.",askPlaceholder:"What should change?",sendToAgent:"Send to {agent}",sendToConversation:"Put in the {agent} conversation",sending:"Sending…",sent:"Sent.",sentInbox:"{agent} will see it the next time the session works.",sentDrafted:"It is in the {agent} conversation now: send it there.",notDelivered:"Not delivered.",notSent:"Not sent: {error}",viaDelivered:"delivered",viaDrafted:"in the conversation, for you to send",viaInbox:"waiting for the session",viaFailed:"not delivered",askCloudOnline:"{agent} is connected: it gets this now.",askCloudOffline:"{agent} will get this when its computer is back online.",askCloudMcp:"{agent} will see this the next time it works on the artifact.",askCloudNone:"No agent is connected to this site for you. Connect a computer or an MCP client; the request waits until then.",askCloudNoneOther:"The owner has no agent connected to this site. The request waits until they connect one.",sentCloudDelivered:"Delivered: {agent} has it now.",sentCloudOffline:"Sent. {agent} will get it when its computer is back online.",sentCloudMcp:"Sent. {agent} will see it the next time it works on the artifact.",sentCloudNone:"Sent. It waits until an agent is connected.",viaWaitingAgent:"waiting for the agent",statusConnected:"Connected",statusNoAgent:"No agent",emptyTitle:"This artifact is empty",emptyBody:"Nothing of {type} has been written to {root} yet. An agent writes it: send it this.",startSession:"Start a session with {agent}",startBlank:"Start blank",startingBlank:"Starting…",emptyOrBlank:"Or start it blank and write it yourself: it opens in its editor.",couldNotStartBlank:"Could not start it blank: {error}",promptCopied:"Copied: paste it into any agent session that has the Artifact tool.",sentToSession:"Sent to a new session.",problemTitle:"This artifact cannot open here",noPage:"No page.",readOnlyNewer:"Read-only here: {type} {release} wrote this artifact and this computer has {version}. Update Open Artifact (open-artifact runtime update, or update the app it came with) to edit it.",folder:"Folder: {root}",askToLook:"Ask {agent} to look",problemAsk:"The artifact page could not open: {problem}",noBoot:"No artifact to show. Open one from the home page.",tryAgain:"Try again",bootFailed:"The page did not open: {error}",frameNotOpen:"The page is not open any more (its server may have restarted), and opening it again did not work.",frameNotGranted:"This page is not open to you here any more.",homeTitle:"Open Artifact",homeSub:"The artifacts and types every agent on this computer shares.",artifacts:"Artifacts",types:"Types",newArtifact:"New artifact",moreActions:"More actions",backToSession:"Back to session",noArtifacts:"No artifacts yet. Ask an agent to make one with the Artifact tool, or start one here.",pageOpen:"Open now",projectOf:"Made for the project {folder}",projectFilter:"Project",projectAll:"All",projectNone:"No project",typeMissing:"Type not installed",deleted:'Deleted "{title}". Its folder stays.',undo:"Undo",restored:"Restored",couldNotRestore:"Could not restore: {error}",couldNotLoad:"Could not load: {error}",typeRoots:"Type roots: {roots}",noTypes:"No types found.",disabled:"Disabled",shadowedBy:"Overridden by {root}",newOf:"New {type}",create:"Create",createBlank:"Create and open",createType:"Type",createGroupBlank:"Start right away",createGroupBlankHint:"Opens blank in its editor: write it yourself, with or without an agent.",createGroupAgent:"Make with an agent",createGroupAgentHint:"An agent builds these: make it, then hand it to an agent.",createGroupCustom:"Your types",createGroupCustomHint:"Types made on this computer.",title:"Title",folderOptional:"Folder (optional)",folderHint:"Default: a new folder in the home workspace",needTitle:"Give it a title first.",couldNotCreate:"Could not create it: {error}",renameArtifact:"Rename artifact",cannotCreateYet:"No type that can be made here is installed and turned on.",newType:"New type",newTypeDescription:"A folder with a page, a manifest and a SKILL.md. Your agent builds it out from there.",typeId:"Id",typeIdHint:"Lower case letters, digits and dashes, e.g. trip-planner",typeName:"Name (optional)",typeTemplate:"Template",templatePage:"Page",templatePageHint:"The content is files beside the page",templateData:"Data",templateDataHint:"The content is records in a database",typeScope:"Where",scopeUser:"For me",scopeUserHint:"Your own types folder, in every project",scopeProject:"This project",scopeProjectHint:"The project folder’s .agents/artifact-types, shared with it",projectFolder:"Project folder",projectFolderHint:"An absolute path, e.g. /Users/me/code/app",needTypeId:"Give it an id first.",needProjectFolder:"Give the project folder as an absolute path.",couldNotMakeType:"Could not make the type: {error}",typeMade:"Type {id} is ready",typeMadeAt:"Its folder:",typeMadePrompt:"Ask your agent to build it out:",typeCheckWarnings:"{count} warnings from types check",done:"Done",typesExplain:"A type is a folder: your own in {user}, a project’s in its .agents/artifact-types (limited until you trust the project), and the built-in ones. A type of the same id in a nearer folder overrides the others.",typesExplainNoUser:"A type is a folder: a project’s in its .agents/artifact-types (limited until you trust the project), and the built-in ones.",projectTypes:"Project {dir}",projectUntrusted:"Not trusted: its types work, but their pages reach only their own origin and the sites they list, and none starts a program of its own, until you trust it.",trustProject:"Trust this project",untrustProject:"Stop trusting",couldNotTrust:"Could not change trust: {error}",turnTypeOn:"Turn {type} on",turnTypeOff:"Turn {type} off",couldNotToggleType:"Could not change the type: {error}",sourceBuiltin:"built in",sourceLocal:"yours",sourceInstalled:"installed",typeCapabilities:"Uses: {list}",typeNetwork:"Reaches: {list}",noNetwork:"Does not reach the network",installedFrom:"From {source}",installType:"Install type",installTypeDescription:"A type package (.oatype) someone shared: choose the file, or give its https address. You see what it is before anything is installed.",installTypeCheck:"Read this before you install it: its page runs in your browser, and agents are given its SKILL.md.",chooseTypePackage:"Choose a .oatype file",typePackageUrl:"Or its address",readPackage:"Read",installAs:"Install as (optional)",installAsHint:"Another id, when one of that id is installed already or you want it under another name",needPackage:"Choose a file or give an address first.",couldNotReadPackage:"Could not read the package: {error}",packageId:"Id",packageSource:"From",packagePublisher:"Published by",packagePublisherText:"{name} (their account on {site})",packageSite:"Site",packageSiteRemote:"{site}, through your remote {remote}",packageSitePublic:"{site}, its public address, without signing in",packageCapabilities:"Page may use",noCapabilities:"Nothing declared",packageNetwork:"May reach",packageReplaces:"Replaces",packageReplacesText:"{version}, from {source}",packageSkill:"Its SKILL.md ({path}, {chars} characters, {lines} lines), what agents are told when they make one:",packageNoSkill:"It has no SKILL.md.",packageThirdParty:"Its SKILL.md, title and description are the publisher’s. Agents are told they cannot grant permissions or widen a task.",installTypeAs:"Install {id}",updateTypeTitle:"Update {id}",updateType:"Update",uninstallType:"Uninstall",uninstallConfirm:"Uninstall {type}? Its artifacts stay in their folders; they open again once it is installed again.",typeInstalled:"{type} {version} is installed",typeUpdated:"{type} is now {version}",typeUninstalled:"{type} is uninstalled",couldNotInstall:"Could not install it: {error}",couldNotUninstall:"Could not uninstall it: {error}",cannotShareCloud:"{type} artifacts can't be shared here yet.",signIn:"Sign in",signOut:"Sign out",signOutFailed:"Could not sign out: {error}",accountOf:"Account: {name}",sharedWithOthers:"Shared with others",addPeople:"Add people",addPeoplePlaceholder:"Email, or @domain for everyone there",add:"Add",addInvalid:"Not an email address or @domain: {entries}",roleFor:"Role for the people you add",memberPending:"Invited: has not signed in yet",memberDomain:"Everyone at {domain}",memberGroup:"Group",removeAccess:"Remove access",removeMemberBody:"They lose access to this artifact. You can add them again.",noMembers:"Nobody else is added yet.",accessRestricted:"Restricted",accessRestrictedSub:"Only the people added here can open it.",accessLink:"Anyone with the link",accessLinkSub:"Whoever has one of the links below gets its role.",accessPublic:"Public",accessPublicSub:"Anyone can open it as a viewer; the links below give more.",shareSettings:"Settings",viewersCanExport:"Viewers can download and export",editorsCanAsk:"Editors can ask {agent}",ownedBy:"Owned by {name}",yourRole:"Your role: {role}",onlyOwnerShares:"Only the owner can change who has access.",emptyBodyCloud:"Nothing of {type} has been written yet. An agent writes it: send it this.",homeSubCloud:"Your artifacts and the ones shared with you.",noArtifactsCloud:"No artifacts yet. Publish one from an agent with the Artifact tool, or ask someone to share one with you.",pubTitle:"Publish to the web",pubIntro:"Give it a web address that works even when this computer is off. You choose who can open it there.",pubDataNote:"Publishing this dashboard publishes its data too: this computer runs its live queries and puts the rows on the site, where everyone who can open it sees them.",pubDataPending:"Its live data isn’t on the site yet: the page there shows no figures until you publish the data.",pubDataConfirm:"Publish its data",pubDataAsOf:"Data on the site as of {time}, refreshed from this computer.",pubDataNone:"Its data is published; the first rows are on their way.",pubDataFailed:"The last refresh failed: {reason}",pubDataRefresh:"Refresh now",pubDataRefreshing:"Refreshing…",pubDataStop:"Stop publishing data",pubDataStopTitle:"Stop publishing its data?",pubDataStopBody:"The rows are removed from {host} and this computer stops refreshing them. The dashboard stays published there, with no figures until you publish its data again.",pubConnectSite:"Connect a site…",pubConnectAnother:"Connect another site…",pubAddress:"Site address",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"The web address of an Open Artifact site you have an account on.",pubName:"Name",pubNameHint:"A short name to tell your sites apart, like work.",pubConnect:"Connect",pubConnecting:"Connecting…",pubCodeTitle:"Approve this computer on {host}",pubCodeBody:"Check that the page shows this code, then approve.",pubCodeOpened:"The approval page opened in your browser. If you don’t see it, open it here:",pubOpenApproval:"Open approval page",pubWaitingApproval:"Waiting for you to approve…",pubConnected:"Connected to {host} as {name}.",pubTryAgain:"Try again",pubSignedInAs:"Signed in as {name}",pubStateConnected:"Connected",pubStateConnecting:"Connecting…",pubStateUnreachable:"Can't be reached",pubStateSignedOut:"Signed out",pubPublish:"Publish",pubPublishing:"Publishing…",pubReconnect:"Connect again",pubPublishedAt:"Published on {host}",pubOpen:"Open",pubManage:"Who can open it is set on its web page: open it and use Share there.",pubManageLink:"Manage access on the web",pubOpensThere:"Opening it on this computer now takes you to its web address while the site can be reached.",pubUnpublish:"Unpublish",pubUnpublishing:"Unpublishing…",unpubTitle:"Unpublish this artifact?",unpubBody:"The web copy goes to the trash on {host} and its web address stops working. This folder stays on this computer, with the latest changes from the web.",pubInSync:"Up to date",pubInSyncAt:"Up to date · synced {when}",pubWaitingOne:"1 change waiting to be sent",pubWaiting:"{count} changes waiting to be sent",pubOffline:"Can't reach {host}: changes are kept here and sent when it is back.",pubSignedOutSync:"Signed out of {host}: changes are kept here. Connect again to send them.",pubSyncFailed:"The last sync failed: {error}",pubCloudMark:"Published to the web",pubCloudAt:"Published at {url}",pubHostEmpty:"Type the site’s address.",pubHostInvalid:"That is not a web address. Type it like https://artifacts.example.com.",pubHostNotHttps:"The address must start with https:// (plain http only works for this computer or a private network, like 192.168.1.20, nas.lan or 192-168-1-20.nip.io).",pubInsecureWarning:"Plain http: what you publish travels unencrypted. Use it only on a network you trust.",pubAutoSwitch:"Publish new artifacts automatically",pubAutoHint:"Artifacts created from now on go to {host} by themselves. Earlier ones stay as they are.",pubAutoNoSite:"Choose a default site to publish to.",pubDefaultSite:"Default site",pubDefaultMark:"default",pubAutoPublishing:"Being published to {host} automatically…",pubAutoSignedOut:"Waiting to be published to {host}: this computer is not signed in there yet.",pubAutoUnreachable:"Waiting to be published: can't reach {host}. It is tried again by itself.",pubAutoFailed:"Not published to {host} yet: {error} It is tried again by itself.",pubApprovalTitle:"Approve this computer on {host}",pubApprovalBody:"This computer was set up to publish to {host}. Open the approval page, check that it shows this code, and approve.",pubCloudSettingsFailed:"Could not change the setting: {error}",pubNameInvalid:"Use letters, digits, - and _ (up to 32), like work.",pubNameTaken:"That name is already used for another site. Choose another name.",pubNoDaemon:"Open Artifact on this computer did not answer. Check that it is running, then try again.",pubConnectDenied:"The connection was refused on {host}. Try again if that was a mistake.",pubConnectExpired:"The code ran out before it was approved. Try again and approve within a few minutes.",pubConnectUnreachable:"Can't reach {host}. Check the address and your connection, then try again.",pubConnectNotHost:"{host} does not look like an Open Artifact site. Check the address.",pubConnectFailed:"Could not connect: {error}",pubIdTaken:"{host} already has an artifact with this one’s id that is still published there (maybe from another computer) or is someone else’s. Unpublish it there first (one you unpublished is replaced when you publish again), or duplicate this artifact and publish the copy.",pubAlreadyElsewhere:"It is already published to another site. Unpublish it there first.",pubTooLarge:"It is too large for {host}. Remove big files from its folder, then try again.",pubSignedOut:"You are signed out of {host}. Connect again, then try again.",pubNotAllowed:"{host} did not allow it: your account there may not be able to publish.",pubUnreachable:"Can't reach {host} right now. Try again once it is back.",pubUnsupported:"{host} cannot take this kind of artifact yet.",pubFailed:"Could not publish: {error}",unpubUnreachable:"Can't reach {host} to bring its latest version here first. Try again once it is back.",unpubFailed:"Could not unpublish: {error}",openOnWeb:"Open on the web",copyWebLink:"Copy web link",webLinkCopied:"Web link copied",signOutAccess:"Sign out, here and of your organisation’s sign-in",upload:"Upload",uploadHint:"Upload an artifact: the .zip from “Whole folder (.zip)” in its Export tab.",uploadDrop:"Drop the .zip to upload it",uploadSending:"Uploading {name}… {percent}%",uploadSendingSize:"Uploading {name}…",uploadChecking:"Checking {name}…",uploadOpening:"Uploaded {name}. Opening it…",uploadNotZip:"That file is not a .zip. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadNotArtifact:"That zip is not an Open Artifact folder. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadTooLargeLimit:"That zip is too large: this site takes up to {limit}. Remove big files from the folder, then try again.",uploadTooLarge:"That zip is too large for this site. Remove big files from the folder, then try again.",uploadTooLargeSaid:"That zip is too large for this site: {error} Remove big files from the folder, then try again.",uploadSignedOut:"You are signed out. Sign in again, then upload it.",uploadNotAllowed:"This site does not let you upload artifacts.",uploadConflict:"Something on the site got in the way. Try again.",uploadTypeMissing:"This site cannot open {type} artifacts yet.",uploadBusy:"Too many tries at once. Wait a moment, then try again.",uploadNoAnswer:"The site did not answer. Check your connection, then try again.",uploadFailed:"Could not upload it: {error}",dismiss:"Dismiss",trash:"Trash",trashEmpty:"The trash is empty.",trashNote:"Nobody it was shared with can open an artifact while it is in the trash.",trashedWhen:"Moved to the trash {when}",trashKeptDays:"Deleted for good after {days} days in the trash.",trashKeptOneDay:"Deleted for good after 1 day in the trash.",trashKeptForever:"Kept here until you delete it forever.",restore:"Restore",restoredTitle:'Restored "{title}"',deleteForever:"Delete forever",purgeTitle:'Delete "{title}" forever?',purgeBody:"This cannot be undone. It is removed from this site, and everyone it was shared with loses access to it.",purged:'Deleted "{title}" forever',purgeNotTrashed:"It is not in the trash any more.",purgeGone:"It is already gone.",couldNotPurge:"Could not delete it: {error}",moveToTrash:"Move to trash",movedToTrash:'Moved "{title}" to the trash.',siteTypesNote:"Types people on this site published from their computers. An agent connected to this site can make artifacts of them; you can also install one on your computer.",siteTypesYouMayPublish:"You may publish one here: open-artifact types publish <id> --remote <this site>.",siteTypesNoPublish:"Publishing here: {why}",siteTypesEmptyTitle:"No types yet",siteTypesEmpty:"Nobody has shared a type with everyone on this site yet.",siteTypesBack:"All types on this site",siteTypeBy:"By {name}, updated {when}",siteTypeUnnamedPublisher:"someone without a name",siteTypePrivate:"Private",siteTypeLink:"Anyone with the link",siteTypeSite:"Everyone on this site",siteTypeDelisted:"Unpublished",siteTypeDelistedNote:"Unpublished: it is no longer listed and no new artifacts can be made of it. Artifacts of it still open.",siteTypeDelistedManage:"To list it again, publish it again from your computer: open-artifact types publish {id} --remote <this site>.",siteTypePublisher:"Published by",siteTypeUpdated:"Updated",siteTypeInstall:"Install on your computer",siteTypeInstallNote:"Run this in a terminal on your computer. It shows everything above again and asks before installing.",siteTypeDownload:"Download the package (.oatype)",siteTypeSkillNote:"What agents are told when they make an artifact of this type. Written by its publisher.",siteTypeNoSkill:"This type has no SKILL.md.",siteTypeManage:"Manage",siteTypeWhoSees:"Who sees it",siteTypeVisibilityNote:"Private: only you and the site admins. Anyone with the link: whoever has this page’s address. Everyone on this site: listed for every member.",siteTypeUnpublish:"Unpublish",siteTypeUnpublishTitle:'Unpublish "{name}"?',siteTypeUnpublishBody:"Nobody can make new artifacts of it. If artifacts of it exist, they keep opening and it is only delisted; otherwise it is removed from this site.",siteTypeRemoved:'Removed "{name}" from this site',siteTypeDelistedNow:'Unpublished "{name}": {count} artifact(s) of it keep opening',siteTypeCouldNot:"Could not do that: {error}",siteTypeGoneTitle:"Removed",siteTypeGone:"This type is no longer on this site.",connectedSitesLoading:"Reading the types on your sites…",connectedSitesNone:"Types on the sites you connect appear here. To connect a site, open an artifact, choose Publish to the web, then Connect a site….",connectedSitesFailed:"Could not read the types on your sites: {error}",connectedSiteTitle:"On {name} ({host})",connectedSiteNote:"Types people published to this site. Installing one shows you everything about it first, and nothing is installed until you confirm.",connectedSiteEmpty:"No types on this site are shared with you yet.",connectedSiteRetry:"Retry",siteTypeInstallHere:"Install",siteTypeUpdateHere:"Update to {version}",siteTypeUpdateNote:"Installed here: {local} (as {id}). On the site: {version}.",siteTypeInstallAsOther:"Install under another id",siteTypeClashNote:"Another type on this computer is called {id}: install this one under another id.",siteTypeInstalledHere:"Installed",siteTypeInstalledAs:"Installed as {id}",siteTypePublishedHere:"Published from this computer",siteTypeOpenPage:"Open its page",siteTypeClashHint:"Another type on this computer has this id. Give this one another id under Install as, then press Read.",shareOnNetwork:"Share on this network instead",shareOnNetworkSub:"Links from here open this computer’s copy, not the web page."},D_={cancel:"取消",close:"关闭",copy:"复制",copied:"已复制",copyLink:"复制链接",loading:"加载中…",justNow:"刚刚",never:"从未",agent:"Agent",delete:"删除",rename:"重命名",duplicate:"复制一份",copyName:"副本名称",documentTabs:"文档标签页",pin:"置顶",unpin:"取消置顶",open:"打开",save:"保存",updated:"更新于 {when}",pinned:"已置顶",unpinned:"已取消置顶",duplicated:"已复制一份",couldNotPin:"没能置顶:{error}",couldNotUnpin:"没能取消置顶:{error}",couldNotRename:"没能重命名:{error}",couldNotDuplicate:"没能复制:{error}",couldNotDelete:"没能删除:{error}",statusNone:"无会话",statusWorking:"工作中",statusIdle:"空闲",statusWaiting:"等待中",statusOffline:"离线",working:"{agent} 正在工作…",artifactOptions:"作品选项",artifactName:"作品名",comments:"评论",doneCommenting:"结束评论",openComment:"1 条未解决的评论",openComments:"{count} 条未解决的评论",commentOptions:"评论选项",showAllComments:"显示全部评论",hideComments:"隐藏评论",share:"分享",sharedOnNetwork:"已分享到局域网",onlyThisComputer:"仅这台电脑",ask:"问 {agent}",hideAsk:"收起",openHarnessSession:"打开 {harness} 会话",messageAgent:"就这个作品给 {agent} 发消息",switchArtifact:"切换作品",inThisSession:"这个会话里的",recent:"最近",allArtifacts:"所有作品",export:"导出",openSession:"打开会话",offline:"离线",versionHistory:"版本历史",peopleHere:"正在查看",peopleHereNames:"正在查看:{names}",youOtherTab:"你(另一个标签页)",yourOtherTab:"你的另一个标签页",follow:"跟随",stopFollow:"停止",followName:"跟随 {name}",stopFollowingName:"停止跟随 {name}",followingName:"正在跟随 {name}",followingYou:"正在跟随你",followingToast:"正在跟随 {name},按 Esc 停止。",stoppedFollowingLeft:"{name} 已离开,停止跟随。",openInNewTab:"在新标签页打开",refresh:"刷新",storage:"存储",inThisFolder:"这个文件夹 {size}",copyPath:"复制路径",linkCopied:"链接已复制",linkCopiedNetwork:"链接已复制,已顺手分享到局域网,同一网络的人可以打开。",pathCopied:"路径已复制",deleteTitle:"删除「{title}」?",deleteBody:"它会移出作品列表,文件夹保留在原处:{root}",shareTitle:"分享这份内容",peopleWithAccess:"有权访问的人",joinedPeople:"加入的人",noneJoined:"还没有人加入。把下面的链接发给对方。",online:"在线",seenAgo:"{when}来过",guestPaused:"链接已关闭,暂时无法访问",changeRole:"更改「{name}」的角色",roleLinkOff:"链接已关闭",remove:"移出",removeGuest:"移出 {name}",removeTitle:"移出「{name}」?",removeBody:"对方将无法再访问这份内容,之后仍可以用链接重新加入。",you:"(你)",thisComputer:"这台电脑",owner:"所有者",generalAccess:"一般访问权限",onLan:"同一网络里有链接的人",onlyHereSub:"别人打不开这些链接。",onLanSub:"同一 Wi-Fi 或局域网里的人用链接打开,链接决定角色。",onNetworkAt:"在这个网络上:{addresses}",onTailnet:"Tailscale:{address},同一 tailnet 的人在别的网络也能打开(复制在链接的「更多」里)",noAddress:"这台电脑没有局域网地址。",whereOff:"现在只有这台电脑能打开这些链接。复制链接会顺手分享到局域网。",inviteLinks:"邀请链接",roleEditor:"编辑者",roleCommenter:"评论者",roleViewer:"查看者",linkEditor:"可编辑",linkCommenter:"可评论",linkViewer:"可查看",noteEditor:"编辑和评论",noteCommenter:"只能评论",noteViewer:"只读",linkOff:"已关闭:没人能用它加入",turnOn:"开启",more:"更多",moreFor:"更多:{role}",copyTailnet:"复制 Tailscale 链接",copyTailnetNote:"给同一 tailnet 里不在这个网络的人({address})",turnOnLink:"开启链接",turnOffLink:"关闭链接",turnOffNote:"用它加入的人暂时无法访问",resetLink:"重置链接",resetNote:"换一个新地址,用旧链接加入的人会被移出",resetTitle:"重置「{role}」链接?",resetBody:"旧链接会失效,通过它加入的人也会失去访问权限。",plainHttp:"这是明文 HTTP:同一网络的人能看到传输内容。链接就是权限:拿到链接的人就有对应角色,只发给该有的人;传出去了就重置链接。",cannotShare:"{type} 的页面暂时不能分享到网络:只有这台电脑能打开。",shareError:"没做成:{error}",shareNoAnswer:"分享设置没有加载出来:Open Artifact 服务没有响应,稍后再试。",sendingTitle:"要发给别人?",sendingBody:"发链接而不是文件,对方看到的总是最新版本。",invitePeople:"邀请别人",allLinksOff:"所有链接都关着。去邀请页打开一条。",joinsAs:"用这条链接打开的人以{role}身份加入。要给别的角色,去邀请页。",standaloneShare:"可在 Open Artifact 应用或 CLI 的 share 命令中管理网络分享。",onlyHereLink:"只有这台电脑能打开这个链接。",nothingToExport:"还没有可导出的内容。",exportOptions:"会先询问导出选项",archiveLabel:"整个文件夹(.zip)",destinationDescription:"请 {agent} 导出到这里",destinationRequestLabel:"导出到 {label}",destinationSent:"已请 {agent} 导出到 {label}",archiveDescription:"这里的全部内容,用来备份或搬走",archiveStarted:"开始下载 {name}",archiveHint:"整个文件夹打成了一个 zip,可以备份、换电脑或发给别人。解压后用同一个类型打开就能接着用;分享链接和这台电脑上的服务器状态不在里面。",archiveTooLarge:"文件夹超过了 zip 的上限(4 GiB 或 65535 个文件),请直接复制文件夹。",archiveUnsupported:"{type} 的文件夹在这里打不了包,请直接复制文件夹。",archiveFailed:"没能打包:{error}",exportBusy:"另一个导出正在进行,请稍后再导出 {label}。",exportUnsupported:"现在无法导出 {label}。",exportFailed:"无法导出 {label}。",saving:"正在保存…",reconnecting:"正在重新连接…",notSaved:"未保存",notSavedTitle:"页面没能保存最近的修改。",saveRetry:"保存失败,点击重试",readOnly:"只读",readOnlyTitle:"这里的内容无法保存",leaveLosesWork:"确定离开?尚未保存的修改会丢失。",actionSaveNow:"立即保存",actionOpenFind:"查找",actionUndo:"撤销",actionRedo:"重做",actionEditPage:"编辑页面",actionUsePage:"使用这个页面",actionCommentSelection:"评论选中内容",actionOpenPageList:"页面列表",actionHandOffCode:"交给代码处理",whyOlderVersion:"你正在查看旧版本",whyAgentWorking:"{agent} 正在工作",whyDraftOpen:"请先关闭打开的草稿",whyCommentsOn:"请先退出评论模式",whyNeedsAgent:"需要一个智能体会话",whyUnsaved:"请先保存",whyOther:"暂时不可用",noOwner:"没有会话拥有这个作品",noOwnerNote:"发出的消息会等到有会话接手:你在这里选的会话,或者 adopt 或改动它的会话。",assignTo:"交给一个会话",assignPick:"要交给的会话",assignButton:"交给它",assigning:"正在交接…",assigned:"已交给 {session}:它收到了之前等着的消息,之后你发的也会到它那里。",couldNotAssign:"没能交接:{error}",noSessionsOnline:"现在没有在线的 Agent 会话。想让某个会话接手,把这段粘贴给它:",copyTakeOver:"复制接手提示",ownerNote:"消息会发给做这个作品的 {harness} 会话。",agentIdle:"{agent} 空闲",agentWaiting:"{agent} 在等待",sessionOffline:"会话离线",offlineNote:"{harness} 会话下次工作时,{agent} 会看到你发的消息。",askPlaceholder:"想改什么?",sendToAgent:"发给 {agent}",sendToConversation:"放进 {agent} 的对话",sending:"发送中…",sent:"已发送。",sentInbox:"会话下次工作时 {agent} 会看到。",sentDrafted:"已放进 {agent} 的对话:到那里发出去。",notDelivered:"没送达。",notSent:"没发出去:{error}",viaDelivered:"已送达",viaDrafted:"在对话里,等你发出",viaInbox:"等会话处理",viaFailed:"没送达",askCloudOnline:"{agent} 已连接:它现在就会收到。",askCloudOffline:"{agent} 所在的电脑重新上线后,它会收到。",askCloudMcp:"{agent} 下次处理这个作品时会看到。",askCloudNone:"这个站点上还没有连接你的 Agent。连接一台电脑或一个 MCP 客户端;在那之前,请求会一直等着。",askCloudNoneOther:"所有者还没有在这个站点上连接 Agent。请求会等到他们连接为止。",sentCloudDelivered:"已送达:{agent} 现在就收到了。",sentCloudOffline:"已发送。{agent} 所在的电脑重新上线后,它会收到。",sentCloudMcp:"已发送。{agent} 下次处理这个作品时会看到。",sentCloudNone:"已发送。会等到有 Agent 连接为止。",viaWaitingAgent:"等 Agent 接收",statusConnected:"已连接",statusNoAgent:"无 Agent",emptyTitle:"这个作品还是空的",emptyBody:"{root} 里还没有写入 {type} 的内容。由 Agent 来写:把下面这段发给它。",startSession:"和 {agent} 开个新会话",startBlank:"从空白开始",startingBlank:"正在准备…",emptyOrBlank:"也可以从空白开始自己写:会直接进入编辑器。",couldNotStartBlank:"没能从空白开始:{error}",promptCopied:"已复制:粘贴到任意装了 Artifact 工具的 Agent 会话里。",sentToSession:"已发到新会话。",problemTitle:"这个作品在这里打不开",noPage:"没有页面。",readOnlyNewer:"在这里只读:这个作品由 {type} {release} 写入,这台电脑上是 {version}。更新 Open Artifact(open-artifact runtime update,或更新附带它的应用)后才能编辑。",folder:"文件夹:{root}",askToLook:"让 {agent} 看看",problemAsk:"作品页打不开:{problem}",noBoot:"没有要显示的作品。从主页打开一个。",tryAgain:"重试",bootFailed:"页面没有打开:{error}",frameNotOpen:"页面已经不在打开状态(它的服务可能重启过),重新打开也没成功。",frameNotGranted:"这个页面在这里已经不对你开放了。",homeTitle:"Open Artifact",homeSub:"本机所有 Agent 共用的作品和类型。",artifacts:"作品",types:"类型",newArtifact:"新建作品",moreActions:"更多操作",backToSession:"回到会话",noArtifacts:"还没有作品。让 Agent 用 Artifact 工具创建一个,或者在这里新建。",pageOpen:"已打开",projectOf:"为项目 {folder} 创建",projectFilter:"项目",projectAll:"全部",projectNone:"不属于项目",typeMissing:"类型没有安装",deleted:"已删除「{title}」,文件夹保留。",undo:"撤销",restored:"已恢复",couldNotRestore:"没能恢复:{error}",couldNotLoad:"读取失败:{error}",typeRoots:"类型根目录:{roots}",noTypes:"没有找到类型。",disabled:"已停用",shadowedBy:"被 {root} 覆盖",newOf:"新建 {type}",create:"创建",createBlank:"创建并打开",createType:"类型",createGroupBlank:"直接开始",createGroupBlankHint:"建好就进编辑器,从空白开始自己写,用不用 Agent 都行。",createGroupAgent:"和 Agent 一起做",createGroupAgentHint:"这类作品要 Agent 来搭:建好后交给 Agent。",createGroupCustom:"你做的类型",createGroupCustomHint:"在这台电脑上做的类型。",title:"标题",folderOptional:"文件夹(可不填)",folderHint:"默认:主工作区里新建一个文件夹",needTitle:"先写个标题。",couldNotCreate:"没建成:{error}",renameArtifact:"重命名作品",cannotCreateYet:"没有能在这里新建、并且已启用的类型。",newType:"新建类型",newTypeDescription:"一个文件夹,里面有页面、清单和 SKILL.md,之后由你的 agent 接着完善。",typeId:"Id",typeIdHint:"小写字母、数字和短横线,例如 trip-planner",typeName:"名称(可不填)",typeTemplate:"模板",templatePage:"页面",templatePageHint:"内容存成页面旁边的文件",templateData:"数据",templateDataHint:"内容存成数据库里的记录",typeScope:"放在哪里",scopeUser:"我自己的",scopeUserHint:"你自己的类型文件夹,每个项目都能用",scopeProject:"这个项目",scopeProjectHint:"项目文件夹里的 .agents/artifact-types,跟着项目走",projectFolder:"项目文件夹",projectFolderHint:"绝对路径,例如 /Users/me/code/app",needTypeId:"先写个 id。",needProjectFolder:"项目文件夹要写绝对路径。",couldNotMakeType:"没建成类型:{error}",typeMade:"类型 {id} 建好了",typeMadeAt:"它的文件夹:",typeMadePrompt:"把这段话交给你的 agent,让它接着完善:",typeCheckWarnings:"types check 有 {count} 条提醒",done:"完成",typesExplain:"类型就是一个文件夹:你自己的放在 {user},项目的放在项目的 .agents/artifact-types(信任这个项目之前会受限制),另外还有内置类型。同一个 id,离得更近的文件夹优先。",typesExplainNoUser:"类型就是一个文件夹:项目的放在项目的 .agents/artifact-types(信任这个项目之前会受限制),另外还有内置类型。",projectTypes:"项目 {dir}",projectUntrusted:"未信任:它的类型可以用,但在你信任这个项目之前,页面只能访问自己的来源和它列出的网站,也不会启动它自己的程序。",trustProject:"信任这个项目",untrustProject:"取消信任",couldNotTrust:"没能修改信任设置:{error}",turnTypeOn:"启用 {type}",turnTypeOff:"停用 {type}",couldNotToggleType:"没能修改这个类型:{error}",sourceBuiltin:"内置",sourceLocal:"自己的",sourceInstalled:"已安装",typeCapabilities:"用到:{list}",typeNetwork:"会访问:{list}",noNetwork:"不访问外部网络",installedFrom:"来源:{source}",installType:"安装类型",installTypeDescription:"别人分享的类型包(.oatype):选择文件,或者填它的 https 地址。安装之前会先给你看它是什么。",installTypeCheck:"安装之前请先看一遍:它的页面在你的浏览器里运行,agent 会拿到它的 SKILL.md。",chooseTypePackage:"选择 .oatype 文件",typePackageUrl:"或者填地址",readPackage:"读取",installAs:"安装成(可不填)",installAsHint:"换一个 id:已经装了同 id 的类型,或者想用别的名字时填",needPackage:"先选文件或者填地址。",couldNotReadPackage:"没能读取这个包:{error}",packageId:"Id",packageSource:"来源",packagePublisher:"发布者",packagePublisherText:"{name}({site} 上的账号)",packageSite:"站点",packageSiteRemote:"{site},通过你的远端 {remote}",packageSitePublic:"{site},公开地址,不登录",packageCapabilities:"页面会用到",noCapabilities:"没有声明",packageNetwork:"会访问",packageReplaces:"替换",packageReplacesText:"{version},来自 {source}",packageSkill:"它的 SKILL.md({path},{chars} 个字符,{lines} 行),agent 做这种作品时会拿到这段说明:",packageNoSkill:"它没有 SKILL.md。",packageThirdParty:"SKILL.md、标题和简介都是发布者写的。agent 会被告知:这些内容不能授权,也不能扩大任务。",installTypeAs:"安装 {id}",updateTypeTitle:"更新 {id}",updateType:"更新",uninstallType:"卸载",uninstallConfirm:"卸载 {type}?它的作品还留在各自的文件夹里,重新安装后就能再打开。",typeInstalled:"{type} {version} 已安装",typeUpdated:"{type} 已更新到 {version}",typeUninstalled:"{type} 已卸载",couldNotInstall:"没能安装:{error}",couldNotUninstall:"没能卸载:{error}",cannotShareCloud:"{type} 作品暂时不能在这里分享。",signIn:"登录",signOut:"退出登录",signOutFailed:"没能退出登录:{error}",accountOf:"账号:{name}",sharedWithOthers:"已分享给他人",addPeople:"添加成员",addPeoplePlaceholder:"邮箱,或 @域名(该域名下所有人)",add:"添加",addInvalid:"不是邮箱地址或 @域名:{entries}",roleFor:"新加成员的角色",memberPending:"已邀请,还没登录过",memberDomain:"{domain} 的所有人",memberGroup:"群组",removeAccess:"移除访问权限",removeMemberBody:"对方将无法再访问这份内容,之后可以再加回来。",noMembers:"还没有添加其他人。",accessRestricted:"受限",accessRestrictedSub:"只有这里添加的人能打开。",accessLink:"知道链接的任何人",accessLinkSub:"拿到下面某条链接的人获得对应角色。",accessPublic:"公开",accessPublicSub:"任何人都能以查看者身份打开;下面的链接可以给更多权限。",shareSettings:"设置",viewersCanExport:"查看者可以下载和导出",editorsCanAsk:"编辑者可以向 {agent} 提需求",ownedBy:"所有者:{name}",yourRole:"你的角色:{role}",onlyOwnerShares:"只有所有者能更改谁可以访问。",emptyBodyCloud:"还没有写入任何 {type} 内容。由 Agent 来写:把下面这段发给它。",homeSubCloud:"你的作品,以及别人分享给你的。",noArtifactsCloud:"还没有作品。让 Agent 用 Artifact 工具发布一个,或者请别人分享给你。",pubTitle:"发布到网上",pubIntro:"给它一个网址,这台电脑关机也能打开。在那边由你决定谁能打开。",pubDataNote:"发布这个仪表盘也会发布它的数据:这台电脑运行它的实时查询,把结果放到站点上,能打开它的人都看得到。",pubDataPending:"它的实时数据还没上站点:在你发布数据之前,那边的页面没有数字。",pubDataConfirm:"发布它的数据",pubDataAsOf:"站点上的数据截至 {time},由这台电脑刷新。",pubDataNone:"它的数据已发布,第一批结果正在上传。",pubDataFailed:"上次刷新失败:{reason}",pubDataRefresh:"现在刷新",pubDataRefreshing:"正在刷新…",pubDataStop:"停止发布数据",pubDataStopTitle:"停止发布它的数据?",pubDataStopBody:"数据会从 {host} 上删掉,这台电脑也不再刷新它们。仪表盘仍发布在那里,只是在你再次发布数据之前没有数字。",pubConnectSite:"连接一个站点…",pubConnectAnother:"再连接一个站点…",pubAddress:"站点地址",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"你有账号的 Open Artifact 站点的网址。",pubName:"名称",pubNameHint:"用来区分不同站点的简短名字,比如 work。",pubConnect:"连接",pubConnecting:"正在连接…",pubCodeTitle:"在 {host} 上批准这台电脑",pubCodeBody:"确认页面上显示的是这个代码,然后点批准。",pubCodeOpened:"已在浏览器里打开批准页面。没看到的话,从这里打开:",pubOpenApproval:"打开批准页面",pubWaitingApproval:"等你批准…",pubConnected:"已连接到 {host},账号 {name}。",pubTryAgain:"重试",pubSignedInAs:"账号:{name}",pubStateConnected:"已连接",pubStateConnecting:"正在连接…",pubStateUnreachable:"连不上",pubStateSignedOut:"已退出登录",pubPublish:"发布",pubPublishing:"正在发布…",pubReconnect:"重新连接",pubPublishedAt:"已发布到 {host}",pubOpen:"打开",pubManage:"谁能打开,在它的网页上设置:打开后点那里的“分享”。",pubManageLink:"到网上管理访问权限",pubOpensThere:"站点连得上时,在这台电脑上打开它会直接跳到网址。",pubUnpublish:"取消发布",pubUnpublishing:"正在取消发布…",unpubTitle:"取消发布这份内容?",unpubBody:"网上那份会移到 {host} 的回收站,网址随之失效。这个文件夹留在这台电脑上,并带上网上的最新改动。",pubInSync:"已同步",pubInSyncAt:"已同步 · {when}",pubWaitingOne:"有 1 处改动等待发送",pubWaiting:"有 {count} 处改动等待发送",pubOffline:"连不上 {host}:改动先保存在这里,恢复后自动发送。",pubSignedOutSync:"已退出 {host} 的登录:改动先保存在这里,重新连接后发送。",pubSyncFailed:"上次同步失败:{error}",pubCloudMark:"已发布到网上",pubCloudAt:"已发布:{url}",pubHostEmpty:"请填写站点地址。",pubHostInvalid:"这不是网址。请按 https://artifacts.example.com 这样填写。",pubHostNotHttps:"地址必须以 https:// 开头(http 只能用于本机或内网地址,比如 192.168.1.20、nas.lan、192-168-1-20.nip.io)。",pubInsecureWarning:"这是明文 http:发布的内容不加密传输。只在你信任的网络里使用。",pubAutoSwitch:"自动发布新建的作品",pubAutoHint:"从现在起新建的作品会自动发布到 {host},之前的保持不变。",pubAutoNoSite:"先选一个默认站点。",pubDefaultSite:"默认站点",pubDefaultMark:"默认",pubAutoPublishing:"正在自动发布到 {host}…",pubAutoSignedOut:"等待发布到 {host}:这台电脑还没在那边登录。",pubAutoUnreachable:"等待发布:连不上 {host},稍后会自动重试。",pubAutoFailed:"还没发布到 {host}:{error} 稍后会自动重试。",pubApprovalTitle:"在 {host} 上批准这台电脑",pubApprovalBody:"这台电脑已设置为发布到 {host}。打开批准页面,确认显示的是这个代码,然后批准。",pubCloudSettingsFailed:"没能修改设置:{error}",pubNameInvalid:"只能用字母、数字、- 和 _(最多 32 个),比如 work。",pubNameTaken:"这个名称已经用于另一个站点,换一个名称。",pubNoDaemon:"这台电脑上的 Open Artifact 没有响应。确认它在运行后再试。",pubConnectDenied:"{host} 拒绝了这次连接。如果是误操作,再试一次。",pubConnectExpired:"代码在批准前过期了。请重试,并在几分钟内批准。",pubConnectUnreachable:"连不上 {host}。检查地址和网络后再试。",pubConnectNotHost:"{host} 看起来不是 Open Artifact 站点,请检查地址。",pubConnectFailed:"连接失败:{error}",pubIdTaken:"{host} 上已经有一份同样 id 的作品,它仍在那边发布着(可能是从另一台电脑发布的),或者属于别人。先在那边取消发布(你取消发布过的作品,再次发布时会被替换),或者复制这份作品后发布副本。",pubAlreadyElsewhere:"它已经发布到另一个站点了,先在那边取消发布。",pubTooLarge:"它对 {host} 来说太大了。把文件夹里的大文件移走后再试。",pubSignedOut:"你已退出 {host} 的登录。重新连接后再试。",pubNotAllowed:"{host} 不允许这样做:你在那边的账号可能没有发布权限。",pubUnreachable:"暂时连不上 {host},恢复后再试。",pubUnsupported:"{host} 暂时不支持这类作品。",pubFailed:"发布失败:{error}",unpubUnreachable:"连不上 {host},没法先把网上的最新版本取回来。恢复后再试。",unpubFailed:"取消发布失败:{error}",openOnWeb:"在网上打开",copyWebLink:"复制网址",webLinkCopied:"网址已复制",signOutAccess:"退出登录(同时退出组织的统一登录)",upload:"上传",uploadHint:"上传一个作品:在它的“导出”里选“整个文件夹(.zip)”得到的 .zip。",uploadDrop:"松开即可上传这个 .zip",uploadSending:"正在上传 {name}… {percent}%",uploadSendingSize:"正在上传 {name}…",uploadChecking:"正在检查 {name}…",uploadOpening:"{name} 已上传,正在打开…",uploadNotZip:"这不是 .zip 文件。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadNotArtifact:"这个 zip 不是 Open Artifact 作品文件夹。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadTooLargeLimit:"这个 zip 太大了:这个站点最多接收 {limit}。把文件夹里的大文件删掉后再试。",uploadTooLarge:"这个 zip 对这个站点来说太大了。把文件夹里的大文件删掉后再试。",uploadTooLargeSaid:"这个 zip 对这个站点来说太大了:{error} 把文件夹里的大文件删掉后再试。",uploadSignedOut:"你已退出登录。重新登录后再上传。",uploadNotAllowed:"这个站点不允许你上传作品。",uploadConflict:"站点那边出了点冲突,再试一次。",uploadTypeMissing:"这个站点暂时打不开 {type} 作品。",uploadBusy:"尝试太频繁了,稍等一会儿再试。",uploadNoAnswer:"站点没有响应。检查网络后再试。",uploadFailed:"没能上传:{error}",dismiss:"关闭",trash:"回收站",trashEmpty:"回收站是空的。",trashNote:"作品在回收站里时,分享过的人都打不开它。",trashedWhen:"{when}移到回收站",trashKeptDays:"在回收站里放满 {days} 天后会被永久删除。",trashKeptOneDay:"在回收站里放满 1 天后会被永久删除。",trashKeptForever:"会一直留在这里,直到你永久删除。",restore:"恢复",restoredTitle:"已恢复「{title}」",deleteForever:"永久删除",purgeTitle:"永久删除「{title}」?",purgeBody:"删除后无法撤销。它会从这个站点上移除,分享过的人也都无法再打开。",purged:"已永久删除「{title}」",purgeNotTrashed:"它已经不在回收站里了。",purgeGone:"它已经不存在了。",couldNotPurge:"没能删除:{error}",moveToTrash:"移到回收站",movedToTrash:"已把「{title}」移到回收站。",siteTypesNote:"这个站点上的人从自己电脑发布的类型。连到这个站点的 agent 可以用它们做作品;你也可以把某个类型安装到自己电脑上。",siteTypesYouMayPublish:"你可以在这里发布类型:open-artifact types publish <id> --remote <这个站点>。",siteTypesNoPublish:"在这里发布:{why}",siteTypesEmptyTitle:"还没有类型",siteTypesEmpty:"还没有人把类型分享给这个站点上的所有人。",siteTypesBack:"这个站点上的全部类型",siteTypeBy:"{name} 发布,{when}更新",siteTypeUnnamedPublisher:"一位没有名字的用户",siteTypePrivate:"私有",siteTypeLink:"有链接的人",siteTypeSite:"站点上的所有人",siteTypeDelisted:"已下架",siteTypeDelistedNote:"已下架:不再列出,也不能再用它做新作品。已有的作品照常能打开。",siteTypeDelistedManage:"想重新列出,就从你的电脑再发布一次:open-artifact types publish {id} --remote <这个站点>。",siteTypePublisher:"发布者",siteTypeUpdated:"更新于",siteTypeInstall:"安装到你的电脑",siteTypeInstallNote:"在你电脑的终端里运行这条命令。它会把上面这些信息再给你看一遍,问过你才安装。",siteTypeDownload:"下载安装包(.oatype)",siteTypeSkillNote:"agent 用这个类型做作品时读到的说明,由发布者编写。",siteTypeNoSkill:"这个类型没有 SKILL.md。",siteTypeManage:"管理",siteTypeWhoSees:"谁能看到",siteTypeVisibilityNote:"私有:只有你和站点管理员。有链接的人:拿到这个页面地址的人。站点上的所有人:列给每位成员。",siteTypeUnpublish:"下架",siteTypeUnpublishTitle:"下架「{name}」?",siteTypeUnpublishBody:"之后谁都不能再用它做新作品。如果已经有它的作品,这些作品照常能打开,类型只是不再列出;如果没有,就从这个站点上删除。",siteTypeRemoved:"已从这个站点删除「{name}」",siteTypeDelistedNow:"已下架「{name}」:它的 {count} 个作品照常能打开",siteTypeCouldNot:"没能完成:{error}",siteTypeGoneTitle:"已删除",siteTypeGone:"这个类型已经不在这个站点上了。",connectedSitesLoading:"正在读取你连接的站点上的类型…",connectedSitesNone:"你连接的站点上的类型会显示在这里。要连接站点,打开一个作品,点「发布到网上」,再选「连接一个站点…」。",connectedSitesFailed:"没能读取你连接的站点上的类型:{error}",connectedSiteTitle:"{name}({host})上的类型",connectedSiteNote:"这个站点上的人发布的类型。安装前会先把它的全部信息给你看,你确认之前什么都不会装。",connectedSiteEmpty:"这个站点上还没有分享给你的类型。",connectedSiteRetry:"重试",siteTypeInstallHere:"安装",siteTypeUpdateHere:"更新到 {version}",siteTypeUpdateNote:"这台电脑上装的是 {local}(id 为 {id}),站点上是 {version}。",siteTypeInstallAsOther:"换个 id 安装",siteTypeClashNote:"这台电脑上已有另一个叫 {id} 的类型:这个要换个 id 安装。",siteTypeInstalledHere:"已安装",siteTypeInstalledAs:"已安装,id 为 {id}",siteTypePublishedHere:"从这台电脑发布",siteTypeOpenPage:"打开它的页面",siteTypeClashHint:"这台电脑上已有同 id 的另一个类型。在「安装成」里给它换个 id,再点「读取」。",shareOnNetwork:"改为在本地网络里分享",shareOnNetworkSub:"这里的链接打开的是这台电脑上的副本,不是网页版。"};function z_(e){return e&&/^zh\b/i.test(e)?"zh-CN":"en"}const qm=z_(typeof navigator>"u"?void 0:navigator.language);function P_(e,o){return o?e.replace(/\{(\w+)\}/g,(a,i)=>i in o?String(o[i]):a):e}function L_(e,o,a){return P_((e==="zh-CN"?D_[o]:void 0)??__[o],a)}function E(e,o){return L_(qm,e,o)}const I_=/^art_[0-9a-z]{10,40}$/;function H_(e){if(typeof e!="string")return null;const o=/^open-artifact:\/\/artifact\/([^/?#]+)/.exec(e.trim()),a=o?o[1]:e.trim();return I_.test(a)?a:null}const h0={blank:["docs","sheets","whiteboard","slides","design-system"],agent:["design","data","motion","page"]};function U_(e){return h0.blank.includes(e)?"blank":h0.agent.includes(e)?"agent":null}const gt={artifacts:"artifacts",artifact:"artifact",types:"types",harnesses:"harnesses",desktopSettings:"desktop.settings",configSet:"config.set",events:"events",share:"artifact.share",archive:"artifact.archive",thumbnail:"artifacts.thumbnail",restore:"artifacts.restore",open:"artifacts.open",boot:"artifacts.boot",preview:"artifacts.preview",create:"artifacts.create",blank:"artifacts.blank",add:"artifacts.add",relocate:"artifacts.relocate",assign:"artifacts.assign",update:"artifacts.update",duplicate:"artifacts.duplicate",delete:"artifacts.delete",ask:"artifacts.ask",adopt:"artifacts.adopt",tools:"tools",embed:"embed",view:"view",typesNew:"types.new",typesCheck:"types.check",typesFrom:"types.from",typesEnable:"types.enable",typesDisable:"types.disable",typesTrust:"types.trust",typesPreview:"types.preview",typesInstall:"types.install",typesUninstall:"types.uninstall",typesUpdate:"types.update",typesPublish:"types.publish",typesUnpublish:"types.unpublish",typesSites:"types.sites",typesServers:"types.servers",typesRestart:"types.restart",import:"artifacts.import"},B_="[Artifact comment sent to agent]",F_="[Artifact edit request sent to agent]",V_="[Artifact task finished]",Y_="[Open Artifact] ",q_="open-artifact-shell",Sa={shell:"open_artifact_shell",id:"open_artifact_id",comment:"comment",panel:"panel"},ja=/^#slide-(?:~[A-Za-z0-9_-]{1,64}(?:\.only(?:\.[0-9]{1,4}\.[0-9]{1,4})?)?|[0-9]{1,4})$/,G_="#view-inline",bf=/^#[0-9a-f]{8}-[0-9a-f]{4}(?:\.[^\s#]{1,500})?$/,X_=["not_open","not_granted"],H1=1e4,K_=["saved","actions","formats","shareNotice","peers"],U1=/^[A-Za-z0-9_.:-]{1,128}$/,$_=24,W_=["text/plain","text/html","image/png","image/svg+xml"],Q_=/^[A-Za-z0-9_-]{1,64}$/,Z_=64*1024*1024,J_=1,eD=/^[a-z][a-z0-9]{0,23}$/,m0="not run: the artifact was updated",tD=1,nD=8,oD=8e3,g0="oa_view",sD=(e,o=oD)=>typeof e=="string"?e.slice(0,o):"",Pr=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function aD(e){if(!Pr(e))return null;if(e.openArtifact==="goto"){const i=sD(e.hash,2e3);return i?{openArtifact:"goto",hash:i}:null}if(e.openArtifact!=="host_hello")return null;const o=Pr(e.caps)?e.caps:{},a={openArtifact:"host_hello",caps:{...o.sessions===!0?{sessions:!0}:{},...o.toolbar===!0?{toolbar:!0}:{},...o.artifacts===!0?{artifacts:!0}:{},...o.switcher===!0?{switcher:!0}:{}}};if(typeof e.agentName=="string"&&e.agentName.trim()&&(a.agentName=e.agentName.trim().slice(0,80)),typeof e.harness=="string"&&e.harness&&(a.harness=e.harness.slice(0,64)),Number.isInteger(e.protocol)&&(a.protocol=e.protocol),Pr(e.theme)&&(e.theme.scheme==="light"||e.theme.scheme==="dark")&&(a.theme={scheme:e.theme.scheme,...typeof e.theme.accent=="string"&&/^#[0-9a-f]{6}$/i.test(e.theme.accent)?{accent:e.theme.accent}:{}}),Array.isArray(e.destinations)&&(a.destinations=e.destinations.filter(i=>Pr(i)&&typeof i.id=="string"&&!!i.id&&typeof i.label=="string"&&!!i.label.trim()).slice(0,nD).map(i=>({id:i.id.slice(0,64),label:i.label.trim().slice(0,80)}))),Pr(e.library)){const i={};typeof e.library.harness=="string"&&e.library.harness&&(i.harness=e.library.harness.slice(0,64)),typeof e.library.workspace=="string"&&e.library.workspace&&(i.workspace=e.library.workspace.slice(0,4096)),(i.harness||i.workspace)&&(a.library=i)}return a}function B1(e){return!!e&&typeof e=="object"&&typeof e.openArtifact=="string"}const iD=["quickstart","list","publish","read","open","call","adopt","delete","share"],rD=["get","list","query","set","update","delete","str_replace","batch"],lD=["read","reply","resolve","reopen","wait"],cD=["share","export"],uD={type:"object",properties:{action:{type:"string",enum:iD,description:"What to do: quickstart, list, publish, read, open, call, adopt, delete or share. Omitted: publish."},intent:{type:"string",description:"quickstart: what is being made (design, design-system, slides, whiteboard, document, data, sheets, motion, page, other), or a few words about it."},scope:{type:"string",enum:["types","mine","all"],description:"list: types (the installed types), mine (this session's and this project's artifacts; the default) or all (every artifact)."},type:{type:"string",description:"list: only artifacts of this type (an id, or open-artifact://type/<id>). quickstart: the type already chosen (an id), to get its create call and steps without matching."},query:{type:"string",description:"list: only artifacts whose title contains this text."},limit:{type:"integer",description:"list: how many to return (default 50, at most 200)."},cursor:{type:"string",description:"list: the next_cursor of the previous page."},type_url:{type:"string",description:"publish without url: the type to create from (open-artifact://type/<id>, from quickstart). read without url: the type to describe."},title:{type:"string",description:"publish without url: the new artifact's name. quickstart: the name it will have, to find similar ones."},folder:{type:"string",description:"publish without url: the exact folder for the new artifact (absolute, or relative to the workspace), only when the person named one. Omitted: Open Artifact chooses the folder and its name. adopt: the folder to add."},location:{type:"string",enum:["home","workspace"],description:"publish without url: where the new artifact's folder goes when the person asked: workspace (in the project, under the working folder) or home (the person's Open Artifact folder). Omitted: what the person's settings say. The folder is named from the title either way."},url:{type:"string",description:"An artifact: open-artifact://artifact/<id>, as publish returned it."},files:{type:"object",additionalProperties:!0,description:'publish with url: files to write under the artifact root, as {"rel/path": "text"} or {"rel/path": {"content": "...", "encoding": "base64"}}; null deletes.'},if_match:{type:"object",additionalProperties:!0,description:'publish with url: {"rel/path": sha256 | null | "*"}. Write only while the file still has the sha256 you read, does not exist (null), or anyway ("*"). One mismatch writes nothing and returns the current versions.'},check:{type:"boolean",description:"publish with url: run the type's check action after writing; its result comes back as check."},capabilities:{type:"object",additionalProperties:!0,description:'publish, page artifacts only: the runtime capabilities the page may use, as {"db": true, "assets": true, ...}. Omitted: kept; {}: none; otherwise the whole set. With url it may be given without files.'},open:{type:"string",enum:["after_first_write","now","never"],description:"publish without url: after_first_write (the default) opens the page in your app once your first write lands; now opens it at once; never leaves it closed. Where your app cannot show pages by itself the result says so: open view_url in your app's built-in browser, if you have one."},related:{type:"boolean",description:"quickstart: list existing artifacts the recommended type can build on, such as design systems (default true)."},path:{type:"string",description:"read: one file or folder under the root (omitted: the record and the file list)."},paths:{type:"array",items:{type:"string"},description:"read: several files under the root at once."},name:{type:"string",description:"call: the action's name (check, upload, ...; read with url lists them)."},args:{type:"object",additionalProperties:!0,description:"call: the action's arguments. upload: {file: absolute path, name?, group?}."},panel:{type:"string",enum:cD,description:"open: also open the page's Share panel (share), for the person to share it on the network, or its Export tab (export), for them to download a file."},cloud:{type:"string",description:"share: publish the artifact to this cloud remote (its name, as `open-artifact remote list` shows it). It works only on a remote the person set up and let agents publish to (agentMayPublish); otherwise the person publishes it, from the Share panel or with `open-artifact publish <id> --remote <name>`."}}},fD={type:"object",properties:{action:{type:"string",enum:rD,description:"What to do: get, list, query, set, update, delete, str_replace or batch."},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>)."},collection:{type:"string",description:"The collection: alone for list / query (query needs it), with doc_id for one document."},doc_id:{type:"string",description:"With collection: the document to get / set / update / delete / str_replace."},path:{type:"string",description:"collection/doc_id, instead of the two."},data:{type:"object",additionalProperties:!0,description:"set / update: the document's fields."},file_path:{type:"string",description:"set / update: a JSON file holding the fields, instead of data."},if_match:{description:'set / update / delete / str_replace: the sha256 get returned (write only if unchanged), null (only if it does not exist) or "*" (replace whatever is there).'},field:{type:"string",description:"str_replace: the text field, as a dot path (body, notes.text)."},old:{type:"string",description:"str_replace: the passage to replace; it must occur exactly once."},new:{type:"string",description:"str_replace: the passage that replaces it."},where:{type:"array",items:{type:"object",additionalProperties:!0},description:"query: [{field, op, value}], all must hold. op: ==, !=, <, <=, >, >=, in, not-in (up to 30 values), array-contains."},order_by:{type:"object",additionalProperties:!0,description:'query: {field, dir: "asc" | "desc"}.'},limit:{type:"integer",description:"list / query: how many documents (default 100, at most 1000)."},cursor:{type:"string",description:"list / query: the next_cursor of the previous page."},out_file:{type:"string",description:"get / list / query: write the result to this JSON file (absolute, or relative to the workspace) and return only its path and counts."},writes:{type:"array",items:{type:"object",additionalProperties:!0},description:"batch: [{op: set|update|delete|str_replace, path | collection+doc_id, data | file_path, if_match?, field?, old?, new?}], at most 500."}},required:["action","url"]},dD={type:"object",properties:{action:{type:"string",enum:lD,description:"What to do: read, reply, resolve, reopen or wait."},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>). wait: optional."},thread_id:{type:"string",description:'reply / resolve / reopen: the thread (after ";thread=" in the message).'},text:{type:"string",description:"reply: the answer."},resolve:{type:"boolean",description:"reply: resolve the thread too."},all:{type:"boolean",description:"read: resolved threads too."},since:{type:"string",description:"read: only threads with a message at or after this time (ISO 8601)."},acknowledge_duplicate:{type:"boolean",description:"reply: send the same text as your last reply in this thread again, on purpose."},timeout_ms:{type:"number",description:"wait: how long (default 600000)."}},required:["action"]},y0={Artifact:uD,ArtifactData:fD,ArtifactComments:dD},pD={Artifact:["Make and change artifacts: typed folders of files that open as live pages the person can view, edit, comment on and export. Actions:","- quickstart {intent, type?}: call first for a new artifact; recommends a type (or takes the one given) and returns the call that creates it, the steps for this app and similar artifacts that already exist.",'- list {scope: "mine" | "all" | "types", type?, query?}: find existing artifacts, or the installed types.',"- publish {type_url, title, folder?, open?}: create an artifact; the result carries its root folder and the type's instructions. publish {url, files, if_match?, check?}: write files when you have no file tools of your own. A page artifact also takes capabilities (on create or write): the runtime capabilities its page may use.","- read {url, path? | paths?}: the artifact's record, files and actions, or some of its files with their sha256. read {type_url}: a type's instructions, before creating.",`- open {url, panel?}: show it to the person in the computer's browser (or the app, when it shows pages), once its content is written. When your app has a built-in browser, open view_url there instead. panel "share" or "export" opens its Share panel or Export tab for them.`,"- call {url, name, args?}: run one of the type's actions (check, upload, ...). A long one answers {task, pending: true}; its result comes later as a message.","- adopt {url | folder}: take over an artifact, or add an existing folder. Only when the person asks.","- share {url}: whether it is shared on the local network, and its links. Only the person changes that, in the page's Share panel.","- delete {url}: forget an artifact; its folder stays. Only when the person asks."].join(`
10
10
  `),ArtifactData:'Read and write the document store of an artifact whose type keeps one (its instructions say so). get, list and query read documents with their sha256; set, update, delete, str_replace and batch write them. update merges fields, and {"__delete__": true} removes one; str_replace changes one passage of a long text field. Replacing or deleting an existing document needs if_match: the sha256 you read, or "*". Your writes show live on open pages.',ArtifactComments:`Comments the person leaves on their artifact's page, kept in the artifact's own folder on this computer (no outside service). read lists the threads; reply answers one (thread_id is after ";thread=" in the message), with resolve: true when it is done; resolve and reopen change a thread's state. A thread sent to you is the person asking for your answer in it, so replying there is what they asked for. Answer only threads sent to you, in one or two lines. wait blocks until the next message for this session: use it only when nothing else can wake you.`},b0={Artifact:{title:"Artifact",openWorldHint:!1},ArtifactData:{title:"Artifact data",openWorldHint:!1},ArtifactComments:{title:"Artifact comments",destructiveHint:!1,openWorldHint:!1}},hD={Artifact:{quickstart:"read",list:"read",read:"read",publish:"write",call:"write",open:"ui",delete:"remove",adopt:"remove",share:"person"},ArtifactData:{get:"read",list:"read",query:"read",set:"write",update:"write",str_replace:"write",batch:"write",delete:"write"},ArtifactComments:{read:"read",wait:"read",reply:"write",resolve:"write",reopen:"write"}},mD={Artifact:["publish","open","call","share"],ArtifactData:["get","list","query","set","update","str_replace","batch","delete"],ArtifactComments:["read","reply","resolve","reopen"]};function gD(e={any:!1,actions:!1}){return Object.keys(y0).map(o=>{const a=o==="Artifact"?e.any:e.actions;return{name:o,description:pD[o],inputSchema:y0[o],annotations:a?{...b0[o],openWorldHint:!0}:b0[o],actions:hD[o],remoteActions:[...mD[o]]}})}gD();const yD=300,bD=12,v0=["Artifact","ArtifactData","ArtifactComments"];function Fs(e,o=yD){const a=String(e??"").replace(/[<>]/g,"").replace(/\s+/g," ").trim();return a.length>o?`${a.slice(0,o-1).trimEnd()}…`:a}function vD(e){const o=Fs(e,Number.MAX_SAFE_INTEGER),a=o.search(/[.!?。!?](\s|$)/);return a>=0?o.slice(0,a+1):o}function xD(e){const o=Fs(e,24);return/^[a-z0-9]{1,5}$/i.test(o)?o.toUpperCase():o}const x0=e=>!e||/[.!?。!?…]$/.test(e)?e:`${e}.`;function SD(e,o=!1){const a=Fs(e.title,80)||e.id;if(o)return`- ${e.id}: ${a}`;const i=Fs(e.when)||Fs(vD(e.description)),l=(e.exports??[]).map(xD).filter(Boolean),c=[x0(a),x0(i),l.length?`Exports: ${l.join(", ")}.`:""].filter(Boolean);return`- ${e.id}: ${c.join(" ")}`}const wD="Open Artifact lets you make artifacts: typed folders of files (a slide deck, a design canvas, a whiteboard, a data dashboard, a spreadsheet, a doc, an animated motion piece, a free HTML page and more) that open as live pages the person can view, edit, comment on and export. You make and change them with the Artifact, ArtifactData and ArtifactComments tools.",TD=`<where_output_goes>
11
11
  Decide where your output will live before you make anything.
12
12
  - Something the person will read once and move on from (an answer, an explanation, a summary, a short report) goes in your reply, however long it is. A diagram or chart that explains your answer goes in the reply too, when you can show one there.