@yorz/cli 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/cli/index.js +520 -227
  2. package/dist/gui/assets/{abnfDiagram-VRR7QNED-D-y0QKuD.js → abnfDiagram-VRR7QNED-gKm9Q_A3.js} +1 -1
  3. package/dist/gui/assets/{arc-B49ieWDx.js → arc-CrUCh7Vt.js} +1 -1
  4. package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-CcOou6CY.js → architectureDiagram-ZJ3FMSHR-CMSfijC7.js} +1 -1
  5. package/dist/gui/assets/{blockDiagram-677ZJIJ3-DY8EHGpO.js → blockDiagram-677ZJIJ3-p05lGQvB.js} +1 -1
  6. package/dist/gui/assets/{c4Diagram-LMCZKHZV-CV8mRhow.js → c4Diagram-LMCZKHZV-Bv-YyQUO.js} +1 -1
  7. package/dist/gui/assets/channel-DjP6myfL.js +1 -0
  8. package/dist/gui/assets/{chunk-2Q5K7J3B-BjplUf2p.js → chunk-2Q5K7J3B-k4bjrCUS.js} +1 -1
  9. package/dist/gui/assets/{chunk-32BRIVSS-Dua0UKp_.js → chunk-32BRIVSS-kWhk22-t.js} +1 -1
  10. package/dist/gui/assets/{chunk-5VM5RSS4-Br-SORjV.js → chunk-5VM5RSS4-CQ-OF-jm.js} +1 -1
  11. package/dist/gui/assets/{chunk-EX3LRPZG-Dgb6iahE.js → chunk-EX3LRPZG-BCGCkTIr.js} +1 -1
  12. package/dist/gui/assets/{chunk-JWPE2WC7-BkOQaZRq.js → chunk-JWPE2WC7-BxQu3HdL.js} +1 -1
  13. package/dist/gui/assets/{chunk-MOJQB5TN-D1qUO9Uh.js → chunk-MOJQB5TN-DkB3CKU9.js} +1 -1
  14. package/dist/gui/assets/{chunk-RYQCIY6F-CwiUC3Pd.js → chunk-RYQCIY6F-62-xl5oz.js} +1 -1
  15. package/dist/gui/assets/{chunk-V7JOEXUC-O0VQnEjo.js → chunk-V7JOEXUC-DLidRBp5.js} +1 -1
  16. package/dist/gui/assets/{chunk-VR4S4FIN-C-iULcHx.js → chunk-VR4S4FIN-CelmZEAj.js} +1 -1
  17. package/dist/gui/assets/{chunk-XXDRQBXY-buihollE.js → chunk-XXDRQBXY-CZXSrEO5.js} +1 -1
  18. package/dist/gui/assets/classDiagram-OUVF2IWQ-CqIEE3-0.js +1 -0
  19. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-CqIEE3-0.js +1 -0
  20. package/dist/gui/assets/{cose-bilkent-JH36ORCC-DJT3GZ0Y.js → cose-bilkent-JH36ORCC-BJZADzHX.js} +1 -1
  21. package/dist/gui/assets/{cynefin-VYW2F7L2-CUB4SFmD.js → cynefin-VYW2F7L2-2kv3gQiJ.js} +1 -1
  22. package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-Dt0_fxzu.js → cynefinDiagram-TSTJHNR4-BJrGGRZT.js} +1 -1
  23. package/dist/gui/assets/{dagre-VKFMJZFB-BU2VgIkF.js → dagre-VKFMJZFB-C2Eq7ks1.js} +1 -1
  24. package/dist/gui/assets/{diagram-FQU43EPY-CpRyd1t3.js → diagram-FQU43EPY-DrIQap5j.js} +1 -1
  25. package/dist/gui/assets/{diagram-G47NLZAW-CcJkOrvN.js → diagram-G47NLZAW-D3qrZmEa.js} +1 -1
  26. package/dist/gui/assets/{diagram-NH7WQ7WH-BcWa9fg4.js → diagram-NH7WQ7WH-BiV6-mMS.js} +1 -1
  27. package/dist/gui/assets/{diagram-OA4YK3LP-Clu9LYE6.js → diagram-OA4YK3LP-zJhDVFfZ.js} +1 -1
  28. package/dist/gui/assets/{diagram-WEI45ONY-BKt73qmr.js → diagram-WEI45ONY-CDimAYs_.js} +1 -1
  29. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-ycI3xDTZ.js → ebnfDiagram-CCIWWBDH-CCcf1QsU.js} +1 -1
  30. package/dist/gui/assets/{erDiagram-Q63AITRT-CJf0jIvL.js → erDiagram-Q63AITRT-Q8tGhvrZ.js} +1 -1
  31. package/dist/gui/assets/{flowDiagram-23GEKE2U-8X7ZYojT.js → flowDiagram-23GEKE2U-3alKs_Q2.js} +1 -1
  32. package/dist/gui/assets/{ganttDiagram-NO4QXBWP-DsGJIvEc.js → ganttDiagram-NO4QXBWP-UwtLj5mp.js} +1 -1
  33. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-Dg-PnhMR.js → gitGraphDiagram-IHSO6WYX-BkdZNrvw.js} +1 -1
  34. package/dist/gui/assets/index-DakqmUCD.js +40 -0
  35. package/dist/gui/assets/index-bzRYB8_7.css +1 -0
  36. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-CX-PGRjw.js → infoDiagram-FWYZ7A6U-AtNZOkv_.js} +1 -1
  37. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-BGq-1WGF.js → ishikawaDiagram-FXEZZL3T-fzZ3wFB-.js} +1 -1
  38. package/dist/gui/assets/{journeyDiagram-5HDEW3XC-CX7J6QLx.js → journeyDiagram-5HDEW3XC-CaInQL3L.js} +1 -1
  39. package/dist/gui/assets/{kanban-definition-HUTT4EX6-XcUXgRy6.js → kanban-definition-HUTT4EX6-BzazGxe7.js} +1 -1
  40. package/dist/gui/assets/{linear-D-w3YyOR.js → linear-FkI6GUdc.js} +1 -1
  41. package/dist/gui/assets/{mermaid.core-BjB4Bulu.js → mermaid.core-Dy3NGXqh.js} +4 -4
  42. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-D2kDYOXu.js → mindmap-definition-LN4V7U3C-BkD5gUUF.js} +1 -1
  43. package/dist/gui/assets/{pegDiagram-2B236MQR-C79JhnNB.js → pegDiagram-2B236MQR-DrzL8aNW.js} +1 -1
  44. package/dist/gui/assets/{pieDiagram-ENE6RG2P-CbLYFwp4.js → pieDiagram-ENE6RG2P-BrrJjIcV.js} +1 -1
  45. package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-BXNa6Xix.js → quadrantDiagram-ABIIQ3AL-BvfIaaXh.js} +1 -1
  46. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-CG8ojk-9.js → railroadDiagram-RFXS5EU6-uDh6Eejs.js} +1 -1
  47. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-Ddn0mejD.js → requirementDiagram-TGXJPOKE-mq71nhz4.js} +1 -1
  48. package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-DXVSB34u.js → sankeyDiagram-HTMAVEWB-hXTichtO.js} +1 -1
  49. package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-B00FxwKQ.js → sequenceDiagram-DBY2YBRQ-CgITKOd_.js} +1 -1
  50. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-BUiEsqdO.js → sizeCapture-X5ZJPWSS-Bg4phjBx.js} +1 -1
  51. package/dist/gui/assets/{stateDiagram-2N3HPSRC-DflPz4MT.js → stateDiagram-2N3HPSRC-DKBi1ceK.js} +1 -1
  52. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-DSkELjnp.js +1 -0
  53. package/dist/gui/assets/{swimlanes-5IMT3BWC-yL7Pms6k.js → swimlanes-5IMT3BWC-BotNlXJq.js} +2 -2
  54. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-_zGHZ8dn.js +8 -0
  55. package/dist/gui/assets/{timeline-definition-FHXFAJF6--V8N1aYE.js → timeline-definition-FHXFAJF6-xPORA673.js} +1 -1
  56. package/dist/gui/assets/{vennDiagram-L72KCM5P-CjlyPLPm.js → vennDiagram-L72KCM5P-9lcR-L8Q.js} +1 -1
  57. package/dist/gui/assets/{wardleyDiagram-EHGQE667-C99qPu9U.js → wardleyDiagram-EHGQE667-CLRUHnek.js} +1 -1
  58. package/dist/gui/assets/{xychartDiagram-FW5EYKEG-DeUNfALY.js → xychartDiagram-FW5EYKEG-C-oJxiEj.js} +1 -1
  59. package/dist/gui/index.html +5 -5
  60. package/package.json +1 -1
  61. package/dist/gui/assets/channel-BakWbuVQ.js +0 -1
  62. package/dist/gui/assets/classDiagram-OUVF2IWQ-DgfCpbC5.js +0 -1
  63. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DgfCpbC5.js +0 -1
  64. package/dist/gui/assets/index-DGSN0uvJ.css +0 -1
  65. package/dist/gui/assets/index-DIKCFt79.js +0 -39
  66. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-DQohEYjS.js +0 -1
  67. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-CUZb2EKw.js +0 -8
@@ -0,0 +1,40 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Ue={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return td(this.context.count)},getNextContextId(){return td(this.context.count++)}};function td(e){const t=String(e),n=t.length-1;return Ue.context.id+(n?String.fromCharCode(96+n):"")+t}function di(e){Ue.context=e}const C1=!1,k1=(e,t)=>e===t,Un=Symbol("solid-proxy"),Cp=typeof Proxy=="function",wi=Symbol("solid-track"),Is={equals:k1};let kp=Rp;const Kn=1,_i=2,Ap={owned:null,cleanups:null,context:null,owner:null},Va={};var We=null;let he=null,A1=null,rt=null,Qt=null,Jt=null,Qs=0;function Fn(e,t){const n=rt,r=We,o=e.length===0,i=t===void 0?r:t,s=o?Ap:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>wt(()=>Kr(s)));We=s,rt=null;try{return En(a,!0)}finally{rt=n,We=r}}function D(e,t){t=t?Object.assign({},Is,t):Is;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(he&&he.running&&he.sources.has(n)?o=o(n.tValue):o=o(n.value)),Op(n,o));return[Ip.bind(n),r]}function gc(e,t,n){const r=ta(e,t,!0,Kn);Xo(r)}function Pe(e,t,n){const r=ta(e,t,!1,Kn);Xo(r)}function re(e,t,n){kp=R1;const r=ta(e,t,!1,Kn),o=lo&&st(lo);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Jt?Jt.push(r):Xo(r)}function ne(e,t,n){n=n?Object.assign({},Is,n):Is;const r=ta(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Xo(r),Ip.bind(r)}function T1(e){return e&&typeof e=="object"&&"then"in e}function tn(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=Va,u=null,c=!1,l=!1,f="initialValue"in i,h=typeof r=="function"&&ne(r);const p=new Set,[g,m]=(i.storage||D)(i.initialValue),[b,v]=D(void 0),[y,x]=D(void 0,{equals:!1}),[E,k]=D(f?"ready":"unresolved");Ue.context&&(u=Ue.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Ue.load&&Ue.has(u)&&(a=Ue.load(u)));function C(L,O,U,R){return s===L&&(s=null,R!==void 0&&(f=!0),(L===a||O===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(R,{value:O})),a=Va,he&&L&&c?(he.promises.delete(L),c=!1,En(()=>{he.running=!0,T(O,U)},!1)):T(O,U)),O}function T(L,O){En(()=>{O===void 0&&m(()=>L),k(O!==void 0?"errored":f?"ready":"unresolved"),v(O);for(const U of p.keys())U.decrement();p.clear()},!1)}function S(){const L=lo&&st(lo),O=g(),U=b();if(U!==void 0&&!s)throw U;return rt&&!rt.user&&L&&gc(()=>{y(),s&&(L.resolved&&he&&c?he.promises.add(s):p.has(L)||(L.increment(),p.add(L)))}),O}function I(L=!0){if(L!==!1&&l)return;l=!1;const O=h?h():r;if(c=he&&he.running,O==null||O===!1){C(s,wt(g));return}he&&s&&he.promises.delete(s);let U;const R=a!==Va?a:wt(()=>{try{return o(O,{value:g(),refetching:L})}catch(B){U=B}});if(U!==void 0){C(s,void 0,As(U),O);return}else if(!T1(R))return C(s,R,void 0,O),R;return s=R,"v"in R?(R.s===1?C(s,R.v,void 0,O):C(s,void 0,As(R.v),O),R):(l=!0,queueMicrotask(()=>l=!1),En(()=>{k(f?"refreshing":"pending"),x()},!1),R.then(B=>C(R,B,void 0,O),B=>C(R,void 0,As(B),O)))}Object.defineProperties(S,{state:{get:()=>E()},error:{get:()=>b()},loading:{get(){const L=E();return L==="pending"||L==="refreshing"}},latest:{get(){if(!f)return S();const L=b();if(L&&!s)throw L;return g()}}});let A=We;return h?gc(()=>(A=We,I(!1))):I(!1),[S,{refetch:L=>ea(A,()=>I(L)),mutate:m}]}function Tp(e){return En(e,!1)}function wt(e){if(rt===null)return e();const t=rt;rt=null;try{return e()}finally{rt=t}}function Ct(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const u=wt(()=>t(a,o,s));return o=a,u}}function jn(e){re(()=>wt(e))}function ie(e){return We===null||(We.cleanups===null?We.cleanups=[e]:We.cleanups.push(e)),e}function pc(){return rt}function Ei(){return We}function ea(e,t){const n=We,r=rt;We=e,rt=null;try{return En(t,!0)}catch(o){Xc(o)}finally{We=n,rt=r}}function Dp(e){if(he&&he.running)return e(),he.done;const t=rt,n=We;return Promise.resolve().then(()=>{rt=t,We=n;let r;return lo&&(r=he||(he={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),En(e,!1),rt=We=null,r?r.done:void 0})}const[u4,nd]=D(!1);function D1(e){Jt.push.apply(Jt,e),e.length=0}function gt(e,t){const n=Symbol("context");return{id:n,Provider:N1(n),defaultValue:e}}function st(e){let t;return We&&We.context&&(t=We.context[e.id])!==void 0?t:e.defaultValue}function Zo(e){const t=ne(e),n=ne(()=>hc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let lo;function I1(){return lo||(lo=gt())}function Ip(){const e=he&&he.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Kn)Xo(this);else{const t=Qt;Qt=null,En(()=>Rs(this),!1),Qt=t}if(rt){const t=this.observers;if(!t||t[t.length-1]!==rt){const n=t?t.length:0;rt.sources?(rt.sources.push(this),rt.sourceSlots.push(n)):(rt.sources=[this],rt.sourceSlots=[n]),t?(t.push(rt),this.observerSlots.push(rt.sources.length-1)):(this.observers=[rt],this.observerSlots=[rt.sources.length-1])}}return e&&he.sources.has(this)?this.tValue:this.value}function Op(e,t,n){let r=he&&he.running&&he.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(he){const o=he.running;(o||!n&&he.sources.has(e))&&(he.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&En(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=he&&he.running;s&&he.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Qt.push(i):Jt.push(i),i.observers&&Np(i)),s?i.tState=Kn:i.state=Kn)}if(Qt.length>1e6)throw Qt=[],new Error},!1)}return t}function Xo(e){if(!e.fn)return;Kr(e);const t=Qs;rd(e,he&&he.running&&he.sources.has(e)?e.tValue:e.value,t),he&&!he.running&&he.sources.has(e)&&queueMicrotask(()=>{En(()=>{he&&(he.running=!0),rt=We=e,rd(e,e.tValue,t),rt=We=null},!1)})}function rd(e,t,n){let r;const o=We,i=rt;rt=We=e;try{r=e.fn(t)}catch(s){return e.pure&&(he&&he.running?(e.tState=Kn,e.tOwned&&e.tOwned.forEach(Kr),e.tOwned=void 0):(e.state=Kn,e.owned&&e.owned.forEach(Kr),e.owned=null)),e.updatedAt=n+1,Xc(s)}finally{rt=i,We=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Op(e,r,!0):he&&he.running&&e.pure?(he.sources.has(e)||(e.value=r),he.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ta(e,t,n,r=Kn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:We,context:We?We.context:null,pure:n};return he&&he.running&&(i.state=0,i.tState=r),We===null||We!==Ap&&(he&&he.running&&We.pure?We.tOwned?We.tOwned.push(i):We.tOwned=[i]:We.owned?We.owned.push(i):We.owned=[i]),i}function Os(e){const t=he&&he.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===_i)return Rs(e);if(e.suspense&&wt(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Qs);){if(t&&he.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(he.disposed.has(o))return}if((t?e.tState:e.state)===Kn)Xo(e);else if((t?e.tState:e.state)===_i){const o=Qt;Qt=null,En(()=>Rs(e,n[0]),!1),Qt=o}}}function En(e,t){if(Qt)return e();let n=!1;t||(Qt=[]),Jt?n=!0:Jt=[],Qs++;try{const r=e();return O1(n),r}catch(r){n||(Jt=null),Qt=null,Xc(r)}}function O1(e){if(Qt&&(Rp(Qt),Qt=null),e)return;let t;if(he){if(!he.promises.size&&!he.queue.size){const r=he.sources,o=he.disposed;Jt.push.apply(Jt,he.effects),t=he.resolve;for(const i of Jt)"tState"in i&&(i.state=i.tState),delete i.tState;he=null,En(()=>{for(const i of o)Kr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)Kr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}nd(!1)},!1)}else if(he.running){he.running=!1,he.effects.push.apply(he.effects,Jt),Jt=null,nd(!0);return}}const n=Jt;Jt=null,n.length&&En(()=>kp(n),!1),t&&t()}function Rp(e){for(let t=0;t<e.length;t++)Os(e[t])}function R1(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Os(r)}if(Ue.context){if(Ue.count){Ue.effects||(Ue.effects=[]),Ue.effects.push(...e.slice(0,n));return}di()}for(Ue.effects&&(Ue.done||!Ue.count)&&(e=[...Ue.effects,...e],n+=Ue.effects.length,delete Ue.effects),t=0;t<n;t++)Os(e[t])}function Rs(e,t){const n=he&&he.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===Kn?o!==t&&(!o.updatedAt||o.updatedAt<Qs)&&Os(o):i===_i&&Rs(o,t)}}}function Np(e){const t=he&&he.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=_i:r.state=_i,r.pure?Qt.push(r):Jt.push(r),r.observers&&Np(r))}}function Kr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Kr(e.tOwned[t]);delete e.tOwned}if(he&&he.running&&e.pure)Mp(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Kr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}he&&he.running?e.tState=0:e.state=0}function Mp(e,t){if(t||(e.tState=0,he.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Mp(e.owned[n])}function As(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Xc(e,t=We){throw As(e)}function hc(e){if(typeof e=="function"&&!e.length)return hc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=hc(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function N1(e,t){return function(r){let o;return Pe(()=>o=wt(()=>(We.context={...We.context,[e]:r.value},Zo(()=>r.children))),void 0),o}}const mc=Symbol("fallback");function Ns(e){for(let t=0;t<e.length;t++)e[t]()}function M1(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ie(()=>Ns(i)),()=>{let u=e()||[],c=u.length,l,f;return u[wi],wt(()=>{let p,g,m,b,v,y,x,E,k;if(c===0)s!==0&&(Ns(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[mc],o[0]=Fn(C=>(i[0]=C,n.fallback())),s=1);else if(s===0){for(o=new Array(c),f=0;f<c;f++)r[f]=u[f],o[f]=Fn(h);s=c}else{for(m=new Array(c),b=new Array(c),a&&(v=new Array(c)),y=0,x=Math.min(s,c);y<x&&r[y]===u[y];y++);for(x=s-1,E=c-1;x>=y&&E>=y&&r[x]===u[E];x--,E--)m[E]=o[x],b[E]=i[x],a&&(v[E]=a[x]);for(p=new Map,g=new Array(E+1),f=E;f>=y;f--)k=u[f],l=p.get(k),g[f]=l===void 0?-1:l,p.set(k,f);for(l=y;l<=x;l++)k=r[l],f=p.get(k),f!==void 0&&f!==-1?(m[f]=o[l],b[f]=i[l],a&&(v[f]=a[l]),f=g[f],p.set(k,f)):i[l]();for(f=y;f<c;f++)f in m?(o[f]=m[f],i[f]=b[f],a&&(a[f]=v[f],a[f](f))):o[f]=Fn(h);o=o.slice(0,s=c),r=u.slice(0)}return o});function h(p){if(i[f]=p,a){const[g,m]=D(f);return a[f]=m,t(u[f],g)}return t(u[f])}}}function L1(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,u;return ie(()=>Ns(i)),()=>{const c=e()||[],l=c.length;return c[wi],wt(()=>{if(l===0)return a!==0&&(Ns(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[mc],o[0]=Fn(h=>(i[0]=h,n.fallback())),a=1),o;for(r[0]===mc&&(i[0](),i=[],r=[],o=[],a=0),u=0;u<l;u++)u<r.length&&r[u]!==c[u]?s[u](()=>c[u]):u>=r.length&&(o[u]=Fn(f));for(;u<r.length;u++)i[u]();return a=s.length=i.length=l,r=c.slice(0),o=o.slice(0,a)});function f(h){i[u]=h;const[p,g]=D(c[u]);return s[u]=g,t(p,u)}}}function d(e,t){return wt(()=>e(t||{}))}function ds(){return!0}const bc={get(e,t,n){return t===Un?n:e.get(t)},has(e,t){return t===Un?!0:e.has(t)},set:ds,deleteProperty:ds,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ds,deleteProperty:ds}},ownKeys(e){return e.keys()}};function Wa(e){return(e=typeof e=="function"?e():e)?e:{}}function $1(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function q(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&Un in a,e[s]=typeof a=="function"?(t=!0,ne(a)):a}if(Cp&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Wa(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Wa(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Wa(e[a])));return[...new Set(s)]}},bc);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const f=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=f.get?{enumerable:!0,configurable:!0,get:$1.bind(n[l]=[f.get.bind(a)])}:f.value!==void 0?f:void 0;else{const h=n[l];h&&(f.get?h.push(f.get.bind(a)):f.value!==void 0&&h.push(()=>f.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function ae(e,...t){const n=t.length;if(Cp&&Un in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},bc));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},bc)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let P1=0;function Mt(){return Ue.context?Ue.getNextContextId():`cl-${P1++}`}const Lp=e=>`Stale read from <${e}>.`;function at(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ne(M1(()=>e.each,e.children,t||void 0))}function yc(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ne(L1(()=>e.each,e.children,t||void 0))}function V(e){const t=e.keyed,n=ne(()=>e.when,void 0,void 0),r=t?n:ne(n,void 0,{equals:(o,i)=>!o==!i});return ne(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?wt(()=>i(t?o:()=>{if(!wt(r))throw Lp("Show");return n()})):i}return e.fallback},void 0,void 0)}function F1(e){const t=Zo(()=>e.children),n=ne(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,u=o[s],c=i,l=ne(()=>c()?void 0:u.when,void 0,void 0),f=u.keyed?l:ne(l,void 0,{equals:(h,p)=>!h==!p});i=()=>c()||(f()?[a,l,u]:void 0)}return i});return ne(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?wt(()=>a(s.keyed?i():()=>{if(wt(n)()?.[0]!==o)throw Lp("Match");return i()})):a},void 0,void 0)}function od(e){return e}const B1=gt();function na(e){let t=0,n,r,o,i,s;const[a,u]=D(!1),c=I1(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},f=Ei();if(Ue.context&&Ue.load){const g=Ue.getContextId();let m=Ue.load(g);if(m&&(typeof m!="object"||m.s!==1?o=m:Ue.gather(g)),o&&o!=="$$f"){const[b,v]=D(void 0,{equals:!1});i=b,o.then(()=>{if(Ue.done)return v();Ue.gather(g),di(r),v(),di()},y=>{s=y,v()})}}const h=st(B1);h&&(n=h.register(l.inFallback));let p;return ie(()=>p&&p()),d(c.Provider,{value:l,get children(){return ne(()=>{if(s)throw s;if(r=Ue.context,i)return i(),i=void 0;r&&o==="$$f"&&di();const g=ne(()=>e.children);return ne(m=>{const b=l.inFallback(),{showContent:v=!0,showFallback:y=!0}=n?n():{};if((!b||o&&o!=="$$f")&&v)return l.resolved=!0,p&&p(),p=r=o=void 0,D1(l.effects),g();if(y)return p?m:Fn(x=>(p=x,r&&(di({id:r.id+"F",count:0}),r=void 0),e.fallback),f)})})}})}const z1=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],U1=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...z1]),K1=new Set(["innerHTML","textContent","innerText","children"]),j1=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),H1=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function q1(e,t){const n=H1[e];return typeof n=="object"?n[t]?n.$:void 0:n}const G1=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),V1=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),W1={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Q=e=>ne(()=>e());function Y1(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let f=a;for(;f<i;)c.set(n[f],f++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let f=s,h=1,p;for(;++f<o&&f<i&&!((p=c.get(t[f]))==null||p!==l+h);)h++;if(h>l-a){const g=t[s];for(;a<l;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const id="_$DX_DELEGATE";function Z1(e,t,n,r={}){let o;return Fn(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function F(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>wt(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function yn(e,t=window.document){const n=t[id]||(t[id]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,ry))}}function Ye(e,t,n){po(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function X1(e,t,n,r){po(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function J1(e,t,n){po(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function At(e,t){po(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ms(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Q1(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(sd(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(sd(e,a,!0),n[a]=u)}return n}function Go(e,t,n){if(!t)return n?Ye(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Si(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function ir(e,t={},n,r){const o={};return r||Pe(()=>o.children=Ci(e,t.children,o.children)),Pe(()=>typeof t.ref=="function"&&rr(t.ref,e)),Pe(()=>ey(e,t,n,!0,o,!0)),o}function rr(e,t,n){return wt(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ci(e,t,r,n);Pe(o=>Ci(e,t(),o,n),r)}function ey(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=ad(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=ad(e,s,a,o[s],n,i,t)}}function ty(e){let t,n;return!po()||!(t=Ue.registry.get(n=oy()))?e():(Ue.completed&&Ue.completed.add(t),Ue.registry.delete(n),t)}function po(e){return!!Ue.context&&!Ue.done&&(!e||e.isConnected)}function ny(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function sd(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function ad(e,t,n,r,o,i,s){let a,u,c,l,f;if(t==="style")return Go(e,n,r);if(t==="classList")return Q1(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);r&&e.removeEventListener(h,r,typeof r!="function"&&r),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);r&&e.removeEventListener(h,r,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),p=G1.has(h);if(!p&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(h,g)}(p||n)&&(Ms(e,h,n,p),p&&yn([h]))}else if(t.slice(0,5)==="attr:")Ye(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")J1(e,t.slice(5),n);else if((f=t.slice(0,5)==="prop:")||(c=K1.has(t))||!o&&((l=q1(t,e.tagName))||(u=U1.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(f)t=t.slice(5),u=!0;else if(po(e))return n;t==="class"||t==="className"?At(e,n):a&&!u&&!c?e[ny(t)]=n:e[l||t]=n}else{const h=o&&t.indexOf(":")>-1&&W1[t.split(":")[0]];h?X1(e,h,t,n):Ye(e,j1[t]||t,n)}return n}function ry(e){if(Ue.registry&&Ue.events&&Ue.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Ue.registry&&!Ue.done&&(Ue.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Ci(e,t,n,r,o){const i=po(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=To(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=To(e,n,r)}else{if(s==="function")return Pe(()=>{let u=t();for(;typeof u=="function";)u=u();n=Ci(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(vc(u,t,n,o))return Pe(()=>n=Ci(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const f=[l];for(;(l=l.nextSibling)!==r;)f.push(l);return n=f}if(u.length===0){if(n=To(e,n,r),a)return n}else c?n.length===0?ud(e,u,r):Y1(e,n,u):(n&&To(e),ud(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=To(e,n,r,t);To(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function vc(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=vc(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=vc(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const l=String(a);u&&u.nodeType===3&&u.data===l?e.push(u):e.push(document.createTextNode(l))}}return o}function ud(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function To(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function oy(){return Ue.getNextContextId()}const iy=!1,sy="http://www.w3.org/2000/svg";function $p(e,t=!1,n=void 0){return t?document.createElementNS(sy,e):document.createElement(e,{is:n})}function ji(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Ei();let i,s=!!Ue.context;return re(()=>{s&&(Ei().user=s=!1),i||(i=ea(o,()=>ne(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=D(!1),l=()=>c(!0);Fn(f=>w(a,()=>u()?f():i(),null)),ie(l)}else{const u=$p(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),ie(()=>a.removeChild(u))}},void 0,{render:!s}),n}function ay(e,t){const n=ne(e);return ne(()=>{const r=n();switch(typeof r){case"function":return wt(()=>r(t));case"string":const o=V1.has(r),i=Ue.context?ty():$p(r,o,wt(()=>t.is));return ir(i,t,o),i}})}function Pp(e){const[,t]=ae(e,["component"]);return ay(()=>e.component,t)}function Fp(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let xc;function Jc(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),xc=window.history.state._depth}Jc();function uy(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function cy(e,t){let n=!1;return()=>{const r=xc;Jc();const o=r==null?null:xc-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const ly=/^(?:[a-z0-9]+:)?\/\//i,dy=/^\/+|(\/)\/+$/g,Bp="http://sr";function uo(e,t=!1){const n=e.replace(dy,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Ts(e,t,n){if(ly.test(t))return;const r=uo(e),o=n&&uo(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+uo(t,!i)}function fy(e,t){if(e==null)throw new Error(t);return e}function gy(e,t){return uo(e).replace(/\/*(\*.*)?$/g,"")+uo(t)}function zp(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function py(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},f=h=>n===void 0?void 0:n[h];for(let h=0;h<s;h++){const p=i[h],g=p[0]===":",m=g?u[h]:u[h].toLowerCase(),b=g?p.slice(1):p.toLowerCase();if(g&&Ya(m,f(b)))l.params[b]=m;else if(g||!Ya(m,b))return null;l.path+=`/${m}`}if(o){const h=c?u.slice(-c).join("/"):"";if(Ya(h,f(o)))l.params[o]=h;else return null}return l}}function Ya(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function hy(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function Up(e){const t=new Map,n=Ei();return new Proxy({},{get(r,o){return t.has(o)||ea(n,()=>t.set(o,ne(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Kp(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return Kp(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const my=100,jp=gt(),Qc=gt(),Hi=()=>fy(st(jp),"<A> and 'use' router primitives can be only used inside a Route."),by=()=>st(Qc)||Hi().base,yy=e=>{const t=by();return ne(()=>t.resolvePath(e()))},vy=e=>{const t=Hi();return ne(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Jo=()=>Hi().navigatorFactory(),ra=()=>Hi().location,qi=()=>Hi().params;function xy(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return Hp(e.path).reduce((c,l)=>{for(const f of Kp(l)){const h=gy(t,f);let p=a?h:h.split("/*",1)[0];p=p.split("/").map(g=>g.startsWith(":")||g.startsWith("*")?g:encodeURIComponent(g)).join("/"),c.push({...u,originalPath:l,pattern:p,matcher:py(p,!a,e.matchFilters)})}return c},[])}function wy(e,t=0){return{routes:e,score:hy(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function Hp(e){return Array.isArray(e)?e:[e]}function qp(e,t="",n=[],r=[]){const o=Hp(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=xy(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)qp(a.children,c.pattern,n,r);else{const f=wy([...n],r.length);r.push(f)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Za(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function _y(e,t,n){const r=new URL(Bp),o=ne(l=>{const f=e();try{return new URL(f,r)}catch{return console.error(`Invalid path ${f}`),l}},r,{equals:(l,f)=>l.href===f.href}),i=ne(()=>o().pathname),s=ne(()=>o().search,!0),a=ne(()=>o().hash),u=()=>"",c=Ct(s,()=>zp(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(c):Up(c)}}let so;function Ey(){return so}function Sy(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(R=>R),u=s.renderPath||(R=>R),c=s.beforeLeave||Fp(),l=Ts("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[f,h]=D(!1);let p;const g=(R,B)=>{B.value===m()&&B.state===v()||(p===void 0&&h(!0),so=R,p=B,Dp(()=>{p===B&&(b(p.value),y(p.state),k[1]($=>$.filter(N=>N.pending)))}).finally(()=>{p===B&&Tp(()=>{so=void 0,R==="navigate"&&O(p),h(!1),p=void 0})}))},[m,b]=D(o().value),[v,y]=D(o().state),x=_y(m,v,s.queryWrapper),E=[],k=D([]),C=ne(()=>typeof r.transformUrl=="function"?Za(t(),r.transformUrl(x.pathname)):Za(t(),x.pathname)),T=()=>{const R=C(),B={};for(let $=0;$<R.length;$++)Object.assign(B,R[$].params);return B},S=s.paramsWrapper?s.paramsWrapper(T,t):Up(T),I={pattern:l,path:()=>l,outlet:()=>null,resolvePath(R){return Ts(l,R)}};return Pe(Ct(o,R=>g("native",R),{defer:!0})),{base:I,location:x,params:S,isRouting:f,renderPath:u,parsePath:a,navigatorFactory:L,matches:C,beforeLeave:c,preloadRoute:U,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:k};function A(R,B,$){wt(()=>{if(typeof B=="number"){B&&(s.go?s.go(B):console.warn("Router integration does not support relative routing"));return}const N=!B||B[0]==="?",{replace:G,resolve:j,scroll:K,state:Z}={replace:!1,resolve:!N,scroll:!0,...$},P=j?R.resolvePath(B):Ts(N&&x.pathname||"",B);if(P===void 0)throw new Error(`Path '${B}' is not a routable path`);if(E.length>=my)throw new Error("Too many redirects");const H=m();(P!==H||Z!==v())&&(iy||c.confirm(P,$)&&(E.push({value:H,replace:G,scroll:K,state:v()}),g("navigate",{value:P,state:Z})))})}function L(R){return R=R||st(Qc)||I,(B,$)=>A(R,B,$)}function O(R){const B=E[0];B&&(i({...R,replace:B.replace,scroll:B.scroll}),E.length=0)}function U(R,B){const $=Za(t(),R.pathname),N=so;so="preload";for(let G in $){const{route:j,params:K}=$[G];j.component&&j.component.preload&&j.component.preload();const{preload:Z}=j;B&&Z&&ea(n(),()=>Z({params:K,location:{pathname:R.pathname,search:R.search,hash:R.hash,query:zp(R),state:null,key:""},intent:"preload"}))}so=N}}function Cy(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=ne(()=>r().path);u&&u.preload&&u.preload();const f=c?c({params:s,location:i,intent:so||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?d(u,{params:s,location:i,data:f,get children(){return n()}}):n(),resolvePath(p){return Ts(o.path(),p,l())}}}const ky=e=>t=>{const{base:n}=t,r=Zo(()=>t.children),o=ne(()=>qp(r(),t.base||""));let i;const s=Sy(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),d(jp.Provider,{value:s,get children(){return d(Ay,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[Q(()=>(i=Ei())&&null),d(Ty,{routerState:s,get branches(){return o()}})]}})}})};function Ay(e){const t=e.routerState.location,n=e.routerState.params,r=ne(()=>e.preload&&wt(()=>{e.preload({params:n,location:t,intent:Ey()||"initial"})}));return d(V,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>d(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Ty(e){const t=[];let n;const r=ne(Ct(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const f=i&&i[c],h=o[c];s&&f&&h.route.key===f.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Fn(p=>{t[c]=p,u[c]=Cy(e.routerState,u[c-1]||e.routerState.base,cd(()=>r()[c+1]),()=>{const g=e.routerState.matches();return g[c]??g[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return cd(()=>r()&&n)()}const cd=e=>()=>d(V,{get when(){return e()},keyed:!0,children:t=>d(Qc.Provider,{value:t,get children(){return t.outlet()}})}),pr=e=>{const t=Zo(()=>e.children);return q(e,{get children(){return t()}})};function Dy([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Iy(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Dy(D(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Ue.registry&&!Ue.done&&(Ue.done=!0),o));return e.init&&ie(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),ky({signal:r,create:e.create,utils:e.utils})}function Oy(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Ry(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Ny=new Map;function My({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function l(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const b=m.composedPath().find(C=>C instanceof Node&&C.nodeName.toUpperCase()==="A");if(!b||t&&!b.hasAttribute("link"))return;const v=c(b),y=v?b.href.baseVal:b.href;if((v?b.target.baseVal:b.target)||!y&&!b.hasAttribute("state"))return;const E=(b.getAttribute("rel")||"").split(/\s+/);if(b.hasAttribute("download")||E&&E.includes("external"))return;const k=v?new URL(y,document.baseURI):new URL(y);if(!(k.origin!==window.location.origin||i&&k.pathname&&!k.pathname.toLowerCase().startsWith(i.toLowerCase())))return[b,k]}function f(m){const b=l(m);if(!b)return;const[v,y]=b,x=o.parsePath(y.pathname+y.search+y.hash),E=v.getAttribute("state");m.preventDefault(),s(x,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:E?JSON.parse(E):void 0})}function h(m){const b=l(m);if(!b)return;const[v,y]=b;r&&(y.pathname=r(y.pathname)),o.preloadRoute(y,v.getAttribute("preload")!=="false")}function p(m){clearTimeout(a);const b=l(m);if(!b)return u=null;const[v,y]=b;u!==v&&(r&&(y.pathname=r(y.pathname)),a=setTimeout(()=>{o.preloadRoute(y,v.getAttribute("preload")!=="false"),u=v},20))}function g(m){if(m.defaultPrevented)return;let b=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!b)return;if(!b.startsWith("https://action/")){const y=new URL(b,Bp);if(b=o.parsePath(y.pathname+y.search),!b.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=Ny.get(b);if(v){m.preventDefault();const y=new FormData(m.target,m.submitter);v.call({r:o,f:m.target},m.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}yn(["click","submit"]),document.addEventListener("click",f),e&&(document.addEventListener("mousemove",p,{passive:!0}),document.addEventListener("focusin",h,{passive:!0}),document.addEventListener("touchstart",h,{passive:!0})),document.addEventListener("submit",g),ie(()=>{document.removeEventListener("click",f),e&&(document.removeEventListener("mousemove",p),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",g)})}}function Ly(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=Fp();return Iy({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(uy(s),"",r):window.history.pushState(s,"",r),Ry(decodeURIComponent(window.location.hash.slice(1)),i),Jc()},init:r=>Oy(window,"popstate",cy(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:My({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var $y=F("<a>");function Bn(e){e=q({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=ae(e,["href","state","class","activeClass","inactiveClass","end"]),n=yy(()=>e.href),r=vy(n),o=ra(),i=ne(()=>{const s=n();if(s===void 0)return[!1,!1];const a=uo(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(uo(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=$y();return ir(s,q(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Py(e){const t=Jo(),n=ra(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const wc=Symbol("store-raw"),Uo=Symbol("store-node"),yr=Symbol("store-has"),Gp=Symbol("store-self");function Vp(e){let t=e[Un];if(!t&&(Object.defineProperty(e,Un,{value:t=new Proxy(e,zy)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function Ls(e){let t;return e!=null&&typeof e=="object"&&(e[Un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function ki(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[wc])return n;if(!Ls(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=ki(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=ki(o,t))!==o&&(e[i]=r))}return e}function $s(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Ai(e,t,n){if(e[t])return e[t];const[r,o]=D(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Fy(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===Un||t===Uo||(delete n.value,delete n.writable,n.get=()=>e[Un][t]),n}function Wp(e){pc()&&Ai($s(e,Uo),Gp)()}function By(e){return Wp(e),Reflect.ownKeys(e)}const zy={get(e,t,n){if(t===wc)return e;if(t===Un)return n;if(t===wi)return Wp(e),n;const r=$s(e,Uo),o=r[t];let i=o?o():e[t];if(t===Uo||t===yr||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);pc()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Ai(r,t,i)())}return Ls(i)?Vp(i):i},has(e,t){return t===wc||t===Un||t===wi||t===Uo||t===yr||t==="__proto__"?!0:(pc()&&Ai($s(e,yr),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:By,getOwnPropertyDescriptor:Fy};function Ps(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[yr]&&e[yr][t]&&o!==void 0&&e[yr][t].$()):(e[t]=n,e[yr]&&e[yr][t]&&o===void 0&&e[yr][t].$());let s=$s(e,Uo),a;if((a=Ai(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Ai(s,"length",i))&&a.$(e.length)}(a=s[Gp])&&a.$()}function Yp(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Zp(o)||Ps(e,o,t[o])}}function Zp(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Uy(e,t){if(typeof t=="function"&&(t=t(e)),t=ki(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Ps(e,n,o)}Ps(e,"length",r)}else Yp(e,t)}function fi(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&Zp(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)fi(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&fi(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:c=e.length-1,by:l=1}=r;for(let f=u;f<=c;f+=l)fi(e,[f].concat(t),n);return}else if(t.length>1){fi(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=ki(i),r===void 0||Ls(o)&&Ls(i)&&!Array.isArray(i)?Yp(o,i):Ps(e,r,i))}function Ky(...[e,t]){const n=ki(e||{}),r=Array.isArray(n),o=Vp(n);function i(...s){Tp(()=>{r&&s.length===1?Uy(n,s[0]):fi(n,s)})}return[o,i]}const Be=e=>typeof e=="string",oi=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},ld=e=>e==null?"":String(e),jy=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Hy=/###/g,dd=e=>e&&e.includes("###")?e.replace(Hy,"."):e,fd=e=>!e||Be(e),mi=(e,t,n)=>{const r=Be(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(fd(e))return{};const i=dd(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return fd(e)?{}:{obj:e,k:dd(r[o])}},gd=(e,t,n)=>{const{obj:r,k:o}=mi(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=mi(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=mi(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},qy=(e,t,n,r)=>{const{obj:o,k:i}=mi(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Fs=(e,t)=>{const{obj:n,k:r}=mi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Gy=(e,t,n)=>{const r=Fs(e,n);return r!==void 0?r:Fs(t,n)},Xp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Be(e[r])||e[r]instanceof String||Be(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Xp(e[r],t[r],n):e[r]=t[r]);return e},hr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Vy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Wy=e=>Be(e)?e.replace(/[&<>"'\/]/g,t=>Vy[t]):e;class Yy{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Zy=[" ",",","?","!",";"],Xy=new Yy(20),Jy=(e,t,n)=>{t=t||"",n=n||"";const r=Zy.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=Xy.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},_c=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},Ti=e=>e?.replace(/_/g,"-"),Qy={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Bs{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Qy,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>Be(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),Be(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Bs(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Bs(this.logger,t)}}var Jn=new Bs;class oa{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class pd extends oa{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):Be(r)&&i?a.push(...r.split(i)):a.push(r)));const u=Fs(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Be(r)?u:_c(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),gd(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(Be(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=Fs(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Xp(u,r,i):u={...u,...r},gd(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Jp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const Qp=Symbol("i18next/PATH_KEY");function ev(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Qp?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ko(e,t){const{[Qp]:n}=e(ev()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const Xa=e=>!Be(e)&&typeof e!="boolean"&&typeof e!="number";class zs extends oa{constructor(t,n={}){super(),jy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Jn.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=Xa(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Jy(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Be(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:Be(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Ko(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(U=>typeof U=="function"?Ko(U,{...this.options,...o}):String(U));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const f=o.lng||this.language,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return h?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const p=this.resolve(t,o);let g=p?.res;const m=p?.usedKey||a,b=p?.exactUsedKey||a,v=["[object Number]","[object Function]","[object RegExp]"],y=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,E=o.count!==void 0&&!Be(o.count),k=zs.hasDefaultValue(o),C=E?this.pluralResolver.getSuffix(f,o.count,o):"",T=o.ordinal&&E?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",S=E&&!o.ordinal&&o.count===0,I=S&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${C}`]||o[`defaultValue${T}`]||o.defaultValue;let A=g;x&&!g&&k&&(A=I);const L=Xa(A),O=Object.prototype.toString.apply(A);if(x&&A&&L&&!v.includes(O)&&!(Be(y)&&Array.isArray(A))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const U=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,A,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(p.res=U,p.usedParams=this.getUsedParamsDetails(o),p):U}if(s){const U=Array.isArray(A),R=U?[]:{},B=U?b:m;for(const $ in A)if(Object.prototype.hasOwnProperty.call(A,$)){const N=`${B}${s}${$}`;k&&!g?R[$]=this.translate(N,{...o,defaultValue:Xa(I)?I[$]:void 0,joinArrays:!1,ns:u}):R[$]=this.translate(N,{...o,joinArrays:!1,ns:u}),R[$]===N&&(R[$]=A[$])}g=R}}else if(x&&Be(y)&&Array.isArray(g))g=g.join(y),g&&(g=this.extendTranslation(g,t,o,r));else{let U=!1,R=!1;!this.isValidLookup(g)&&k&&(U=!0,g=I),this.isValidLookup(g)||(R=!0,g=a);const $=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:g,N=k&&I!==g&&this.options.updateMissing;if(R||U||N){if(this.logger.log(N?"updateKey":"missingKey",f,c,E&&!N?`${a}${this.pluralResolver.getSuffix(f,o.count,o)}`:a,N?I:g),s){const Z=this.resolve(a,{...o,keySeparator:!1});Z&&Z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0])for(let Z=0;Z<j.length;Z++)G.push(j[Z]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(o.lng||this.language):G.push(o.lng||this.language);const K=(Z,P,H)=>{const Y=k&&H!==g?H:$;this.options.missingKeyHandler?this.options.missingKeyHandler(Z,c,P,Y,N,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(Z,c,P,Y,N,o),this.emit("missingKey",Z,c,P,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?G.forEach(Z=>{const P=this.pluralResolver.getSuffixes(Z,o);S&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!P.includes(`${this.options.pluralSeparator}zero`)&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(H=>{K([Z],a+H,o[`defaultValue${H}`]||I)})}):K(G,a,I))}g=this.extendTranslation(g,t,o,p,r),R&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${c}${l}${a}`),(R||U)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,U?g:void 0,o))}return i?(p.res=g,p.usedParams=this.getUsedParamsDetails(o),p):g}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Be(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let l=r.replace&&!Be(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||o.usedLng,r),u){const f=t.match(this.interpolator.nestingRegexp),h=f&&f.length;c<h&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...f)=>i?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=Be(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Jp.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return Be(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Ko(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!Be(n.count),p=h&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(Be(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(a=b,!this.checkedLoadedFor[`${m[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${m[0]}-${b}`]=!0,this.logger.warn(`key "${o}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(v=>{if(this.isValidLookup(r))return;s=v;const y=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,l,v,b,n);else{let E;h&&(E=this.pluralResolver.getSuffix(v,n.count,n));const k=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&E.startsWith(C)&&y.push(l+E.replace(C,this.options.pluralSeparator)),y.push(l+E),p&&y.push(l+k)),g){const T=`${l}${this.options.contextSeparator||"_"}${n.context}`;y.push(T),h&&(n.ordinal&&E.startsWith(C)&&y.push(T+E.replace(C,this.options.pluralSeparator)),y.push(T+E),p&&y.push(T+k))}}let x;for(;x=y.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(v,b,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Be(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class hd{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Jn.create("languageUtils")}getScriptPartFromCode(t){if(t=Ti(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ti(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Be(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Be(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Be(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Be(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const md={zero:0,one:1,two:2,few:3,many:4,other:5},bd={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class tv{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Jn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Ti(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),bd;if(!t.match(/-|_/))return bd;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>md[o]-md[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const yd=(e,t,n,r=".",o=!0)=>{let i=Gy(e,t,n);return!i&&o&&Be(n)&&(i=_c(e,n,r),i===void 0&&(i=_c(t,n,r))),i},nv=e=>e.replace(/\$/g,"$$$$");class vd{constructor(t={}){this.logger=Jn.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:b,maxReplaces:v,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:Wy,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?hr(i):s||"{{",this.suffix=a?hr(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":f?hr(f):"-",this.unescapeSuffix=this.unescapePrefix?"":l?hr(l):"",this.nestingPrefix=h?hr(h):p||hr("$t("),this.nestingSuffix=g?hr(g):m||hr(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(!p.includes(this.formatSeparator)){const v=yd(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...o,...n,interpolationkey:p}):v}const g=p.split(this.formatSeparator),m=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(yd(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...o,...n,interpolationkey:m})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>p},{regex:this.regexp,safeValue:p=>this.escapeValue?this.escape(p):p}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof l=="function"){const b=l(t,i,o);s=Be(b)?b:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!Be(s)&&!this.useRawValueToEscape&&(s=ld(s));const m=p.safeValue(s);if(t=t.replace(i[0],nv(m)),f?(p.regex.lastIndex+=m.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const f=u.split(new RegExp(`${hr(l)}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,s);const p=h.match(/'/g),g=h.match(/"/g);((p?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${l}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!Be(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(u=o[1].slice(c).split(this.formatSeparator).map(l=>l.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!Be(i))return i;Be(i)||(i=ld(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,f)=>this.format(l,f,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const rv=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},xd=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Ti(r),o),t[s]=a),a(n)}},ov=e=>(t,n,r)=>e(Ti(n),r)(t);class iv{constructor(t={}){this.logger=Jn.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?xd:ov;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=xd(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:f}=rv(c);if(this.formats[l]){let h=u;try{const p=o?.formatParams?.[o.interpolationkey]||{},g=p.locale||p.lng||o.locale||o.lng||r;h=this.formats[l](u,g,{...f,...o,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const sv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class av extends oa{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Jn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(f=>{const h=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,l=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),u[f]===void 0&&(u[f]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{qy(u.loaded,[i],s),sv(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Be(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Be(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let l;c.length===5?l=c(t,n,r,o,u):l=c(t,n,r,o),l&&typeof l.then=="function"?l.then(f=>a(null,f)).catch(a):a(null,l)}catch(l){a(l)}else c(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Ja=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Be(e[1])&&(t.defaultValue=e[1]),Be(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),wd=e=>(Be(e.ns)&&(e.ns=[e.ns]),Be(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Be(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),fs=()=>{},uv=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class bi extends oa{constructor(t={},n){if(super(),this.options=wd(t),this.services={},this.logger=Jn,this.modules={external:[]},uv(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Be(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Ja();this.options={...r,...this.options,...wd(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Jn.init(o(this.modules.logger),this.options):Jn.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=iv;const l=new hd(this.options);this.store=new pd(this.options.resources,this.options);const f=this.services;f.logger=Jn,f.resourceStore=this.store,f.languageUtils=l,f.pluralResolver=new tv(l,{prepend:this.options.pluralSeparator}),c&&(f.formatter=o(c),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new vd(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new av(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new zs(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=fs),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...l)=>this.store[c](...l)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...l)=>(this.store[c](...l),this)});const a=oi(),u=()=>{const c=(l,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(f),n(l,f)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=fs){let r=n;const o=Be(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=oi();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=fs),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Jp.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=oi();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=Be(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Be(a)?[a]:a);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,l=>{i(l,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...c)=>{let l;typeof u!="object"?l=this.options.overloadTranslationOptionHandler([a,u].concat(c)):l={...u},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs;const f=l.ns!==void 0&&l.ns!==null;l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const h={...this.options,...l};Array.isArray(i)&&!f&&(h.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Ko(l.keyPrefix,h));const p=this.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(m=>(typeof m=="function"&&(m=Ko(m,h)),`${l.keyPrefix}${p}${m}`)):(typeof a=="function"&&(a=Ko(a,h)),g=l.keyPrefix?`${l.keyPrefix}${p}${a}`:a),this.t(g,l)};return Be(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=oi();return this.options.ns?(Be(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=oi();Be(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new hd(Ja());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new bi(t,n);return r.createInstance=bi.createInstance,r}cloneInstance(t={},n=fs){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new bi(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((l,f)=>(l[f]={...u[c][f]},l),u[c]),u),{});i.store=new pd(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...Ja().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new vd(c)}return i.translator=new zs(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Tt=bi.createInstance();Tt.createInstance;Tt.dir;Tt.init;Tt.loadResources;Tt.reloadResources;Tt.use;Tt.changeLanguage;Tt.getFixedT;Tt.t;Tt.exists;Tt.setDefaultNamespace;Tt.hasLoadedNamespace;Tt.loadNamespaces;Tt.loadLanguages;const{slice:cv,forEach:lv}=[];function dv(e){return lv.call(cv.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function fv(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const _d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,gv=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!_d.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!_d.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},Ed={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=gv(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var pv={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Ed.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&Ed.create(n,e,r,o,i)}},hv={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},mv={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Do=null;const Sd=()=>{if(Do!==null)return Do;try{if(Do=typeof window<"u"&&window.localStorage!==null,!Do)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Do=!1}return Do};var bv={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Sd())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Sd()&&window.localStorage.setItem(n,e)}};let Io=null;const Cd=()=>{if(Io!==null)return Io;try{if(Io=typeof window<"u"&&window.sessionStorage!==null,!Io)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Io=!1}return Io};var yv={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Cd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Cd()&&window.sessionStorage.setItem(n,e)}},vv={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},xv={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},wv={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},_v={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let eh=!1;try{document.cookie,eh=!0}catch{}const th=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];eh||th.splice(1,1);const Ev=()=>({order:th,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class nh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=dv(n,this.options||{},Ev()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(pv),this.addDetector(hv),this.addDetector(bv),this.addDetector(yv),this.addDetector(vv),this.addDetector(xv),this.addDetector(wv),this.addDetector(_v),this.addDetector(mv)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!fv(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}nh.type="languageDetector";const Sv={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",themeSwitch:"外观",themeModeGroup:"色彩模式",themeSystem:"跟随系统",themeLight:"亮色",themeDark:"暗色",themeNameGroup:"主题",themeTerminal:"终端",themeGraphite:"石墨",themePaper:"纸感",globalConfig:"全局配置"},systemNotifications:{title:"系统提示",delete:"删除提示",versionTitle:"发现新版本",versionMessage:"YorZ {{latest}} 已发布,当前版本 {{current}}。",update:"更新",updating:"更新中…",restart:"重启服务",restartTooltip:"重复服务会中断正在运行中的任务,可在 chat 中发送“继续”指令"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",pin:"固定展开项目面板",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",sessionDivider:"{{kind}} · {{time}}",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",usageLoading:"正在查询当前模型剩余用量…",usageUnavailable:"{{kind}} 暂不支持查询剩余用量。",usageInstallHint:"{{kind}} 需要安装 opencode-quota 后才能查询剩余用量:{{command}}",usageError:"{{kind}} 剩余用量查询失败。",usageAvailableNoDetails:"{{kind}} 已连接,但未返回可展示的剩余用量明细。",usageSummary:"{{kind}} 用量:{{details}}",usageWindow:"{{label}} 剩余约 {{remaining}}%(已用 {{used}}%,重置:{{reset}})",usageWindowUnknown:"{{label}} 剩余用量未知",usageResetUnknown:"未知",usageSeparator:" · ",inputPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,Enter 发送…",draftPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",toolTextExpand:"展开全部 {{count}} 字符",toolTextCollapse:"收起",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败",slashCommandYorzDebug:"启动 debug 模式,尝试解决疑难问题",slashCommandYorzSpec:"基于上下文启动 spec 驱动开发",addSlashCommandOption:"新增指令",addSlashCommandOptionDescription:"创建一个自定义斜杠指令",addSlashCommandTitle:"新增指令",editSlashCommandTitle:"编辑指令",slashCommandNoMatch:"没有匹配的指令",deleteSlashCommandTitle:"删除指令",deleteSlashCommandConfirm:"确定删除自定义指令 /{{name}}?此操作不可撤销。",slashCommandScopeProject:"当前项目",slashCommandScopeGlobal:"全局",customSlashCommandScope:"保存位置",customSlashCommandScopeProjectHint:"项目指令仅在当前项目可用,同名指令项目优先,保存后不可切换",customSlashCommandScopeGlobalHint:"全局指令在所有项目可用,保存后不可切换",customSlashCommandName:"名称",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"说明",customSlashCommandDescriptionPlaceholder:"提交当前会话相关的变更文件",customSlashCommandHiddenPrompt:"隐藏提示词",customSlashCommandHiddenPromptPlaceholder:"使用 git 提交当前会话相关的变更文件",customSlashCommandHiddenPromptHint:"发送时自动附加给 Agent,不会出现在输入框和聊天记录中",customSlashCommandPrefill:"预输入内容",customSlashCommandPrefillPlaceholder:"选择该指令后回填到输入框的内容",customSlashCommandPrefillHint:"选择该指令后回填到输入框,会自动带上 /指令名 前缀,可继续编辑后再发送",customSlashCommandNameRequired:"请输入指令名称",customSlashCommandNameInvalid:"名称只能包含字母、数字、下划线和连字符",customSlashCommandNoDescription:"自定义指令",editCustomSlashCommand:"编辑 {{name}}",deleteCustomSlashCommand:"删除 {{name}}",saveCustomSlashCommand:"保存"},home:{specList:"Spec 列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",runningTasksPreventMerge:"存在进行中的命令或 Agent 任务,请等待任务结束后再合并",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",copySpecPath:"复制路径",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Spec 创建中…",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",appendSavedSpecBusy:"追加任务已保存;该 spec 有正在执行的会话,未自动派发,请在其结束后手动运行。",specPathCopyFailed:"复制 spec 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",committing:"提交中…",discarding:"丢弃中…",commitPlaceholder:"commit message…",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:"},git:{title:"Git 状态",branchSelect:"切换分支",branchPlaceholder:"选择分支",branchFilterPlaceholder:"过滤分支…",noBranches:"没有匹配的分支",mergeBranch:"合并分支",mergeBranchPlaceholder:"选择要合并的分支",mergeFilterPlaceholder:"过滤本地 / 远程分支…",mergeAction:"合并",merging:"合并中…",merged:"已将 {{branch}} 合并到 {{current}}",mergeUpToDate:"{{current}} 已包含 {{branch}},无需合并",mergeSelfHint:"当前分支不能合并到自身",push:"推送",pushing:"推送中…",pushed:"已推送到远端({{branch}})",pull:"拉取",pulling:"拉取中…",pulled:"已拉取最新提交({{branch}})",upToDate:"已是最新,无需拉取",binaryFile:"二进制文件,无法展示差异",diffTruncated:"差异过大,已截断展示",diffEmpty:"该文件暂无可展示的差异",diffLoading:"差异加载中…"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"自定义",agent:"Agent",cmd:"命令 (cmd)",cmdPlaceholder:"例如:/usr/local/bin/my-agent",args:"参数 (args,空格分隔)",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",cmdRequired:"自定义命令的 cmd 不能为空",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",sessionEnd:"会话结束提示",banner:"横幅提示",sound:"声音提示",powerTitle:"任务运行期间防休眠",powerSystemDefault:"系统默认",powerPreventDisplaySleep:"禁止息屏",powerKeepSystemAwake:"禁止休眠",shortcutsTitle:"快捷键",shortcutRecord:"录制",shortcutRecording:"按下新的组合键…",shortcutRecordingButton:"录制中",shortcutReset:"重置",shortcutConflict:"快捷键不能重复绑定",saveStatusSaving:"保存中...",saveStatusSaved:"已保存",shortcuts:{newSpec:"新建 spec",toggleSpecDetailFullscreen:"页面最大化",projectSettings:"项目设置"}},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",started:"命令已启动",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",restart:"重启",restarted:"命令已重启",stop:"终止",stopping:"终止中…",stopped:"命令已终止",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},Cv={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",themeSwitch:"Appearance",themeModeGroup:"Color Mode",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeNameGroup:"Theme",themeTerminal:"Terminal",themeGraphite:"Graphite",themePaper:"Paper",globalConfig:"Global Settings"},systemNotifications:{title:"System Notifications",delete:"Delete notification",versionTitle:"New Version Available",versionMessage:"YorZ {{latest}} is available. Current version: {{current}}.",update:"Update",updating:"Updating…",restart:"Restart Service",restartTooltip:'Restarting the service will interrupt running tasks. You can send "continue" in chat.'},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",pin:"Keep project panel open",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",sessionDivider:"{{kind}} · {{time}}",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",usageLoading:"Checking current model usage…",usageUnavailable:"{{kind}} does not support remaining usage queries yet.",usageInstallHint:"{{kind}} requires opencode-quota before remaining usage can be queried: {{command}}",usageError:"Failed to query {{kind}} remaining usage.",usageAvailableNoDetails:"{{kind}} is connected, but returned no displayable usage details.",usageSummary:"{{kind}} usage: {{details}}",usageWindow:"{{label}} about {{remaining}}% remaining ({{used}}% used, resets: {{reset}})",usageWindowUnknown:"{{label}} remaining usage unknown",usageResetUnknown:"unknown",usageSeparator:" · ",inputPlaceholder:"Type a message, / for commands, @ to reference files, Enter to send…",draftPlaceholder:"Type a message, / for commands, @ to reference files — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",toolTextExpand:"Show all {{count}} chars",toolTextCollapse:"Collapse",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path",slashCommandYorzDebug:"Start debug mode to troubleshoot difficult issues",slashCommandYorzSpec:"Start spec-driven development from the current context",addSlashCommandOption:"Add Command",addSlashCommandOptionDescription:"Create a custom slash command",addSlashCommandTitle:"Add Command",editSlashCommandTitle:"Edit Command",slashCommandNoMatch:"No matching command",deleteSlashCommandTitle:"Delete command",deleteSlashCommandConfirm:"Delete the custom command /{{name}}? This cannot be undone.",slashCommandScopeProject:"This project",slashCommandScopeGlobal:"Global",customSlashCommandScope:"Saved in",customSlashCommandScopeProjectHint:"Available only in this project, shadows a global command of the same name, and cannot be moved after saving",customSlashCommandScopeGlobalHint:"Available in every project, and cannot be moved after saving",customSlashCommandName:"Name",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"Description",customSlashCommandDescriptionPlaceholder:"Commit files related to the current session",customSlashCommandHiddenPrompt:"Hidden Prompt",customSlashCommandHiddenPromptPlaceholder:"Use git to commit files related to this session",customSlashCommandHiddenPromptHint:"Sent to the Agent automatically; never shown in the composer or the chat log",customSlashCommandPrefill:"Prefill Content",customSlashCommandPrefillPlaceholder:"Content inserted into the input when selected",customSlashCommandPrefillHint:"Inserted into the composer on select, prefixed with /command-name; you can edit before sending",customSlashCommandNameRequired:"Enter a command name",customSlashCommandNameInvalid:"Use only letters, numbers, underscores, and hyphens",customSlashCommandNoDescription:"Custom command",editCustomSlashCommand:"Edit {{name}}",deleteCustomSlashCommand:"Delete {{name}}",saveCustomSlashCommand:"Save"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",runningTasksPreventMerge:"Wait for running commands or Agent tasks to finish before merging",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",copySpecPath:"Copy path",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Creating spec…",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",appendSavedSpecBusy:"Append saved. This spec already has a running session, so no round was dispatched — run it manually once that finishes.",specPathCopyFailed:"Failed to copy spec file path"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",committing:"Committing…",discarding:"Discarding…",commitPlaceholder:"commit message…",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: "},git:{title:"Git status",branchSelect:"Switch branch",branchPlaceholder:"Select branch",branchFilterPlaceholder:"Filter branches…",noBranches:"No matching branches",mergeBranch:"Merge branch",mergeBranchPlaceholder:"Pick a branch to merge",mergeFilterPlaceholder:"Filter local / remote branches…",mergeAction:"Merge",merging:"Merging…",merged:"Merged {{branch}} into {{current}}",mergeUpToDate:"{{current}} already contains {{branch}}",mergeSelfHint:"The current branch cannot be merged into itself",push:"Push",pushing:"Pushing…",pushed:"Pushed to remote ({{branch}})",pull:"Pull",pulling:"Pulling…",pulled:"Pulled latest commits ({{branch}})",upToDate:"Already up to date",binaryFile:"Binary file — diff not shown",diffTruncated:"Diff too large, truncated",diffEmpty:"No diff to show for this file",diffLoading:"Loading diff…"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"Custom",agent:"Agent",cmd:"Command (cmd)",cmdPlaceholder:"e.g. /usr/local/bin/my-agent",args:"Arguments (args, space-separated)",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",cmdRequired:"Custom command cmd cannot be empty",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",sessionEnd:"Session end alerts",banner:"Banner alert",sound:"Sound alert",powerTitle:"Prevent sleep while tasks run",powerSystemDefault:"System default",powerPreventDisplaySleep:"Prevent display sleep",powerKeepSystemAwake:"Prevent sleep",shortcutsTitle:"Shortcuts",shortcutRecord:"Record",shortcutRecording:"Press a new shortcut…",shortcutRecordingButton:"Recording",shortcutReset:"Reset",shortcutConflict:"Shortcut bindings must be unique",saveStatusSaving:"Saving...",saveStatusSaved:"Saved",shortcuts:{newSpec:"New Spec",toggleSpecDetailFullscreen:"Page fullscreen",projectSettings:"Project Settings"}},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",started:"Command started",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",restart:"Restart",restarted:"Command restarted",stop:"Stop",stopping:"Stopping...",stopped:"Command stopped",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},rh=Tt.use(nh).init({resources:{"zh-CN":{translation:Sv},en:{translation:Cv}},fallbackLng:"zh-CN",detection:{order:["navigator"],caches:[]},interpolation:{escapeValue:!1}});rh.then(()=>{});const oh="(prefers-color-scheme: dark)",ih="yorz.appearanceHint";function kv(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(ih);if(!e)return null;const t=JSON.parse(e);if(!t||typeof t!="object")return null;const{mode:n,name:r}=t;return!Tv(n)||!Dv(r)?null:{mode:n,name:r}}catch{return null}}function Av(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(ih,JSON.stringify({mode:e,name:t}))}catch{}}function Tv(e){return e==="system"||e==="light"||e==="dark"}function Dv(e){return e==="terminal"||e==="graphite"||e==="paper"}function sh(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia(oh).matches?"dark":"light"}function ah(e,t){return e==="light"||e==="dark"?e:t?"dark":"light"}const el=kv(),[Ec,Iv]=D(el?.mode??"system"),[uh,ch]=D(el?.name??"paper"),[lh,Ov]=D(ah(el?.mode??"system",sh()==="dark"));function dh(e,t){typeof document>"u"||(document.documentElement.setAttribute("data-kb-theme",e),document.documentElement.setAttribute("data-kb-theme-name",t),document.documentElement.style.colorScheme=e)}function Sc(e){const t=ah(e,sh()==="dark");Ov(t),dh(t,uh())}function fh(e){Iv(e),Sc(e)}function Rv(e){ch(e),dh(lh(),e)}function Nv(e,t){ch(t),fh(e)}let kd=!1;function Mv(){kd||(kd=!0,Sc(Ec()),!(typeof window>"u"||!window.matchMedia)&&window.matchMedia(oh).addEventListener("change",()=>{Ec()==="system"&&Sc("system")}))}/**
2
+ * @license lucide-solid v1.24.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */var Lv={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"},Oo=Lv,$v=gt({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Pv=F("<svg>"),Fv=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Bv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),zv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ad=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uv=e=>{const t=zv(e);return t.charAt(0).toUpperCase()+t.slice(1)},Kv=e=>{const[t,n]=ae(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=st($v);return(()=>{var o=Pv();return ir(o,q(Oo,{get width(){return t.size??r.size??Oo.width},get height(){return t.size??r.size??Oo.height},get stroke(){return t.color??r.color??Oo.stroke},get"stroke-width"(){return Q(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??Oo["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??Oo["stroke-width"])},get class(){return Bv("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Ad(Uv(t.name))}`,`lucide-${Ad(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!Fv(n)?"true":void 0}},n),!0,!0),w(o,d(at,{get each(){return t.iconNode},children:([i,s])=>d(Pp,q({component:i},s))})),o})()},Je=Kv,jv=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Hv=e=>d(Je,q(e,{iconNode:jv,name:"arrow-left"})),qv=Hv,Gv=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Vv=e=>d(Je,q(e,{iconNode:Gv,name:"bell"})),Wv=Vv,Yv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zv=e=>d(Je,q(e,{iconNode:Yv,name:"check"})),gs=Zv,Xv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jv=e=>d(Je,q(e,{iconNode:Xv,name:"chevron-down"})),tl=Jv,Qv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ex=e=>d(Je,q(e,{iconNode:Qv,name:"chevron-right"})),gh=ex,tx=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],nx=e=>d(Je,q(e,{iconNode:tx,name:"chevrons-left"})),ph=nx,rx=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],ox=e=>d(Je,q(e,{iconNode:rx,name:"chevrons-right"})),Cc=ox,ix=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],sx=e=>d(Je,q(e,{iconNode:ix,name:"circle-check"})),ax=sx,ux=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],cx=e=>d(Je,q(e,{iconNode:ux,name:"circle-question-mark"})),lx=cx,dx=[["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"}]],fx=e=>d(Je,q(e,{iconNode:dx,name:"copy"})),gx=fx,px=[["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"}]],hx=e=>d(Je,q(e,{iconNode:px,name:"ellipsis"})),mx=hx,bx=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],yx=e=>d(Je,q(e,{iconNode:bx,name:"git-branch"})),nl=yx,vx=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],xx=e=>d(Je,q(e,{iconNode:vx,name:"git-merge"})),hh=xx,wx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_x=e=>d(Je,q(e,{iconNode:wx,name:"info"})),Ex=_x,Sx=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],Cx=e=>d(Je,q(e,{iconNode:Sx,name:"languages"})),kx=Cx,Ax=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Tx=e=>d(Je,q(e,{iconNode:Ax,name:"loader-circle"})),In=Tx,Dx=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Ix=e=>d(Je,q(e,{iconNode:Dx,name:"maximize-2"})),Ox=Ix,Rx=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Nx=e=>d(Je,q(e,{iconNode:Rx,name:"menu"})),Mx=Nx,Lx=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],$x=e=>d(Je,q(e,{iconNode:Lx,name:"minimize-2"})),Px=$x,Fx=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Bx=e=>d(Je,q(e,{iconNode:Fx,name:"monitor"})),zx=Bx,Ux=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Kx=e=>d(Je,q(e,{iconNode:Ux,name:"moon"})),jx=Kx,Hx=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],qx=e=>d(Je,q(e,{iconNode:Hx,name:"palette"})),Gx=qx,Vx=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Wx=e=>d(Je,q(e,{iconNode:Vx,name:"paperclip"})),Yx=Wx,Zx=[["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"}]],Xx=e=>d(Je,q(e,{iconNode:Zx,name:"pencil"})),mh=Xx,Jx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qx=e=>d(Je,q(e,{iconNode:Jx,name:"plus"})),Gi=Qx,ew=[["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"}]],tw=e=>d(Je,q(e,{iconNode:ew,name:"rotate-ccw"})),nw=tw,rw=[["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"}]],ow=e=>d(Je,q(e,{iconNode:rw,name:"rotate-cw"})),iw=ow,sw=[["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"}]],aw=e=>d(Je,q(e,{iconNode:sw,name:"send"})),ia=aw,uw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],cw=e=>d(Je,q(e,{iconNode:uw,name:"settings"})),lw=cw,dw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],fw=e=>d(Je,q(e,{iconNode:dw,name:"square"})),bh=fw,gw=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pw=e=>d(Je,q(e,{iconNode:gw,name:"sun"})),hw=pw,mw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bw=e=>d(Je,q(e,{iconNode:mw,name:"terminal"})),yw=bw,vw=[["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"}]],xw=e=>d(Je,q(e,{iconNode:vw,name:"trash-2"})),rl=xw,ww=[["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"}]],_w=e=>d(Je,q(e,{iconNode:ww,name:"triangle-alert"})),Ew=_w,Sw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Cw=e=>d(Je,q(e,{iconNode:Sw,name:"upload"})),kw=Cw,Aw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tw=e=>d(Je,q(e,{iconNode:Aw,name:"x"})),Wr=Tw;function Ke(e){return`/api/projects/${encodeURIComponent(e)}`}async function kc(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Ne(e,t){const n=await fetch(e,t);if(!n.ok){const r=await kc(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const be={listSpecs:e=>Ne(`${Ke(e)}/specs`),getSpec:(e,t)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${Ke(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await kc(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),gitOp:(e,t,n)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getProjectChanges:e=>Ne(`${Ke(e)}/git/changes`),getFileDiff:(e,t)=>Ne(`${Ke(e)}/git/diff?path=${encodeURIComponent(t)}`),getGitBranches:e=>Ne(`${Ke(e)}/git/branches`),checkoutGitBranch:(e,t)=>Ne(`${Ke(e)}/git/checkout`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),mergeGitBranch:(e,t)=>Ne(`${Ke(e)}/git/merge`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),projectCommit:(e,t)=>Ne(`${Ke(e)}/git/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectDiscard:(e,t)=>Ne(`${Ke(e)}/git/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectPush:e=>Ne(`${Ke(e)}/git/push`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),projectPull:e=>Ne(`${Ke(e)}/git/pull`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),getDebug:(e,t)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Ne("/api/projects"),listSystemNotifications:()=>Ne("/api/system-notifications"),deleteSystemNotification:e=>Ne(`/api/system-notifications/${encodeURIComponent(e)}`,{method:"DELETE"}),updateSystemNotification:e=>Ne(`/api/system-notifications/${encodeURIComponent(e)}/update`,{method:"POST"}),restartSystemNotification:e=>Ne(`/api/system-notifications/${encodeURIComponent(e)}/restart`,{method:"POST"}),removeProject:e=>Ne(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Ne(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Ne(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Ne(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Ne(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Ne(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectCustomInstructions:e=>Ne(`/api/projects/${encodeURIComponent(e)}/custom-instructions`),updateProjectCustomInstructions:(e,t)=>Ne(`/api/projects/${encodeURIComponent(e)}/custom-instructions`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({customInstructions:t})}),getGlobalConfig:()=>Ne("/api/global-config"),updateGlobalConfig:e=>Ne("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Ne(`${Ke(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await fetch(`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await kc(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Ne(`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Ne(`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${Ke(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Ne(`${Ke(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Ne(`${Ke(e)}/sessions`),getAgentUsageStatus:e=>Ne(`${Ke(e)}/agent-usage`),createSession:(e,t={})=>Ne(`${Ke(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Ne(`${Ke(e)}/sessions/${encodeURIComponent(t)}/messages`),getSpecMessages:(e,t)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Ne(`${Ke(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Ne(`${Ke(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Ne(`${Ke(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Ne(`${Ke(e)}/commands`),createCommand:(e,t)=>Ne(`${Ke(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Ne(`${Ke(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Ne(`${Ke(e)}/command-runs`),getCommandRun:(e,t)=>Ne(`${Ke(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Ne(`${Ke(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Ne(`${Ke(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Ne(`${Ke(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Ne(`${Ke(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[Dw,yh]=D("");function Bo(e){e&&yh(e)}function Iw(){yh("")}const[yt,Ow]=D(Rw());function Rw(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function ho(){const e=qi();return()=>e.projectId??yt()}function Ht(e="",t){const n=yt();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[Nw,Mw]=D(0),[Lw,Td]=D(null);let Dd=0;function $w(){Mw(e=>e+1)}function Pw(e){const t=++Dd;Td(()=>e),ie(()=>{Dd===t&&Td(null)})}const[Er,ol]=D(!1);function vh(){ol(e=>!e)}function Us(){ol(!1)}let Ac=0,Qa=!1;function Fw(){Ac-=1,!Qa&&(Qa=!0,queueMicrotask(()=>{Qa=!1,Ac<=0&&ol(!1)}))}function Vi(e){Ac+=1,ie(Fw),Pw(vh),re(()=>{if(!Er())return;const t=n=>{n.key!=="Escape"||e?.()||Us()};window.addEventListener("keydown",t),ie(()=>window.removeEventListener("keydown",t))})}function Bw(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class zw{clientId=Bw();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`,n=new EventSource(t);this.source=n,n.addEventListener("open",()=>{this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})})}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}}let sr=new zw;function sa(e){const t=e;return t.readyState=()=>sr.readyState(),t}function Uw(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=sr.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return sa(o)}function aa(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=sr.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return sa(o)}function xh(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=sr.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return sa(r)}function wh(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return sr.subscribe(n,r=>{r==="list-updated"&&t()})}function _h(e){return sr.subscribe("projects",t=>{t==="projects-changed"&&e()})}function Kw(e){return sr.subscribe("system-notifications",t=>{t==="updated"&&e()})}function jw(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return sr.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function Hw(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return sr.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function qw(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:changes`,r=sr.subscribe(n,(o,i)=>{o==="changes-updated"&&t(i.changes)});return sa(r)}function Eh(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}function Gw(e){return(...t)=>{for(const n of e)n&&n(...t)}}const J=e=>typeof e=="function"&&!e.length?e():e,Id=e=>Array.isArray(e)?e:e?[e]:[];function Vw(e,...t){return typeof e=="function"?e(...t):e}const Ww=ie;function Yw(e,t,n,r){return e.addEventListener(t,n,r),Ww(e.removeEventListener.bind(e,t,n,r))}function Zw(e,t,n,r){const o=()=>{Id(J(e)).forEach(i=>{i&&Id(J(t)).forEach(s=>Yw(i,s,n,r))})};typeof e=="function"?re(o):Pe(o)}const eu=Symbol("fallback");function Od(e){for(const t of e)t.dispose()}function Xw(e,t,n,r={}){const o=new Map;return ie(()=>Od(o.values())),()=>{const s=e()||[];return s[wi],wt(()=>{if(!s.length)return Od(o.values()),o.clear(),r.fallback?[Fn(f=>(o.set(eu,{dispose:f}),r.fallback()))]:[];const a=new Array(s.length),u=o.get(eu);if(!o.size||u){u?.dispose(),o.delete(eu);for(let l=0;l<s.length;l++){const f=s[l],h=t(f,l);i(a,f,l,h)}return a}const c=new Set(o.keys());for(let l=0;l<s.length;l++){const f=s[l],h=t(f,l);c.delete(h);const p=o.get(h);p?(a[l]=p.mapped,p.setIndex?.(l),p.setItem(()=>f)):i(a,f,l,h)}for(const l of c)o.get(l)?.dispose(),o.delete(l);return a})};function i(s,a,u,c){Fn(l=>{const[f,h]=D(a),p={setItem:h,dispose:l};if(n.length>1){const[g,m]=D(u);p.setIndex=m,p.mapped=n(f,g)}else p.mapped=n(f);o.set(c,p),s[u]=p.mapped})}}function Jw(e){const{by:t}=e;return ne(Xw(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}const Qw=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Rd(e){const t={};let n;for(;n=Qw.exec(e);)t[n[1]]=n[2];return t}function An(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Rd(e)}else typeof t=="string"&&(t=Rd(t));return{...e,...t}}function Qe(...e){return Gw(e)}function e_(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Tc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function t_(e){return typeof e=="number"}function Po(e){return Object.prototype.toString.call(e)==="[object String]"}function Wi(e){return typeof e=="function"}function fn(e){return t=>`${e()}-${t}`}function jt(e,t){return e?e===t||e.contains(t):!1}function gi(e,t=!1){const{activeElement:n}=dn(e);if(!n?.nodeName)return null;if(Sh(n)&&n.contentDocument)return gi(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=dn(n).getElementById(r);if(o)return o}}return n}function il(e){return dn(e).defaultView||window}function dn(e){return e?e.ownerDocument||e:document}function Sh(e){return e.tagName==="IFRAME"}var ua=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(ua||{});function Ch(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function sl(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Yi(){return sl(/^Mac/i)}function n_(){return sl(/^iPhone/i)}function r_(){return sl(/^iPad/i)||Yi()&&navigator.maxTouchPoints>1}function o_(){return n_()||r_()}function i_(){return Yi()||o_()}function s_(){return Ch(/AppleWebKit/i)&&!a_()}function a_(){return Ch(/Chrome/i)}function Ae(e,t){return t&&(Wi(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function bt(e){return t=>{for(const n of e)Ae(t,n)}}function u_(e){return Yi()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function St(e){if(e)if(c_())e.focus({preventScroll:!0});else{const t=l_(e);e.focus(),d_(t)}}var ps=null;function c_(){if(ps==null){ps=!1;try{document.createElement("div").focus({get preventScroll(){return ps=!0,!0}})}catch{}}return ps}function l_(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function d_(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var kh=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],f_=[...kh,'[tabindex]:not([tabindex="-1"]):not([disabled])'],al=`${kh.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,g_=f_.join(':not([hidden]):not([tabindex="-1"]),');function Ah(e,t){const r=Array.from(e.querySelectorAll(al)).filter(Nd);return t&&Nd(e)&&r.unshift(e),r.forEach((o,i)=>{if(Sh(o)&&o.contentDocument){const s=o.contentDocument.body,a=Ah(s,!1);r.splice(i,1,...a)}}),r}function Nd(e){return Th(e)&&!p_(e)}function Th(e){return e.matches(al)&&ul(e)}function p_(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function ul(e,t){return e.nodeName!=="#comment"&&h_(e)&&m_(e,t)&&(!e.parentElement||ul(e.parentElement,e))}function h_(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function m_(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function b_(e,t,n){const r=t?.tabbable?g_:al,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&ul(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Md(e){let t=e;for(;t&&!y_(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function y_(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function v_(){}function x_(e){return[e.clientX,e.clientY]}function Dh(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[f,h]=t[u],[,p]=t[u===0?s-1:u-1]||[0,0],g=(l-h)*(n-c)-(c-f)*(r-l);if(h<l){if(r>=h&&r<l){if(g===0)return!0;g>0&&(r===h?r>p&&(o=!o):o=!o)}}else if(l<h){if(r>l&&r<=h){if(g===0)return!0;g<0&&(r===h?r<p&&(o=!o):o=!o)}}else if(r===l&&(n>=f&&n<=c||n>=c&&n<=f))return!0}return o}function Se(e,t){return q(e,t)}var ii=new Map,Ld=new Set;function $d(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=ii.get(n.target);r||(r=new Set,ii.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=ii.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),ii.delete(n.target)),ii.size===0)){for(const o of Ld)o();Ld.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?$d():document.addEventListener("DOMContentLoaded",$d));function Dc(e,t){const n=Pd(e,t,"left"),r=Pd(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function Pd(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function w_(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=Md(e);for(;e&&o&&e!==n&&o!==n;)Dc(o,e),e=o,o=Md(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var ca={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},Di="data-kb-top-layer",Ih,Ic=!1,tr=[];function Ii(e){return tr.findIndex(t=>t.node===e)}function __(e){return tr[Ii(e)]}function E_(e){return tr.length>0&&tr[tr.length-1].node===e}function Oh(){return tr.filter(e=>e.isPointerBlocking)}function S_(){return[...Oh()].slice(-1)[0]}function cl(){return Oh().length>0}function Rh(e){const t=Ii(S_()?.node);return Ii(e)<t}function C_(e){tr.push(e)}function k_(e){const t=Ii(e);t<0||tr.splice(t,1)}function A_(){for(const{node:e}of tr)e.style.pointerEvents=Rh(e)?"none":"auto"}function T_(e){if(cl()&&!Ic){const t=dn(e);Ih=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Ic=!0}}function D_(e){if(cl())return;const t=dn(e);t.body.style.pointerEvents=Ih,t.body.style.length===0&&t.body.removeAttribute("style"),Ic=!1}var wn={layers:tr,isTopMostLayer:E_,hasPointerBlockingLayer:cl,isBelowPointerBlockingLayer:Rh,addLayer:C_,removeLayer:k_,indexOf:Ii,find:__,assignPointerEventToLayers:A_,disableBodyPointerEvents:T_,restoreBodyPointerEvents:D_};function la(e,t){const[n,r]=D(Fd(t?.()));return re(()=>{r(e()?.tagName.toLowerCase()||Fd(t?.()))}),n}function Fd(e){return Po(e)?e:void 0}function Le(e){const[t,n]=ae(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return d(Pp,q(n,{get component(){return t.as}}))}var I_=Object.defineProperty,Nn=(e,t)=>{for(var n in t)I_(e,n,{get:t[n],enumerable:!0})},O_={};Nn(O_,{Button:()=>Nh,Root:()=>ar});var R_=["button","color","file","image","reset","submit"];function N_(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?R_.indexOf(e.type)!==-1:!1}function ar(e){let t;const n=Se({type:"button"},e),[r,o]=ae(n,["ref","type","disabled"]),i=la(()=>t,()=>"button"),s=ne(()=>{const c=i();return c==null?!1:N_({tagName:c,type:r.type})}),a=ne(()=>i()==="input"),u=ne(()=>i()==="a"&&t?.getAttribute("href")!=null);return d(Le,q({as:"button",ref(c){var l=Qe(f=>t=f,r.ref);typeof l=="function"&&l(c)},get type(){return Q(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return Q(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var Nh=ar;function vt(e){return t=>(e(t),()=>e(void 0))}var Xt=e=>typeof e=="function"?e():e,M_=e=>{const t=ne(()=>{const s=Xt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=D(Xt(e.show)?"present":"hidden");let i="none";return re(s=>{const a=Xt(e.show);return wt(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),re(()=>{const s=Xt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const f=n().includes(c.animationName);c.target===s&&f&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ie(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},L_=M_,or=L_,$_={};Nn($_,{CloseButton:()=>Lh,Description:()=>$h,List:()=>Fh,ProgressFill:()=>Bh,ProgressTrack:()=>zh,Region:()=>Uh,Root:()=>Kh,Title:()=>jh,Toast:()=>ao,toaster:()=>Oi,useToastContext:()=>Zi});var Mh=gt();function Zi(){const e=st(Mh);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function Lh(e){const t=Zi(),[n,r]=ae(e,["aria-label","onClick"]);return d(ar,q({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{Ae(i,n.onClick),t.close()}},r))}function $h(e){const t=Zi(),n=Se({id:t.generateId("description")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerDescriptionId(r.id))),d(Le,q({as:"div",get id(){return r.id}},o))}var Ph=gt();function ll(){const e=st(Ph);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function Fh(e){let t;const n=ll(),[r,o]=ae(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{Ae(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{Ae(c,r.onFocusOut),jt(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{Ae(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=c=>{Ae(c,r.onPointerLeave),jt(t,dn(t).activeElement)||n.resumeAllTimer()};return re(Ct([()=>t,()=>n.hotkey()],([c,l])=>{if(!c)return;const f=dn(c),h=p=>{l.every(m=>p[m]||p.code===m)&&St(c)};f.addEventListener("keydown",h),ie(()=>f.removeEventListener("keydown",h))})),re(()=>{if(!n.pauseOnPageIdle())return;const c=il(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),ie(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),d(Le,q({as:"ol",ref(c){var l=Qe(f=>t=f,r.ref);typeof l=="function"&&l(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return d(at,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function Bh(e){const t=ll(),n=Zi(),[r,o]=ae(e,["style"]),[i,s]=D(100);let a=0;return re(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,l=Math.trunc(100-c/n.duration()*100);s(l<0?0:l)});ie(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),d(Le,q({as:"div",get style(){return An({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function zh(e){return d(Le,q({as:"div","aria-hidden":"true",role:"presentation"},e))}var[dl,Xi]=Ky({toasts:[]});function P_(e){Xi("toasts",t=>[...t,e])}function F_(e){return dl.toasts.find(t=>t.id===e)}function B_(e,t){const n=dl.toasts.findIndex(r=>r.id===e);n!==-1&&Xi("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function z_(e){Xi("toasts",t=>t.id===e,"dismiss",!0)}function U_(e){Xi("toasts",t=>t.filter(n=>n.id!==e))}function K_(){Xi("toasts",[])}var fo={toasts:()=>dl.toasts,add:P_,get:F_,update:B_,dismiss:z_,remove:U_,clear:K_},Bd="{hotkey}",j_={close:"Close"},H_={notifications:e=>`Notifications (${e})`};function Uh(e){const t=Se({id:`toast-region-${Mt()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:H_},e),[n,r]=ae(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=ne(()=>fo.toasts().filter(h=>h.region===n.regionId&&h.dismiss===!1).slice(0,n.limit)),[i,s]=D(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(Bd)).replace(Bd,u()),l=()=>({[Di]:n.topLayer?"":void 0}),f={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:fn(()=>r.id)};return d(Ph.Provider,{value:f,get children(){return d(Le,q({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return An({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},l,r))}})}var q_="toast.swipeStart",G_="toast.swipeMove",V_="toast.swipeCancel",W_="toast.swipeEnd";function Kh(e){const t=ll(),n=Se({id:`toast-${Mt()}`,priority:"high",translations:j_},e),[r,o]=ae(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=D(!0),[a,u]=D(),[c,l]=D(),[f,h]=D(!0),[p,g]=D(),{present:m}=or({show:i,element:()=>p()??null}),b=ne(()=>r.duration||t.duration());let v,y=0,x=b(),E=null,k=null;const C=()=>{s(!1),h(!0)},T=()=>{fo.remove(r.toastId)},S=$=>{!$||r.persistent||(window.clearTimeout(v),y=new Date().getTime(),v=window.setTimeout(C,$))},I=()=>{S(x),r.onResume?.()},A=()=>{const $=new Date().getTime()-y;x=x-$,window.clearTimeout(v),r.onPause?.()},L=$=>{Ae($,r.onKeyDown),$.key==="Escape"&&(r.onEscapeKeyDown?.($),$.defaultPrevented||C())},O=$=>{Ae($,r.onPointerDown),$.button===0&&(E={x:$.clientX,y:$.clientY})},U=$=>{if(Ae($,r.onPointerMove),!E)return;const N=$.clientX-E.x,G=$.clientY-E.y,j=!!k,K=["left","right"].includes(t.swipeDirection()),Z=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,P=K?Z(0,N):0,H=K?0:Z(0,G),Y=$.pointerType==="touch"?10:2,se={x:P,y:H},fe={originalEvent:$,delta:se};if(j){k=se,hs(G_,r.onSwipeMove,fe);const{x:X,y:W}=se;$.currentTarget.setAttribute("data-swipe","move"),$.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${X}px`),$.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${W}px`)}else zd(se,t.swipeDirection(),Y)?(k=se,hs(q_,r.onSwipeStart,fe),$.currentTarget.setAttribute("data-swipe","start"),$.target.setPointerCapture($.pointerId)):(Math.abs(N)>Y||Math.abs(G)>Y)&&(E=null)},R=$=>{Ae($,r.onPointerUp);const N=k,G=$.target;if(G.hasPointerCapture($.pointerId)&&G.releasePointerCapture($.pointerId),k=null,E=null,N){const j=$.currentTarget,K={originalEvent:$,delta:N};if(zd(N,t.swipeDirection(),t.swipeThreshold())){hs(W_,r.onSwipeEnd,K);const{x:Z,y:P}=N;$.currentTarget.setAttribute("data-swipe","end"),$.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),$.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),$.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${Z}px`),$.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${P}px`),C()}else hs(V_,r.onSwipeCancel,K),$.currentTarget.setAttribute("data-swipe","cancel"),$.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),$.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),$.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),$.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");j.addEventListener("click",Z=>Z.preventDefault(),{once:!0})}};jn(()=>{t.toasts().find($=>$.id===r.toastId&&$.update)&&h(!1)}),re(Ct(()=>t.isPaused(),$=>{$?A():I()},{defer:!0})),re(Ct([i,b],([$,N])=>{$&&!t.isPaused()&&S(N)})),re(Ct(()=>fo.get(r.toastId)?.dismiss,$=>$&&C())),re(Ct(()=>m(),$=>!$&&T()));const B={translations:()=>r.translations,close:C,duration:b,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>y,generateId:fn(()=>o.id),registerTitleId:vt(u),registerDescriptionId:vt(l)};return d(V,{get when(){return m()},get children(){return d(Mh.Provider,{value:B,get children(){return d(Le,q({as:"li",ref($){var N=Qe(g,r.ref);typeof N=="function"&&N($)},role:"status",tabIndex:0,get style(){return An({animation:f()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:L,onPointerDown:O,onPointerMove:U,onPointerUp:R},o))}})}})}function zd(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function hs(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function jh(e){const t=Zi(),n=Se({id:t.generateId("title")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerTitleId(r.id))),d(Le,q({as:"div",get id(){return r.id}},o))}var Y_=0;function Hh(e,t){const n=Y_++;return fo.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function Oc(e,t){fo.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function Z_(e,t,n){const r=Hh(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(Wi(e)?e():e).then(o=>Oc(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>Oc(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function X_(e){return fo.dismiss(e),e}function J_(){fo.clear()}var Oi={show:Hh,update:Oc,promise:Z_,dismiss:X_,clear:J_},ao=Object.assign(Kh,{CloseButton:Lh,Description:$h,List:Fh,ProgressFill:Bh,ProgressTrack:zh,Region:Uh,Title:jh,toaster:Oi});function Ji(e){const[t,n]=D(e.defaultValue?.()),r=ne(()=>e.value?.()!==void 0),o=ne(()=>r()?e.value?.():t());return[o,s=>{wt(()=>{const a=Vw(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function qh(e){const[t,n]=Ji(e);return[()=>t()??!1,n]}function Q_(e){const[t,n]=Ji(e);return[()=>t()??[],n]}function Gh(e={}){const[t,n]=qh({value:()=>J(e.isSelected),defaultValue:()=>!!J(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!J(e.isReadOnly)&&!J(e.isDisabled)&&n(i)},toggle:()=>{!J(e.isReadOnly)&&!J(e.isDisabled)&&n(!t())}}}function Vh(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Po(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Po(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Po(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Po(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Po(u)||t_(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(u)??[];if(c.length>0){const l=Vh({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...l),t+=l.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function e2(e,t=[]){return ne(()=>{const n=Vh({dataSource:J(e.dataSource),getKey:J(e.getKey),getTextValue:J(e.getTextValue),getDisabled:J(e.getDisabled),getSectionChildren:J(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var t2=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),n2=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function r2(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return t2.has(n)}const t=e.split("-")[0];return n2.has(t)}function o2(e){return r2(e)?"rtl":"ltr"}function Wh(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:o2(e)}}var Rc=Wh(),pi=new Set;function Ud(){Rc=Wh();for(const e of pi)e(Rc)}function i2(){const[e,t]=D(Rc),n=ne(()=>e());return jn(()=>{pi.size===0&&window.addEventListener("languagechange",Ud),pi.add(t),ie(()=>{pi.delete(t),pi.size===0&&window.removeEventListener("languagechange",Ud)})}),{locale:()=>n().locale,direction:()=>n().direction}}var s2=gt();function Yr(){const e=i2();return st(s2)||e}var tu=new Map;function Yh(e){const{locale:t}=Yr(),n=ne(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ne(()=>{const r=n();let o;return tu.has(r)&&(o=tu.get(r)),o||(o=new Intl.Collator(t(),e),tu.set(r,o)),o})}var Xn=class Zh extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Zh?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function a2(e){const[t,n]=Ji(e);return[()=>t()??new Xn,n]}function Xh(e){return i_()?e.altKey:e.ctrlKey}function Fo(e){return Yi()?e.metaKey:e.ctrlKey}function Kd(e){return new Xn(e)}function Jh(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function u2(e){const t=Se({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=D(!1),[o,i]=D(),s=ne(()=>{const m=J(t.selectedKeys);return m!=null?Kd(m):m}),a=ne(()=>{const m=J(t.defaultSelectedKeys);return m!=null?Kd(m):new Xn}),[u,c]=a2({value:s,defaultValue:a,onChange:m=>t.onSelectionChange?.(m)}),[l,f]=D(J(t.selectionBehavior)),h=()=>J(t.selectionMode),p=()=>J(t.disallowEmptySelection)??!1,g=m=>{(J(t.allowDuplicateSelectionEvents)||!Jh(m,u()))&&c(m)};return re(()=>{const m=u();J(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof m=="object"&&m.size===0&&f("replace")}),re(()=>{f(J(t.selectionBehavior)??"toggle")}),{selectionMode:h,disallowEmptySelection:p,selectionBehavior:l,setSelectionBehavior:f,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:g}}function Qh(e){const[t,n]=D(""),[r,o]=D(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(J(e.isDisabled))return;const a=J(e.keyboardDelegate),u=J(e.selectionManager);if(!a.getKeyForSearch)return;const c=c2(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(h=>h+c),f=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);f==null&&l2(l)&&(l=l[0],f=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l)),f!=null&&(u.setFocusedKey(f),e.onTypeSelect?.(f)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function c2(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function l2(e){return e.split("").every(t=>t===e[0])}function d2(e,t,n){const o=q({selectOnFocus:()=>J(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>n?.()??t(),{direction:s}=Yr();let a={top:0,left:0};Zw(()=>J(o.isVirtualized)?void 0:i(),"scroll",()=>{const b=i();b&&(a={top:b.scrollTop,left:b.scrollLeft})});const{typeSelectHandlers:u}=Qh({isDisabled:()=>J(o.disallowTypeAhead),keyboardDelegate:()=>J(o.keyboardDelegate),selectionManager:()=>J(o.selectionManager)}),c=()=>J(o.orientation)??"vertical",l=b=>{Ae(b,u.onKeyDown),b.altKey&&b.key==="Tab"&&b.preventDefault();const v=t();if(!v?.contains(b.target))return;const y=J(o.selectionManager),x=J(o.selectOnFocus),E=S=>{S!=null&&(y.setFocusedKey(S),b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(S):x&&!Xh(b)&&y.replaceSelection(S))},k=J(o.keyboardDelegate),C=J(o.shouldFocusWrap),T=y.focusedKey();switch(b.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(k.getKeyBelow){b.preventDefault();let S;T!=null?S=k.getKeyBelow(T):S=k.getFirstKey?.(),S==null&&C&&(S=k.getFirstKey?.(T)),E(S)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(k.getKeyAbove){b.preventDefault();let S;T!=null?S=k.getKeyAbove(T):S=k.getLastKey?.(),S==null&&C&&(S=k.getLastKey?.(T)),E(S)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(k.getKeyLeftOf){b.preventDefault();const S=s()==="rtl";let I;T!=null?I=k.getKeyLeftOf(T):I=S?k.getFirstKey?.():k.getLastKey?.(),E(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(k.getKeyRightOf){b.preventDefault();const S=s()==="rtl";let I;T!=null?I=k.getKeyRightOf(T):I=S?k.getLastKey?.():k.getFirstKey?.(),E(I)}break}case"Home":if(k.getFirstKey){b.preventDefault();const S=k.getFirstKey(T,Fo(b));S!=null&&(y.setFocusedKey(S),Fo(b)&&b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(S):x&&y.replaceSelection(S))}break;case"End":if(k.getLastKey){b.preventDefault();const S=k.getLastKey(T,Fo(b));S!=null&&(y.setFocusedKey(S),Fo(b)&&b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(S):x&&y.replaceSelection(S))}break;case"PageDown":if(k.getKeyPageBelow&&T!=null){b.preventDefault();const S=k.getKeyPageBelow(T);E(S)}break;case"PageUp":if(k.getKeyPageAbove&&T!=null){b.preventDefault();const S=k.getKeyPageAbove(T);E(S)}break;case"a":Fo(b)&&y.selectionMode()==="multiple"&&J(o.disallowSelectAll)!==!0&&(b.preventDefault(),y.selectAll());break;case"Escape":b.defaultPrevented||(b.preventDefault(),J(o.disallowEmptySelection)||y.clearSelection());break;case"Tab":if(!J(o.allowsTabNavigation)){if(b.shiftKey)v.focus();else{const S=b_(v,{tabbable:!0});let I,A;do A=S.lastChild(),A&&(I=A);while(A);I&&!I.contains(document.activeElement)&&St(I)}break}}},f=b=>{const v=J(o.selectionManager),y=J(o.keyboardDelegate),x=J(o.selectOnFocus);if(v.isFocused()){b.currentTarget.contains(b.target)||v.setFocused(!1);return}if(b.currentTarget.contains(b.target)){if(v.setFocused(!0),v.focusedKey()==null){const E=C=>{C!=null&&(v.setFocusedKey(C),x&&v.replaceSelection(C))},k=b.relatedTarget;k&&b.currentTarget.compareDocumentPosition(k)&Node.DOCUMENT_POSITION_FOLLOWING?E(v.lastSelectedKey()??y.getLastKey?.()):E(v.firstSelectedKey()??y.getFirstKey?.())}else if(!J(o.isVirtualized)){const E=i();if(E){E.scrollTop=a.top,E.scrollLeft=a.left;const k=E.querySelector(`[data-key="${v.focusedKey()}"]`);k&&(St(k),Dc(E,k))}}}},h=b=>{const v=J(o.selectionManager);b.currentTarget.contains(b.relatedTarget)||v.setFocused(!1)},p=b=>{i()===b.target&&b.preventDefault()},g=()=>{const b=J(o.autoFocus);if(!b)return;const v=J(o.selectionManager),y=J(o.keyboardDelegate);let x;b==="first"&&(x=y.getFirstKey?.()),b==="last"&&(x=y.getLastKey?.());const E=v.selectedKeys();E.size&&(x=E.values().next().value),v.setFocused(!0),v.setFocusedKey(x);const k=t();k&&x==null&&!J(o.shouldUseVirtualFocus)&&St(k)};return jn(()=>{o.deferAutoFocus?setTimeout(g,0):g()}),re(Ct([i,()=>J(o.isVirtualized),()=>J(o.selectionManager).focusedKey()],b=>{const[v,y,x]=b;if(y)x&&o.scrollToKey?.(x);else if(x&&v){const E=v.querySelector(`[data-key="${x}"]`);E&&Dc(v,E)}})),{tabIndex:ne(()=>{if(!J(o.shouldUseVirtualFocus))return J(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:p,onFocusIn:f,onFocusOut:h}}function fl(e,t){const n=()=>J(e.selectionManager),r=()=>J(e.key),o=()=>J(e.shouldUseVirtualFocus),i=y=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):y?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Fo(y)||"pointerType"in y&&y.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>J(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=y=>{u()&&(c=y.pointerType,y.pointerType==="mouse"&&y.button===0&&!J(e.shouldSelectOnPressUp)&&i(y))},f=y=>{u()&&y.pointerType==="mouse"&&y.button===0&&J(e.shouldSelectOnPressUp)&&J(e.allowsDifferentPressOrigin)&&i(y)},h=y=>{u()&&(J(e.shouldSelectOnPressUp)&&!J(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(y)},p=y=>{!u()||!["Enter"," "].includes(y.key)||(Xh(y)?n().toggleSelection(r()):i(y))},g=y=>{a()&&y.preventDefault()},m=y=>{const x=t();o()||a()||!x||y.target===x&&n().setFocusedKey(r())},b=ne(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),v=ne(()=>J(e.virtualized)?void 0:r());return re(Ct([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([y,x,E,k,C])=>{y&&x===k&&C&&!E&&document.activeElement!==y&&(e.focus?e.focus():St(y))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:b,dataKey:v,onPointerDown:l,onPointerUp:f,onClick:h,onKeyDown:p,onMouseDown:g,onFocus:m}}var f2=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Xn(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Xn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Xn([t],t,t):new Xn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Xn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Xn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},jd=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function gl(e){const t=u2(e),r=e2({dataSource:()=>J(e.dataSource),getKey:()=>J(e.getKey),getTextValue:()=>J(e.getTextValue),getDisabled:()=>J(e.getDisabled),getSectionChildren:()=>J(e.getSectionChildren),factory:i=>e.filter?new jd(e.filter(i)):new jd(i)},[()=>e.filter]),o=new f2(r,t);return gc(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var em=gt();function tm(){return st(em)}function g2(){const e=tm();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function nm(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function p2(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&nm(o,n))return r+1}return 0}function h2(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:nm(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function rm(e,t){const n=h2(e);e!==n&&t(n)}function m2(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return dn(r).body}function b2(e,t){re(()=>{const n=setTimeout(()=>{rm(e(),t)});ie(()=>clearTimeout(n))})}function y2(e,t){if(typeof IntersectionObserver!="function"){b2(e,t);return}let n=[];re(()=>{const r=()=>{const s=!!n.length;n=e(),s&&rm(e(),t)},o=m2(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ie(()=>i.disconnect())})}function v2(e={}){const[t,n]=Q_({value:()=>J(e.items),onChange:i=>e.onItemsChange?.(i)});y2(t,n);const r=i=>(n(s=>{const a=p2(s,i);return e_(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>d(em.Provider,{value:{registerItem:r},get children(){return i.children}})}}function x2(e){const t=g2(),n=Se({shouldRegisterItem:!0},e);re(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ie(r)})}const w2=["top","right","bottom","left"],jr=Math.min,_n=Math.max,Ks=Math.round,ms=Math.floor,nr=e=>({x:e,y:e}),_2={left:"right",right:"left",bottom:"top",top:"bottom"};function Nc(e,t,n){return _n(e,jr(t,n))}function mo(e,t){return typeof e=="function"?e(t):e}function Hr(e){return e.split("-")[0]}function Qo(e){return e.split("-")[1]}function om(e){return e==="x"?"y":"x"}function pl(e){return e==="y"?"height":"width"}function wr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hl(e){return om(wr(e))}function E2(e,t,n){n===void 0&&(n=!1);const r=Qo(e),o=hl(e),i=pl(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=js(s)),[s,js(s)]}function S2(e){const t=js(e);return[Mc(e),t,Mc(t)]}function Mc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Hd=["left","right"],qd=["right","left"],C2=["top","bottom"],k2=["bottom","top"];function A2(e,t,n){switch(e){case"top":case"bottom":return n?t?qd:Hd:t?Hd:qd;case"left":case"right":return t?C2:k2;default:return[]}}function T2(e,t,n,r){const o=Qo(e);let i=A2(Hr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Mc)))),i}function js(e){const t=Hr(e);return _2[t]+e.slice(t.length)}function D2(e){return{top:0,right:0,bottom:0,left:0,...e}}function im(e){return typeof e!="number"?D2(e):{top:e,right:e,bottom:e,left:e}}function Hs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Gd(e,t,n){let{reference:r,floating:o}=e;const i=wr(t),s=hl(t),a=pl(s),u=Hr(t),c=i==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(u){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Qo(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1);break}return p}async function I2(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=mo(t,e),g=im(p),b=a[h?f==="floating"?"reference":"floating":f],v=Hs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Hs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:u}):y);return{top:(v.top-k.top+g.top)/E.y,bottom:(k.bottom-v.bottom+g.bottom)/E.y,left:(v.left-k.left+g.left)/E.x,right:(k.right-v.right+g.right)/E.x}}const O2=50,R2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:I2},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Gd(c,r,u),h=r,p=0;const g={};for(let m=0;m<i.length;m++){const b=i[m];if(!b)continue;const{name:v,fn:y}=b,{x,y:E,data:k,reset:C}=await y({x:l,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,f=E??f,g[v]={...g[v],...k},C&&p<O2&&(p++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:l,y:f}=Gd(c,h,u)),m=-1)}return{x:l,y:f,placement:h,strategy:o,middlewareData:g}},N2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=mo(e,t)||{};if(c==null)return{};const f=im(l),h={x:n,y:r},p=hl(o),g=pl(p),m=await s.getDimensions(c),b=p==="y",v=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",E=i.reference[g]+i.reference[p]-h[p]-i.floating[g],k=h[p]-i.reference[p],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=C?C[x]:0;(!T||!await(s.isElement==null?void 0:s.isElement(C)))&&(T=a.floating[x]||i.floating[g]);const S=E/2-k/2,I=T/2-m[g]/2-1,A=jr(f[v],I),L=jr(f[y],I),O=A,U=T-m[g]-L,R=T/2-m[g]/2+S,B=Nc(O,R,U),$=!u.arrow&&Qo(o)!=null&&R!==B&&i.reference[g]/2-(R<O?A:L)-m[g]/2<0,N=$?R<O?R-O:R-U:0;return{[p]:h[p]+N,data:{[p]:B,centerOffset:R-B-N,...$&&{alignmentOffset:N}},reset:$}}}),M2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=mo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Hr(o),y=wr(a),x=Hr(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),k=h||(x||!m?[js(a)]:S2(a)),C=g!=="none";!h&&C&&k.push(...T2(a,m,g,E));const T=[a,...k],S=await u.detectOverflow(t,b),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&I.push(S[v]),f){const R=E2(o,s,E);I.push(S[R[0]],S[R[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(R=>R<=0)){var L,O;const R=(((L=i.flip)==null?void 0:L.index)||0)+1,B=T[R];if(B&&(!(f==="alignment"?y!==wr(B):!1)||A.every(G=>wr(G.placement)===y?G.overflows[0]>0:!0)))return{data:{index:R,overflows:A},reset:{placement:B}};let $=(O=A.filter(N=>N.overflows[0]<=0).sort((N,G)=>N.overflows[1]-G.overflows[1])[0])==null?void 0:O.placement;if(!$)switch(p){case"bestFit":{var U;const N=(U=A.filter(G=>{if(C){const j=wr(G.placement);return j===y||j==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(j=>j>0).reduce((j,K)=>j+K,0)]).sort((G,j)=>G[1]-j[1])[0])==null?void 0:U[0];N&&($=N);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Vd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wd(e){return w2.some(t=>e[t]>=0)}const L2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=mo(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Vd(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Wd(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Vd(s,n.floating);return{data:{escapedOffsets:a,escaped:Wd(a)}}}default:return{}}}}},$2=new Set(["left","top"]);async function P2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Hr(n),a=Qo(n),u=wr(n)==="y",c=$2.has(s)?-1:1,l=i&&u?-1:1,f=mo(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),u?{x:p*l,y:h*c}:{x:h*c,y:p*l}}const F2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await P2(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},B2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=mo(e,t),l={x:n,y:r},f=await i.detectOverflow(t,c),h=wr(Hr(o)),p=om(h);let g=l[p],m=l[h];if(s){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=g+f[v],E=g-f[y];g=Nc(x,g,E)}if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+f[v],E=m-f[y];m=Nc(x,m,E)}const b=u.fn({...t,[p]:g,[h]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[p]:s,[h]:a}}}}}},z2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=mo(e,t),l=await s.detectOverflow(t,c),f=Hr(o),h=Qo(o),p=wr(o)==="y",{width:g,height:m}=i.floating;let b,v;f==="top"||f==="bottom"?(b=f,v=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,b=h==="end"?"top":"bottom");const y=m-l.top-l.bottom,x=g-l.left-l.right,E=jr(m-l[b],y),k=jr(g-l[v],x),C=!t.middlewareData.shift;let T=E,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),C&&!h){const A=_n(l.left,0),L=_n(l.right,0),O=_n(l.top,0),U=_n(l.bottom,0);p?S=g-2*(A!==0||L!==0?A+L:_n(l.left,l.right)):T=m-2*(O!==0||U!==0?O+U:_n(l.top,l.bottom))}await u({...t,availableWidth:S,availableHeight:T});const I=await s.getDimensions(a.floating);return g!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function da(){return typeof window<"u"}function ei(e){return sm(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){var t;return(t=(sm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sm(e){return da()?e instanceof Node||e instanceof Sn(e).Node:!1}function Hn(e){return da()?e instanceof Element||e instanceof Sn(e).Element:!1}function Tr(e){return da()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function Yd(e){return!da()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function Qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function U2(e){return/^(table|td|th)$/.test(ei(e))}function fa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const K2=/transform|translate|scale|rotate|perspective|filter/,j2=/paint|layout|strict|content/,no=e=>!!e&&e!=="none";let nu;function ml(e){const t=Hn(e)?qn(e):e;return no(t.transform)||no(t.translate)||no(t.scale)||no(t.rotate)||no(t.perspective)||!bl()&&(no(t.backdropFilter)||no(t.filter))||K2.test(t.willChange||"")||j2.test(t.contain||"")}function H2(e){let t=qr(e);for(;Tr(t)&&!Vo(t);){if(ml(t))return t;if(fa(t))return null;t=qr(t)}return null}function bl(){return nu==null&&(nu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nu}function Vo(e){return/^(html|body|#document)$/.test(ei(e))}function qn(e){return Sn(e).getComputedStyle(e)}function ga(e){return Hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qr(e){if(ei(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yd(e)&&e.host||ur(e);return Yd(t)?t.host:t}function am(e){const t=qr(e);return Vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tr(t)&&Qi(t)?t:am(t)}function Ri(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=am(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Sn(o);if(i){const a=Lc(s);return t.concat(s,s.visualViewport||[],Qi(o)?o:[],a&&n?Ri(a):[])}else return t.concat(o,Ri(o,[],n))}function Lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function um(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tr(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ks(n)!==i||Ks(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function yl(e){return Hn(e)?e:e.contextElement}function jo(e){const t=yl(e);if(!Tr(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=um(t);let s=(i?Ks(n.width):n.width)/r,a=(i?Ks(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const q2=nr(0);function cm(e){const t=Sn(e);return!bl()||!t.visualViewport?q2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function G2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sn(e)?!1:t}function go(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=yl(e);let s=nr(1);t&&(r?Hn(r)&&(s=jo(r)):s=jo(e));const a=G2(i,n,r)?cm(i):nr(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,f=o.height/s.y;if(i){const h=Sn(i),p=r&&Hn(r)?Sn(r):r;let g=h,m=Lc(g);for(;m&&r&&p!==g;){const b=jo(m),v=m.getBoundingClientRect(),y=qn(m),x=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,E=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;u*=b.x,c*=b.y,l*=b.x,f*=b.y,u+=x,c+=E,g=Sn(m),m=Lc(g)}}return Hs({width:l,height:f,x:u,y:c})}function pa(e,t){const n=ga(e).scrollLeft;return t?t.left+n:go(ur(e)).left+n}function lm(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-pa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function V2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=ur(r),a=t?fa(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=nr(1);const l=nr(0),f=Tr(r);if((f||!f&&!i)&&((ei(r)!=="body"||Qi(s))&&(u=ga(r)),f)){const p=go(r);c=jo(r),l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}const h=s&&!f&&!i?lm(s,u):nr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+h.x,y:n.y*c.y-u.scrollTop*c.y+l.y+h.y}}function W2(e){return Array.from(e.getClientRects())}function Y2(e){const t=ur(e),n=ga(e),r=e.ownerDocument.body,o=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+pa(e);const a=-n.scrollTop;return qn(r).direction==="rtl"&&(s+=_n(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Zd=25;function Z2(e,t){const n=Sn(e),r=ur(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=bl();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=pa(r);if(c<=0){const l=r.ownerDocument,f=l.body,h=getComputedStyle(f),p=l.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-p);g<=Zd&&(i-=g)}else c<=Zd&&(i+=c);return{width:i,height:s,x:a,y:u}}function X2(e,t){const n=go(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tr(e)?jo(e):nr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function Xd(e,t,n){let r;if(t==="viewport")r=Z2(e,n);else if(t==="document")r=Y2(ur(e));else if(Hn(t))r=X2(t,n);else{const o=cm(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Hs(r)}function dm(e,t){const n=qr(e);return n===t||!Hn(n)||Vo(n)?!1:qn(n).position==="fixed"||dm(n,t)}function J2(e,t){const n=t.get(e);if(n)return n;let r=Ri(e,[],!1).filter(a=>Hn(a)&&ei(a)!=="body"),o=null;const i=qn(e).position==="fixed";let s=i?qr(e):e;for(;Hn(s)&&!Vo(s);){const a=qn(s),u=ml(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Qi(s)&&!u&&dm(e,s))?r=r.filter(l=>l!==s):o=a,s=qr(s)}return t.set(e,r),r}function Q2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?fa(t)?[]:J2(t,this._c):[].concat(n),r],a=Xd(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,f=a.left;for(let h=1;h<s.length;h++){const p=Xd(t,s[h],o);u=_n(p.top,u),c=jr(p.right,c),l=jr(p.bottom,l),f=_n(p.left,f)}return{width:c-f,height:l-u,x:f,y:u}}function eE(e){const{width:t,height:n}=um(e);return{width:t,height:n}}function tE(e,t,n){const r=Tr(t),o=ur(t),i=n==="fixed",s=go(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=nr(0);function c(){u.x=pa(o)}if(r||!r&&!i)if((ei(t)!=="body"||Qi(o))&&(a=ga(t)),r){const p=go(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?lm(o,a):nr(0),f=s.left+a.scrollLeft-u.x-l.x,h=s.top+a.scrollTop-u.y-l.y;return{x:f,y:h,width:s.width,height:s.height}}function ru(e){return qn(e).position==="static"}function Jd(e,t){if(!Tr(e)||qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ur(e)===n&&(n=n.ownerDocument.body),n}function fm(e,t){const n=Sn(e);if(fa(e))return n;if(!Tr(e)){let o=qr(e);for(;o&&!Vo(o);){if(Hn(o)&&!ru(o))return o;o=qr(o)}return n}let r=Jd(e,t);for(;r&&U2(r)&&ru(r);)r=Jd(r,t);return r&&Vo(r)&&ru(r)&&!ml(r)?n:r||H2(e)||n}const nE=async function(e){const t=this.getOffsetParent||fm,n=this.getDimensions,r=await n(e.floating);return{reference:tE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rE(e){return qn(e).direction==="rtl"}const gm={convertOffsetParentRelativeRectToViewportRelativeRect:V2,getDocumentElement:ur,getClippingRect:Q2,getOffsetParent:fm,getElementRects:nE,getClientRects:W2,getDimensions:eE,getScale:jo,isElement:Hn,isRTL:rE};function pm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oE(e,t){let n=null,r;const o=ur(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:f,width:h,height:p}=c;if(a||t(),!h||!p)return;const g=ms(f),m=ms(o.clientWidth-(l+h)),b=ms(o.clientHeight-(f+p)),v=ms(l),x={rootMargin:-g+"px "+-m+"px "+-b+"px "+-v+"px",threshold:_n(0,jr(1,u))||1};let E=!0;function k(C){const T=C[0].intersectionRatio;if(T!==u){if(!E)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!pm(c,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return s(!0),i}function iE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=yl(e),l=o||i?[...c?Ri(c):[],...t?Ri(t):[]]:[];l.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?oE(c,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!u&&p.observe(c),t&&p.observe(t));let g,m=u?go(e):null;u&&b();function b(){const v=go(e);m&&!pm(m,v)&&n(),m=v,g=requestAnimationFrame(b)}return n(),()=>{var v;l.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(v=p)==null||v.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const sE=F2,aE=B2,uE=M2,cE=z2,lE=L2,dE=N2,fE=(e,t,n)=>{const r=new Map,o={platform:gm,...n},i={...o.platform,_c:r};return R2(e,t,{...o,platform:i})};var gE=F('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),vl=gt();function xl(){const e=st(vl);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var $c=30,Qd=$c/2,pE={top:180,right:-90,bottom:0,left:90};function Dr(e){const t=xl(),n=Se({size:$c},e),[r,o]=ae(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=hE(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",l=()=>Number.parseInt(c())*2*($c/r.size),f=()=>`rotate(${pE[i()]} ${Qd} ${Qd}) translate(0 2)`;return d(Le,q({as:"div",ref(h){var p=Qe(t.setArrowRef,r.ref);typeof p=="function"&&p(h)},"aria-hidden":"true",get style(){return An({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var h=gE(),p=h.firstChild,g=p.firstChild;return g.nextSibling,Pe(()=>Ye(p,"transform",f())),h}}))}function hE(e){const[t,n]=D();return re(()=>{const r=e();r&&n(il(r).getComputedStyle(r))}),t}function mE(e){const t=xl(),[n,r]=ae(e,["ref","style"]);return d(Le,q({as:"div",ref(o){var i=Qe(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return An({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function ef(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function bE(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?ef(r):e?e.getBoundingClientRect():ef()}}}function yE(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var vE={top:"bottom",right:"left",bottom:"top",left:"right"};function xE(e,t){const[n,r]=e.split("-"),o=vE[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function wE(e){const t=Se({getAnchorRect:h=>h?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=D(),[o,i]=D(),[s,a]=D(t.placement),u=()=>bE(t.anchorRef?.(),t.getAnchorRect),{direction:c}=Yr();async function l(){const h=u(),p=n(),g=o();if(!h||!p)return;const m=(g?.clientHeight||0)/2,b=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;p.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();const v=[sE(({placement:C})=>{const T=!!C.split("-")[1];return{mainAxis:b,crossAxis:T?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const C=typeof t.flip=="string"?t.flip.split(" "):void 0;if(C!==void 0&&!C.every(yE))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(uE({padding:t.overflowPadding,fallbackPlacements:C}))}(t.slide||t.overlap)&&v.push(aE({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(cE({padding:t.overflowPadding,apply({availableWidth:C,availableHeight:T,rects:S}){const I=Math.round(S.reference.width);C=Math.floor(C),T=Math.floor(T),p.style.setProperty("--kb-popper-anchor-width",`${I}px`),p.style.setProperty("--kb-popper-content-available-width",`${C}px`),p.style.setProperty("--kb-popper-content-available-height",`${T}px`),t.sameWidth&&(p.style.width=`${I}px`),t.fitViewport&&(p.style.maxWidth=`${C}px`,p.style.maxHeight=`${T}px`)}})),t.hideWhenDetached&&v.push(lE({padding:t.detachedPadding})),g&&v.push(dE({element:g,padding:t.arrowPadding}));const y=await fE(h,p,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...gm,isRTL:()=>c()==="rtl"}});if(a(y.placement),t.onCurrentPlacementChange?.(y.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",xE(y.placement,c()));const x=Math.round(y.x),E=Math.round(y.y);let k;if(t.hideWhenDetached&&(k=y.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(p.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${E}px, 0)`,visibility:k}),g&&y.middlewareData.arrow){const{x:C,y:T}=y.middlewareData.arrow,S=y.placement.split("-")[0];Object.assign(g.style,{left:C!=null?`${C}px`:"",top:T!=null?`${T}px`:"",[S]:"100%"})}}re(()=>{const h=u(),p=n();if(!h||!p)return;const g=iE(h,p,l,{elementResize:typeof ResizeObserver=="function"});ie(g)}),re(()=>{const h=n(),p=t.contentRef?.();!h||!p||queueMicrotask(()=>{h.style.zIndex=getComputedStyle(p).zIndex})});const f={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return d(vl.Provider,{value:f,get children(){return t.children}})}var Zr=Object.assign(wE,{Arrow:Dr,Context:vl,usePopperContext:xl,Positioner:mE});function _E(e){const t=n=>{n.key===ua.Escape&&e.onEscapeKeyDown?.(n)};re(()=>{if(J(e.isDisabled))return;const n=e.ownerDocument?.()??dn();n.addEventListener("keydown",t),ie(()=>{n.removeEventListener("keydown",t)})})}var tf="interactOutside.pointerDownOutside",nf="interactOutside.focusOutside";function EE(e,t){let n,r=v_;const o=()=>dn(t()),i=f=>e.onPointerDownOutside?.(f),s=f=>e.onFocusOutside?.(f),a=f=>e.onInteractOutside?.(f),u=f=>{const h=f.target;return!(h instanceof Element)||h.closest(`[${Di}]`)||!jt(o(),h)||jt(t(),h)?!1:!e.shouldExcludeElement?.(h)},c=f=>{function h(){const p=t(),g=f.target;if(!p||!g||!u(f))return;const m=bt([i,a]);g.addEventListener(tf,m,{once:!0});const b=new CustomEvent(tf,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,isContextMenu:f.button===2||u_(f)&&f.button===0}});g.dispatchEvent(b)}f.pointerType==="touch"?(o().removeEventListener("click",h),r=h,o().addEventListener("click",h,{once:!0})):h()},l=f=>{const h=t(),p=f.target;if(!h||!p||!u(f))return;const g=bt([s,a]);p.addEventListener(nf,g,{once:!0});const m=new CustomEvent(nf,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,isContextMenu:!1}});p.dispatchEvent(m)};re(()=>{J(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ie(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var hm=gt();function SE(){return st(hm)}function es(e){let t;const n=SE(),[r,o]=ae(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=f=>{i.add(f);const h=n?.registerNestedLayer(f);return()=>{i.delete(f),h?.()}};EE({shouldExcludeElement:f=>t?r.excludedElements?.some(h=>jt(h(),f))||[...i].some(h=>jt(h,f)):!1,onPointerDownOutside:f=>{!t||wn.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!wn.isTopMostLayer(t)||(r.onPointerDownOutside?.(f),r.onInteractOutside?.(f),f.defaultPrevented||r.onDismiss?.())},onFocusOutside:f=>{r.onFocusOutside?.(f),r.onInteractOutside?.(f),f.defaultPrevented||r.onDismiss?.()}},()=>t),_E({ownerDocument:()=>dn(t),onEscapeKeyDown:f=>{!t||!wn.isTopMostLayer(t)||(r.onEscapeKeyDown?.(f),!f.defaultPrevented&&r.onDismiss&&(f.preventDefault(),r.onDismiss()))}}),jn(()=>{if(!t)return;wn.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const f=n?.registerNestedLayer(t);wn.assignPointerEventToLayers(),wn.disableBodyPointerEvents(t),ie(()=>{t&&(wn.removeLayer(t),f?.(),wn.assignPointerEventToLayers(),wn.restoreBodyPointerEvents(t))})}),re(Ct([()=>t,()=>r.disableOutsidePointerEvents],([f,h])=>{if(!f)return;const p=wn.find(f);p&&p.isPointerBlocking!==h&&(p.isPointerBlocking=h,wn.assignPointerEventToLayers()),h&&wn.disableBodyPointerEvents(f),ie(()=>{wn.restoreBodyPointerEvents(f)})},{defer:!0}));const l={registerNestedLayer:s};return d(hm.Provider,{value:l,get children(){return d(Le,q({as:"div",ref(f){var h=Qe(p=>t=p,r.ref);typeof h=="function"&&h(f)}},o))}})}function bo(e={}){const[t,n]=qh({value:()=>J(e.open),defaultValue:()=>!!J(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var CE={};Nn(CE,{Arrow:()=>Dr,Content:()=>bm,Portal:()=>ym,Root:()=>vm,Tooltip:()=>Ni,Trigger:()=>xm,useTooltipContext:()=>ha});var mm=gt();function ha(){const e=st(mm);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function bm(e){const t=ha(),n=Se({id:t.generateId("content")},e),[r,o]=ae(n,["ref","style"]);return re(()=>ie(t.registerContentId(o.id))),d(V,{get when(){return t.contentPresent()},get children(){return d(Zr.Positioner,{get children(){return d(es,q({ref(i){var s=Qe(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return An({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function ym(e){const t=ha();return d(V,{get when(){return t.contentPresent()},get children(){return d(ji,e)}})}function kE(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var ro={},AE=0,Ro=!1,mr,si,No;function vm(e){const t=`tooltip-${Mt()}`,n=`${++AE}`,r=Se({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=ae(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=D(),[c,l]=D(),[f,h]=D(),[p,g]=D(i.placement),m=bo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:R=>o.onOpenChange?.(R)}),{present:b}=or({show:()=>o.forceMount||m.isOpen(),element:()=>f()??null}),v=()=>{ro[n]=x},y=()=>{for(const R in ro)R!==n&&(ro[R](!0),delete ro[R])},x=(R=!1)=>{R||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,m.close()):s||(s=window.setTimeout(()=>{s=void 0,m.close()},o.closeDelay)),window.clearTimeout(mr),mr=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(No=window.setTimeout(()=>{window.clearTimeout(No),No=void 0},o.skipDelayDuration)),Ro&&(window.clearTimeout(si),si=window.setTimeout(()=>{delete ro[n],si=void 0,Ro=!1},o.closeDelay))},E=()=>{clearTimeout(s),s=void 0,y(),v(),Ro=!0,m.open(),window.clearTimeout(mr),mr=void 0,window.clearTimeout(si),si=void 0,window.clearTimeout(No),No=void 0},k=()=>{y(),v(),!m.isOpen()&&!mr&&!Ro?mr=window.setTimeout(()=>{mr=void 0,Ro=!0,E()},o.openDelay):m.isOpen()||E()},C=(R=!1)=>{!R&&o.openDelay&&o.openDelay>0&&!s&&!No?k():E()},T=()=>{window.clearTimeout(mr),mr=void 0,Ro=!1},S=()=>{window.clearTimeout(s),s=void 0},I=R=>jt(c(),R)||jt(f(),R),A=R=>{const B=c(),$=f();if(!(!B||!$))return kE(R,B,$)},L=R=>{const B=R.target;if(I(B)){S();return}if(!o.ignoreSafeArea){const $=A(p());if($&&Dh(x_(R),$)){S();return}}s||x()};re(()=>{if(!m.isOpen())return;const R=dn();R.addEventListener("pointermove",L,!0),ie(()=>{R.removeEventListener("pointermove",L,!0)})}),re(()=>{const R=c();if(!R||!m.isOpen())return;const B=N=>{const G=N.target;jt(G,R)&&x(!0)},$=il();$.addEventListener("scroll",B,{capture:!0}),ie(()=>{$.removeEventListener("scroll",B,{capture:!0})})}),ie(()=>{clearTimeout(s),ro[n]&&delete ro[n]});const U={dataset:ne(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:b,openTooltip:C,hideTooltip:x,cancelOpening:T,generateId:fn(()=>r.id),registerContentId:vt(u),isTargetOnTooltip:I,setTriggerRef:l,setContentRef:h};return d(mm.Provider,{value:U,get children(){return d(Zr,q({anchorRef:c,contentRef:f,onCurrentPlacementChange:R=>{g(R),o.onCurrentPlacementChange?.(R)}},i))}})}function xm(e){let t;const n=ha(),[r,o]=ae(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const u=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},l=v=>{n.isOpen()&&!s&&!a&&n.hideTooltip(v)},f=v=>{Ae(v,r.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(s=!0,c())},h=v=>{Ae(v,r.onPointerLeave),v.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},p=v=>{Ae(v,r.onPointerDown),i=!0,dn(t).addEventListener("pointerup",u,{once:!0})},g=v=>{Ae(v,r.onClick),s=!1,a=!1,l(!0)},m=v=>{Ae(v,r.onFocus),!(n.isDisabled()||v.defaultPrevented||i)&&(a=!0,c())},b=v=>{Ae(v,r.onBlur);const y=v.relatedTarget;n.isTargetOnTooltip(y)||(s=!1,a=!1,l(!0))};return ie(()=>{dn(t).removeEventListener("pointerup",u)}),d(Le,q({as:"button",ref(v){var y=Qe(x=>{n.setTriggerRef(x),t=x},r.ref);typeof y=="function"&&y(v)},get"aria-describedby"(){return Q(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:f,onPointerLeave:h,onPointerDown:p,onClick:g,onFocus:m,onBlur:b},()=>n.dataset(),o))}var Ni=Object.assign(vm,{Arrow:Dr,Content:bm,Portal:ym,Trigger:xm}),wl=["id","name","validationState","required","disabled","readOnly"];function _l(e){const t=`form-control-${Mt()}`,n=Se({id:t},e),[r,o]=D(),[i,s]=D(),[a,u]=D(),[c,l]=D(),f=(m,b,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&b!=null?m:void 0].filter(Boolean).join(" ")||void 0},h=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,p=ne(()=>({"data-valid":J(n.validationState)==="valid"?"":void 0,"data-invalid":J(n.validationState)==="invalid"?"":void 0,"data-required":J(n.required)?"":void 0,"data-disabled":J(n.disabled)?"":void 0,"data-readonly":J(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>J(n.name)??J(n.id),dataset:p,validationState:()=>J(n.validationState),isRequired:()=>J(n.required),isDisabled:()=>J(n.disabled),isReadOnly:()=>J(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:f,getAriaDescribedBy:h,generateId:fn(()=>J(n.id)),registerLabel:vt(o),registerField:vt(s),registerDescription:vt(u),registerErrorMessage:vt(l)}}}var ma=gt();function Mn(){const e=st(ma);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function ts(e){const t=Mn(),n=Se({id:t.generateId("description")},e);return re(()=>ie(t.registerDescription(n.id))),d(Le,q({as:"div"},()=>t.dataset(),n))}var TE=F("<option>"),DE=F("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function IE(e){let t;const[n,r]=ae(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),o=Mn(),[i,s]=D(!1),a=u=>{const c=n.collection.getItem(u);return d(V,{get when(){return c?.type==="item"},get children(){var l=TE();return l.value=u,w(l,()=>c?.textValue),Pe(()=>l.selected=n.selectionManager.isSelected(u)),l}})};return re(Ct(()=>n.selectionManager.selectedKeys(),(u,c)=>{c&&Jh(u,c)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var u=DE(),c=u.firstChild,l=c.nextSibling;l.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),l.addEventListener("change",h=>{Ae(h,n.onChange),i()||n.selectionManager.setSelectedKeys(new Set([h.target.value])),s(!1)});var f=Qe(h=>t=h,n.ref);return typeof f=="function"&&rr(f,l),ir(l,q({get multiple(){return n.isMultiple},get name(){return o.name()},get required(){return o.isRequired()},get disabled(){return o.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),w(l,d(V,{get when(){return n.isVirtualized},get fallback(){return d(at,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return d(at,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),Pe(h=>{var p=ca,g=n.selectionManager.isFocused()||n.isOpen?-1:0,m=o.isRequired(),b=o.isDisabled(),v=o.isReadOnly();return h.e=Go(u,p,h.e),g!==h.t&&Ye(c,"tabindex",h.t=g),m!==h.a&&(c.required=h.a=m),b!==h.o&&(c.disabled=h.o=b),v!==h.i&&(c.readOnly=h.i=v),h},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),u})()}var rf=new WeakMap;function OE(e){let t=rf.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return rf.set(e,t),t}var wm=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function _m(e,t,n){const r=Yh({usage:"search",sensitivity:"base"}),o=ne(()=>{const i=J(e.keyboardDelegate);return i||new wm(e.collection,t,r)});return d2({selectionManager:()=>J(e.selectionManager),keyboardDelegate:o,autoFocus:()=>J(e.autoFocus),deferAutoFocus:()=>J(e.deferAutoFocus),shouldFocusWrap:()=>J(e.shouldFocusWrap),disallowEmptySelection:()=>J(e.disallowEmptySelection),selectOnFocus:()=>J(e.selectOnFocus),disallowTypeAhead:()=>J(e.disallowTypeAhead),shouldUseVirtualFocus:()=>J(e.shouldUseVirtualFocus),allowsTabNavigation:()=>J(e.allowsTabNavigation),isVirtualized:()=>J(e.isVirtualized),scrollToKey:i=>J(e.scrollToKey)?.(i),orientation:()=>J(e.orientation)},t,n)}var RE={};Nn(RE,{Item:()=>ba,ItemDescription:()=>ya,ItemIndicator:()=>va,ItemLabel:()=>xa,Listbox:()=>NE,Root:()=>Sl,Section:()=>wa,useListboxContext:()=>Sm});var Em=gt();function Sm(){const e=st(Em);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var Cm=gt();function El(){const e=st(Cm);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function ba(e){let t;const n=Sm(),r=`${n.generateId("item")}-${Mt()}`,o=Se({id:r},e),[i,s]=ae(o,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=D(),[c,l]=D(),f=()=>n.listState().selectionManager(),h=()=>f().focusedKey()===i.item.key,p=fl({key:()=>i.item.key,selectionManager:f,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>i.item.disabled},()=>t),g=()=>{if(f().selectionMode()!=="none")return p.isSelected()},m=ne(()=>!(Yi()&&s_())),b=()=>m()?i["aria-label"]:void 0,v=()=>m()?a():void 0,y=()=>m()?c():void 0,x=()=>{if(!n.isVirtualized())return;const S=n.listState().collection().getItem(i.item.key)?.index;return S!=null?S+1:void 0},E=()=>{if(n.isVirtualized())return OE(n.listState().collection())},k=S=>{Ae(S,i.onPointerMove),S.pointerType==="mouse"&&!p.isDisabled()&&n.shouldFocusOnHover()&&(St(S.currentTarget),f().setFocused(!0),f().setFocusedKey(i.item.key))},C=ne(()=>({"data-disabled":p.isDisabled()?"":void 0,"data-selected":p.isSelected()?"":void 0,"data-highlighted":h()?"":void 0})),T={isSelected:p.isSelected,dataset:C,generateId:fn(()=>s.id),registerLabelId:vt(u),registerDescriptionId:vt(l)};return d(Cm.Provider,{value:T,get children(){return d(Le,q({as:"li",ref(S){var I=Qe(A=>t=A,i.ref);typeof I=="function"&&I(S)},role:"option",get tabIndex(){return p.tabIndex()},get"aria-disabled"(){return p.isDisabled()},get"aria-selected"(){return g()},get"aria-label"(){return b()},get"aria-labelledby"(){return v()},get"aria-describedby"(){return y()},get"aria-posinset"(){return x()},get"aria-setsize"(){return E()},get"data-key"(){return p.dataKey()},get onPointerDown(){return bt([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return bt([i.onPointerUp,p.onPointerUp])},get onClick(){return bt([i.onClick,p.onClick])},get onKeyDown(){return bt([i.onKeyDown,p.onKeyDown])},get onMouseDown(){return bt([i.onMouseDown,p.onMouseDown])},get onFocus(){return bt([i.onFocus,p.onFocus])},onPointerMove:k},C,s))}})}function ya(e){const t=El(),n=Se({id:t.generateId("description")},e);return re(()=>ie(t.registerDescriptionId(n.id))),d(Le,q({as:"div"},()=>t.dataset(),n))}function va(e){const t=El(),n=Se({id:t.generateId("indicator")},e),[r,o]=ae(n,["forceMount"]);return d(V,{get when(){return r.forceMount||t.isSelected()},get children(){return d(Le,q({as:"div","aria-hidden":"true"},()=>t.dataset(),o))}})}function xa(e){const t=El(),n=Se({id:t.generateId("label")},e);return re(()=>ie(t.registerLabelId(n.id))),d(Le,q({as:"div"},()=>t.dataset(),n))}function Sl(e){let t;const n=`listbox-${Mt()}`,r=Se({id:n,selectionMode:"single",virtualized:!1},e),[o,i]=ae(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=ne(()=>o.state?o.state:gl({selectedKeys:()=>o.value,defaultSelectedKeys:()=>o.defaultValue,onSelectionChange:o.onChange,allowDuplicateSelectionEvents:()=>J(o.allowDuplicateSelectionEvents),disallowEmptySelection:()=>J(o.disallowEmptySelection),selectionBehavior:()=>J(o.selectionBehavior),selectionMode:()=>J(o.selectionMode),dataSource:()=>o.options??[],getKey:()=>o.optionValue,getTextValue:()=>o.optionTextValue,getDisabled:()=>o.optionDisabled,getSectionChildren:()=>o.optionGroupChildren})),a=_m({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>J(o.autoFocus),shouldFocusWrap:()=>J(o.shouldFocusWrap),keyboardDelegate:()=>o.keyboardDelegate,disallowEmptySelection:()=>J(o.disallowEmptySelection),selectOnFocus:()=>J(o.selectOnFocus),disallowTypeAhead:()=>J(o.disallowTypeAhead),shouldUseVirtualFocus:()=>J(o.shouldUseVirtualFocus),allowsTabNavigation:()=>J(o.allowsTabNavigation),isVirtualized:()=>o.virtualized,scrollToKey:()=>o.scrollToItem},()=>t,()=>o.scrollRef?.()),u={listState:s,generateId:fn(()=>i.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>o.virtualized};return d(Em.Provider,{value:u,get children(){return d(Le,q({as:"ul",ref(c){var l=Qe(f=>t=f,o.ref);typeof l=="function"&&l(c)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return bt([o.onKeyDown,a.onKeyDown])},get onMouseDown(){return bt([o.onMouseDown,a.onMouseDown])},get onFocusIn(){return bt([o.onFocusIn,a.onFocusIn])},get onFocusOut(){return bt([o.onFocusOut,a.onFocusOut])}},i,{get children(){return d(V,{get when(){return!o.virtualized},get fallback(){return o.children?.(s().collection)},get children(){return d(Jw,{get each(){return[...s().collection()]},by:"key",children:c=>d(F1,{get children(){return[d(od,{get when(){return c().type==="section"},get children(){return o.renderSection?.(c())}}),d(od,{get when(){return c().type==="item"},get children(){return o.renderItem?.(c())}})]}})})}})}}))}})}function wa(e){return d(Le,q({as:"li",role:"presentation"},e))}var NE=Object.assign(Sl,{Item:ba,ItemDescription:ya,ItemIndicator:va,ItemLabel:xa,Section:wa}),ou="focusScope.autoFocusOnMount",iu="focusScope.autoFocusOnUnmount",of={bubbles:!1,cancelable:!0},sf={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=Tc(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=Tc(this.stack,e),this.active()?.resume()}};function _a(e,t){const[n,r]=D(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=g=>e.onMountAutoFocus?.(g),a=g=>e.onUnmountAutoFocus?.(g),u=()=>dn(t()),c=()=>{const g=u().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,ca),g},l=()=>{const g=t();return g?Ah(g,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},f=()=>{const g=l();return g.length>0?g[0]:null},h=()=>{const g=l();return g.length>0?g[g.length-1]:null},p=()=>{const g=t();if(!g)return!1;const m=gi(g);return!m||jt(g,m)?!1:Th(m)};re(()=>{const g=t();if(!g)return;sf.add(o);const m=gi(g);if(!jt(g,m)){const v=new CustomEvent(ou,of);g.addEventListener(ou,s),g.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{St(f()),gi(g)===m&&St(g)},0)}ie(()=>{g.removeEventListener(ou,s),setTimeout(()=>{const v=new CustomEvent(iu,of);p()&&v.preventDefault(),g.addEventListener(iu,a),g.dispatchEvent(v),v.defaultPrevented||St(m??u().body),g.removeEventListener(iu,a),sf.remove(o)},0)})}),re(()=>{const g=t();if(!g||!J(e.trapFocus)||n())return;const m=v=>{const y=v.target;y?.closest(`[${Di}]`)||(jt(g,y)?i=y:St(i))},b=v=>{const x=v.relatedTarget??gi(g);x?.closest(`[${Di}]`)||jt(g,x)||St(i)};u().addEventListener("focusin",m),u().addEventListener("focusout",b),ie(()=>{u().removeEventListener("focusin",m),u().removeEventListener("focusout",b)})}),re(()=>{const g=t();if(!g||!J(e.trapFocus)||n())return;const m=c();g.insertAdjacentElement("afterbegin",m);const b=c();g.insertAdjacentElement("beforeend",b);function v(x){const E=f(),k=h();x.relatedTarget===E?St(k):St(E)}m.addEventListener("focusin",v),b.addEventListener("focusin",v);const y=new MutationObserver(x=>{for(const E of x)E.previousSibling===b&&(b.remove(),g.insertAdjacentElement("beforeend",b)),E.nextSibling===m&&(m.remove(),g.insertAdjacentElement("afterbegin",m))});y.observe(g,{childList:!0,subtree:!1}),ie(()=>{m.removeEventListener("focusin",v),b.removeEventListener("focusin",v),m.remove(),b.remove(),y.disconnect()})})}var ME="data-live-announcer";function Ea(e){re(()=>{J(e.isDisabled)||ie(LE(J(e.targets),J(e.root)))})}var ai=new WeakMap,Dn=[];function LE(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const h of u.querySelectorAll(`[${ME}], [${Di}]`))n.add(h);const c=h=>{if(n.has(h)||h.parentElement&&r.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const p of n)if(h.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),f=c(u);if(f===NodeFilter.FILTER_ACCEPT&&i(u),f!==NodeFilter.FILTER_REJECT){let h=l.nextNode();for(;h!=null;)i(h),h=l.nextNode()}},i=u=>{const c=ai.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),ai.set(u,c+1))};Dn.length&&Dn[Dn.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Dn.push(a),()=>{s.disconnect();for(const u of r){const c=ai.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),ai.delete(u)):ai.set(u,c-1)}a===Dn[Dn.length-1]?(Dn.pop(),Dn.length&&Dn[Dn.length-1].observe()):Dn.splice(Dn.indexOf(a),1)}}var km=["id","aria-label","aria-labelledby","aria-describedby"];function Am(e){const t=Mn(),n=Se({id:t.generateId("field")},e);return re(()=>ie(t.registerField(J(n.id)))),{fieldProps:{id:()=>J(n.id),ariaLabel:()=>J(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(J(n.id),J(n["aria-label"]),J(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(J(n["aria-describedby"]))}}}function Cl(e){let t;const n=Mn(),r=Se({id:n.generateId("label")},e),[o,i]=ae(r,["ref"]),s=la(()=>t,()=>"label");return re(()=>ie(n.registerLabel(i.id))),d(Le,q({as:"label",ref(a){var u=Qe(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return Q(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function kl(e,t){re(Ct(e,n=>{if(n==null)return;const r=$E(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ie(()=>{r.removeEventListener("reset",t)}))}))}function $E(e){return PE(e)?e.form:e.closest("form")}function PE(e){return e.matches("textarea, input, select, button")}function ns(e){const t=Mn(),n=Se({id:t.generateId("error-message")},e),[r,o]=ae(n,["forceMount"]),i=()=>t.validationState()==="invalid";return re(()=>{i()&&ie(t.registerErrorMessage(o.id))}),d(V,{get when(){return r.forceMount||i()},get children(){return d(Le,q({as:"div"},()=>t.dataset(),o))}})}var Pc=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},bs=new Map,FE=e=>{re(()=>{const t=Xt(e.style)??{},n=Xt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=bs.get(e.key);o?o.activeCount++:bs.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ie(()=>{const i=bs.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}bs.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},af=FE,BE=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},zE=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},UE=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,c,l]=BE(o,t),f=l-u-r*c;(c!==0||f!==0)&&zE(o,t)&&(i+=f,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[uf,cf]=D([]),KE=e=>uf().indexOf(e)===uf().length-1,jE=e=>{const t=q({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Mt();let r=[0,0],o=null,i=null;re(()=>{Xt(t.enabled)&&(cf(c=>[...c,n]),ie(()=>{cf(c=>c.filter(l=>l!==n))}))}),re(()=>{if(!Xt(t.enabled)||!Xt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Xt(t.preventScrollbarShift)){const f={overflow:"hidden"},h=[];l>0&&(Xt(t.preventScrollbarShiftMode)==="padding"?f.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:f.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,h.push({key:"--scrollbar-width",value:`${l}px`}));const p=window.scrollY,g=window.scrollX;af({key:"prevent-scroll",element:c,style:f,properties:h,cleanup:()=>{Xt(t.restoreScrollPosition)&&l>0&&window.scrollTo(g,p)}})}else af({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),re(()=>{!KE(n)||!Xt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ie(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=lf(c),o=null,i=null},a=c=>{const l=c.target,f=Xt(t.element),h=HE(c),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y",g=p==="x"?h[0]:h[1],m=df(l,p,g,f);let b;f&&Pc(f,l)?b=!m:b=!0,b&&c.cancelable&&c.preventDefault()},u=c=>{const l=Xt(t.element),f=c.target;let h;if(c.touches.length===2)h=!Xt(t.allowPinchZoom);else{if(o==null||i===null){const p=lf(c).map((m,b)=>r[b]-m),g=Math.abs(p[0])>Math.abs(p[1])?"x":"y";o=g,i=g==="x"?p[0]:p[1]}if(f.type==="range")h=!1;else{const p=df(f,o,i,l);l&&Pc(l,f)?h=!p:h=!0}}h&&c.cancelable&&c.preventDefault()}},HE=e=>[e.deltaX,e.deltaY],lf=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],df=(e,t,n,r)=>{const o=r!==null&&Pc(r,e),[i,s]=UE(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},qE=jE,Sa=qE,GE={};Nn(GE,{Arrow:()=>Dr,Content:()=>Dm,Description:()=>ts,ErrorMessage:()=>ns,HiddenSelect:()=>Im,Icon:()=>Om,Item:()=>ba,ItemDescription:()=>ya,ItemIndicator:()=>va,ItemLabel:()=>xa,Label:()=>Rm,Listbox:()=>Nm,Portal:()=>Mm,Root:()=>Lm,Section:()=>wa,Select:()=>en,Trigger:()=>$m,Value:()=>Pm,useSelectContext:()=>Ir});var Tm=gt();function Ir(){const e=st(Tm);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Dm(e){let t;const n=Ir(),[r,o]=ae(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),i=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return Ea({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Sa({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),_a({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(St(n.triggerRef()),a.preventDefault())}},()=>t),d(V,{get when(){return n.contentPresent()},get children(){return d(Zr.Positioner,{get children(){return d(es,q({ref(a){var u=Qe(c=>{n.setContentRef(c),t=c},r.ref);typeof u=="function"&&u(a)},get disableOutsidePointerEvents(){return Q(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return An({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:i,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function Im(e){const t=Ir();return d(IE,q({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function Om(e){const t=Ir(),n=Se({children:"▼"},e);return d(Le,q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Rm(e){const t=Ir(),[n,r]=ae(e,["onClick"]);return d(Cl,q({as:"span",onClick:i=>{Ae(i,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Nm(e){const t=Ir(),n=Se({id:t.generateId("listbox")},e),[r,o]=ae(n,["ref","id","onKeyDown"]);return re(()=>ie(t.registerListboxId(r.id))),d(Sl,q({ref(s){var a=Qe(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{Ae(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},o))}function Mm(e){const t=Ir();return d(V,{get when(){return t.contentPresent()},get children(){return d(ji,e)}})}function VE(e){const t=`select-${Mt()}`,n=Se({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,o,i,s]=ae(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],wl),[a,u]=D(),[c,l]=D(),[f,h]=D(),[p,g]=D(),[m,b]=D(),[v,y]=D(),[x,E]=D(),[k,C]=D(!0),T=X=>{const W=r.optionValue;return W==null?String(X):String(Wi(W)?W(X):X[W])},S=ne(()=>{const X=r.optionGroupChildren;return X==null?r.options:r.options.flatMap(W=>W[X]??W)}),I=ne(()=>S().map(X=>T(X))),A=X=>[...X].map(W=>S().find(ge=>T(ge)===W)).filter(W=>W!=null),L=bo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:X=>r.onOpenChange?.(X)}),O=gl({selectedKeys:()=>r.value!=null?r.value.map(T):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(T):r.defaultValue,onSelectionChange:X=>{r.onChange?.(A(X)),r.closeOnSelection&&G()},allowDuplicateSelectionEvents:()=>J(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>J(r.disallowEmptySelection),selectionBehavior:()=>J(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),U=ne(()=>A(O.selectionManager().selectedKeys())),R=X=>{O.selectionManager().toggleSelection(T(X))},{present:B}=or({show:()=>r.forceMount||L.isOpen(),element:()=>m()??null}),$=()=>{const X=v();X&&St(X)},N=X=>{if(r.options.length<=0)return;C(X),L.open();let W=O.selectionManager().firstSelectedKey();W==null&&(X==="first"?W=O.collection().getFirstKey():X==="last"&&(W=O.collection().getLastKey())),$(),O.selectionManager().setFocused(!0),O.selectionManager().setFocusedKey(W)},G=()=>{L.close(),O.selectionManager().setFocused(!1),O.selectionManager().setFocusedKey(void 0)},j=X=>{L.isOpen()?G():N(X)},{formControlContext:K}=_l(i);kl(p,()=>{const X=r.defaultValue?[...r.defaultValue].map(T):new Xn;O.selectionManager().setSelectedKeys(X)});const Z=Yh({usage:"search",sensitivity:"base"}),P=ne(()=>{const X=J(r.keyboardDelegate);return X||new wm(O.collection,void 0,Z)}),H=X=>r.itemComponent?.({item:X}),Y=X=>r.sectionComponent?.({section:X});re(Ct([I],([X])=>{const ge=[...O.selectionManager().selectedKeys()].filter(Me=>X.includes(Me));O.selectionManager().setSelectedKeys(ge)},{defer:!0}));const se=ne(()=>({"data-expanded":L.isOpen()?"":void 0,"data-closed":L.isOpen()?void 0:""})),fe={dataset:se,isOpen:L.isOpen,isDisabled:()=>K.isDisabled()??!1,isMultiple:()=>J(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??fe.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:U,contentPresent:B,autoFocus:k,triggerRef:p,listState:()=>O,keyboardDelegate:P,triggerId:a,valueId:c,listboxId:f,listboxAriaLabelledBy:x,setListboxAriaLabelledBy:E,setTriggerRef:g,setContentRef:b,setListboxRef:y,open:N,close:G,toggle:j,placeholder:()=>r.placeholder,renderItem:H,renderSection:Y,removeOptionFromSelection:R,generateId:fn(()=>J(i.id)),registerTriggerId:vt(u),registerValueId:vt(l),registerListboxId:vt(h)};return d(ma.Provider,{value:K,get children(){return d(Tm.Provider,{value:fe,get children(){return d(Zr,q({anchorRef:p,contentRef:m},o,{get children(){return d(Le,q({as:"div",role:"group",get id(){return J(i.id)}},()=>K.dataset(),se,s))}}))}})}})}function Lm(e){const[t,n]=ae(e,["value","defaultValue","onChange","multiple"]),r=ne(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),o=ne(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return d(VE,q({get value(){return r()},get defaultValue(){return o()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function $m(e){const t=Mn(),n=Ir(),r=Se({id:n.generateId("trigger")},e),[o,i,s]=ae(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],km),a=()=>n.listState().selectionManager(),u=()=>n.keyboardDelegate(),c=()=>o.disabled||n.isDisabled(),{fieldProps:l}=Am(i),{typeSelectHandlers:f}=Qh({keyboardDelegate:u,selectionManager:a,onTypeSelect:y=>a().select(y)}),h=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,p=y=>{Ae(y,o.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},g=y=>{Ae(y,o.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=y=>{if(Ae(y,o.onKeyDown),!c())switch(Ae(y,f.onKeyDown),y.key){case"Enter":case" ":case"ArrowDown":y.stopPropagation(),y.preventDefault(),n.toggle("first");break;case"ArrowUp":y.stopPropagation(),y.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(y.preventDefault(),n.isMultiple())return;const x=a().firstSelectedKey(),E=x!=null?u().getKeyAbove?.(x):u().getFirstKey?.();E!=null&&a().select(E);break}case"ArrowRight":{if(y.preventDefault(),n.isMultiple())return;const x=a().firstSelectedKey(),E=x!=null?u().getKeyBelow?.(x):u().getFirstKey?.();E!=null&&a().select(E);break}}},b=y=>{Ae(y,o.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{Ae(y,o.onBlur),!n.isOpen()&&a().setFocused(!1)};return re(()=>ie(n.registerTriggerId(l.id()))),re(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(" ")||void 0)}),d(ar,q({ref(y){var x=Qe(n.setTriggerRef,o.ref);typeof x=="function"&&x(y)},get id(){return l.id()},get disabled(){return c()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return Q(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return h()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:p,onClick:g,onKeyDown:m,onFocus:b,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Pm(e){const t=Mn(),n=Ir(),r=Se({id:n.generateId("value")},e),[o,i]=ae(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const u=s().selectedKeys();return u.size===1&&u.has("")?!0:s().isEmpty()};return re(()=>ie(n.registerValueId(o.id))),d(Le,q({as:"span",get id(){return o.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),i,{get children(){return d(V,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return d(WE,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>s().clearSelection()},get children(){return o.children}})}})}}))}function WE(e){const t=Zo(()=>{const n=e.children;return Wi(n)?n(e.state):n});return Q(t)}var en=Object.assign(Lm,{Arrow:Dr,Content:Dm,Description:ts,ErrorMessage:ns,HiddenSelect:Im,Icon:Om,Item:ba,ItemDescription:ya,ItemIndicator:va,ItemLabel:xa,Label:Rm,Listbox:Nm,Portal:Mm,Section:wa,Trigger:$m,Value:Pm}),YE={};Nn(YE,{Anchor:()=>Bm,Arrow:()=>Dr,CloseButton:()=>zm,Content:()=>Um,Description:()=>Km,Popover:()=>zr,Portal:()=>jm,Root:()=>Hm,Title:()=>qm,Trigger:()=>Gm,usePopoverContext:()=>Xr});var Fm=gt();function Xr(){const e=st(Fm);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function Bm(e){const t=Xr(),[n,r]=ae(e,["ref"]);return d(Le,q({as:"div",ref(o){var i=Qe(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function zm(e){const t=Xr(),[n,r]=ae(e,["aria-label","onClick"]);return d(ar,q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ae(i,n.onClick),t.close()}},()=>t.dataset(),r))}function Um(e){let t;const n=Xr(),r=Se({id:n.generateId("content")},e),[o,i]=ae(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const c=p=>{o.onCloseAutoFocus?.(p),n.isModal()?(p.preventDefault(),s||St(n.triggerRef())):(p.defaultPrevented||(a||St(n.triggerRef()),p.preventDefault()),a=!1,u=!1)},l=p=>{o.onPointerDownOutside?.(p),n.isModal()&&(s=p.detail.isContextMenu)},f=p=>{o.onFocusOutside?.(p),n.isOpen()&&n.isModal()&&p.preventDefault()},h=p=>{o.onInteractOutside?.(p),!n.isModal()&&(p.defaultPrevented||(a=!0,p.detail.originalEvent.type==="pointerdown"&&(u=!0)),jt(n.triggerRef(),p.target)&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&u&&p.preventDefault())};return Ea({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Sa({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),_a({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),re(()=>ie(n.registerContentId(i.id))),d(V,{get when(){return n.contentPresent()},get children(){return d(Zr.Positioner,{get children(){return d(es,q({ref(p){var g=Qe(m=>{n.setContentRef(m),t=m},o.ref);typeof g=="function"&&g(p)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Q(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return An({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:h,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function Km(e){const t=Xr(),n=Se({id:t.generateId("description")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerDescriptionId(r.id))),d(Le,q({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function jm(e){const t=Xr();return d(V,{get when(){return t.contentPresent()},get children(){return d(ji,e)}})}var ff={dismiss:"Dismiss"};function Hm(e){const t=`popover-${Mt()}`,n=Se({id:t,modal:!1,translations:ff},e),[r,o]=ae(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=D(),[a,u]=D(),[c,l]=D(),[f,h]=D(),[p,g]=D(),[m,b]=D(),v=bo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:C=>r.onOpenChange?.(C)}),y=()=>r.anchorRef?.()??i()??a(),{present:x}=or({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),E=ne(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),k={translations:()=>r.translations??ff,dataset:E,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??k.isModal(),contentPresent:x,triggerRef:a,contentId:f,titleId:p,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:l,close:v.close,toggle:v.toggle,generateId:fn(()=>r.id),registerContentId:vt(h),registerTitleId:vt(g),registerDescriptionId:vt(b)};return d(Fm.Provider,{value:k,get children(){return d(Zr,q({anchorRef:y,contentRef:c},o))}})}function qm(e){const t=Xr(),n=Se({id:t.generateId("title")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerTitleId(r.id))),d(Le,q({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function Gm(e){const t=Xr(),[n,r]=ae(e,["ref","onClick","onPointerDown"]);return d(ar,q({ref(s){var a=Qe(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Q(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{Ae(s,n.onPointerDown),s.preventDefault()},onClick:s=>{Ae(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var zr=Object.assign(Hm,{Anchor:Bm,Arrow:Dr,CloseButton:zm,Content:Um,Description:Km,Portal:jm,Title:qm,Trigger:Gm}),ZE={};Nn(ZE,{Description:()=>ts,ErrorMessage:()=>ns,Item:()=>Ym,ItemControl:()=>Zm,ItemDescription:()=>Xm,ItemIndicator:()=>Jm,ItemInput:()=>Qm,ItemLabel:()=>e0,Label:()=>t0,RadioGroup:()=>Gn,Root:()=>n0,useRadioGroupContext:()=>Al});var Vm=gt();function Al(){const e=st(Vm);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var Wm=gt();function rs(){const e=st(Wm);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function Ym(e){const t=Mn(),n=Al(),r=`${t.generateId("item")}-${Mt()}`,o=Se({id:r},e),[i,s]=ae(o,["value","disabled","onPointerDown"]),[a,u]=D(),[c,l]=D(),[f,h]=D(),[p,g]=D(),[m,b]=D(!1),v=ne(()=>n.isDefaultValue(i.value)),y=ne(()=>n.isSelectedValue(i.value)),x=ne(()=>i.disabled||t.isDisabled()||!1),E=T=>{Ae(T,i.onPointerDown),m()&&T.preventDefault()},k=ne(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":y()?"":void 0})),C={value:()=>i.value,dataset:k,isDefault:v,isSelected:y,isDisabled:x,inputId:a,labelId:c,descriptionId:f,inputRef:p,select:()=>n.setSelectedValue(i.value),generateId:fn(()=>s.id),registerInput:vt(u),registerLabel:vt(l),registerDescription:vt(h),setIsFocused:b,setInputRef:g};return d(Wm.Provider,{value:C,get children(){return d(Le,q({as:"div",role:"group",onPointerDown:E},k,s))}})}function Zm(e){const t=rs(),n=Se({id:t.generateId("control")},e),[r,o]=ae(n,["onClick","onKeyDown"]);return d(Le,q({as:"div",onClick:a=>{Ae(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Ae(a,r.onKeyDown),a.key===ua.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function Xm(e){const t=rs(),n=Se({id:t.generateId("description")},e);return re(()=>ie(t.registerDescription(n.id))),d(Le,q({as:"div"},()=>t.dataset(),n))}function Jm(e){const t=rs(),n=Se({id:t.generateId("indicator")},e),[r,o]=ae(n,["ref","forceMount"]),[i,s]=D(),{present:a}=or({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return d(V,{get when(){return a()},get children(){return d(Le,q({as:"div",ref(u){var c=Qe(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function Qm(e){const t=Mn(),n=Al(),r=rs(),o=Se({id:r.generateId("input")},e),[i,s]=ae(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=D(!1),f=g=>{if(Ae(g,i.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=g.target;m.checked=r.isSelected()}l(!1)},h=g=>{Ae(g,i.onFocus),r.setIsFocused(!0)},p=g=>{Ae(g,i.onBlur),r.setIsFocused(!1)};return re(Ct([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;l(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),re(()=>ie(r.registerInput(s.id))),d(Le,q({as:"input",ref(g){var m=Qe(r.setInputRef,i.ref);typeof m=="function"&&m(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return An({...ca},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:f,onFocus:h,onBlur:p},()=>r.dataset(),s))}function e0(e){const t=rs(),n=Se({id:t.generateId("label")},e);return re(()=>ie(t.registerLabel(n.id))),d(Le,q({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function t0(e){return d(Cl,q({as:"span"},e))}function n0(e){let t;const n=`radiogroup-${Mt()}`,r=Se({id:n,orientation:"vertical"},e),[o,i,s]=ae(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],wl),[a,u]=Ji({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:b=>o.onChange?.(b)}),{formControlContext:c}=_l(i);kl(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(J(i.id),s["aria-label"],o["aria-labelledby"]),f=()=>c.getAriaDescribedBy(o["aria-describedby"]),h=b=>b===e.defaultValue,p=b=>b===a(),m={ariaDescribedBy:f,isDefaultValue:h,isSelectedValue:p,setSelectedValue:b=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(b),t))for(const v of t.querySelectorAll("[type='radio']")){const y=v;y.checked=p(y.value)}}};return d(ma.Provider,{value:c,get children(){return d(Vm.Provider,{value:m,get children(){return d(Le,q({as:"div",ref(b){var v=Qe(y=>t=y,o.ref);typeof v=="function"&&v(b)},role:"radiogroup",get id(){return J(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return f()}},()=>c.dataset(),s))}})}})}var Gn=Object.assign(n0,{Description:ts,ErrorMessage:ns,Item:Ym,ItemControl:Zm,ItemDescription:Xm,ItemIndicator:Jm,ItemInput:Qm,ItemLabel:e0,Label:t0}),XE=gt();function Ca(){return st(XE)}var JE=gt();function r0(){return st(JE)}var o0=gt();function i0(){return st(o0)}function Or(){const e=i0();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var s0=gt();function Tl(){const e=st(s0);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var a0=gt();function cr(){const e=st(a0);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function Dl(e){let t;const n=cr(),r=Or(),o=Se({id:n.generateId(`item-${Mt()}`)},e),[i,s]=ae(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=D(),[c,l]=D(),[f,h]=D(),p=()=>r.listState().selectionManager(),g=()=>s.id,m=()=>p().focusedKey()===g(),b=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};x2({getItem:()=>({ref:()=>t,type:"item",key:g(),textValue:i.textValue??f()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const v=fl({key:g,selectionManager:p,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),y=I=>{Ae(I,i.onPointerMove),I.pointerType==="mouse"&&(i.disabled?r.onItemLeave(I):(r.onItemEnter(I),I.defaultPrevented||(St(I.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},x=I=>{Ae(I,i.onPointerLeave),I.pointerType==="mouse"&&r.onItemLeave(I)},E=I=>{Ae(I,i.onPointerUp),!i.disabled&&I.button===0&&b()},k=I=>{if(Ae(I,i.onKeyDown),!I.repeat&&!i.disabled)switch(I.key){case"Enter":case" ":b();break}},C=ne(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),T=ne(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":m()?"":void 0})),S={isChecked:()=>i.checked,dataset:T,setLabelRef:h,generateId:fn(()=>s.id),registerLabel:vt(u),registerDescription:vt(l)};return d(s0.Provider,{value:S,get children(){return d(Le,q({as:"div",ref(I){var A=Qe(L=>t=L,i.ref);typeof A=="function"&&A(I)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return C()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return bt([i.onPointerDown,v.onPointerDown])},get onPointerUp(){return bt([E,v.onPointerUp])},get onClick(){return bt([i.onClick,v.onClick])},get onKeyDown(){return bt([k,v.onKeyDown])},get onMouseDown(){return bt([i.onMouseDown,v.onMouseDown])},get onFocus(){return bt([i.onFocus,v.onFocus])},onPointerMove:y,onPointerLeave:x},T,s))}})}function u0(e){const t=Se({closeOnSelect:!1},e),[n,r]=ae(t,["checked","defaultChecked","onChange","onSelect"]),o=Gh({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return d(Dl,q({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Mi={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Mi.next(e==="ltr"?"rtl":"ltr",t)},gf={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function c0(e){const t=cr(),n=Or(),r=Ca(),{direction:o}=Yr(),i=Se({id:t.generateId("trigger")},e),[s,a]=ae(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const c=la(()=>n.triggerRef(),()=>"button"),l=ne(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);re(Ct(()=>r?.value(),v=>{l()&&v===u()&&n.triggerRef()?.focus()}));const f=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},h=v=>{Ae(v,s.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!s.disabled&&v.pointerType!=="touch"&&v.button===0&&f()},p=v=>{Ae(v,s.onClick),s.disabled||v.currentTarget.dataset.pointerType==="touch"&&f()},g=v=>{if(Ae(v,s.onKeyDown),!s.disabled){if(l())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case gf.first(t.orientation()):v.stopPropagation(),v.preventDefault(),w_(v.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case gf.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case Mi.next(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case Mi.previous(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{Ae(v,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},b=v=>{Ae(v,s.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return re(()=>ie(n.registerTriggerId(s.id))),d(ar,q({ref(v){var y=Qe(n.setTriggerRef,s.ref);typeof y=="function"&&y(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return Q(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:h,onMouseOver:m,onClick:p,onKeyDown:g,onFocus:b,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function l0(e){let t;const n=cr(),r=Or(),o=Ca(),i=r0(),{direction:s}=Yr(),a=Se({id:n.generateId(`content-${Mt()}`)},e),[u,c]=ae(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const f=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),h=_m({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);_a({trapFocus:()=>f()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const p=x=>{if(jt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Mi.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Mi.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},g=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},m=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},b=x=>{Ae(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},v=x=>{if(Ae(x,u.onPointerMove),x.pointerType!=="mouse")return;const E=x.target,k=l!==x.clientX;jt(x.currentTarget,E)&&k&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};re(()=>ie(r.registerContentId(u.id))),ie(()=>r.setContentRef(void 0));const y={ref:Qe(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return h.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:bt([u.onKeyDown,h.onKeyDown,p]),onMouseDown:bt([u.onMouseDown,h.onMouseDown]),onFocusIn:bt([u.onFocusIn,h.onFocusIn]),onFocusOut:bt([u.onFocusOut,h.onFocusOut]),onPointerEnter:b,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return d(V,{get when(){return r.contentPresent()},get children(){return d(V,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return d(Le,q({as:"div"},()=>r.dataset(),y,c))},get children(){return d(Zr.Positioner,{get children(){return d(es,q({get disableOutsidePointerEvents(){return Q(()=>!!f())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return An({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:g,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),y,c))}})}})}})}function QE(e){let t;const n=cr(),r=Or(),[o,i]=ae(e,["ref"]);return Sa({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),d(l0,q({ref(s){var a=Qe(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var d0=gt();function eS(){const e=st(d0);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Il(e){const t=cr(),n=Se({id:t.generateId(`group-${Mt()}`)},e),[r,o]=D(),i={generateId:fn(()=>n.id),registerLabelId:vt(o)};return d(d0.Provider,{value:i,get children(){return d(Le,q({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function f0(e){const t=eS(),n=Se({id:t.generateId("label")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerLabelId(r.id))),d(Le,q({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function g0(e){const t=Or(),n=Se({children:"▼"},e);return d(Le,q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function p0(e){return d(Dl,q({role:"menuitem",closeOnSelect:!0},e))}function h0(e){const t=Tl(),n=Se({id:t.generateId("description")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerDescription(r.id))),d(Le,q({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function m0(e){const t=Tl(),n=Se({id:t.generateId("indicator")},e),[r,o]=ae(n,["forceMount"]);return d(V,{get when(){return r.forceMount||t.isChecked()},get children(){return d(Le,q({as:"div"},()=>t.dataset(),o))}})}function b0(e){const t=Tl(),n=Se({id:t.generateId("label")},e),[r,o]=ae(n,["ref","id"]);return re(()=>ie(t.registerLabel(r.id))),d(Le,q({as:"div",ref(i){var s=Qe(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function y0(e){const t=Or();return d(V,{get when(){return t.contentPresent()},get children(){return d(ji,e)}})}var v0=gt();function tS(){const e=st(v0);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function x0(e){const n=cr().generateId(`radiogroup-${Mt()}`),r=Se({id:n},e),[o,i]=ae(r,["value","defaultValue","onChange","disabled"]),[s,a]=Ji({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return d(v0.Provider,{value:u,get children(){return d(Il,i)}})}function w0(e){const t=tS(),n=Se({closeOnSelect:!1},e),[r,o]=ae(n,["value","onSelect"]);return d(Dl,q({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function nS(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function rS(e,t){return t?Dh([e.clientX,e.clientY],t):!1}function _0(e){const t=cr(),n=tm(),r=i0(),o=Ca(),i=r0(),s=Se({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=ae(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,f="right";const[h,p]=D(),[g,m]=D(),[b,v]=D(),[y,x]=D(),[E,k]=D(!0),[C,T]=D(u.placement),[S,I]=D([]),[A,L]=D([]),{DomCollectionProvider:O}=v2({items:A,onItemsChange:L}),U=bo({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:W=>a.onOpenChange?.(W)}),{present:R}=or({show:()=>t.forceMount()||U.isOpen(),element:()=>y()??null}),B=gl({selectionMode:"none",dataSource:A}),$=W=>{k(W),U.open()},N=(W=!1)=>{U.close(),W&&r&&r.close(!0)},G=W=>{k(W),U.toggle()},j=()=>{const W=y();W&&(St(W),B.selectionManager().setFocused(!0),B.selectionManager().setFocusedKey(void 0))},K=()=>{i!=null?setTimeout(()=>j()):j()},Z=W=>{I(Me=>[...Me,W]);const ge=r?.registerNestedMenu(W);return()=>{I(Me=>Tc(Me,W)),ge?.()}},P=W=>f===l?.side&&rS(W,l?.area),H=W=>{P(W)&&W.preventDefault()},Y=W=>{P(W)||K()},se=W=>{P(W)&&W.preventDefault()};Ea({isDisabled:()=>!(r==null&&U.isOpen()&&t.isModal()),targets:()=>[y(),...S()].filter(Boolean)}),re(()=>{const W=y();if(!W||!r)return;const ge=r.registerNestedMenu(W);ie(()=>{ge()})}),re(()=>{r===void 0&&o?.registerMenu(t.value(),[y(),...S()])}),re(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(b()?.focus(),o.autoFocusMenu()&&$(!0)):N())}),re(()=>{r!==void 0||o===void 0||U.isOpen()&&o.setValue(t.value())}),ie(()=>{r===void 0&&o?.unregisterMenu(t.value())});const X={dataset:ne(()=>({"data-expanded":U.isOpen()?"":void 0,"data-closed":U.isOpen()?void 0:""})),isOpen:U.isOpen,contentPresent:R,nestedMenus:S,currentPlacement:C,pointerGraceTimeoutId:()=>c,autoFocus:E,listState:()=>B,parentMenuContext:()=>r,triggerRef:b,contentRef:y,triggerId:h,contentId:g,setTriggerRef:v,setContentRef:x,open:$,close:N,toggle:G,focusContent:K,onItemEnter:H,onItemLeave:Y,onTriggerLeave:se,setPointerDir:W=>f=W,setPointerGraceTimeoutId:W=>c=W,setPointerGraceIntent:W=>l=W,registerNestedMenu:Z,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:vt(p),registerContentId:vt(m)};return d(O,{get children(){return d(o0.Provider,{value:X,get children(){return d(V,{when:i===void 0,get fallback(){return u.children},get children(){return d(Zr,q({anchorRef:b,contentRef:y,onCurrentPlacementChange:T},u))}})}})}})}function E0(e){const{direction:t}=Yr();return d(_0,q({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var oS={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function S0(e){const t=Or(),n=cr(),[r,o]=ae(e,["onFocusOutside","onKeyDown"]),{direction:i}=Yr();return d(l0,q({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const f=l.target;jt(t.triggerRef(),f)||t.close()},onKeyDown:l=>{Ae(l,r.onKeyDown);const f=jt(l.currentTarget,l.target),h=oS.close(i(),n.orientation()).includes(l.key),p=t.parentMenuContext()!=null;f&&h&&p&&(t.close(),St(t.triggerRef()))}},o))}var pf=["Enter"," "],iS={open:(e,t)=>e==="ltr"?[...pf,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...pf,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function C0(e){let t;const n=cr(),r=Or(),o=Se({id:n.generateId(`sub-trigger-${Mt()}`)},e),[i,s]=ae(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Yr(),l=()=>i.id,f=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},h=()=>r.listState().collection(),p=()=>f().focusedKey()===l(),g=fl({key:l,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),m=x=>{Ae(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},b=x=>{if(Ae(x,i.onPointerMove),x.pointerType!=="mouse")return;const E=r.parentMenuContext();if(E?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){E?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),E?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),St(x.currentTarget),E?.listState().selectionManager().setFocused(!0),E?.listState().selectionManager().setFocusedKey(l()))}},v=x=>{if(Ae(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const E=r.parentMenuContext(),k=r.contentRef();if(k){E?.setPointerGraceIntent({area:nS(r.currentPlacement(),x,k),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(E?.pointerGraceTimeoutId());const C=window.setTimeout(()=>{E?.setPointerGraceIntent(null)},300);E?.setPointerGraceTimeoutId(C)}else{if(E?.onTriggerLeave(x),x.defaultPrevented)return;E?.setPointerGraceIntent(null)}E?.onItemLeave(x)},y=x=>{Ae(x,i.onKeyDown),!x.repeat&&(i.disabled||iS.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),f().setFocused(!1),f().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(h().getFirstKey())))};return re(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ie(x)}),re(Ct(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ie(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),re(()=>ie(r.registerTriggerId(i.id))),ie(()=>{u()}),d(Le,q({as:"div",ref(x){var E=Qe(k=>{r.setTriggerRef(k),t=k},i.ref);typeof E=="function"&&E(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return Q(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return p()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return bt([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return bt([i.onPointerUp,g.onPointerUp])},get onClick(){return bt([m,g.onClick])},get onKeyDown(){return bt([y,g.onKeyDown])},get onMouseDown(){return bt([i.onMouseDown,g.onMouseDown])},get onFocus(){return bt([i.onFocus,g.onFocus])},onPointerMove:b,onPointerLeave:v},()=>r.dataset(),s))}function sS(e){const t=Ca(),n=`menu-${Mt()}`,r=Se({id:n,modal:!0},e),[o,i]=ae(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=bo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:fn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return d(a0.Provider,{value:a,get children(){return d(_0,q({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var aS={};Nn(aS,{Root:()=>ka,Separator:()=>uS});function ka(e){let t;const n=Se({orientation:"horizontal"},e),[r,o]=ae(n,["ref","orientation"]),i=la(()=>t,()=>"hr");return d(Le,q({as:"hr",ref(s){var a=Qe(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var uS=ka,cS={};Nn(cS,{Arrow:()=>Dr,CheckboxItem:()=>u0,Content:()=>k0,DropdownMenu:()=>Cn,Group:()=>Il,GroupLabel:()=>f0,Icon:()=>g0,Item:()=>p0,ItemDescription:()=>h0,ItemIndicator:()=>m0,ItemLabel:()=>b0,Portal:()=>y0,RadioGroup:()=>x0,RadioItem:()=>w0,Root:()=>A0,Separator:()=>ka,Sub:()=>E0,SubContent:()=>S0,SubTrigger:()=>C0,Trigger:()=>c0});function k0(e){const t=cr(),n=Or(),[r,o]=ae(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return d(QE,q({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||St(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function A0(e){const t=`dropdownmenu-${Mt()}`,n=Se({id:t},e);return d(sS,n)}var Cn=Object.assign(A0,{Arrow:Dr,CheckboxItem:u0,Content:k0,Group:Il,GroupLabel:f0,Icon:g0,Item:p0,ItemDescription:h0,ItemIndicator:m0,ItemLabel:b0,Portal:y0,RadioGroup:x0,RadioItem:w0,Separator:ka,Sub:E0,SubContent:S0,SubTrigger:C0,Trigger:c0}),lS={};Nn(lS,{Collapsible:()=>Aa,Content:()=>D0,Root:()=>I0,Trigger:()=>O0,useCollapsibleContext:()=>Ol});var T0=gt();function Ol(){const e=st(T0);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function D0(e){const[t,n]=D(),r=Ol(),o=Se({id:r.generateId("content")},e),[i,s]=ae(o,["ref","id","style"]),{present:a}=or({show:r.shouldMount,element:()=>t()??null}),[u,c]=D(0),[l,f]=D(0);let p=r.isOpen()||a();return jn(()=>{const g=requestAnimationFrame(()=>{p=!1});ie(()=>{cancelAnimationFrame(g)})}),re(Ct(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const g=t().getBoundingClientRect();c(g.height),f(g.width),p||(t().style.transitionDuration="",t().style.animationName="")})),re(Ct(r.isOpen,g=>{!g&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),re(()=>ie(r.registerContentId(i.id))),d(V,{get when(){return a()},get children(){return d(Le,q({as:"div",ref(g){var m=Qe(n,i.ref);typeof m=="function"&&m(g)},get id(){return i.id},get style(){return An({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function I0(e){const t=`collapsible-${Mt()}`,n=Se({id:t},e),[r,o]=ae(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=D(),a=bo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=ne(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:fn(()=>o.id),registerContentId:vt(s)};return d(T0.Provider,{value:c,get children(){return d(Le,q({as:"div"},u,o))}})}function O0(e){const t=Ol(),[n,r]=ae(e,["onClick"]);return d(ar,q({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Q(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Ae(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Aa=Object.assign(I0,{Content:D0,Trigger:O0}),dS={};Nn(dS,{CloseButton:()=>N0,Content:()=>M0,Description:()=>L0,Dialog:()=>_r,Overlay:()=>$0,Portal:()=>P0,Root:()=>F0,Title:()=>B0,Trigger:()=>z0,useDialogContext:()=>Jr});var R0=gt();function Jr(){const e=st(R0);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function N0(e){const t=Jr(),[n,r]=ae(e,["aria-label","onClick"]);return d(ar,q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ae(i,n.onClick),t.close()}},r))}function M0(e){let t;const n=Jr(),r=Se({id:n.generateId("content")},e),[o,i]=ae(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=h=>{o.onPointerDownOutside?.(h),n.modal()&&h.detail.isContextMenu&&h.preventDefault()},c=h=>{o.onFocusOutside?.(h),n.modal()&&h.preventDefault()},l=h=>{o.onInteractOutside?.(h),!n.modal()&&(h.defaultPrevented||(s=!0,h.detail.originalEvent.type==="pointerdown"&&(a=!0)),jt(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&a&&h.preventDefault())},f=h=>{o.onCloseAutoFocus?.(h),n.modal()?(h.preventDefault(),St(n.triggerRef())):(h.defaultPrevented||(s||St(n.triggerRef()),h.preventDefault()),s=!1,a=!1)};return Ea({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),Sa({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),_a({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:f},()=>t),re(()=>ie(n.registerContentId(i.id))),d(V,{get when(){return n.contentPresent()},get children(){return d(es,q({ref(h){var p=Qe(g=>{n.setContentRef(g),t=g},o.ref);typeof p=="function"&&p(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return Q(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function L0(e){const t=Jr(),n=Se({id:t.generateId("description")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerDescriptionId(r.id))),d(Le,q({as:"p",get id(){return r.id}},o))}function $0(e){const t=Jr(),[n,r]=ae(e,["ref","style","onPointerDown"]),o=i=>{Ae(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return d(V,{get when(){return t.overlayPresent()},get children(){return d(Le,q({as:"div",ref(i){var s=Qe(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return An({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function P0(e){const t=Jr();return d(V,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return d(ji,e)}})}var hf={dismiss:"Dismiss"};function F0(e){const t=`dialog-${Mt()}`,n=Se({id:t,modal:!0,translations:hf},e),[r,o]=D(),[i,s]=D(),[a,u]=D(),[c,l]=D(),[f,h]=D(),[p,g]=D(),m=bo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:E=>n.onOpenChange?.(E)}),b=()=>n.forceMount||m.isOpen(),{present:v}=or({show:b,element:()=>c()??null}),{present:y}=or({show:b,element:()=>f()??null}),x={translations:()=>n.translations??hf,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:p,overlayRef:c,setOverlayRef:l,contentRef:f,setContentRef:h,overlayPresent:v,contentPresent:y,close:m.close,toggle:m.toggle,setTriggerRef:g,generateId:fn(()=>n.id),registerContentId:vt(o),registerTitleId:vt(s),registerDescriptionId:vt(u)};return d(R0.Provider,{value:x,get children(){return n.children}})}function B0(e){const t=Jr(),n=Se({id:t.generateId("title")},e),[r,o]=ae(n,["id"]);return re(()=>ie(t.registerTitleId(r.id))),d(Le,q({as:"h2",get id(){return r.id}},o))}function z0(e){const t=Jr(),[n,r]=ae(e,["ref","onClick"]);return d(ar,q({ref(i){var s=Qe(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return Q(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Ae(i,n.onClick),t.toggle()}},r))}var _r=Object.assign(F0,{CloseButton:N0,Content:M0,Description:L0,Overlay:$0,Portal:P0,Title:B0,Trigger:z0}),fS={};Nn(fS,{Checkbox:()=>Ur,Control:()=>K0,Description:()=>j0,ErrorMessage:()=>H0,Indicator:()=>q0,Input:()=>G0,Label:()=>V0,Root:()=>W0,useCheckboxContext:()=>yo});var U0=gt();function yo(){const e=st(U0);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function K0(e){const t=Mn(),n=yo(),r=Se({id:n.generateId("control")},e),[o,i]=ae(r,["onClick","onKeyDown"]);return d(Le,q({as:"div",onClick:u=>{Ae(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Ae(u,o.onKeyDown),u.key===ua.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function j0(e){const t=yo();return d(ts,q(()=>t.dataset(),e))}function H0(e){const t=yo();return d(ns,q(()=>t.dataset(),e))}function q0(e){const t=Mn(),n=yo(),[r,o]=D(),i=Se({id:n.generateId("indicator")},e),[s,a]=ae(i,["ref","forceMount"]),{present:u}=or({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return d(V,{get when(){return u()},get children(){return d(Le,q({as:"div",ref(c){var l=Qe(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function G0(e){let t;const n=Mn(),r=yo(),o=Se({id:r.generateId("input")},e),[i,s,a]=ae(o,["ref","style","onChange","onFocus","onBlur"],km),{fieldProps:u}=Am(s),[c,l]=D(!1),f=g=>{if(Ae(g,i.onChange),g.stopPropagation(),!c()){const m=g.target;r.setIsChecked(m.checked),m.checked=r.checked()}l(!1)},h=g=>{Ae(g,i.onFocus),r.setIsFocused(!0)},p=g=>{Ae(g,i.onBlur),r.setIsFocused(!1)};return re(Ct([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),re(Ct([()=>t,()=>r.indeterminate(),()=>r.checked()],([g,m])=>{g&&(g.indeterminate=m)})),d(Le,q({as:"input",ref(g){var m=Qe(b=>{r.setInputRef(b),t=b},i.ref);typeof m=="function"&&m(g)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return An(ca,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:f,onFocus:h,onBlur:p},()=>n.dataset(),()=>r.dataset(),a))}function V0(e){const t=yo();return d(Cl,q(()=>t.dataset(),e))}function W0(e){let t;const n=`checkbox-${Mt()}`,r=Se({value:"on",id:n},e),[o,i,s]=ae(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],wl),[a,u]=D(),[c,l]=D(!1),{formControlContext:f}=_l(i),h=Gh({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:b=>o.onChange?.(b),isDisabled:()=>f.isDisabled(),isReadOnly:()=>f.isReadOnly()});kl(()=>t,()=>h.setIsSelected(o.defaultChecked??!1));const p=b=>{Ae(b,o.onPointerDown),c()&&b.preventDefault()},g=ne(()=>({"data-checked":h.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),m={value:()=>o.value,dataset:g,checked:()=>h.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:fn(()=>J(i.id)),toggle:()=>h.toggle(),setIsChecked:b=>h.setIsSelected(b),setIsFocused:l,setInputRef:u};return d(ma.Provider,{value:f,get children(){return d(U0.Provider,{value:m,get children(){return d(Le,q({as:"div",ref(b){var v=Qe(y=>t=y,o.ref);typeof v=="function"&&v(b)},role:"group",get id(){return J(i.id)},onPointerDown:p},()=>f.dataset(),g,s,{get children(){return d(gS,{state:m,get children(){return o.children}})}}))}})}})}function gS(e){const t=Zo(()=>{const n=e.children;return Wi(n)?n(e.state):n});return Q(t)}var Ur=Object.assign(W0,{Control:K0,Description:j0,ErrorMessage:H0,Indicator:q0,Input:G0,Label:V0});function Y0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Y0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Z0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Y0(e))&&(r&&(r+=" "),r+=t);return r}const pS=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},hS=(e,t)=>({classGroupId:e,validator:t}),X0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qs="-",mf=[],mS="arbitrary..",bS=e=>{const t=vS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return yS(s);const a=s.split(qs),u=a[0]===""&&a.length>1?1:0;return J0(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?pS(c,u):u:c||mf}return n[s]||mf}}},J0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=J0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(qs):e.slice(t).join(qs),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},yS=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?mS+r:void 0})(),vS=e=>{const{theme:t,classGroups:n}=e;return xS(n,t)},xS=(e,t)=>{const n=X0();for(const r in e){const o=e[r];Rl(o,n,r,t)}return n},Rl=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];wS(s,t,n,r)}},wS=(e,t,n,r)=>{if(typeof e=="string"){_S(e,t,n);return}if(typeof e=="function"){ES(e,t,n,r);return}SS(e,t,n,r)},_S=(e,t,n)=>{const r=e===""?t:Q0(t,e);r.classGroupId=n},ES=(e,t,n,r)=>{if(CS(e)){Rl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hS(n,e))},SS=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Rl(u,Q0(t,a),n,r)}},Q0=(e,t)=>{let n=e;const r=t.split(qs),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=X0(),n.nextPart.set(s,a)),n=a}return n},CS=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,kS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Fc="!",bf=":",AS=[],yf=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),TS=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let m=0;m<l;m++){const b=o[m];if(s===0&&a===0){if(b===bf){i.push(o.slice(u,m)),u=m+1;continue}if(b==="/"){c=m;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const f=i.length===0?o:o.slice(u);let h=f,p=!1;f.endsWith(Fc)?(h=f.slice(0,-1),p=!0):f.startsWith(Fc)&&(h=f.slice(1),p=!0);const g=c&&c>u?c-u:void 0;return yf(i,p,h,g)};if(t){const o=t+bf,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):yf(AS,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},DS=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},IS=e=>({cache:kS(e.cacheSize),parseClassName:TS(e),sortModifiers:DS(e),postfixLookupClassGroupIds:OS(e),...bS(e)}),OS=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},RS=/\s+/,NS=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(RS);let c="";for(let l=u.length-1;l>=0;l-=1){const f=u[l],{isExternal:h,modifiers:p,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:b}=n(f);if(h){c=f+(c.length>0?" "+c:c);continue}let v=!!b,y;if(v){const T=m.substring(0,b);y=r(T);const S=y&&s[y]?r(m):void 0;S&&S!==y&&(y=S,v=!1)}else y=r(m);if(!y){if(!v){c=f+(c.length>0?" "+c:c);continue}if(y=r(m),!y){c=f+(c.length>0?" "+c:c);continue}v=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),E=g?x+Fc:x,k=E+y;if(a.indexOf(k)>-1)continue;a.push(k);const C=o(y,v);for(let T=0;T<C.length;++T){const S=C[T];a.push(E+S)}c=f+(c.length>0?" "+c:c)}return c},MS=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=eb(n))&&(o&&(o+=" "),o+=r);return o},eb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=eb(e[r]))&&(n&&(n+=" "),n+=t);return n},LS=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,f)=>f(l),e());return n=IS(c),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=NS(u,n);return o(u,l),l};return i=s,(...u)=>i(MS(...u))},$S=[],Kt=e=>{const t=n=>n[e]||$S;return t.isThemeGetter=!0,t},tb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,FS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,US=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lr=e=>PS.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Zn=e=>!!e&&Number.isInteger(Number(e)),su=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),br=e=>FS.test(e),rb=()=>!0,jS=e=>BS.test(e)&&!zS.test(e),Nl=()=>!1,HS=e=>US.test(e),qS=e=>KS.test(e),GS=e=>!xe(e)&&!we(e),VS=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),WS=e=>Qr(e,sb,Nl),xe=e=>tb.test(e),oo=e=>Qr(e,ab,jS),vf=e=>Qr(e,nC,Ve),YS=e=>Qr(e,cb,rb),ZS=e=>Qr(e,ub,Nl),xf=e=>Qr(e,ob,Nl),XS=e=>Qr(e,ib,qS),ys=e=>Qr(e,lb,HS),we=e=>nb.test(e),ui=e=>vo(e,ab),JS=e=>vo(e,ub),wf=e=>vo(e,ob),QS=e=>vo(e,sb),eC=e=>vo(e,ib),vs=e=>vo(e,lb,!0),tC=e=>vo(e,cb,!0),Qr=(e,t,n)=>{const r=tb.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vo=(e,t,n=!1)=>{const r=nb.exec(e);return r?r[1]?t(r[1]):n:!1},ob=e=>e==="position"||e==="percentage",ib=e=>e==="image"||e==="url",sb=e=>e==="length"||e==="size"||e==="bg-size",ab=e=>e==="length",nC=e=>e==="number",ub=e=>e==="family-name",cb=e=>e==="number"||e==="weight",lb=e=>e==="shadow",rC=()=>{const e=Kt("color"),t=Kt("font"),n=Kt("text"),r=Kt("font-weight"),o=Kt("tracking"),i=Kt("leading"),s=Kt("breakpoint"),a=Kt("container"),u=Kt("spacing"),c=Kt("radius"),l=Kt("shadow"),f=Kt("inset-shadow"),h=Kt("text-shadow"),p=Kt("drop-shadow"),g=Kt("blur"),m=Kt("perspective"),b=Kt("aspect"),v=Kt("ease"),y=Kt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...E(),we,xe],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],S=()=>[we,xe,u],I=()=>[Lr,"full","auto",...S()],A=()=>[Zn,"none","subgrid",we,xe],L=()=>["auto",{span:["full",Zn,we,xe]},Zn,we,xe],O=()=>[Zn,"auto",we,xe],U=()=>["auto","min","max","fr",we,xe],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...S()],N=()=>[Lr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],G=()=>[Lr,"screen","full","dvw","lvw","svw","min","max","fit",...S()],j=()=>[Lr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],K=()=>[e,we,xe],Z=()=>[...E(),wf,xf,{position:[we,xe]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",QS,WS,{size:[we,xe]}],Y=()=>[su,ui,oo],se=()=>["","none","full",c,we,xe],fe=()=>["",Ve,ui,oo],X=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Ve,su,wf,xf],Me=()=>["","none",g,we,xe],ce=()=>["none",Ve,we,xe],Ce=()=>["none",Ve,we,xe],He=()=>[Ve,we,xe],je=()=>[Lr,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[br],breakpoint:[br],color:[rb],container:[br],"drop-shadow":[br],ease:["in","out","in-out"],font:[GS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[br],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[br],shadow:[br],spacing:["px",Ve],text:[br],"text-shadow":[br],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lr,xe,we,b]}],container:["container"],"container-type":[{"@container":["","normal","size",we,xe]}],"container-named":[VS],columns:[{columns:[Ve,xe,we,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Zn,"auto",we,xe]}],basis:[{basis:[Lr,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,Lr,"auto","initial","none",xe]}],grow:[{grow:["",Ve,we,xe]}],shrink:[{shrink:["",Ve,we,xe]}],order:[{order:[Zn,"first","last","none",we,xe]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...j()]}],"min-block-size":[{"min-block":["auto",...j()]}],"max-block-size":[{"max-block":["none",...j()]}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",n,ui,oo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,tC,YS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",su,xe]}],"font-family":[{font:[JS,ZS,t]}],"font-features":[{"font-features":[xe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,xe]}],"line-clamp":[{"line-clamp":[Ve,"none",we,vf]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",we,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",we,oo]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Ve,"auto",we,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Zn,we,xe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zn,we,xe],radial:["",we,xe],conic:[Zn,we,xe]},eC,XS]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,we,xe]}],"outline-w":[{outline:["",Ve,ui,oo]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",l,vs,ys]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",f,vs,ys]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Ve,oo]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",h,vs,ys]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Ve,we,xe]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[we,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,xe]}],filter:[{filter:["","none",we,xe]}],blur:[{blur:Me()}],brightness:[{brightness:[Ve,we,xe]}],contrast:[{contrast:[Ve,we,xe]}],"drop-shadow":[{"drop-shadow":["","none",p,vs,ys]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Ve,we,xe]}],"hue-rotate":[{"hue-rotate":[Ve,we,xe]}],invert:[{invert:["",Ve,we,xe]}],saturate:[{saturate:[Ve,we,xe]}],sepia:[{sepia:["",Ve,we,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,xe]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,we,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,we,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,we,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,we,xe]}],"backdrop-invert":[{"backdrop-invert":["",Ve,we,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,we,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,we,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,we,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",we,xe]}],ease:[{ease:["linear","initial",v,we,xe]}],delay:[{delay:[Ve,we,xe]}],animate:[{animate:["none",y,we,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,we,xe]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[we,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],zoom:[{zoom:[Zn,we,xe]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,xe]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Ve,ui,oo,vf]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oC=LS(rC);function it(...e){return oC(Z0(e))}const[iC,db]=D(Tt.language||"zh-CN"),[sC,aC]=D(Tt.isInitialized);rh.then(()=>{db(Tt.language||"zh-CN"),aC(!0)});Tt.on("languageChanged",e=>db(e));function _(e,t){return Tt.t(e,t)}function fb(){return{t:_,lng:ne(()=>iC()),ready:ne(()=>sC()),changeLanguage:e=>Tt.changeLanguage(e)}}var uC=F("<div>"),cC=F("<div class=min-w-0>");const lC={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},dC={default:"border-border",success:"border-success/40 text-success",info:"border-info/40 text-info",warning:"border-warning/40 text-warning",error:"border-destructive/40 text-destructive",loading:"border-border"};function fC(e){switch(e.type){case"success":return d(ax,{class:"h-4 w-4"});case"info":return d(Ex,{class:"h-4 w-4"});case"warning":case"error":return d(Ew,{class:"h-4 w-4"});case"loading":return d(In,{class:"h-4 w-4 animate-spin"});default:return null}}function gC(e){return d(ao,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return it("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=uC();return w(t,d(fC,{get type(){return e.type}})),Pe(()=>At(t,it("shrink-0 self-center",dC[e.type]))),t})(),(()=>{var t=cC();return w(t,d(ao.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),w(t,(()=>{var n=Q(()=>!!e.description);return()=>n()?d(ao.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),d(ao.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return _("common.close")},get children(){return d(Wr,{class:"h-4 w-4"})}})]}})}function Mo(e,t,n={}){return Oi.show(r=>d(gC,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const It=Object.assign((e,t)=>Mo("default",e,t),{success:(e,t)=>Mo("success",e,t),info:(e,t)=>Mo("info",e,t),warning:(e,t)=>Mo("warning",e,t),error:(e,t)=>Mo("error",e,t),loading:(e,t)=>Mo("loading",e,t),dismiss:e=>{if(typeof e=="number")return Oi.dismiss(e);Oi.clear()}}),pC=e=>{const[t,n]=ae(e,["position","duration","visibleToasts","class"]);return d(ao.Region,q({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return it("!pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",lC[t.position??"bottom-right"],t.class)}},n,{get children(){return d(ao.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};function hC(e){return`@.yorz/specs/${e}/spec.md`}async function gb(e){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(hC(e)),It.success(_("specDetail.specPathCopied"))}catch{It.error(_("specDetail.specPathCopyFailed"))}}function mC(e,t){return e.some(n=>n.status==="running")||t.some(n=>n.running)}async function _f(e,t){const[n,r]=await Promise.all([t.listCommandRuns(e),t.listSessions(e)]);return!mC(n,r)}function bC(e,t=()=>{}){let n=!1;async function r(o){if(!n){n=!0,t(!0);try{return await o()}finally{n=!1,t(!1)}}}return{async check(o){const i=await r(()=>_f(o,e));return i===void 0?"busy":i?"allowed":"running"},async merge(o,i){return await r(async()=>await _f(o,e)?{status:"merged",value:await i()}:{status:"blocked",reason:"running"})??{status:"blocked",reason:"busy"}}}}const Ef=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sf=Z0,pb=(e,t)=>n=>{var r;if(t?.variants==null)return Sf(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],f=i?.[c];if(l===null)return null;const h=Ef(l)||Ef(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,l)=>{let[f,h]=l;return h===void 0||(c[f]=h),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:f,className:h,...p}=l;return Object.entries(p).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...c,f,h]:c},[]);return Sf(e,s,u,n?.class,n?.className)},yC=pb("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_e=e=>{const[t,n]=ae(e,["class","variant","size"]);return d(Nh,q({get class(){return it(yC({size:t.size,variant:t.variant}),t.class)}},n))};var vC=F("<div>");const xC=pb("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),hb=e=>{const[t,n]=ae(e,["class","variant"]);return(()=>{var r=vC();return ir(r,q({get class(){return it(xC({variant:t.variant}),t.class)}},n),!1,!1),r})()},os=()=>{const e=()=>Er()?_("specDetail.exitFullscreen"):_("specDetail.fullscreen");return d(_e,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:vh,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return Er()},get children(){return d(V,{get when(){return Er()},get fallback(){return d(Ox,{class:"h-3 w-3"})},get children(){return d(Px,{class:"h-3 w-3"})}})}})};var wC=F("<input>");const zn=e=>{const[t,n]=ae(e,["class"]);return(()=>{var r=wC();return ir(r,q({get class(){return it("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},Ml=Cn.Trigger;Cn.Group;const Cf=Cn.Sub;Cn.RadioGroup;const Ll=e=>{const t=q({gutter:4,flip:!1},e);return d(Cn,t)},$l=e=>{const[t,n]=ae(e,["class"]);return d(Cn.Portal,{get children(){return d(Cn.Content,q({get class(){return it("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},vr=e=>{const[t,n]=ae(e,["class","inset"]);return d(Cn.Item,q({get class(){return it("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))},kf=e=>{const[t,n]=ae(e,["class","children"]);return d(Cn.SubTrigger,q({get class(){return it("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[expanded]:bg-accent data-[expanded]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[Q(()=>t.children),d(gh,{class:"ml-auto h-4 w-4 text-muted-foreground"})]}}))},Af=e=>{const[t,n]=ae(e,["class"]);return d(Cn.Portal,{get children(){return d(Cn.SubContent,q({get class(){return it("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus-visible:outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},Bc=e=>{const[t,n]=ae(e,["class"]);return d(Cn.Separator,q({get class(){return it("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var _C=F('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),mb=F("<div>");const mn=_r;_r.Trigger;const Cr=e=>{const[t,n]=ae(e,["class","children"]);return d(_r.Portal,{get children(){return[d(_r.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),d(_r.Content,{get class(){return it("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[Q(()=>t.children),d(_r.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return _C()}})]}})]}})},kr=e=>{const[t,n]=ae(e,["class"]);return d(_r.Title,q({get class(){return it("text-lg font-semibold text-foreground",t.class)}},n))},Ta=e=>{const[t,n]=ae(e,["class"]);return d(_r.Description,q({get class(){return it(" text-muted-foreground",t.class)}},n))},Ar=e=>{const[t,n]=ae(e,["class"]);return(()=>{var r=mb();return ir(r,q({get class(){return it("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Gr=e=>{const[t,n]=ae(e,["class"]);return(()=>{var r=mb();return ir(r,q({get class(){return it("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var EC=F('<p class="m-0 text-destructive">'),SC=F('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),CC=F('<div class="flex items-center">'),kC=F('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),AC=F('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),TC=F('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const DC=e=>{const t=Jo(),[n,{refetch:r}]=tn(e.projectId,v=>v?be.listCommands(v):Promise.resolve([])),[o,i]=D(!1),[s,a]=D(""),[u,c]=D(""),[l,f]=D(!1),[h,p]=D(null);async function g(v){const y=e.projectId();if(y)try{const x=await be.runCommand(y,v.id);It.success(_("commands.started")),e.onRunStarted?.(),t(Ht(`commands/${encodeURIComponent(x.runId)}`))}catch(x){It.error(x.message)}}async function m(v){const y=e.projectId();if(y)try{await be.deleteCommand(y,v.id),await r()}catch(x){It.error(x.message)}}async function b(v){v.preventDefault();const y=e.projectId();if(!y)return;const x=s().trim(),E=u().trim();if(!(!x||!E)){f(!0),p(null);try{await be.createCommand(y,{name:x,cli:E}),a(""),c(""),i(!1),await r()}catch(k){p(k.message)}finally{f(!1)}}}return(()=>{var v=CC();return w(v,d(Ll,{placement:"bottom-start",get children(){return[d(Ml,{as:_e,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("commands.menuTitle")},get children(){return d(yw,{class:"h-4 w-4"})}}),d($l,{class:"min-w-56",get children(){return[d(V,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var y=kC();return w(y,()=>_("commands.empty")),y})()},get children(){return d(at,{get each(){return n()??[]},children:y=>d(vr,{class:"group flex items-center justify-between gap-2",onSelect:()=>void g(y),get children(){return[(()=>{var x=AC(),E=x.firstChild,k=E.nextSibling;return w(E,()=>y.name),w(k,()=>y.cli),x})(),(()=>{var x=TC();return x.$$click=E=>{E.stopPropagation(),E.preventDefault(),m(y)},x.$$keydown=E=>E.stopPropagation(),x.$$pointerup=E=>E.stopPropagation(),x.$$pointerdown=E=>E.stopPropagation(),w(x,d(rl,{class:"h-3.5 w-3.5 text-destructive"})),Pe(()=>Ye(x,"title",_("commands.deleteDef"))),x})()]}})})}}),d(Bc,{}),d(vr,{onSelect:()=>i(!0),get children(){return[d(Gi,{class:"mr-1 h-4 w-4"}),Q(()=>_("commands.add"))]}})]}})]}}),null),w(v,d(mn,{get open(){return o()},onOpenChange:y=>{i(y),y||p(null)},get children(){return d(Cr,{class:"max-w-md",get children(){return[d(Ar,{get children(){return d(kr,{get children(){return _("commands.addTitle")}})}}),(()=>{var y=SC(),x=y.firstChild,E=x.nextSibling;return y.addEventListener("submit",k=>void b(k)),w(x,()=>_("commands.name"),null),w(x,d(zn,{id:"command-name",get value(){return s()},get placeholder(){return _("commands.namePlaceholder")},onInput:k=>a(k.currentTarget.value),get disabled(){return l()}}),null),w(E,()=>_("commands.cli"),null),w(E,d(zn,{id:"command-cli",get value(){return u()},get placeholder(){return _("commands.cliPlaceholder")},onInput:k=>c(k.currentTarget.value),get disabled(){return l()}}),null),w(y,d(V,{get when(){return h()},get children(){var k=EC();return w(k,h),k}}),null),w(y,d(Gr,{get children(){return[d(_e,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return l()},get children(){return _("common.cancel")}}),d(_e,{type:"submit",get disabled(){return l()||!s().trim()||!u().trim()},get children(){return Q(()=>!!l())()?_("common.submitting"):_("commands.submit")}})]}}),null),y})()]}})}}),null),v})()};yn(["pointerdown","pointerup","keydown","click"]);var IC=F("<span>");const OC={running:"text-success",exited:"text-muted-foreground",killed:"text-warning",failed:"text-destructive"},bb=e=>(()=>{var t=IC();return w(t,()=>_(`commands.status.${e.status}`)),Pe(()=>At(t,`shrink-0 text-xs font-medium ${OC[e.status]} ${e.class??""}`)),t})();var RC=F('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close');const Pl=zr.Trigger,NC=zr.Title;zr.Description;const Fl=e=>{const t=q({gutter:4,flip:!1},e);return d(zr,t)},Bl=e=>{const[t,n]=ae(e,["class","children"]);return d(zr.Portal,{get children(){return d(zr.Content,q({get class(){return it("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[Q(()=>t.children),d(zr.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return RC()}})]}}))}})};var MC=F('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),LC=F('<span class="truncate font-medium">'),$C=F('<span class="truncate font-mono text-xs text-muted-foreground">'),PC=F('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),FC=F('<p class="m-0 text-sm font-medium">'),BC=F('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),zC=F('<div class="flex justify-end">'),UC=F('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2"><div>');function yb(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=c=>String(c).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}const KC=e=>{const[t,{refetch:n,mutate:r}]=tn(e.projectId,p=>p?be.listCommandRuns(p):Promise.resolve([])),[o,i]=D(Date.now()),[s,a]=D(null),[u,c]=D(null),l=setInterval(()=>i(Date.now()),1e3);ie(()=>clearInterval(l)),re(()=>{e.revision?.(),n()}),re(()=>{const p=e.projectId();if(!p)return;const g=jw(p,m=>r(m));ie(g)});async function f(p){const g=e.projectId();if(g){a(p.runId);try{await be.clearCommandRun(g,p.runId),await n()}catch(m){It.error(m.message)}finally{a(null)}}}async function h(p){const g=e.projectId();if(g){c(p.runId);try{await be.clearCommandRun(g,p.runId),await be.runCommand(g,p.commandId),It.success(_("commands.restarted")),await n()}catch(m){It.error(m.message)}finally{c(null)}}}return d(V,{get when(){return(t()??[]).length>0},get children(){var p=MC(),g=p.firstChild,m=g.nextSibling;return w(g,()=>_("commands.running")),w(m,d(at,{get each(){return t()??[]},children:b=>(()=>{var v=UC(),y=v.firstChild;return w(v,d(Bn,{get href(){return Ht(`commands/${encodeURIComponent(b.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[d(bb,{get status(){return b.status}}),(()=>{var x=LC();return w(x,()=>b.name),x})(),(()=>{var x=$C();return w(x,()=>b.cli),x})(),(()=>{var x=PC();return w(x,()=>yb(b.startedAt,b.endedAt,o())),x})()]}}),y),w(y,d(_e,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.restart")},get disabled(){return u()===b.runId||s()===b.runId},onClick:()=>void h(b),get children(){return d(nw,{class:"h-4 w-4"})}}),null),w(y,d(Fl,{get children(){return[d(Pl,{as:_e,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.clear")},get disabled(){return u()===b.runId},get children(){return d(Wr,{class:"h-4 w-4"})}}),d(Bl,{class:"w-72",get children(){return[(()=>{var x=FC();return w(x,()=>_("commands.clearTitle")),x})(),(()=>{var x=BC();return w(x,()=>_("commands.clearDescription")),x})(),(()=>{var x=zC();return w(x,d(_e,{variant:"destructive",size:"sm",get disabled(){return s()===b.runId},onClick:()=>void f(b),get children(){return Q(()=>s()===b.runId)()?_("common.deleting"):_("commands.clear")}})),x})()]}})]}}),null),v})()})),p}})};var jC=F('<span class=" text-muted-foreground">'),HC=F('<span class=" text-destructive">'),qC=F('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),GC=F('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),Tf=F('<p class=" text-destructive">'),VC=F('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),WC=F('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="mr-2 text-xl">'),YC=F('<p class=" text-muted-foreground">'),ZC=F('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),XC=F('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),JC=F('<h2 class="my-1.5 text-base font-semibold">'),QC=F('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),ek=F('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),tk=F('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),Df=F("<span>."),nk=F("<span>");const rk={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},ok={feat:"text-success",refct:"text-info",fix:"text-destructive"};function ik(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const sk=()=>{const e=Jo(),t=ho(),[n,{refetch:r}]=tn(t,N=>N?be.listSpecs(N):Promise.resolve([])),[o,{refetch:i}]=tn(()=>be.listProjects()),s=ne(()=>(o()??[]).find(N=>N.id===t())),a=ne(()=>{const N=s();return N?.worktree?(o()??[]).some(G=>G.id===N.worktree.mainProjectId):!0}),u=ne(()=>{const N=s();return N?.worktree?`feat(${N.worktree.branch}): merge from worktree`:""}),[c,l]=D(!1),[f,h]=D(!1),[p,g]=D(null),[m,b]=D(!1),[v,y]=D(""),[x,E]=D(null),[k,C]=D(0),[T,S]=D(!1),[I,A]=D(null),L=bC(be,h);Vi(()=>m()||x()!==null);let O=null;re(()=>{const N=t();O?.(),O=null,N&&(O=wh(N,()=>{r()}))}),jn(()=>{const N=_h(()=>{(async()=>{const G=s()?.worktree?.mainProjectId??null;await i();const j=t();!j||(o()??[]).some(Z=>Z.id===j)||G&&e(`/${encodeURIComponent(G)}`)})()});ie(N)}),ie(()=>{O?.(),O=null});async function U(){const N=t();if(!N)return!1;g(null);try{const G=await L.check(N);return G==="running"?(g(_("home.runningTasksPreventMerge")),!1):G==="allowed"}catch(G){return g(G.message),!1}}async function R(){s()?.worktree&&a()&&await U()&&(y(u()),g(null),b(!0))}async function B(){const N=s();if(!N?.worktree||!a())return;const G=v().trim()||u();g(null);try{const j=await L.merge(N.id,async()=>{l(!0);try{return await be.mergeWorktreeToMain(N.id,{commitMessage:G})}finally{l(!1)}});if(j.status==="blocked"){j.reason==="running"&&g(_("home.runningTasksPreventMerge"));return}const K=j.value;b(!1),K.status==="merged"?(It.success(_("home.merged")),await i(),e(`/${encodeURIComponent(K.mainProjectId)}`)):(It.info(_("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(K.mainProjectId)}/specs/${encodeURIComponent(K.conflictSpecId)}`))}catch(j){g(j.message)}}async function $(N){const G=t();if(G){S(!0),A(null);try{await be.deleteSpec(G,N),E(null),await r()}catch(j){A(j.message)}finally{S(!1)}}}return(()=>{var N=WC(),G=N.firstChild,j=G.firstChild,K=j.firstChild;return w(K,()=>_("home.specList")),w(j,d(DC,{projectId:t,onRunStarted:()=>C(Z=>Z+1)}),null),w(j,d(_e,{as:Bn,get href(){return Ht("git")},variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("git.title")},get children(){return d(nl,{class:"h-4 w-4"})}}),null),w(G,d(os,{}),null),w(N,d(KC,{projectId:t,revision:k}),null),w(N,d(V,{get when(){return s()?.worktree},get children(){var Z=qC(),P=Z.firstChild,H=P.firstChild;return w(H,()=>_("home.mainProject"),null),w(H,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(Z,d(_e,{variant:"default",size:"sm",onClick:()=>void R(),get disabled(){return c()||f()||!a()},get title(){return Q(()=>!!a())()?_("home.mergeHint"):_("home.mainUnreachable")},get children(){return[d(hh,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>Q(()=>!!c())()?_("home.merging"):_("home.mergeToMain"))]}}),null),w(Z,d(V,{get when(){return!a()},get children(){var Y=jC();return w(Y,()=>_("home.mainUnreachable")),Y}}),null),w(Z,d(V,{get when(){return p()},get children(){var Y=HC();return w(Y,p),Y}}),null),Z}}),null),w(N,d(na,{get fallback(){return(()=>{var Z=YC();return w(Z,()=>_("common.loading")),Z})()},get children(){return d(V,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var Z=ZC(),P=Z.firstChild;return w(P,()=>_("home.noSpecs")),w(Z,d(_e,{as:Bn,get href(){return Ht("specs/new")},variant:"default",size:"sm",get children(){return[d(Gi,{class:"mr-1 h-4 w-4"}),Q(()=>_("home.createFirst"))]}}),null),Z})()},get children(){var Z=GC();return w(Z,d(at,{get each(){return n()??[]},children:P=>{const H=ik(P.id);return(()=>{var Y=tk(),se=Y.firstChild;return w(Y,d(Bn,{get href(){return Ht(`specs/${encodeURIComponent(P.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var fe=XC(),X=fe.firstChild;return w(fe,d(hb,{variant:"outline",get class(){return`font-mono ${rk[P.stage]??"bg-muted text-muted-foreground border-border"} uppercase tracking-wider`},get children(){return P.stage}}),X),w(X,()=>Eh(P.updated_at)),fe})(),(()=>{var fe=JC();return w(fe,()=>P.title||_("common.pendingAgent")),fe})(),(()=>{var fe=QC();return w(fe,()=>P.summary||_("common.pendingAgent")),fe})(),(()=>{var fe=ek();return w(fe,d(V,{when:H,get fallback(){return P.id},children:X=>[(()=>{var W=Df(),ge=W.firstChild;return w(W,()=>X().prefix,ge),W})(),(()=>{var W=nk();return w(W,()=>X().type),Pe(()=>At(W,`font-semibold ${ok[X().type]??"text-foreground"}`)),W})(),(()=>{var W=Df();return W.firstChild,w(W,()=>X().suffix,null),W})()]})),fe})()]}}),se),w(se,d(Ll,{placement:"bottom-end",get children(){return[d(Ml,{as:_e,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return _("home.moreActions")},get children(){return d(mx,{class:"h-4 w-4"})}}),d($l,{get children(){return[d(vr,{onSelect:()=>void gb(P.id),get children(){return _("home.copySpecPath")}}),d(vr,{class:"text-destructive focus:text-destructive",onSelect:()=>E(P.id),get children(){return _("common.delete")}})]}})]}})),Y})()}})),Z}})}}),null),w(N,d(mn,{get open(){return m()},onOpenChange:Z=>{b(Z),Z||g(null)},get children(){return d(Cr,{class:"max-w-md",get children(){return[d(Ar,{get children(){return[d(kr,{get children(){return _("home.mergeDialogTitle")}}),d(Ta,{get children(){return _("home.mergeDialogDescription")}})]}}),(()=>{var Z=VC(),P=Z.firstChild;return Z.addEventListener("submit",H=>{H.preventDefault(),B()}),w(P,()=>_("home.mergeCommitMessage"),null),w(P,d(zn,{id:"merge-commit-message",get value(){return v()},onInput:H=>y(H.currentTarget.value),get disabled(){return c()}}),null),w(Z,d(V,{get when(){return p()},get children(){var H=Tf();return w(H,p),H}}),null),w(Z,d(Gr,{get children(){return[d(_e,{type:"button",variant:"outline",onClick:()=>b(!1),get disabled(){return c()},get children(){return _("common.cancel")}}),d(_e,{type:"submit",get disabled(){return c()||f()||!a()},get children(){return Q(()=>!!c())()?_("home.merging"):_("home.mergeToMain")}})]}}),null),Z})()]}})}}),null),w(N,d(mn,{get open(){return x()!==null},onOpenChange:Z=>{Z||(E(null),A(null))},get children(){return d(Cr,{class:"max-w-sm",get children(){return[d(Ar,{get children(){return d(kr,{get children(){return _("home.confirmDeleteSpec")}})}}),d(V,{get when(){return I()},get children(){var Z=Tf();return w(Z,I),Z}}),d(Gr,{get children(){return[d(_e,{variant:"outline",onClick:()=>E(null),get disabled(){return T()},get children(){return _("common.cancel")}}),d(_e,{variant:"destructive",onClick:()=>x()&&void $(x()),get disabled(){return T()},get children(){return Q(()=>!!T())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),N})()},vb="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",ak=5*1024*1024,Ho=10,uk=new Set(["application/pdf","text/plain","text/markdown"]);function ck(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":null}function lk(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function If(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function dk(){return Math.random().toString(36).slice(2,8)}function xb(e){const[t,n]=D([]),[r,o]=D(null),[i,s]=D(null),[a,u]=D(null),[c,l]=D(""),f=ne(()=>t().length),h=ne(()=>t().some(A=>A.status==="pending")),p=ne(()=>t().some(A=>A.status==="failed"));ie(()=>{for(const A of t())A.previewUrl&&URL.revokeObjectURL(A.previewUrl)});async function g(){const A=r();if(A)return A;const{draftId:L}=await be.createDraft(e.projectId());return o(L),L}function m(A){n(L=>[...L,A])}function b(A,L){n(O=>O.map(U=>U.id===A?{...U,...L}:U))}function v(A){n(L=>{const O=[];for(const U of L){if(U.id===A){U.previewUrl&&URL.revokeObjectURL(U.previewUrl);continue}O.push(U)}return O})}async function y(A){s(null);const L=t(),O=Ho-L.length;if(O<=0){s(_("newSpec.attachmentLimit",{max:Ho}));return}const U=[];for(const R of A.slice(0,O)){const B=lk(R),$=ck(B);if(!$){s(_("newSpec.unsupportedType",{name:B.name}));continue}if($!=="image"&&!uk.has(B.type)){s(_("newSpec.unsupportedMime",{mime:B.type||"(unknown)"}));continue}if(B.size>ak){s(_("newSpec.fileTooLarge",{name:B.name}));continue}const N=`att-${Date.now()}-${dk()}`,G=$==="image"?URL.createObjectURL(B):void 0;U.push({id:N,file:B,name:B.name,kind:$,previewUrl:G,status:"pending"})}if(U.length!==0){A.length>O&&s(_("newSpec.attachmentRoomLimit",{room:O,current:L.length,max:Ho}));for(const R of U)m(R);try{const R=await g();for(const B of U)try{const $=await be.uploadAttachment(e.projectId(),R,B.file);b(B.id,{storedName:$.storedName,name:$.storedName,status:"uploaded"})}catch($){b(B.id,{status:"failed",error:$.message})}}catch(R){s(R.message);for(const B of U)b(B.id,{status:"failed",error:R.message})}}}async function x(A){const L=A.currentTarget;if(!L.files)return;const O=Array.from(L.files);L.value="",await y(O)}async function E(A){const L=A.clipboardData?.items;if(!L)return;const O=[];for(const U of Array.from(L))if(U.kind==="file"&&U.type.startsWith("image/")){const R=U.getAsFile();R&&O.push(R)}O.length!==0&&(A.preventDefault(),await y(O))}async function k(A){const L=t().find(O=>O.id===A);if(L){if(L.storedName&&r())try{await be.deleteAttachment(e.projectId(),r(),L.storedName)}catch(O){s(O.message)}v(A)}}function C(A){l(If(A.name)),u(A.id)}async function T(A){const L=c().trim();if(u(null),!(!L||!A.storedName||!r())&&L!==If(A.name))try{const O=await be.renameAttachment(e.projectId(),r(),A.storedName,L);b(A.id,{storedName:O.storedName,name:O.storedName})}catch(O){s(O.message)}}function S(){u(null)}function I(){const A=wt(t);for(const L of A)L.previewUrl&&URL.revokeObjectURL(L.previewUrl);A.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:f,hasPending:h,hasFailed:p,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:y,onFileInputChange:x,onPaste:E,removeAttachment:k,beginRename:C,commitRename:T,cancelRename:S,reset:I}}var fk=F("<textarea>");const zc=e=>{const[t,n]=ae(e,["class"]);return(()=>{var r=fk();return ir(r,q({get class(){return it("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},Of=1.5,wb=2,gk=10;function pk(e,t=wb,n=gk){if(!e)return;const r=getComputedStyle(e),o=parseFloat(r.fontSize)||14,i=r.lineHeight==="normal"?o*Of:parseFloat(r.lineHeight)||o*Of,s=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),a=i*t+s,u=i*n+s;e.style.height="auto",e.style.height=`${Math.min(Math.max(e.scrollHeight,a),u)}px`,e.style.overflowY=e.scrollHeight>u?"auto":"hidden"}const Gs=e=>{const[t,n]=ae(e,["minRows","maxRows","class","ref","onInput"]);let r;const o=()=>pk(r,t.minRows,t.maxRows),i=a=>{r=a;const u=t.ref;typeof u=="function"&&u(a)},s=a=>{const u=t.onInput;typeof u=="function"?u(a):Array.isArray(u)&&u[0](u[1],a),o()};return jn(()=>{o(),requestAnimationFrame(o)}),re(Ct(()=>e.value,o)),d(zc,q({ref:i,get class(){return it("min-h-0 resize-none",t.class)},get rows(){return t.minRows??wb},onInput:s},n))};var hk=F('<li class="px-3 py-1.5 text-sm text-muted-foreground">'),mk=F('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),bk=F('<div class="relative w-full">'),yk=F("<span>"),vk=F('<div class="mr-1 flex shrink-0 items-center gap-0.5">'),xk=F('<li><button type=button class="flex min-w-0 flex-1 items-center gap-2 overflow-hidden border-0 bg-transparent px-3 py-1.5 text-left text-sm text-inherit"><span class="min-w-0 flex-1"><span class="block overflow-hidden text-ellipsis whitespace-nowrap">');const wk=150,_k=150,Ek=16,Sk=48,Ck=24,kk=8;function au(e){return e.replace(/^\/+/,"")}function Ak(e,t){return t===0?!0:/[\s/_.-]/.test(e[t-1]??"")}function Rf(e,t){if(!e)return 0;const n=e.toLowerCase(),r=t.toLowerCase();let o=0,i=-1;for(let s=0;s<n.length;s++){const a=r.indexOf(n[s],i+1);if(a===-1)return null;o+=Ek,a===s&&(o+=Sk),a===i+1&&(o+=Ck),Ak(t,a)&&(o+=kk),o-=Math.max(0,a-i-1),i=a}return o-t.length*.01}function Tk(e,t){const n=au(e.trim());if(!n)return 0;const r=Rf(n,au(t.value)),o=t.label?Rf(n,au(t.label)):null;return r==null?o:o==null?r:Math.max(r,o)}function Dk(e,t){return t?e.map((n,r)=>{const o=Tk(t,n);return o==null?null:{cmd:n,score:o,index:r}}).filter(n=>n!=null).sort((n,r)=>r.score-n.score||n.index-r.index).map(n=>n.cmd):e}const Da=e=>{const[t,n]=D(!1),[r,o]=D([]),[i,s]=D(0),[a,u]=D(!1);let c,l=[],f=-1,h="",p="",g=null,m=null;ie(()=>{g&&clearTimeout(g),m&&clearTimeout(m)});function b(){n(!1),u(!1),o([]),s(0),f=-1,h="",p="",l=[],g&&(clearTimeout(g),g=null)}function v(A){g&&clearTimeout(g),g=setTimeout(async()=>{const L=e.projectId;if(L)try{const O=await be.listFiles(L,A);l=[],o(O.items.map(U=>({kind:"mention",value:U}))),s(0)}catch{o([])}},wk)}function y(A){const L=e.slashCommands??[];if(L.length===0)return!1;const O=A.selectionStart,U=A.value.slice(0,O);if(!/^\/[\w-]*$/.test(U))return!1;f=-1,h="",p=U.slice(1);const R=Dk(L,p).map(B=>({kind:"slash",value:B.value,label:B.label??B.value,description:B.description,replacement:B.replacement,action:B.action,customId:B.customId,editable:B.editable,editLabel:B.editLabel,deletable:B.deletable,deleteLabel:B.deleteLabel,icon:B.icon,command:B}));return l=[],o(R),s(0),R.length>0?(u(!1),n(!0)):e.slashEmptyLabel?(u(!0),n(!0)):b(),!0}function x(A){const L=A.selectionStart,O=A.value.slice(0,L),U=O.lastIndexOf("@");if(U===-1){b();return}const R=O.slice(U+1);if(!/^[\w./@-]*$/.test(R)){b();return}f=U,h=R,t()||n(!0),v(R)}function E(A){y(A)||x(A)}function k(A){if(A.kind==="slash"&&A.action==="add"){const K=e.value.slice(1+p.length);e.onValueChange(K),b(),e.onSlashCommandAction?.(A.command),requestAnimationFrame(()=>c?.focus());return}const L=e.value,O=A.kind==="slash",U=O?0:f,R=O?p.length:h.length,B=L.slice(0,U),$=L.slice(U+1+R),N=O?A.replacement??`${A.value} `:`@${A.value}`;e.onValueChange(B+N+$),b();const G=B.length+N.length;requestAnimationFrame(()=>{c&&(c.focus(),c.setSelectionRange(G,G))})}function C(A){if(A.kind!=="slash")return;e.onDeleteSlashCommand?.(A.command);let L=!1;o(O=>{const U=O.filter(R=>R.kind!=="slash"||!A.customId||R.customId!==A.customId);return s(R=>Math.min(R,Math.max(0,U.length-1))),L=U.length===0,U}),L&&b()}function T(A){A.kind==="slash"&&(e.onEditSlashCommand?.(A.command),b(),requestAnimationFrame(()=>c?.focus()))}function S(){l[i()]?.scrollIntoView({block:"nearest"})}function I(A){const L=r();if(t()&&L.length>0){if(A.key==="ArrowDown"){A.preventDefault(),s(O=>(O+1)%L.length),requestAnimationFrame(S);return}if(A.key==="ArrowUp"){A.preventDefault(),s(O=>(O-1+L.length)%L.length),requestAnimationFrame(S);return}if(A.key==="Enter"||A.key==="Tab"){if(!A.isComposing){A.preventDefault(),k(L[i()]);return}}else if(A.key==="Escape"){A.preventDefault(),b();return}}e.onKeyDown?.(A)}return(()=>{var A=bk();return w(A,d(Gs,{ref(L){var O=c;typeof O=="function"?O(L):c=L},get minRows(){return e.minRows},get maxRows(){return e.maxRows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return e.class},onInput:L=>{e.onValueChange(L.currentTarget.value),E(L.currentTarget)},onKeyDown:I,onPaste:L=>e.onPaste?.(L),onBlur:()=>{m&&clearTimeout(m),m=setTimeout(b,_k)}}),null),w(A,d(V,{get when(){return Q(()=>!!t())()&&(r().length>0||a())},get children(){var L=mk();return w(L,d(V,{get when(){return a()},get children(){var O=hk();return w(O,()=>e.slashEmptyLabel),O}}),null),w(L,d(at,{get each(){return r()},children:(O,U)=>(()=>{var R=xk(),B=R.firstChild,$=B.firstChild,N=$.firstChild;return R.addEventListener("mouseenter",()=>s(U())),rr(G=>l[U()]=G,R),B.$$mousedown=G=>{G.preventDefault(),k(O)},w(B,d(V,{get when(){return Q(()=>O.kind==="slash")()&&O.icon==="plus"},get children(){return d(Gi,{class:"h-3.5 w-3.5 shrink-0"})}}),$),w(N,(()=>{var G=Q(()=>O.kind==="slash");return()=>G()?O.label:O.value})()),w($,d(V,{get when(){return Q(()=>O.kind==="slash")()&&O.description},get children(){var G=yk();return w(G,(()=>{var j=Q(()=>O.kind==="slash");return()=>j()?O.description:""})()),Pe(()=>At(G,it("block overflow-hidden text-ellipsis whitespace-nowrap text-xs",i()===U()?"text-primary-foreground/80":"text-muted-foreground"))),G}}),null),w(R,d(V,{get when(){return Q(()=>O.kind==="slash")()&&(O.editable||O.deletable)},get children(){var G=vk();return w(G,d(V,{get when(){return Q(()=>O.kind==="slash")()&&O.editable},get children(){return d(_e,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return Q(()=>O.kind==="slash")()?O.editLabel:void 0},get class(){return it("h-7 w-7 p-0",i()===U()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},onMouseDown:j=>{j.preventDefault(),j.stopPropagation(),T(O)},get children(){return d(mh,{class:"h-3.5 w-3.5"})}})}}),null),w(G,d(V,{get when(){return Q(()=>O.kind==="slash")()&&O.deletable},get children(){return d(_e,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return Q(()=>O.kind==="slash")()?O.deleteLabel:void 0},get class(){return it("h-7 w-7 p-0",i()===U()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-destructive hover:bg-destructive/10 hover:text-destructive")},onMouseDown:j=>{j.preventDefault(),j.stopPropagation(),C(O)},get children(){return d(rl,{class:"h-3.5 w-3.5"})}})}}),null),G}}),null),Pe(G=>{var j=it("flex items-center",i()===U()?"bg-primary text-primary-foreground":"text-foreground hover:bg-accent hover:text-accent-foreground"),K=O.kind==="slash"&&O.description?O.description:O.value;return j!==G.e&&At(R,G.e=j),K!==G.t&&Ye(B,"title",G.t=K),G},{e:void 0,t:void 0}),R})()}),null),L}}),null),A})()};yn(["mousedown"]);const _b=Ni.Trigger,Eb=e=>{const t=q({gutter:4,flip:!1},e);return d(Ni,t)},Sb=e=>{const[t,n]=ae(e,["class"]);return d(Ni.Portal,{get children(){return d(Ni.Content,q({get class(){return it("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var Ik=F('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const Ok=e=>d(mn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return d(mn.Portal,{get children(){return[d(mn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),d(mn.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[d(V,{get when(){return e.src},get children(){var t=Ik();return Pe(n=>{var r=e.src,o=e.alt;return r!==n.e&&Ye(t,"src",n.e=r),o!==n.t&&Ye(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),d(mn.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return d(Wr,{class:"h-4 w-4"})}})]}})]}})}});var Rk=F('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),Cb=F('<img class="h-full w-full object-cover">'),Nk=F('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),Mk=F('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),Lk=F('<span class="text-xs font-bold text-muted-foreground">'),$k=F('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),Pk=F('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),Fk=F('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),Bk=F('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function zk(e){return e.status==="pending"?`${e.name} · ${_("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${_("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const kb=e=>{const t=e.ctrl,[n,r]=D(),[o,i]=D(),[s,a]=D(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return d(V,{get when(){return e.compact},get fallback(){return d(Uk,e)},get children(){return[(()=>{var c=Rk();return w(c,d(at,{get each(){return t.attachments()},children:l=>(()=>{var f=Mk(),h=f.firstChild;return w(f,d(Eb,{openDelay:150,closeDelay:0,get children(){return[d(_b,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[d(V,{get when(){return Q(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var p=Lk();return w(p,()=>l.kind==="pdf"?"PDF":"TXT"),p})()},get children(){var p=Cb();return Pe(g=>{var m=l.previewUrl,b=l.name;return m!==g.e&&Ye(p,"src",g.e=m),b!==g.t&&Ye(p,"alt",g.t=b),g},{e:void 0,t:void 0}),p}}),d(V,{get when(){return l.status==="pending"},get children(){var p=Nk();return w(p,d(In,{class:"h-4 w-4 animate-spin text-muted-foreground"})),p}})]}}),d(Sb,{get children(){return zk(l)}})]}}),h),h.$$click=()=>void t.removeAttachment(l.id),w(h,d(Wr,{class:"h-3 w-3"})),Pe(p=>{var g=e.busy,m=_("newSpec.deleteAttachment",{name:l.name});return g!==p.e&&(h.disabled=p.e=g),m!==p.t&&Ye(h,"aria-label",p.t=m),p},{e:void 0,t:void 0}),f})()})),c})(),d(Ok,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},Uk=e=>{const t=e.ctrl;return(()=>{var n=$k();return w(n,d(at,{get each(){return t.attachments()},children:r=>(()=>{var o=Pk(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,d(V,{get when(){return Q(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=Fk();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=Cb();return Pe(c=>{var l=r.previewUrl,f=r.name;return l!==c.e&&Ye(u,"src",c.e=l),f!==c.t&&Ye(u,"alt",c.t=f),c},{e:void 0,t:void 0}),u}})),w(s,d(V,{get when(){return Q(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=Bk();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),Pe(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",f=e.allowRename?_("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),f!==c.t&&Ye(u,"title",c.t=f),c},{e:void 0,t:void 0}),u})()},get children(){return d(zn,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,d(V,{get when(){return r.status==="pending"},get children(){return[d(In,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),Q(()=>_("newSpec.uploading"))]}}),null),w(a,d(V,{get when(){return r.status==="failed"},get children(){return _("newSpec.uploadFailed",{error:r.error})}}),null),w(a,d(V,{get when(){return r.status==="uploaded"},get children(){return[Q(()=>Math.round(r.file.size/1024))," KB · ",Q(()=>r.kind)]}}),null),w(o,d(_e,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return _("newSpec.deleteAttachment",{name:r.name})},get children(){return d(Wr,{class:"h-3.5 w-3.5"})}}),null),Pe(()=>At(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};yn(["click"]);var Kk=F('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Vs=Ur.Label,Li=Ur;Ur.ErrorMessage;Ur.Description;const $i=e=>{const[t,n]=ae(e,["class","children"]);return[d(Ur.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),d(Ur.Control,q({get class(){return it("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return d(Ur.Indicator,{class:"flex items-center justify-center text-current",get children(){return Kk()}})}}))]};Gn.Description;Gn.ErrorMessage;Gn.ItemDescription;const an=Gn.ItemInput,un=Gn.ItemLabel,Pi=Gn.Label,On=Gn,cn=Gn.Item,hn=e=>{const[t,n]=ae(e,["class"]);return d(Gn.ItemControl,q({get class(){return it("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return d(Gn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var jk=F('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),Hk=F('<span class="truncate font-medium text-foreground">');const is=e=>(()=>{var t=jk();return w(t,d(at,{get each(){return e.items},children:(n,r)=>[d(V,{get when(){return r()>0},get children(){return d(gh,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),d(V,{get when(){return n.href},get fallback(){return(()=>{var o=Hk();return w(o,()=>n.label),o})()},get children(){return d(Bn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var Nf=F('<span class="text-sm text-muted-foreground">'),qk=F('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),Gk=F('<strong class=" ">'),Vk=F('<p class=" text-destructive">');const Wk=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],Yk="yorz:new-spec-draft:";function Zk(e){return e==="feat"||e==="refct"||e==="fix"}function zl(e){return`${Yk}${e}`}function Xk(e){if(!e||typeof window>"u")return{};try{const t=window.localStorage.getItem(zl(e));if(!t)return{};const n=JSON.parse(t);return{content:typeof n.content=="string"?n.content:void 0,type:Zk(n.type)?n.type:void 0,useWorktree:typeof n.useWorktree=="boolean"?n.useWorktree:void 0}}catch{return{}}}function Jk(e,t){if(!(!e||typeof window>"u"))try{const n=t.content.trim().length>0||t.type!=="feat"||t.useWorktree!==!1,r=zl(e);if(!n){window.localStorage.removeItem(r);return}window.localStorage.setItem(r,JSON.stringify(t))}catch{}}function Mf(e){return JSON.stringify(e)}function Lf(e){if(!(!e||typeof window>"u"))try{window.localStorage.removeItem(zl(e))}catch{}}const Qk=()=>{const e=Jo(),t=ho(),[n,r]=D(""),[o,i]=D("feat"),[s,a]=D("idle"),[u,c]=D(!1),l=()=>s()==="creating",f=xb({projectId:t}),h=f.error,p=f.setError;let g=null,m=null,b=new Set,v="",y="",x=!1,E,k=!1,C="";ie(()=>{g?.(),m?.()}),re(Ct(t,I=>{k=!0;const A=Xk(I);r(A.content??""),i(A.type??"feat"),c(A.useWorktree??!1),k=!1})),re(()=>{if(k||l())return;const I={content:n(),type:o(),useWorktree:u()};Mf(I)!==C&&(C="",Jk(t(),I))});async function T(){if(x)return;const I=v||t();try{const L=(await be.listSpecs(I)).find(O=>!b.has(O.id));if(L){x=!0,g?.(),g=null,m?.(),m=null;const O=I?`/${I}/specs/${encodeURIComponent(L.id)}`:Ht(`specs/${encodeURIComponent(L.id)}`);e(O),y&&(Bo(y),y="")}}catch{}}async function S(I){if(I.preventDefault(),s()==="creating")return;p(null);const A=n().trim();if(A.length<5){p(_("newSpec.descTooShort"));return}const L=f.attachments().filter(O=>O.status==="failed");if(L.length>0){p(_("newSpec.attachmentFailedCount",{count:L.length}));return}if(f.hasPending()){p(_("newSpec.attachmentUploading"));return}a("creating"),x=!1;try{const O=t();C=Mf({content:n(),type:o(),useWorktree:u()}),Lf(O);let U=O;if(u()){const G=e3(A);U=(await be.createWorktree(O,{specSlug:G})).id,Lf(U)}v=U;const R=await be.listSpecs(U);b=new Set(R.map(G=>G.id));const B={type:o(),requirement:A},$=f.draftId();$&&(B.draftId=$,U!==O&&(B.draftProjectId=O));const N=await be.createSpec(U,B);"draft"in N&&N.draft?(y=N.sessionId,m=aa(U,N.sessionId,{onEvent:G=>{G.type==="error"&&(a("failed"),p(G.message||_("newSpec.agentRunFailed")),m?.(),m=null)}}),g=wh(U,()=>{T()}),T()):"id"in N&&e(`/${U}/specs/${encodeURIComponent(N.id)}`)}catch(O){p(O.message),a("failed")}}return(()=>{var I=qk(),A=I.firstChild,L=A.nextSibling,O=L.nextSibling,U=O.firstChild,R=U.firstChild,B=U.nextSibling,$=B.firstChild,N=$.firstChild,G=N.nextSibling,j=G.nextSibling;w(A,d(is,{get items(){return[{label:_("breadcrumb.specList"),href:Ht("")},{label:_("breadcrumb.newSpec")}]}})),w(L,()=>_("newSpec.description")),O.addEventListener("submit",S),w(O,d(On,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return o()},onChange:Z=>i(Z),get disabled(){return l()},get children(){return[d(Pi,{class:"mb-1.5 w-full font-medium",get children(){return _("newSpec.type")}}),Q(()=>Wk.map(Z=>d(cn,{get value(){return Z.value},class:"flex min-h-[44px] flex-1",get children(){return[d(an,{class:"sr-only"}),d(un,{get class(){return`flex w-full cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===Z.value?"border-primary bg-primary/10":"border-border bg-background"}`},get children(){return[(()=>{var P=Gk();return w(P,()=>_(Z.labelKey)),P})(),(()=>{var P=Nf();return w(P,()=>_(Z.hintKey)),P})()]}})]}})))]}}),U),w(O,d(Li,{get checked(){return u()},onChange:Z=>c(Z),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[d($i,{}),d(Vs,{class:"cursor-pointer font-medium",get children(){return _("newSpec.parallelWorktree")}}),(()=>{var Z=Nf();return w(Z,()=>_("newSpec.parallelWorktreeDesc")),Z})()]}}),U),w(R,()=>_("newSpec.requirement")),w(U,d(Da,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return f.onPaste},get placeholder(){return _("newSpec.requirementPlaceholder")},minRows:10,maxRows:10,required:!0,autofocus:!0,get disabled(){return l()}}),null),Ms(B,"paste",f.onPaste),w(N,()=>_("newSpec.attachments")),w(G,()=>_("newSpec.attachmentsHint",{count:f.count(),max:Ho})),w($,d(_e,{variant:"outline",size:"sm",type:"button",onClick:()=>E?.click(),get disabled(){return l()||f.count()>=Ho},get children(){return[d(kw,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>_("newSpec.importAttachment"))]}}),j),Ms(j,"change",f.onFileInputChange);var K=E;return typeof K=="function"?rr(K,j):E=j,Ye(j,"accept",vb),w(B,d(V,{get when(){return f.count()>0},get children(){return d(kb,{ctrl:f,get busy(){return l()},allowRename:!0})}}),null),w(O,(()=>{var Z=Q(()=>!!h());return()=>Z()&&(()=>{var P=Vk();return w(P,h),P})()})(),null),w(O,d(_e,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[Q(()=>Q(()=>!!l())()?d(In,{class:"mr-1 h-4 w-4 animate-spin"}):d(ia,{class:"mr-1 h-4 w-4"})),Q(()=>Q(()=>!!l())()?_("newSpec.creating"):_("newSpec.createAndStart"))]}}),null),I})()};function e3(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}var $f=11;function t3(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===$f||e.nodeType===$f)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var c=e.attributes,l=c.length-1;l>=0;l--)r=c[l],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var xs,n3="http://www.w3.org/1999/xhtml",ln=typeof document>"u"?void 0:document,r3=!!ln&&"content"in ln.createElement("template"),o3=!!ln&&ln.createRange&&"createContextualFragment"in ln.createRange();function i3(e){var t=ln.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function s3(e){xs||(xs=ln.createRange(),xs.selectNode(ln.body));var t=xs.createContextualFragment(e);return t.childNodes[0]}function a3(e){var t=ln.createElement("body");return t.innerHTML=e,t.childNodes[0]}function u3(e){return e=e.trim(),r3?i3(e):o3?s3(e):a3(e)}function ws(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function c3(e,t){return!t||t===n3?ln.createElement(e):ln.createElementNS(t,e)}function l3(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function uu(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Pf={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}uu(e,t,"selected")},INPUT:function(e,t){uu(e,t,"checked"),uu(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},ci=1,Ff=11,Bf=3,zf=8;function $r(){}function d3(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function f3(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=ln.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=ln.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=u3(r);else r.nodeType===Ff&&(r=r.firstElementChild);var u=o.getNodeKey||d3,c=o.onBeforeNodeAdded||$r,l=o.onNodeAdded||$r,f=o.onBeforeElUpdated||$r,h=o.onElUpdated||$r,p=o.onBeforeNodeDiscarded||$r,g=o.onNodeDiscarded||$r,m=o.onBeforeElChildrenUpdated||$r,b=o.skipFromChildren||$r,v=o.addChild||function(j,K){return j.appendChild(K)},y=o.childrenOnly===!0,x=Object.create(null),E=[];function k(j){E.push(j)}function C(j,K){if(j.nodeType===ci)for(var Z=j.firstChild;Z;){var P=void 0;K&&(P=u(Z))?k(P):(g(Z),Z.firstChild&&C(Z,K)),Z=Z.nextSibling}}function T(j,K,Z){p(j)!==!1&&(K&&K.removeChild(j),g(j),C(j,Z))}function S(j){if(j.nodeType===ci||j.nodeType===Ff)for(var K=j.firstChild;K;){var Z=u(K);Z&&(x[Z]=K),S(K),K=K.nextSibling}}S(n);function I(j){l(j);for(var K=j.firstChild;K;){var Z=K.nextSibling,P=u(K);if(P){var H=x[P];H&&ws(K,H)?(K.parentNode.replaceChild(H,K),L(H,K)):I(K)}else I(K);K=Z}}function A(j,K,Z){for(;K;){var P=K.nextSibling;(Z=u(K))?k(Z):T(K,j,!0),K=P}}function L(j,K,Z){var P=u(K);if(P&&delete x[P],!Z){var H=f(j,K);if(H===!1||(H instanceof HTMLElement&&(j=H,S(j)),e(j,K),h(j),m(j,K)===!1))return}j.nodeName!=="TEXTAREA"?O(j,K):Pf.TEXTAREA(j,K)}function O(j,K){var Z=b(j,K),P=K.firstChild,H=j.firstChild,Y,se,fe,X,W;e:for(;P;){for(X=P.nextSibling,Y=u(P);!Z&&H;){if(fe=H.nextSibling,P.isSameNode&&P.isSameNode(H)){P=X,H=fe;continue e}se=u(H);var ge=H.nodeType,Me=void 0;if(ge===P.nodeType&&(ge===ci?(Y?Y!==se&&((W=x[Y])?fe===W?Me=!1:(j.insertBefore(W,H),se?k(se):T(H,j,!0),H=W,se=u(H)):Me=!1):se&&(Me=!1),Me=Me!==!1&&ws(H,P),Me&&L(H,P)):(ge===Bf||ge==zf)&&(Me=!0,H.nodeValue!==P.nodeValue&&(H.nodeValue=P.nodeValue))),Me){P=X,H=fe;continue e}se?k(se):T(H,j,!0),H=fe}if(Y&&(W=x[Y])&&ws(W,P))Z||v(j,W),L(W,P);else{var ce=c(P);ce!==!1&&(ce&&(P=ce),P.actualize&&(P=P.actualize(j.ownerDocument||ln)),v(j,P),I(P))}P=X,H=fe}A(j,H,se);var Ce=Pf[j.nodeName];Ce&&Ce(j,K)}var U=n,R=U.nodeType,B=r.nodeType;if(!y){if(R===ci)B===ci?ws(n,r)||(g(n),U=l3(n,c3(r.nodeName,r.namespaceURI))):U=r;else if(R===Bf||R===zf){if(B===R)return U.nodeValue!==r.nodeValue&&(U.nodeValue=r.nodeValue),U;U=r}}if(U===r)g(n);else{if(r.isSameNode&&r.isSameNode(U))return;if(L(U,r,y),E)for(var $=0,N=E.length;$<N;$++){var G=x[E[$]];G&&T(G,G.parentNode,!1)}}return!y&&U!==n&&n.parentNode&&(U.actualize&&(U=U.actualize(n.ownerDocument||ln)),n.parentNode.replaceChild(U,n)),U}}var g3=f3(t3);const Uf={};function p3(e){let t=Uf[e];if(t)return t;t=Uf[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Wo(e,t){typeof t!="string"&&(t=Wo.defaultChars);const n=p3(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(c&192)===128){const l=a<<12&61440|u<<6&4032|c&63;l<2048||l>=55296&&l<=57343?o+="���":o+=String.fromCharCode(l),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16),l=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(c&192)===128&&(l&192)===128){let f=a<<18&1835008|u<<12&258048|c<<6&4032|l&63;f<65536||f>1114111?o+="����":(f-=65536,o+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),i+=9;continue}}o+="�"}return o})}Wo.defaultChars=";/?:@&=+$,#";Wo.componentChars="";const Kf={};function h3(e){let t=Kf[e];if(t)return t;t=Kf[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function ss(e,t,n){typeof t!="string"&&(n=t,t=ss.defaultChars),typeof n>"u"&&(n=!0);const r=h3(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}ss.defaultChars=";/?:@&=+$,-_.!~*'()#";ss.componentChars="-_.!~*'()";function Ul(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Ws(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const m3=/^([a-z0-9.+-]+:)/i,b3=/:[0-9]*$/,y3=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,v3=["<",">",'"',"`"," ","\r",`
7
+ `," "],x3=["{","}","|","\\","^","`"].concat(v3),w3=["'"].concat(x3),jf=["%","/","?",";","#"].concat(w3),Hf=["/","?","#"],_3=255,qf=/^[+a-z0-9A-Z_-]{0,63}$/,E3=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Gf={javascript:!0,"javascript:":!0},Vf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Kl(e,t){if(e&&e instanceof Ws)return e;const n=new Ws;return n.parse(e,t),n}Ws.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=y3.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=m3.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&Gf[s])&&(i=i.substr(2),this.slashes=!0)),!Gf[s]&&(o||s&&!Vf[s])){let c=-1;for(let g=0;g<Hf.length;g++)r=i.indexOf(Hf[g]),r!==-1&&(c===-1||r<c)&&(c=r);let l,f;c===-1?f=i.lastIndexOf("@"):f=i.lastIndexOf("@",c),f!==-1&&(l=i.slice(0,f),i=i.slice(f+1),this.auth=l),c=-1;for(let g=0;g<jf.length;g++)r=i.indexOf(jf[g]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const h=i.slice(0,c);i=i.slice(c),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let m=0,b=g.length;m<b;m++){const v=g[m];if(v&&!v.match(qf)){let y="";for(let x=0,E=v.length;x<E;x++)v.charCodeAt(x)>127?y+="x":y+=v[x];if(!y.match(qf)){const x=g.slice(0,m),E=g.slice(m+1),k=v.match(E3);k&&(x.push(k[1]),E.unshift(k[2])),E.length&&(i=E.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>_3&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),Vf[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ws.prototype.parseHost=function(e){let t=b3.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const S3=Object.freeze(Object.defineProperty({__proto__:null,decode:Wo,encode:ss,format:Ul,parse:Kl},Symbol.toStringTag,{value:"Module"})),Ab=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Tb=/[\0-\x1F\x7F-\x9F]/,C3=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,jl=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Db=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Ib=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,k3=Object.freeze(Object.defineProperty({__proto__:null,Any:Ab,Cc:Tb,Cf:C3,P:jl,S:Db,Z:Ib},Symbol.toStringTag,{value:"Module"})),A3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),T3=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var cu;const D3=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),I3=(cu=String.fromCodePoint)!==null&&cu!==void 0?cu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function O3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=D3.get(e))!==null&&t!==void 0?t:e}var Vt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Vt||(Vt={}));const R3=32;var Br;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Br||(Br={}));function Uc(e){return e>=Vt.ZERO&&e<=Vt.NINE}function N3(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_F||e>=Vt.LOWER_A&&e<=Vt.LOWER_F}function M3(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_Z||e>=Vt.LOWER_A&&e<=Vt.LOWER_Z||Uc(e)}function L3(e){return e===Vt.EQUALS||M3(e)}var Gt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Gt||(Gt={}));var xr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xr||(xr={}));class $3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Gt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xr.Strict}startEntity(t){this.decodeMode=t,this.state=Gt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Gt.EntityStart:return t.charCodeAt(n)===Vt.NUM?(this.state=Gt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Gt.NamedEntity,this.stateNamedEntity(t,n));case Gt.NumericStart:return this.stateNumericStart(t,n);case Gt.NumericDecimal:return this.stateNumericDecimal(t,n);case Gt.NumericHex:return this.stateNumericHex(t,n);case Gt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|R3)===Vt.LOWER_X?(this.state=Gt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Gt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Uc(o)||N3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Uc(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Vt.SEMI)this.consumed+=1;else if(this.decodeMode===xr.Strict)return 0;return this.emitCodePoint(O3(this.result),this.consumed),this.errors&&(t!==Vt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&Br.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=P3(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===xr.Attribute&&(i===0||L3(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&Br.VALUE_LENGTH)>>14,i!==0){if(s===Vt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==xr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Br.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Br.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Gt.NamedEntity:return this.result!==0&&(this.decodeMode!==xr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Gt.NumericDecimal:return this.emitNumericEntity(0,2);case Gt.NumericHex:return this.emitNumericEntity(0,3);case Gt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Gt.EntityStart:return 0}}}function Ob(e){let t="";const n=new $3(e,r=>t+=I3(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const c=n.write(o,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const u=t+o.slice(s);return t="",u}}function P3(e,t,n,r){const o=(t&Br.BRANCH_LENGTH)>>7,i=t&Br.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const Rb=Ob(A3);Ob(T3);function F3(e,t=xr.Legacy){return Rb(e,t)}function B3(e){return Rb(e,xr.Strict)}function z3(e){return Object.prototype.toString.call(e)}function Hl(e){return z3(e)==="[object String]"}const U3=Object.prototype.hasOwnProperty;function K3(e,t){return U3.call(e,t)}function Ia(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Nb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function ql(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Fi(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Mb=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,j3=/&([a-z#][a-z0-9]{1,31});/gi,H3=new RegExp(Mb.source+"|"+j3.source,"gi"),q3=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function G3(e,t){if(t.charCodeAt(0)===35&&q3.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return ql(r)?Fi(r):e}const n=F3(e);return n!==e?n:e}function V3(e){return e.indexOf("\\")<0?e:e.replace(Mb,"$1")}function Yo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(H3,function(t,n,r){return n||G3(t,r)})}const W3=/[&<>"]/,Y3=/[&<>"]/g,Z3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function X3(e){return Z3[e]}function Vr(e){return W3.test(e)?e.replace(Y3,X3):e}const J3=/[.?*+^$[\]\\(){}|-]/g;function Q3(e){return e.replace(J3,"\\$&")}function xt(e){switch(e){case 9:case 32:return!0}return!1}function Bi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Lb(e){return jl.test(e)||Db.test(e)}function zi(e){return Lb(Fi(e))}function Ui(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Oa(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Wf(e){return e===32||e===9||e===10||e===13}function Ra(e){let t=0;for(;t<e.length&&Wf(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Wf(e.charCodeAt(n));n--);return e.slice(t,n+1)}const eA={mdurl:S3,ucmicro:k3},tA=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Nb,asciiTrim:Ra,assign:Ia,escapeHtml:Vr,escapeRE:Q3,fromCodePoint:Fi,has:K3,isMdAsciiPunct:Ui,isPunctChar:Lb,isPunctCharCode:zi,isSpace:xt,isString:Hl,isValidEntityCode:ql,isWhiteSpace:Bi,lib:eA,normalizeReference:Oa,unescapeAll:Yo,unescapeMd:V3},Symbol.toStringTag,{value:"Module"}));function nA(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function rA(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=Yo(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=Yo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function oA(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=Yo(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=Yo(e.slice(t,i)),s}const iA=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:rA,parseLinkLabel:nA,parseLinkTitle:oA},Symbol.toStringTag,{value:"Module"})),lr={};lr.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+Vr(i.content)+"</code>"};lr.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+Vr(e[t].content)+`</code></pre>
8
+ `};lr.fence=function(e,t,n,r,o){const i=e[t],s=i.info?Yo(i.info).trim():"";let a="",u="";if(s){const l=s.split(/(\s+)/g);a=l[0],u=l.slice(2).join("")}let c;if(n.highlight?c=n.highlight(i.content,a,u)||Vr(i.content):c=Vr(i.content),c.indexOf("<pre")===0)return c+`
9
+ `;if(s){const l=i.attrIndex("class"),f=i.attrs?i.attrs.slice():[];l<0?f.push(["class",n.langPrefix+a]):(f[l]=f[l].slice(),f[l][1]+=" "+n.langPrefix+a);const h={attrs:f};return`<pre><code${o.renderAttrs(h)}>${c}</code></pre>
10
+ `}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
11
+ `};lr.image=function(e,t,n,r,o){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};lr.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
12
+ `:`<br>
13
+ `};lr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
14
+ `:`<br>
15
+ `:`
16
+ `};lr.text=function(e,t){return Vr(e[t].content)};lr.html_block=function(e,t){return e[t].content};lr.html_inline=function(e,t){return e[t].content};function ti(){this.rules=Ia({},lr)}ti.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+Vr(t.attrs[n][0])+'="'+Vr(t.attrs[n][1])+'"';return o};ti.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
17
+ `),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
18
+ `:">",i};ti.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t)}return r};ti.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
19
+ `;break}return r};ti.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function bn(){this.__rules__=[],this.__cache__=null}bn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};bn.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};bn.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};bn.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};bn.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};bn.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};bn.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};bn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};bn.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};bn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Vn(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Vn.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};Vn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Vn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};Vn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};Vn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function $b(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}$b.prototype.Token=Vn;const sA=/\r\n?|\n/g,aA=/\0/g;function uA(e){let t;t=e.src.replace(sA,`
20
+ `),t=t.replace(aA,"�"),e.src=t}function cA(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function lA(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function dA(e){return/^<a[>\s]/i.test(e)}function fA(e){return/^<\/a\s*>/i.test(e)}function gA(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(dA(a.content)&&i>0&&i--,fA(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let f=a.level,h=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const g=c[p].url,m=e.md.normalizeLink(g);if(!e.md.validateLink(m))continue;let b=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");const v=c[p].index;if(v>h){const k=new e.Token("text","",0);k.content=u.slice(h,v),k.level=f,l.push(k)}const y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=f++,y.markup="linkify",y.info="auto",l.push(y);const x=new e.Token("text","",0);x.content=b,x.level=f,l.push(x);const E=new e.Token("link_close","a",-1);E.level=--f,E.markup="linkify",E.info="auto",l.push(E),h=c[p].lastIndex}if(h<u.length){const p=new e.Token("text","",0);p.content=u.slice(h),p.level=f,l.push(p)}t[n].children=o=Nb(o,s,l)}}}}const Pb=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,pA=/\((c|tm|r)\)/i,hA=/\((c|tm|r)\)/ig,mA={c:"©",r:"®",tm:"™"};function bA(e,t){return mA[t.toLowerCase()]}function yA(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(hA,bA)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function vA(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Pb.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function xA(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(pA.test(e.tokens[t].content)&&yA(e.tokens[t].children),Pb.test(e.tokens[t].content)&&vA(e.tokens[t].children))}const wA=/['"]/,Yf=/['"]/g,Zf="’";function _s(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function _A(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function EA(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let c=0;const l=u.length;e:for(;c<l;){Yf.lastIndex=c;const f=Yf.exec(u);if(!f)break;let h=!0,p=!0;c=f.index+1;const g=f[0]==="'";let m=32;if(f.index-1>=0)m=u.charCodeAt(f.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(c<l)b=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}const v=Ui(m)||zi(m),y=Ui(b)||zi(b),x=Bi(m),E=Bi(b);if(E?h=!1:y&&(x||v||(h=!1)),x?p=!1:v&&(E||y||(p=!1)),b===34&&f[0]==='"'&&m>=48&&m<=57&&(p=h=!1),h&&p&&(h=v,p=y),!h&&!p){g&&_s(o,i,f.index,Zf);continue}if(p)for(n=r.length-1;n>=0;n--){let k=r[n];if(r[n].level<a)break;if(k.single===g&&r[n].level===a){k=r[n];let C,T;g?(C=t.md.options.quotes[2],T=t.md.options.quotes[3]):(C=t.md.options.quotes[0],T=t.md.options.quotes[1]),_s(o,i,f.index,T),_s(o,k.token,k.pos,C),r.length=n;continue e}}h?r.push({token:i,pos:f.index,single:g,level:a}):p&&g&&_s(o,i,f.index,Zf)}}Object.keys(o).forEach(function(i){e[i].content=_A(e[i].content,o[i])})}function SA(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!wA.test(e.tokens[t].content)||EA(e.tokens[t].children,e)}function CA(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const lu=[["normalize",uA],["block",cA],["inline",lA],["linkify",gA],["replacements",xA],["smartquotes",SA],["text_join",CA]];function Gl(){this.ruler=new bn;for(let e=0;e<lu.length;e++)this.ruler.push(lu[e][0],lu[e][1])}Gl.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};Gl.prototype.State=$b;function dr(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,c=o.length,l=!1;s<c;s++){const f=o.charCodeAt(s);if(!l)if(xt(f)){a++,f===9?u+=4-u%4:u++;continue}else l=!0;(f===10||s===c-1)&&(f!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),l=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}dr.prototype.push=function(e,t,n){const r=new Vn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};dr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};dr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};dr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!xt(r))break}return t};dr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!xt(this.src.charCodeAt(--t)))return t+1;return t};dr.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};dr.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};dr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,f;for(a+1<n||o?f=this.eMarks[a]+1:f=this.eMarks[a];l<f&&u<r;){const h=this.src.charCodeAt(l);if(xt(h))h===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,f):i[s]=this.src.slice(l,f)}return i.join("")};dr.prototype.Token=Vn;const kA=65536;function du(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Xf(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function AA(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!xt(a)||s===45&&xt(a))return!1;for(;i<e.eMarks[o];){const E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!xt(E))return!1;i++}let u=du(e,t+1),c=u.split("|");const l=[];for(let E=0;E<c.length;E++){const k=c[E].trim();if(!k){if(E===0||E===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?l.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=du(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=Xf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const f=c.length;if(f===0||f!==l.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const v=e.push("tr_open","tr",1);v.map=[t,t+1];for(let E=0;E<c.length;E++){const k=e.push("th_open","th",1);l[E]&&(k.attrs=[["style","text-align:"+l[E]]]);const C=e.push("inline","",0);C.content=c[E].trim(),C.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let E=!1;for(let C=0,T=p.length;C<T;C++)if(p[C](e,o,n,!0)){E=!0;break}if(E||(u=du(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Xf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=f-c.length,x>kA))break;if(o===t+2){const C=e.push("tbody_open","tbody",1);C.map=y=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let C=0;C<f;C++){const T=e.push("td_open","td",1);l[C]&&(T.attrs=[["style","text-align:"+l[C]]]);const S=e.push("inline","",0);S.content=c[C]?c[C].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=h,e.line=o,!0}function TA(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
21
+ `,i.map=[t,e.line],!0}function DA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(o=a=e.bMarks[f]+e.tShift[f],i=e.eMarks[f],o<i&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){h=!0;break}u=e.sCount[t],e.line=f+(h?1:0);const p=e.push("fence","code",0);return p.info=l,p.content=e.getLines(t+1,f,u,!0),p.markup=c,p.map=[t,e.line],!0}function IA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,g;for(g=t;g<n;g++){const x=e.sCount[g]<e.blkIndent;if(o=e.bMarks[g]+e.tShift[g],i=e.eMarks[g],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let k=e.sCount[g]+1,C,T;e.src.charCodeAt(o)===32?(o++,k++,T=!1,C=!0):e.src.charCodeAt(o)===9?(C=!0,(e.bsCount[g]+k)%4===3?(o++,k++,T=!1):T=!0):C=!1;let S=k;for(a.push(e.bMarks[g]),e.bMarks[g]=o;o<i;){const I=e.src.charCodeAt(o);if(xt(I))I===9?S+=4-(S+e.bsCount[g]+(T?1:0))%4:S++;else break;o++}p=o>=i,u.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?1:0),c.push(e.sCount[g]),e.sCount[g]=S-k,l.push(e.tShift[g]),e.tShift[g]=o-e.bMarks[g];continue}if(p)break;let E=!1;for(let k=0,C=f.length;k<C;k++)if(f[k](e,g,n,!0)){E=!0;break}if(E){e.lineMax=g,e.blkIndent!==0&&(a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]=-1}const m=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const v=[t,0];b.map=v,e.md.block.tokenize(e,t,g);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=h,v[1]=e.line;for(let x=0;x<l.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=l[x],e.sCount[x+t]=c[x],e.bsCount[x+t]=u[x];return e.blkIndent=m,!0}function OA(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const c=e.src.charCodeAt(i++);if(c!==s&&!xt(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Jf(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!xt(i))return-1}return r}function Qf(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!xt(i))?-1:o}function RA(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function NA(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let f,h,p;if((p=Qf(e,u))>=0){if(f=!0,s=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(s,p-1)),l&&h!==1)return!1}else if((p=Jf(e,u))>=0)f=!1;else return!1;if(l&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const g=e.src.charCodeAt(p-1),m=e.tokens.length;f?(a=e.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);const b=[u,0];a.map=b,a.markup=String.fromCharCode(g);let v=!1;const y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=p,o=e.eMarks[u];const E=e.sCount[u]+p-(e.bMarks[u]+e.tShift[u]);let k=E;for(;i<o;){const B=e.src.charCodeAt(i);if(B===9)k+=4-(k+e.bsCount[u])%4;else if(B===32)k++;else break;i++}const C=i;let T;C>=o?T=1:T=k-E,T>4&&(T=1);const S=E+T;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const I=[u,0];a.map=I,f&&(a.info=e.src.slice(s,p-1));const A=e.tight,L=e.tShift[u],O=e.sCount[u],U=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=k,C>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||v)&&(c=!1),v=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=U,e.tShift[u]=L,e.sCount[u]=O,e.tight=A,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),u=e.line,I[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let R=!1;for(let B=0,$=y.length;B<$;B++)if(y[B](e,u,n,!0)){R=!0;break}if(R)break;if(f){if(p=Qf(e,u),p<0)break;s=e.bMarks[u]+e.tShift[u]}else if(p=Jf(e,u),p<0)break;if(g!==e.src.charCodeAt(p-1))break}return f?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),b[1]=u,e.line=u,e.parentType=x,c&&RA(e,m),!0}function MA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(y){const x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let E=!1;if(e.sCount[y]-e.blkIndent>3&&(E=!0),e.sCount[y]<0&&(E=!0),!E){const T=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let I=!1;for(let A=0,L=T.length;A<L;A++)if(T[A](e,y,x,!0)){I=!0;break}if(e.parentType=S,I)return null}const k=e.bMarks[y]+e.tShift[y],C=e.eMarks[y];return e.src.slice(k,C+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const y=u.charCodeAt(o);if(y===91)return!1;if(y===93){c=o;break}else if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(y===92&&(o++,o<i&&u.charCodeAt(o)===10)){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<i;o++){const y=u.charCodeAt(o);if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!xt(y))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const f=e.md.normalizeLink(l.str);if(!e.md.validateLink(f))return!1;o=l.pos;const h=o,p=s,g=o;for(;o<i;o++){const y=u.charCodeAt(o);if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!xt(y))break}let m=e.md.helpers.parseLinkTitle(u,o,i);for(;m.can_continue;){const y=a(s);if(y===null)break;u+=y,o=i,i=u.length,s++,m=e.md.helpers.parseLinkTitle(u,o,i,m)}let b;for(o<i&&g!==o&&m.ok?(b=m.str,o=m.pos):(b="",o=h,s=p);o<i;){const y=u.charCodeAt(o);if(!xt(y))break;o++}if(o<i&&u.charCodeAt(o)!==10&&b)for(b="",o=h,s=p;o<i;){const y=u.charCodeAt(o);if(!xt(y))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const v=Oa(u.slice(1,c));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:b,href:f}),e.line=s),!0):!1}const LA=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$A="[a-zA-Z_:][a-zA-Z0-9:._-]*",PA="[^\"'=<>`\\x00-\\x20]+",FA="'[^']*'",BA='"[^"]*"',zA="(?:"+PA+"|"+FA+"|"+BA+")",UA="(?:\\s+"+$A+"(?:\\s*=\\s*"+zA+")?)",Fb="<[A-Za-z][A-Za-z0-9\\-]*"+UA+"*\\s*\\/?>",Bb="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",KA="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",jA="<[?][\\s\\S]*?[?]>",HA="<![A-Za-z][^>]*>",qA="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",GA=new RegExp("^(?:"+Fb+"|"+Bb+"|"+KA+"|"+jA+"|"+HA+"|"+qA+")"),VA=new RegExp("^(?:"+Fb+"|"+Bb+")"),io=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+LA.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(VA.source+"\\s*$"),/^$/,!1]];function WA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<io.length&&!io[a][0].test(s);a++);if(a===io.length)return!1;if(r)return io[a][2];let u=t+1;const c=io[a][1].test("");if(!io[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),io[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function YA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!xt(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&xt(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);l.content=Ra(e.src.slice(o,i)),l.map=[t,e.line],l.children=[];const f=e.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function ZA(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const g=e.eMarks[a];if(p<g&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=g))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let h=!1;for(let p=0,g=r.length;p<g;p++)if(r[p](e,a,n,!0)){h=!0;break}if(h)break}if(!i)return e.parentType=o,!1;const u=Ra(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const l=e.push("inline","",0);l.content=u,l.map=[t,e.line-1],l.children=[];const f=e.push("heading_close","h"+String(i),-1);return f.markup=String.fromCharCode(s),e.parentType=o,!0}function XA(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let l=0,f=r.length;l<f;l++)if(r[l](e,i,n,!0)){c=!0;break}if(c)break}const s=Ra(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const Es=[["table",AA,["paragraph","reference"]],["code",TA],["fence",DA,["paragraph","reference","blockquote","list"]],["blockquote",IA,["paragraph","reference","blockquote","list"]],["hr",OA,["paragraph","reference","blockquote","list"]],["list",NA,["paragraph","reference","blockquote"]],["reference",MA],["html_block",WA,["paragraph","reference","blockquote"]],["heading",YA,["paragraph","reference","blockquote"]],["lheading",ZA],["paragraph",XA]];function Na(){this.ruler=new bn;for(let e=0;e<Es.length;e++)this.ruler.push(Es[e][0],Es[e][1],{alt:(Es[e][2]||[]).slice()})}Na.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let c=!1;for(let l=0;l<o;l++)if(c=r[l](e,s,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};Na.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};Na.prototype.State=dr;function as(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}as.prototype.pushPending=function(){const e=new Vn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};as.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new Vn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};as.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const b=this.src.charCodeAt(e-2);o=(b&64512)===55296?65536+(b-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const b=this.src.charCodeAt(i+1);a=(b&64512)===56320?65536+(a-55296<<10)+(b-56320):65533}else(a&64512)===56320&&(a=65533);const u=Ui(o)||zi(o),c=Ui(a)||zi(a),l=Bi(o),f=Bi(a),h=!f&&(!c||l||u),p=!l&&(!u||f||c);return{can_open:h&&(t||!p||u),can_close:p&&(t||!h||c),length:s}};as.prototype.Token=Vn;function JA(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function QA(e,t){let n=e.pos;for(;n<e.posMax&&!JA(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const eT=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function tT(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(eT);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=a.length-i.length,!0}function nT(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&xt(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Vl=[];for(let e=0;e<256;e++)Vl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Vl[e.charCodeAt(0)]=1});function rT(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!xt(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&Vl[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function oT(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;const l=u-c;if(l===a){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[l]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function iT(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function eg(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function sT(e){const t=e.tokens_meta,n=e.tokens_meta.length;eg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&eg(e,t[r].delimiters)}const zb={tokenize:iT,postProcess:sT};function aT(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function tg(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function uT(e){const t=e.tokens_meta,n=e.tokens_meta.length;tg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&tg(e,t[r].delimiters)}const Ub={tokenize:aT,postProcess:uT};function cT(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,f=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let g=p+1;if(g<f&&e.src.charCodeAt(g)===40){for(c=!1,g++;g<f&&(n=e.src.charCodeAt(g),!(!xt(n)&&n!==10));g++);if(g>=f)return!1;if(u=g,o=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?g=o.pos:s="",u=g;g<f&&(n=e.src.charCodeAt(g),!(!xt(n)&&n!==10));g++);if(o=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<f&&u!==g&&o.ok)for(a=o.str,g=o.pos;g<f&&(n=e.src.charCodeAt(g),!(!xt(n)&&n!==10));g++);}(g>=f||e.src.charCodeAt(g)!==41)&&(c=!0),g++}if(c){if(typeof e.env.references>"u")return!1;if(g<f&&e.src.charCodeAt(g)===91?(u=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?r=e.src.slice(u,g++):g=p+1):g=p+1,r||(r=e.src.slice(h,p)),i=e.env.references[Oa(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=h,e.posMax=p;const m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=f,!0}function lT(e,t){let n,r,o,i,s,a,u,c,l="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i<h&&e.src.charCodeAt(i)===40){for(i++;i<h&&(n=e.src.charCodeAt(i),!(!xt(n)&&n!==10));i++);if(i>=h)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<h&&(n=e.src.charCodeAt(i),!(!xt(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<h&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<h&&(n=e.src.charCodeAt(i),!(!xt(n)&&n!==10));i++);else u="";if(i>=h||e.src.charCodeAt(i)!==41)return e.pos=f,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<h&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=g+1):i=g+1,o||(o=e.src.slice(p,g)),s=e.env.references[Oa(o)],!s)return e.pos=f,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(p,g);const m=[];e.md.inline.parse(r,e.md,e.env,m);const b=e.push("image","img",0),v=[["src",l],["alt",""]];b.attrs=v,b.children=m,b.content=r,u&&v.push(["title",u])}return e.pos=i,e.posMax=h,!0}const dT=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,fT=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function gT(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(fT.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(dT.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function pT(e){return/^<a[>\s]/i.test(e)}function hT(e){return/^<\/a\s*>/i.test(e)}function mT(e){const t=e|32;return t>=97&&t<=122}function bT(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!mT(o))return!1;const i=e.src.slice(r).match(GA);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],pT(s.content)&&e.linkLevel++,hT(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const yT=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,vT=/^&([a-z][a-z0-9]{1,31});/i;function xT(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(yT);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=ql(s)?Fi(s):Fi(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(vT);if(i){const s=B3(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function ng(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const f=e[c];if(f.marker===a.marker&&f.open&&f.end<0){let h=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(h=!0),!h){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+p,i[c]=p,a.open=!1,f.end=s,f.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function wT(e){const t=e.tokens_meta,n=e.tokens_meta.length;ng(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ng(t[r].delimiters)}function _T(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const fu=[["text",QA],["linkify",tT],["newline",nT],["escape",rT],["backticks",oT],["strikethrough",zb.tokenize],["emphasis",Ub.tokenize],["link",cT],["image",lT],["autolink",gT],["html_inline",bT],["entity",xT]],gu=[["balance_pairs",wT],["strikethrough",zb.postProcess],["emphasis",Ub.postProcess],["fragments_join",_T]];function us(){this.ruler=new bn;for(let e=0;e<fu.length;e++)this.ruler.push(fu[e][0],fu[e][1]);this.ruler2=new bn;for(let e=0;e<gu.length;e++)this.ruler2.push(gu[e][0],gu[e][1])}us.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};us.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};us.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};us.prototype.State=as;function ET(e){const t={};e=e||{},t.src_Any=Ab.source,t.src_Cc=Tb.source,t.src_Z=Ib.source,t.src_P=jl.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Kc(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ma(e){return Object.prototype.toString.call(e)}function ST(e){return Ma(e)==="[object String]"}function CT(e){return Ma(e)==="[object Object]"}function kT(e){return Ma(e)==="[object RegExp]"}function rg(e){return Ma(e)==="[object Function]"}function AT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Kb={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function TT(e){return Object.keys(e||{}).reduce(function(t,n){return t||Kb.hasOwnProperty(n)},!1)}const DT={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},IT="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",OT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function RT(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function og(){return function(e,t){t.normalize(e)}}function Ys(e){const t=e.re=ET(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(IT),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,CT(u)){kT(u.validate)?c.validate=RT(u.validate):rg(u.validate)?c.validate=u.validate:i(a,u),rg(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=og();return}if(ST(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:og()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(AT).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function jb(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);t||TT(e)&&(t=e,e={}),this.__opts__=Kc({},Kb,t),this.__schemas__=Kc({},DT,e),this.__compiled__={},this.__tlds__=OT,this.__tlds_replaced__=!1,this.re={},Ys(this)}kn.prototype.add=function(t,n){return this.__schemas__[t]=n,Ys(this),this};kn.prototype.set=function(t){return this.__opts__=Kc(this.__opts__,t),this};kn.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};kn.prototype.pretest=function(t){return this.re.pretest.test(t)};kn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};kn.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(h,p){return h?p?h.index!==p.index?h.index<p.index?h:p:h.lastIndex>=p.lastIndex?h:p:h:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let f=0;for(;;){const h=[r[l[0]],i[l[1]],o[l[2]]],p=c(c(h[0],h[1]),h[2]);if(!p)break;if(p===h[0]?l[0]++:p===h[1]?l[1]++:l[2]++,p.index<f)continue;const g=new jb(t,p.schema,p.index,p.lastIndex);this.__compiled__[g.schema].normalize(g,this),n.push(g),f=p.lastIndex}return n.length?n:null};kn.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new jb(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};kn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Ys(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ys(this),this)};kn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};kn.prototype.onCompile=function(){};const qo=2147483647,Qn=36,Wl=1,Ki=26,NT=38,MT=700,Hb=72,qb=128,Gb="-",LT=/^xn--/,$T=/[^\0-\x7F]/,PT=/[\x2E\u3002\uFF0E\uFF61]/g,FT={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},pu=Qn-Wl,er=Math.floor,hu=String.fromCharCode;function Fr(e){throw new RangeError(FT[e])}function BT(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Vb(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(PT,".");const o=e.split("."),i=BT(o,t).join(".");return r+i}function Wb(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const zT=e=>String.fromCodePoint(...e),UT=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Qn},ig=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Yb=function(e,t,n){let r=0;for(e=n?er(e/MT):e>>1,e+=er(e/t);e>pu*Ki>>1;r+=Qn)e=er(e/pu);return er(r+(pu+1)*e/(e+NT))},Zb=function(e){const t=[],n=e.length;let r=0,o=qb,i=Hb,s=e.lastIndexOf(Gb);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Fr("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,f=Qn;;f+=Qn){a>=n&&Fr("invalid-input");const h=UT(e.charCodeAt(a++));h>=Qn&&Fr("invalid-input"),h>er((qo-r)/l)&&Fr("overflow"),r+=h*l;const p=f<=i?Wl:f>=i+Ki?Ki:f-i;if(h<p)break;const g=Qn-p;l>er(qo/g)&&Fr("overflow"),l*=g}const c=t.length+1;i=Yb(r-u,c,u==0),er(r/c)>qo-o&&Fr("overflow"),o+=er(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Xb=function(e){const t=[];e=Wb(e);const n=e.length;let r=qb,o=0,i=Hb;for(const u of e)u<128&&t.push(hu(u));const s=t.length;let a=s;for(s&&t.push(Gb);a<n;){let u=qo;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>er((qo-o)/c)&&Fr("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>qo&&Fr("overflow"),l===r){let f=o;for(let h=Qn;;h+=Qn){const p=h<=i?Wl:h>=i+Ki?Ki:h-i;if(f<p)break;const g=f-p,m=Qn-p;t.push(hu(ig(p+g%m,0))),f=er(g/m)}t.push(hu(ig(f,0))),i=Yb(o,c,a===s),o=0,++a}++o,++r}return t.join("")},KT=function(e){return Vb(e,function(t){return LT.test(t)?Zb(t.slice(4).toLowerCase()):t})},jT=function(e){return Vb(e,function(t){return $T.test(t)?"xn--"+Xb(t):t})},Jb={version:"2.3.1",ucs2:{decode:Wb,encode:zT},decode:Zb,encode:Xb,toASCII:jT,toUnicode:KT},HT={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},qT={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},GT={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},VT={default:HT,zero:qT,commonmark:GT},WT=/^(vbscript|javascript|file|data):/,YT=/^data:image\/(gif|png|jpeg|webp);/;function ZT(e){const t=e.trim().toLowerCase();return WT.test(t)?YT.test(t):!0}const Qb=["http:","https:","mailto:"];function XT(e){const t=Kl(e,!0);if(t.hostname&&(!t.protocol||Qb.indexOf(t.protocol)>=0))try{t.hostname=Jb.toASCII(t.hostname)}catch{}return ss(Ul(t))}function JT(e){const t=Kl(e,!0);if(t.hostname&&(!t.protocol||Qb.indexOf(t.protocol)>=0))try{t.hostname=Jb.toUnicode(t.hostname)}catch{}return Wo(Ul(t),Wo.defaultChars+"%")}function Rn(e,t){if(!(this instanceof Rn))return new Rn(e,t);t||Hl(e)||(t=e||{},e="default"),this.inline=new us,this.block=new Na,this.core=new Gl,this.renderer=new ti,this.linkify=new kn,this.validateLink=ZT,this.normalizeLink=XT,this.normalizeLinkText=JT,this.utils=tA,this.helpers=Ia({},iA),this.options={},this.configure(e),t&&this.set(t)}Rn.prototype.set=function(e){return Ia(this.options,e),this};Rn.prototype.configure=function(e){const t=this;if(Hl(e)){const n=e;if(e=VT[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Rn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Rn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Rn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Rn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Rn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Rn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Rn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function La(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mu,sg;function QT(){if(sg)return mu;sg=1;var e=!0,t=!1,n=!1;mu=function(m,b){b&&(e=!b.enabled,t=!!b.label,n=!!b.labelAfter),m.core.ruler.after("inline","github-task-lists",function(v){for(var y=v.tokens,x=2;x<y.length;x++)i(y,x)&&(s(y[x],v.Token),r(y[x-2],"class","task-list-item"+(e?"":" enabled")),r(y[o(y,x-2)],"class","contains-task-list"))})};function r(m,b,v){var y=m.attrIndex(b),x=[b,v];y<0?m.attrPush(x):m.attrs[y]=x}function o(m,b){for(var v=m[b].level-1,y=b-1;y>=0;y--)if(m[y].level===v)return y;return-1}function i(m,b){return f(m[b])&&h(m[b-1])&&p(m[b-2])&&g(m[b])}function s(m,b){if(m.children.unshift(a(m,b)),m.children[1].content=m.children[1].content.slice(3),m.content=m.content.slice(3),t)if(n){m.children.pop();var v="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);m.children[0].content=m.children[0].content.slice(0,-1)+' id="'+v+'">',m.children.push(l(m.content,v,b))}else m.children.unshift(u(b)),m.children.push(c(b))}function a(m,b){var v=new b("html_inline","",0),y=e?' disabled="" ':"";return m.content.indexOf("[ ] ")===0?v.content='<input class="task-list-item-checkbox"'+y+'type="checkbox">':(m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0)&&(v.content='<input class="task-list-item-checkbox" checked=""'+y+'type="checkbox">'),v}function u(m){var b=new m("html_inline","",0);return b.content="<label>",b}function c(m){var b=new m("html_inline","",0);return b.content="</label>",b}function l(m,b,v){var y=new v("html_inline","",0);return y.content='<label class="task-list-item-label" for="'+b+'">'+m+"</label>",y.attrs=[{for:b}],y}function f(m){return m.type==="inline"}function h(m){return m.type==="paragraph_open"}function p(m){return m.type==="list_item_open"}function g(m){return m.content.indexOf("[ ] ")===0||m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0}return mu}var eD=QT();const tD=La(eD);var bu,ag;function nD(){if(ag)return bu;ag=1;function e(M){return M instanceof Map?M.clear=M.delete=M.set=function(){throw new Error("map is read-only")}:M instanceof Set&&(M.add=M.clear=M.delete=function(){throw new Error("set is read-only")}),Object.freeze(M),Object.getOwnPropertyNames(M).forEach(te=>{const de=M[te],Oe=typeof de;(Oe==="object"||Oe==="function")&&!Object.isFrozen(de)&&e(de)}),M}class t{constructor(te){te.data===void 0&&(te.data={}),this.data=te.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(M){return M.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(M,...te){const de=Object.create(null);for(const Oe in M)de[Oe]=M[Oe];return te.forEach(function(Oe){for(const ut in Oe)de[ut]=Oe[ut]}),de}const o="</span>",i=M=>!!M.scope,s=(M,{prefix:te})=>{if(M.startsWith("language:"))return M.replace("language:","language-");if(M.includes(".")){const de=M.split(".");return[`${te}${de.shift()}`,...de.map((Oe,ut)=>`${Oe}${"_".repeat(ut+1)}`)].join(" ")}return`${te}${M}`};class a{constructor(te,de){this.buffer="",this.classPrefix=de.classPrefix,te.walk(this)}addText(te){this.buffer+=n(te)}openNode(te){if(!i(te))return;const de=s(te.scope,{prefix:this.classPrefix});this.span(de)}closeNode(te){i(te)&&(this.buffer+=o)}value(){return this.buffer}span(te){this.buffer+=`<span class="${te}">`}}const u=(M={})=>{const te={children:[]};return Object.assign(te,M),te};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(te){this.top.children.push(te)}openNode(te){const de=u({scope:te});this.add(de),this.stack.push(de)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(te){return this.constructor._walk(te,this.rootNode)}static _walk(te,de){return typeof de=="string"?te.addText(de):de.children&&(te.openNode(de),de.children.forEach(Oe=>this._walk(te,Oe)),te.closeNode(de)),te}static _collapse(te){typeof te!="string"&&te.children&&(te.children.every(de=>typeof de=="string")?te.children=[te.children.join("")]:te.children.forEach(de=>{c._collapse(de)}))}}class l extends c{constructor(te){super(),this.options=te}addText(te){te!==""&&this.add(te)}startScope(te){this.openNode(te)}endScope(){this.closeNode()}__addSublanguage(te,de){const Oe=te.root;de&&(Oe.scope=`language:${de}`),this.add(Oe)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(M){return M?typeof M=="string"?M:M.source:null}function h(M){return m("(?=",M,")")}function p(M){return m("(?:",M,")*")}function g(M){return m("(?:",M,")?")}function m(...M){return M.map(de=>f(de)).join("")}function b(M){const te=M[M.length-1];return typeof te=="object"&&te.constructor===Object?(M.splice(M.length-1,1),te):{}}function v(...M){return"("+(b(M).capture?"":"?:")+M.map(Oe=>f(Oe)).join("|")+")"}function y(M){return new RegExp(M.toString()+"|").exec("").length-1}function x(M,te){const de=M&&M.exec(te);return de&&de.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function k(M,{joinWith:te}){let de=0;return M.map(Oe=>{de+=1;const ut=de;let ct=f(Oe),ke="";for(;ct.length>0;){const ve=E.exec(ct);if(!ve){ke+=ct;break}ke+=ct.substring(0,ve.index),ct=ct.substring(ve.index+ve[0].length),ve[0][0]==="\\"&&ve[1]?ke+="\\"+String(Number(ve[1])+ut):(ke+=ve[0],ve[0]==="("&&de++)}return ke}).map(Oe=>`(${Oe})`).join(te)}const C=/\b\B/,T="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",A="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",L="\\b(0b[01]+)",O="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",U=(M={})=>{const te=/^#![ ]*\//;return M.binary&&(M.begin=m(te,/.*\b/,M.binary,/\b.*/)),r({scope:"meta",begin:te,end:/$/,relevance:0,"on:begin":(de,Oe)=>{de.index!==0&&Oe.ignoreMatch()}},M)},R={begin:"\\\\[\\s\\S]",relevance:0},B={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[R]},$={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[R]},N={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},G=function(M,te,de={}){const Oe=r({scope:"comment",begin:M,end:te,contains:[]},de);Oe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ut=v("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Oe.contains.push({begin:m(/[ ]+/,"(",ut,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Oe},j=G("//","$"),K=G("/\\*","\\*/"),Z=G("#","$"),P={scope:"number",begin:I,relevance:0},H={scope:"number",begin:A,relevance:0},Y={scope:"number",begin:L,relevance:0},se={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[R,{begin:/\[/,end:/\]/,relevance:0,contains:[R]}]},fe={scope:"title",begin:T,relevance:0},X={scope:"title",begin:S,relevance:0},W={begin:"\\.\\s*"+S,relevance:0};var Me=Object.freeze({__proto__:null,APOS_STRING_MODE:B,BACKSLASH_ESCAPE:R,BINARY_NUMBER_MODE:Y,BINARY_NUMBER_RE:L,COMMENT:G,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:j,C_NUMBER_MODE:H,C_NUMBER_RE:A,END_SAME_AS_BEGIN:function(M){return Object.assign(M,{"on:begin":(te,de)=>{de.data._beginMatch=te[1]},"on:end":(te,de)=>{de.data._beginMatch!==te[1]&&de.ignoreMatch()}})},HASH_COMMENT_MODE:Z,IDENT_RE:T,MATCH_NOTHING_RE:C,METHOD_GUARD:W,NUMBER_MODE:P,NUMBER_RE:I,PHRASAL_WORDS_MODE:N,QUOTE_STRING_MODE:$,REGEXP_MODE:se,RE_STARTERS_RE:O,SHEBANG:U,TITLE_MODE:fe,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:X});function ce(M,te){M.input[M.index-1]==="."&&te.ignoreMatch()}function Ce(M,te){M.className!==void 0&&(M.scope=M.className,delete M.className)}function He(M,te){te&&M.beginKeywords&&(M.begin="\\b("+M.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",M.__beforeBegin=ce,M.keywords=M.keywords||M.beginKeywords,delete M.beginKeywords,M.relevance===void 0&&(M.relevance=0))}function je(M,te){Array.isArray(M.illegal)&&(M.illegal=v(...M.illegal))}function et(M,te){if(M.match){if(M.begin||M.end)throw new Error("begin & end are not supported with match");M.begin=M.match,delete M.match}}function ot(M,te){M.relevance===void 0&&(M.relevance=1)}const Lt=(M,te)=>{if(!M.beforeMatch)return;if(M.starts)throw new Error("beforeMatch cannot be used with starts");const de=Object.assign({},M);Object.keys(M).forEach(Oe=>{delete M[Oe]}),M.keywords=de.keywords,M.begin=m(de.beforeMatch,h(de.begin)),M.starts={relevance:0,contains:[Object.assign(de,{endsParent:!0})]},M.relevance=0,delete de.beforeMatch},$t=["of","and","for","in","not","or","if","then","parent","list","value"],gn="keyword";function fr(M,te,de=gn){const Oe=Object.create(null);return typeof M=="string"?ut(de,M.split(" ")):Array.isArray(M)?ut(de,M):Object.keys(M).forEach(function(ct){Object.assign(Oe,fr(M[ct],te,ct))}),Oe;function ut(ct,ke){te&&(ke=ke.map(ve=>ve.toLowerCase())),ke.forEach(function(ve){const Fe=ve.split("|");Oe[Fe[0]]=[ct,Ln(Fe[0],Fe[1])]})}}function Ln(M,te){return te?Number(te):vn(M)?0:1}function vn(M){return $t.includes(M.toLowerCase())}const kt={},Wt=M=>{console.error(M)},nn=(M,...te)=>{console.log(`WARN: ${M}`,...te)},Ft=(M,te)=>{kt[`${M}/${te}`]||(console.log(`Deprecated as of ${M}. ${te}`),kt[`${M}/${te}`]=!0)},$n=new Error;function Rr(M,te,{key:de}){let Oe=0;const ut=M[de],ct={},ke={};for(let ve=1;ve<=te.length;ve++)ke[ve+Oe]=ut[ve],ct[ve+Oe]=!0,Oe+=y(te[ve-1]);M[de]=ke,M[de]._emit=ct,M[de]._multi=!0}function le(M){if(Array.isArray(M.begin)){if(M.skip||M.excludeBegin||M.returnBegin)throw Wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),$n;if(typeof M.beginScope!="object"||M.beginScope===null)throw Wt("beginScope must be object"),$n;Rr(M,M.begin,{key:"beginScope"}),M.begin=k(M.begin,{joinWith:""})}}function Ee(M){if(Array.isArray(M.end)){if(M.skip||M.excludeEnd||M.returnEnd)throw Wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),$n;if(typeof M.endScope!="object"||M.endScope===null)throw Wt("endScope must be object"),$n;Rr(M,M.end,{key:"endScope"}),M.end=k(M.end,{joinWith:""})}}function Te(M){M.scope&&typeof M.scope=="object"&&M.scope!==null&&(M.beginScope=M.scope,delete M.scope)}function pt(M){Te(M),typeof M.beginScope=="string"&&(M.beginScope={_wrap:M.beginScope}),typeof M.endScope=="string"&&(M.endScope={_wrap:M.endScope}),le(M),Ee(M)}function qt(M){function te(ke,ve){return new RegExp(f(ke),"m"+(M.case_insensitive?"i":"")+(M.unicodeRegex?"u":"")+(ve?"g":""))}class de{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ve,Fe){Fe.position=this.position++,this.matchIndexes[this.matchAt]=Fe,this.regexes.push([Fe,ve]),this.matchAt+=y(ve)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ve=this.regexes.map(Fe=>Fe[1]);this.matcherRe=te(k(ve,{joinWith:"|"}),!0),this.lastIndex=0}exec(ve){this.matcherRe.lastIndex=this.lastIndex;const Fe=this.matcherRe.exec(ve);if(!Fe)return null;const Pt=Fe.findIndex((Nr,ni)=>ni>0&&Nr!==void 0),Dt=this.matchIndexes[Pt];return Fe.splice(0,Pt),Object.assign(Fe,Dt)}}class Oe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ve){if(this.multiRegexes[ve])return this.multiRegexes[ve];const Fe=new de;return this.rules.slice(ve).forEach(([Pt,Dt])=>Fe.addRule(Pt,Dt)),Fe.compile(),this.multiRegexes[ve]=Fe,Fe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ve,Fe){this.rules.push([ve,Fe]),Fe.type==="begin"&&this.count++}exec(ve){const Fe=this.getMatcher(this.regexIndex);Fe.lastIndex=this.lastIndex;let Pt=Fe.exec(ve);if(this.resumingScanAtSamePosition()&&!(Pt&&Pt.index===this.lastIndex)){const Dt=this.getMatcher(0);Dt.lastIndex=this.lastIndex+1,Pt=Dt.exec(ve)}return Pt&&(this.regexIndex+=Pt.position+1,this.regexIndex===this.count&&this.considerAll()),Pt}}function ut(ke){const ve=new Oe;return ke.contains.forEach(Fe=>ve.addRule(Fe.begin,{rule:Fe,type:"begin"})),ke.terminatorEnd&&ve.addRule(ke.terminatorEnd,{type:"end"}),ke.illegal&&ve.addRule(ke.illegal,{type:"illegal"}),ve}function ct(ke,ve){const Fe=ke;if(ke.isCompiled)return Fe;[Ce,et,pt,Lt].forEach(Dt=>Dt(ke,ve)),M.compilerExtensions.forEach(Dt=>Dt(ke,ve)),ke.__beforeBegin=null,[He,je,ot].forEach(Dt=>Dt(ke,ve)),ke.isCompiled=!0;let Pt=null;return typeof ke.keywords=="object"&&ke.keywords.$pattern&&(ke.keywords=Object.assign({},ke.keywords),Pt=ke.keywords.$pattern,delete ke.keywords.$pattern),Pt=Pt||/\w+/,ke.keywords&&(ke.keywords=fr(ke.keywords,M.case_insensitive)),Fe.keywordPatternRe=te(Pt,!0),ve&&(ke.begin||(ke.begin=/\B|\b/),Fe.beginRe=te(Fe.begin),!ke.end&&!ke.endsWithParent&&(ke.end=/\B|\b/),ke.end&&(Fe.endRe=te(Fe.end)),Fe.terminatorEnd=f(Fe.end)||"",ke.endsWithParent&&ve.terminatorEnd&&(Fe.terminatorEnd+=(ke.end?"|":"")+ve.terminatorEnd)),ke.illegal&&(Fe.illegalRe=te(ke.illegal)),ke.contains||(ke.contains=[]),ke.contains=[].concat(...ke.contains.map(function(Dt){return Xe(Dt==="self"?ke:Dt)})),ke.contains.forEach(function(Dt){ct(Dt,Fe)}),ke.starts&&ct(ke.starts,ve),Fe.matcher=ut(Fe),Fe}if(M.compilerExtensions||(M.compilerExtensions=[]),M.contains&&M.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return M.classNameAliases=r(M.classNameAliases||{}),ct(M)}function ye(M){return M?M.endsWithParent||ye(M.starts):!1}function Xe(M){return M.variants&&!M.cachedVariants&&(M.cachedVariants=M.variants.map(function(te){return r(M,{variants:null},te)})),M.cachedVariants?M.cachedVariants:ye(M)?r(M,{starts:M.starts?r(M.starts):null}):Object.isFrozen(M)?r(M):M}var Yt="11.11.1";class Ot extends Error{constructor(te,de){super(te),this.name="HTMLInjectionError",this.html=de}}const Rt=n,pn=r,qe=Symbol("nomatch"),Bt=7,zt=function(M){const te=Object.create(null),de=Object.create(null),Oe=[];let ut=!0;const ct="Could not find the language '{}', did you forget to load/include a language module?",ke={disableAutodetect:!0,name:"Plain text",contains:[]};let ve={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function Fe(ue){return ve.noHighlightRe.test(ue)}function Pt(ue){let Re=ue.className+" ";Re+=ue.parentNode?ue.parentNode.className:"";const Ze=ve.languageDetectRe.exec(Re);if(Ze){const ht=Tn(Ze[1]);return ht||(nn(ct.replace("{}",Ze[1])),nn("Falling back to no-highlight mode for this block.",ue)),ht?Ze[1]:"no-highlight"}return Re.split(/\s+/).find(ht=>Fe(ht)||Tn(ht))}function Dt(ue,Re,Ze){let ht="",Nt="";typeof Re=="object"?(ht=ue,Ze=Re.ignoreIllegals,Nt=Re.language):(Ft("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ft("10.7.0",`Please use highlight(code, options) instead.
22
+ https://github.com/highlightjs/highlight.js/issues/2277`),Nt=ue,ht=Re),Ze===void 0&&(Ze=!0);const z={code:ht,language:Nt};So("before:highlight",z);const ee=z.result?z.result:Nr(z.language,z.code,Ze);return ee.code=z.code,So("after:highlight",ee),ee}function Nr(ue,Re,Ze,ht){const Nt=Object.create(null);function z(pe,Ie){return pe.keywords[Ie]}function ee(){if(!ze.keywords){lt.addText(dt);return}let pe=0;ze.keywordPatternRe.lastIndex=0;let Ie=ze.keywordPatternRe.exec(dt),Ge="";for(;Ie;){Ge+=dt.substring(pe,Ie.index);const ft=_t.case_insensitive?Ie[0].toLowerCase():Ie[0],Zt=z(ze,ft);if(Zt){const[gr,E1]=Zt;if(lt.addText(Ge),Ge="",Nt[ft]=(Nt[ft]||0)+1,Nt[ft]<=Bt&&(to+=E1),gr.startsWith("_"))Ge+=Ie[0];else{const S1=_t.classNameAliases[gr]||gr;$e(Ie[0],S1)}}else Ge+=Ie[0];pe=ze.keywordPatternRe.lastIndex,Ie=ze.keywordPatternRe.exec(dt)}Ge+=dt.substring(pe),lt.addText(Ge)}function oe(){if(dt==="")return;let pe=null;if(typeof ze.subLanguage=="string"){if(!te[ze.subLanguage]){lt.addText(dt);return}pe=Nr(ze.subLanguage,dt,!0,Ao[ze.subLanguage]),Ao[ze.subLanguage]=pe._top}else pe=ri(dt,ze.subLanguage.length?ze.subLanguage:null);ze.relevance>0&&(to+=pe.relevance),lt.__addSublanguage(pe._emitter,pe.language)}function me(){ze.subLanguage!=null?oe():ee(),dt=""}function $e(pe,Ie){pe!==""&&(lt.startScope(Ie),lt.addText(pe),lt.endScope())}function tt(pe,Ie){let Ge=1;const ft=Ie.length-1;for(;Ge<=ft;){if(!pe._emit[Ge]){Ge++;continue}const Zt=_t.classNameAliases[pe[Ge]]||pe[Ge],gr=Ie[Ge];Zt?$e(gr,Zt):(dt=gr,ee(),dt=""),Ge++}}function Ut(pe,Ie){return pe.scope&&typeof pe.scope=="string"&&lt.openNode(_t.classNameAliases[pe.scope]||pe.scope),pe.beginScope&&(pe.beginScope._wrap?($e(dt,_t.classNameAliases[pe.beginScope._wrap]||pe.beginScope._wrap),dt=""):pe.beginScope._multi&&(tt(pe.beginScope,Ie),dt="")),ze=Object.create(pe,{parent:{value:ze}}),ze}function on(pe,Ie,Ge){let ft=x(pe.endRe,Ge);if(ft){if(pe["on:end"]){const Zt=new t(pe);pe["on:end"](Ie,Zt),Zt.isMatchIgnored&&(ft=!1)}if(ft){for(;pe.endsParent&&pe.parent;)pe=pe.parent;return pe}}if(pe.endsWithParent)return on(pe.parent,Ie,Ge)}function Pn(pe){return ze.matcher.regexIndex===0?(dt+=pe[0],1):(Ga=!0,0)}function sn(pe){const Ie=pe[0],Ge=pe.rule,ft=new t(Ge),Zt=[Ge.__beforeBegin,Ge["on:begin"]];for(const gr of Zt)if(gr&&(gr(pe,ft),ft.isMatchIgnored))return Pn(Ie);return Ge.skip?dt+=Ie:(Ge.excludeBegin&&(dt+=Ie),me(),!Ge.returnBegin&&!Ge.excludeBegin&&(dt=Ie)),Ut(Ge,pe),Ge.returnBegin?0:Ie.length}function mt(pe){const Ie=pe[0],Ge=Re.substring(pe.index),ft=on(ze,pe,Ge);if(!ft)return qe;const Zt=ze;ze.endScope&&ze.endScope._wrap?(me(),$e(Ie,ze.endScope._wrap)):ze.endScope&&ze.endScope._multi?(me(),tt(ze.endScope,pe)):Zt.skip?dt+=Ie:(Zt.returnEnd||Zt.excludeEnd||(dt+=Ie),me(),Zt.excludeEnd&&(dt=Ie));do ze.scope&&lt.closeNode(),!ze.skip&&!ze.subLanguage&&(to+=ze.relevance),ze=ze.parent;while(ze!==ft.parent);return ft.starts&&Ut(ft.starts,pe),Zt.returnEnd?0:Ie.length}function De(){const pe=[];for(let Ie=ze;Ie!==_t;Ie=Ie.parent)Ie.scope&&pe.unshift(Ie.scope);pe.forEach(Ie=>lt.openNode(Ie))}let Et={};function nt(pe,Ie){const Ge=Ie&&Ie[0];if(dt+=pe,Ge==null)return me(),0;if(Et.type==="begin"&&Ie.type==="end"&&Et.index===Ie.index&&Ge===""){if(dt+=Re.slice(Ie.index,Ie.index+1),!ut){const ft=new Error(`0 width match regex (${ue})`);throw ft.languageName=ue,ft.badRule=Et.rule,ft}return 1}if(Et=Ie,Ie.type==="begin")return sn(Ie);if(Ie.type==="illegal"&&!Ze){const ft=new Error('Illegal lexeme "'+Ge+'" for mode "'+(ze.scope||"<unnamed>")+'"');throw ft.mode=ze,ft}else if(Ie.type==="end"){const ft=mt(Ie);if(ft!==qe)return ft}if(Ie.type==="illegal"&&Ge==="")return dt+=`
23
+ `,1;if(qa>1e5&&qa>Ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return dt+=Ge,Ge.length}const _t=Tn(ue);if(!_t)throw Wt(ct.replace("{}",ue)),new Error('Unknown language: "'+ue+'"');const Co=qt(_t);let ko="",ze=ht||Co;const Ao={},lt=new ve.__emitter(ve);De();let dt="",to=0,Yn=0,qa=0,Ga=!1;try{if(_t.__emitTokens)_t.__emitTokens(Re,lt);else{for(ze.matcher.considerAll();;){qa++,Ga?Ga=!1:ze.matcher.considerAll(),ze.matcher.lastIndex=Yn;const pe=ze.matcher.exec(Re);if(!pe)break;const Ie=Re.substring(Yn,pe.index),Ge=nt(Ie,pe);Yn=pe.index+Ge}nt(Re.substring(Yn))}return lt.finalize(),ko=lt.toHTML(),{language:ue,value:ko,relevance:to,illegal:!1,_emitter:lt,_top:ze}}catch(pe){if(pe.message&&pe.message.includes("Illegal"))return{language:ue,value:Rt(Re),illegal:!0,relevance:0,_illegalBy:{message:pe.message,index:Yn,context:Re.slice(Yn-100,Yn+100),mode:pe.mode,resultSoFar:ko},_emitter:lt};if(ut)return{language:ue,value:Rt(Re),illegal:!1,relevance:0,errorRaised:pe,_emitter:lt,_top:ze};throw pe}}function ni(ue){const Re={value:Rt(ue),illegal:!1,relevance:0,_top:ke,_emitter:new ve.__emitter(ve)};return Re._emitter.addText(ue),Re}function ri(ue,Re){Re=Re||ve.languages||Object.keys(te);const Ze=ni(ue),ht=Re.filter(Tn).filter(cs).map(me=>Nr(me,ue,!1));ht.unshift(Ze);const Nt=ht.sort((me,$e)=>{if(me.relevance!==$e.relevance)return $e.relevance-me.relevance;if(me.language&&$e.language){if(Tn(me.language).supersetOf===$e.language)return 1;if(Tn($e.language).supersetOf===me.language)return-1}return 0}),[z,ee]=Nt,oe=z;return oe.secondBest=ee,oe}function Fa(ue,Re,Ze){const ht=Re&&de[Re]||Ze;ue.classList.add("hljs"),ue.classList.add(`language-${ht}`)}function xo(ue){let Re=null;const Ze=Pt(ue);if(Fe(Ze))return;if(So("before:highlightElement",{el:ue,language:Ze}),ue.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ue);return}if(ue.children.length>0&&(ve.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ue)),ve.throwUnescapedHTML))throw new Ot("One of your code blocks includes unescaped HTML.",ue.innerHTML);Re=ue;const ht=Re.textContent,Nt=Ze?Dt(ht,{language:Ze,ignoreIllegals:!0}):ri(ht);ue.innerHTML=Nt.value,ue.dataset.highlighted="yes",Fa(ue,Ze,Nt.language),ue.result={language:Nt.language,re:Nt.relevance,relevance:Nt.relevance},Nt.secondBest&&(ue.secondBest={language:Nt.secondBest.language,relevance:Nt.secondBest.relevance}),So("after:highlightElement",{el:ue,result:Nt,text:ht})}function Ba(ue){ve=pn(ve,ue)}const za=()=>{eo(),Ft("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function wo(){eo(),Ft("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let xn=!1;function eo(){function ue(){eo()}if(document.readyState==="loading"){xn||window.addEventListener("DOMContentLoaded",ue,!1),xn=!0;return}document.querySelectorAll(ve.cssSelector).forEach(xo)}function _o(ue,Re){let Ze=null;try{Ze=Re(M)}catch(ht){if(Wt("Language definition for '{}' could not be registered.".replace("{}",ue)),ut)Wt(ht);else throw ht;Ze=ke}Ze.name||(Ze.name=ue),te[ue]=Ze,Ze.rawDefinition=Re.bind(null,M),Ze.aliases&&Mr(Ze.aliases,{languageName:ue})}function Ua(ue){delete te[ue];for(const Re of Object.keys(de))de[Re]===ue&&delete de[Re]}function Eo(){return Object.keys(te)}function Tn(ue){return ue=(ue||"").toLowerCase(),te[ue]||te[de[ue]]}function Mr(ue,{languageName:Re}){typeof ue=="string"&&(ue=[ue]),ue.forEach(Ze=>{de[Ze.toLowerCase()]=Re})}function cs(ue){const Re=Tn(ue);return Re&&!Re.disableAutodetect}function ls(ue){ue["before:highlightBlock"]&&!ue["before:highlightElement"]&&(ue["before:highlightElement"]=Re=>{ue["before:highlightBlock"](Object.assign({block:Re.el},Re))}),ue["after:highlightBlock"]&&!ue["after:highlightElement"]&&(ue["after:highlightElement"]=Re=>{ue["after:highlightBlock"](Object.assign({block:Re.el},Re))})}function Ka(ue){ls(ue),Oe.push(ue)}function ja(ue){const Re=Oe.indexOf(ue);Re!==-1&&Oe.splice(Re,1)}function So(ue,Re){const Ze=ue;Oe.forEach(function(ht){ht[Ze]&&ht[Ze](Re)})}function Ha(ue){return Ft("10.7.0","highlightBlock will be removed entirely in v12.0"),Ft("10.7.0","Please use highlightElement now."),xo(ue)}Object.assign(M,{highlight:Dt,highlightAuto:ri,highlightAll:eo,highlightElement:xo,highlightBlock:Ha,configure:Ba,initHighlighting:za,initHighlightingOnLoad:wo,registerLanguage:_o,unregisterLanguage:Ua,listLanguages:Eo,getLanguage:Tn,registerAliases:Mr,autoDetection:cs,inherit:pn,addPlugin:Ka,removePlugin:ja}),M.debugMode=function(){ut=!1},M.safeMode=function(){ut=!0},M.versionString=Yt,M.regex={concat:m,lookahead:h,either:v,optional:g,anyNumberOfTimes:p};for(const ue in Me)typeof Me[ue]=="object"&&e(Me[ue]);return Object.assign(M,Me),M},rn=zt({});return rn.newInstance=()=>zt({}),bu=rn,rn.HighlightJS=rn,rn.default=rn,bu}var yu,ug;function rD(){if(ug)return yu;ug=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,c,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return yu=e,yu}var vu,cg;function oD(){if(cg)return vu;cg=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},f={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=t.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),m={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},b=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],v=["true","false"],y={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],C=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:b,literal:v,built_in:[...x,...E,"set","shopt",...k,...C]},contains:[g,t.SHEBANG(),m,h,s,a,y,u,c,l,f,r]}}return vu=e,vu}var xu,lg;function iD(){if(lg)return xu;lg=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",v={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[h,u,r,t.C_BLOCK_COMMENT_MODE,f,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:y.concat([{begin:/\(/,end:/\)/,keywords:v,contains:y.concat(["self"]),relevance:0}]),relevance:0},E={begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:v,relevance:0},{begin:g,returnBegin:!0,contains:[t.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,f,u,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,f,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"</",contains:[].concat(x,E,y,[h,{begin:t.IDENT_RE+"::",keywords:v},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:h,strings:l,keywords:v}}}return xu=e,xu}var wu,dg;function sD(){if(dg)return wu;dg=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:b,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},T=[C,h,u,r,t.C_BLOCK_COMMENT_MODE,f,l],S={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:T.concat([{begin:/\(/,end:/\)/,keywords:k,contains:T.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:k,relevance:0},{begin:g,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,f,u,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,f,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(S,I,C,T,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:k,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return wu=e,wu}var _u,fg;function aD(){if(fg)return _u;fg=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},f={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=t.inherit(f,{illegal:/\n/}),p={className:"subst",begin:/\{/,end:/\}/,keywords:a},g=t.inherit(p,{illegal:/\n/}),m={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,g]},b={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]},v=t.inherit(b,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]});p.contains=[b,m,f,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],g.contains=[v,m,h,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[l,b,m,f,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[y,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},k]}}return _u=e,_u}var Eu,gg;function uD(){if(gg)return Eu;gg=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,f=e(c),h={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},p="and or not only",g=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",b=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[f.BLOCK_COMMENT,h,f.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,relevance:0},f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[f.BLOCK_COMMENT,f.HEXCOLOR,f.IMPORTANT,f.CSS_NUMBER_MODE,...b,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...b,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},f.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:g},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...b,f.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return Eu=u,Eu}var Su,pg;function cD(){if(pg)return Su;pg=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},f={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=t.inherit(l,{contains:[]}),p=t.inherit(f,{contains:[]});l.contains.push(p),f.contains.push(h);let g=[r,c];return[l,f,h,p].forEach(y=>{y.contains=y.contains.concat(g)}),g=g.concat(l,f),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},r,s,l,f,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return Su=e,Su}var Cu,hg;function lD(){if(hg)return Cu;hg=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return Cu=e,Cu}var ku,mg;function dD(){if(mg)return ku;mg=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],f={className:"subst",begin:/#\{/,end:/\}/,keywords:a},h={className:"string",contains:[t.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,f]})]}]},p="[1-9](_?[0-9])*|0",g="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},T=[h,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[b]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:r}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,f],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);f.contains=T,b.contains=T;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:T}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(L).concat(l).concat(T)}}return ku=e,ku}var Au,bg;function fD(){if(bg)return Au;bg=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return Au=e,Au}var Tu,yg;function gD(){if(yg)return Tu;yg=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return Tu=e,Tu}var Du,vg;function pD(){if(vg)return Du;vg=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,f=/'[^']*'/,h=n.either(c,l,f),p=n.concat(h,"(\\s*\\.\\s*",h,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:p,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return Du=e,Du}var Iu,xg;function hD(){if(xg)return Iu;xg=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),g={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:g,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[b,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:g,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[m,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,m]}}return Iu=i,Iu}var Ou,wg;function mD(){if(wg)return Ou;wg=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const l=c.regex,f=(X,{after:W})=>{const ge="</"+X[0].slice(1);return X.input.indexOf(ge,W)!==-1},h=e,p={begin:"<>",end:"</>"},g=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,W)=>{const ge=X[0].length+X.index,Me=X.input[ge];if(Me==="<"||Me===","){W.ignoreMatch();return}Me===">"&&(f(X,{after:ge})||W.ignoreMatch());let ce;const Ce=X.input.substring(ge);if(ce=Ce.match(/^\s*=/)){W.ignoreMatch();return}if((ce=Ce.match(/^\s+extends\s+/))&&ce.index===0){W.ignoreMatch();return}}},b={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",y=`\\.(${v})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${x})((${y})|\\.)?|(${y}))[eE][+-]?(${v})\\b`},{begin:`\\b(${x})\\b((${y})\\b|\\.)?|(${y})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:b,contains:[]},C={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,k],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,k],subLanguage:"graphql"}},I={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,k]},L={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},O=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,C,T,S,I,{match:/\$\d+/},E];k.contains=O.concat({begin:/\{/,end:/\}/,keywords:b,contains:["self"].concat(O)});const U=[].concat(L,k.contains),R=U.concat([{begin:/(\s*)\(/,end:/\)/,keywords:b,contains:["self"].concat(U)}]),B={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:R},$={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,l.concat(h,"(",l.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},N={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[B],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(X){return l.concat("(?!",X.join("|"),")")}const P={match:l.concat(/\b/,Z([...i,"super","import"].map(X=>`${X}\\s*\\(`)),h,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:l.concat(/\./,l.lookahead(l.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},B]},se="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",fe={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(se)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[B]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:b,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:N},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,C,T,S,I,L,{match:/\$\d+/},E,N,{scope:"attr",match:h+l.lookahead(":"),relevance:0},fe,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[L,c.REGEXP_MODE,{className:"function",begin:se,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:g},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[B,c.inherit(c.TITLE_MODE,{begin:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[B]},P,K,$,Y,{match:/\$[(.]/}]}}return Ou=u,Ou}var Ru,_g;function bD(){if(_g)return Ru;_g=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return Ru=e,Ru}var Nu,Eg;function yD(){if(Eg)return Nu;Eg=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},f={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(f);const h={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(f,{className:"string"}),"self"]}]},g=r,m=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),b={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=b;return v.variants[1].contains=[b],b.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,m,a,u,h,p,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[b,i.C_LINE_COMMENT_MODE,m],relevance:0},i.C_LINE_COMMENT_MODE,m,h,p,f,i.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},h,p]},f,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
24
+ `},g]}}return Nu=o,Nu}var Mu,Sg;function vD(){if(Sg)return Mu;Sg=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const f=e(l),h=u,p="and or not only",g="[\\w-]+",m="("+g+"|@\\{"+g+"\\})",b=[],v=[],y=function(U){return{className:"string",begin:"~?"+U+".*?"+U}},x=function(U,R,B){return{className:U,begin:R,relevance:B}},E={$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},k={begin:"\\(",end:"\\)",contains:v,keywords:E,relevance:0};v.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,y("'"),y('"'),f.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},f.HEXCOLOR,k,x("variable","@@?"+g,10),x("variable","@\\{"+g+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:g+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},f.IMPORTANT,{beginKeywords:"and not"},f.FUNCTION_DISPATCH);const C=v.concat({begin:/\{/,end:/\}/,contains:b}),T={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(v)},S={begin:m+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:v}}]},I={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:v,relevance:0}},A={className:"variable",variants:[{begin:"@"+g+"\\s*:",relevance:15},{begin:"@"+g}],starts:{end:"[;}]",returnEnd:!0,contains:C}},L={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:m,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,T,x("keyword","all\\b"),x("variable","@\\{"+g+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},f.CSS_NUMBER_MODE,x("selector-tag",m,0),x("selector-id","#"+m),x("selector-class","\\."+m,0),x("selector-tag","&",0),f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:C},{begin:"!important"},f.FUNCTION_DISPATCH]},O={begin:g+`:(:)?(${h.join("|")})`,returnBegin:!0,contains:[L]};return b.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,I,A,O,S,L,T,f.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:b}}return Mu=c,Mu}var Lu,Cg;function xD(){if(Cg)return Lu;Cg=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return Lu=e,Lu}var $u,kg;function wD(){if(kg)return $u;kg=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return $u=e,$u}var Pu,Ag;function _D(){if(Ag)return Pu;Ag=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},f=[t.BACKSLASH_ESCAPE,s,c],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(b,v,y="\\1")=>{const x=y==="\\1"?y:n.concat(y,v);return n.concat(n.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,y,o)},g=(b,v,y)=>n.concat(n.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,y,o),m=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:p("s|tr|y",n.either(...h,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:g("(?:m|qr)?",/\//,/\//)},{begin:g("m|qr",n.either(...h,{capture:!0}),/\1/)},{begin:g("m|qr",/\(/,/\)/)},{begin:g("m|qr",/\[/,/\]/)},{begin:g("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=m,a.contains=m,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:m}}return Pu=e,Pu}var Fu,Tg;function ED(){if(Tg)return Fu;Tg=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return Fu=e,Fu}var Bu,Dg;function SD(){if(Dg)return Bu;Dg=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),f=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(B,$)=>{$.data._beginMatch=B[1]||B[2]},"on:end":(B,$)=>{$.data._beginMatch!==B[1]&&$.ignoreMatch()}},p=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[
25
+ ]`,m={scope:"string",variants:[f,l,h,p]},b={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},v=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],k={keyword:y,literal:(B=>{const $=[];return B.forEach(N=>{$.push(N),N.toLowerCase()===N?$.push(N.toUpperCase()):$.push(N.toLowerCase())}),$})(v),built_in:x},C=B=>B.map($=>$.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",C(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},S=n.concat(o,"\\b(?!\\()"),I={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},A={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[A,a,I,t.C_BLOCK_COMMENT_MODE,m,b,T]},O={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",C(y).join("\\b|"),"|",C(x).join("\\b|"),"\\b)"),o,n.concat(g,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(O);const U=[A,I,t.C_BLOCK_COMMENT_MODE,m,b,T],R={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...U]},...U,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:k,contains:[R,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,O,I,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},T,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:k,contains:["self",R,a,I,t.C_BLOCK_COMMENT_MODE,m,b]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},m,b]}}return Bu=e,Bu}var zu,Ig;function CD(){if(Ig)return zu;Ig=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return zu=e,zu}var Uu,Og;function kD(){if(Og)return Uu;Og=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Uu=e,Uu}var Ku,Rg;function AD(){if(Rg)return Ku;Rg=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},f={begin:/\{\{/,relevance:0},h={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,f,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,f,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,f,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,f,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,m=`\\b|${o.join("|")}`,b={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${g}))[eE][+-]?(${p})[jJ]?(?=${m})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${p})[jJ](?=${m})`}]},v={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,b,h,t.HASH_COMMENT_MODE]}]};return l.contains=[h,b,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,b,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,v,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[b,y,h]}]}}return Ku=e,Ku}var ju,Ng;function TD(){if(Ng)return ju;Ng=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return ju=e,ju}var Hu,Mg;function DD(){if(Mg)return Hu;Mg=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Hu=e,Hu}var qu,Lg;function ID(){if(Lg)return qu;Lg=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],f=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:f,keyword:u,literal:c,built_in:l},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:f}},{className:"punctuation",begin:"->"},s]}}return qu=e,qu}var Gu,$g;function OD(){if($g)return Gu;$g=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),f=s,h=i,p="@[a-z-]+",g="and or not only",b={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+h.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+f.join("|")+")"},b,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,b,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:p,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},contains:[{begin:p,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},b,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return Gu=u,Gu}var Vu,Pg;function RD(){if(Pg)return Vu;Pg=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Vu=e,Vu}var Wu,Fg;function ND(){if(Fg)return Wu;Fg=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=f,m=[...l,...c].filter(C=>!f.includes(C)),b={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:n.concat(/\b/,n.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function x(C){return n.concat(/\b/,n.either(...C.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:x(p),relevance:0};function k(C,{exceptions:T,when:S}={}){const I=S;return T=T||[],C.map(A=>A.match(/\|\d+$/)||T.includes(A)?A:I(A)?`${A}|0`:A)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(m,{when:C=>C.length<3}),literal:s,type:u,built_in:h},contains:[{scope:"type",match:x(a)},E,y,b,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,v]}}return Wu=e,Wu}var Yu,Bg;function MD(){if(Bg)return Yu;Bg=1;function e(S){return S?typeof S=="string"?S:S.source:null}function t(S){return n("(?=",S,")")}function n(...S){return S.map(A=>e(A)).join("")}function r(S){const I=S[S.length-1];return typeof I=="object"&&I.constructor===Object?(S.splice(S.length-1,1),I):{}}function o(...S){return"("+(r(S).capture?"":"?:")+S.map(L=>e(L)).join("|")+")"}const i=S=>n(/\b/,S,/\w$/.test(S)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],f=["assignment","associativity","higherThan","left","lowerThan","none","right"],h=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],g=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),m=o(g,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=n(g,m,"*"),v=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),y=o(v,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(v,y,"*"),E=n(/[A-Z]/,y,"*"),k=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,x,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],C=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function T(S){const I={match:/\s+/,relevance:0},A=S.COMMENT("/\\*","\\*/",{contains:["self"]}),L=[S.C_LINE_COMMENT_MODE,A],O={match:[/\./,o(...s,...a)],className:{2:"keyword"}},U={match:n(/\./,o(...c)),relevance:0},R=c.filter(qe=>typeof qe=="string").concat(["_|0"]),B=c.filter(qe=>typeof qe!="string").concat(u).map(i),$={variants:[{className:"keyword",match:o(...B,...a)}]},N={$pattern:o(/\b\w+/,/#\w+/),keyword:R.concat(h),literal:l},G=[O,U,$],j={match:n(/\./,o(...p)),relevance:0},K={className:"built_in",match:n(/\b/,o(...p),/(?=\()/)},Z=[j,K],P={match:/->/,relevance:0},H={className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${m})+`}]},Y=[P,H],se="([0-9]_*)+",fe="([0-9a-fA-F]_*)+",X={className:"number",relevance:0,variants:[{match:`\\b(${se})(\\.(${se}))?([eE][+-]?(${se}))?\\b`},{match:`\\b0x(${fe})(\\.(${fe}))?([pP][+-]?(${se}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},W=(qe="")=>({className:"subst",variants:[{match:n(/\\/,qe,/[0\\tnr"']/)},{match:n(/\\/,qe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ge=(qe="")=>({className:"subst",match:n(/\\/,qe,/[\t ]*(?:[\r\n]|\r\n)/)}),Me=(qe="")=>({className:"subst",label:"interpol",begin:n(/\\/,qe,/\(/),end:/\)/}),ce=(qe="")=>({begin:n(qe,/"""/),end:n(/"""/,qe),contains:[W(qe),ge(qe),Me(qe)]}),Ce=(qe="")=>({begin:n(qe,/"/),end:n(/"/,qe),contains:[W(qe),Me(qe)]}),He={className:"string",variants:[ce(),ce("#"),ce("##"),ce("###"),Ce(),Ce("#"),Ce("##"),Ce("###")]},je=[S.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[S.BACKSLASH_ESCAPE]}],et={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:je},ot=qe=>{const Bt=n(qe,/\//),zt=n(/\//,qe);return{begin:Bt,end:zt,contains:[...je,{scope:"comment",begin:`#(?!.*${zt})`,end:/$/}]}},Lt={scope:"regexp",variants:[ot("###"),ot("##"),ot("#"),et]},$t={match:n(/`/,x,/`/)},gn={className:"variable",match:/\$\d+/},fr={className:"variable",match:`\\$${y}+`},Ln=[$t,gn,fr],vn={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:C,contains:[...Y,X,He]}]}},kt={scope:"keyword",match:n(/@/,o(...k),t(o(/\(/,/\s+/)))},Wt={scope:"meta",match:n(/@/,x)},nn=[vn,kt,Wt],Ft={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,y,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(E)),relevance:0}]},$n={begin:/</,end:/>/,keywords:N,contains:[...L,...G,...nn,P,Ft]};Ft.contains.push($n);const Rr={match:n(x,/\s*:/),keywords:"_|0",relevance:0},le={begin:/\(/,end:/\)/,relevance:0,keywords:N,contains:["self",Rr,...L,Lt,...G,...Z,...Y,X,He,...Ln,...nn,Ft]},Ee={begin:/</,end:/>/,keywords:"repeat each",contains:[...L,Ft]},Te={begin:o(t(n(x,/\s*:/)),t(n(x,/\s+/,x,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:x}]},pt={begin:/\(/,end:/\)/,keywords:N,contains:[Te,...L,...G,...Y,X,He,...nn,Ft,le],endsParent:!0,illegal:/["']/},qt={match:[/(func|macro)/,/\s+/,o($t.match,x,b)],className:{1:"keyword",3:"title.function"},contains:[Ee,pt,I],illegal:[/\[/,/%/]},ye={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ee,pt,I],illegal:/\[|%/},Xe={match:[/operator/,/\s+/,b],className:{1:"keyword",3:"title"}},Yt={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[Ft],keywords:[...f,...l],end:/}/},Ot={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Rt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},pn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:N,contains:[Ee,...G,{begin:/:/,end:/\{/,keywords:N,contains:[{scope:"title.class.inherited",match:E},...G],relevance:0}]};for(const qe of He.variants){const Bt=qe.contains.find(rn=>rn.label==="interpol");Bt.keywords=N;const zt=[...G,...Z,...Y,X,He,...Ln];Bt.contains=[...zt,{begin:/\(/,end:/\)/,contains:["self",...zt]}]}return{name:"Swift",keywords:N,contains:[...L,qt,ye,Ot,Rt,pn,Xe,Yt,{beginKeywords:"import",end:/$/,contains:[...L],relevance:0},Lt,...G,...Z,...Y,X,He,...Ln,...nn,Ft,le]}}return Yu=T,Yu}var Zu,zg;function LD(){if(zg)return Zu;zg=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},m={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},b={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},v=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},p,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,b,s,a],y=[...v];return y.pop(),y.push(u),g.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}return Zu=e,Zu}var Xu,Ug;function $D(){if(Ug)return Xu;Ug=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const f=l.regex,h=(W,{after:ge})=>{const Me="</"+W[0].slice(1);return W.input.indexOf(Me,ge)!==-1},p=e,g={begin:"<>",end:"</>"},m=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,ge)=>{const Me=W[0].length+W.index,ce=W.input[Me];if(ce==="<"||ce===","){ge.ignoreMatch();return}ce===">"&&(h(W,{after:Me})||ge.ignoreMatch());let Ce;const He=W.input.substring(Me);if(Ce=He.match(/^\s*=/)){ge.ignoreMatch();return}if((Ce=He.match(/^\s+extends\s+/))&&Ce.index===0){ge.ignoreMatch();return}}},v={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",x=`\\.(${y})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",k={className:"number",variants:[{begin:`(\\b(${E})((${x})|\\.)?|(${x}))[eE][+-]?(${y})\\b`},{begin:`\\b(${E})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:v,contains:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"css"}},I={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},A={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,C]},O={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:p+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},U=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,T,S,I,A,{match:/\$\d+/},k];C.contains=U.concat({begin:/\{/,end:/\}/,keywords:v,contains:["self"].concat(U)});const R=[].concat(O,C.contains),B=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:v,contains:["self"].concat(R)}]),$={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:B},N={variants:[{match:[/class/,/\s+/,p,/\s+/,/extends/,/\s+/,f.concat(p,"(",f.concat(/\./,p),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,p],scope:{1:"keyword",3:"title.class"}}]},G={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},j={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,p,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[$],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(W){return f.concat("(?!",W.join("|"),")")}const H={match:f.concat(/\b/,P([...i,"super","import"].map(W=>`${W}\\s*\\(`)),p,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},Y={begin:f.concat(/\./,f.lookahead(f.concat(p,/(?![0-9A-Za-z$_(])/))),end:p,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},se={match:[/get|set/,/\s+/,p,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},$]},fe="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",X={match:[/const|var|let/,/\s+/,p,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(fe)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[$]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:v,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:G},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),j,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,T,S,I,A,O,{match:/\$\d+/},k,G,{scope:"attr",match:p+f.lookahead(":"),relevance:0},X,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,l.REGEXP_MODE,{className:"function",begin:fe,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:m},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[$,l.inherit(l.TITLE_MODE,{begin:p,className:"title.function"})]},{match:/\.\.\./,relevance:0},Y,{match:"\\$"+p,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[$]},H,Z,N,se,{match:/\$[(.]/}]}}function c(l){const f=l.regex,h=u(l),p=e,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],m={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},b={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[h.exports.CLASS_REFERENCE]},v={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},y=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(y),literal:n,built_in:a.concat(g),"variable.language":s},E={className:"meta",begin:"@"+p},k=(I,A,L)=>{const O=I.contains.findIndex(U=>U.label===A);if(O===-1)throw new Error("can not find mode to replace");I.contains.splice(O,1,L)};Object.assign(h.keywords,x),h.exports.PARAMS_CONTAINS.push(E);const C=h.contains.find(I=>I.scope==="attr"),T=Object.assign({},C,{match:f.concat(p,f.lookahead(/\s*\?:/))});h.exports.PARAMS_CONTAINS.push([h.exports.CLASS_REFERENCE,C,T]),h.contains=h.contains.concat([E,m,b,T]),k(h,"shebang",l.SHEBANG()),k(h,"use_strict",v);const S=h.contains.find(I=>I.label==="func.def");return S.relevance=0,Object.assign(h,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),h}return Xu=c,Xu}var Ju,Kg;function PD(){if(Kg)return Ju;Kg=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},h=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,f,h,p,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[p]}]}}return Ju=e,Ju}var Qu,jg;function FD(){if(jg)return Qu;jg=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},l={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,c,l,u]}}return Qu=e,Qu}var ec,Hg;function BD(){if(Hg)return ec;Hg=1;var e=nD();return e.registerLanguage("xml",rD()),e.registerLanguage("bash",oD()),e.registerLanguage("c",iD()),e.registerLanguage("cpp",sD()),e.registerLanguage("csharp",aD()),e.registerLanguage("css",uD()),e.registerLanguage("markdown",cD()),e.registerLanguage("diff",lD()),e.registerLanguage("ruby",dD()),e.registerLanguage("go",fD()),e.registerLanguage("graphql",gD()),e.registerLanguage("ini",pD()),e.registerLanguage("java",hD()),e.registerLanguage("javascript",mD()),e.registerLanguage("json",bD()),e.registerLanguage("kotlin",yD()),e.registerLanguage("less",vD()),e.registerLanguage("lua",xD()),e.registerLanguage("makefile",wD()),e.registerLanguage("perl",_D()),e.registerLanguage("objectivec",ED()),e.registerLanguage("php",SD()),e.registerLanguage("php-template",CD()),e.registerLanguage("plaintext",kD()),e.registerLanguage("python",AD()),e.registerLanguage("python-repl",TD()),e.registerLanguage("r",DD()),e.registerLanguage("rust",ID()),e.registerLanguage("scss",OD()),e.registerLanguage("shell",RD()),e.registerLanguage("sql",ND()),e.registerLanguage("swift",MD()),e.registerLanguage("yaml",LD()),e.registerLanguage("typescript",$D()),e.registerLanguage("vbnet",PD()),e.registerLanguage("wasm",FD()),e.HighlightJS=e,e.default=e,ec=e,ec}var zD=BD();const Zs=La(zD),Wn=new Rn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&Zs.getLanguage(t))try{const n=Zs.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),UD=/^<\/?(?:details|summary)>$/i,KD=/^<details\s+open\s*>$/i,jD=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function HD(e){return UD.test(e)||KD.test(e)||jD.test(e)}function e1(e){const t=Wn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=HD(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}Wn.renderer.rules.html_block=(e,t)=>e1(e[t].content);Wn.renderer.rules.html_inline=(e,t)=>e1(e[t].content);const qD=Wn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),qg=Wn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),GD=Wn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function t1(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function VD(e){return e.replace(/:\d+(?::\d+)?$/,"")}function WD(e){const n=VD(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function YD(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&WD(e)}function tc(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function Lo(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}Wn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=t1(u[1],s,i?.projectId))}return qD(e,t,n,r,o)};Wn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&YD(a[1])){const c=a[1];return tc(s,"href"),tc(s,"target"),tc(s,"rel"),Lo(s,"role","button"),Lo(s,"tabindex","0"),Lo(s,"data-file-link","true"),Lo(s,"data-file-path",c),i.fileLinkTitle&&(Lo(s,"title",i.fileLinkTitle),Lo(s,"aria-label",i.fileLinkTitle)),qg(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=t1(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([f])=>f==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return qg(e,t,n,r,o)};Wn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}">${u}</div>`}return GD(e,t,n,r,o)};Wn.use(tD,{enabled:!1,label:!1});function Yl(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),Wn.render(e,n)}function ZD(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const XD="modulepreload",JD=function(e){return"/"+e},Gg={},QD=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(c=>{if(c=JD(c),c in Gg)return;Gg[c]=!0;const l=c.endsWith(".css"),f=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=l?"stylesheet":XD,l||(h.as="script"),h.crossOrigin="",h.href=c,u&&h.setAttribute("nonce",u),document.head.appendChild(h),l)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let nc=null,Vg=Promise.resolve();const jc=new WeakMap,Ss=new WeakMap;let zo=null;const Wg=96,n1=.25,e6=8,t6=2.5;async function n6(){return nc||(nc=QD(()=>import("./mermaid.core-Dy3NGXqh.js").then(e=>e.bp),[]).then(e=>e.default)),nc}function r6(){return lh()==="dark"?"dark":"default"}function rc(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function o6(e){const t=(jc.get(e)??0)+1;return jc.set(e,t),t}function oc(e,t){return jc.get(e)===t}async function i6(e){const t=Vg.then(e,e);Vg=t.catch(()=>{}),await t}function r1(e,t,n){return Math.min(n,Math.max(t,e))}function Cs(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function Yg(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function s6(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:Yg(e.getAttribute("width"))??0,height:Yg(e.getAttribute("height"))??0}}function a6(e,t){const n=t.getBoundingClientRect();if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return 1;const r=Math.max(n.width-Wg,n.width*.5),o=Math.max(n.height-Wg,n.height*.5),i=Math.min(r/e.width,o/e.height);return r1(i,n1,t6)}function hi(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function o1(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function u6(e,t){if(o1(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function c6(e,t){zo?.close();const n=t.parentNode,r=t.nextSibling,o=t.style.width,i=t.style.height,s=document.createElement("div");s.className="mermaid-overlay",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",_("mermaid.viewerLabel"));const a=document.createElement("div");a.className="mermaid-overlay__toolbar";const u=hi("mermaid-overlay__button",_("mermaid.zoomOut"),"-"),c=hi("mermaid-overlay__button",_("mermaid.zoomIn"),"+"),l=hi("mermaid-overlay__button",_("mermaid.reset"),"1:1"),f=hi("mermaid-overlay__button",_("mermaid.close"),"x");a.append(u,c,l,f);const h=document.createElement("div");h.className="mermaid-overlay__viewport";const p=document.createElement("div");p.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),p.appendChild(t),h.appendChild(p),s.append(a,h),document.body.appendChild(s);const g=s6(t),m=a6(g,h);let b=m,v=0,y=0,x=!1,E=0,k=0,C=0,T=0;const S=()=>{p.style.transform=`translate(${Cs(v)}px, ${Cs(y)}px)`},I=()=>{g.width<=0||g.height<=0||(t.style.width=`${Cs(g.width*b)}px`,t.style.height=`${Cs(g.height*b)}px`)},A=()=>{I(),S()},L=(j,K,Z)=>{const P=h.getBoundingClientRect(),H=K===void 0?P.width/2:K-P.left,Y=Z===void 0?P.height/2:Z-P.top,se=P.width/2,fe=P.height/2,X=b;b=r1(j,n1,e6),v=H-se-(H-se-v)/X*b,y=Y-fe-(Y-fe-y)/X*b,A()},O=()=>{b=m,v=g.width>0?-(g.width*b)/2:0,y=g.height>0?-(g.height*b)/2:0,A()},U=()=>{if(document.removeEventListener("keydown",G),t.classList.remove("mermaid-overlay__svg"),t.style.width=o,t.style.height=i,n?.isConnected){const j=r?.parentNode===n?r:null;n.insertBefore(t,j)}s.remove(),zo?.close===U&&(zo=null)},R=j=>{j.preventDefault();const K=j.deltaY>0?.9:1.1;L(b*K,j.clientX,j.clientY)},B=j=>{j.button===0&&(x=!0,E=j.clientX,k=j.clientY,C=v,T=y,h.setPointerCapture(j.pointerId),h.classList.add("is-dragging"))},$=j=>{x&&(v=C+j.clientX-E,y=T+j.clientY-k,S())},N=j=>{x&&(x=!1,h.classList.remove("is-dragging"),h.hasPointerCapture(j.pointerId)&&h.releasePointerCapture(j.pointerId))},G=j=>{j.key==="Escape"&&U()};return u.addEventListener("click",()=>L(b/1.2)),c.addEventListener("click",()=>L(b*1.2)),l.addEventListener("click",O),f.addEventListener("click",U),h.addEventListener("wheel",R,{passive:!1}),h.addEventListener("pointerdown",B),h.addEventListener("pointermove",$),h.addEventListener("pointerup",N),h.addEventListener("pointercancel",N),document.addEventListener("keydown",G),zo={host:e,sourceSvg:t,close:U},O(),f.focus(),U}function l6(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=u6(n,e);if(!r)return;const{host:o}=r,i=Ss.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=hi("mermaid-fullscreen-button",_("mermaid.maximize"),"⤢"),a=()=>{const c=o1(n)&&n.isConnected?n:o.querySelector("svg");c&&c6(o,c)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{zo?.host===o&&zo.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),Ss.get(o)?.button===s&&Ss.delete(o)};Ss.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function i1(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=o6(e),n=await n6();if(!oc(e,t))return()=>{};if(await rc(),!oc(e,t))return()=>{};let r=()=>{};function o(){r(),r=l6(e)}async function i(c){const l=c.filter(f=>f.isConnected&&e.contains(f));l.length!==0&&await i6(async()=>{if(!oc(e,t))return;const f=l.filter(p=>p.isConnected&&e.contains(p));if(f.length===0)return;const h=r6();n.initialize({startOnLoad:!1,theme:h}),r(),r=()=>{},f.forEach(p=>{const g=p.getAttribute("data-mermaid-source");g&&(p.removeAttribute("data-processed"),p.textContent=g)});try{await n.run({nodes:f}),await rc(),o()}catch(p){console.error("[mermaid] render error:",p)}})}const s=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await i(s),await rc(),o();const a=()=>void i(Array.from(e.querySelectorAll(".mermaid"))),u=new window.MutationObserver(a);return u.observe(document.documentElement,{attributes:!0,attributeFilter:["data-kb-theme"]}),()=>{r(),u.disconnect()}}function d6(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function f6(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function g6(e,t,n={}){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!f6(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),f=d6(u.startContainer,e),h=_("selection.noSection"),p=f&&f.textContent?.trim()||h;i=c,t({text:c,rect:l,sectionPath:p})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const p6=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,h6=/^##\s+/,m6=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,b6=/^\d+\.\s+(.*\S)\s*$/,y6=/^\s*$/,Zg=/\s*[((]推荐[))]\s*$/,Xg=/\s*(自由文本)\s*$/,v6=/^\[(choice|confirm)\]\s*/i,x6=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,w6=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function _6(e){const t=e.split(`
26
+ `);let n=0;for(;n<t.length&&!p6.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if(h6.test(i))break;const s=k6(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>E6(i,s))}function E6(e,t){const n=v6.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=Xg.test(o),s=i?o.replace(Xg,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=S6(e.bodyLines);return{id:Jg(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=C6(e.bodyLines,t,s),u=i||a.length===0;return{id:Jg(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function S6(e){let t,n;for(const r of e){const o=r.trim(),i=x6.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=w6.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function C6(e,t,n){const r=[];let o=0;for(const i of e){if(y6.test(i))continue;const s=A6(i);if(s===null)continue;const a=Zg.test(s),u=a?s.replace(Zg,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:T6(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function k6(e){const t=m6.exec(e);return t?t[1]:null}function A6(e){const t=b6.exec(e);return t?t[1]:null}function Jg(e,t){return`q-${e}-${s1(t)}`}function T6(e,t,n){return`q-${e}-o-${t}-${s1(n)}`}function s1(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var D6=F('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const I6=36,O6=140,R6=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-I6-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-O6-8);return{top:i,left:s,visible:!0}};return d(V,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=D6();return o.$$mousedown=i=>i.preventDefault(),w(o,d(_e,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return _("selectionMenu.annotate")}}),null),w(o,d(_e,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return _("selectionMenu.explain")}}),null),Pe(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Si(o,"top",i.e=s),a!==i.t&&Si(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};yn(["mousedown"]);var N6=F('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-visible rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),M6=F('<p class="text-destructive ">');const L6=500,Pr=8,$6=e=>{const[t,n]=D(""),[r,o]=D(!1),[i,s]=D(null),[a,u]=D(0),c=()=>{const f=e.snap;if(!f)return{top:0,left:0};const h=a()||260,p=window.innerHeight,g=f.rect.bottom+Pr,m=f.rect.top-Pr-h;let b;g+h<=p-Pr?b=g:m>=Pr?b=m:b=Math.max(Pr,p-h-Pr);const v=Math.min(Math.max(Pr,f.rect.left),window.innerWidth-L6-Pr);return{top:b,left:v}};async function l(f){if(f.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(h){s(h.message)}finally{o(!1)}}}return d(V,{get when(){return Q(()=>!!e.open)()&&e.snap},get children(){var f=N6(),h=f.firstChild,p=h.firstChild,g=h.nextSibling,m=g.firstChild,b=m.nextSibling,v=b.nextSibling,y=v.nextSibling,x=y.nextSibling;x.nextSibling;var E=g.nextSibling,k=E.firstChild;return f.$$mousedown=C=>C.stopPropagation(),rr(C=>{queueMicrotask(()=>{C.offsetHeight!==a()&&u(C.offsetHeight)})},f),w(p,()=>_("annotate.title")),w(m,()=>e.snap?.sectionPath),w(g,()=>_("annotate.inSection"),v),w(g,()=>(e.snap?.text??"").slice(0,200),x),E.addEventListener("submit",l),w(E,d(Da,{get projectId(){return e.projectId},minRows:3,maxRows:3,get value(){return t()},onValueChange:n,get placeholder(){return _("annotate.placeholder")},autofocus:!0}),k),w(E,(()=>{var C=Q(()=>!!i());return()=>C()&&(()=>{var T=M6();return w(T,i),T})()})(),k),w(k,d(_e,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return _("common.cancel")}}),null),w(k,d(_e,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return Q(()=>!!r())()?_("common.submitting"):_("annotate.submit")}}),null),Pe(C=>{var T=`${c().top}px`,S=`${c().left}px`;return T!==C.e&&Si(f,"top",C.e=T),S!==C.t&&Si(f,"left",C.t=S),C},{e:void 0,t:void 0}),f}})};yn(["mousedown"]);var P6=F("<div><span class=text-muted-foreground></span><code class=font-mono>"),F6=F('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),B6=F('<div class="flex flex-col gap-1 text-sm">'),z6=F('<p class="text-destructive ">'),U6=F('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">');const K6={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},j6=e=>{const[t,n]=D("fix"),[r,o]=D(""),[i,s]=D(!1),[a,u]=D(null),[c,l]=D(null);re(()=>{if(!e.open){l(null);return}const g=e.anchorEl;if(!g)return;const m=g.getBoundingClientRect(),v=Math.max(16,Math.min(m.left,window.innerWidth-384-16));l({top:m.bottom+8,left:v})}),re(()=>{if(!e.open)return;const g=m=>{m.defaultPrevented||m.key==="Escape"&&(m.preventDefault(),p())};window.addEventListener("keydown",g),ie(()=>window.removeEventListener("keydown",g))});function f(){n("fix"),o(""),u(null)}async function h(g){g.preventDefault();const m=r().trim();if(!m){u(_("appendTask.descRequired"));return}s(!0),u(null);try{await e.onSubmit({kind:t(),description:m,sectionPath:e.sectionPath,quote:e.quote}),f(),e.onCancel()}catch(b){u(b.message)}finally{s(!1)}}function p(){e.onCancel()}return d(V,{get when(){return e.open},get children(){var g=U6(),m=g.firstChild,b=m.firstChild,v=b.firstChild,y=v.nextSibling,x=b.nextSibling,E=x.firstChild,k=E.firstChild,C=E.nextSibling;return g.$$mousedown=p,m.$$mousedown=T=>T.stopPropagation(),w(v,()=>_("appendTask.title")),w(y,()=>_("appendTask.hint")),x.addEventListener("submit",h),w(x,d(On,{class:"m-0 flex flex-col gap-1.5 border-0 p-0",get value(){return t()},onChange:T=>n(T),get disabled(){return i()},get children(){return[d(Pi,{class:"mb-1 font-medium",get children(){return _("appendTask.type")}}),Q(()=>["feat","refct","fix"].map(T=>d(cn,{value:T,class:"flex items-center gap-1.5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"cursor-pointer",get children(){return _(K6[T])}})]}})))]}}),E),w(k,()=>_("appendTask.description")),w(E,d(Da,{get projectId(){return e.projectId},minRows:5,maxRows:5,get value(){return r()},onValueChange:o,get placeholder(){return _("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return i()}}),null),w(x,d(V,{get when(){return e.sectionPath||e.quote},get children(){var T=B6();return w(T,d(V,{get when(){return e.sectionPath},get children(){var S=P6(),I=S.firstChild,A=I.nextSibling;return w(I,()=>_("appendTask.refSection")),w(A,()=>e.sectionPath),S}}),null),w(T,d(V,{get when(){return e.quote},get children(){var S=F6();return w(S,()=>e.quote?.slice(0,200)),S}}),null),T}}),C),w(x,d(V,{get when(){return a()},get children(){var T=z6();return w(T,a),T}}),C),w(C,d(_e,{type:"button",variant:"ghost",size:"sm",onClick:p,get disabled(){return i()},get children(){return _("common.cancel")}}),null),w(C,d(_e,{type:"submit",variant:"default",size:"sm",get disabled(){return i()},get children(){return[d(ia,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>Q(()=>!!i())()?_("common.submitting"):_("appendTask.submit"))]}}),null),Pe(T=>{var S=_("appendTask.title"),I=c()?{top:`${c().top}px`,left:`${c().left}px`}:void 0;return S!==T.e&&Ye(m,"aria-label",T.e=S),T.t=Go(m,I,T.t),T},{e:void 0,t:void 0}),g}})};yn(["mousedown"]);const Ds="__freeform__",H6={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},q6="accept";function G6(e){return e!==q6}function V6(e,t,n){const r=H6[t],o=(n??"").trim();if(G6(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function W6(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===Ds?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var Y6=F('<p class="text-destructive mx-3 mt-1 ">'),Z6=F('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-warning"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),Qg=F('<p class="m-0 break-words"><strong></strong>:'),X6=F("<div>"),J6=F('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),Q6=F('<em class="text-sm not-italic text-primary"> '),eI=F('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function a1(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function tI(e){const t=a1(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function nI(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-warning":"border-border":"border-border"}const rI=e=>{const t=()=>{const b={};for(const v of e.questions){if(v.kind==="confirm"){b[v.id]={note:"",confirmTop:"accept"};continue}const y=v.options.find(x=>x.recommended);b[v.id]={selectedOptionLabel:y?.label??v.options[0]?.label,note:""}}return b},[n,r]=D(t()),[o,i]=D(!1),[s,a]=D(null);function u(b,v){r(y=>({...y,[b]:{...y[b],...v}}))}function c(b,v){u(b,{selectedOptionLabel:v})}function l(b,v){u(b,{note:v})}function f(b,v){v==="accept"?u(b,{confirmTop:v,confirmIntent:void 0,confirmDrop:void 0}):u(b,{confirmTop:v})}function h(b,v){v==="dropGoal"?u(b,{confirmIntent:v}):u(b,{confirmIntent:v,confirmDrop:void 0})}function p(b,v){u(b,{confirmDrop:v})}const g=ne(()=>{const b=n();let v=0;for(const y of e.questions){const x=b[y.id];if(!x){v+=1;continue}if(y.kind==="confirm"){tI(x)||(v+=1);continue}const E=x.note??"";y.isFreeform||x.selectedOptionLabel===Ds?E.trim()||(v+=1):x.selectedOptionLabel||(v+=1)}return v});async function m(){i(!0),a(null);try{const b=n(),v=[];for(const x of e.questions){const E=b[x.id]??{note:""};if(x.kind==="confirm"){const C=a1(E);if(!C)continue;const T=V6(x,C,E.note);if(!T){a(_("questionConfirm.reasonRequired"));return}v.push(T);continue}const k=W6(x,E);k&&v.push(k)}const y={answers:v,freeformAnnotations:e.freeforms.map(x=>({sectionPath:x.sectionPath,quote:x.quote,note:x.note}))};if(y.answers.length===0&&y.freeformAnnotations.length===0){a(_("questionConfirm.noAnswers"));return}await e.onSubmit(y)}catch(b){a(b.message)}finally{i(!1)}}return(()=>{var b=Z6(),v=b.firstChild,y=v.firstChild,x=y.firstChild,E=x.nextSibling,k=E.firstChild,C=k.nextSibling;C.nextSibling;var T=v.nextSibling;return w(x,()=>_("questionConfirm.title")),w(E,()=>_("questionConfirm.unanswered"),k),w(C,g),w(E,()=>e.questions.length,null),w(v,d(_e,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:m,get children(){return[d(ia,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>Q(()=>!!o())()?_("common.submitting"):Q(()=>!!e.running)()?_("questionConfirm.running"):_("questionConfirm.submitAll"))]}}),null),w(b,d(V,{get when(){return s()},get children(){var S=Y6();return w(S,s),S}}),T),w(T,d(at,{get each(){return e.questions},children:S=>{const I=()=>n()[S.id]??{note:""},A=()=>S.kind!=="confirm"&&(S.isFreeform||I().selectedOptionLabel===Ds),L=()=>S.kind==="confirm"&&I().confirmTop==="reject";return(()=>{var O=J6(),U=O.firstChild;return w(U,()=>S.text),w(O,d(V,{get when(){return S.kind==="choice"},get children(){return d(On,{class:"m-0 flex flex-col gap-1 p-0",get value(){return I().selectedOptionLabel??""},onChange:R=>c(S.id,R),get children(){return[d(at,{get each(){return S.options},children:R=>d(cn,{get value(){return R.label},class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"min-w-0 cursor-pointer break-words",get children(){return[Q(()=>R.label),d(V,{get when(){return R.recommended},get children(){var B=Q6();return B.firstChild,w(B,()=>_("questionConfirm.recommended"),null),B}})]}})]}})}),d(cn,{value:Ds,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"qcp-option-freeform cursor-pointer",get children(){return _("questionConfirm.freeformLabel")}})]}})]}})}}),null),w(O,d(V,{get when(){return S.kind==="confirm"},get children(){return[(()=>{var R=X6();return w(R,d(V,{get when(){return S.plan},get children(){var B=Qg(),$=B.firstChild;return $.nextSibling,w($,()=>_("questionConfirm.confirmPlanLabel")),w(B,()=>S.plan,null),B}}),null),w(R,d(V,{get when(){return S.impact},get children(){var B=Qg(),$=B.firstChild;return $.nextSibling,w($,()=>_("questionConfirm.confirmImpactLabel")),w(B,()=>S.impact,null),B}}),null),Pe(()=>At(R,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${nI(S.impact)}`)),R})(),d(On,{class:"m-0 flex flex-col gap-1 p-0",get value(){return I().confirmTop??""},onChange:R=>f(S.id,R),get children(){return[d(cn,{value:"accept",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"qcp-confirm-accept cursor-pointer",get children(){return _("questionConfirm.decisionAccept")}})]}}),d(cn,{value:"reject",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"qcp-confirm-reject cursor-pointer font-medium text-destructive",get children(){return _("questionConfirm.decisionReject")}})]}})]}}),d(V,{get when(){return I().confirmTop==="reject"},get children(){return d(On,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return I().confirmIntent??""},onChange:R=>h(S.id,R),get children(){return[d(at,{get each(){return[["alternative",_("questionConfirm.intentAlternative")],["constraint",_("questionConfirm.intentConstraint")],["dropGoal",_("questionConfirm.intentDropGoal")]]},children:([R,B])=>d(cn,{value:R,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"min-w-0 cursor-pointer break-words",children:B})]}})}),d(V,{get when(){return I().confirmIntent==="dropGoal"},get children(){return d(On,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return I().confirmDrop??""},onChange:R=>p(S.id,R),get children(){return d(at,{get each(){return[["current",_("questionConfirm.dropGoalCurrent")],["spec",_("questionConfirm.dropGoalSpec")]]},children:([R,B])=>d(cn,{value:R,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"min-w-0 cursor-pointer break-words",children:B})]}})})}})}})]}})}})]}}),null),w(O,d(V,{get when(){return A()},get children(){return d(zc,{class:"qcp-note",rows:2,get placeholder(){return _("questionConfirm.notePlaceholder")},get value(){return I().note},onInput:R=>l(S.id,R.currentTarget.value)})}}),null),w(O,d(V,{get when(){return L()},get children(){return d(zc,{class:"qcp-reject-reason",rows:2,get placeholder(){return _("questionConfirm.reasonPlaceholder")},get value(){return I().note},onInput:R=>l(S.id,R.currentTarget.value)})}}),null),O})()}}),null),w(T,d(at,{get each(){return e.freeforms},children:S=>(()=>{var I=eI(),A=I.firstChild,L=A.firstChild,O=A.nextSibling,U=O.firstChild,R=U.nextSibling,B=R.nextSibling,$=B.nextSibling,N=$.nextSibling;N.nextSibling;var G=O.nextSibling;return G.firstChild,w(L,()=>_("questionConfirm.selectionAnnotation")),w(A,d(_e,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(S.id),"aria-label":"remove",get children(){return d(Wr,{class:"h-4 w-4"})}}),null),w(U,()=>S.sectionPath),w(O,()=>_("questionConfirm.quoteConnector"),B),w(O,()=>S.quote.slice(0,200),N),w(G,()=>S.note,null),I})()}),null),Pe(()=>Ye(x,"title",_("questionConfirm.title"))),b})()};var oI=F('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),ep=F("<p class=text-muted-foreground>"),iI=F('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><div class="relative inline-flex shrink-0 rounded-md has-[:focus-visible]:ring-[1.5px] has-[:focus-visible]:ring-ring"><span aria-hidden=true></span><select class="absolute inset-0 h-full w-full cursor-pointer opacity-0"><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select></div><time>'),sI=F('<p class="text-destructive ">'),aI=F('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const uI={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},cI=120,tp=3,lI=150,dI=e=>new Promise(t=>setTimeout(t,e));async function fI(e,t,n){for(let r=0;r<=tp;r+=1)try{return await be.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<tp&&await dI(lI)}return n??null}const gI=()=>{const e=qi(),t=ho(),[n,r]=D(0),[o,i]=D(!1),[s,a]=D(""),[u]=tn(()=>[t(),e.id,n()],async([P,H],Y)=>fI(P,H,Y.value)),[c]=tn(()=>[t(),e.id,n()],async([P,H])=>{try{return await be.getDebug(P,H)}catch{return{exists:!1,text:""}}}),[l,f]=D(null),[h,p]=D(!1),[g,m]=D(null),[b,v]=D(null),[y,x]=D(null),[E,k]=D([]),[C,T]=D(!1),[S,I]=D(null);let A;const L=ne(()=>{const P=u();return P?_6(P.body):[]}),O=ne(()=>!u()||o()?!1:L().length>0||E().length>0);re(()=>{const P=e.id,H=t();if(!P||!H)return;let Y;const se=Uw(H,P,{onUpdated:()=>{Y&&clearTimeout(Y),Y=setTimeout(()=>void Dp(()=>r(fe=>fe+1)),cI)}});ie(()=>{Y&&clearTimeout(Y),se()})}),re(()=>{const P=e.id,H=t();!P||!H||be.getSpecSession(H,P).then(({sessionId:Y,running:se})=>{Y&&(a(Y),i(se),Bo(Y))}).catch(()=>{})}),re(()=>{const P=t(),H=s();if(!P||!H)return;const Y=xh(P,{onStatus:se=>{se.sessionId===H&&i(se.running)}});ie(Y)}),re(()=>{const P=t(),H=s();if(!P||!H)return;const Y=aa(P,H,{onEvent:se=>{(se.type==="turn-completed"||se.type==="error")&&i(!1)}});ie(Y)}),re(()=>{const P=y();if(!P)return;const H=g6(P,f);ie(H)}),Vi(()=>C()||h()),re(()=>{const P=y(),H=u();if(!P||!H)return;const Y=t();let se=!0,fe;const X=Yl(H.body,{specId:H.id,projectId:Y||void 0});g3(P,`<article>${X}</article>`,{childrenOnly:!0,onBeforeElUpdated:(W,ge)=>!(W.classList?.contains("mermaid")&&W.getAttribute("data-mermaid-source")===ge.getAttribute?.("data-mermaid-source"))}),i1(P).then(W=>{if(!se){W();return}fe=W}),ie(()=>{se=!1,fe?.()})});async function U(){v(null),i(!0);try{const P=t(),{sessionId:H}=await be.runAgent(P,e.id);a(H),Bo(H)}catch(P){i(!1),v(P.message)}}async function R(P){v(null);try{await be.setStage(t(),e.id,P),r(H=>H+1)}catch(H){v(H.message)}}function B(P){m(P),p(!0)}async function $(P){const H=g();H&&k(Y=>[...Y,{id:`f-${Date.now()}-${Y.length}`,sectionPath:H.sectionPath,quote:H.text,note:P}])}function N(P){k(H=>H.filter(Y=>Y.id!==P))}async function G(P){await be.submitQuestionAnswers(t(),e.id,P),k([]),await U()}function j(){I(l()),T(!0)}async function K(P){const H=t(),Y=await be.appendItem(H,e.id,P);Y.busy&&v(_("specDetail.appendSavedSpecBusy")),Y.sessionId&&(i(!0),a(Y.sessionId),Bo(Y.sessionId))}async function Z(P){i(!0);try{const H=t(),{sessionId:Y}=await be.explain(H,e.id,P.text);a(Y),Bo(Y)}catch(H){i(!1),v(H.message)}}return(()=>{var P=oI();return w(P,d(na,{get fallback(){return(()=>{var H=ep();return w(H,()=>_("common.loading")),H})()},get children(){return d(V,{get when(){return u()},get fallback(){return(()=>{var H=ep();return w(H,()=>_("specDetail.notFound")),H})()},children:H=>[(()=>{var Y=iI(),se=Y.firstChild,fe=se.firstChild,X=se.nextSibling,W=X.firstChild,ge=X.nextSibling,Me=ge.firstChild,ce=Me.firstChild,Ce=ce.nextSibling,He=Me.nextSibling;return w(fe,d(is,{get items(){return[{label:_("breadcrumb.specList"),href:Ht("")},{label:H().id}]}}),null),w(fe,d(_e,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("specDetail.copySpecPath")},get"aria-label"(){return _("specDetail.copySpecPath")},onClick:()=>void gb(e.id),get children(){return d(gx,{class:"h-3.5 w-3.5"})}}),null),w(se,d(os,{}),null),w(W,()=>H().frontmatter.summary||_("common.pendingAgent")),w(ce,()=>H().frontmatter.stage),Ce.addEventListener("change",je=>R(je.currentTarget.value)),w(He,()=>Eh(H().frontmatter.updated_at)),w(ge,d(_e,{variant:"outline",size:"sm",class:"append-btn",ref(je){var et=A;typeof et=="function"?et(je):A=je},onClick:j,get children(){return _("specDetail.appendTask")}}),null),w(ge,d(V,{get when(){return c()?.exists},get children(){return d(Bn,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return Ht(`specs/${H().id}/debug`)},get children(){return _("specDetail.debug")}})}}),null),w(ge,d(Bn,{class:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground",get href(){return Ht(`specs/${H().id}/review`)},get title(){return _("git.title")},get children(){return d(nl,{class:"h-4 w-4"})}}),null),w(ge,d(V,{get when(){return o()},get children(){return d(hb,{variant:"secondary",get children(){return _("specDetail.running")}})}}),null),Pe(je=>{var et=`inline-flex items-center rounded-md border px-2.5 py-0.5 font-mono text-sm font-semibold uppercase tracking-wider ${uI[H().frontmatter.stage]??"bg-muted text-muted-foreground border-border"}`,ot=_("specDetail.forceStage"),Lt=_("specDetail.forceStage");return et!==je.e&&At(ce,je.e=et),ot!==je.t&&Ye(Ce,"title",je.t=ot),Lt!==je.a&&Ye(Ce,"aria-label",je.a=Lt),je},{e:void 0,t:void 0,a:void 0}),Pe(()=>Ce.value=H().frontmatter.stage),Y})(),d(V,{get when(){return b()},get children(){var Y=sI();return w(Y,b),Y}}),(()=>{var Y=aI(),se=Y.firstChild;return w(Y,d(V,{get when(){return O()},get children(){return d(rI,{get questions(){return L()},get freeforms(){return E()},get running(){return o()},onRemoveFreeform:N,onSubmit:G})}}),se),rr(x,se),Y})(),d(R6,{get snap(){return Q(()=>!!h())()?null:l()},onAnnotate:B,onExplain:Z}),d($6,{get open(){return h()},get projectId(){return t()},get snap(){return g()},onCancel:()=>p(!1),onSubmit:$}),d(j6,{get open(){return C()},get projectId(){return t()},get sectionPath(){return S()?.sectionPath},get quote(){return S()?.text},anchorEl:A,onCancel:()=>T(!1),onSubmit:K})]})}})),P})()};var pI=F('<svg><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m8 9l4-4l4 4m0 6l-4 4l-4-4"></svg>',!1,!0,!1),hI=F('<svg xmlns=http://www.w3.org/2000/svg class="h-4 w-4"viewBox="0 0 24 24"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checked');const mI=en,bI=en.Value;en.Description;en.ErrorMessage;en.ItemDescription;en.HiddenSelect;en.Section;const yI=e=>{const[t,n]=ae(e,["class","children"]);return d(en.Trigger,q({get class(){return it("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background transition-shadow placeholder:text-muted-foreground focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n,{get children(){return[Q(()=>t.children),d(en.Icon,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"flex size-4 items-center justify-center opacity-50",get children(){return pI()}})]}}))},vI=e=>{const[t,n]=ae(e,["class","children"]);return d(en.Portal,{get children(){return d(en.Content,q({get class(){return it("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[Q(()=>t.children),d(en.Listbox,{class:"p-1 focus-visible:outline-none"})]}}))}})},xI=e=>{const[t,n]=ae(e,["class","children"]);return d(en.Item,q({get class(){return it("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[d(en.ItemIndicator,{class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",get children(){return hI()}}),d(en.ItemLabel,{get children(){return t.children}})]}}))};var ic,np;function wI(){if(np)return ic;np=1,ic=l=>{if(!l)return[];if(typeof l!="string"||l.match(/^\s+$/))return[];const f=l.split(`
27
+ `);if(f.length===0)return[];const h=[];let p=null,g=null,m=0,b=0,v=null;const y=P=>{g?.changes.push({type:"normal",normal:!0,ln1:m++,ln2:b++,content:P}),v.oldLines--,v.newLines--},x=P=>{const[H,Y]=n(P)??[];p={chunks:[],deletions:0,additions:0,from:H,to:Y},h.push(p)},E=()=>{(!p||p.chunks.length)&&x()},k=(P,H)=>{E(),p.new=!0,p.newMode=H[1],p.from="/dev/null"},C=(P,H)=>{E(),p.deleted=!0,p.oldMode=H[1],p.to="/dev/null"},T=(P,H)=>{E(),p.oldMode=H[1]},S=(P,H)=>{E(),p.newMode=H[1]},I=(P,H)=>{E(),p.index=P.split(" ").slice(1),H[1]&&(p.oldMode=p.newMode=H[1].trim())},A=P=>{E(),p.from=o(P)},L=P=>{E(),p.to=o(P)},O=P=>+(P||1),U=(P,H)=>{p||x(P);const[Y,se,fe,X]=H.slice(1);m=+Y,b=+fe,g={content:P,changes:[],oldStart:+Y,oldLines:O(se),newStart:+fe,newLines:O(X)},v={oldLines:O(se),newLines:O(X)},p.chunks.push(g)},R=P=>{g&&(g.changes.push({type:"del",del:!0,ln:m++,content:P}),p.deletions++,v.oldLines--)},B=P=>{g&&(g.changes.push({type:"add",add:!0,ln:b++,content:P}),p.additions++,v.newLines--)},$=P=>{if(!g)return;const[H]=g.changes.slice(-1);g.changes.push({type:H.type,[H.type]:!0,ln1:H.ln1,ln2:H.ln2,ln:H.ln,content:P})},N=[[/^diff\s/,x],[/^new file mode (\d+)$/,k],[/^deleted file mode (\d+)$/,C],[/^old mode (\d+)$/,T],[/^new mode (\d+)$/,S],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,I],[/^---\s/,A],[/^\+\+\+\s/,L],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,U],[/^\$/,$]],G=[[/^\$/,$],[/^-/,R],[/^\+/,B],[/^\s*/,y]],j=P=>{for(const[H,Y]of G){const se=P.match(H);if(se){Y(P,se);break}}v.oldLines===0&&v.newLines===0&&(v=null)},K=P=>{for(const[H,Y]of N){const se=P.match(H);if(se){Y(P,se);break}}},Z=P=>{v?j(P):K(P)};for(const P of f)Z(P);return h};const e=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,t=/^(a|b|i|w|c|o|1|2)\//,n=l=>l?.match(e)?.map(f=>f.replace(t,"").replace(/("|')$/,"")),r=/^\\?['"]|\\?['"]$/g,o=l=>{let f=i(l,"-+").trim();return f=a(f),f.replace(r,"").replace(t,"")},i=(l,f)=>{l=c(l);const h=u(f);return l.replace(new RegExp(`^${h}+`),"")},s=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,a=l=>{const f=s.exec(l);return f&&(l=l.substring(0,f.index).trim()),l},u=l=>l instanceof RegExp?l.source:`[${c(l).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,c=l=>`${l??""}`;return ic}var _I=wI();const EI=La(_I);var SI=F('<span class="shrink-0 text-sm text-warning">'),CI=F('<button type=button class="ml-auto inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring">'),kI=F('<div data-testid=git-diff-pane class="code-highlight flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border bg-card"><div class="flex items-center gap-2 border-b px-2 py-1"><span class="min-w-0 flex-1 truncate font-mono text-sm"></span></div><div class="min-h-0 flex-1 overflow-auto">'),sc=F('<p class="p-3 text-muted-foreground">'),AI=F('<p class="p-3 text-destructive">'),TI=F('<div><div class="bg-muted px-2 py-0.5 font-mono text-sm text-muted-foreground">'),DI=F('<div><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><pre class="m-0 flex-1 whitespace-pre-wrap break-all px-2"><span>'),II=F("<span>"),OI=F("<span class=hljs>");const RI={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",vue:"xml",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql"},NI=e=>{const t=ne(()=>e.patch?EI(e.patch):[]),n=ne(()=>t().some(i=>i.chunks.length>0)),r=ne(()=>{const i=e.path.split(".").pop()?.toLowerCase()??"",s=RI[i];return s&&Zs.getLanguage(s)?s:null});function o(i){const s=r();if(!s||!i)return null;try{return Zs.highlight(i,{language:s,ignoreIllegals:!0}).value}catch{return null}}return(()=>{var i=kI(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return w(a,()=>e.path),w(s,d(V,{get when(){return e.truncated},get children(){var c=SI();return w(c,()=>_("git.diffTruncated")),c}}),null),w(s,d(V,{get when(){return e.onClose},get children(){var c=CI();return c.$$click=()=>e.onClose?.(),w(c,d(Wr,{class:"h-4 w-4"})),Pe(l=>{var f=_("common.close"),h=_("common.close");return f!==l.e&&Ye(c,"aria-label",l.e=f),h!==l.t&&Ye(c,"title",l.t=h),l},{e:void 0,t:void 0}),c}}),null),w(u,d(V,{get when(){return!e.loading},get fallback(){return(()=>{var c=sc();return w(c,()=>_("git.diffLoading")),c})()},get children(){return d(V,{get when(){return!e.error},get fallback(){return(()=>{var c=AI();return w(c,()=>e.error),c})()},get children(){return d(V,{get when(){return!e.binary},get fallback(){return(()=>{var c=sc();return w(c,()=>_("git.binaryFile")),c})()},get children(){return d(V,{get when(){return n()},get fallback(){return(()=>{var c=sc();return w(c,()=>_("git.diffEmpty")),c})()},get children(){return d(at,{get each(){return t()},children:c=>d(at,{get each(){return c.chunks},children:l=>(()=>{var f=TI(),h=f.firstChild;return w(h,()=>l.content),w(f,d(at,{get each(){return l.changes},children:p=>{const g=p.type==="add"?"":p.type==="del"?p.ln:p.ln1,m=p.type==="del"?"":p.type==="add"?p.ln:p.ln2,b=p.type==="add"?"bg-success/10":p.type==="del"?"bg-destructive/10":"",v=p.type==="add"?"text-success":p.type==="del"?"text-destructive":"text-muted-foreground",y=p.content.slice(0,1),x=p.content.slice(1),E=o(x);return(()=>{var k=DI(),C=k.firstChild,T=C.nextSibling,S=T.nextSibling,I=S.firstChild;return At(k,`flex font-mono text-sm ${b}`),w(C,g),w(T,m),At(I,`select-none ${v}`),w(I,y),w(S,d(V,{when:E,get fallback(){return(()=>{var A=II();return w(A,x),A})()},children:A=>(()=>{var L=OI();return Pe(()=>L.innerHTML=A()),L})()}),null),k})()}}),null),f})()})})}})}})}})}})),Pe(()=>Ye(a,"title",e.path)),i})()};yn(["click"]);var MI=F('<span class="min-w-0 flex-1 truncate text-left font-mono">'),LI=F('<div class="border-b p-1">'),rp=F('<div class="px-2 py-2 text-sm text-muted-foreground">'),$I=F('<div class="border-b p-1 pr-9">'),PI=F('<div class="max-h-64 overflow-auto p-1">'),FI=F('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),BI=F('<p class=" text-muted-foreground">'),zI=F('<p class="text-destructive ">'),UI=F('<p class=" text-muted-foreground">(runId: <code></code>)'),KI=F('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane class="flex min-h-0 min-w-0 flex-1 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><span aria-hidden=true class="select-none text-border">|</span><span aria-hidden=true class="select-none text-border">|'),jI=F('<span class="truncate font-mono text-sm">'),HI=F('<div><button type=button class="min-w-0 flex-1 truncate border-0 bg-transparent p-0 text-left font-mono text-sm disabled:opacity-50">'),qI=F('<div><button type=button class="flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left"><span></span><span class="truncate font-mono text-sm">');const GI=new Set(["commit","discard"]),VI={M:"text-warning",A:"text-success",D:"text-destructive","??":"text-info",R:"text-primary"},u1=e=>{const[t,n]=D([]),[r,o]=D("manual"),[i,s]=D(new Set),[a,u]=D(null),[c,l]=D(""),[f,h]=D(!1),[p,g]=D(null),[m,b]=D(""),[v,y]=D(""),[x,E]=D(null),[k,C]=D(!1),[T,S]=D(null),[I,A]=D(null),[L,O]=D(null),[U,R]=D(null),[B,$]=D(""),[N,G]=D(null);function j(le){return $(le),new Promise(Ee=>G(()=>Ee))}function K(le){const Ee=N();Ee&&(G(null),Ee(le))}const Z=()=>e.specId?.(),P=ne(()=>!!Z());let H=null;ie(()=>H?.()),ie(()=>K(!1)),re(()=>{const le=e.initialMessage?.()??"";le&&!f()&&l(le)});const[Y,{refetch:se,mutate:fe}]=tn(e.projectId,le=>be.getGitBranches(le)),X=ne(()=>{const le=m().trim().toLowerCase(),Ee=Y()?.branches??[];return le?Ee.filter(Te=>Te.toLowerCase().includes(le)):Ee}),W=ne(()=>{const le=Y();return[...le?.branches??[],...le?.remoteBranches??[]]}),ge=ne(()=>{const le=v().trim().toLowerCase(),Ee=W();return le?Ee.filter(Te=>Te.toLowerCase().includes(le)):Ee});function Me(le){n(le);const Ee=new Set(le.map(pt=>pt.path));s(pt=>{const qt=new Set;for(const ye of pt)Ee.has(ye)&&qt.add(ye);return qt});const Te=a();Te&&!Ee.has(Te)&&u(null)}re(()=>{const le=e.projectId();if(!le)return;let Ee=!1,Te=!1;be.getProjectChanges(le).then(qt=>{Ee||Te||Me(qt.changes)}).catch(()=>{});const pt=qw(le,qt=>{Te=!0,Me(qt)});ie(()=>{Ee=!0,pt()})});const[ce]=tn(()=>{const le=a(),Ee=e.projectId();if(!le||!Ee)return null;const Te=t().find(pt=>pt.path===le);return{pid:Ee,path:le,revision:`${Te?.index??""}${Te?.worktree??""}`}},le=>be.getFileDiff(le.pid,le.path));function Ce(le){return U()===le}const He=ne(()=>T()!==null||U()!==null||p()!==null),je=ne(()=>I()??(Y.error?Y.error.message:null));function et(le,Ee){H?.(),R(le),H=aa(e.projectId(),Ee,{onEvent:Te=>{(Te.type==="turn-completed"||Te.type==="error")&&(R(null),H?.(),H=null)}})}function ot(){return r()==="agent"?t().map(le=>le.path):[...i()]}async function Lt(le){if(He())return;A(null);const Ee=ot();if(Ee.length===0){A(_("review.selectAtLeastOne"));return}if(!(le==="discard"&&!await j(_("review.confirmDiscard")))){g(le);try{if(le==="commit"){const Te=c().trim();if(!Te){A(_("review.enterCommitMsg"));return}await be.projectCommit(e.projectId(),{message:Te,paths:Ee})}else await be.projectDiscard(e.projectId(),{paths:Ee})}catch(Te){A(Te.message)}finally{g(null)}}}async function $t(le){const Ee=Z();if(!(!Ee||He())&&(A(null),!(le==="discard"&&!await j(_("review.confirmDiscardAll"))))){S(le);try{const Te=await be.gitOp(e.projectId(),Ee,le);O({kind:le,runId:Te.runId}),Bo(Te.sessionId),et(le,Te.sessionId)}catch(Te){A(Te.message)}finally{S(null)}}}async function gn(le){r()==="manual"?await Lt(le):await $t(le)}async function fr(le){if(!He()){A(null),g(le);try{if(le==="push"){const Ee=await be.projectPush(e.projectId());It.success(_("git.pushed",{branch:Ee.branch}))}else{const Ee=await be.projectPull(e.projectId());It.success(Ee.updated?_("git.pulled",{branch:Ee.branch}):_("git.upToDate"))}}catch(Ee){A(Ee.message)}finally{g(null)}}}async function Ln(le){const Ee=le?.trim(),Te=e.projectId();if(!(!Ee||!Te||He())&&Ee!==Y()?.current){A(null),g("checkout");try{const pt=await be.checkoutGitBranch(Te,Ee);fe(ye=>({current:pt.current,branches:ye?.branches.includes(pt.current)?ye.branches:[...ye?.branches??[],pt.current].sort(),remoteBranches:ye?.remoteBranches??[]})),s(new Set),u(null),b("");const qt=await be.getProjectChanges(Te);n(qt.changes),await se()}catch(pt){A(pt.message)}finally{g(null)}}}async function vn(le){const Ee=e.projectId();if(!(!le||!Ee||He())){A(null),g("merge");try{const Te=await be.mergeGitBranch(Ee,le);It.success(Te.alreadyUpToDate?_("git.mergeUpToDate",{current:Te.current,branch:Te.merged}):_("git.merged",{current:Te.current,branch:Te.merged})),E(null),y("");const pt=await be.getProjectChanges(Ee);n(pt.changes),await se()}catch(Te){A(Te.message)}finally{g(null),C(!1)}}}function kt(le){return p()===le||GI.has(le)&&(Ce(le)||T()===le)}function Wt(le){s(Ee=>{const Te=new Set(Ee);return Te.has(le)?Te.delete(le):Te.add(le),Te})}function nn(){t().every(le=>i().has(le.path))?s(new Set):s(new Set(t().map(le=>le.path)))}const Ft=ne(()=>t().length>0&&t().every(le=>i().has(le.path))),$n=ne(()=>r()==="manual"&&i().size===0),Rr=ne(()=>He()||r()==="manual"&&($n()||c().trim()===""));return(()=>{var le=KI(),Ee=le.firstChild,Te=Ee.firstChild,pt=Te.firstChild,qt=pt.nextSibling;return w(Te,d(mI,{get options(){return X()},get value(){return Y()?.current??null},onChange:ye=>void Ln(ye),optionValue:ye=>ye,optionTextValue:ye=>ye,get disabled(){return He()||Y.loading||!!Y.error},get placeholder(){return _("git.branchPlaceholder")},itemComponent:ye=>d(xI,{get item(){return ye.item},get children(){var Xe=jI();return w(Xe,()=>ye.item.rawValue),Xe}}),get children(){return[d(yI,{class:"h-8 w-56 max-w-full gap-2 px-2 text-sm",get title(){return _("git.branchSelect")},get"aria-label"(){return _("git.branchSelect")},get children(){return[d(V,{get when(){return Q(()=>!Y.loading)()&&p()!=="checkout"},get fallback(){return d(In,{class:"h-3.5 w-3.5 shrink-0 animate-spin"})},get children(){return d(nl,{class:"h-3.5 w-3.5 shrink-0"})}}),(()=>{var ye=MI();return w(ye,d(bI,{children:Xe=>Xe.selectedOption()??_("git.branchPlaceholder")})),ye})()]}}),d(vI,{class:"w-64",get children(){return[(()=>{var ye=LI();return w(ye,d(zn,{get value(){return m()},onInput:Xe=>b(Xe.currentTarget.value),onKeyDown:Xe=>Xe.stopPropagation(),get placeholder(){return _("git.branchFilterPlaceholder")},class:"h-8 text-sm"})),ye})(),d(V,{get when(){return Q(()=>!Y.loading)()&&X().length===0},get children(){var ye=rp();return w(ye,()=>_("git.noBranches")),ye}})]}})]}}),pt),w(Te,d(_e,{variant:"default",size:"sm",get disabled(){return Rr()},onClick:()=>gn("commit"),get children(){return[d(V,{get when(){return kt("commit")},get children(){return d(In,{class:"mr-1 h-3 w-3 animate-spin"})}}),Q(()=>Q(()=>!!kt("commit"))()?_("review.committing"):_("review.commit"))]}}),pt),w(Te,d(_e,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return He()||$n()},onClick:()=>gn("discard"),get children(){return[d(V,{get when(){return kt("discard")},get children(){return d(In,{class:"mr-1 h-3 w-3 animate-spin"})}}),Q(()=>Q(()=>!!kt("discard"))()?_("review.discarding"):_("review.discard"))]}}),pt),w(Te,d(Fl,{get open(){return k()},onOpenChange:ye=>{C(ye),ye||(y(""),E(null))},get children(){return[d(Pl,{as:_e,variant:"ghost",size:"sm",get disabled(){return He()||Y.loading||!!Y.error},get title(){return _("git.mergeBranch")},get children(){return[d(V,{get when(){return!kt("merge")},get fallback(){return d(In,{class:"mr-1 h-3 w-3 animate-spin"})},get children(){return d(hh,{class:"mr-1 h-3 w-3"})}}),Q(()=>Q(()=>!!kt("merge"))()?_("git.merging"):_("git.mergeBranch"))]}}),d(Bl,{class:"w-72 p-0",get children(){return[(()=>{var ye=$I();return w(ye,d(zn,{get value(){return v()},onInput:Xe=>y(Xe.currentTarget.value),get placeholder(){return _("git.mergeFilterPlaceholder")},class:"h-8 text-sm"})),ye})(),(()=>{var ye=PI();return w(ye,d(at,{get each(){return ge()},children:Xe=>(()=>{var Yt=HI(),Ot=Yt.firstChild;return Ot.$$click=()=>E(Xe),w(Ot,Xe),w(Yt,d(V,{get when(){return x()===Xe},get children(){return d(_e,{size:"sm",variant:"secondary",class:"h-6 shrink-0 px-2 text-xs",get disabled(){return He()},onClick:()=>void vn(Xe),get children(){return[d(V,{get when(){return kt("merge")},get children(){return d(In,{class:"mr-1 h-3 w-3 animate-spin"})}}),Q(()=>Q(()=>!!kt("merge"))()?_("git.merging"):_("git.mergeAction"))]}})}}),null),Pe(Rt=>{var pn=`flex items-center gap-2 rounded-sm px-2 py-1 ${x()===Xe?"bg-accent":""}`,qe=Xe===Y()?.current,Bt=Xe===Y()?.current?_("git.mergeSelfHint"):Xe;return pn!==Rt.e&&At(Yt,Rt.e=pn),qe!==Rt.t&&(Ot.disabled=Rt.t=qe),Bt!==Rt.a&&Ye(Ot,"title",Rt.a=Bt),Rt},{e:void 0,t:void 0,a:void 0}),Yt})()}),null),w(ye,d(V,{get when(){return Q(()=>!Y.loading)()&&ge().length===0},get children(){var Xe=rp();return w(Xe,()=>_("git.noBranches")),Xe}}),null),ye})()]}})]}}),qt),w(Te,d(_e,{variant:"ghost",size:"sm",get disabled(){return He()},onClick:()=>void fr("push"),get children(){return[d(V,{get when(){return kt("push")},get children(){return d(In,{class:"mr-1 h-3 w-3 animate-spin"})}}),Q(()=>Q(()=>!!kt("push"))()?_("git.pushing"):_("git.push"))]}}),null),w(Te,d(_e,{variant:"ghost",size:"sm",get disabled(){return He()},onClick:()=>void fr("pull"),get children(){return[d(V,{get when(){return kt("pull")},get children(){return d(In,{class:"mr-1 h-3 w-3 animate-spin"})}}),Q(()=>Q(()=>!!kt("pull"))()?_("git.pulling"):_("git.pull"))]}}),null),w(Ee,d(Gs,{get placeholder(){return _("review.commitPlaceholder")},get value(){return c()},onInput:ye=>{h(!0),l(ye.currentTarget.value)},get disabled(){return He()},minRows:1,maxRows:3}),null),w(Ee,d(V,{get when(){return P()},get children(){return d(On,{class:"flex gap-4",get value(){return r()},onChange:ye=>o(ye),get disabled(){return He()},get children(){return[d(cn,{value:"manual",class:"flex items-center gap-1.5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"cursor-pointer",get children(){return _("review.manualSelect")}})]}}),d(cn,{value:"agent",class:"flex items-center gap-1.5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"cursor-pointer",get children(){return _("review.agentSelect")}})]}})]}})}}),null),w(Ee,d(V,{get when(){return Q(()=>r()==="manual")()&&t().length>0},get children(){var ye=FI(),Xe=ye.firstChild,Yt=Xe.firstChild;return w(Xe,d(_e,{variant:"ghost",size:"sm",onClick:nn,get disabled(){return He()},get children(){return Q(()=>!!Ft())()?_("review.deselectAll"):_("review.selectAll")}}),Yt),w(Yt,()=>_("review.fileCount",{selected:i().size,total:t().length})),w(ye,d(at,{get each(){return t()},children:Ot=>(()=>{var Rt=qI(),pn=Rt.firstChild,qe=pn.firstChild,Bt=qe.nextSibling;return w(Rt,d(Li,{get checked(){return i().has(Ot.path)},onChange:()=>Wt(Ot.path),get disabled(){return He()},get children(){return d($i,{})}}),pn),pn.$$click=()=>u(Ot.path),w(qe,()=>Ot.status),w(Bt,()=>Ot.path),Pe(zt=>{var rn=`flex items-center gap-2 px-2 py-0.5 ${a()===Ot.path?"bg-accent":""}`,M=Ot.path,te=`inline-block w-6 text-center text-sm font-bold ${VI[Ot.status]??""}`;return rn!==zt.e&&At(Rt,zt.e=rn),M!==zt.t&&Ye(pn,"title",zt.t=M),te!==zt.a&&At(qe,zt.a=te),zt},{e:void 0,t:void 0,a:void 0}),Rt})()}),null),ye}}),null),w(Ee,d(V,{get when(){return Q(()=>r()==="manual")()&&t().length===0},get children(){var ye=BI();return w(ye,()=>_("review.noChanges")),ye}}),null),w(Ee,d(V,{get when(){return je()},get children(){var ye=zI();return w(ye,je),ye}}),null),w(Ee,d(V,{get when(){return L()},get children(){var ye=UI(),Xe=ye.firstChild,Yt=Xe.nextSibling;return w(ye,()=>_("review.dispatched"),Xe),w(ye,(()=>{var Ot=Q(()=>L().kind==="commit");return()=>Ot()?_("review.commit"):_("review.discard")})(),Xe),w(Yt,()=>L().runId.slice(0,8)),ye}}),null),w(le,d(V,{get when(){return a()},children:ye=>d(NI,{get path(){return ye()},get patch(){return ce()?.patch??""},get binary(){return ce()?.binary??!1},get truncated(){return ce()?.truncated??!1},get loading(){return ce.loading},get error(){return Q(()=>!!ce.error)()?ce.error.message:null},onClose:()=>u(null)})}),null),w(le,d(mn,{get open(){return N()!==null},onOpenChange:ye=>{ye||K(!1)},get children(){return d(Cr,{class:"max-w-sm",get children(){return[d(Ar,{get children(){return[d(kr,{get children(){return _("review.discardTitle")}}),d(Ta,{get children(){return B()}})]}}),d(Gr,{get children(){return[d(_e,{variant:"outline",onClick:()=>K(!1),get children(){return _("common.cancel")}}),d(_e,{variant:"destructive",onClick:()=>K(!0),get children(){return _("review.confirmDiscardAction")}})]}})]}})}}),null),le})()};yn(["click"]);var WI=F('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),YI=F('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),ZI=F("<p class=text-muted-foreground>");const XI=()=>{const e=qi(),t=ho(),[n]=tn(()=>[t(),e.id],([o,i])=>be.getSpec(o,i));Vi();const r=ne(()=>{const o=e.id.split("."),i=o.length>=2?o[1]:"feat",s=n()?.frontmatter.summary??"";return s?`${i}: ${s}`:`${i}: update`});return(()=>{var o=YI();return w(o,d(na,{get fallback(){return(()=>{var i=ZI();return w(i,()=>_("common.loading")),i})()},get children(){return[(()=>{var i=WI(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return w(s,d(is,{get items(){return[{label:_("breadcrumb.specList"),href:Ht("")},{label:e.id,href:Ht(`specs/${e.id}`)},{label:_("git.title")}]}}),a),w(a,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(u,d(os,{})),i})(),d(u1,{projectId:t,specId:()=>e.id,initialMessage:r})]}})),o})()};var JI=F('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),op=F("<p class=text-muted-foreground>"),QI=F('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),eO=F('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),tO=F('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),nO=F('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const rO=()=>{const e=qi(),t=ho();Vi();const[n]=tn(()=>[t(),e.id],([a,u])=>be.getSpec(a,u)),[r]=tn(()=>[t(),e.id],([a,u])=>be.getDebug(a,u)),o=ne(()=>{const a=ZD(r()?.text??"");return a.trim()?Yl(a,{specId:e.id,projectId:t()}):""}),[i,s]=D(null);return re(()=>{const a=i(),u=o();if(!a)return;a.innerHTML=u;let c=!0,l;i1(a).then(f=>{if(!c){f();return}l=f}),ie(()=>{c=!1,l?.()})}),(()=>{var a=eO();return w(a,d(na,{get fallback(){return(()=>{var u=op();return w(u,()=>_("common.loading")),u})()},get children(){return[(()=>{var u=JI(),c=u.firstChild,l=c.firstChild,f=c.nextSibling;return w(c,d(is,{get items(){return[{label:_("breadcrumb.specList"),href:Ht("")},{label:e.id,href:Ht(`specs/${e.id}`)},{label:_("specDetail.debug")}]}}),l),w(l,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(f,d(os,{})),u})(),(()=>{var u=QI();return w(u,d(V,{get when(){return r.loading},get fallback(){return d(V,{get when(){return o()},get fallback(){return(()=>{var c=nO();return w(c,()=>_("specDebug.empty")),c})()},get children(){var c=tO();return rr(s,c),c}})},get children(){var c=op();return w(c,()=>_("common.loading")),c}})),u})()]}})),a})()};var oO=F('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex items-start justify-between gap-2"><div class="flex shrink-0 items-center gap-2 text-muted-foreground">');const iO=()=>{const e=ho();return Vi(),(()=>{var t=oO(),n=t.firstChild,r=n.firstChild;return w(n,d(is,{get items(){return[{label:_("breadcrumb.specList"),href:Ht("")},{label:_("git.title")}]}}),r),w(r,d(os,{})),w(t,d(u1,{projectId:e}),null),t})()};function ip(){return{text:"",nextOffset:0,truncated:!1}}function sO(e){return{text:e.text,nextOffset:e.offset+Hc(e.text),truncated:e.truncated}}function aO(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+Hc(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+Hc(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function sp(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function Hc(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}var uO=F('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),cO=F("<p class=text-muted-foreground>"),lO=F('<span class="text-xs text-muted-foreground">: '),dO=F('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),fO=F('<p class="m-0 mt-2 text-xs text-muted-foreground">'),gO=F('<p class="m-0 mt-2 text-xs text-destructive">'),pO=F('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const hO=80,mO=96,ap=4e5,bO=()=>{const e=qi(),t=ho(),[n,{mutate:r}]=tn(()=>[t(),e.runId],async([C,T])=>C&&T?be.getCommandRun(C,T):null),[o,i]=D(ip()),[s,a]=D(null),[u,c]=D(!1),[l,f]=D(Date.now());let h,p=!0,g=null,m=null,b=!1;const v=setInterval(()=>f(Date.now()),1e3);ie(()=>clearInterval(v));function y(C){g=sp(C,ap),m===null&&(m=window.setTimeout(()=>{m=null,g&&(i(g),g=null,p&&h&&(h.scrollTop=h.scrollHeight))},hO))}ie(()=>{m!==null&&window.clearTimeout(m)});async function x(C,T){if(!b){b=!0;try{const S=await be.readCommandOutput(C,T),I=sp(sO(S),ap);g=null,i(I),a(null),h&&(h.scrollTop=h.scrollHeight)}catch(S){a(S.message)}finally{b=!1}}}re(()=>{const C=t(),T=e.runId;if(!C||!T)return;i(ip()),x(C,T);const S=Hw(C,T,{onOutput:I=>{const A=g??o(),L=aO(A,I);L.needsRefetch?x(C,T):y(L.state)},onRun:I=>r(I),onError:I=>a(I)});ie(S)});function E(){h&&(p=h.scrollHeight-h.scrollTop-h.clientHeight<=mO)}async function k(){const C=t(),T=n();if(!(!C||!T)){c(!0);try{const S=await be.stopCommandRun(C,T.runId);r(S.run),It.success(_("commands.stopped"))}catch(S){It.error(S.message)}finally{c(!1)}}}return(()=>{var C=uO(),T=C.firstChild,S=T.firstChild;return w(T,d(_e,{as:Bn,get href(){return Ht("")},variant:"ghost",size:"sm",get children(){return[d(qv,{class:"mr-1 h-4 w-4"}),Q(()=>_("commands.back"))]}}),S),w(S,()=>_("commands.detailTitle")),w(C,d(V,{get when(){return n()},get fallback(){return(()=>{var I=cO();return w(I,()=>s()??_("common.loading")),I})()},children:I=>[(()=>{var A=dO(),L=A.firstChild,O=L.nextSibling,U=O.nextSibling,R=U.firstChild,B=U.nextSibling,$=B.firstChild;return w(A,d(V,{get when(){return I().status==="running"},get children(){return d(_e,{variant:"destructive",size:"sm",get disabled(){return u()},onClick:()=>void k(),get children(){return[d(bh,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>Q(()=>!!u())()?_("commands.stopping"):_("commands.stop"))]}})}}),L),w(A,d(bb,{get status(){return I().status}}),L),w(L,()=>I().name),w(O,()=>I().cli),w(U,()=>_("commands.duration"),R),w(U,()=>yb(I().startedAt,I().endedAt,l()),null),w(A,d(V,{get when(){return I().status!=="running"},get children(){var N=lO(),G=N.firstChild;return w(N,()=>_("commands.exitCode"),G),w(N,()=>I().exitCode??I().signal??"—",null),N}}),B),w(B,()=>_("commands.logFile"),$),w(B,()=>I().logFile,null),A})(),d(V,{get when(){return o().truncated},get children(){var A=fO();return w(A,()=>_("commands.outputTruncated")),A}}),d(V,{get when(){return s()},get children(){var A=gO();return w(A,s),A}}),(()=>{var A=pO();A.addEventListener("scroll",E);var L=h;return typeof L=="function"?rr(L,A):h=A,w(A,()=>o().text||_("commands.outputEmpty")),A})()]}),null),C})()};var yO=F('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add &lt;path&gt;');const c1=()=>(()=>{var e=yO(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>_("welcome.title")),w(r,()=>_("welcome.description")),w(o,()=>_("welcome.addHint"),i),e})();var vO=F('<p class="p-8 text-muted-foreground">');const xO=()=>{const[e]=tn(()=>be.listProjects());return d(V,{get when(){return!e.loading},get fallback(){return(()=>{var t=vO();return w(t,()=>_("common.loading")),t})()},get children(){return d(V,{get when(){return(e()??[]).length>0},get fallback(){return d(c1,{})},get children(){return(()=>{const n=(e()??[])[0];return n?d(Py,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var up=F('<label class="flex flex-col gap-1 font-medium"><span>'),wO=F('<form class="flex flex-col gap-4"><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),_O=F('<p class=" text-muted-foreground">'),EO=F('<p class=" text-destructive">');const li=".yorz/specs",SO=e=>{const[t,n]=D("inherit"),[r,o]=D(""),[i,s]=D(""),[a,u]=D(li),[c,l]=D(li),[f,h]=D(!1),[p,g]=D(!1),[m,b]=D(null);re(()=>{e.open&&(b(null),h(!0),(async()=>{try{const C=await be.getProjectConfig(e.projectId);v(C)}catch(C){b(C.message)}finally{h(!1)}})())});function v(C){n(C.agent.kind),C.agent.kind==="custom"?(o(C.agent.cmd),s(C.agent.args.join(" "))):(o(""),s(""));const T=C.specsDir||li;u(T),l(T)}function y(C){return C.split(/\s+/).map(T=>T.trim()).filter(Boolean)}function x(){const C=t();if(C==="inherit")return{kind:"inherit"};if(C==="claude")return{kind:"claude"};if(C==="opencode")return{kind:"opencode"};if(C==="codex")return{kind:"codex"};const T=r().trim();return T?{kind:"custom",cmd:T,args:y(i())}:{error:_("projectConfig.cmdRequired")}}function E(C){return _(C==="inherit"?"projectConfig.inheritGlobal":C==="custom"?"projectConfig.custom":C==="codex"?"projectConfig.agentCodex":C==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}async function k(C){C.preventDefault(),b(null);const T=x();if("error"in T){b(T.error);return}const S=a().trim()||li;if(S.split(/[\\/]/).some(I=>I==="..")){b(_("projectConfig.invalidPath"));return}g(!0);try{await be.updateProjectConfig(e.projectId,{agent:T,specsDir:S});let I=_("projectConfig.saved");S!==c()&&(I+=_("projectConfig.oldSpecsHint")),e.onSaved?.(I),e.onClose()}catch(I){b(I.message)}finally{g(!1)}}return d(mn,{get open(){return e.open},onOpenChange:C=>!C&&e.onClose(),get children(){return d(Cr,{class:"max-w-[480px]",get children(){return[d(Ar,{get children(){return d(kr,{get children(){return[Q(()=>_("projectConfig.title"))," · ",Q(()=>e.projectName)]}})}}),d(V,{get when(){return!f()},get fallback(){return(()=>{var C=_O();return w(C,()=>_("common.loading")),C})()},get children(){var C=wO(),T=C.firstChild,S=T.firstChild,I=S.nextSibling;return C.addEventListener("submit",k),w(C,d(On,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:A=>n(A),get disabled(){return p()},get children(){return[d(Pi,{class:"mb-1.5 w-full font-medium",get children(){return _("projectConfig.agent")}}),Q(()=>["inherit","claude","opencode","codex","custom"].map(A=>d(cn,{value:A,class:"flex items-center gap-1.5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"cursor-pointer",get children(){return E(A)}})]}})))]}}),T),w(C,d(V,{get when(){return t()==="custom"},get children(){return[(()=>{var A=up(),L=A.firstChild;return w(L,()=>_("projectConfig.cmd")),w(A,d(zn,{type:"text",get value(){return r()},onInput:O=>o(O.currentTarget.value),get placeholder(){return _("projectConfig.cmdPlaceholder")},get disabled(){return p()}}),null),A})(),(()=>{var A=up(),L=A.firstChild;return w(L,()=>_("projectConfig.args")),w(A,d(zn,{type:"text",get value(){return i()},onInput:O=>s(O.currentTarget.value),placeholder:"--flag value",get disabled(){return p()}}),null),A})()]}}),T),w(S,()=>_("projectConfig.specsDir")),w(T,d(zn,{type:"text",get value(){return a()},onInput:A=>u(A.currentTarget.value),placeholder:li,get disabled(){return p()}}),I),w(I,()=>_("projectConfig.specsDirHint")),w(C,(()=>{var A=Q(()=>!!m());return()=>A()&&(()=>{var L=EO();return w(L,m),L})()})(),null),w(C,d(Gr,{get children(){return[d(_e,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return p()},get children(){return _("common.cancel")}}),d(_e,{type:"submit",get disabled(){return p()},get children(){return Q(()=>!!p())()?_("common.saving"):_("projectConfig.save")}})]}}),null),C}})]}})}})};var CO=F('<span class=" font-semibold tracking-wide">'),kO=F('<div class="flex items-center gap-1">'),AO=F('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),TO=F('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),DO=F('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),IO=F("<aside data-testid=projects-sidebar><div data-testid=projects-sidebar-panel><header></header><footer>"),OO=F('<p class="px-2.5 py-2 text-muted-foreground">'),RO=F('<span class="block truncate">'),NO=F('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),MO=F('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),LO=F('<li class="group relative flex items-center">'),$O=F('<span class="inline-block font-semibold">'),PO=F('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),FO=F('<p class="mt-1 text-sm text-destructive break-words">'),BO=F('<p class="break-all font-semibold">');const l1="yorz.projectsSidebar.collapsed",d1="yorz.projectsSidebar.width",zO=300,Zl=220,UO=.2,KO=160,jO=640;function HO(){try{return typeof window<"u"&&window.localStorage.getItem(l1)==="1"}catch{return!1}}function cp(e){try{typeof window<"u"&&window.localStorage.setItem(l1,e?"1":"0")}catch{}}function $a(e){return Number.isFinite(e)?Math.min(jO,Math.max(KO,Math.round(e))):Zl}function ac(){return typeof window>"u"?Zl:$a(window.innerWidth*UO)}function qO(){try{if(typeof window>"u")return Zl;const e=window.localStorage.getItem(d1);if(!e)return ac();const t=Number(e);return Number.isFinite(t)?$a(t):ac()}catch{return ac()}}function GO(e){try{typeof window<"u"&&window.localStorage.setItem(d1,String($a(e)))}catch{}}function lp(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}const VO=()=>{const[e,t]=D(HO()),[n,r]=D(qO()),[o,{refetch:i}]=tn(()=>be.listProjects()),[s,a]=D(null),[u,c]=D(null),[l,f]=D(null),[h,p]=D(!1),[g,m]=D(!1),b=Jo(),v=ra(),y=ne(()=>{const X=v.pathname.match(/^\/([^/]+)/);return X&&X[1]!=="api"?X[1]:""}),x=()=>e()||Er(),[E,k]=D(!1);let C=null;function T(){C!=null&&(window.clearTimeout(C),C=null)}const S=()=>u()!==null||l()!==null,I=()=>x()&&(E()||S()),A=()=>x()&&!I();function L(){!x()||E()||(T(),C=window.setTimeout(()=>{C=null,x()&&k(!0)},zO))}function O(){T(),k(!1)}function U(){T()}ie(T);function R(){T(),k(!1),Er()&&Us(),t(!1),cp(!1)}function B(){if(Er()){Us();return}const X=!e();t(X),cp(X)}let $=null,N=null,G=null;jn(()=>{const X=_h(()=>{i()});ie(X)});let j=0;re(()=>{const X=Nw();if(X===0||X===j)return;if(wt(u)){j=X,c(null);return}const W=wt(y),ge=(o()??[]).find(Me=>Me.id===W);ge&&(j=X,c(ge))});function K(X){x()||(X.preventDefault(),$={startX:X.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),N=W=>{if(!$)return;const ge=W.clientX-$.startX,Me=$a($.startW+ge);$.raf==null&&($.raf=requestAnimationFrame(()=>{$&&($.raf=null,r(Me))}))},G=()=>{$?.raf!=null&&cancelAnimationFrame($.raf),$=null,document.body.classList.remove("is-resizing"),N&&document.removeEventListener("mousemove",N),G&&document.removeEventListener("mouseup",G),N=null,G=null,GO(n())},document.addEventListener("mousemove",N),document.addEventListener("mouseup",G))}ie(()=>{N&&document.removeEventListener("mousemove",N),G&&document.removeEventListener("mouseup",G),document.body.classList.remove("is-resizing")});function Z(X,W){W.preventDefault(),W.stopPropagation(),c(X)}function P(X,W="success"){W==="error"?It.error(X):It.success(X)}function H(X,W){W.preventDefault(),W.stopPropagation(),p(!1),f(X)}async function Y(){const X=l();if(X){m(!0);try{h()&&X.worktree?await be.removeProjectWithFiles(X.id):await be.removeProject(X.id),await i(),y()===X.id&&b("/"),f(null)}catch(W){const ge=W.message;ge.includes("409")?(It.error(_("sidebar.uncommittedChanges")),f(null)):(a(ge),It.error(ge))}finally{m(!1)}}}const se=()=>x()?void 0:{width:`${n()}px`},fe=()=>A()?void 0:{width:`${n()}px`};return(()=>{var X=IO(),W=X.firstChild,ge=W.firstChild,Me=ge.nextSibling;return X.addEventListener("mouseleave",O),X.addEventListener("mouseenter",L),w(ge,d(V,{get when(){return!A()},get fallback(){return d(_e,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:B,onMouseEnter:U,onMouseLeave:L,get title(){return _("sidebar.expand")},get children(){return d(Cc,{class:"h-4 w-4"})}})},get children(){return[(()=>{var ce=CO();return w(ce,()=>_("sidebar.title")),ce})(),(()=>{var ce=kO();return w(ce,d(_e,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",get onClick(){return I()?R:B},get title(){return Q(()=>!!I())()?_("sidebar.pin"):_("sidebar.collapse")},get children(){return d(V,{get when(){return I()},get fallback(){return d(ph,{class:"h-4 w-4"})},get children(){return d(Cc,{class:"h-4 w-4"})}})}})),ce})()]}})),w(W,d(V,{get when(){return o()!==void 0},get fallback(){return(()=>{var ce=OO();return w(ce,()=>_("common.loading")),ce})()},get children(){var ce=AO();return w(ce,d(at,{get each(){return o()??[]},children:Ce=>{const He=()=>y()===Ce.id;return(()=>{var je=LO();return w(je,d(Bn,{get href(){return`/${encodeURIComponent(Ce.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${He()?"bg-primary-soft text-foreground font-semibold":"hover:bg-accent"} ${A()?"px-0 text-center":""}`},get title(){return Q(()=>!!Ce.worktree)()?`${Ce.path}
28
+ worktree of ${Ce.worktree.mainPath}`:Ce.path},get children(){return d(V,{get when(){return!A()},get fallback(){return(()=>{var et=$O();return w(et,()=>(Ce.name[0]??"?").toUpperCase()),et})()},get children(){var et=RO();return w(et,()=>lp(Ce)),et}})}}),null),w(je,d(V,{get when(){return!A()},get children(){return[(()=>{var et=NO();return et.$$click=ot=>Z(Ce,ot),w(et,d(mh,{class:"h-3.5 w-3.5"})),Pe(ot=>{var Lt=_("sidebar.configure",{name:Ce.name}),$t=_("sidebar.projectConfig");return Lt!==ot.e&&Ye(et,"aria-label",ot.e=Lt),$t!==ot.t&&Ye(et,"title",ot.t=$t),ot},{e:void 0,t:void 0}),et})(),(()=>{var et=MO();return et.$$click=ot=>void H(Ce,ot),w(et,d(Wr,{class:"h-3.5 w-3.5"})),Pe(ot=>{var Lt=_("sidebar.removeProject",{name:Ce.name}),$t=_("sidebar.deleteProject");return Lt!==ot.e&&Ye(et,"aria-label",ot.e=Lt),$t!==ot.t&&Ye(et,"title",ot.t=$t),ot},{e:void 0,t:void 0}),et})()]}}),null),je})()}})),ce}}),Me),w(Me,d(V,{get when(){return!A()},get fallback(){return(()=>{var ce=PO();return w(ce,d(lx,{class:"h-3.5 w-3.5"})),Pe(()=>Ye(ce,"title",`${_("sidebar.addHint")}${_("sidebar.addCmd")}`)),ce})()},get children(){var ce=TO(),Ce=ce.firstChild;return w(ce,()=>_("sidebar.addHint"),Ce),w(Ce,()=>_("sidebar.addCmd")),ce}}),null),w(Me,(()=>{var ce=Q(()=>!!s());return()=>ce()&&(()=>{var Ce=FO();return w(Ce,s),Pe(()=>Ye(Ce,"title",s())),Ce})()})(),null),w(W,d(V,{get when(){return!x()},get children(){var ce=DO();return ce.$$mousedown=K,Pe(()=>Ye(ce,"aria-label",_("sidebar.resizeHint"))),ce}}),null),w(X,d(V,{get when(){return u()},children:ce=>d(SO,{open:!0,get projectId(){return ce().id},get projectName(){return ce().name},onClose:()=>c(null),onSaved:Ce=>P(Ce)})}),null),w(X,d(mn,{get open(){return l()!==null},onOpenChange:ce=>!ce&&!g()&&f(null),get children(){return d(Cr,{class:"max-w-sm",get children(){return[d(Ar,{get children(){return[d(kr,{get children(){return _("sidebar.deleteProject")}}),d(Ta,{get children(){return _("sidebar.deleteDesc")}})]}}),d(V,{get when(){return l()},children:ce=>[(()=>{var Ce=BO();return w(Ce,()=>lp(ce())),Ce})(),d(V,{get when(){return ce().worktree},get children(){return d(Li,{get checked(){return h()},onChange:Ce=>p(Ce),class:"flex items-center gap-2 text-destructive",get children(){return[d($i,{}),d(Vs,{get children(){return _("sidebar.deleteFiles")}})]}})}})]}),d(Gr,{get children(){return[d(_e,{variant:"outline",onClick:()=>f(null),get disabled(){return g()},get children(){return _("common.cancel")}}),d(_e,{variant:"destructive",onClick:()=>void Y(),get disabled(){return g()},get children(){return Q(()=>!!g())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Pe(ce=>{var Ce=`relative shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,He=se(),je=I()?"1":void 0,et=`flex flex-col border-r bg-background ${I()?"absolute left-0 top-0 z-40 h-full shadow-xl animate-in fade-in-0 slide-in-from-left-2 duration-150":"h-full w-full"}`,ot=fe(),Lt=`flex items-center border-b ${A()?"justify-center py-2":"justify-between px-2.5 py-2"}`,$t=`border-t ${A()?"flex justify-center py-2":"p-2"}`;return Ce!==ce.e&&At(X,ce.e=Ce),ce.t=Go(X,He,ce.t),je!==ce.a&&Ye(W,"data-peek",ce.a=je),et!==ce.o&&At(W,ce.o=et),ce.i=Go(W,ot,ce.i),Lt!==ce.n&&At(ge,ce.n=Lt),$t!==ce.s&&At(Me,ce.s=$t),ce},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),X})()};yn(["mousedown","click"]);var WO=["second","minute","hour","day","week","month","year"];function YO(e,t){if(t===0)return["just now","right now"];var n=WO[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var ZO=["秒","分钟","小时","天","周","个月","年"];function XO(e,t){if(t===0)return["刚刚","片刻后"];var n=ZO[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var qc={},Pa=function(e,t){qc[e]=t},JO=function(e){return qc[e]||qc.en_US},uc=[60,60,24,7,365/7/12,12];function QO(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function eR(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=uc[o]&&o<uc.length;o++)e/=uc[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function tR(e,t){var n=new Date;return(+n-+QO(e))/1e3}var nR=function(e,t,n){var r=tR(e);return eR(r,JO(t))};Pa("en_US",YO);Pa("zh_CN",XO);var ks={},dp;function rR(){if(dp)return ks;dp=1,Object.defineProperty(ks,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return ks.default=t,ks}var oR=rR();const iR=La(oR),fp=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function sR(e,t){return fp[t]??fp[0]}const yi={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"},appearance:{themeMode:"system",themeName:"paper",language:"zh-CN"},customInstructions:[]},[Sr,Gc]=D(yi);async function aR(){try{const e=await be.getGlobalConfig();return Gc(e),Vc(e),uR(e),e}catch{return Gc(yi),Vc(yi,!1),yi}}async function f1(e){const t=await be.updateGlobalConfig(e);return Gc(t.config),Vc(t.config),g1(),t.config}async function vi(e){return f1(e(Sr()))}async function gp(e){return vi(t=>({...t,customInstructions:e}))}function Vc(e,t=!0){Nv(e.appearance.themeMode,e.appearance.themeName),t&&Av(e.appearance.themeMode,e.appearance.themeName),Tt.language!==e.appearance.language&&Tt.changeLanguage(e.appearance.language)}function uR(e){if(!(typeof window>"u"))try{const t=window.localStorage,n=t.getItem("yorz.theme"),r=t.getItem("yorz.themeName"),o=t.getItem("yorz.lang"),i=fR(t.getItem("yorz.chat.customSlashCommands")),s=e.appearance,a={themeMode:cR(n)?n:s.themeMode,themeName:lR(r)?r:s.themeName,language:dR(o)?o:s.language},u=e.customInstructions.length>0||i.length===0?e.customInstructions:i;if(a.themeMode===s.themeMode&&a.themeName===s.themeName&&a.language===s.language&&u===e.customInstructions){g1();return}vi(c=>({...c,appearance:a,customInstructions:u}))}catch{}}function g1(){if(!(typeof window>"u"))try{window.localStorage.removeItem("yorz.theme"),window.localStorage.removeItem("yorz.themeName"),window.localStorage.removeItem("yorz.lang"),window.localStorage.removeItem("yorz.chat.customSlashCommands")}catch{}}function cR(e){return e==="system"||e==="light"||e==="dark"}function lR(e){return e==="terminal"||e==="graphite"||e==="paper"}function dR(e){return e==="zh-CN"||e==="en"}function fR(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(gR).filter(n=>n!==null):[]}catch{return[]}}function gR(e){if(!e||typeof e!="object")return null;const t=e,n=typeof t.hiddenPrompt=="string"?t.hiddenPrompt:typeof t.systemPrompt=="string"?t.systemPrompt:null;return typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||n===null||typeof t.prefill!="string"||typeof t.createdAt!="number"?null:{id:t.id,name:t.name,description:t.description,hiddenPrompt:n,prefill:t.prefill,createdAt:t.createdAt}}const[pR,hR]=D({});function cc(e){return e?pR()[e]??[]:[]}function Wc(e,t){return hR(n=>({...n,[e]:t})),t}async function mR(e){if(!e)return[];try{const t=await be.getProjectCustomInstructions(e);return Wc(e,t.customInstructions)}catch{return Wc(e,[])}}async function pp(e,t){const n=await be.updateProjectCustomInstructions(e,t);return Wc(e,n.customInstructions)}function bR(e,t){const n=`/${e}`;return t.trim()?yR(t,e)?t:`${n} ${t}`:`${n} `}function yR(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^/${n}(\\s|$)`).test(e.trimStart())}function vR(e,t){const n=new Set(e.map(r=>r.name));return[...e.map(r=>({...r,scope:"project"})),...t.filter(r=>!n.has(r.name)).map(r=>({...r,scope:"global"}))]}const p1=`
29
+
30
+ `,xR="<!-- yorz:hidden -->",wR=/<!-- yorz:hidden -->[\s\S]*?<!-- \/yorz:hidden -->\n?/g;function _R(e){return e.includes(xR)?e.replace(wR,"").trim():e}function ER(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:e==="user"?_R(t.text):t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function h1(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=ER(n.role,o);if(i.kind==="text"){const s=t[t.length-1],a=!r&&s?.kind==="text"&&s.role===i.role;t.push(a?{...i,text:p1+i.text}:i),r=!0}else t.push(i)}}return t}function SR(e){const t=[];for(const n of e){const r=h1(n.messages);r.length!==0&&(t.length>0&&t.push({kind:"divider",sessionId:n.sessionId,agentKind:n.kind,startedAt:n.createdAt}),t.push(...r))}return t}function CR(e,t){return!e||!t||e.endsWith(`
31
+ `)||t.startsWith(`
32
+ `)?e+t:e+p1+t}function kR(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function hp(e,t,n){return`${e}#${t}:${n}`}function AR(e){const t=[];let n=null,r=0;const o=()=>`t${r++}`,i=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const s of e){if(s.kind==="divider"){n=null,t.push({kind:"divider",sessionId:s.sessionId,agentKind:s.agentKind,startedAt:s.startedAt});continue}if(s.kind==="context"){n=null;const c=t[t.length-1];c?.kind==="context"?c.contexts.push(s):t.push({kind:"context",contexts:[s]});continue}if(s.kind==="text"&&s.role==="user"){n=null;const c=t[t.length-1];c?.kind==="user"?c.text=CR(c.text,s.text):t.push({kind:"user",text:s.text});continue}const a=i(),u=a.segments[a.segments.length-1];if(s.kind==="text"){u?.kind==="text"?u.text+=s.text:a.segments.push({kind:"text",text:s.text});continue}u?.kind==="tools"?s.result!==void 0&&s.name===void 0?kR(u.tools,s.result):u.tools.push({...s}):a.segments.push({kind:"tools",id:o(),tools:[{...s}]})}return t.filter(s=>s.kind!=="assistant"||s.segments.length>0)}function TR(e){const{sid:t,displayedSid:n,displayedSpecId:r,fresh:o,listPending:i,known:s,specId:a,running:u}=e;if(!t)return{action:"idle"};const c=n===t;return o&&c?{action:"fresh"}:!s&&i?{action:"hold"}:u&&c&&r===a?{action:"keep"}:{action:"load",clear:!c,specId:a}}function DR(){let e=0;return{begin(){const t=++e;return()=>t===e},invalidate(){e+=1}}}function IR(e,t){const n=[],r=new Map;for(const o of e){const i=t(o.id);if(!o.specId){n.push({key:o.id,sessions:[o],latest:o,updatedAt:o.updatedAt,running:i});continue}const s=r.get(o.specId);if(!s){const a={key:o.specId,specId:o.specId,sessions:[o],latest:o,updatedAt:o.updatedAt,running:i};r.set(o.specId,a),n.push(a);continue}s.sessions.push(o),o.updatedAt>s.latest.updatedAt&&(s.latest=o),s.updatedAt=Math.max(s.updatedAt,o.updatedAt),s.running||=i}for(const o of r.values())o.sessions.sort((i,s)=>i.createdAt-s.createdAt);return n}function OR(e,t){return e.find(n=>n.sessions.some(r=>r.id===t))}var RR=F("<div>");const NR=e=>{const[t,n]=ae(e,["class"]);return(()=>{var r=RR();return ir(r,q({get class(){return it("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},MR=300;function LR(e,t=MR){const n=e.length;return n<=t?{truncated:!1,preview:e,length:n}:{truncated:!0,preview:e.slice(0,t),length:n}}const Xl=Aa;Aa.Trigger;const Jl=e=>{const[t,n]=ae(e,["class"]);return d(Aa.Content,q({get class(){return it("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var $R=F('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),PR=F('<div class="mt-1 max-h-[32rem] space-y-2 overflow-auto rounded border bg-background p-2">'),FR=F('<div class="font-mono text-xs font-semibold">'),BR=F("<div class=space-y-1>"),zR=F('<button type=button class="inline-flex w-fit cursor-pointer items-center text-left text-[11px] text-muted-foreground/70">'),UR=F("<div class=space-y-1><pre>");const KR=e=>{const t=()=>e.expand.isExpanded(e.segment.id),n=r=>e.expand.set(e.segment.id,r);return d(Xl,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=$R(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,d(tl,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.toolCollapsed",{count:e.segment.tools.length})),r})(),d(Jl,{get children(){var r=PR();return w(r,d(yc,{get each(){return e.segment.tools},children:(o,i)=>(()=>{var s=BR();return w(s,d(V,{get when(){return o().name},get children(){var a=FR();return w(a,()=>o().name),a}}),null),w(s,d(V,{get when(){return o().input!==void 0},get children(){return d(mp,{get text(){return jR(o().input)},get expandKey(){return hp(e.segment.id,i,"input")},get expand(){return e.expand}})}}),null),w(s,d(V,{get when(){return o().result!==void 0},get children(){return d(mp,{get text(){return o().result??""},get expandKey(){return hp(e.segment.id,i,"result")},get expand(){return e.expand},wrap:!0})}}),null),s})()})),r}})]}})},mp=e=>{const t=()=>LR(e.text),n=()=>e.expand.isExpanded(e.expandKey),r=()=>t().truncated&&!n();return(()=>{var o=UR(),i=o.firstChild;return w(i,(()=>{var s=Q(()=>!!r());return()=>s()?`${t().preview}…`:e.text})()),w(o,d(V,{get when(){return t().truncated},get children(){var s=zR();return s.$$click=()=>e.expand.set(e.expandKey,!n()),w(s,(()=>{var a=Q(()=>!!n());return()=>a()?_("chat.toolTextCollapse"):_("chat.toolTextExpand",{count:t().length})})()),s}}),null),Pe(()=>At(i,`overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug ${e.wrap?"whitespace-pre-wrap":""}`)),o})()};function jR(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}yn(["click"]);var HR=F('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),qR=F('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),GR=F('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const VR=e=>{const[t,n]=D(!1);return d(Xl,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=HR(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,d(tl,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.agentContextCollapsed",{count:e.contexts.length})),Pe(()=>Ye(r,"title",_("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),d(Jl,{get children(){var r=qR();return w(r,d(at,{get each(){return e.contexts},children:o=>(()=>{var i=GR();return w(i,()=>o.text),i})()})),r}})]}})};yn(["click"]);var WR=F('<span class="font-semibold tracking-wide">'),bp=F("<span>"),YR=F('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),ZR=F('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),XR=F("<div class=mb-1.5>"),JR=F('<p class="mb-1 text-xs text-destructive">'),QR=F('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto p-2 pt-0 pr-1 mr-1 "></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),eN=F('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),tN=F('<p class="m-0 text-sm text-destructive">'),nN=F('<form class="flex flex-col gap-4"><div class="flex flex-col gap-1 font-medium"><span class="text-xs font-normal text-muted-foreground"></span></div><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-name></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-description></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-hidden-prompt><span class="text-xs font-normal text-muted-foreground"></span></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-prefill><span class="text-xs font-normal text-muted-foreground">'),rN=F("<aside><header>"),oN=F('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),iN=F('<span class="shrink-0 text-[11px] font-normal tabular-nums text-muted-foreground">×'),sN=F('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),aN=F("<div class=text-muted-foreground><p class=m-0>"),uN=F('<p class="mt-1 text-sm">'),cN=F('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 font-medium text-foreground [overflow-wrap:anywhere]">'),lN=F('<div class="mb-2 min-w-0 rounded border bg-card px-2 py-1.5 [overflow-wrap:anywhere]">'),dN=F('<div class="markdown chat-md">'),fN=F('<div class="my-3 flex items-center gap-2 text-[11px] text-muted-foreground"><span class="h-px flex-1 bg-border"></span><span class="shrink-0 tabular-nums"></span><span class="h-px flex-1 bg-border">'),gN=F('<span class="text-sm font-normal text-muted-foreground">');const lc="yorz.layout.col2.collapsed",Yc="yorz.layout.col2.width",yp="yorz.chat.sessionList.collapsed",m1="yorz.chat.sessionList.rows",pN="yorz.chat.sessionList.limit",hN="yorz.chat.sessionList.showHistory",b1=[3,5,10],mN=28,Ql=340,bN=.4,y1=260,yN=960,vN=.8,xN=96,wN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,_N=1500,EN=80;function SN(e){return new Promise(t=>setTimeout(t,e))}const CN=e=>e.kind==="divider"?e:null,kN=e=>e.kind==="context"?e:null,AN=e=>e.kind==="assistant"?e:null,TN=e=>e.kind==="user"?e:null,DN=e=>e.kind==="tools"?e:null,IN=e=>e.kind==="text"?e.text:"";Pa("en",sR);Pa("zh-CN",iR);function ON(){return typeof window>"u"?yN:Math.max(y1,Math.round(window.innerWidth*vN))}function Xs(e){return Number.isFinite(e)?Math.min(ON(),Math.max(y1,Math.round(e))):Ql}function dc(){return typeof window>"u"?Ql:Xs(window.innerWidth*bN)}function vp(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function RN(){try{if(typeof window>"u")return Ql;const e=window.localStorage.getItem(Yc);if(!e)return dc();const t=Number(e);return Number.isFinite(t)?Xs(t):dc()}catch{return dc()}}function xi(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function $o(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Zc(e){return b1.includes(e)}function NN(){const e=Number(xi(m1,""));if(Zc(e))return e;const t=Number(xi(pN,""));return Zc(t)?t:xi(hN,"0")==="1"?10:3}const xp=3,wp=10;function _p(e){return e.trim().replace(/^\/+/,"")}function MN(e){return/^[\w-]+$/.test(e)}function LN(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}const $N=()=>{let e,t;const{lng:n}=fb(),r=xb({projectId:()=>yt()||""}),o=ne(()=>vR(cc(yt()||""),Sr().customInstructions));re(()=>{const z=yt()||"";z&&mR(z)});const[i,s]=D(!1),[a,u]=D(""),[c,l]=D(""),[f,h]=D(""),[p,g]=D(""),[m,b]=D("project"),[v,y]=D(null),[x,E]=D(!1),[k,C]=D(null),[T,S]=D(null),[I,A]=D(!1),L=ne(()=>{n();const z=o().map(ee=>{const oe=`/${ee.name}`;return{value:oe,label:oe,description:ee.description||_("chat.customSlashCommandNoDescription"),replacement:bR(ee.name,ee.prefill),customId:ee.id,editable:!0,editLabel:_("chat.editCustomSlashCommand",{name:ee.name}),deletable:!0,deleteLabel:_("chat.deleteCustomSlashCommand",{name:ee.name})}});return[{value:"/yorz-debug",description:_("chat.slashCommandYorzDebug")},{value:"/yorz-spec",description:_("chat.slashCommandYorzSpec")},...z,{value:"/add-command",label:_("chat.addSlashCommandOption"),description:_("chat.addSlashCommandOptionDescription"),action:"add",icon:"plus"}]}),[O,U]=D(xi(lc,"0")==="1"),[R,B]=D(RN()),[$,N]=D(xi(yp,"0")!=="1"),[G,j]=D(NN()),[K,Z]=D(""),[P,H]=D([]),Y=ne(()=>AR(P())),[se,fe]=D(""),[X,W]=D(!0),[ge,Me]=D(Date.now()),[ce,Ce]=D(!1),[He,je]=D({}),[et,ot]=D({}),Lt={isExpanded:z=>et()[z]===!0,set:(z,ee)=>ot(oe=>oe[z]===ee?oe:{...oe,[z]:ee})};function $t(){ot(z=>Object.keys(z).length===0?z:{})}const gn=new Set,[fr,Ln]=D(0);let vn="",kt;const Wt=DR(),nn=new Map;function Ft(z){let ee=nn.get(z);if(!ee){let oe=()=>{};ee={promise:new Promise($e=>{oe=$e}),resolve:oe},nn.set(z,ee)}return ee.promise}function $n(z){Ft(z),nn.get(z)?.resolve()}function Rr(z){gn.delete(z)&&Ln(ee=>ee+1)}const[le,{refetch:Ee}]=tn(()=>yt()||void 0,z=>be.listSessions(z)),[Te]=tn(()=>{const z=yt();return z&&!K()?z:void 0},z=>be.getAgentUsageStatus(z));re(()=>{const z=le();if(!z)return;const ee=K();let oe=!1;for(const me of z)!me.running&&gn.delete(me.id)&&me.id===ee&&(oe=!0);oe&&Ln(me=>me+1),je(me=>{const $e={};for(const tt of z)$e[tt.id]=!!tt.running;return ee&&!(ee in $e)&&me[ee]===!0&&($e[ee]=!0),$e})}),re(Ct(yt,()=>{Z(""),je({}),Mr(),$t(),Wt.invalidate(),vn="",kt=void 0,Ce(!1),gn.clear(),Ln(z=>z+1),nn.clear(),r.reset()})),re(()=>{const z=yt();if(!z)return;const ee=xh(z,{onStatus:oe=>{je(me=>({...me,[oe.sessionId]:oe.running})),Ee()}});ie(ee)});const pt=z=>He()[z]===!0,qt=ne(()=>{const z=K();return z?pt(z):!1}),ye=ne(()=>IR(le()??[],pt)),Xe=ne(()=>ye().filter(z=>z.running).length),Yt=ne(()=>OR(ye(),K())),Ot=ne(()=>Yt()?.specId),Rt=ne(()=>!!Yt()),pn=ne(()=>!Rt()&&le.loading);function qe(z){!z||z===K()||(Ee(),Z(z))}re(()=>{const z=Dw();z&&(Iw(),qe(z),O()&&(U(!1),$o(lc,"0")))});const Bt=()=>O()||Er();function zt(){if(Er()){Us();return}const z=!O();U(z),$o(lc,z?"1":"0")}function rn(z){N(z),$o(yp,z?"0":"1")}function M(z){const ee=Number(z);Zc(ee)&&(j(ee),$o(m1,String(ee)))}function te(z){return _(z===3?"chat.sessionListRows3":z===5?"chat.sessionListRows5":"chat.sessionListRows10")}function de(z){const ee=z.title.trim();return ee&&ee!==z.id&&!wN.test(ee)?ee:z.id}jn(()=>{const z=()=>{const ee=Xs(R());ee!==R()&&(B(ee),$o(Yc,String(ee)))};window.addEventListener("resize",z),ie(()=>window.removeEventListener("resize",z))}),jn(()=>{const z=window.setInterval(()=>Me(Date.now()),6e4);ie(()=>window.clearInterval(z))});let Oe=null,ut=null,ct=null;function ke(z){Bt()||(z.preventDefault(),Oe={startX:z.clientX,startW:R(),raf:null},document.body.classList.add("is-resizing"),ut=ee=>{if(!Oe)return;const oe=Xs(Oe.startW+(ee.clientX-Oe.startX));Oe.raf==null&&(Oe.raf=requestAnimationFrame(()=>{Oe&&(Oe.raf=null,B(oe))}))},ct=()=>{Oe?.raf!=null&&cancelAnimationFrame(Oe.raf),Oe=null,document.body.classList.remove("is-resizing"),ut&&document.removeEventListener("mousemove",ut),ct&&document.removeEventListener("mouseup",ct),ut=null,ct=null,$o(Yc,String(R()))},document.addEventListener("mousemove",ut),document.addEventListener("mouseup",ct))}ie(()=>{ut&&document.removeEventListener("mousemove",ut),ct&&document.removeEventListener("mouseup",ct),document.body.classList.remove("is-resizing")}),re(()=>{const z=yt(),ee=K(),oe=Ot(),me=oe?qt():!1,$e=TR({sid:ee,displayedSid:vn,displayedSpecId:kt,fresh:gn.has(ee),listPending:pn(),known:Rt(),specId:oe,running:me});if(fr(),!z||$e.action==="idle"||$e.action==="hold"||$e.action==="keep")return;if($e.action==="fresh"){W(!0);return}W(!0),$e.clear&&(Mr(),$t()),vn=ee,kt=$e.specId;const tt=Wt.begin();($e.specId?be.getSpecMessages(z,$e.specId).then(SR):be.getSessionMessages(z,ee).then(h1)).then(on=>{tt()&&Mr(on)}).catch(()=>{})}),re(()=>{const z=yt(),ee=K();if(!z||!ee)return;const oe=aa(z,ee,{onReady:()=>$n(ee),onEvent:me=>{me.type==="text"?Ua(me.delta):me.type==="tool-use"?Tn({kind:"tool",name:me.name,input:me.input}):me.type==="tool-result"?Tn({kind:"tool",result:me.text}):me.type==="turn-completed"?(_o(),Rr(ee),je($e=>({...$e,[ee]:!1}))):me.type==="error"?(Eo(`
33
+ ${_("chat.errorMessage",{message:me.message})}
34
+ `),je($e=>({...$e,[ee]:!1}))):me.type==="session-started"&&me.sessionId!==ee&&(gn.has(ee)&&gn.add(me.sessionId),vn===ee&&(vn=me.sessionId),je($e=>({...$e,[ee]:!1,[me.sessionId]:!0})),Ee(),Z(me.sessionId))}});ie(()=>{nn.delete(ee),oe()})}),re(()=>{P(),X()&&requestAnimationFrame(Fe)});function ve(z){return z.scrollHeight-z.scrollTop-z.clientHeight<=xN}function Fe(){e&&(e.scrollTop=e.scrollHeight)}function Pt(){e&&W(ve(e))}function Dt(z){return ge(),!Number.isFinite(z)||z<=0?"":nR(z,n())}function Nr(z){return!Number.isFinite(z)||z<=0?"":new Date(z).toLocaleString(n())}function ni(z){if(!z)return _("chat.usageResetUnknown");const ee=new Date(z);return Number.isFinite(ee.getTime())?ee.toLocaleString(n()):_("chat.usageResetUnknown")}function ri(z){if(typeof z.utilization!="number")return _("chat.usageWindowUnknown",{label:z.label});const ee=Math.min(100,Math.max(0,Math.round(z.utilization))),oe=Math.max(0,100-ee);return _("chat.usageWindow",{label:z.label,remaining:oe,used:ee,reset:ni(z.resetsAt)})}const Fa=ne(()=>{if(n(),Te.loading)return _("chat.usageLoading");const z=Te();if(!z)return"";if(z.status==="error")return _("chat.usageError",{kind:z.kind});if(z.status==="unavailable"&&z.installCommand)return _("chat.usageInstallHint",{kind:z.kind,command:z.installCommand});if(z.status==="unavailable")return _("chat.usageUnavailable",{kind:z.kind});const ee=z.windows??[];return ee.length===0?_("chat.usageAvailableNoDetails",{kind:z.kind}):_("chat.usageSummary",{kind:z.kind,details:ee.slice(0,2).map(ri).join(_("chat.usageSeparator"))})});async function xo(z){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(z),It.success(_("chat.filePathCopied"))}catch{It.error(_("chat.filePathCopyFailed"))}}function Ba(z){const ee=vp(z.target);if(!ee||e&&!e.contains(ee))return;const oe=ee.dataset.filePath;oe&&(z.preventDefault(),xo(oe))}function za(z){if(z.key!=="Enter"&&z.key!==" ")return;const ee=vp(z.target);if(!ee||e&&!e.contains(ee))return;const oe=ee.dataset.filePath;oe&&(z.preventDefault(),xo(oe))}let wo="",xn=null;function eo(z,ee){const oe=z[z.length-1];return oe&&oe.kind==="text"&&oe.role==="assistant"?[...z.slice(0,-1),{...oe,text:oe.text+ee}]:[...z,{kind:"text",role:"assistant",text:ee}]}function _o(){xn!=null&&(clearTimeout(xn),xn=null);const z=wo;wo="",z&&H(ee=>eo(ee,z))}function Ua(z){wo+=z,xn==null&&(xn=window.setTimeout(_o,EN))}function Eo(z){_o(),H(ee=>eo(ee,z))}function Tn(z){_o(),H(ee=>[...ee,z])}function Mr(z=[]){xn!=null&&(clearTimeout(xn),xn=null),wo="",H(ee=>z.length===0&&ee.length===0?ee:z)}ie(()=>{xn!=null&&clearTimeout(xn),Wt.invalidate()});function cs(){!yt()||!K()||(Z(""),Mr(),$t(),Wt.invalidate(),vn="",kt=void 0,W(!0),r.reset())}async function ls(){const z=yt(),ee=K(),oe=se().trim();if(!z||!oe||ce()||qt()||r.hasPending())return;if(fe(""),W(!0),!ee){await Ka(z,oe);return}const me=r.draftId()??void 0;Tn({kind:"text",role:"user",text:oe}),je($e=>({...$e,[ee]:!0}));try{await be.sendSessionMessage(z,ee,oe,me),r.reset()}catch($e){Eo(`
35
+ ${_("chat.errorMessage",{message:$e.message})}
36
+ `),je(tt=>({...tt,[ee]:!1}))}}async function Ka(z,ee){Ce(!0);try{let oe;try{oe=(await be.createSession(z,{})).sessionId}catch(tt){fe(ee),Eo(`
37
+ ${_("chat.errorMessage",{message:tt.message})}
38
+ `);return}gn.add(oe);const me=r.draftId()??void 0,$e=Ft(oe);Mr([{kind:"text",role:"user",text:ee}]),$t(),Wt.invalidate(),vn=oe,kt=void 0,je(tt=>({...tt,[oe]:!0})),Z(oe),await Promise.race([$e,SN(_N)]);try{await be.sendSessionMessage(z,oe,ee,me),r.reset()}catch(tt){Eo(`
39
+ ${_("chat.errorMessage",{message:tt.message})}
40
+ `),je(Ut=>({...Ut,[oe]:!1}))}Ee()}finally{Ce(!1)}}async function ja(){const z=yt(),ee=K();!z||!ee||(await be.abortSession(z,ee).catch(()=>{}),je(oe=>({...oe,[ee]:!1})))}function So(z){z.defaultPrevented||z.isComposing||z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),ls())}function Ha(){return k()===null&&!!yt()}function ue(){u(""),l(""),h(""),g(""),b(yt()?"project":"global"),y(null),C(null)}function Re(){ue(),s(!0)}function Ze(z){const ee=z.customId,oe=ee?o().find(me=>me.id===ee):void 0;oe&&(C(oe.id),u(oe.name),l(oe.description),h(oe.hiddenPrompt),g(oe.prefill),b(oe.scope),y(null),s(!0))}async function ht(z){if(z.preventDefault(),x())return;const ee=_p(a());if(!ee){y(_("chat.customSlashCommandNameRequired"));return}if(!MN(ee)){y(_("chat.customSlashCommandNameInvalid"));return}const oe=k(),me=yt()||"",$e=m()==="project"&&me?"project":"global",tt=$e==="project"?cc(me):Sr().customInstructions,Ut=oe?tt.find(sn=>sn.id===oe):void 0,on={id:Ut?.id??LN(),name:ee,description:c().trim(),hiddenPrompt:f().trim(),prefill:p(),createdAt:Ut?.createdAt??Date.now()},Pn=[...tt.filter(sn=>sn.id!==on.id&&sn.name!==ee),on];E(!0);try{$e==="project"?await pp(me,Pn):await gp(Pn),s(!1),ue()}catch(sn){y(sn.message)}finally{E(!1)}}async function Nt(){const z=T()?.customId;if(!z)return;const ee=o().find(oe=>oe.id===z);if(ee){A(!0);try{if(ee.scope==="project"){const oe=yt()||"";await pp(oe,cc(oe).filter(me=>me.id!==z))}else await gp(Sr().customInstructions.filter(oe=>oe.id!==z));S(null)}catch(oe){It.error(oe.message)}finally{A(!1)}}}return(()=>{var z=rN(),ee=z.firstChild;return w(ee,d(V,{get when(){return!Bt()},get fallback(){return d(_e,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:zt,get title(){return _("chat.expand")},get children(){return d(Cc,{class:"h-4 w-4"})}})},get children(){return[(()=>{var oe=WR();return w(oe,()=>_("chat.title")),oe})(),d(_e,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:zt,get title(){return _("chat.collapse")},get children(){return d(ph,{class:"h-4 w-4"})}})]}})),w(z,d(V,{get when(){return!Bt()},get children(){var oe=QR(),me=oe.firstChild,$e=me.nextSibling,tt=$e.firstChild,Ut=tt.firstChild,on=tt.nextSibling;w(oe,d(V,{get when(){return yt()},get children(){return d(NR,{class:"m-2 rounded-lg shadow-none",get children(){return d(Xl,{get open(){return $()},onOpenChange:rn,get children(){return[(()=>{var mt=YR(),De=mt.firstChild,Et=De.nextSibling;return De.$$click=()=>rn(!$()),w(De,d(V,{get when(){return Xe()>0},get fallback(){return(()=>{var nt=bp();return w(nt,()=>_("chat.sessionsLabelPlain")),nt})()},get children(){var nt=bp();return w(nt,()=>_("chat.sessionsLabel",{count:Xe()})),nt}})),w(mt,d(On,{class:"flex shrink-0 items-center gap-2",get value(){return String(G())},onChange:M,get"aria-label"(){return _("chat.sessionListRows")},get children(){return d(at,{each:b1,children:nt=>d(cn,{get value(){return String(nt)},class:"flex items-center gap-1",get children(){return[d(an,{}),d(hn,{class:"h-3 w-3"}),d(un,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return te(nt)}})]}})})}}),Et),Et.$$click=()=>rn(!$()),w(Et,d(tl,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${$()?"":"-rotate-90"}`}})),Pe(nt=>{var _t=$()?_("chat.collapseSessions"):_("chat.expandSessions"),Co=$()?_("chat.collapseSessions"):_("chat.expandSessions");return _t!==nt.e&&Ye(De,"title",nt.e=_t),Co!==nt.t&&Ye(Et,"title",nt.t=Co),nt},{e:void 0,t:void 0}),mt})(),d(Jl,{get children(){var mt=ZR();return w(mt,d(V,{get when(){return ye().length>0},get fallback(){return(()=>{var De=oN();return w(De,()=>_("chat.noRunningSessions")),De})()},get children(){return d(at,{get each(){return ye()},children:De=>(()=>{var Et=sN(),nt=Et.firstChild,_t=nt.firstChild,Co=_t.firstChild,ko=Co.nextSibling;ko.nextSibling;var ze=_t.nextSibling,Ao=ze.nextSibling;return nt.$$click=()=>qe(De.latest.id),w(nt,d(V,{get when(){return De.running},get children(){return d(In,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),_t),w(_t,()=>De.latest.kind,ko),w(ze,()=>de(De.latest)),w(nt,d(V,{get when(){return De.sessions.length>1},get children(){var lt=iN();return lt.firstChild,w(lt,()=>De.sessions.length,null),lt}}),Ao),w(Ao,()=>Dt(De.updatedAt)),Pe(lt=>{var dt=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${Yt()?.key===De.key?"bg-primary-soft font-semibold":"hover:bg-accent"}`,to=De.running?_("chat.sessionTitleRunning",{kind:De.latest.kind,id:De.latest.id}):_("chat.sessionTitle",{kind:De.latest.kind,id:De.latest.id}),Yn=Nr(De.updatedAt);return dt!==lt.e&&At(nt,lt.e=dt),to!==lt.t&&Ye(nt,"title",lt.t=to),Yn!==lt.a&&Ye(Ao,"title",lt.a=Yn),lt},{e:void 0,t:void 0,a:void 0}),Et})()})}})),Pe(De=>Si(mt,"max-height",`${G()*mN+4}px`)),mt}})]}})}})}}),me),me.addEventListener("scroll",Pt),me.$$keydown=za,me.$$click=Ba;var Pn=e;typeof Pn=="function"?rr(Pn,me):e=me,w(me,d(V,{get when(){return Y().length>0},get fallback(){return(()=>{var mt=aN(),De=mt.firstChild;return w(De,(()=>{var Et=Q(()=>!!K());return()=>Et()?_("chat.empty"):_("chat.draftEmpty")})()),w(mt,d(V,{get when(){return Q(()=>!K())()&&Fa()},children:Et=>(()=>{var nt=uN();return w(nt,Et),nt})()}),null),mt})()},get children(){return d(yc,{get each(){return Y()},children:mt=>d(V,{get when(){return CN(mt())},get fallback(){return d(V,{get when(){return kN(mt())},get fallback(){return d(V,{get when(){return AN(mt())},get fallback(){return(()=>{var De=cN();return w(De,()=>TN(mt())?.text),De})()},children:De=>(()=>{var Et=lN();return w(Et,d(yc,{get each(){return De().segments},children:nt=>d(V,{get when(){return DN(nt())},get fallback(){return(()=>{var _t=dN();return Pe(()=>_t.innerHTML=Yl(IN(nt()),{mermaid:"code",fileLinks:"copy",fileLinkTitle:_("chat.copyFilePath")})),_t})()},children:_t=>d(KR,{get segment(){return _t()},expand:Lt})})})),Et})()})},children:De=>d(VR,{get contexts(){return De().contexts}})})},children:De=>(()=>{var Et=fN(),nt=Et.firstChild,_t=nt.nextSibling;return w(_t,()=>_("chat.sessionDivider",{kind:De().agentKind,time:Nr(De().startedAt)})),Et})()})})}})),w($e,d(V,{get when(){return r.count()>0},get children(){var mt=XR();return w(mt,d(kb,{ctrl:r,compact:!0})),mt}}),tt),w($e,d(V,{get when(){return r.error()},get children(){var mt=JR();return w(mt,()=>r.error()),mt}}),tt),w(tt,d(Da,{get projectId(){return yt()||""},get value(){return se()},onValueChange:fe,get slashCommands(){return L()},get slashEmptyLabel(){return _("chat.slashCommandNoMatch")},onSlashCommandAction:Re,onEditSlashCommand:Ze,onDeleteSlashCommand:S,onKeyDown:So,get onPaste(){return r.onPaste},get placeholder(){return Q(()=>!yt())()?_("chat.noSessionPlaceholder"):Q(()=>!!K())()?_("chat.inputPlaceholder"):_("chat.draftPlaceholder")},get disabled(){return!yt()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),Ut),w(tt,d(_e,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!yt()||r.count()>=Ho},get title(){return _("newSpec.importAttachment")},get children(){return d(Yx,{class:"h-4 w-4"})}}),Ut),Ms(Ut,"change",r.onFileInputChange);var sn=t;return typeof sn=="function"?rr(sn,Ut):t=Ut,Ye(Ut,"accept",vb),w(on,d(_e,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:cs,get disabled(){return!yt()||!K()},get title(){return _("chat.newSession")},get children(){return d(Gi,{class:"h-4 w-4"})}}),null),w(on,d(V,{get when(){return qt()},get fallback(){return d(_e,{size:"sm",onClick:()=>void ls(),get disabled(){return!yt()||!se().trim()||ce()||r.hasPending()},get children(){return[d(ia,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>_("chat.send"))]}})},get children(){return d(_e,{variant:"outline",size:"sm",onClick:()=>void ja(),get title(){return _("chat.abort")},get children(){return[d(bh,{class:"mr-1 h-3.5 w-3.5"}),Q(()=>_("chat.abort"))]}})}}),null),oe}}),null),w(z,d(V,{get when(){return!Bt()},get children(){var oe=eN();return oe.$$mousedown=ke,oe}}),null),w(z,d(mn,{get open(){return i()},onOpenChange:oe=>{!oe&&x()||(s(oe),oe||ue())},get children(){return d(Cr,{class:"max-w-[700px]",get children(){return[d(Ar,{get children(){return d(kr,{get children(){return Q(()=>!!k())()?_("chat.editSlashCommandTitle"):_("chat.addSlashCommandTitle")}})}}),(()=>{var oe=nN(),me=oe.firstChild,$e=me.firstChild,tt=me.nextSibling,Ut=tt.nextSibling,on=Ut.nextSibling,Pn=on.firstChild,sn=on.nextSibling,mt=sn.firstChild;return oe.addEventListener("submit",De=>void ht(De)),w(me,()=>_("chat.customSlashCommandScope"),$e),w(me,d(V,{get when(){return Ha()},get fallback(){return(()=>{var De=gN();return w(De,(()=>{var Et=Q(()=>m()==="project");return()=>Et()?_("chat.slashCommandScopeProject"):_("chat.slashCommandScopeGlobal")})()),De})()},get children(){return d(On,{get value(){return m()},onChange:De=>b(De),class:"flex items-center gap-4",get children(){return d(at,{get each(){return[{value:"project",label:_("chat.slashCommandScopeProject")},{value:"global",label:_("chat.slashCommandScopeGlobal")}]},children:De=>d(cn,{get value(){return De.value},class:"flex items-center gap-1",get children(){return[d(an,{}),d(hn,{class:"h-3 w-3"}),d(un,{class:"cursor-pointer text-sm font-normal",get children(){return De.label}})]}})})}})}}),$e),w($e,(()=>{var De=Q(()=>m()==="project");return()=>De()?_("chat.customSlashCommandScopeProjectHint"):_("chat.customSlashCommandScopeGlobalHint")})()),w(tt,()=>_("chat.customSlashCommandName"),null),w(tt,d(zn,{id:"chat-custom-command-name",get value(){return a()},get placeholder(){return _("chat.customSlashCommandNamePlaceholder")},onInput:De=>{u(De.currentTarget.value),y(null)},required:!0}),null),w(Ut,()=>_("chat.customSlashCommandDescription"),null),w(Ut,d(zn,{id:"chat-custom-command-description",get value(){return c()},get placeholder(){return _("chat.customSlashCommandDescriptionPlaceholder")},onInput:De=>l(De.currentTarget.value)}),null),w(on,()=>_("chat.customSlashCommandHiddenPrompt"),Pn),w(on,d(Gs,{id:"chat-custom-command-hidden-prompt",get value(){return f()},get placeholder(){return _("chat.customSlashCommandHiddenPromptPlaceholder")},minRows:xp,maxRows:wp,onInput:De=>h(De.currentTarget.value)}),Pn),w(Pn,()=>_("chat.customSlashCommandHiddenPromptHint")),w(sn,()=>_("chat.customSlashCommandPrefill"),mt),w(sn,d(Gs,{id:"chat-custom-command-prefill",get value(){return p()},get placeholder(){return _("chat.customSlashCommandPrefillPlaceholder")},minRows:xp,maxRows:wp,onInput:De=>g(De.currentTarget.value)}),mt),w(mt,()=>_("chat.customSlashCommandPrefillHint")),w(oe,d(V,{get when(){return v()},get children(){var De=tN();return w(De,v),De}}),null),w(oe,d(Gr,{get children(){return[d(_e,{type:"button",variant:"outline",onClick:()=>s(!1),get disabled(){return x()},get children(){return _("common.cancel")}}),d(_e,{type:"submit",get disabled(){return!a().trim()||x()},get children(){return Q(()=>!!x())()?_("common.saving"):_("chat.saveCustomSlashCommand")}})]}}),null),oe})()]}})}}),null),w(z,d(mn,{get open(){return T()!==null},onOpenChange:oe=>!oe&&!I()&&S(null),get children(){return d(Cr,{class:"max-w-sm",get children(){return[d(Ar,{get children(){return[d(kr,{get children(){return _("chat.deleteSlashCommandTitle")}}),d(Ta,{get children(){return _("chat.deleteSlashCommandConfirm",{name:_p(T()?.value??"")})}})]}}),d(Gr,{get children(){return[d(_e,{variant:"outline",onClick:()=>S(null),get disabled(){return I()},get children(){return _("common.cancel")}}),d(_e,{variant:"destructive",onClick:()=>void Nt(),get disabled(){return I()},get children(){return Q(()=>!!I())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Pe(oe=>{var me=`relative flex flex-col border-r bg-background text-base shrink-0 ${Bt()?"w-9 transition-[width] duration-150":""}`,$e=Bt()?void 0:{width:`${R()}px`},tt=`flex items-center border-b ${Bt()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return me!==oe.e&&At(z,oe.e=me),oe.t=Go(z,$e,oe.t),tt!==oe.a&&At(ee,oe.a=tt),oe},{e:void 0,t:void 0,a:void 0}),z})()};yn(["click","keydown","mousedown"]);const v1=["newSpec","toggleSpecDetailFullscreen","projectSettings"],co={newSpec:"Ctrl+Shift+N",toggleSpecDetailFullscreen:"Ctrl+Shift+F",projectSettings:"Ctrl+Shift+S"},PN=new Set(["Control","Shift","Alt","Meta"]);function fc(e){if(!e)return null;const t=e.split("+").map(r=>r.trim()).filter(Boolean),n={key:""};for(const r of t){const o=r.toLowerCase();o==="ctrl"||o==="control"?n.ctrl=!0:o==="shift"?n.shift=!0:o==="alt"||o==="option"?n.alt=!0:o==="meta"||o==="cmd"||o==="command"?n.meta=!0:n.key=ed(r)}return n.key?w1(n):null}function x1(e){if(PN.has(e.key))return null;const t=ed(e.key);return t?w1({key:t,ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey}):null}function Js(e){return{newSpec:fc(e?.newSpec)??co.newSpec,toggleSpecDetailFullscreen:fc(e?.toggleSpecDetailFullscreen)??co.toggleSpecDetailFullscreen,projectSettings:fc(e?.projectSettings)??co.projectSettings}}function Ep(e){const t=Js(e),n=new Map,r=new Set;for(const o of v1){const i=t[o],s=n.get(i);s?(r.add(s),r.add(o)):n.set(i,o)}return[...r]}function FN(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();if(t==="textarea"||t==="select")return!0;if(t!=="input")return!1;const r=e.type.toLowerCase();return!["button","checkbox","radio","submit","reset","file","color"].includes(r)}function w1(e){const t=[];return e.ctrl&&t.push("Ctrl"),e.shift&&t.push("Shift"),e.alt&&t.push("Alt"),e.meta&&t.push("Meta"),t.push(ed(e.key)),t.join("+")}function ed(e){return e.length===1?e.toUpperCase():e===" "?"Space":e.startsWith("Arrow")?e:e.slice(0,1).toUpperCase()+e.slice(1)}var BN=F("<span>"),zN=F('<span class="text-xs font-normal text-muted-foreground">'),UN=F('<p class="m-0 text-sm text-destructive">'),KN=F('<div class="flex flex-col gap-4"><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2"></div></fieldset><fieldset class="m-0 flex flex-col gap-2 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-col gap-2">'),jN=F("<p class=text-muted-foreground>"),HN=F('<div class="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 rounded-md border p-2"><div class=min-w-0><p class="m-0 font-medium"></p><p>'),qN=F("<p class=text-destructive>");const GN=e=>{const[t,n]=D("claude"),[r,o]=D(!1),[i,s]=D(!1),[a,u]=D("system-default"),[c,l]=D({}),[f,h]=D(null),[p,g]=D(!1),[m,b]=D("idle"),[v,y]=D(null),x=ne(()=>new Set(Ep(c())));let E;re(()=>{e.open&&(y(null),T(),b("idle"),g(!0),(async()=>{try{k(await be.getGlobalConfig())}catch(N){y(N.message),k(yi)}finally{g(!1)}})())});function k(N){n(N.agent.defaultKind),o(!!N.notifications.sessionEnd.banner),s(!!N.notifications.sessionEnd.sound),u(N.power?.inhibitWhenRunning??"system-default"),l(N.shortcuts??{}),h(null)}re(()=>{const N=f();if(!N)return;const G=j=>{if(j.preventDefault(),j.stopPropagation(),j.key==="Escape"){h(null);return}if(j.key==="Backspace"||j.key==="Delete"){const P={...c(),[N]:null};l(P),h(null),C({shortcuts:P});return}const K=x1(j);if(!K)return;const Z={...c(),[N]:K};l(Z),h(null),C({shortcuts:Z})};window.addEventListener("keydown",G,!0),ie(()=>window.removeEventListener("keydown",G,!0))});async function C(N){y(null);const G=N.shortcuts??c();if(Ep(G).length>0){y(_("globalConfig.shortcutConflict"));return}T(),b("saving");try{await f1({agent:{defaultKind:N.agent?.defaultKind??t()},notifications:{sessionEnd:{banner:N.notifications?.sessionEnd.banner??r(),sound:N.notifications?.sessionEnd.sound??i()}},shortcuts:G,power:{inhibitWhenRunning:N.power?.inhibitWhenRunning??a()},appearance:Sr().appearance,customInstructions:Sr().customInstructions}),b("saved"),E=setTimeout(()=>b("idle"),2e3)}catch(j){b("idle"),y(j.message)}}function T(){E&&(clearTimeout(E),E=void 0)}ie(T);function S(N){return _(N==="codex"?"projectConfig.agentCodex":N==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}function I(N){return _(`globalConfig.shortcuts.${N}`)}function A(N){return _(N==="prevent-display-sleep"?"globalConfig.powerPreventDisplaySleep":N==="keep-system-awake"?"globalConfig.powerKeepSystemAwake":"globalConfig.powerSystemDefault")}function L(N){return f()===N?_("globalConfig.shortcutRecording"):Js(c())[N]}function O(N){const G={...c(),[N]:null};l(G),C({shortcuts:G})}function U(N){n(N),C({agent:{defaultKind:N}})}function R(N){o(N),C({notifications:{sessionEnd:{banner:N,sound:i()}}})}function B(N){s(N),C({notifications:{sessionEnd:{banner:r(),sound:N}}})}function $(N){u(N),C({power:{inhibitWhenRunning:N}})}return d(mn,{get open(){return e.open},onOpenChange:N=>!N&&e.onClose(),get children(){return d(Cr,{class:"max-w-[560px]",get children(){return[d(Ar,{get children(){return d(kr,{class:"flex items-baseline gap-2",get children(){return[(()=>{var N=BN();return w(N,()=>_("globalConfig.title")),N})(),d(V,{get when(){return m()!=="idle"},get children(){var N=zN();return w(N,(()=>{var G=Q(()=>m()==="saving");return()=>G()?_("globalConfig.saveStatusSaving"):_("globalConfig.saveStatusSaved")})()),N}})]}})}}),d(V,{get when(){return!p()},get fallback(){return(()=>{var N=jN();return w(N,()=>_("common.loading")),N})()},get children(){var N=KN(),G=N.firstChild,j=G.firstChild,K=j.nextSibling,Z=G.nextSibling,P=Z.firstChild,H=P.nextSibling;return w(N,d(On,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:Y=>U(Y),get children(){return[d(Pi,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.agentDefault")}}),Q(()=>["claude","opencode","codex"].map(Y=>d(cn,{value:Y,class:"flex items-center gap-1.5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"cursor-pointer",get children(){return S(Y)}})]}})))]}}),G),w(j,()=>_("globalConfig.sessionEnd")),w(K,d(Li,{get checked(){return r()},onChange:R,class:"flex items-center gap-2",get children(){return[d($i,{}),d(Vs,{get children(){return _("globalConfig.banner")}})]}}),null),w(K,d(Li,{get checked(){return i()},onChange:B,class:"flex items-center gap-2",get children(){return[d($i,{}),d(Vs,{get children(){return _("globalConfig.sound")}})]}}),null),w(N,d(On,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return a()},onChange:Y=>$(Y),get children(){return[d(Pi,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.powerTitle")}}),Q(()=>["system-default","prevent-display-sleep","keep-system-awake"].map(Y=>d(cn,{value:Y,class:"flex items-center gap-1.5",get children(){return[d(an,{}),d(hn,{}),d(un,{class:"cursor-pointer",get children(){return A(Y)}})]}})))]}}),Z),w(P,()=>_("globalConfig.shortcutsTitle")),w(H,d(at,{each:v1,children:Y=>(()=>{var se=HN(),fe=se.firstChild,X=fe.firstChild,W=X.nextSibling;return w(X,()=>I(Y)),w(W,()=>L(Y)),w(se,d(_e,{type:"button",variant:"outline",size:"sm",onClick:()=>h(Y),get children(){return Q(()=>f()===Y)()?_("globalConfig.shortcutRecordingButton"):_("globalConfig.shortcutRecord")}}),null),w(se,d(_e,{type:"button",variant:"ghost",size:"sm",onClick:()=>O(Y),get disabled(){return L(Y)===co[Y]},get children(){return _("globalConfig.shortcutReset")}}),null),Pe(()=>At(W,`m-0 font-mono text-sm ${x().has(Y)?"text-destructive":"text-muted-foreground"}`)),se})()})),w(Z,d(V,{get when(){return x().size>0},get children(){var Y=UN();return w(Y,()=>_("globalConfig.shortcutConflict")),Y}}),null),w(N,(()=>{var Y=Q(()=>!!v());return()=>Y()&&(()=>{var se=qN();return w(se,v),se})()})(),null),N}})]}})}})},VN=200,WN=8e3;async function YN({id:e,list:t,intervalMs:n=VN,timeoutMs:r=WN,sleep:o=ZN}){const i=Math.max(1,n),s=Math.max(1,Math.ceil(r/i)+1);for(let a=0;a<s;a++){try{if(!(await t()).some(c=>c.id===e))return!0}catch{}a<s-1&&await o(i)}return!1}function ZN(e){return new Promise(t=>window.setTimeout(t,e))}var XN=F('<span class="absolute right-2 top-2 h-2 w-2 rounded-full bg-destructive">'),JN=F('<div class="border-b px-3 py-2">'),QN=F('<div class="max-h-96 overflow-auto p-2">'),e4=F('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class=font-medium></div><p class="mt-1 text-xs leading-5 text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-1 self-center">');function t4(){const[e,t]=D([]),[n,r]=D(null);async function o(){try{t(await be.listSystemNotifications())}catch{}}re(()=>{o();const u=Kw(()=>void o());ie(u)});async function i(u){r(u);try{await be.deleteSystemNotification(u),await o()}finally{r(null)}}async function s(u){r(u);try{await be.updateSystemNotification(u),await o()}finally{r(null)}}async function a(u){r(u);try{await be.restartSystemNotification(u),t(c=>c.filter(l=>l.id!==u)),await YN({id:u,list:be.listSystemNotifications}),window.location.reload()}finally{r(null)}}return d(V,{get when(){return e().length>0},get children(){return d(Fl,{placement:"bottom-start",get children(){return[d(Pl,{as:_e,variant:"ghost",size:"icon",class:"relative h-8 w-8",get title(){return _("systemNotifications.title")},get children(){return[d(Wv,{class:"h-4 w-4"}),XN()]}}),d(Bl,{class:"w-[26rem] max-w-[calc(100vw-2rem)] p-0",get children(){return[(()=>{var u=JN();return w(u,d(NC,{class:"text-sm font-semibold",get children(){return _("systemNotifications.title")}})),u})(),(()=>{var u=QN();return w(u,d(at,{get each(){return e()},children:c=>(()=>{var l=e4(),f=l.firstChild,h=f.firstChild,p=h.firstChild,g=p.nextSibling,m=h.nextSibling;return w(p,()=>n4(c)),w(g,()=>r4(c)),w(m,d(V,{get when(){return c.kind==="version-update"},get children(){return d(V,{get when(){return c.action==="restart-ready"},get fallback(){return d(_e,{variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id||c.action==="updating"},onClick:()=>void s(c.id),get children(){return d(V,{get when(){return n()===c.id||c.action==="updating"},get fallback(){return _("systemNotifications.update")},get children(){return[d(iw,{class:"mr-1 h-3.5 w-3.5 animate-spin"}),Q(()=>_("systemNotifications.updating"))]}})}})},get children(){return d(Eb,{openDelay:150,closeDelay:0,get children(){return[d(_b,{as:_e,variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id},onClick:()=>void a(c.id),get children(){return _("systemNotifications.restart")}}),d(Sb,{get children(){return _("systemNotifications.restartTooltip")}})]}})}})}}),null),w(m,d(_e,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",get title(){return _("systemNotifications.delete")},get disabled(){return n()===c.id},onClick:()=>void i(c.id),get children(){return d(rl,{class:"h-4 w-4"})}}),null),l})()})),u})()]}})]}})}})}function n4(e){return e.kind==="version-update"?_("systemNotifications.versionTitle"):e.title}function r4(e){return e.kind!=="version-update"?e.message:_("systemNotifications.versionMessage",{current:e.metadata?.currentVersion??"",latest:e.metadata?.latestVersion??""})}var Sp=F('<div class="px-2 py-1 text-xs text-muted-foreground">'),o4=F('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const i4=[{mode:"system",labelKey:"shell.themeSystem",icon:zx},{mode:"light",labelKey:"shell.themeLight",icon:hw},{mode:"dark",labelKey:"shell.themeDark",icon:jx}],s4=[{name:"terminal",labelKey:"shell.themeTerminal"},{name:"graphite",labelKey:"shell.themeGraphite"},{name:"paper",labelKey:"shell.themePaper"}],a4=e=>{const t=ra(),n=Jo(),{lng:r,changeLanguage:o}=fb(),[i,s]=D(!1),a=ne(()=>t.pathname===Ht("specs/new"));function u(g){g!==r()&&(o(g),vi(m=>({...m,appearance:{...m.appearance,language:g}})))}function c(g){fh(g),vi(m=>({...m,appearance:{...m.appearance,themeMode:g}}))}function l(g){Rv(g),vi(m=>({...m,appearance:{...m.appearance,themeName:g}}))}function f(){if(!yt())return;const g=Ht("specs/new");a()?window.open(g,"_blank","noopener"):n(g)}function h(g){const m=Js(Sr().shortcuts);if(g===m.newSpec)return f(),!0;if(g===m.projectSettings)return $w(),!0;if(g===m.toggleSpecDetailFullscreen){const b=Lw();return b?(b(),!0):!1}return!1}const p=g=>{if(g.defaultPrevented)return;const m=x1(g);if(!m)return;const b=Js(Sr().shortcuts),v=m===b.toggleSpecDetailFullscreen||m===b.projectSettings;FN(g.target)&&!v||m!==co.newSpec&&m!==co.projectSettings&&m!==co.toggleSpecDetailFullscreen&&!Object.values(Sr().shortcuts).includes(m)||h(m)&&g.preventDefault()};return jn(()=>{aR(),window.addEventListener("keydown",p)}),ie(()=>window.removeEventListener("keydown",p)),re(()=>{const g=t.pathname.match(/^\/([^/]+)/);Ow(g&&g[1]!=="api"?g[1]:"")}),(()=>{var g=o4(),m=g.firstChild,b=m.firstChild,v=m.nextSibling,y=v.firstChild;return w(m,d(Bn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),b),w(m,d(t4,{}),b),w(b,d(V,{get when(){return yt()},get children(){return d(_e,{as:Bn,get href(){return Ht("specs/new")},get target(){return a()?"_blank":void 0},get rel(){return a()?"noopener":void 0},variant:"default",size:"sm",get children(){return[d(Gi,{class:"mr-1 h-4 w-4"}),Q(()=>_("shell.newSpec"))]}})}}),null),w(b,d(Ll,{placement:"bottom-end",get children(){return[d(Ml,{as:_e,variant:"ghost",size:"icon",get title(){return _("shell.settingsMenu")},get children(){return d(Mx,{class:"h-4 w-4"})}}),d($l,{get children(){return[d(Cf,{get children(){return[d(kf,{"data-submenu":"language",get children(){return[d(kx,{class:"mr-2 h-4 w-4"}),Q(()=>_("shell.languageSwitch"))]}}),d(Af,{get children(){return[d(vr,{onSelect:()=>u("zh-CN"),get children(){return[d(gs,{get class(){return`mr-2 h-4 w-4 ${r()==="zh-CN"?"opacity-100":"opacity-0"}`}}),Q(()=>_("shell.langZh"))]}}),d(vr,{onSelect:()=>u("en"),get children(){return[d(gs,{get class(){return`mr-2 h-4 w-4 ${r()==="en"?"opacity-100":"opacity-0"}`}}),Q(()=>_("shell.langEn"))]}})]}})]}}),d(Cf,{get children(){return[d(kf,{"data-submenu":"theme",get children(){return[d(Gx,{class:"mr-2 h-4 w-4"}),Q(()=>_("shell.themeSwitch"))]}}),d(Af,{get children(){return[(()=>{var x=Sp();return w(x,()=>_("shell.themeModeGroup")),x})(),d(at,{each:i4,children:x=>d(vr,{get"data-theme-option"(){return x.mode},onSelect:()=>c(x.mode),get children(){return[d(gs,{get class(){return`mr-2 h-4 w-4 ${Ec()===x.mode?"opacity-100":"opacity-0"}`}}),d(x.icon,{class:"mr-2 h-4 w-4 text-muted-foreground"}),Q(()=>_(x.labelKey))]}})}),d(Bc,{}),(()=>{var x=Sp();return w(x,()=>_("shell.themeNameGroup")),x})(),d(at,{each:s4,children:x=>d(vr,{get"data-theme-name-option"(){return x.name},onSelect:()=>l(x.name),get children(){return[d(gs,{get class(){return`mr-2 h-4 w-4 ${uh()===x.name?"opacity-100":"opacity-0"}`}}),Q(()=>_(x.labelKey))]}})})]}})]}}),d(Bc,{}),d(vr,{onSelect:()=>s(!0),get children(){return[d(lw,{class:"mr-2 h-4 w-4"}),Q(()=>_("shell.globalConfig"))]}})]}})]}}),null),w(v,d(VO,{}),y),w(v,d($N,{}),y),w(y,()=>e.children),w(g,d(pC,{position:"top-center"}),null),w(g,d(GN,{get open(){return i()},onClose:()=>s(!1)}),null),g})()};Mv();const _1=document.getElementById("app");if(!_1)throw new Error("missing #app root");Z1(()=>d(Ly,{root:a4,get children(){return[d(pr,{path:"/",component:xO}),d(pr,{path:"/:projectId",component:sk}),d(pr,{path:"/:projectId/git",component:iO}),d(pr,{path:"/:projectId/commands/:runId",component:bO}),d(pr,{path:"/:projectId/specs/new",component:Qk}),d(pr,{path:"/:projectId/specs/:id",component:gI}),d(pr,{path:"/:projectId/specs/:id/review",component:XI}),d(pr,{path:"/:projectId/specs/:id/debug",component:rO}),d(pr,{path:"*",component:c1})]}}),_1);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{QD as _,La as g};