@qitqode/qitqode-android-arm64 0.1.36 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/bundle/{chunk-ja18tvc7.js → chunk-0ne5m1n3.js} +1 -1
  2. package/bundle/{chunk-bjcb9kt0.js → chunk-0z33en1a.js} +1 -1
  3. package/bundle/{chunk-g5prcvq2.js → chunk-17pxm5d3.js} +1 -1
  4. package/bundle/{chunk-xyjehgzm.js → chunk-2pzvcpv4.js} +1 -1
  5. package/bundle/{chunk-983rqajz.js → chunk-46ztrjw0.js} +2 -2
  6. package/bundle/chunk-4dtkj9zg.js +2 -0
  7. package/bundle/chunk-4e9p3e0a.js +2 -0
  8. package/bundle/{chunk-nr4q9fv7.js → chunk-55wxgsga.js} +1 -1
  9. package/bundle/{chunk-t8rke5fr.js → chunk-5ke0yqqz.js} +4 -4
  10. package/bundle/{chunk-364ccew0.js → chunk-5myxjxae.js} +1 -1
  11. package/bundle/{chunk-vg41rtdy.js → chunk-5q1fz2az.js} +1 -1
  12. package/bundle/{chunk-q7rt76qw.js → chunk-5sgpjgss.js} +1 -1
  13. package/bundle/{chunk-pmv8yr8c.js → chunk-6r8pg6ma.js} +1 -1
  14. package/bundle/{chunk-tabcpx7t.js → chunk-871f8x99.js} +1 -1
  15. package/bundle/chunk-88emsbaz.js +2 -0
  16. package/bundle/{chunk-fmxm4kaj.js → chunk-909fp6pm.js} +1 -1
  17. package/bundle/{chunk-e07dbha4.js → chunk-98effz12.js} +1 -1
  18. package/bundle/{chunk-eywryd3k.js → chunk-a6z0fhta.js} +1 -1
  19. package/bundle/{chunk-w1ypf53m.js → chunk-aj3y2e86.js} +1 -1
  20. package/bundle/{chunk-rph5xswc.js → chunk-akpssv2d.js} +1 -1
  21. package/bundle/{chunk-1yv5h8k4.js → chunk-aw8af3ky.js} +1 -1
  22. package/bundle/{chunk-dx7h5r8j.js → chunk-bha3sbsj.js} +1 -1
  23. package/bundle/chunk-bs61sezq.js +2 -0
  24. package/bundle/{chunk-rd4x4tsv.js → chunk-ceefd2nj.js} +1 -1
  25. package/bundle/{chunk-v8ksjgc3.js → chunk-cmdjkx32.js} +1 -1
  26. package/bundle/{chunk-7dep7g7c.js → chunk-cxtxvt43.js} +1 -1
  27. package/bundle/{chunk-cx0j6mpq.js → chunk-d9x9kqvy.js} +1 -1
  28. package/bundle/chunk-de2rfsaf.js +2 -0
  29. package/bundle/{chunk-8zmreqxx.js → chunk-dncnyzaa.js} +1 -1
  30. package/bundle/{chunk-3gw6r3hf.js → chunk-dz3s882k.js} +215 -215
  31. package/bundle/{chunk-n7xgfm5x.js → chunk-eb8nsk7e.js} +1 -1
  32. package/bundle/{chunk-6sfhbckv.js → chunk-fn8191ps.js} +1 -1
  33. package/bundle/chunk-fyz7fngd.js +2 -0
  34. package/bundle/{chunk-d0xs3j5h.js → chunk-g8cfzzrs.js} +1 -1
  35. package/bundle/{chunk-yjp0btmq.js → chunk-gnt982jr.js} +2 -2
  36. package/bundle/{chunk-r0ewmh6f.js → chunk-grdfpd57.js} +1 -1
  37. package/bundle/{chunk-fjm9kstr.js → chunk-gt6tgm42.js} +1 -1
  38. package/bundle/chunk-hd8q4msp.js +2 -0
  39. package/bundle/{chunk-p8k48st6.js → chunk-j5kyf7vt.js} +1 -1
  40. package/bundle/{chunk-e88wd9ex.js → chunk-jfz8wwk9.js} +1 -1
  41. package/bundle/chunk-js6hqmq7.js +2 -0
  42. package/bundle/{chunk-rebsz3bj.js → chunk-k70x182t.js} +1 -1
  43. package/bundle/chunk-k7n1csxv.js +3 -0
  44. package/bundle/{chunk-brh35yt5.js → chunk-kb6v5hhm.js} +1 -1
  45. package/bundle/chunk-kmtfdky8.js +4 -0
  46. package/bundle/{chunk-qpd0gab8.js → chunk-kp8nkm3m.js} +1 -1
  47. package/bundle/{chunk-htkwc2se.js → chunk-m0xsvzyd.js} +1 -1
  48. package/bundle/{chunk-f77nxt23.js → chunk-m6zxr0j8.js} +1 -1
  49. package/bundle/{chunk-t5tfppwv.js → chunk-n38h109k.js} +1 -1
  50. package/bundle/{chunk-ebkztnpf.js → chunk-n7d9eemn.js} +49 -49
  51. package/bundle/{chunk-jw16f6t0.js → chunk-nhwhkx62.js} +1 -1
  52. package/bundle/{chunk-41x11r2s.js → chunk-pnpre7ys.js} +1 -1
  53. package/bundle/{chunk-5yfzzmv0.js → chunk-pr1ysgr3.js} +1 -1
  54. package/bundle/{chunk-3bnqw3xp.js → chunk-px8vtbmr.js} +1 -1
  55. package/bundle/{chunk-132tcp2j.js → chunk-qpzspr9z.js} +1 -1
  56. package/bundle/{chunk-b4ysd5b4.js → chunk-qq2rcxv2.js} +1 -1
  57. package/bundle/{chunk-shwjjrj8.js → chunk-qy1a2tpc.js} +1 -1
  58. package/bundle/{chunk-vcrakhgy.js → chunk-qyjt0qnq.js} +1 -1
  59. package/bundle/{chunk-mvsrzvc4.js → chunk-r0g5yyhf.js} +1 -1
  60. package/bundle/{chunk-tqazneg6.js → chunk-rnd5mnsm.js} +1 -1
  61. package/bundle/{chunk-sy3n0qhc.js → chunk-rtdym35y.js} +5 -5
  62. package/bundle/{chunk-cjxcnhmq.js → chunk-s2xdf6qh.js} +1 -1
  63. package/bundle/{chunk-vdpd4akk.js → chunk-sp8ek94w.js} +1 -1
  64. package/bundle/chunk-sv1s1qxd.js +619 -0
  65. package/bundle/chunk-sxwqrvmy.js +28 -0
  66. package/bundle/{chunk-v8dd6tyn.js → chunk-sxy4hyyy.js} +1 -1
  67. package/bundle/{chunk-bcs2gvmp.js → chunk-syc4b8rt.js} +1 -1
  68. package/bundle/{chunk-jr2q5295.js → chunk-tcs6wgna.js} +1 -1
  69. package/bundle/{chunk-xqwvx3qq.js → chunk-twhavv1m.js} +1 -1
  70. package/bundle/{chunk-w24660y4.js → chunk-tzrbb0e8.js} +1 -1
  71. package/bundle/chunk-v0yxkq99.js +3 -0
  72. package/bundle/{chunk-f36ctnbp.js → chunk-v7q3d3n6.js} +1 -1
  73. package/bundle/{chunk-hbh2034m.js → chunk-vvzbfv2f.js} +1 -1
  74. package/bundle/{chunk-37dvnent.js → chunk-w8d9srv7.js} +1 -1
  75. package/bundle/{chunk-mqtqcc10.js → chunk-ws3p9cya.js} +1 -1
  76. package/bundle/{chunk-jxg15t11.js → chunk-x42w8ewc.js} +1 -1
  77. package/bundle/chunk-xc9se3c8.js +2 -0
  78. package/bundle/{chunk-e03tgfpb.js → chunk-xjhezxft.js} +6 -6
  79. package/bundle/{chunk-pq3qwxa8.js → chunk-xxvqq7kc.js} +1 -1
  80. package/bundle/{chunk-b0x888w9.js → chunk-ye0mkqb4.js} +1 -1
  81. package/bundle/{chunk-a42q5mx4.js → chunk-ypk3t1eh.js} +1 -1
  82. package/bundle/{chunk-et7kz7kx.js → chunk-yzn08nx1.js} +1 -1
  83. package/bundle/{chunk-rqmvj7f4.js → chunk-z0tfsdb9.js} +1 -1
  84. package/bundle/{chunk-p8czsxp0.js → chunk-z210dtw1.js} +1 -1
  85. package/bundle/{chunk-5pkg052s.js → chunk-z7vv0ngm.js} +1 -1
  86. package/bundle/{chunk-24rw1br0.js → chunk-ztnepaqc.js} +1 -1
  87. package/bundle/{chunk-r3df289z.js → chunk-zwvwbrsc.js} +1 -1
  88. package/bundle/index.js +3 -3
  89. package/bundle/worker.js +1 -1
  90. package/package.json +1 -1
  91. package/bundle/chunk-0j6dhrew.js +0 -2
  92. package/bundle/chunk-4kqdzdv5.js +0 -3
  93. package/bundle/chunk-7cbj28fp.js +0 -2
  94. package/bundle/chunk-9yakc5yv.js +0 -28
  95. package/bundle/chunk-b1qhpxee.js +0 -2
  96. package/bundle/chunk-d72rty3t.js +0 -2
  97. package/bundle/chunk-dj951pms.js +0 -2
  98. package/bundle/chunk-ec7pznsp.js +0 -2
  99. package/bundle/chunk-gvtjxg0d.js +0 -2
  100. package/bundle/chunk-j21dnncc.js +0 -4
  101. package/bundle/chunk-qp9y0g73.js +0 -3
  102. package/bundle/chunk-t0jjes17.js +0 -2
  103. package/bundle/chunk-w57j3pgz.js +0 -616
  104. package/bundle/chunk-yg9c1v8v.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$j as F0,Ak as M8,Bk as c7,Ck as yZ,Dk as TZ,Ek as MX,Fk as wX,Gk as RX,Hk as LX,Ik as NX,Jk as uV,Kk as vV,Lj as P$,Mj as r8,Mk as E$,Nk as jB,Ok as UB,Qk as yJ,Rk as xX,Sk as bX,Tj as Hq,Tk as vX,Uj as WV,Vj as _7,Vk as Z4,Zj as J1,Zk as WX,_k as hX,ak as IJ,bk as f2,bl as L1,dl as z2,ek as b0,el as HB,fk as z8,gl as H1,ik as xK,il as E0,jk as bK,kk as R1,lk as bV,nk as I6,ok as GB,pl as cX,qk as XB,ql as lX,rk as WB,rl as Y1,sl as R$,tk as zZ,uk as CZ,vk as oG,yk as NZ,zk as Q1}from"./chunk-sy3n0qhc.js";import{tl as f9}from"./chunk-364ccew0.js";import{Gl as SG,Hl as mB,Kl as V0,Ll as e$,Ml as $1,Nl as JJ,Sl as z$,Tl as HJ,Wl as U2,am as B$,bm as i,dm as O1}from"./chunk-vdpd4akk.js";import{fm as M9,gm as u6,hm as S1,im as XJ,mm as Z0}from"./chunk-yjp0btmq.js";import{An as JZ,Gn as f7,Tn as m1,Un as O8,Vm as f1,pn as t0,qn as i$,rn as e0,sn as b2,tn as BX,um as UX,vn as G$,xn as _0,yn as NJ}from"./chunk-1bx2sjn6.js";import{cp as m6}from"./chunk-t5tfppwv.js";import{Ap as U1,wp as YZ,xp as gV,yp as KZ}from"./chunk-qdcf1ay5.js";import{Bp as T2}from"./chunk-45mjcxqk.js";import{Cp as x$}from"./chunk-qqne79vp.js";import{sq as e}from"./chunk-e03tgfpb.js";import{cs as VB}from"./chunk-w9pdvcf9.js";import{ns as HZ}from"./chunk-brh35yt5.js";import{Fs as G2,Gs as ZV,Ms as v1,Ns as X2}from"./chunk-xdjwapwy.js";import{lt as jZ,ut as D0}from"./chunk-7dep7g7c.js";import{vt as SB,zt as _9}from"./chunk-tabcpx7t.js";import{Ot as o9}from"./chunk-3sz6gw10.js";import{Qt as zB}from"./chunk-xqwvx3qq.js";import{$t as F9,Rt as E2,Ut as p9,Vt as YB,Yt as KB,Zt as QB,pu as BK}from"./chunk-qp9y0g73.js";import{qu as zG}from"./chunk-xyjehgzm.js";import{Bu as k$,Ku as O$}from"./chunk-j21dnncc.js";import{Nu as g9,Qu as y2,Ru as $$,Vu as O0,Zu as B8,_u as f$}from"./chunk-vc4e6xc4.js";import{$u as F}from"./chunk-hnz570f9.js";import{$C as p1,DL as BJ,HP as F$,LL as l$,MG as fB,NF as B0,UI as G,XL as JV,YC as ZB,aK as Z8,bG as UJ,mL as wU,nD as D$,nL as vG,oE as h2,qL as RU,rG as f,sL as qZ,uK as b1,wK as bG,yG as gB,zF as n0}from"./chunk-ydc6ypjt.js";import{aQ as x3}from"./chunk-ev3a2sxv.js";import{gQ as S9,hQ as p,iQ as o$,kQ as u0,lQ as w9,mQ as R9}from"./chunk-4sazy0nq.js";var LK=p((sS,I9)=>{function CK($){return Array.isArray($)?$:[$]}var T_=void 0,c6="",FK=" ",p6="\\",k_=/^\s+$/,E_=/(?:[^\\]|^)\\$/,x_=/^\\!/,b_=/^\\#/,v_=/\r?\n/g,h_=/^\.{0,2}\/|^\.{1,2}$/,g_=/\/$/,WJ="/",MK="node-ignore";if(typeof Symbol<"u")MK=Symbol.for("node-ignore");var DK=MK,jJ=($,J,Z)=>{return Object.defineProperty($,J,{value:Z}),Z},f_=/([0-z])-([0-z])/g,PK=()=>!1,m_=($)=>$.replace(f_,(J,Z,Y)=>Z.charCodeAt(0)<=Y.charCodeAt(0)?J:c6),u_=($)=>{let{length:J}=$;return $.slice(0,J-J%2)},d_=[[/^\uFEFF/,()=>c6],[/((?:\\\\)*?)(\\?\s+)$/,($,J,Z)=>J+(Z.indexOf("\\")===0?FK:c6)],[/(\\+?)\s/g,($,J)=>{let{length:Z}=J;return J.slice(0,Z-Z%2)+FK}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,J,Z)=>J+6<Z.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,J,Z)=>{let Y=Z.replace(/\\\*/g,"[^\\/]*");return J+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p6],[/\\\\/g,()=>p6],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,J,Z,Y,K)=>J===p6?`\\[${Z}${u_(Y)}${K}`:K==="]"?Y.length%2===0?`[${m_(Z)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],p_=/(^|\\\/)?\\\*$/,Y8="regex",D9="checkRegex",zK="_",c_={[Y8]($,J){return`${J?`${J}[^/]+`:"[^/]*"}(?=$|\\/$)`},[D9]($,J){return`${J?`${J}[^/]*`:"[^/]*"}(?=$|\\/$)`}},l_=($)=>d_.reduce((J,[Z,Y])=>J.replace(Z,Y.bind($)),$),P9=($)=>typeof $==="string",o_=($)=>$&&P9($)&&!k_.test($)&&!E_.test($)&&$.indexOf("#")!==0,r_=($)=>$.split(v_).filter(Boolean);class IK{constructor($,J,Z,Y,K,Q){this.pattern=$,this.mark=J,this.negative=K,jJ(this,"body",Z),jJ(this,"ignoreCase",Y),jJ(this,"regexPrefix",Q)}get regex(){let $=zK+Y8;if(this[$])return this[$];return this._make(Y8,$)}get checkRegex(){let $=zK+D9;if(this[$])return this[$];return this._make(D9,$)}_make($,J){let Z=this.regexPrefix.replace(p_,c_[$]),Y=this.ignoreCase?new RegExp(Z,"i"):new RegExp(Z);return jJ(this,J,Y)}}var i_=({pattern:$,mark:J},Z)=>{let Y=!1,K=$;if(K.indexOf("!")===0)Y=!0,K=K.substr(1);K=K.replace(x_,"!").replace(b_,"#");let Q=l_(K);return new IK($,J,K,Z,Y,Q)};class AK{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[DK]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(P9($))$={pattern:$};if(o_($.pattern)){let J=i_($,this._ignoreCase);this._added=!0,this._rules.push(J)}}add($){return this._added=!1,CK(P9($)?r_($):$).forEach(this._add,this),this._added}test($,J,Z){let Y=!1,K=!1,Q;this._rules.forEach((X)=>{let{negative:W}=X;if(K===W&&Y!==K||W&&!Y&&!K&&!J)return;if(!X[Z].test($))return;Y=!W,K=W,Q=W?T_:X});let V={ignored:Y,unignored:K};if(Q)V.rule=Q;return V}}var s_=($,J)=>{throw new J($)},h1=($,J,Z)=>{if(!P9($))return Z(`path must be a string, but got \`${J}\``,TypeError);if(!$)return Z("path must not be empty",TypeError);if(h1.isNotRelative($))return Z(`path should be a \`path.relative()\`d string, but got "${J}"`,RangeError);return!0},SK=($)=>h_.test($);h1.isNotRelative=SK;h1.convert=($)=>$;class wK{constructor({ignorecase:$=!0,ignoreCase:J=$,allowRelativePaths:Z=!1}={}){jJ(this,DK,!0),this._rules=new AK(J),this._strictPathCheck=!Z,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,J,Z,Y){let K=$&&h1.convert($);return h1(K,$,this._strictPathCheck?s_:PK),this._t(K,J,Z,Y)}checkIgnore($){if(!g_.test($))return this.test($);let J=$.split(WJ).filter(Boolean);if(J.pop(),J.length){let Z=this._t(J.join(WJ)+WJ,this._testCache,!0,J);if(Z.ignored)return Z}return this._rules.test($,!1,D9)}_t($,J,Z,Y){if($ in J)return J[$];if(!Y)Y=$.split(WJ).filter(Boolean);if(Y.pop(),!Y.length)return J[$]=this._rules.test($,Z,Y8);let K=this._t(Y.join(WJ)+WJ,J,Z,Y);return J[$]=K.ignored?K:this._rules.test($,Z,Y8)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return CK($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var l6=($)=>new wK($),n_=($)=>h1($&&h1.convert($),$,PK),RK=()=>{let $=(Z)=>/^\\\\\?\\/.test(Z)||/["<>|\u0000-\u001F]+/u.test(Z)?Z:Z.replace(/\\/g,"/");h1.convert=$;let J=/^[a-z]:\//i;h1.isNotRelative=(Z)=>J.test(Z)||SK(Z)};if(typeof process<"u"&&process.platform==="win32")RK();I9.exports=l6;l6.default=l6;I9.exports.isPathValid=n_;jJ(I9.exports,Symbol.for("setupWindows"),RK)});var L9=p((D4)=>{D4.isInteger=($)=>{if(typeof $==="number")return Number.isInteger($);if(typeof $==="string"&&$.trim()!=="")return Number.isInteger(Number($));return!1};D4.find=($,J)=>$.nodes.find((Z)=>Z.type===J);D4.exceedsLimit=($,J,Z=1,Y)=>{if(Y===!1)return!1;if(!D4.isInteger($)||!D4.isInteger(J))return!1;return(Number(J)-Number($))/Number(Z)>=Y};D4.escapeNode=($,J=0,Z)=>{let Y=$.nodes[J];if(!Y)return;if(Z&&Y.type===Z||Y.type==="open"||Y.type==="close"){if(Y.escaped!==!0)Y.value="\\"+Y.value,Y.escaped=!0}};D4.encloseBrace=($)=>{if($.type!=="brace")return!1;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;return!1};D4.isInvalidBrace=($)=>{if($.type!=="brace")return!1;if($.invalid===!0||$.dollar)return!0;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;if($.open!==!0||$.close!==!0)return $.invalid=!0,!0;return!1};D4.isOpenOrClose=($)=>{if($.type==="open"||$.type==="close")return!0;return $.open===!0||$.close===!0};D4.reduce=($)=>$.reduce((J,Z)=>{if(Z.type==="text")J.push(Z.value);if(Z.type==="range")Z.type="text";return J},[]);D4.flatten=(...$)=>{let J=[],Z=(Y)=>{for(let K=0;K<Y.length;K++){let Q=Y[K];if(Array.isArray(Q)){Z(Q);continue}if(Q!==void 0)J.push(Q)}return J};return Z($),J}});var N9=p((Hw,mK)=>{var fK=L9();mK.exports=($,J={})=>{let Z=(Y,K={})=>{let Q=J.escapeInvalid&&fK.isInvalidBrace(K),V=Y.invalid===!0&&J.escapeInvalid===!0,X="";if(Y.value){if((Q||V)&&fK.isOpenOrClose(Y))return"\\"+Y.value;return Y.value}if(Y.value)return Y.value;if(Y.nodes)for(let W of Y.nodes)X+=Z(W);return X};return Z($)}});var dK=p((_w,uK)=>{/*!
2
+ import{$j as F0,Ak as M8,Bk as c7,Ck as yZ,Dk as TZ,Ek as MX,Fk as wX,Gk as RX,Hk as LX,Ik as NX,Jk as uV,Kk as vV,Lj as P$,Mj as r8,Mk as E$,Nk as jB,Ok as UB,Qk as yJ,Rk as xX,Sk as bX,Tj as Hq,Tk as vX,Uj as WV,Vj as _7,Vk as Z4,Zj as J1,Zk as WX,_k as hX,ak as IJ,bk as f2,bl as L1,dl as z2,ek as b0,el as HB,fk as z8,gl as H1,ik as xK,il as w0,jk as bK,kk as R1,lk as bV,nk as I6,ok as GB,pl as cX,qk as XB,ql as lX,rk as WB,rl as Y1,sl as R$,tk as zZ,uk as CZ,vk as oG,yk as NZ,zk as Q1}from"./chunk-rtdym35y.js";import{tl as f9}from"./chunk-5myxjxae.js";import{Gl as SG,Hl as mB,Kl as V0,Ll as e$,Ml as $1,Nl as JJ,Sl as z$,Tl as HJ,Wl as U2,am as B$,bm as i,dm as O1}from"./chunk-sp8ek94w.js";import{fm as M9,gm as u6,hm as S1,im as XJ,mm as Z0}from"./chunk-gnt982jr.js";import{An as JZ,Gn as f7,Tn as m1,Un as O8,Vm as f1,pn as t0,qn as i$,rn as e0,sn as b2,tn as BX,um as UX,vn as G$,xn as _0,yn as NJ}from"./chunk-1bx2sjn6.js";import{cp as m6}from"./chunk-n38h109k.js";import{Ap as U1,wp as YZ,xp as gV,yp as KZ}from"./chunk-qdcf1ay5.js";import{Bp as T2}from"./chunk-45mjcxqk.js";import{Cp as x$}from"./chunk-qqne79vp.js";import{sq as e}from"./chunk-xjhezxft.js";import{cs as VB}from"./chunk-w9pdvcf9.js";import{ns as HZ}from"./chunk-kb6v5hhm.js";import{Fs as G2,Gs as ZV,Ms as v1,Ns as X2}from"./chunk-xdjwapwy.js";import{lt as jZ,ut as D0}from"./chunk-cxtxvt43.js";import{vt as SB,zt as _9}from"./chunk-871f8x99.js";import{Ot as o9}from"./chunk-3sz6gw10.js";import{Qt as zB}from"./chunk-twhavv1m.js";import{$t as F9,Rt as E2,Ut as p9,Vt as YB,Yt as KB,Zt as QB,pu as BK}from"./chunk-v0yxkq99.js";import{qu as zG}from"./chunk-2pzvcpv4.js";import{Bu as k$,Ku as O$}from"./chunk-kmtfdky8.js";import{Nu as g9,Qu as y2,Ru as $$,Vu as O0,Zu as B8,_u as f$}from"./chunk-vc4e6xc4.js";import{$u as F}from"./chunk-hnz570f9.js";import{$C as p1,DL as BJ,HP as F$,LL as l$,MG as fB,NF as B0,UI as G,XL as JV,YC as ZB,aK as Z8,bG as UJ,mL as wU,nD as D$,nL as vG,oE as h2,qL as RU,rG as f,sL as qZ,uK as b1,wK as bG,yG as gB,zF as u0}from"./chunk-ydc6ypjt.js";import{aQ as x3}from"./chunk-ev3a2sxv.js";import{gQ as S9,hQ as p,iQ as o$,kQ as d0,lQ as w9,mQ as R9}from"./chunk-4sazy0nq.js";var LK=p((sS,I9)=>{function CK($){return Array.isArray($)?$:[$]}var T_=void 0,c6="",FK=" ",p6="\\",k_=/^\s+$/,E_=/(?:[^\\]|^)\\$/,x_=/^\\!/,b_=/^\\#/,v_=/\r?\n/g,h_=/^\.{0,2}\/|^\.{1,2}$/,g_=/\/$/,WJ="/",MK="node-ignore";if(typeof Symbol<"u")MK=Symbol.for("node-ignore");var DK=MK,jJ=($,J,Z)=>{return Object.defineProperty($,J,{value:Z}),Z},f_=/([0-z])-([0-z])/g,PK=()=>!1,m_=($)=>$.replace(f_,(J,Z,Y)=>Z.charCodeAt(0)<=Y.charCodeAt(0)?J:c6),u_=($)=>{let{length:J}=$;return $.slice(0,J-J%2)},d_=[[/^\uFEFF/,()=>c6],[/((?:\\\\)*?)(\\?\s+)$/,($,J,Z)=>J+(Z.indexOf("\\")===0?FK:c6)],[/(\\+?)\s/g,($,J)=>{let{length:Z}=J;return J.slice(0,Z-Z%2)+FK}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,J,Z)=>J+6<Z.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,J,Z)=>{let Y=Z.replace(/\\\*/g,"[^\\/]*");return J+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>p6],[/\\\\/g,()=>p6],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,J,Z,Y,K)=>J===p6?`\\[${Z}${u_(Y)}${K}`:K==="]"?Y.length%2===0?`[${m_(Z)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],p_=/(^|\\\/)?\\\*$/,Y8="regex",D9="checkRegex",zK="_",c_={[Y8]($,J){return`${J?`${J}[^/]+`:"[^/]*"}(?=$|\\/$)`},[D9]($,J){return`${J?`${J}[^/]*`:"[^/]*"}(?=$|\\/$)`}},l_=($)=>d_.reduce((J,[Z,Y])=>J.replace(Z,Y.bind($)),$),P9=($)=>typeof $==="string",o_=($)=>$&&P9($)&&!k_.test($)&&!E_.test($)&&$.indexOf("#")!==0,r_=($)=>$.split(v_).filter(Boolean);class IK{constructor($,J,Z,Y,K,Q){this.pattern=$,this.mark=J,this.negative=K,jJ(this,"body",Z),jJ(this,"ignoreCase",Y),jJ(this,"regexPrefix",Q)}get regex(){let $=zK+Y8;if(this[$])return this[$];return this._make(Y8,$)}get checkRegex(){let $=zK+D9;if(this[$])return this[$];return this._make(D9,$)}_make($,J){let Z=this.regexPrefix.replace(p_,c_[$]),Y=this.ignoreCase?new RegExp(Z,"i"):new RegExp(Z);return jJ(this,J,Y)}}var i_=({pattern:$,mark:J},Z)=>{let Y=!1,K=$;if(K.indexOf("!")===0)Y=!0,K=K.substr(1);K=K.replace(x_,"!").replace(b_,"#");let Q=l_(K);return new IK($,J,K,Z,Y,Q)};class AK{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[DK]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(P9($))$={pattern:$};if(o_($.pattern)){let J=i_($,this._ignoreCase);this._added=!0,this._rules.push(J)}}add($){return this._added=!1,CK(P9($)?r_($):$).forEach(this._add,this),this._added}test($,J,Z){let Y=!1,K=!1,Q;this._rules.forEach((X)=>{let{negative:W}=X;if(K===W&&Y!==K||W&&!Y&&!K&&!J)return;if(!X[Z].test($))return;Y=!W,K=W,Q=W?T_:X});let V={ignored:Y,unignored:K};if(Q)V.rule=Q;return V}}var s_=($,J)=>{throw new J($)},h1=($,J,Z)=>{if(!P9($))return Z(`path must be a string, but got \`${J}\``,TypeError);if(!$)return Z("path must not be empty",TypeError);if(h1.isNotRelative($))return Z(`path should be a \`path.relative()\`d string, but got "${J}"`,RangeError);return!0},SK=($)=>h_.test($);h1.isNotRelative=SK;h1.convert=($)=>$;class wK{constructor({ignorecase:$=!0,ignoreCase:J=$,allowRelativePaths:Z=!1}={}){jJ(this,DK,!0),this._rules=new AK(J),this._strictPathCheck=!Z,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,J,Z,Y){let K=$&&h1.convert($);return h1(K,$,this._strictPathCheck?s_:PK),this._t(K,J,Z,Y)}checkIgnore($){if(!g_.test($))return this.test($);let J=$.split(WJ).filter(Boolean);if(J.pop(),J.length){let Z=this._t(J.join(WJ)+WJ,this._testCache,!0,J);if(Z.ignored)return Z}return this._rules.test($,!1,D9)}_t($,J,Z,Y){if($ in J)return J[$];if(!Y)Y=$.split(WJ).filter(Boolean);if(Y.pop(),!Y.length)return J[$]=this._rules.test($,Z,Y8);let K=this._t(Y.join(WJ)+WJ,J,Z,Y);return J[$]=K.ignored?K:this._rules.test($,Z,Y8)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return CK($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var l6=($)=>new wK($),n_=($)=>h1($&&h1.convert($),$,PK),RK=()=>{let $=(Z)=>/^\\\\\?\\/.test(Z)||/["<>|\u0000-\u001F]+/u.test(Z)?Z:Z.replace(/\\/g,"/");h1.convert=$;let J=/^[a-z]:\//i;h1.isNotRelative=(Z)=>J.test(Z)||SK(Z)};if(typeof process<"u"&&process.platform==="win32")RK();I9.exports=l6;l6.default=l6;I9.exports.isPathValid=n_;jJ(I9.exports,Symbol.for("setupWindows"),RK)});var L9=p((D4)=>{D4.isInteger=($)=>{if(typeof $==="number")return Number.isInteger($);if(typeof $==="string"&&$.trim()!=="")return Number.isInteger(Number($));return!1};D4.find=($,J)=>$.nodes.find((Z)=>Z.type===J);D4.exceedsLimit=($,J,Z=1,Y)=>{if(Y===!1)return!1;if(!D4.isInteger($)||!D4.isInteger(J))return!1;return(Number(J)-Number($))/Number(Z)>=Y};D4.escapeNode=($,J=0,Z)=>{let Y=$.nodes[J];if(!Y)return;if(Z&&Y.type===Z||Y.type==="open"||Y.type==="close"){if(Y.escaped!==!0)Y.value="\\"+Y.value,Y.escaped=!0}};D4.encloseBrace=($)=>{if($.type!=="brace")return!1;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;return!1};D4.isInvalidBrace=($)=>{if($.type!=="brace")return!1;if($.invalid===!0||$.dollar)return!0;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;if($.open!==!0||$.close!==!0)return $.invalid=!0,!0;return!1};D4.isOpenOrClose=($)=>{if($.type==="open"||$.type==="close")return!0;return $.open===!0||$.close===!0};D4.reduce=($)=>$.reduce((J,Z)=>{if(Z.type==="text")J.push(Z.value);if(Z.type==="range")Z.type="text";return J},[]);D4.flatten=(...$)=>{let J=[],Z=(Y)=>{for(let K=0;K<Y.length;K++){let Q=Y[K];if(Array.isArray(Q)){Z(Q);continue}if(Q!==void 0)J.push(Q)}return J};return Z($),J}});var N9=p((Hw,mK)=>{var fK=L9();mK.exports=($,J={})=>{let Z=(Y,K={})=>{let Q=J.escapeInvalid&&fK.isInvalidBrace(K),V=Y.invalid===!0&&J.escapeInvalid===!0,X="";if(Y.value){if((Q||V)&&fK.isOpenOrClose(Y))return"\\"+Y.value;return Y.value}if(Y.value)return Y.value;if(Y.nodes)for(let W of Y.nodes)X+=Z(W);return X};return Z($)}});var dK=p((_w,uK)=>{/*!
3
3
  * is-number <https://github.com/jonschlinkert/is-number>
4
4
  *
5
5
  * Copyright (c) 2014-present, Jon Schlinkert.
@@ -14,8 +14,8 @@ import{$j as F0,Ak as M8,Bk as c7,Ck as yZ,Dk as TZ,Ek as MX,Fk as wX,Gk as RX,H
14
14
  *
15
15
  * Copyright (c) 2014-present, Jon Schlinkert.
16
16
  * Licensed under the MIT License.
17
- */var h4=u0("util"),eK=aK(),tK=($)=>$!==null&&typeof $==="object"&&!Array.isArray($),g4=($)=>{return(J)=>$===!0?Number(J):String(J)},n6=($)=>{return typeof $==="number"||typeof $==="string"&&$!==""},V8=($)=>Number.isInteger(+$),a6=($)=>{let J=`${$}`,Z=-1;if(J[0]==="-")J=J.slice(1);if(J==="0")return!1;while(J[++Z]==="0");return Z>0},f4=($,J,Z)=>{if(typeof $==="string"||typeof J==="string")return!0;return Z.stringify===!0},m4=($,J,Z)=>{if(J>0){let Y=$[0]==="-"?"-":"";if(Y)$=$.slice(1);$=Y+$.padStart(Y?J-1:J,"0")}if(Z===!1)return String($);return $},T9=($,J)=>{let Z=$[0]==="-"?"-":"";if(Z)$=$.slice(1),J--;while($.length<J)$="0"+$;return Z?"-"+$:$},u4=($,J,Z)=>{$.negatives.sort((X,W)=>X<W?-1:X>W?1:0),$.positives.sort((X,W)=>X<W?-1:X>W?1:0);let Y=J.capture?"":"?:",K="",Q="",V;if($.positives.length)K=$.positives.map((X)=>T9(String(X),Z)).join("|");if($.negatives.length)Q=`-(${Y}${$.negatives.map((X)=>T9(String(X),Z)).join("|")})`;if(K&&Q)V=`${K}|${Q}`;else V=K||Q;if(J.wrap)return`(${Y}${V})`;return V},$Q=($,J,Z,Y)=>{if(Z)return eK($,J,{wrap:!1,...Y});let K=String.fromCharCode($);if($===J)return K;let Q=String.fromCharCode(J);return`[${K}-${Q}]`},JQ=($,J,Z)=>{if(Array.isArray($)){let Y=Z.wrap===!0,K=Z.capture?"":"?:";return Y?`(${K}${$.join("|")})`:$.join("|")}return eK($,J,Z)},ZQ=(...$)=>{return RangeError("Invalid range arguments: "+h4.inspect(...$))},YQ=($,J,Z)=>{if(Z.strictRanges===!0)throw ZQ([$,J]);return[]},d4=($,J)=>{if(J.strictRanges===!0)throw TypeError(`Expected step "${$}" to be a number`);return[]},p4=($,J,Z=1,Y={})=>{let K=Number($),Q=Number(J);if(!Number.isInteger(K)||!Number.isInteger(Q)){if(Y.strictRanges===!0)throw ZQ([$,J]);return[]}if(K===0)K=0;if(Q===0)Q=0;let V=K>Q,X=String($),W=String(J),_=String(Z);Z=Math.max(Math.abs(Z),1);let j=a6(X)||a6(W)||a6(_),H=j?Math.max(X.length,W.length,_.length):0,q=j===!1&&f4($,J,Y)===!1,U=Y.transform||g4(q);if(Y.toRegex&&Z===1)return $Q(T9($,H),T9(J,H),!0,Y);let z={negatives:[],positives:[]},M=(P)=>z[P<0?"negatives":"positives"].push(Math.abs(P)),I=[],C=0;while(V?K>=Q:K<=Q){if(Y.toRegex===!0&&Z>1)M(K);else I.push(m4(U(K,C),H,q));K=V?K-Z:K+Z,C++}if(Y.toRegex===!0)return Z>1?u4(z,Y,H):JQ(I,null,{wrap:!1,...Y});return I},c4=($,J,Z=1,Y={})=>{if(!V8($)&&$.length>1||!V8(J)&&J.length>1)return YQ($,J,Y);let K=Y.transform||((q)=>String.fromCharCode(q)),Q=`${$}`.charCodeAt(0),V=`${J}`.charCodeAt(0),X=Q>V,W=Math.min(Q,V),_=Math.max(Q,V);if(Y.toRegex&&Z===1)return $Q(W,_,!1,Y);let j=[],H=0;while(X?Q>=V:Q<=V)j.push(K(Q,H)),Q=X?Q-Z:Q+Z,H++;if(Y.toRegex===!0)return JQ(j,null,{wrap:!1,options:Y});return j},y9=($,J,Z,Y={})=>{if(J==null&&n6($))return[$];if(!n6($)||!n6(J))return YQ($,J,Y);if(typeof Z==="function")return y9($,J,1,{transform:Z});if(tK(Z))return y9($,J,0,Z);let K={...Y};if(K.capture===!0)K.wrap=!0;if(Z=Z||K.step||1,!V8(Z)){if(Z!=null&&!tK(Z))return d4(Z,K);return y9($,J,1,Z)}if(V8($)&&V8(J))return p4($,J,Z,K);return c4($,J,Math.max(Math.abs(Z),1),K)};KQ.exports=y9});var GQ=p((Fw,VQ)=>{var l4=t6(),QQ=L9(),o4=($,J={})=>{let Z=(Y,K={})=>{let Q=QQ.isInvalidBrace(K),V=Y.invalid===!0&&J.escapeInvalid===!0,X=Q===!0||V===!0,W=J.escapeInvalid===!0?"\\":"",_="";if(Y.isOpen===!0)return W+Y.value;if(Y.isClose===!0)return console.log("node.isClose",W,Y.value),W+Y.value;if(Y.type==="open")return X?W+Y.value:"(";if(Y.type==="close")return X?W+Y.value:")";if(Y.type==="comma")return Y.prev.type==="comma"?"":X?Y.value:"|";if(Y.value)return Y.value;if(Y.nodes&&Y.ranges>0){let j=QQ.reduce(Y.nodes),H=l4(...j,{...J,wrap:!1,toRegex:!0,strictZeros:!0});if(H.length!==0)return j.length>1&&H.length>1?`(${H})`:H}if(Y.nodes)for(let j of Y.nodes)_+=Z(j,Y);return _};return Z($)};VQ.exports=o4});var jQ=p((zw,WQ)=>{var r4=t6(),XQ=N9(),_J=L9(),L2=($="",J="",Z=!1)=>{let Y=[];if($=[].concat($),J=[].concat(J),!J.length)return $;if(!$.length)return Z?_J.flatten(J).map((K)=>`{${K}}`):J;for(let K of $)if(Array.isArray(K))for(let Q of K)Y.push(L2(Q,J,Z));else for(let Q of J){if(Z===!0&&typeof Q==="string")Q=`{${Q}}`;Y.push(Array.isArray(Q)?L2(K,Q,Z):K+Q)}return _J.flatten(Y)},i4=($,J={})=>{let Z=J.rangeLimit===void 0?1000:J.rangeLimit,Y=(K,Q={})=>{K.queue=[];let V=Q,X=Q.queue;while(V.type!=="brace"&&V.type!=="root"&&V.parent)V=V.parent,X=V.queue;if(K.invalid||K.dollar){X.push(L2(X.pop(),XQ(K,J)));return}if(K.type==="brace"&&K.invalid!==!0&&K.nodes.length===2){X.push(L2(X.pop(),["{}"]));return}if(K.nodes&&K.ranges>0){let H=_J.reduce(K.nodes);if(_J.exceedsLimit(...H,J.step,Z))throw RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let q=r4(...H,J);if(q.length===0)q=XQ(K,J);X.push(L2(X.pop(),q)),K.nodes=[];return}let W=_J.encloseBrace(K),_=K.queue,j=K;while(j.type!=="brace"&&j.type!=="root"&&j.parent)j=j.parent,_=j.queue;for(let H=0;H<K.nodes.length;H++){let q=K.nodes[H];if(q.type==="comma"&&K.type==="brace"){if(H===1)_.push("");_.push("");continue}if(q.type==="close"){X.push(L2(X.pop(),_,W));continue}if(q.value&&q.type!=="open"){_.push(L2(_.pop(),q.value));continue}if(q.nodes)Y(q,K)}return _};return _J.flatten(Y($))};WQ.exports=i4});var BQ=p((Cw,UQ)=>{UQ.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
18
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var FQ=p((Mw,qQ)=>{var s4=N9(),{MAX_LENGTH:HQ,CHAR_BACKSLASH:e6,CHAR_BACKTICK:n4,CHAR_COMMA:a4,CHAR_DOT:t4,CHAR_LEFT_PARENTHESES:e4,CHAR_RIGHT_PARENTHESES:$O,CHAR_LEFT_CURLY_BRACE:JO,CHAR_RIGHT_CURLY_BRACE:ZO,CHAR_LEFT_SQUARE_BRACKET:_Q,CHAR_RIGHT_SQUARE_BRACKET:OQ,CHAR_DOUBLE_QUOTE:YO,CHAR_SINGLE_QUOTE:KO,CHAR_NO_BREAK_SPACE:QO,CHAR_ZERO_WIDTH_NOBREAK_SPACE:VO}=BQ(),GO=($,J={})=>{if(typeof $!=="string")throw TypeError("Expected a string");let Z=J||{},Y=typeof Z.maxLength==="number"?Math.min(HQ,Z.maxLength):HQ;if($.length>Y)throw SyntaxError(`Input length (${$.length}), exceeds max characters (${Y})`);let K={type:"root",input:$,nodes:[]},Q=[K],V=K,X=K,W=0,_=$.length,j=0,H=0,q,U=()=>$[j++],z=(M)=>{if(M.type==="text"&&X.type==="dot")X.type="text";if(X&&X.type==="text"&&M.type==="text"){X.value+=M.value;return}return V.nodes.push(M),M.parent=V,M.prev=X,X=M,M};z({type:"bos"});while(j<_){if(V=Q[Q.length-1],q=U(),q===VO||q===QO)continue;if(q===e6){z({type:"text",value:(J.keepEscaping?q:"")+U()});continue}if(q===OQ){z({type:"text",value:"\\"+q});continue}if(q===_Q){W++;let M;while(j<_&&(M=U())){if(q+=M,M===_Q){W++;continue}if(M===e6){q+=U();continue}if(M===OQ){if(W--,W===0)break}}z({type:"text",value:q});continue}if(q===e4){V=z({type:"paren",nodes:[]}),Q.push(V),z({type:"text",value:q});continue}if(q===$O){if(V.type!=="paren"){z({type:"text",value:q});continue}V=Q.pop(),z({type:"text",value:q}),V=Q[Q.length-1];continue}if(q===YO||q===KO||q===n4){let M=q,I;if(J.keepQuotes!==!0)q="";while(j<_&&(I=U())){if(I===e6){q+=I+U();continue}if(I===M){if(J.keepQuotes===!0)q+=I;break}q+=I}z({type:"text",value:q});continue}if(q===JO){H++;let I={type:"brace",open:!0,close:!1,dollar:X.value&&X.value.slice(-1)==="$"||V.dollar===!0,depth:H,commas:0,ranges:0,nodes:[]};V=z(I),Q.push(V),z({type:"open",value:q});continue}if(q===ZO){if(V.type!=="brace"){z({type:"text",value:q});continue}let M="close";V=Q.pop(),V.close=!0,z({type:M,value:q}),H--,V=Q[Q.length-1];continue}if(q===a4&&H>0){if(V.ranges>0){V.ranges=0;let M=V.nodes.shift();V.nodes=[M,{type:"text",value:s4(V)}]}z({type:"comma",value:q}),V.commas++;continue}if(q===t4&&H>0&&V.commas===0){let M=V.nodes;if(H===0||M.length===0){z({type:"text",value:q});continue}if(X.type==="dot"){if(V.range=[],X.value+=q,X.type="range",V.nodes.length!==3&&V.nodes.length!==5){V.invalid=!0,V.ranges=0,X.type="text";continue}V.ranges++,V.args=[];continue}if(X.type==="range"){M.pop();let I=M[M.length-1];I.value+=X.value+q,X=I,V.ranges--;continue}z({type:"dot",value:q});continue}z({type:"text",value:q})}do if(V=Q.pop(),V.type!=="root"){V.nodes.forEach((C)=>{if(!C.nodes){if(C.type==="open")C.isOpen=!0;if(C.type==="close")C.isClose=!0;if(!C.nodes)C.type="text";C.invalid=!0}});let M=Q[Q.length-1],I=M.nodes.indexOf(V);M.nodes.splice(I,1,...V.nodes)}while(Q.length>0);return z({type:"eos"}),K};qQ.exports=GO});var MQ=p((Dw,CQ)=>{var zQ=N9(),XO=GQ(),WO=jQ(),jO=FQ(),d0=($,J={})=>{let Z=[];if(Array.isArray($))for(let Y of $){let K=d0.create(Y,J);if(Array.isArray(K))Z.push(...K);else Z.push(K)}else Z=[].concat(d0.create($,J));if(J&&J.expand===!0&&J.nodupes===!0)Z=[...new Set(Z)];return Z};d0.parse=($,J={})=>jO($,J);d0.stringify=($,J={})=>{if(typeof $==="string")return zQ(d0.parse($,J),J);return zQ($,J)};d0.compile=($,J={})=>{if(typeof $==="string")$=d0.parse($,J);return XO($,J)};d0.expand=($,J={})=>{if(typeof $==="string")$=d0.parse($,J);let Z=WO($,J);if(J.noempty===!0)Z=Z.filter(Boolean);if(J.nodupes===!0)Z=[...new Set(Z)];return Z};d0.create=($,J={})=>{if($===""||$.length<3)return[$];return J.expand!==!0?d0.compile($,J):d0.expand($,J)};CQ.exports=d0});var G8=p((Pw,PQ)=>{var UO=u0("path"),DQ={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)"},BO={...DQ,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)"},HO={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};PQ.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:HO,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:UO.sep,extglobChars($){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${$.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars($){return $===!0?BO:DQ}}});var X8=p((MO)=>{var _O=u0("path"),OO=process.platform==="win32",{REGEX_BACKSLASH:qO,REGEX_REMOVE_BACKSLASH:FO,REGEX_SPECIAL_CHARS:zO,REGEX_SPECIAL_CHARS_GLOBAL:CO}=G8();MO.isObject=($)=>$!==null&&typeof $==="object"&&!Array.isArray($);MO.hasRegexChars=($)=>zO.test($);MO.isRegexChar=($)=>$.length===1&&MO.hasRegexChars($);MO.escapeRegex=($)=>$.replace(CO,"\\$1");MO.toPosixSlashes=($)=>$.replace(qO,"/");MO.removeBackslashes=($)=>{return $.replace(FO,(J)=>{return J==="\\"?"":J})};MO.supportsLookbehinds=()=>{let $=process.version.slice(1).split(".").map(Number);if($.length===3&&$[0]>=9||$[0]===8&&$[1]>=10)return!0;return!1};MO.isWindows=($)=>{if($&&typeof $.windows==="boolean")return $.windows;return OO===!0||_O.sep==="\\"};MO.escapeLast=($,J,Z)=>{let Y=$.lastIndexOf(J,Z);if(Y===-1)return $;if($[Y-1]==="\\")return MO.escapeLast($,J,Y-1);return`${$.slice(0,Y)}\\${$.slice(Y)}`};MO.removePrefix=($,J={})=>{let Z=$;if(Z.startsWith("./"))Z=Z.slice(2),J.prefix="./";return Z};MO.wrapOutput=($,J={},Z={})=>{let Y=Z.contains?"":"^",K=Z.contains?"":"$",Q=`${Y}(?:${$})${K}`;if(J.negated===!0)Q=`(?:^(?!${Q}).*$)`;return Q}});var kQ=p((Aw,TQ)=>{var SQ=X8(),{CHAR_ASTERISK:$7,CHAR_AT:yO,CHAR_BACKWARD_SLASH:W8,CHAR_COMMA:TO,CHAR_DOT:J7,CHAR_EXCLAMATION_MARK:Z7,CHAR_FORWARD_SLASH:yQ,CHAR_LEFT_CURLY_BRACE:Y7,CHAR_LEFT_PARENTHESES:K7,CHAR_LEFT_SQUARE_BRACKET:kO,CHAR_PLUS:EO,CHAR_QUESTION_MARK:wQ,CHAR_RIGHT_CURLY_BRACE:xO,CHAR_RIGHT_PARENTHESES:RQ,CHAR_RIGHT_SQUARE_BRACKET:bO}=G8(),LQ=($)=>{return $===yQ||$===W8},NQ=($)=>{if($.isPrefix!==!0)$.depth=$.isGlobstar?1/0:1},vO=($,J)=>{let Z=J||{},Y=$.length-1,K=Z.parts===!0||Z.scanToEnd===!0,Q=[],V=[],X=[],W=$,_=-1,j=0,H=0,q=!1,U=!1,z=!1,M=!1,I=!1,C=!1,P=!1,D=!1,L=!1,R=!1,N=0,x,b,v={value:"",depth:0,isGlob:!1},m=()=>_>=Y,A=()=>W.charCodeAt(_+1),u=()=>{return x=b,W.charCodeAt(++_)};while(_<Y){b=u();let A$;if(b===W8){if(P=v.backslashes=!0,b=u(),b===Y7)C=!0;continue}if(C===!0||b===Y7){N++;while(m()!==!0&&(b=u())){if(b===W8){P=v.backslashes=!0,u();continue}if(b===Y7){N++;continue}if(C!==!0&&b===J7&&(b=u())===J7){if(q=v.isBrace=!0,z=v.isGlob=!0,R=!0,K===!0)continue;break}if(C!==!0&&b===TO){if(q=v.isBrace=!0,z=v.isGlob=!0,R=!0,K===!0)continue;break}if(b===xO){if(N--,N===0){C=!1,q=v.isBrace=!0,R=!0;break}}}if(K===!0)continue;break}if(b===yQ){if(Q.push(_),V.push(v),v={value:"",depth:0,isGlob:!1},R===!0)continue;if(x===J7&&_===j+1){j+=2;continue}H=_+1;continue}if(Z.noext!==!0){if((b===EO||b===yO||b===$7||b===wQ||b===Z7)===!0&&A()===K7){if(z=v.isGlob=!0,M=v.isExtglob=!0,R=!0,b===Z7&&_===j)L=!0;if(K===!0){while(m()!==!0&&(b=u())){if(b===W8){P=v.backslashes=!0,b=u();continue}if(b===RQ){z=v.isGlob=!0,R=!0;break}}continue}break}}if(b===$7){if(x===$7)I=v.isGlobstar=!0;if(z=v.isGlob=!0,R=!0,K===!0)continue;break}if(b===wQ){if(z=v.isGlob=!0,R=!0,K===!0)continue;break}if(b===kO){while(m()!==!0&&(A$=u())){if(A$===W8){P=v.backslashes=!0,u();continue}if(A$===bO){U=v.isBracket=!0,z=v.isGlob=!0,R=!0;break}}if(K===!0)continue;break}if(Z.nonegate!==!0&&b===Z7&&_===j){D=v.negated=!0,j++;continue}if(Z.noparen!==!0&&b===K7){if(z=v.isGlob=!0,K===!0){while(m()!==!0&&(b=u())){if(b===K7){P=v.backslashes=!0,b=u();continue}if(b===RQ){R=!0;break}}continue}break}if(z===!0){if(R=!0,K===!0)continue;break}}if(Z.noext===!0)M=!1,z=!1;let r=W,S="",T="";if(j>0)S=W.slice(0,j),W=W.slice(j),H-=j;if(r&&z===!0&&H>0)r=W.slice(0,H),T=W.slice(H);else if(z===!0)r="",T=W;else r=W;if(r&&r!==""&&r!=="/"&&r!==W){if(LQ(r.charCodeAt(r.length-1)))r=r.slice(0,-1)}if(Z.unescape===!0){if(T)T=SQ.removeBackslashes(T);if(r&&P===!0)r=SQ.removeBackslashes(r)}let k={prefix:S,input:$,start:j,base:r,glob:T,isBrace:q,isBracket:U,isGlob:z,isExtglob:M,isGlobstar:I,negated:D,negatedExtglob:L};if(Z.tokens===!0){if(k.maxDepth=0,!LQ(b))V.push(v);k.tokens=V}if(Z.parts===!0||Z.tokens===!0){let A$;for(let s=0;s<Q.length;s++){let J$=A$?A$+1:j,Z$=Q[s],W$=$.slice(J$,Z$);if(Z.tokens){if(s===0&&j!==0)V[s].isPrefix=!0,V[s].value=S;else V[s].value=W$;NQ(V[s]),k.maxDepth+=V[s].depth}if(s!==0||W$!=="")X.push(W$);A$=Z$}if(A$&&A$+1<$.length){let s=$.slice(A$+1);if(X.push(s),Z.tokens)V[V.length-1].value=s,NQ(V[V.length-1]),k.maxDepth+=V[V.length-1].depth}k.slashes=Q,k.parts=X}return k};TQ.exports=vO});var hQ=p((Sw,vQ)=>{var j8=G8(),S0=X8(),{MAX_LENGTH:k9,POSIX_REGEX_SOURCE:hO,REGEX_NON_SPECIAL_CHARS:gO,REGEX_SPECIAL_CHARS_BACKREF:fO,REPLACEMENTS:EQ}=j8,mO=($,J)=>{if(typeof J.expandRange==="function")return J.expandRange(...$,J);$.sort();let Z=`[${$.join("-")}]`;try{new RegExp(Z)}catch(Y){return $.map((K)=>S0.escapeRegex(K)).join("..")}return Z},OJ=($,J)=>{return`Missing ${$}: "${J}" - use "\\\\${J}" to match literal characters`},xQ=($)=>{let J=[],Z=0,Y=0,K=0,Q="",V=!1;for(let X of $){if(V===!0){Q+=X,V=!1;continue}if(X==="\\"){Q+=X,V=!0;continue}if(X==='"'){K=K===1?0:1,Q+=X;continue}if(K===0){if(X==="[")Z++;else if(X==="]"&&Z>0)Z--;else if(Z===0){if(X==="(")Y++;else if(X===")"&&Y>0)Y--;else if(X==="|"&&Y===0){J.push(Q),Q="";continue}}}Q+=X}return J.push(Q),J},uO=($)=>{let J=!1;for(let Z of $){if(J===!0){J=!1;continue}if(Z==="\\"){J=!0;continue}if(/[?*+@!()[\]{}]/.test(Z))return!1}return!0},bQ=($)=>{let J=$.trim(),Z=!0;while(Z===!0)if(Z=!1,/^@\([^\\()[\]{}|]+\)$/.test(J))J=J.slice(2,-1),Z=!0;if(!uO(J))return;return J.replace(/\\(.)/g,"$1")},dO=($)=>{let J=$.map(bQ).filter(Boolean);for(let Z=0;Z<J.length;Z++)for(let Y=Z+1;Y<J.length;Y++){let K=J[Z],Q=J[Y],V=K[0];if(!V||K!==V.repeat(K.length)||Q!==V.repeat(Q.length))continue;if(K===Q||K.startsWith(Q)||Q.startsWith(K))return!0}return!1},Q7=($,J=!0)=>{if($[0]!=="+"&&$[0]!=="*"||$[1]!=="(")return;let Z=0,Y=0,K=0,Q=!1;for(let V=1;V<$.length;V++){let X=$[V];if(Q===!0){Q=!1;continue}if(X==="\\"){Q=!0;continue}if(X==='"'){K=K===1?0:1;continue}if(K===1)continue;if(X==="["){Z++;continue}if(X==="]"&&Z>0){Z--;continue}if(Z>0)continue;if(X==="("){Y++;continue}if(X===")"){if(Y--,Y===0){if(J===!0&&V!==$.length-1)return;return{type:$[0],body:$.slice(2,V),end:V}}}}},pO=($)=>{let J=0,Z=[];while(J<$.length){let K=Q7($.slice(J),!1);if(!K||K.type!=="*")return;let Q=xQ(K.body).map((X)=>X.trim());if(Q.length!==1)return;let V=bQ(Q[0]);if(!V||V.length!==1)return;Z.push(V),J+=K.end+1}if(Z.length<1)return;return`${Z.length===1?S0.escapeRegex(Z[0]):`[${Z.map((K)=>S0.escapeRegex(K)).join("")}]`}*`},cO=($)=>{let J=0,Z=$.trim(),Y=Q7(Z);while(Y)J++,Z=Y.body.trim(),Y=Q7(Z);return J},lO=($,J)=>{if(J.maxExtglobRecursion===!1)return{risky:!1};let Z=typeof J.maxExtglobRecursion==="number"?J.maxExtglobRecursion:j8.DEFAULT_MAX_EXTGLOB_RECURSION,Y=xQ($).map((K)=>K.trim());if(Y.length>1){if(Y.some((K)=>K==="")||Y.some((K)=>/^[*?]+$/.test(K))||dO(Y))return{risky:!0}}for(let K of Y){let Q=pO(K);if(Q)return{risky:!0,safeOutput:Q};if(cO(K)>Z)return{risky:!0}}return{risky:!1}},V7=($,J)=>{if(typeof $!=="string")throw TypeError("Expected a string");$=EQ[$]||$;let Z={...J},Y=typeof Z.maxLength==="number"?Math.min(k9,Z.maxLength):k9,K=$.length;if(K>Y)throw SyntaxError(`Input length: ${K}, exceeds maximum allowed length: ${Y}`);let Q={type:"bos",value:"",output:Z.prepend||""},V=[Q],X=Z.capture?"":"?:",W=S0.isWindows(J),_=j8.globChars(W),j=j8.extglobChars(_),{DOT_LITERAL:H,PLUS_LITERAL:q,SLASH_LITERAL:U,ONE_CHAR:z,DOTS_SLASH:M,NO_DOT:I,NO_DOT_SLASH:C,NO_DOTS_SLASH:P,QMARK:D,QMARK_NO_DOT:L,STAR:R,START_ANCHOR:N}=_,x=(d)=>{return`(${X}(?:(?!${N}${d.dot?M:H}).)*?)`},b=Z.dot?"":I,v=Z.dot?D:L,m=Z.bash===!0?x(Z):R;if(Z.capture)m=`(${m})`;if(typeof Z.noext==="boolean")Z.noextglob=Z.noext;let A={input:$,index:-1,start:0,dot:Z.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:V};$=S0.removePrefix($,A),K=$.length;let u=[],r=[],S=[],T=Q,k,A$=()=>A.index===K-1,s=A.peek=(d=1)=>$[A.index+d],J$=A.advance=()=>$[++A.index]||"",Z$=()=>$.slice(A.index+1),W$=(d="",Y$=0)=>{A.consumed+=d,A.index+=Y$},y$=(d)=>{A.output+=d.output!=null?d.output:d.value,W$(d.value)},Q$=()=>{let d=1;while(s()==="!"&&(s(2)!=="("||s(3)==="?"))J$(),A.start++,d++;if(d%2===0)return!1;return A.negated=!0,A.start++,!0},y=(d)=>{A[d]++,S.push(d)},n=(d)=>{A[d]--,S.pop()},a=(d)=>{if(T.type==="globstar"){let Y$=A.braces>0&&(d.type==="comma"||d.type==="brace"),g=d.extglob===!0||u.length&&(d.type==="pipe"||d.type==="paren");if(d.type!=="slash"&&d.type!=="paren"&&!Y$&&!g)A.output=A.output.slice(0,-T.output.length),T.type="star",T.value="*",T.output=m,A.output+=T.output}if(u.length&&d.type!=="paren")u[u.length-1].inner+=d.value;if(d.value||d.output)y$(d);if(T&&T.type==="text"&&d.type==="text"){T.value+=d.value,T.output=(T.output||"")+d.value;return}d.prev=T,V.push(d),T=d},c$=(d,Y$)=>{let g={...j[Y$],conditions:1,inner:""};g.prev=T,g.parens=A.parens,g.output=A.output,g.startIndex=A.index,g.tokensIndex=V.length;let t=(Z.capture?"(":"")+g.open;y("parens"),a({type:d,value:Y$,output:A.output?"":z}),a({type:"paren",extglob:!0,value:J$(),output:t}),u.push(g)},l=(d)=>{let Y$=$.slice(d.startIndex,A.index+1),g=$.slice(d.startIndex+2,A.index),t=lO(g,Z);if((d.type==="plus"||d.type==="star")&&t.risky){let M$=t.safeOutput?(d.output?"":z)+(Z.capture?`(${t.safeOutput})`:t.safeOutput):void 0,r$=V[d.tokensIndex];r$.type="text",r$.value=Y$,r$.output=M$||S0.escapeRegex(Y$);for(let K0=d.tokensIndex+1;K0<V.length;K0++)V[K0].value="",V[K0].output="",delete V[K0].suffix;A.output=d.output+r$.output,A.backtrack=!0,a({type:"paren",extglob:!0,value:k,output:""}),n("parens");return}let C$=d.close+(Z.capture?")":""),T$;if(d.type==="negate"){let M$=m;if(d.inner&&d.inner.length>1&&d.inner.includes("/"))M$=x(Z);if(M$!==m||A$()||/^\)+$/.test(Z$()))C$=d.close=`)$))${M$}`;if(d.inner.includes("*")&&(T$=Z$())&&/^\.[^\\/.]+$/.test(T$)){let r$=V7(T$,{...J,fastpaths:!1}).output;C$=d.close=`)${r$})${M$})`}if(d.prev.type==="bos")A.negatedExtglob=!0}a({type:"paren",extglob:!0,value:k,output:C$}),n("parens")};if(Z.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let d=!1,Y$=$.replace(fO,(g,t,C$,T$,M$,r$)=>{if(T$==="\\")return d=!0,g;if(T$==="?"){if(t)return t+T$+(M$?D.repeat(M$.length):"");if(r$===0)return v+(M$?D.repeat(M$.length):"");return D.repeat(C$.length)}if(T$===".")return H.repeat(C$.length);if(T$==="*"){if(t)return t+T$+(M$?m:"");return m}return t?g:`\\${g}`});if(d===!0)if(Z.unescape===!0)Y$=Y$.replace(/\\/g,"");else Y$=Y$.replace(/\\+/g,(g)=>{return g.length%2===0?"\\\\":g?"\\":""});if(Y$===$&&Z.contains===!0)return A.output=$,A;return A.output=S0.wrapOutput(Y$,A,J),A}while(!A$()){if(k=J$(),k==="\x00")continue;if(k==="\\"){let g=s();if(g==="/"&&Z.bash!==!0)continue;if(g==="."||g===";")continue;if(!g){k+="\\",a({type:"text",value:k});continue}let t=/^\\+/.exec(Z$()),C$=0;if(t&&t[0].length>2){if(C$=t[0].length,A.index+=C$,C$%2!==0)k+="\\"}if(Z.unescape===!0)k=J$();else k+=J$();if(A.brackets===0){a({type:"text",value:k});continue}}if(A.brackets>0&&(k!=="]"||T.value==="["||T.value==="[^")){if(Z.posix!==!1&&k===":"){let g=T.value.slice(1);if(g.includes("[")){if(T.posix=!0,g.includes(":")){let t=T.value.lastIndexOf("["),C$=T.value.slice(0,t),T$=T.value.slice(t+2),M$=hO[T$];if(M$){if(T.value=C$+M$,A.backtrack=!0,J$(),!Q.output&&V.indexOf(T)===1)Q.output=z;continue}}}}if(k==="["&&s()!==":"||k==="-"&&s()==="]")k=`\\${k}`;if(k==="]"&&(T.value==="["||T.value==="[^"))k=`\\${k}`;if(Z.posix===!0&&k==="!"&&T.value==="[")k="^";T.value+=k,y$({value:k});continue}if(A.quotes===1&&k!=='"'){k=S0.escapeRegex(k),T.value+=k,y$({value:k});continue}if(k==='"'){if(A.quotes=A.quotes===1?0:1,Z.keepQuotes===!0)a({type:"text",value:k});continue}if(k==="("){y("parens"),a({type:"paren",value:k});continue}if(k===")"){if(A.parens===0&&Z.strictBrackets===!0)throw SyntaxError(OJ("opening","("));let g=u[u.length-1];if(g&&A.parens===g.parens+1){l(u.pop());continue}a({type:"paren",value:k,output:A.parens?")":"\\)"}),n("parens");continue}if(k==="["){if(Z.nobracket===!0||!Z$().includes("]")){if(Z.nobracket!==!0&&Z.strictBrackets===!0)throw SyntaxError(OJ("closing","]"));k=`\\${k}`}else y("brackets");a({type:"bracket",value:k});continue}if(k==="]"){if(Z.nobracket===!0||T&&T.type==="bracket"&&T.value.length===1){a({type:"text",value:k,output:`\\${k}`});continue}if(A.brackets===0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("opening","["));a({type:"text",value:k,output:`\\${k}`});continue}n("brackets");let g=T.value.slice(1);if(T.posix!==!0&&g[0]==="^"&&!g.includes("/"))k=`/${k}`;if(T.value+=k,y$({value:k}),Z.literalBrackets===!1||S0.hasRegexChars(g))continue;let t=S0.escapeRegex(T.value);if(A.output=A.output.slice(0,-T.value.length),Z.literalBrackets===!0){A.output+=t,T.value=t;continue}T.value=`(${X}${t}|${T.value})`,A.output+=T.value;continue}if(k==="{"&&Z.nobrace!==!0){y("braces");let g={type:"brace",value:k,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};r.push(g),a(g);continue}if(k==="}"){let g=r[r.length-1];if(Z.nobrace===!0||!g){a({type:"text",value:k,output:k});continue}let t=")";if(g.dots===!0){let C$=V.slice(),T$=[];for(let M$=C$.length-1;M$>=0;M$--){if(V.pop(),C$[M$].type==="brace")break;if(C$[M$].type!=="dots")T$.unshift(C$[M$].value)}t=mO(T$,Z),A.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){let C$=A.output.slice(0,g.outputIndex),T$=A.tokens.slice(g.tokensIndex);g.value=g.output="\\{",k=t="\\}",A.output=C$;for(let M$ of T$)A.output+=M$.output||M$.value}a({type:"brace",value:k,output:t}),n("braces"),r.pop();continue}if(k==="|"){if(u.length>0)u[u.length-1].conditions++;a({type:"text",value:k});continue}if(k===","){let g=k,t=r[r.length-1];if(t&&S[S.length-1]==="braces")t.comma=!0,g="|";a({type:"comma",value:k,output:g});continue}if(k==="/"){if(T.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",V.pop(),T=Q;continue}a({type:"slash",value:k,output:U});continue}if(k==="."){if(A.braces>0&&T.type==="dot"){if(T.value===".")T.output=H;let g=r[r.length-1];T.type="dots",T.output+=k,T.value+=k,g.dots=!0;continue}if(A.braces+A.parens===0&&T.type!=="bos"&&T.type!=="slash"){a({type:"text",value:k,output:H});continue}a({type:"dot",value:k,output:H});continue}if(k==="?"){if(!(T&&T.value==="(")&&Z.noextglob!==!0&&s()==="("&&s(2)!=="?"){c$("qmark",k);continue}if(T&&T.type==="paren"){let t=s(),C$=k;if(t==="<"&&!S0.supportsLookbehinds())throw Error("Node.js v10 or higher is required for regex lookbehinds");if(T.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(Z$()))C$=`\\${k}`;a({type:"text",value:k,output:C$});continue}if(Z.dot!==!0&&(T.type==="slash"||T.type==="bos")){a({type:"qmark",value:k,output:L});continue}a({type:"qmark",value:k,output:D});continue}if(k==="!"){if(Z.noextglob!==!0&&s()==="("){if(s(2)!=="?"||!/[!=<:]/.test(s(3))){c$("negate",k);continue}}if(Z.nonegate!==!0&&A.index===0){Q$();continue}}if(k==="+"){if(Z.noextglob!==!0&&s()==="("&&s(2)!=="?"){c$("plus",k);continue}if(T&&T.value==="("||Z.regex===!1){a({type:"plus",value:k,output:q});continue}if(T&&(T.type==="bracket"||T.type==="paren"||T.type==="brace")||A.parens>0){a({type:"plus",value:k});continue}a({type:"plus",value:q});continue}if(k==="@"){if(Z.noextglob!==!0&&s()==="("&&s(2)!=="?"){a({type:"at",extglob:!0,value:k,output:""});continue}a({type:"text",value:k});continue}if(k!=="*"){if(k==="$"||k==="^")k=`\\${k}`;let g=gO.exec(Z$());if(g)k+=g[0],A.index+=g[0].length;a({type:"text",value:k});continue}if(T&&(T.type==="globstar"||T.star===!0)){T.type="star",T.star=!0,T.value+=k,T.output=m,A.backtrack=!0,A.globstar=!0,W$(k);continue}let d=Z$();if(Z.noextglob!==!0&&/^\([^?]/.test(d)){c$("star",k);continue}if(T.type==="star"){if(Z.noglobstar===!0){W$(k);continue}let g=T.prev,t=g.prev,C$=g.type==="slash"||g.type==="bos",T$=t&&(t.type==="star"||t.type==="globstar");if(Z.bash===!0&&(!C$||d[0]&&d[0]!=="/")){a({type:"star",value:k,output:""});continue}let M$=A.braces>0&&(g.type==="comma"||g.type==="brace"),r$=u.length&&(g.type==="pipe"||g.type==="paren");if(!C$&&g.type!=="paren"&&!M$&&!r$){a({type:"star",value:k,output:""});continue}while(d.slice(0,3)==="/**"){let K0=$[A.index+4];if(K0&&K0!=="/")break;d=d.slice(3),W$("/**",3)}if(g.type==="bos"&&A$()){T.type="globstar",T.value+=k,T.output=x(Z),A.output=T.output,A.globstar=!0,W$(k);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!T$&&A$()){A.output=A.output.slice(0,-(g.output+T.output).length),g.output=`(?:${g.output}`,T.type="globstar",T.output=x(Z)+(Z.strictSlashes?")":"|$)"),T.value+=k,A.globstar=!0,A.output+=g.output+T.output,W$(k);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&d[0]==="/"){let K0=d[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(g.output+T.output).length),g.output=`(?:${g.output}`,T.type="globstar",T.output=`${x(Z)}${U}|${U}${K0})`,T.value+=k,A.output+=g.output+T.output,A.globstar=!0,W$(k+J$()),a({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&d[0]==="/"){T.type="globstar",T.value+=k,T.output=`(?:^|${U}|${x(Z)}${U})`,A.output=T.output,A.globstar=!0,W$(k+J$()),a({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-T.output.length),T.type="globstar",T.output=x(Z),T.value+=k,A.output+=T.output,A.globstar=!0,W$(k);continue}let Y$={type:"star",value:k,output:m};if(Z.bash===!0){if(Y$.output=".*?",T.type==="bos"||T.type==="slash")Y$.output=b+Y$.output;a(Y$);continue}if(T&&(T.type==="bracket"||T.type==="paren")&&Z.regex===!0){Y$.output=k,a(Y$);continue}if(A.index===A.start||T.type==="slash"||T.type==="dot"){if(T.type==="dot")A.output+=C,T.output+=C;else if(Z.dot===!0)A.output+=P,T.output+=P;else A.output+=b,T.output+=b;if(s()!=="*")A.output+=z,T.output+=z}a(Y$)}while(A.brackets>0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("closing","]"));A.output=S0.escapeLast(A.output,"["),n("brackets")}while(A.parens>0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("closing",")"));A.output=S0.escapeLast(A.output,"("),n("parens")}while(A.braces>0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("closing","}"));A.output=S0.escapeLast(A.output,"{"),n("braces")}if(Z.strictSlashes!==!0&&(T.type==="star"||T.type==="bracket"))a({type:"maybe_slash",value:"",output:`${U}?`});if(A.backtrack===!0){A.output="";for(let d of A.tokens)if(A.output+=d.output!=null?d.output:d.value,d.suffix)A.output+=d.suffix}return A};V7.fastpaths=($,J)=>{let Z={...J},Y=typeof Z.maxLength==="number"?Math.min(k9,Z.maxLength):k9,K=$.length;if(K>Y)throw SyntaxError(`Input length: ${K}, exceeds maximum allowed length: ${Y}`);$=EQ[$]||$;let Q=S0.isWindows(J),{DOT_LITERAL:V,SLASH_LITERAL:X,ONE_CHAR:W,DOTS_SLASH:_,NO_DOT:j,NO_DOTS:H,NO_DOTS_SLASH:q,STAR:U,START_ANCHOR:z}=j8.globChars(Q),M=Z.dot?H:j,I=Z.dot?q:j,C=Z.capture?"":"?:",P={negated:!1,prefix:""},D=Z.bash===!0?".*?":U;if(Z.capture)D=`(${D})`;let L=(b)=>{if(b.noglobstar===!0)return D;return`(${C}(?:(?!${z}${b.dot?_:V}).)*?)`},R=(b)=>{switch(b){case"*":return`${M}${W}${D}`;case".*":return`${V}${W}${D}`;case"*.*":return`${M}${D}${V}${W}${D}`;case"*/*":return`${M}${D}${X}${W}${I}${D}`;case"**":return M+L(Z);case"**/*":return`(?:${M}${L(Z)}${X})?${I}${W}${D}`;case"**/*.*":return`(?:${M}${L(Z)}${X})?${I}${D}${V}${W}${D}`;case"**/.*":return`(?:${M}${L(Z)}${X})?${V}${W}${D}`;default:{let v=/^(.*?)\.(\w+)$/.exec(b);if(!v)return;let m=R(v[1]);if(!m)return;return m+V+v[2]}}},N=S0.removePrefix($,P),x=R(N);if(x&&Z.strictSlashes!==!0)x+=`${X}?`;return x};vQ.exports=V7});var fQ=p((ww,gQ)=>{var oO=u0("path"),rO=kQ(),G7=hQ(),X7=X8(),iO=G8(),sO=($)=>$&&typeof $==="object"&&!Array.isArray($),U0=($,J,Z=!1)=>{if(Array.isArray($)){let j=$.map((q)=>U0(q,J,Z));return(q)=>{for(let U of j){let z=U(q);if(z)return z}return!1}}let Y=sO($)&&$.tokens&&$.input;if($===""||typeof $!=="string"&&!Y)throw TypeError("Expected pattern to be a non-empty string");let K=J||{},Q=X7.isWindows(J),V=Y?U0.compileRe($,J):U0.makeRe($,J,!1,!0),X=V.state;delete V.state;let W=()=>!1;if(K.ignore){let j={...J,ignore:null,onMatch:null,onResult:null};W=U0(K.ignore,j,Z)}let _=(j,H=!1)=>{let{isMatch:q,match:U,output:z}=U0.test(j,V,J,{glob:$,posix:Q}),M={glob:$,state:X,regex:V,posix:Q,input:j,output:z,match:U,isMatch:q};if(typeof K.onResult==="function")K.onResult(M);if(q===!1)return M.isMatch=!1,H?M:!1;if(W(j)){if(typeof K.onIgnore==="function")K.onIgnore(M);return M.isMatch=!1,H?M:!1}if(typeof K.onMatch==="function")K.onMatch(M);return H?M:!0};if(Z)_.state=X;return _};U0.test=($,J,Z,{glob:Y,posix:K}={})=>{if(typeof $!=="string")throw TypeError("Expected input to be a string");if($==="")return{isMatch:!1,output:""};let Q=Z||{},V=Q.format||(K?X7.toPosixSlashes:null),X=$===Y,W=X&&V?V($):$;if(X===!1)W=V?V($):$,X=W===Y;if(X===!1||Q.capture===!0)if(Q.matchBase===!0||Q.basename===!0)X=U0.matchBase($,J,Z,K);else X=J.exec(W);return{isMatch:Boolean(X),match:X,output:W}};U0.matchBase=($,J,Z,Y=X7.isWindows(Z))=>{return(J instanceof RegExp?J:U0.makeRe(J,Z)).test(oO.basename($))};U0.isMatch=($,J,Z)=>U0(J,Z)($);U0.parse=($,J)=>{if(Array.isArray($))return $.map((Z)=>U0.parse(Z,J));return G7($,{...J,fastpaths:!1})};U0.scan=($,J)=>rO($,J);U0.compileRe=($,J,Z=!1,Y=!1)=>{if(Z===!0)return $.output;let K=J||{},Q=K.contains?"":"^",V=K.contains?"":"$",X=`${Q}(?:${$.output})${V}`;if($&&$.negated===!0)X=`^(?!${X}).*$`;let W=U0.toRegex(X,J);if(Y===!0)W.state=$;return W};U0.makeRe=($,J={},Z=!1,Y=!1)=>{if(!$||typeof $!=="string")throw TypeError("Expected a non-empty string");let K={negated:!1,fastpaths:!0};if(J.fastpaths!==!1&&($[0]==="."||$[0]==="*"))K.output=G7.fastpaths($,J);if(!K.output)K=G7($,J);return U0.compileRe(K,J,Z,Y)};U0.toRegex=($,J)=>{try{let Z=J||{};return new RegExp($,Z.flags||(Z.nocase?"i":""))}catch(Z){if(J&&J.debug===!0)throw Z;return/$^/}};U0.constants=iO;gQ.exports=U0});var lQ=p((Rw,cQ)=>{var uQ=u0("util"),dQ=MQ(),w1=fQ(),W7=X8(),mQ=($)=>$===""||$==="./",pQ=($)=>{let J=$.indexOf("{");return J>-1&&$.indexOf("}",J)>-1},a$=($,J,Z)=>{J=[].concat(J),$=[].concat($);let Y=new Set,K=new Set,Q=new Set,V=0,X=(j)=>{if(Q.add(j.output),Z&&Z.onResult)Z.onResult(j)};for(let j=0;j<J.length;j++){let H=w1(String(J[j]),{...Z,onResult:X},!0),q=H.state.negated||H.state.negatedExtglob;if(q)V++;for(let U of $){let z=H(U,!0);if(!(q?!z.isMatch:z.isMatch))continue;if(q)Y.add(z.output);else Y.delete(z.output),K.add(z.output)}}let _=(V===J.length?[...Q]:[...K]).filter((j)=>!Y.has(j));if(Z&&_.length===0){if(Z.failglob===!0)throw Error(`No matches found for "${J.join(", ")}"`);if(Z.nonull===!0||Z.nullglob===!0)return Z.unescape?J.map((j)=>j.replace(/\\/g,"")):J}return _};a$.match=a$;a$.matcher=($,J)=>w1($,J);a$.isMatch=($,J,Z)=>w1(J,Z)($);a$.any=a$.isMatch;a$.not=($,J,Z={})=>{J=[].concat(J).map(String);let Y=new Set,K=[],V=new Set(a$($,J,{...Z,onResult:(X)=>{if(Z.onResult)Z.onResult(X);K.push(X.output)}}));for(let X of K)if(!V.has(X))Y.add(X);return[...Y]};a$.contains=($,J,Z)=>{if(typeof $!=="string")throw TypeError(`Expected a string: "${uQ.inspect($)}"`);if(Array.isArray(J))return J.some((Y)=>a$.contains($,Y,Z));if(typeof J==="string"){if(mQ($)||mQ(J))return!1;if($.includes(J)||$.startsWith("./")&&$.slice(2).includes(J))return!0}return a$.isMatch($,J,{...Z,contains:!0})};a$.matchKeys=($,J,Z)=>{if(!W7.isObject($))throw TypeError("Expected the first argument to be an object");let Y=a$(Object.keys($),J,Z),K={};for(let Q of Y)K[Q]=$[Q];return K};a$.some=($,J,Z)=>{let Y=[].concat($);for(let K of[].concat(J)){let Q=w1(String(K),Z);if(Y.some((V)=>Q(V)))return!0}return!1};a$.every=($,J,Z)=>{let Y=[].concat($);for(let K of[].concat(J)){let Q=w1(String(K),Z);if(!Y.every((V)=>Q(V)))return!1}return!0};a$.all=($,J,Z)=>{if(typeof $!=="string")throw TypeError(`Expected a string: "${uQ.inspect($)}"`);return[].concat(J).every((Y)=>w1(Y,Z)($))};a$.capture=($,J,Z)=>{let Y=W7.isWindows(Z),Q=w1.makeRe(String($),{...Z,capture:!0}).exec(Y?W7.toPosixSlashes(J):J);if(Q)return Q.slice(1).map((V)=>V===void 0?"":V)};a$.makeRe=(...$)=>w1.makeRe(...$);a$.scan=(...$)=>w1.scan(...$);a$.parse=($,J)=>{let Z=[];for(let Y of[].concat($||[]))for(let K of dQ(String(Y),J))Z.push(w1.parse(K,J));return Z};a$.braces=($,J)=>{if(typeof $!=="string")throw TypeError("Expected a string");if(J&&J.nobrace===!0||!pQ($))return[$];return dQ($,J)};a$.braceExpand=($,J)=>{if(typeof $!=="string")throw TypeError("Expected a string");return a$.braces($,{...J,expand:!0})};a$.hasBraces=pQ;cQ.exports=a$});var rQ=p((Lw,oQ)=>{/*!
17
+ */var h4=d0("util"),eK=aK(),tK=($)=>$!==null&&typeof $==="object"&&!Array.isArray($),g4=($)=>{return(J)=>$===!0?Number(J):String(J)},n6=($)=>{return typeof $==="number"||typeof $==="string"&&$!==""},V8=($)=>Number.isInteger(+$),a6=($)=>{let J=`${$}`,Z=-1;if(J[0]==="-")J=J.slice(1);if(J==="0")return!1;while(J[++Z]==="0");return Z>0},f4=($,J,Z)=>{if(typeof $==="string"||typeof J==="string")return!0;return Z.stringify===!0},m4=($,J,Z)=>{if(J>0){let Y=$[0]==="-"?"-":"";if(Y)$=$.slice(1);$=Y+$.padStart(Y?J-1:J,"0")}if(Z===!1)return String($);return $},T9=($,J)=>{let Z=$[0]==="-"?"-":"";if(Z)$=$.slice(1),J--;while($.length<J)$="0"+$;return Z?"-"+$:$},u4=($,J,Z)=>{$.negatives.sort((X,W)=>X<W?-1:X>W?1:0),$.positives.sort((X,W)=>X<W?-1:X>W?1:0);let Y=J.capture?"":"?:",K="",Q="",V;if($.positives.length)K=$.positives.map((X)=>T9(String(X),Z)).join("|");if($.negatives.length)Q=`-(${Y}${$.negatives.map((X)=>T9(String(X),Z)).join("|")})`;if(K&&Q)V=`${K}|${Q}`;else V=K||Q;if(J.wrap)return`(${Y}${V})`;return V},$Q=($,J,Z,Y)=>{if(Z)return eK($,J,{wrap:!1,...Y});let K=String.fromCharCode($);if($===J)return K;let Q=String.fromCharCode(J);return`[${K}-${Q}]`},JQ=($,J,Z)=>{if(Array.isArray($)){let Y=Z.wrap===!0,K=Z.capture?"":"?:";return Y?`(${K}${$.join("|")})`:$.join("|")}return eK($,J,Z)},ZQ=(...$)=>{return RangeError("Invalid range arguments: "+h4.inspect(...$))},YQ=($,J,Z)=>{if(Z.strictRanges===!0)throw ZQ([$,J]);return[]},d4=($,J)=>{if(J.strictRanges===!0)throw TypeError(`Expected step "${$}" to be a number`);return[]},p4=($,J,Z=1,Y={})=>{let K=Number($),Q=Number(J);if(!Number.isInteger(K)||!Number.isInteger(Q)){if(Y.strictRanges===!0)throw ZQ([$,J]);return[]}if(K===0)K=0;if(Q===0)Q=0;let V=K>Q,X=String($),W=String(J),_=String(Z);Z=Math.max(Math.abs(Z),1);let j=a6(X)||a6(W)||a6(_),H=j?Math.max(X.length,W.length,_.length):0,q=j===!1&&f4($,J,Y)===!1,U=Y.transform||g4(q);if(Y.toRegex&&Z===1)return $Q(T9($,H),T9(J,H),!0,Y);let z={negatives:[],positives:[]},M=(P)=>z[P<0?"negatives":"positives"].push(Math.abs(P)),I=[],C=0;while(V?K>=Q:K<=Q){if(Y.toRegex===!0&&Z>1)M(K);else I.push(m4(U(K,C),H,q));K=V?K-Z:K+Z,C++}if(Y.toRegex===!0)return Z>1?u4(z,Y,H):JQ(I,null,{wrap:!1,...Y});return I},c4=($,J,Z=1,Y={})=>{if(!V8($)&&$.length>1||!V8(J)&&J.length>1)return YQ($,J,Y);let K=Y.transform||((q)=>String.fromCharCode(q)),Q=`${$}`.charCodeAt(0),V=`${J}`.charCodeAt(0),X=Q>V,W=Math.min(Q,V),_=Math.max(Q,V);if(Y.toRegex&&Z===1)return $Q(W,_,!1,Y);let j=[],H=0;while(X?Q>=V:Q<=V)j.push(K(Q,H)),Q=X?Q-Z:Q+Z,H++;if(Y.toRegex===!0)return JQ(j,null,{wrap:!1,options:Y});return j},y9=($,J,Z,Y={})=>{if(J==null&&n6($))return[$];if(!n6($)||!n6(J))return YQ($,J,Y);if(typeof Z==="function")return y9($,J,1,{transform:Z});if(tK(Z))return y9($,J,0,Z);let K={...Y};if(K.capture===!0)K.wrap=!0;if(Z=Z||K.step||1,!V8(Z)){if(Z!=null&&!tK(Z))return d4(Z,K);return y9($,J,1,Z)}if(V8($)&&V8(J))return p4($,J,Z,K);return c4($,J,Math.max(Math.abs(Z),1),K)};KQ.exports=y9});var GQ=p((Fw,VQ)=>{var l4=t6(),QQ=L9(),o4=($,J={})=>{let Z=(Y,K={})=>{let Q=QQ.isInvalidBrace(K),V=Y.invalid===!0&&J.escapeInvalid===!0,X=Q===!0||V===!0,W=J.escapeInvalid===!0?"\\":"",_="";if(Y.isOpen===!0)return W+Y.value;if(Y.isClose===!0)return console.log("node.isClose",W,Y.value),W+Y.value;if(Y.type==="open")return X?W+Y.value:"(";if(Y.type==="close")return X?W+Y.value:")";if(Y.type==="comma")return Y.prev.type==="comma"?"":X?Y.value:"|";if(Y.value)return Y.value;if(Y.nodes&&Y.ranges>0){let j=QQ.reduce(Y.nodes),H=l4(...j,{...J,wrap:!1,toRegex:!0,strictZeros:!0});if(H.length!==0)return j.length>1&&H.length>1?`(${H})`:H}if(Y.nodes)for(let j of Y.nodes)_+=Z(j,Y);return _};return Z($)};VQ.exports=o4});var jQ=p((zw,WQ)=>{var r4=t6(),XQ=N9(),_J=L9(),L2=($="",J="",Z=!1)=>{let Y=[];if($=[].concat($),J=[].concat(J),!J.length)return $;if(!$.length)return Z?_J.flatten(J).map((K)=>`{${K}}`):J;for(let K of $)if(Array.isArray(K))for(let Q of K)Y.push(L2(Q,J,Z));else for(let Q of J){if(Z===!0&&typeof Q==="string")Q=`{${Q}}`;Y.push(Array.isArray(Q)?L2(K,Q,Z):K+Q)}return _J.flatten(Y)},i4=($,J={})=>{let Z=J.rangeLimit===void 0?1000:J.rangeLimit,Y=(K,Q={})=>{K.queue=[];let V=Q,X=Q.queue;while(V.type!=="brace"&&V.type!=="root"&&V.parent)V=V.parent,X=V.queue;if(K.invalid||K.dollar){X.push(L2(X.pop(),XQ(K,J)));return}if(K.type==="brace"&&K.invalid!==!0&&K.nodes.length===2){X.push(L2(X.pop(),["{}"]));return}if(K.nodes&&K.ranges>0){let H=_J.reduce(K.nodes);if(_J.exceedsLimit(...H,J.step,Z))throw RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let q=r4(...H,J);if(q.length===0)q=XQ(K,J);X.push(L2(X.pop(),q)),K.nodes=[];return}let W=_J.encloseBrace(K),_=K.queue,j=K;while(j.type!=="brace"&&j.type!=="root"&&j.parent)j=j.parent,_=j.queue;for(let H=0;H<K.nodes.length;H++){let q=K.nodes[H];if(q.type==="comma"&&K.type==="brace"){if(H===1)_.push("");_.push("");continue}if(q.type==="close"){X.push(L2(X.pop(),_,W));continue}if(q.value&&q.type!=="open"){_.push(L2(_.pop(),q.value));continue}if(q.nodes)Y(q,K)}return _};return _J.flatten(Y($))};WQ.exports=i4});var BQ=p((Cw,UQ)=>{UQ.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
18
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var FQ=p((Mw,qQ)=>{var s4=N9(),{MAX_LENGTH:HQ,CHAR_BACKSLASH:e6,CHAR_BACKTICK:n4,CHAR_COMMA:a4,CHAR_DOT:t4,CHAR_LEFT_PARENTHESES:e4,CHAR_RIGHT_PARENTHESES:$O,CHAR_LEFT_CURLY_BRACE:JO,CHAR_RIGHT_CURLY_BRACE:ZO,CHAR_LEFT_SQUARE_BRACKET:_Q,CHAR_RIGHT_SQUARE_BRACKET:OQ,CHAR_DOUBLE_QUOTE:YO,CHAR_SINGLE_QUOTE:KO,CHAR_NO_BREAK_SPACE:QO,CHAR_ZERO_WIDTH_NOBREAK_SPACE:VO}=BQ(),GO=($,J={})=>{if(typeof $!=="string")throw TypeError("Expected a string");let Z=J||{},Y=typeof Z.maxLength==="number"?Math.min(HQ,Z.maxLength):HQ;if($.length>Y)throw SyntaxError(`Input length (${$.length}), exceeds max characters (${Y})`);let K={type:"root",input:$,nodes:[]},Q=[K],V=K,X=K,W=0,_=$.length,j=0,H=0,q,U=()=>$[j++],z=(M)=>{if(M.type==="text"&&X.type==="dot")X.type="text";if(X&&X.type==="text"&&M.type==="text"){X.value+=M.value;return}return V.nodes.push(M),M.parent=V,M.prev=X,X=M,M};z({type:"bos"});while(j<_){if(V=Q[Q.length-1],q=U(),q===VO||q===QO)continue;if(q===e6){z({type:"text",value:(J.keepEscaping?q:"")+U()});continue}if(q===OQ){z({type:"text",value:"\\"+q});continue}if(q===_Q){W++;let M;while(j<_&&(M=U())){if(q+=M,M===_Q){W++;continue}if(M===e6){q+=U();continue}if(M===OQ){if(W--,W===0)break}}z({type:"text",value:q});continue}if(q===e4){V=z({type:"paren",nodes:[]}),Q.push(V),z({type:"text",value:q});continue}if(q===$O){if(V.type!=="paren"){z({type:"text",value:q});continue}V=Q.pop(),z({type:"text",value:q}),V=Q[Q.length-1];continue}if(q===YO||q===KO||q===n4){let M=q,I;if(J.keepQuotes!==!0)q="";while(j<_&&(I=U())){if(I===e6){q+=I+U();continue}if(I===M){if(J.keepQuotes===!0)q+=I;break}q+=I}z({type:"text",value:q});continue}if(q===JO){H++;let I={type:"brace",open:!0,close:!1,dollar:X.value&&X.value.slice(-1)==="$"||V.dollar===!0,depth:H,commas:0,ranges:0,nodes:[]};V=z(I),Q.push(V),z({type:"open",value:q});continue}if(q===ZO){if(V.type!=="brace"){z({type:"text",value:q});continue}let M="close";V=Q.pop(),V.close=!0,z({type:M,value:q}),H--,V=Q[Q.length-1];continue}if(q===a4&&H>0){if(V.ranges>0){V.ranges=0;let M=V.nodes.shift();V.nodes=[M,{type:"text",value:s4(V)}]}z({type:"comma",value:q}),V.commas++;continue}if(q===t4&&H>0&&V.commas===0){let M=V.nodes;if(H===0||M.length===0){z({type:"text",value:q});continue}if(X.type==="dot"){if(V.range=[],X.value+=q,X.type="range",V.nodes.length!==3&&V.nodes.length!==5){V.invalid=!0,V.ranges=0,X.type="text";continue}V.ranges++,V.args=[];continue}if(X.type==="range"){M.pop();let I=M[M.length-1];I.value+=X.value+q,X=I,V.ranges--;continue}z({type:"dot",value:q});continue}z({type:"text",value:q})}do if(V=Q.pop(),V.type!=="root"){V.nodes.forEach((C)=>{if(!C.nodes){if(C.type==="open")C.isOpen=!0;if(C.type==="close")C.isClose=!0;if(!C.nodes)C.type="text";C.invalid=!0}});let M=Q[Q.length-1],I=M.nodes.indexOf(V);M.nodes.splice(I,1,...V.nodes)}while(Q.length>0);return z({type:"eos"}),K};qQ.exports=GO});var MQ=p((Dw,CQ)=>{var zQ=N9(),XO=GQ(),WO=jQ(),jO=FQ(),p0=($,J={})=>{let Z=[];if(Array.isArray($))for(let Y of $){let K=p0.create(Y,J);if(Array.isArray(K))Z.push(...K);else Z.push(K)}else Z=[].concat(p0.create($,J));if(J&&J.expand===!0&&J.nodupes===!0)Z=[...new Set(Z)];return Z};p0.parse=($,J={})=>jO($,J);p0.stringify=($,J={})=>{if(typeof $==="string")return zQ(p0.parse($,J),J);return zQ($,J)};p0.compile=($,J={})=>{if(typeof $==="string")$=p0.parse($,J);return XO($,J)};p0.expand=($,J={})=>{if(typeof $==="string")$=p0.parse($,J);let Z=WO($,J);if(J.noempty===!0)Z=Z.filter(Boolean);if(J.nodupes===!0)Z=[...new Set(Z)];return Z};p0.create=($,J={})=>{if($===""||$.length<3)return[$];return J.expand!==!0?p0.compile($,J):p0.expand($,J)};CQ.exports=p0});var G8=p((Pw,PQ)=>{var UO=d0("path"),DQ={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)"},BO={...DQ,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)"},HO={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};PQ.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:HO,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:UO.sep,extglobChars($){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${$.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars($){return $===!0?BO:DQ}}});var X8=p((MO)=>{var _O=d0("path"),OO=process.platform==="win32",{REGEX_BACKSLASH:qO,REGEX_REMOVE_BACKSLASH:FO,REGEX_SPECIAL_CHARS:zO,REGEX_SPECIAL_CHARS_GLOBAL:CO}=G8();MO.isObject=($)=>$!==null&&typeof $==="object"&&!Array.isArray($);MO.hasRegexChars=($)=>zO.test($);MO.isRegexChar=($)=>$.length===1&&MO.hasRegexChars($);MO.escapeRegex=($)=>$.replace(CO,"\\$1");MO.toPosixSlashes=($)=>$.replace(qO,"/");MO.removeBackslashes=($)=>{return $.replace(FO,(J)=>{return J==="\\"?"":J})};MO.supportsLookbehinds=()=>{let $=process.version.slice(1).split(".").map(Number);if($.length===3&&$[0]>=9||$[0]===8&&$[1]>=10)return!0;return!1};MO.isWindows=($)=>{if($&&typeof $.windows==="boolean")return $.windows;return OO===!0||_O.sep==="\\"};MO.escapeLast=($,J,Z)=>{let Y=$.lastIndexOf(J,Z);if(Y===-1)return $;if($[Y-1]==="\\")return MO.escapeLast($,J,Y-1);return`${$.slice(0,Y)}\\${$.slice(Y)}`};MO.removePrefix=($,J={})=>{let Z=$;if(Z.startsWith("./"))Z=Z.slice(2),J.prefix="./";return Z};MO.wrapOutput=($,J={},Z={})=>{let Y=Z.contains?"":"^",K=Z.contains?"":"$",Q=`${Y}(?:${$})${K}`;if(J.negated===!0)Q=`(?:^(?!${Q}).*$)`;return Q}});var kQ=p((Aw,TQ)=>{var SQ=X8(),{CHAR_ASTERISK:$7,CHAR_AT:yO,CHAR_BACKWARD_SLASH:W8,CHAR_COMMA:TO,CHAR_DOT:J7,CHAR_EXCLAMATION_MARK:Z7,CHAR_FORWARD_SLASH:yQ,CHAR_LEFT_CURLY_BRACE:Y7,CHAR_LEFT_PARENTHESES:K7,CHAR_LEFT_SQUARE_BRACKET:kO,CHAR_PLUS:EO,CHAR_QUESTION_MARK:wQ,CHAR_RIGHT_CURLY_BRACE:xO,CHAR_RIGHT_PARENTHESES:RQ,CHAR_RIGHT_SQUARE_BRACKET:bO}=G8(),LQ=($)=>{return $===yQ||$===W8},NQ=($)=>{if($.isPrefix!==!0)$.depth=$.isGlobstar?1/0:1},vO=($,J)=>{let Z=J||{},Y=$.length-1,K=Z.parts===!0||Z.scanToEnd===!0,Q=[],V=[],X=[],W=$,_=-1,j=0,H=0,q=!1,U=!1,z=!1,M=!1,I=!1,C=!1,P=!1,D=!1,L=!1,R=!1,N=0,x,b,v={value:"",depth:0,isGlob:!1},m=()=>_>=Y,A=()=>W.charCodeAt(_+1),u=()=>{return x=b,W.charCodeAt(++_)};while(_<Y){b=u();let A$;if(b===W8){if(P=v.backslashes=!0,b=u(),b===Y7)C=!0;continue}if(C===!0||b===Y7){N++;while(m()!==!0&&(b=u())){if(b===W8){P=v.backslashes=!0,u();continue}if(b===Y7){N++;continue}if(C!==!0&&b===J7&&(b=u())===J7){if(q=v.isBrace=!0,z=v.isGlob=!0,R=!0,K===!0)continue;break}if(C!==!0&&b===TO){if(q=v.isBrace=!0,z=v.isGlob=!0,R=!0,K===!0)continue;break}if(b===xO){if(N--,N===0){C=!1,q=v.isBrace=!0,R=!0;break}}}if(K===!0)continue;break}if(b===yQ){if(Q.push(_),V.push(v),v={value:"",depth:0,isGlob:!1},R===!0)continue;if(x===J7&&_===j+1){j+=2;continue}H=_+1;continue}if(Z.noext!==!0){if((b===EO||b===yO||b===$7||b===wQ||b===Z7)===!0&&A()===K7){if(z=v.isGlob=!0,M=v.isExtglob=!0,R=!0,b===Z7&&_===j)L=!0;if(K===!0){while(m()!==!0&&(b=u())){if(b===W8){P=v.backslashes=!0,b=u();continue}if(b===RQ){z=v.isGlob=!0,R=!0;break}}continue}break}}if(b===$7){if(x===$7)I=v.isGlobstar=!0;if(z=v.isGlob=!0,R=!0,K===!0)continue;break}if(b===wQ){if(z=v.isGlob=!0,R=!0,K===!0)continue;break}if(b===kO){while(m()!==!0&&(A$=u())){if(A$===W8){P=v.backslashes=!0,u();continue}if(A$===bO){U=v.isBracket=!0,z=v.isGlob=!0,R=!0;break}}if(K===!0)continue;break}if(Z.nonegate!==!0&&b===Z7&&_===j){D=v.negated=!0,j++;continue}if(Z.noparen!==!0&&b===K7){if(z=v.isGlob=!0,K===!0){while(m()!==!0&&(b=u())){if(b===K7){P=v.backslashes=!0,b=u();continue}if(b===RQ){R=!0;break}}continue}break}if(z===!0){if(R=!0,K===!0)continue;break}}if(Z.noext===!0)M=!1,z=!1;let r=W,S="",T="";if(j>0)S=W.slice(0,j),W=W.slice(j),H-=j;if(r&&z===!0&&H>0)r=W.slice(0,H),T=W.slice(H);else if(z===!0)r="",T=W;else r=W;if(r&&r!==""&&r!=="/"&&r!==W){if(LQ(r.charCodeAt(r.length-1)))r=r.slice(0,-1)}if(Z.unescape===!0){if(T)T=SQ.removeBackslashes(T);if(r&&P===!0)r=SQ.removeBackslashes(r)}let k={prefix:S,input:$,start:j,base:r,glob:T,isBrace:q,isBracket:U,isGlob:z,isExtglob:M,isGlobstar:I,negated:D,negatedExtglob:L};if(Z.tokens===!0){if(k.maxDepth=0,!LQ(b))V.push(v);k.tokens=V}if(Z.parts===!0||Z.tokens===!0){let A$;for(let s=0;s<Q.length;s++){let J$=A$?A$+1:j,Z$=Q[s],W$=$.slice(J$,Z$);if(Z.tokens){if(s===0&&j!==0)V[s].isPrefix=!0,V[s].value=S;else V[s].value=W$;NQ(V[s]),k.maxDepth+=V[s].depth}if(s!==0||W$!=="")X.push(W$);A$=Z$}if(A$&&A$+1<$.length){let s=$.slice(A$+1);if(X.push(s),Z.tokens)V[V.length-1].value=s,NQ(V[V.length-1]),k.maxDepth+=V[V.length-1].depth}k.slashes=Q,k.parts=X}return k};TQ.exports=vO});var hQ=p((Sw,vQ)=>{var j8=G8(),S0=X8(),{MAX_LENGTH:k9,POSIX_REGEX_SOURCE:hO,REGEX_NON_SPECIAL_CHARS:gO,REGEX_SPECIAL_CHARS_BACKREF:fO,REPLACEMENTS:EQ}=j8,mO=($,J)=>{if(typeof J.expandRange==="function")return J.expandRange(...$,J);$.sort();let Z=`[${$.join("-")}]`;try{new RegExp(Z)}catch(Y){return $.map((K)=>S0.escapeRegex(K)).join("..")}return Z},OJ=($,J)=>{return`Missing ${$}: "${J}" - use "\\\\${J}" to match literal characters`},xQ=($)=>{let J=[],Z=0,Y=0,K=0,Q="",V=!1;for(let X of $){if(V===!0){Q+=X,V=!1;continue}if(X==="\\"){Q+=X,V=!0;continue}if(X==='"'){K=K===1?0:1,Q+=X;continue}if(K===0){if(X==="[")Z++;else if(X==="]"&&Z>0)Z--;else if(Z===0){if(X==="(")Y++;else if(X===")"&&Y>0)Y--;else if(X==="|"&&Y===0){J.push(Q),Q="";continue}}}Q+=X}return J.push(Q),J},uO=($)=>{let J=!1;for(let Z of $){if(J===!0){J=!1;continue}if(Z==="\\"){J=!0;continue}if(/[?*+@!()[\]{}]/.test(Z))return!1}return!0},bQ=($)=>{let J=$.trim(),Z=!0;while(Z===!0)if(Z=!1,/^@\([^\\()[\]{}|]+\)$/.test(J))J=J.slice(2,-1),Z=!0;if(!uO(J))return;return J.replace(/\\(.)/g,"$1")},dO=($)=>{let J=$.map(bQ).filter(Boolean);for(let Z=0;Z<J.length;Z++)for(let Y=Z+1;Y<J.length;Y++){let K=J[Z],Q=J[Y],V=K[0];if(!V||K!==V.repeat(K.length)||Q!==V.repeat(Q.length))continue;if(K===Q||K.startsWith(Q)||Q.startsWith(K))return!0}return!1},Q7=($,J=!0)=>{if($[0]!=="+"&&$[0]!=="*"||$[1]!=="(")return;let Z=0,Y=0,K=0,Q=!1;for(let V=1;V<$.length;V++){let X=$[V];if(Q===!0){Q=!1;continue}if(X==="\\"){Q=!0;continue}if(X==='"'){K=K===1?0:1;continue}if(K===1)continue;if(X==="["){Z++;continue}if(X==="]"&&Z>0){Z--;continue}if(Z>0)continue;if(X==="("){Y++;continue}if(X===")"){if(Y--,Y===0){if(J===!0&&V!==$.length-1)return;return{type:$[0],body:$.slice(2,V),end:V}}}}},pO=($)=>{let J=0,Z=[];while(J<$.length){let K=Q7($.slice(J),!1);if(!K||K.type!=="*")return;let Q=xQ(K.body).map((X)=>X.trim());if(Q.length!==1)return;let V=bQ(Q[0]);if(!V||V.length!==1)return;Z.push(V),J+=K.end+1}if(Z.length<1)return;return`${Z.length===1?S0.escapeRegex(Z[0]):`[${Z.map((K)=>S0.escapeRegex(K)).join("")}]`}*`},cO=($)=>{let J=0,Z=$.trim(),Y=Q7(Z);while(Y)J++,Z=Y.body.trim(),Y=Q7(Z);return J},lO=($,J)=>{if(J.maxExtglobRecursion===!1)return{risky:!1};let Z=typeof J.maxExtglobRecursion==="number"?J.maxExtglobRecursion:j8.DEFAULT_MAX_EXTGLOB_RECURSION,Y=xQ($).map((K)=>K.trim());if(Y.length>1){if(Y.some((K)=>K==="")||Y.some((K)=>/^[*?]+$/.test(K))||dO(Y))return{risky:!0}}for(let K of Y){let Q=pO(K);if(Q)return{risky:!0,safeOutput:Q};if(cO(K)>Z)return{risky:!0}}return{risky:!1}},V7=($,J)=>{if(typeof $!=="string")throw TypeError("Expected a string");$=EQ[$]||$;let Z={...J},Y=typeof Z.maxLength==="number"?Math.min(k9,Z.maxLength):k9,K=$.length;if(K>Y)throw SyntaxError(`Input length: ${K}, exceeds maximum allowed length: ${Y}`);let Q={type:"bos",value:"",output:Z.prepend||""},V=[Q],X=Z.capture?"":"?:",W=S0.isWindows(J),_=j8.globChars(W),j=j8.extglobChars(_),{DOT_LITERAL:H,PLUS_LITERAL:q,SLASH_LITERAL:U,ONE_CHAR:z,DOTS_SLASH:M,NO_DOT:I,NO_DOT_SLASH:C,NO_DOTS_SLASH:P,QMARK:D,QMARK_NO_DOT:L,STAR:R,START_ANCHOR:N}=_,x=(d)=>{return`(${X}(?:(?!${N}${d.dot?M:H}).)*?)`},b=Z.dot?"":I,v=Z.dot?D:L,m=Z.bash===!0?x(Z):R;if(Z.capture)m=`(${m})`;if(typeof Z.noext==="boolean")Z.noextglob=Z.noext;let A={input:$,index:-1,start:0,dot:Z.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:V};$=S0.removePrefix($,A),K=$.length;let u=[],r=[],S=[],T=Q,k,A$=()=>A.index===K-1,s=A.peek=(d=1)=>$[A.index+d],J$=A.advance=()=>$[++A.index]||"",Z$=()=>$.slice(A.index+1),W$=(d="",Y$=0)=>{A.consumed+=d,A.index+=Y$},y$=(d)=>{A.output+=d.output!=null?d.output:d.value,W$(d.value)},Q$=()=>{let d=1;while(s()==="!"&&(s(2)!=="("||s(3)==="?"))J$(),A.start++,d++;if(d%2===0)return!1;return A.negated=!0,A.start++,!0},y=(d)=>{A[d]++,S.push(d)},n=(d)=>{A[d]--,S.pop()},a=(d)=>{if(T.type==="globstar"){let Y$=A.braces>0&&(d.type==="comma"||d.type==="brace"),g=d.extglob===!0||u.length&&(d.type==="pipe"||d.type==="paren");if(d.type!=="slash"&&d.type!=="paren"&&!Y$&&!g)A.output=A.output.slice(0,-T.output.length),T.type="star",T.value="*",T.output=m,A.output+=T.output}if(u.length&&d.type!=="paren")u[u.length-1].inner+=d.value;if(d.value||d.output)y$(d);if(T&&T.type==="text"&&d.type==="text"){T.value+=d.value,T.output=(T.output||"")+d.value;return}d.prev=T,V.push(d),T=d},c$=(d,Y$)=>{let g={...j[Y$],conditions:1,inner:""};g.prev=T,g.parens=A.parens,g.output=A.output,g.startIndex=A.index,g.tokensIndex=V.length;let t=(Z.capture?"(":"")+g.open;y("parens"),a({type:d,value:Y$,output:A.output?"":z}),a({type:"paren",extglob:!0,value:J$(),output:t}),u.push(g)},l=(d)=>{let Y$=$.slice(d.startIndex,A.index+1),g=$.slice(d.startIndex+2,A.index),t=lO(g,Z);if((d.type==="plus"||d.type==="star")&&t.risky){let M$=t.safeOutput?(d.output?"":z)+(Z.capture?`(${t.safeOutput})`:t.safeOutput):void 0,r$=V[d.tokensIndex];r$.type="text",r$.value=Y$,r$.output=M$||S0.escapeRegex(Y$);for(let K0=d.tokensIndex+1;K0<V.length;K0++)V[K0].value="",V[K0].output="",delete V[K0].suffix;A.output=d.output+r$.output,A.backtrack=!0,a({type:"paren",extglob:!0,value:k,output:""}),n("parens");return}let C$=d.close+(Z.capture?")":""),T$;if(d.type==="negate"){let M$=m;if(d.inner&&d.inner.length>1&&d.inner.includes("/"))M$=x(Z);if(M$!==m||A$()||/^\)+$/.test(Z$()))C$=d.close=`)$))${M$}`;if(d.inner.includes("*")&&(T$=Z$())&&/^\.[^\\/.]+$/.test(T$)){let r$=V7(T$,{...J,fastpaths:!1}).output;C$=d.close=`)${r$})${M$})`}if(d.prev.type==="bos")A.negatedExtglob=!0}a({type:"paren",extglob:!0,value:k,output:C$}),n("parens")};if(Z.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let d=!1,Y$=$.replace(fO,(g,t,C$,T$,M$,r$)=>{if(T$==="\\")return d=!0,g;if(T$==="?"){if(t)return t+T$+(M$?D.repeat(M$.length):"");if(r$===0)return v+(M$?D.repeat(M$.length):"");return D.repeat(C$.length)}if(T$===".")return H.repeat(C$.length);if(T$==="*"){if(t)return t+T$+(M$?m:"");return m}return t?g:`\\${g}`});if(d===!0)if(Z.unescape===!0)Y$=Y$.replace(/\\/g,"");else Y$=Y$.replace(/\\+/g,(g)=>{return g.length%2===0?"\\\\":g?"\\":""});if(Y$===$&&Z.contains===!0)return A.output=$,A;return A.output=S0.wrapOutput(Y$,A,J),A}while(!A$()){if(k=J$(),k==="\x00")continue;if(k==="\\"){let g=s();if(g==="/"&&Z.bash!==!0)continue;if(g==="."||g===";")continue;if(!g){k+="\\",a({type:"text",value:k});continue}let t=/^\\+/.exec(Z$()),C$=0;if(t&&t[0].length>2){if(C$=t[0].length,A.index+=C$,C$%2!==0)k+="\\"}if(Z.unescape===!0)k=J$();else k+=J$();if(A.brackets===0){a({type:"text",value:k});continue}}if(A.brackets>0&&(k!=="]"||T.value==="["||T.value==="[^")){if(Z.posix!==!1&&k===":"){let g=T.value.slice(1);if(g.includes("[")){if(T.posix=!0,g.includes(":")){let t=T.value.lastIndexOf("["),C$=T.value.slice(0,t),T$=T.value.slice(t+2),M$=hO[T$];if(M$){if(T.value=C$+M$,A.backtrack=!0,J$(),!Q.output&&V.indexOf(T)===1)Q.output=z;continue}}}}if(k==="["&&s()!==":"||k==="-"&&s()==="]")k=`\\${k}`;if(k==="]"&&(T.value==="["||T.value==="[^"))k=`\\${k}`;if(Z.posix===!0&&k==="!"&&T.value==="[")k="^";T.value+=k,y$({value:k});continue}if(A.quotes===1&&k!=='"'){k=S0.escapeRegex(k),T.value+=k,y$({value:k});continue}if(k==='"'){if(A.quotes=A.quotes===1?0:1,Z.keepQuotes===!0)a({type:"text",value:k});continue}if(k==="("){y("parens"),a({type:"paren",value:k});continue}if(k===")"){if(A.parens===0&&Z.strictBrackets===!0)throw SyntaxError(OJ("opening","("));let g=u[u.length-1];if(g&&A.parens===g.parens+1){l(u.pop());continue}a({type:"paren",value:k,output:A.parens?")":"\\)"}),n("parens");continue}if(k==="["){if(Z.nobracket===!0||!Z$().includes("]")){if(Z.nobracket!==!0&&Z.strictBrackets===!0)throw SyntaxError(OJ("closing","]"));k=`\\${k}`}else y("brackets");a({type:"bracket",value:k});continue}if(k==="]"){if(Z.nobracket===!0||T&&T.type==="bracket"&&T.value.length===1){a({type:"text",value:k,output:`\\${k}`});continue}if(A.brackets===0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("opening","["));a({type:"text",value:k,output:`\\${k}`});continue}n("brackets");let g=T.value.slice(1);if(T.posix!==!0&&g[0]==="^"&&!g.includes("/"))k=`/${k}`;if(T.value+=k,y$({value:k}),Z.literalBrackets===!1||S0.hasRegexChars(g))continue;let t=S0.escapeRegex(T.value);if(A.output=A.output.slice(0,-T.value.length),Z.literalBrackets===!0){A.output+=t,T.value=t;continue}T.value=`(${X}${t}|${T.value})`,A.output+=T.value;continue}if(k==="{"&&Z.nobrace!==!0){y("braces");let g={type:"brace",value:k,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};r.push(g),a(g);continue}if(k==="}"){let g=r[r.length-1];if(Z.nobrace===!0||!g){a({type:"text",value:k,output:k});continue}let t=")";if(g.dots===!0){let C$=V.slice(),T$=[];for(let M$=C$.length-1;M$>=0;M$--){if(V.pop(),C$[M$].type==="brace")break;if(C$[M$].type!=="dots")T$.unshift(C$[M$].value)}t=mO(T$,Z),A.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){let C$=A.output.slice(0,g.outputIndex),T$=A.tokens.slice(g.tokensIndex);g.value=g.output="\\{",k=t="\\}",A.output=C$;for(let M$ of T$)A.output+=M$.output||M$.value}a({type:"brace",value:k,output:t}),n("braces"),r.pop();continue}if(k==="|"){if(u.length>0)u[u.length-1].conditions++;a({type:"text",value:k});continue}if(k===","){let g=k,t=r[r.length-1];if(t&&S[S.length-1]==="braces")t.comma=!0,g="|";a({type:"comma",value:k,output:g});continue}if(k==="/"){if(T.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",V.pop(),T=Q;continue}a({type:"slash",value:k,output:U});continue}if(k==="."){if(A.braces>0&&T.type==="dot"){if(T.value===".")T.output=H;let g=r[r.length-1];T.type="dots",T.output+=k,T.value+=k,g.dots=!0;continue}if(A.braces+A.parens===0&&T.type!=="bos"&&T.type!=="slash"){a({type:"text",value:k,output:H});continue}a({type:"dot",value:k,output:H});continue}if(k==="?"){if(!(T&&T.value==="(")&&Z.noextglob!==!0&&s()==="("&&s(2)!=="?"){c$("qmark",k);continue}if(T&&T.type==="paren"){let t=s(),C$=k;if(t==="<"&&!S0.supportsLookbehinds())throw Error("Node.js v10 or higher is required for regex lookbehinds");if(T.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(Z$()))C$=`\\${k}`;a({type:"text",value:k,output:C$});continue}if(Z.dot!==!0&&(T.type==="slash"||T.type==="bos")){a({type:"qmark",value:k,output:L});continue}a({type:"qmark",value:k,output:D});continue}if(k==="!"){if(Z.noextglob!==!0&&s()==="("){if(s(2)!=="?"||!/[!=<:]/.test(s(3))){c$("negate",k);continue}}if(Z.nonegate!==!0&&A.index===0){Q$();continue}}if(k==="+"){if(Z.noextglob!==!0&&s()==="("&&s(2)!=="?"){c$("plus",k);continue}if(T&&T.value==="("||Z.regex===!1){a({type:"plus",value:k,output:q});continue}if(T&&(T.type==="bracket"||T.type==="paren"||T.type==="brace")||A.parens>0){a({type:"plus",value:k});continue}a({type:"plus",value:q});continue}if(k==="@"){if(Z.noextglob!==!0&&s()==="("&&s(2)!=="?"){a({type:"at",extglob:!0,value:k,output:""});continue}a({type:"text",value:k});continue}if(k!=="*"){if(k==="$"||k==="^")k=`\\${k}`;let g=gO.exec(Z$());if(g)k+=g[0],A.index+=g[0].length;a({type:"text",value:k});continue}if(T&&(T.type==="globstar"||T.star===!0)){T.type="star",T.star=!0,T.value+=k,T.output=m,A.backtrack=!0,A.globstar=!0,W$(k);continue}let d=Z$();if(Z.noextglob!==!0&&/^\([^?]/.test(d)){c$("star",k);continue}if(T.type==="star"){if(Z.noglobstar===!0){W$(k);continue}let g=T.prev,t=g.prev,C$=g.type==="slash"||g.type==="bos",T$=t&&(t.type==="star"||t.type==="globstar");if(Z.bash===!0&&(!C$||d[0]&&d[0]!=="/")){a({type:"star",value:k,output:""});continue}let M$=A.braces>0&&(g.type==="comma"||g.type==="brace"),r$=u.length&&(g.type==="pipe"||g.type==="paren");if(!C$&&g.type!=="paren"&&!M$&&!r$){a({type:"star",value:k,output:""});continue}while(d.slice(0,3)==="/**"){let K0=$[A.index+4];if(K0&&K0!=="/")break;d=d.slice(3),W$("/**",3)}if(g.type==="bos"&&A$()){T.type="globstar",T.value+=k,T.output=x(Z),A.output=T.output,A.globstar=!0,W$(k);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!T$&&A$()){A.output=A.output.slice(0,-(g.output+T.output).length),g.output=`(?:${g.output}`,T.type="globstar",T.output=x(Z)+(Z.strictSlashes?")":"|$)"),T.value+=k,A.globstar=!0,A.output+=g.output+T.output,W$(k);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&d[0]==="/"){let K0=d[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(g.output+T.output).length),g.output=`(?:${g.output}`,T.type="globstar",T.output=`${x(Z)}${U}|${U}${K0})`,T.value+=k,A.output+=g.output+T.output,A.globstar=!0,W$(k+J$()),a({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&d[0]==="/"){T.type="globstar",T.value+=k,T.output=`(?:^|${U}|${x(Z)}${U})`,A.output=T.output,A.globstar=!0,W$(k+J$()),a({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-T.output.length),T.type="globstar",T.output=x(Z),T.value+=k,A.output+=T.output,A.globstar=!0,W$(k);continue}let Y$={type:"star",value:k,output:m};if(Z.bash===!0){if(Y$.output=".*?",T.type==="bos"||T.type==="slash")Y$.output=b+Y$.output;a(Y$);continue}if(T&&(T.type==="bracket"||T.type==="paren")&&Z.regex===!0){Y$.output=k,a(Y$);continue}if(A.index===A.start||T.type==="slash"||T.type==="dot"){if(T.type==="dot")A.output+=C,T.output+=C;else if(Z.dot===!0)A.output+=P,T.output+=P;else A.output+=b,T.output+=b;if(s()!=="*")A.output+=z,T.output+=z}a(Y$)}while(A.brackets>0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("closing","]"));A.output=S0.escapeLast(A.output,"["),n("brackets")}while(A.parens>0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("closing",")"));A.output=S0.escapeLast(A.output,"("),n("parens")}while(A.braces>0){if(Z.strictBrackets===!0)throw SyntaxError(OJ("closing","}"));A.output=S0.escapeLast(A.output,"{"),n("braces")}if(Z.strictSlashes!==!0&&(T.type==="star"||T.type==="bracket"))a({type:"maybe_slash",value:"",output:`${U}?`});if(A.backtrack===!0){A.output="";for(let d of A.tokens)if(A.output+=d.output!=null?d.output:d.value,d.suffix)A.output+=d.suffix}return A};V7.fastpaths=($,J)=>{let Z={...J},Y=typeof Z.maxLength==="number"?Math.min(k9,Z.maxLength):k9,K=$.length;if(K>Y)throw SyntaxError(`Input length: ${K}, exceeds maximum allowed length: ${Y}`);$=EQ[$]||$;let Q=S0.isWindows(J),{DOT_LITERAL:V,SLASH_LITERAL:X,ONE_CHAR:W,DOTS_SLASH:_,NO_DOT:j,NO_DOTS:H,NO_DOTS_SLASH:q,STAR:U,START_ANCHOR:z}=j8.globChars(Q),M=Z.dot?H:j,I=Z.dot?q:j,C=Z.capture?"":"?:",P={negated:!1,prefix:""},D=Z.bash===!0?".*?":U;if(Z.capture)D=`(${D})`;let L=(b)=>{if(b.noglobstar===!0)return D;return`(${C}(?:(?!${z}${b.dot?_:V}).)*?)`},R=(b)=>{switch(b){case"*":return`${M}${W}${D}`;case".*":return`${V}${W}${D}`;case"*.*":return`${M}${D}${V}${W}${D}`;case"*/*":return`${M}${D}${X}${W}${I}${D}`;case"**":return M+L(Z);case"**/*":return`(?:${M}${L(Z)}${X})?${I}${W}${D}`;case"**/*.*":return`(?:${M}${L(Z)}${X})?${I}${D}${V}${W}${D}`;case"**/.*":return`(?:${M}${L(Z)}${X})?${V}${W}${D}`;default:{let v=/^(.*?)\.(\w+)$/.exec(b);if(!v)return;let m=R(v[1]);if(!m)return;return m+V+v[2]}}},N=S0.removePrefix($,P),x=R(N);if(x&&Z.strictSlashes!==!0)x+=`${X}?`;return x};vQ.exports=V7});var fQ=p((ww,gQ)=>{var oO=d0("path"),rO=kQ(),G7=hQ(),X7=X8(),iO=G8(),sO=($)=>$&&typeof $==="object"&&!Array.isArray($),U0=($,J,Z=!1)=>{if(Array.isArray($)){let j=$.map((q)=>U0(q,J,Z));return(q)=>{for(let U of j){let z=U(q);if(z)return z}return!1}}let Y=sO($)&&$.tokens&&$.input;if($===""||typeof $!=="string"&&!Y)throw TypeError("Expected pattern to be a non-empty string");let K=J||{},Q=X7.isWindows(J),V=Y?U0.compileRe($,J):U0.makeRe($,J,!1,!0),X=V.state;delete V.state;let W=()=>!1;if(K.ignore){let j={...J,ignore:null,onMatch:null,onResult:null};W=U0(K.ignore,j,Z)}let _=(j,H=!1)=>{let{isMatch:q,match:U,output:z}=U0.test(j,V,J,{glob:$,posix:Q}),M={glob:$,state:X,regex:V,posix:Q,input:j,output:z,match:U,isMatch:q};if(typeof K.onResult==="function")K.onResult(M);if(q===!1)return M.isMatch=!1,H?M:!1;if(W(j)){if(typeof K.onIgnore==="function")K.onIgnore(M);return M.isMatch=!1,H?M:!1}if(typeof K.onMatch==="function")K.onMatch(M);return H?M:!0};if(Z)_.state=X;return _};U0.test=($,J,Z,{glob:Y,posix:K}={})=>{if(typeof $!=="string")throw TypeError("Expected input to be a string");if($==="")return{isMatch:!1,output:""};let Q=Z||{},V=Q.format||(K?X7.toPosixSlashes:null),X=$===Y,W=X&&V?V($):$;if(X===!1)W=V?V($):$,X=W===Y;if(X===!1||Q.capture===!0)if(Q.matchBase===!0||Q.basename===!0)X=U0.matchBase($,J,Z,K);else X=J.exec(W);return{isMatch:Boolean(X),match:X,output:W}};U0.matchBase=($,J,Z,Y=X7.isWindows(Z))=>{return(J instanceof RegExp?J:U0.makeRe(J,Z)).test(oO.basename($))};U0.isMatch=($,J,Z)=>U0(J,Z)($);U0.parse=($,J)=>{if(Array.isArray($))return $.map((Z)=>U0.parse(Z,J));return G7($,{...J,fastpaths:!1})};U0.scan=($,J)=>rO($,J);U0.compileRe=($,J,Z=!1,Y=!1)=>{if(Z===!0)return $.output;let K=J||{},Q=K.contains?"":"^",V=K.contains?"":"$",X=`${Q}(?:${$.output})${V}`;if($&&$.negated===!0)X=`^(?!${X}).*$`;let W=U0.toRegex(X,J);if(Y===!0)W.state=$;return W};U0.makeRe=($,J={},Z=!1,Y=!1)=>{if(!$||typeof $!=="string")throw TypeError("Expected a non-empty string");let K={negated:!1,fastpaths:!0};if(J.fastpaths!==!1&&($[0]==="."||$[0]==="*"))K.output=G7.fastpaths($,J);if(!K.output)K=G7($,J);return U0.compileRe(K,J,Z,Y)};U0.toRegex=($,J)=>{try{let Z=J||{};return new RegExp($,Z.flags||(Z.nocase?"i":""))}catch(Z){if(J&&J.debug===!0)throw Z;return/$^/}};U0.constants=iO;gQ.exports=U0});var lQ=p((Rw,cQ)=>{var uQ=d0("util"),dQ=MQ(),w1=fQ(),W7=X8(),mQ=($)=>$===""||$==="./",pQ=($)=>{let J=$.indexOf("{");return J>-1&&$.indexOf("}",J)>-1},a$=($,J,Z)=>{J=[].concat(J),$=[].concat($);let Y=new Set,K=new Set,Q=new Set,V=0,X=(j)=>{if(Q.add(j.output),Z&&Z.onResult)Z.onResult(j)};for(let j=0;j<J.length;j++){let H=w1(String(J[j]),{...Z,onResult:X},!0),q=H.state.negated||H.state.negatedExtglob;if(q)V++;for(let U of $){let z=H(U,!0);if(!(q?!z.isMatch:z.isMatch))continue;if(q)Y.add(z.output);else Y.delete(z.output),K.add(z.output)}}let _=(V===J.length?[...Q]:[...K]).filter((j)=>!Y.has(j));if(Z&&_.length===0){if(Z.failglob===!0)throw Error(`No matches found for "${J.join(", ")}"`);if(Z.nonull===!0||Z.nullglob===!0)return Z.unescape?J.map((j)=>j.replace(/\\/g,"")):J}return _};a$.match=a$;a$.matcher=($,J)=>w1($,J);a$.isMatch=($,J,Z)=>w1(J,Z)($);a$.any=a$.isMatch;a$.not=($,J,Z={})=>{J=[].concat(J).map(String);let Y=new Set,K=[],V=new Set(a$($,J,{...Z,onResult:(X)=>{if(Z.onResult)Z.onResult(X);K.push(X.output)}}));for(let X of K)if(!V.has(X))Y.add(X);return[...Y]};a$.contains=($,J,Z)=>{if(typeof $!=="string")throw TypeError(`Expected a string: "${uQ.inspect($)}"`);if(Array.isArray(J))return J.some((Y)=>a$.contains($,Y,Z));if(typeof J==="string"){if(mQ($)||mQ(J))return!1;if($.includes(J)||$.startsWith("./")&&$.slice(2).includes(J))return!0}return a$.isMatch($,J,{...Z,contains:!0})};a$.matchKeys=($,J,Z)=>{if(!W7.isObject($))throw TypeError("Expected the first argument to be an object");let Y=a$(Object.keys($),J,Z),K={};for(let Q of Y)K[Q]=$[Q];return K};a$.some=($,J,Z)=>{let Y=[].concat($);for(let K of[].concat(J)){let Q=w1(String(K),Z);if(Y.some((V)=>Q(V)))return!0}return!1};a$.every=($,J,Z)=>{let Y=[].concat($);for(let K of[].concat(J)){let Q=w1(String(K),Z);if(!Y.every((V)=>Q(V)))return!1}return!0};a$.all=($,J,Z)=>{if(typeof $!=="string")throw TypeError(`Expected a string: "${uQ.inspect($)}"`);return[].concat(J).every((Y)=>w1(Y,Z)($))};a$.capture=($,J,Z)=>{let Y=W7.isWindows(Z),Q=w1.makeRe(String($),{...Z,capture:!0}).exec(Y?W7.toPosixSlashes(J):J);if(Q)return Q.slice(1).map((V)=>V===void 0?"":V)};a$.makeRe=(...$)=>w1.makeRe(...$);a$.scan=(...$)=>w1.scan(...$);a$.parse=($,J)=>{let Z=[];for(let Y of[].concat($||[]))for(let K of dQ(String(Y),J))Z.push(w1.parse(K,J));return Z};a$.braces=($,J)=>{if(typeof $!=="string")throw TypeError("Expected a string");if(J&&J.nobrace===!0||!pQ($))return[$];return dQ($,J)};a$.braceExpand=($,J)=>{if(typeof $!=="string")throw TypeError("Expected a string");return a$.braces($,{...J,expand:!0})};a$.hasBraces=pQ;cQ.exports=a$});var rQ=p((Lw,oQ)=>{/*!
19
19
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
20
20
  *
21
21
  * Copyright (c) 2014-2016, Jon Schlinkert.
@@ -28,18 +28,18 @@ import{$j as F0,Ak as M8,Bk as c7,Ck as yZ,Dk as TZ,Ek as MX,Fk as wX,Gk as RX,H
28
28
  */var nO=rQ(),iQ={"{":"}","(":")","[":"]"},aO=function($){if($[0]==="!")return!0;var J=0,Z=-2,Y=-2,K=-2,Q=-2,V=-2;while(J<$.length){if($[J]==="*")return!0;if($[J+1]==="?"&&/[\].+)]/.test($[J]))return!0;if(Y!==-1&&$[J]==="["&&$[J+1]!=="]"){if(Y<J)Y=$.indexOf("]",J);if(Y>J){if(V===-1||V>Y)return!0;if(V=$.indexOf("\\",J),V===-1||V>Y)return!0}}if(K!==-1&&$[J]==="{"&&$[J+1]!=="}"){if(K=$.indexOf("}",J),K>J){if(V=$.indexOf("\\",J),V===-1||V>K)return!0}}if(Q!==-1&&$[J]==="("&&$[J+1]==="?"&&/[:!=]/.test($[J+2])&&$[J+3]!==")"){if(Q=$.indexOf(")",J),Q>J){if(V=$.indexOf("\\",J),V===-1||V>Q)return!0}}if(Z!==-1&&$[J]==="("&&$[J+1]!=="|"){if(Z<J)Z=$.indexOf("|",J);if(Z!==-1&&$[Z+1]!==")"){if(Q=$.indexOf(")",Z),Q>Z){if(V=$.indexOf("\\",Z),V===-1||V>Q)return!0}}}if($[J]==="\\"){var X=$[J+1];J+=2;var W=iQ[X];if(W){var _=$.indexOf(W,J);if(_!==-1)J=_+1}if($[J]==="!")return!0}else J++}return!1},tO=function($){if($[0]==="!")return!0;var J=0;while(J<$.length){if(/[*?{}()[\]]/.test($[J]))return!0;if($[J]==="\\"){var Z=$[J+1];J+=2;var Y=iQ[Z];if(Y){var K=$.indexOf(Y,J);if(K!==-1)J=K+1}if($[J]==="!")return!0}else J++}return!1};sQ.exports=function(J,Z){if(typeof J!=="string"||J==="")return!1;if(nO(J))return!0;var Y=aO;if(Z&&Z.strict===!1)Y=tO;return Y(J)}});var aG=p((Bk,nG)=>{var Cz=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],sG=/[\n\r\u2028\u2029]/,Mz=/[\s#!"$&'():;<=>@\\^`|]/g;nG.exports=function(J){return J.map(function(Z){if(Z==="")return"''";if(Z&&typeof Z==="object"){if(Z.op==="glob"){if(typeof Z.pattern!=="string")throw TypeError("glob token requires a string `pattern`");if(sG.test(Z.pattern))throw TypeError("glob `pattern` must not contain line terminators");return Z.pattern.replace(Mz,"\\$&")}if(typeof Z.op==="string"){if(Cz.indexOf(Z.op)<0)throw TypeError("invalid `op` value: "+JSON.stringify(Z.op));return Z.op.replace(/[\s\S]/g,"\\$&")}if(typeof Z.comment==="string"){if(sG.test(Z.comment))throw TypeError("`comment` must not contain line terminators");return"#"+Z.comment}throw TypeError("unrecognized object token shape")}if(/["\s\\]/.test(Z)&&!/'/.test(Z))return"'"+Z.replace(/(['])/g,"\\$1")+"'";if(/["'\s]/.test(Z))return'"'+Z.replace(/(["\\$`!])/g,"\\$1")+'"';return String(Z).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,"$1\\$2")}).join(" ")}});var KX=p((Hk,YX)=>{var ZX="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",tG=new RegExp("^"+ZX+"$"),eG="|&;()<> \\t",Dz='"((\\\\"|[^"])*?)"',Pz="'((\\\\'|[^'])*?)'",Iz=/^#$/,$X="'",JX='"',x7="$",p2="",Az=4294967296;for(MZ=0;MZ<4;MZ++)p2+=(Az*Math.random()).toString(16);var MZ,Sz=new RegExp("^"+p2);function wz($,J){var Z=J.lastIndex,Y=[],K;while(K=J.exec($))if(Y.push(K),J.lastIndex===K.index)J.lastIndex+=1;return J.lastIndex=Z,Y}function Rz($,J,Z){var Y=typeof $==="function"?$(Z):$[Z];if(typeof Y>"u"&&Z!="")Y="";else if(typeof Y>"u")Y="$";if(typeof Y==="object")return J+p2+JSON.stringify(Y)+p2;return J+Y}function Lz($,J,Z){if(!Z)Z={};var Y=Z.escape||"\\",K="(\\"+Y+`['"`+eG+`]|[^\\s'"`+eG+"])+",Q=new RegExp(["("+ZX+")","("+K+"|"+Dz+"|"+Pz+")+"].join("|"),"g"),V=wz($,Q);if(V.length===0)return[];if(!J)J={};var X=!1;return V.map(function(W){var _=W[0];if(!_||X)return;if(tG.test(_))return{op:_};var j=!1,H=!1,q="",U=!1,z;function M(){z+=1;var P,D,L=_.charAt(z);if(L==="{"){if(z+=1,_.charAt(z)==="}")throw Error("Bad substitution: "+_.slice(z-2,z+1));if(P=_.indexOf("}",z),P<0)throw Error("Bad substitution: "+_.slice(z));D=_.slice(z,P),z=P}else if(/[*@#?$!_-]/.test(L))D=L,z+=1;else{var R=_.slice(z);if(P=R.match(/[^\w\d_]/),!P)D=R,z=_.length;else D=R.slice(0,P.index),z+=P.index-1}return Rz(J,"",D)}for(z=0;z<_.length;z++){var I=_.charAt(z);if(U=U||!j&&(I==="*"||I==="?"),H)q+=I,H=!1;else if(j)if(I===j)j=!1;else if(j==$X)q+=I;else if(I===Y)if(z+=1,I=_.charAt(z),I===JX||I===Y||I===x7)q+=I;else q+=Y+I;else if(I===x7)q+=M();else q+=I;else if(I===JX||I===$X)j=I;else if(tG.test(I))return{op:_};else if(Iz.test(I)){X=!0;var C={comment:$.slice(W.index+z+1)};if(q.length)return[q,C];return[C]}else if(I===Y)H=!0;else if(I===x7)q+=M();else q+=I}if(U)return{op:"glob",pattern:q};return q}).reduce(function(W,_){return typeof _>"u"?W:W.concat(_)},[])}YX.exports=function(J,Z,Y){var K=Lz(J,Z,Y);if(typeof Z!=="function")return K;return K.reduce(function(Q,V){if(typeof V==="object")return Q.concat(V);var X=V.split(RegExp("("+p2+".*?"+p2+")","g"));if(X.length===1)return Q.concat(X[0]);return Q.concat(X.filter(Boolean).map(function(W){if(Sz.test(W))return JSON.parse(W.split(p2)[1]);return W}))},[])}});var QX=p((Nz)=>{Nz.quote=aG();Nz.parse=KX()});var TJ=p((Hb,eX)=>{eX.exports=r2;r2.CAPTURING_PHASE=1;r2.AT_TARGET=2;r2.BUBBLING_PHASE=3;function r2($,J){if(this.type="",this.target=null,this.currentTarget=null,this.eventPhase=r2.AT_TARGET,this.bubbles=!1,this.cancelable=!1,this.isTrusted=!1,this.defaultPrevented=!1,this.timeStamp=Date.now(),this._propagationStopped=!1,this._immediatePropagationStopped=!1,this._initialized=!0,this._dispatching=!1,$)this.type=$;if(J)for(var Z in J)this[Z]=J[Z]}r2.prototype=Object.create(Object.prototype,{constructor:{value:r2},stopPropagation:{value:function(){this._propagationStopped=!0}},stopImmediatePropagation:{value:function(){this._propagationStopped=!0,this._immediatePropagationStopped=!0}},preventDefault:{value:function(){if(this.cancelable)this.defaultPrevented=!0}},initEvent:{value:function(J,Z,Y){if(this._initialized=!0,this._dispatching)return;this._propagationStopped=!1,this._immediatePropagationStopped=!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.type=J,this.bubbles=Z,this.cancelable=Y}}})});var a7=p((_b,JW)=>{var $W=TJ();JW.exports=n7;function n7(){$W.call(this),this.view=null,this.detail=0}n7.prototype=Object.create($W.prototype,{constructor:{value:n7},initUIEvent:{value:function($,J,Z,Y,K){this.initEvent($,J,Z),this.view=Y,this.detail=K}}})});var e7=p((Ob,YW)=>{var ZW=a7();YW.exports=t7;function t7(){ZW.call(this),this.screenX=this.screenY=this.clientX=this.clientY=0,this.ctrlKey=this.altKey=this.shiftKey=this.metaKey=!1,this.button=0,this.buttons=1,this.relatedTarget=null}t7.prototype=Object.create(ZW.prototype,{constructor:{value:t7},initMouseEvent:{value:function($,J,Z,Y,K,Q,V,X,W,_,j,H,q,U,z){switch(this.initEvent($,J,Z,Y,K),this.screenX=Q,this.screenY=V,this.clientX=X,this.clientY=W,this.ctrlKey=_,this.altKey=j,this.shiftKey=H,this.metaKey=q,this.button=U,U){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2;break;default:this.buttons=0;break}this.relatedTarget=z}},getModifierState:{value:function($){switch($){case"Alt":return this.altKey;case"Control":return this.ctrlKey;case"Shift":return this.shiftKey;case"Meta":return this.metaKey;default:return!1}}}})});var vZ=p((qb,QW)=>{QW.exports=bZ;var hC=1,gC=3,fC=4,mC=5,uC=7,dC=8,pC=9,cC=11,lC=12,oC=13,rC=14,iC=15,sC=17,nC=18,aC=19,tC=20,eC=21,$M=22,JM=23,ZM=24,YM=25,KM=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],QM=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],KW={INDEX_SIZE_ERR:hC,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:gC,WRONG_DOCUMENT_ERR:fC,INVALID_CHARACTER_ERR:mC,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:uC,NOT_FOUND_ERR:dC,NOT_SUPPORTED_ERR:pC,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:cC,SYNTAX_ERR:lC,INVALID_MODIFICATION_ERR:oC,NAMESPACE_ERR:rC,INVALID_ACCESS_ERR:iC,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:sC,SECURITY_ERR:nC,NETWORK_ERR:aC,ABORT_ERR:tC,URL_MISMATCH_ERR:eC,QUOTA_EXCEEDED_ERR:$M,TIMEOUT_ERR:JM,INVALID_NODE_TYPE_ERR:ZM,DATA_CLONE_ERR:YM};function bZ($){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=$,this.message=QM[$],this.name=KM[$]}bZ.prototype.__proto__=Error.prototype;for(I8 in KW)xZ={value:KW[I8]},Object.defineProperty(bZ,I8,xZ),Object.defineProperty(bZ.prototype,I8,xZ);var xZ,I8});var hZ=p((VM)=>{VM.isApiWritable=!globalThis.__domino_frozen__});var X0=p((WM)=>{var G0=vZ(),H0=G0,XM=hZ().isApiWritable;WM.NAMESPACE={HTML:"http://www.w3.org/1999/xhtml",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink"};WM.IndexSizeError=function(){throw new G0(H0.INDEX_SIZE_ERR)};WM.HierarchyRequestError=function(){throw new G0(H0.HIERARCHY_REQUEST_ERR)};WM.WrongDocumentError=function(){throw new G0(H0.WRONG_DOCUMENT_ERR)};WM.InvalidCharacterError=function(){throw new G0(H0.INVALID_CHARACTER_ERR)};WM.NoModificationAllowedError=function(){throw new G0(H0.NO_MODIFICATION_ALLOWED_ERR)};WM.NotFoundError=function(){throw new G0(H0.NOT_FOUND_ERR)};WM.NotSupportedError=function(){throw new G0(H0.NOT_SUPPORTED_ERR)};WM.InvalidStateError=function(){throw new G0(H0.INVALID_STATE_ERR)};WM.SyntaxError=function(){throw new G0(H0.SYNTAX_ERR)};WM.InvalidModificationError=function(){throw new G0(H0.INVALID_MODIFICATION_ERR)};WM.NamespaceError=function(){throw new G0(H0.NAMESPACE_ERR)};WM.InvalidAccessError=function(){throw new G0(H0.INVALID_ACCESS_ERR)};WM.TypeMismatchError=function(){throw new G0(H0.TYPE_MISMATCH_ERR)};WM.SecurityError=function(){throw new G0(H0.SECURITY_ERR)};WM.NetworkError=function(){throw new G0(H0.NETWORK_ERR)};WM.AbortError=function(){throw new G0(H0.ABORT_ERR)};WM.UrlMismatchError=function(){throw new G0(H0.URL_MISMATCH_ERR)};WM.QuotaExceededError=function(){throw new G0(H0.QUOTA_EXCEEDED_ERR)};WM.TimeoutError=function(){throw new G0(H0.TIMEOUT_ERR)};WM.InvalidNodeTypeError=function(){throw new G0(H0.INVALID_NODE_TYPE_ERR)};WM.DataCloneError=function(){throw new G0(H0.DATA_CLONE_ERR)};WM.nyi=function(){throw Error("NotYetImplemented")};WM.shouldOverride=function(){throw Error("Abstract function; should be overriding in subclass.")};WM.assert=function($,J){if(!$)throw Error("Assertion failed: "+(J||"")+`
29
29
  `+Error().stack)};WM.expose=function($,J){for(var Z in $)Object.defineProperty(J.prototype,Z,{value:$[Z],writable:XM})};WM.merge=function($,J){for(var Z in J)$[Z]=J[Z]};WM.documentOrder=function($,J){return 3-($.compareDocumentPosition(J)&6)};WM.toASCIILowerCase=function($){return $.replace(/[A-Z]+/g,function(J){return J.toLowerCase()})};WM.toASCIIUpperCase=function($){return $.replace(/[a-z]+/g,function(J){return J.toUpperCase()})}});var $Y=p((Cb,GW)=>{var i2=TJ(),mM=e7(),uM=X0();GW.exports=VW;function VW(){}VW.prototype={addEventListener:function(J,Z,Y){if(!Z)return;if(Y===void 0)Y=!1;if(!this._listeners)this._listeners=Object.create(null);if(!this._listeners[J])this._listeners[J]=[];var K=this._listeners[J];for(var Q=0,V=K.length;Q<V;Q++){var X=K[Q];if(X.listener===Z&&X.capture===Y)return}var W={listener:Z,capture:Y};if(typeof Z==="function")W.f=Z;K.push(W)},removeEventListener:function(J,Z,Y){if(Y===void 0)Y=!1;if(this._listeners){var K=this._listeners[J];if(K)for(var Q=0,V=K.length;Q<V;Q++){var X=K[Q];if(X.listener===Z&&X.capture===Y){if(K.length===1)this._listeners[J]=void 0;else K.splice(Q,1);return}}}},dispatchEvent:function(J){return this._dispatchEvent(J,!1)},_dispatchEvent:function(J,Z){if(typeof Z!=="boolean")Z=!1;function Y(_,j){var{type:H,eventPhase:q}=j;if(j.currentTarget=_,q!==i2.CAPTURING_PHASE&&_._handlers&&_._handlers[H]){var U=_._handlers[H],z;if(typeof U==="function")z=U.call(j.currentTarget,j);else{var M=U.handleEvent;if(typeof M!=="function")throw TypeError("handleEvent property of event handler object isnot a function.");z=M.call(U,j)}switch(j.type){case"mouseover":if(z===!0)j.preventDefault();break;case"beforeunload":default:if(z===!1)j.preventDefault();break}}var I=_._listeners&&_._listeners[H];if(!I)return;I=I.slice();for(var C=0,P=I.length;C<P;C++){if(j._immediatePropagationStopped)return;var D=I[C];if(q===i2.CAPTURING_PHASE&&!D.capture||q===i2.BUBBLING_PHASE&&D.capture)continue;if(D.f)D.f.call(j.currentTarget,j);else{var L=D.listener.handleEvent;if(typeof L!=="function")throw TypeError("handleEvent property of event listener object is not a function.");L.call(D.listener,j)}}}if(!J._initialized||J._dispatching)uM.InvalidStateError();J.isTrusted=Z,J._dispatching=!0,J.target=this;var K=[];for(var Q=this.parentNode;Q;Q=Q.parentNode)K.push(Q);J.eventPhase=i2.CAPTURING_PHASE;for(var V=K.length-1;V>=0;V--)if(Y(K[V],J),J._propagationStopped)break;if(!J._propagationStopped)J.eventPhase=i2.AT_TARGET,Y(this,J);if(J.bubbles&&!J._propagationStopped){J.eventPhase=i2.BUBBLING_PHASE;for(var X=0,W=K.length;X<W;X++)if(Y(K[X],J),J._propagationStopped)break}if(J._dispatching=!1,J.eventPhase=i2.AT_TARGET,J.currentTarget=null,Z&&!J.defaultPrevented&&J instanceof mM)switch(J.type){case"mousedown":this._armed={x:J.clientX,y:J.clientY,t:J.timeStamp};break;case"mouseout":case"mouseover":this._armed=null;break;case"mouseup":if(this._isClick(J))this._doClick(J);this._armed=null;break}return!J.defaultPrevented},_isClick:function($){return this._armed!==null&&$.type==="mouseup"&&$.isTrusted&&$.button===0&&$.timeStamp-this._armed.t<1000&&Math.abs($.clientX-this._armed.x)<10&&Math.abs($.clientY-this._armed.Y)<10},_doClick:function($){if(this._click_in_progress)return;this._click_in_progress=!0;var J=this;while(J&&!J._post_click_activation_steps)J=J.parentNode;if(J&&J._pre_click_activation_steps)J._pre_click_activation_steps();var Z=this.ownerDocument.createEvent("MouseEvent");Z.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,$.screenX,$.screenY,$.clientX,$.clientY,$.ctrlKey,$.altKey,$.shiftKey,$.metaKey,$.button,null);var Y=this._dispatchEvent(Z,!0);if(J){if(Y){if(J._post_click_activation_steps)J._post_click_activation_steps(Z)}else if(J._cancelled_activation_steps)J._cancelled_activation_steps()}},_setEventHandler:function(J,Z){if(!this._handlers)this._handlers=Object.create(null);this._handlers[J]=Z},_getEventHandler:function(J){return this._handlers&&this._handlers[J]||null}}});var JY=p((Mb,XW)=>{var r1=X0(),V1=XW.exports={valid:function($){return r1.assert($,"list falsy"),r1.assert($._previousSibling,"previous falsy"),r1.assert($._nextSibling,"next falsy"),!0},insertBefore:function($,J){r1.assert(V1.valid($)&&V1.valid(J));var Z=$,Y=$._previousSibling,K=J,Q=J._previousSibling;Z._previousSibling=Q,Y._nextSibling=K,Q._nextSibling=Z,K._previousSibling=Y,r1.assert(V1.valid($)&&V1.valid(J))},replace:function($,J){if(r1.assert(V1.valid($)&&(J===null||V1.valid(J))),J!==null)V1.insertBefore(J,$);V1.remove($),r1.assert(V1.valid($)&&(J===null||V1.valid(J)))},remove:function($){r1.assert(V1.valid($));var J=$._previousSibling;if(J===$)return;var Z=$._nextSibling;J._nextSibling=Z,Z._previousSibling=J,$._previousSibling=$._nextSibling=$,r1.assert(V1.valid($))}}});var ZY=p((Db,qW)=>{qW.exports={serializeOne:iM,\u{275}escapeMatchingClosingTag:HW,\u{275}escapeClosingCommentTag:_W,\u{275}escapeProcessingInstructionContent:OW};var BW=X0(),s2=BW.NAMESPACE,WW={STYLE:!0,SCRIPT:!0,XMP:!0,IFRAME:!0,NOEMBED:!0,NOFRAMES:!0,PLAINTEXT:!0},dM={area:!0,base:!0,basefont:!0,bgsound:!0,br:!0,col:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},pM={},jW=/[&<>\u00A0]/g,UW=/[&"<>\u00A0]/g;function cM($){if(!jW.test($))return $;return $.replace(jW,(J)=>{switch(J){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xA0":return"&nbsp;"}})}function lM($){if(!UW.test($))return $;return $.replace(UW,(J)=>{switch(J){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case'"':return"&quot;";case"\xA0":return"&nbsp;"}})}function oM($){var J=$.namespaceURI;if(!J)return $.localName;if(J===s2.XML)return"xml:"+$.localName;if(J===s2.XLINK)return"xlink:"+$.localName;if(J===s2.XMLNS)if($.localName==="xmlns")return"xmlns";else return"xmlns:"+$.localName;return $.name}function HW($,J){let Z="</"+J;if(!$.toLowerCase().includes(Z))return $;let Y=[...$],K=$.matchAll(new RegExp(Z,"ig"));for(let Q of K)Y[Q.index]="&lt;";return Y.join("")}var rM=/--!?>/;function _W($){if(!rM.test($))return $;return $.replace(/(--\!?)>/g,"$1&gt;")}function OW($){return $.includes(">")?$.replaceAll(">","&gt;"):$}function iM($,J){var Z="";switch($.nodeType){case 1:var Y=$.namespaceURI,K=Y===s2.HTML,Q=K||Y===s2.SVG||Y===s2.MATHML?$.localName:$.tagName;Z+="<"+Q;for(var V=0,X=$._numattrs;V<X;V++){var W=$._attr(V);if(Z+=" "+oM(W),W.value!==void 0)Z+='="'+lM(W.value)+'"'}if(Z+=">",!(K&&dM[Q])){var _=$.serialize();if(WW[Q.toUpperCase()])_=HW(_,Q);if(K&&pM[Q]&&_.charAt(0)===`
30
30
  `)Z+=`
31
- `;Z+=_,Z+="</"+Q+">"}break;case 3:case 4:var j;if(J.nodeType===1&&J.namespaceURI===s2.HTML)j=J.tagName;else j="";if(WW[j]||j==="NOSCRIPT"&&J.ownerDocument._scripting_enabled)Z+=$.data;else Z+=cM($.data);break;case 8:Z+="<!--"+_W($.data)+"-->";break;case 7:let H=OW($.data);Z+="<?"+$.target+" "+H+"?>";break;case 10:Z+="<!DOCTYPE "+$.name,Z+=">";break;default:BW.InvalidStateError()}return Z}});var P0=p((Pb,PW)=>{PW.exports=$0;var DW=$Y(),gZ=JY(),FW=ZY(),m$=X0();function $0(){DW.call(this),this.parentNode=null,this._nextSibling=this._previousSibling=this,this._index=void 0}var f0=$0.ELEMENT_NODE=1,YY=$0.ATTRIBUTE_NODE=2,fZ=$0.TEXT_NODE=3,sM=$0.CDATA_SECTION_NODE=4,nM=$0.ENTITY_REFERENCE_NODE=5,KY=$0.ENTITY_NODE=6,zW=$0.PROCESSING_INSTRUCTION_NODE=7,CW=$0.COMMENT_NODE=8,A8=$0.DOCUMENT_NODE=9,G1=$0.DOCUMENT_TYPE_NODE=10,H2=$0.DOCUMENT_FRAGMENT_NODE=11,QY=$0.NOTATION_NODE=12,VY=$0.DOCUMENT_POSITION_DISCONNECTED=1,GY=$0.DOCUMENT_POSITION_PRECEDING=2,XY=$0.DOCUMENT_POSITION_FOLLOWING=4,MW=$0.DOCUMENT_POSITION_CONTAINS=8,WY=$0.DOCUMENT_POSITION_CONTAINED_BY=16,jY=$0.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;$0.prototype=Object.create(DW.prototype,{baseURI:{get:m$.nyi},parentElement:{get:function(){return this.parentNode&&this.parentNode.nodeType===f0?this.parentNode:null}},hasChildNodes:{value:m$.shouldOverride},firstChild:{get:m$.shouldOverride},lastChild:{get:m$.shouldOverride},isConnected:{get:function(){let $=this;while($!=null){if($.nodeType===$0.DOCUMENT_NODE)return!0;if($=$.parentNode,$!=null&&$.nodeType===$0.DOCUMENT_FRAGMENT_NODE)$=$.host}return!1}},previousSibling:{get:function(){var $=this.parentNode;if(!$)return null;if(this===$.firstChild)return null;return this._previousSibling}},nextSibling:{get:function(){var $=this.parentNode,J=this._nextSibling;if(!$)return null;if(J===$.firstChild)return null;return J}},textContent:{get:function(){return null},set:function($){}},innerText:{get:function(){return null},set:function($){}},_countChildrenOfType:{value:function($){var J=0;for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)if(Z.nodeType===$)J++;return J}},_ensureInsertValid:{value:function(J,Z,Y){var K=this,Q,V;if(!J.nodeType)throw TypeError("not a node");switch(K.nodeType){case A8:case H2:case f0:break;default:m$.HierarchyRequestError()}if(J.isAncestor(K))m$.HierarchyRequestError();if(Z!==null||!Y){if(Z.parentNode!==K)m$.NotFoundError()}switch(J.nodeType){case H2:case G1:case f0:case fZ:case zW:case CW:break;default:m$.HierarchyRequestError()}if(K.nodeType===A8)switch(J.nodeType){case fZ:m$.HierarchyRequestError();break;case H2:if(J._countChildrenOfType(fZ)>0)m$.HierarchyRequestError();switch(J._countChildrenOfType(f0)){case 0:break;case 1:if(Z!==null){if(Y&&Z.nodeType===G1)m$.HierarchyRequestError();for(V=Z.nextSibling;V!==null;V=V.nextSibling)if(V.nodeType===G1)m$.HierarchyRequestError()}if(Q=K._countChildrenOfType(f0),Y){if(Q>0)m$.HierarchyRequestError()}else if(Q>1||Q===1&&Z.nodeType!==f0)m$.HierarchyRequestError();break;default:m$.HierarchyRequestError()}break;case f0:if(Z!==null){if(Y&&Z.nodeType===G1)m$.HierarchyRequestError();for(V=Z.nextSibling;V!==null;V=V.nextSibling)if(V.nodeType===G1)m$.HierarchyRequestError()}if(Q=K._countChildrenOfType(f0),Y){if(Q>0)m$.HierarchyRequestError()}else if(Q>1||Q===1&&Z.nodeType!==f0)m$.HierarchyRequestError();break;case G1:if(Z===null){if(K._countChildrenOfType(f0))m$.HierarchyRequestError()}else for(V=K.firstChild;V!==null;V=V.nextSibling){if(V===Z)break;if(V.nodeType===f0)m$.HierarchyRequestError()}if(Q=K._countChildrenOfType(G1),Y){if(Q>0)m$.HierarchyRequestError()}else if(Q>1||Q===1&&Z.nodeType!==G1)m$.HierarchyRequestError();break}else if(J.nodeType===G1)m$.HierarchyRequestError()}},insertBefore:{value:function(J,Z){var Y=this;Y._ensureInsertValid(J,Z,!0);var K=Z;if(K===J)K=J.nextSibling;return Y.doc.adoptNode(J),J._insertOrReplace(Y,K,!1),J}},appendChild:{value:function($){return this.insertBefore($,null)}},_appendChild:{value:function($){$._insertOrReplace(this,null,!1)}},removeChild:{value:function(J){var Z=this;if(!J.nodeType)throw TypeError("not a node");if(J.parentNode!==Z)m$.NotFoundError();return J.remove(),J}},replaceChild:{value:function(J,Z){var Y=this;if(Y._ensureInsertValid(J,Z,!1),J.doc!==Y.doc)Y.doc.adoptNode(J);return J._insertOrReplace(Y,Z,!0),Z}},contains:{value:function(J){if(J===null)return!1;if(this===J)return!0;return(this.compareDocumentPosition(J)&WY)!==0}},compareDocumentPosition:{value:function(J){if(this===J)return 0;if(this.doc!==J.doc||this.rooted!==J.rooted)return VY+jY;var Z=[],Y=[];for(var K=this;K!==null;K=K.parentNode)Z.push(K);for(K=J;K!==null;K=K.parentNode)Y.push(K);if(Z.reverse(),Y.reverse(),Z[0]!==Y[0])return VY+jY;K=Math.min(Z.length,Y.length);for(var Q=1;Q<K;Q++)if(Z[Q]!==Y[Q])if(Z[Q].index<Y[Q].index)return XY;else return GY;if(Z.length<Y.length)return XY+WY;else return GY+MW}},isSameNode:{value:function(J){return this===J}},isEqualNode:{value:function(J){if(!J)return!1;if(J.nodeType!==this.nodeType)return!1;if(!this.isEqual(J))return!1;for(var Z=this.firstChild,Y=J.firstChild;Z&&Y;Z=Z.nextSibling,Y=Y.nextSibling)if(!Z.isEqualNode(Y))return!1;return Z===null&&Y===null}},cloneNode:{value:function($){var J=this.clone();if($)for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)J._appendChild(Z.cloneNode(!0));return J}},lookupPrefix:{value:function(J){var Z;if(J===""||J===null||J===void 0)return null;switch(this.nodeType){case f0:return this._lookupNamespacePrefix(J,this);case A8:return Z=this.documentElement,Z?Z.lookupPrefix(J):null;case KY:case QY:case H2:case G1:return null;case YY:return Z=this.ownerElement,Z?Z.lookupPrefix(J):null;default:return Z=this.parentElement,Z?Z.lookupPrefix(J):null}}},lookupNamespaceURI:{value:function(J){if(J===""||J===void 0)J=null;var Z;switch(this.nodeType){case f0:return m$.shouldOverride();case A8:return Z=this.documentElement,Z?Z.lookupNamespaceURI(J):null;case KY:case QY:case G1:case H2:return null;case YY:return Z=this.ownerElement,Z?Z.lookupNamespaceURI(J):null;default:return Z=this.parentElement,Z?Z.lookupNamespaceURI(J):null}}},isDefaultNamespace:{value:function(J){if(J===""||J===void 0)J=null;var Z=this.lookupNamespaceURI(null);return Z===J}},index:{get:function(){var $=this.parentNode;if(this===$.firstChild)return 0;var J=$.childNodes;if(this._index===void 0||J[this._index]!==this){for(var Z=0;Z<J.length;Z++)J[Z]._index=Z;m$.assert(J[this._index]===this)}return this._index}},isAncestor:{value:function($){if(this.doc!==$.doc)return!1;if(this.rooted!==$.rooted)return!1;for(var J=$;J;J=J.parentNode)if(J===this)return!0;return!1}},ensureSameDoc:{value:function($){if($.ownerDocument===null)$.ownerDocument=this.doc;else if($.ownerDocument!==this.doc)m$.WrongDocumentError()}},removeChildren:{value:m$.shouldOverride},_insertOrReplace:{value:function(J,Z,Y){var K=this,Q,V;if(K.nodeType===H2&&K.rooted)m$.HierarchyRequestError();if(J._childNodes){if(Q=Z===null?J._childNodes.length:Z.index,K.parentNode===J){var X=K.index;if(X<Q)Q--}}if(Y){if(Z.rooted)Z.doc.mutateRemove(Z);Z.parentNode=null}var W=Z;if(W===null)W=J.firstChild;var _=K.rooted&&J.rooted;if(K.nodeType===H2){var j=[0,Y?1:0],H;for(var q=K.firstChild;q!==null;q=H)H=q.nextSibling,j.push(q),q.parentNode=J;var U=j.length;if(Y)gZ.replace(W,U>2?j[2]:null);else if(U>2&&W!==null)gZ.insertBefore(j[2],W);if(J._childNodes){j[0]=Z===null?J._childNodes.length:Z._index,J._childNodes.splice.apply(J._childNodes,j);for(V=2;V<U;V++)j[V]._index=j[0]+(V-2)}else if(J._firstChild===Z){if(U>2)J._firstChild=j[2];else if(Y)J._firstChild=null}if(K._childNodes)K._childNodes.length=0;else K._firstChild=null;if(J.rooted){J.modify();for(V=2;V<U;V++)J.doc.mutateInsert(j[V])}}else{if(Z===K)return;if(_)K._remove();else if(K.parentNode)K.remove();if(K.parentNode=J,Y){if(gZ.replace(W,K),J._childNodes)K._index=Q,J._childNodes[Q]=K;else if(J._firstChild===Z)J._firstChild=K}else{if(W!==null)gZ.insertBefore(K,W);if(J._childNodes)K._index=Q,J._childNodes.splice(Q,0,K);else if(J._firstChild===Z)J._firstChild=K}if(_)J.modify(),J.doc.mutateMove(K);else if(J.rooted)J.modify(),J.doc.mutateInsert(K)}}},lastModTime:{get:function(){if(!this._lastModTime)this._lastModTime=this.doc.modclock;return this._lastModTime}},modify:{value:function(){if(this.doc.modclock){var $=++this.doc.modclock;for(var J=this;J;J=J.parentElement)if(J._lastModTime)J._lastModTime=$}}},doc:{get:function(){return this.ownerDocument||this}},rooted:{get:function(){return!!this._nid}},normalize:{value:function(){var $;for(var J=this.firstChild;J!==null;J=$){if($=J.nextSibling,J.normalize)J.normalize();if(J.nodeType!==$0.TEXT_NODE)continue;if(J.nodeValue===""){this.removeChild(J);continue}var Z=J.previousSibling;if(Z===null)continue;else if(Z.nodeType===$0.TEXT_NODE)Z.appendData(J.nodeValue),this.removeChild(J)}}},serialize:{value:function(){if(this._innerHTML)return this._innerHTML;var $="";for(var J=this.firstChild;J!==null;J=J.nextSibling)$+=FW.serializeOne(J,this);return $}},outerHTML:{get:function(){return FW.serializeOne(this,{nodeType:0})},set:m$.nyi},ELEMENT_NODE:{value:f0},ATTRIBUTE_NODE:{value:YY},TEXT_NODE:{value:fZ},CDATA_SECTION_NODE:{value:sM},ENTITY_REFERENCE_NODE:{value:nM},ENTITY_NODE:{value:KY},PROCESSING_INSTRUCTION_NODE:{value:zW},COMMENT_NODE:{value:CW},DOCUMENT_NODE:{value:A8},DOCUMENT_TYPE_NODE:{value:G1},DOCUMENT_FRAGMENT_NODE:{value:H2},NOTATION_NODE:{value:QY},DOCUMENT_POSITION_DISCONNECTED:{value:VY},DOCUMENT_POSITION_PRECEDING:{value:GY},DOCUMENT_POSITION_FOLLOWING:{value:XY},DOCUMENT_POSITION_CONTAINS:{value:MW},DOCUMENT_POSITION_CONTAINED_BY:{value:WY},DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:{value:jY}})});var AW=p((Ib,IW)=>{IW.exports=class extends Array{constructor(J){super(J&&J.length||0);if(J)for(var Z in J)this[Z]=J[Z]}item(J){return this[J]||null}}});var wW=p((Ab,SW)=>{function aM($){return this[$]||null}function tM($){if(!$)$=[];return $.item=aM,$}SW.exports=tM});var n2=p((Sb,RW)=>{var UY;try{UY=AW()}catch($){UY=wW()}RW.exports=UY});var mZ=p((wb,yW)=>{yW.exports=NW;var LW=P0(),eM=n2();function NW(){LW.call(this),this._firstChild=this._childNodes=null}NW.prototype=Object.create(LW.prototype,{hasChildNodes:{value:function(){if(this._childNodes)return this._childNodes.length>0;return this._firstChild!==null}},childNodes:{get:function(){return this._ensureChildNodes(),this._childNodes}},firstChild:{get:function(){if(this._childNodes)return this._childNodes.length===0?null:this._childNodes[0];return this._firstChild}},lastChild:{get:function(){var $=this._childNodes,J;if($)return $.length===0?null:$[$.length-1];if(J=this._firstChild,J===null)return null;return J._previousSibling}},_ensureChildNodes:{value:function(){if(this._childNodes)return;var $=this._firstChild,J=$,Z=this._childNodes=new eM;if($)do Z.push(J),J=J._nextSibling;while(J!==$);this._firstChild=null}},removeChildren:{value:function(){var J=this.rooted?this.ownerDocument:null,Z=this.firstChild,Y;while(Z!==null){if(Y=Z,Z=Y.nextSibling,J)J.mutateRemove(Y);Y.parentNode=null}if(this._childNodes)this._childNodes.length=0;else this._firstChild=null;this.modify()}}})});var uZ=p((XD)=>{XD.isValidName=VD;XD.isValidQName=GD;var $D=/^[_:A-Za-z][-.:\w]+$/,JD=/^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/,S8="_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",w8="-._A-Za-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",a2="["+S8+"]["+w8+"]*",BY=S8+":",HY=w8+":",ZD=new RegExp("^["+BY+"]["+HY+"]*$"),YD=new RegExp("^("+a2+"|"+a2+":"+a2+")$"),TW=/[\uD800-\uDB7F\uDC00-\uDFFF]/,kW=/[\uD800-\uDB7F\uDC00-\uDFFF]/g,EW=/[\uD800-\uDB7F][\uDC00-\uDFFF]/g;S8+="\uD800-\uDB7F\uDC00-\uDFFF";w8+="\uD800-\uDB7F\uDC00-\uDFFF";a2="["+S8+"]["+w8+"]*";BY=S8+":";HY=w8+":";var KD=new RegExp("^["+BY+"]["+HY+"]*$"),QD=new RegExp("^("+a2+"|"+a2+":"+a2+")$");function VD($){if($D.test($))return!0;if(ZD.test($))return!0;if(!TW.test($))return!1;if(!KD.test($))return!1;var J=$.match(kW),Z=$.match(EW);return Z!==null&&2*Z.length===J.length}function GD($){if(JD.test($))return!0;if(YD.test($))return!0;if(!TW.test($))return!1;if(!QD.test($))return!1;var J=$.match(kW),Z=$.match(EW);return Z!==null&&2*Z.length===J.length}});var _Y=p((BD)=>{var xW=X0();BD.property=function($){if(Array.isArray($.type)){var J=Object.create(null);$.type.forEach(function(K){J[K.value||K]=K.alias||K});var Z=$.missing;if(Z===void 0)Z=null;var Y=$.invalid;if(Y===void 0)Y=Z;return{get:function(){var K=this._getattr($.name);if(K===null)return Z;if(K=J[K.toLowerCase()],K!==void 0)return K;if(Y!==null)return Y;return K},set:function(K){this._setattr($.name,K)}}}else if($.type===Boolean)return{get:function(){return this.hasAttribute($.name)},set:function(K){if(K)this._setattr($.name,"");else this.removeAttribute($.name)}};else if($.type===Number||$.type==="long"||$.type==="unsigned long"||$.type==="limited unsigned long with fallback")return UD($);else if(!$.type||$.type===String)return{get:function(){return this._getattr($.name)||""},set:function(K){if($.treatNullAsEmptyString&&K===null)K="";this._setattr($.name,K)}};else if(typeof $.type==="function")return $.type($.name,$);throw Error("Invalid attribute definition")};function UD($){var J;if(typeof $.default==="function")J=$.default;else if(typeof $.default==="number")J=function(){return $.default};else J=function(){xW.assert(!1,typeof $.default)};var Z=$.type==="unsigned long",Y=$.type==="long",K=$.type==="limited unsigned long with fallback",Q=$.min,V=$.max,X=$.setmin;if(Q===void 0){if(Z)Q=0;if(Y)Q=-2147483648;if(K)Q=1}if(V===void 0){if(Z||Y||K)V=2147483647}return{get:function(){var W=this._getattr($.name),_=$.float?parseFloat(W):parseInt(W,10);if(W===null||!isFinite(_)||Q!==void 0&&_<Q||V!==void 0&&_>V)return J.call(this);if(Z||Y||K){if(!/^[ \t\n\f\r]*[-+]?[0-9]/.test(W))return J.call(this);_=_|0}return _},set:function(W){if(!$.float)W=Math.floor(W);if(X!==void 0&&W<X)xW.IndexSizeError($.name+" set to "+W);if(Z)W=W<0||W>2147483647?J.call(this):W|0;else if(K)W=W<1||W>2147483647?J.call(this):W|0;else if(Y)W=W<-2147483648||W>2147483647?J.call(this):W|0;this._setattr($.name,String(W))}}}BD.registerChangeHandler=function($,J,Z){var Y=$.prototype;if(!Object.prototype.hasOwnProperty.call(Y,"_attributeChangeHandlers"))Y._attributeChangeHandlers=Object.create(Y._attributeChangeHandlers||null);Y._attributeChangeHandlers[J]=Z}});var hW=p((Nb,vW)=>{vW.exports=bW;var OD=P0();function bW($,J){this.root=$,this.filter=J,this.lastModTime=$.lastModTime,this.done=!1,this.cache=[],this.traverse()}bW.prototype=Object.create(Object.prototype,{length:{get:function(){if(this.checkcache(),!this.done)this.traverse();return this.cache.length}},item:{value:function($){if(this.checkcache(),!this.done&&$>=this.cache.length)this.traverse();return this.cache[$]}},checkcache:{value:function(){if(this.lastModTime!==this.root.lastModTime){for(var $=this.cache.length-1;$>=0;$--)this[$]=void 0;this.cache.length=0,this.done=!1,this.lastModTime=this.root.lastModTime}}},traverse:{value:function($){if($!==void 0)$++;var J;while((J=this.next())!==null)if(this[this.cache.length]=J,this.cache.push(J),$&&this.cache.length===$)return;this.done=!0}},next:{value:function(){var $=this.cache.length===0?this.root:this.cache[this.cache.length-1],J;if($.nodeType===OD.DOCUMENT_NODE)J=$.documentElement;else J=$.nextElement(this.root);while(J){if(this.filter(J))return J;J=J.nextElement(this.root)}return null}}})});var qY=p((yb,mW)=>{var OY=X0();mW.exports=fW;function fW($,J){this._getString=$,this._setString=J,this._length=0,this._lastStringValue="",this._update()}Object.defineProperties(fW.prototype,{length:{get:function(){return this._length}},item:{value:function($){var J=kJ(this);if($<0||$>=J.length)return null;return J[$]}},contains:{value:function($){$=String($);var J=kJ(this);return J.indexOf($)>-1}},add:{value:function(){var $=kJ(this);for(var J=0,Z=arguments.length;J<Z;J++){var Y=R8(arguments[J]);if($.indexOf(Y)<0)$.push(Y)}this._update($)}},remove:{value:function(){var $=kJ(this);for(var J=0,Z=arguments.length;J<Z;J++){var Y=R8(arguments[J]),K=$.indexOf(Y);if(K>-1)$.splice(K,1)}this._update($)}},toggle:{value:function(J,Z){if(J=R8(J),this.contains(J)){if(Z===void 0||Z===!1)return this.remove(J),!1;return!0}else{if(Z===void 0||Z===!0)return this.add(J),!0;return!1}}},replace:{value:function(J,Z){if(String(Z)==="")OY.SyntaxError();J=R8(J),Z=R8(Z);var Y=kJ(this),K=Y.indexOf(J);if(K<0)return!1;var Q=Y.indexOf(Z);if(Q<0)Y[K]=Z;else if(K<Q)Y[K]=Z,Y.splice(Q,1);else Y.splice(K,1);return this._update(Y),!0}},toString:{value:function(){return this._getString()}},value:{get:function(){return this._getString()},set:function($){this._setString($),this._update()}},_update:{value:function($){if($)gW(this,$),this._setString($.join(" ").trim());else gW(this,kJ(this));this._lastStringValue=this._getString()}}});function gW($,J){var Z=$._length,Y;$._length=J.length;for(Y=0;Y<J.length;Y++)$[Y]=J[Y];for(;Y<Z;Y++)$[Y]=void 0}function R8($){if($=String($),$==="")OY.SyntaxError();if(/[ \t\r\n\f]/.test($))OY.InvalidCharacterError();return $}function qD($){var J=$._length,Z=Array(J);for(var Y=0;Y<J;Y++)Z[Y]=$[Y];return Z}function kJ($){var J=$._getString();if(J===$._lastStringValue)return qD($);var Z=J.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g,"");if(Z==="")return[];else{var Y=Object.create(null);return Z.split(/[ \t\r\n\f]+/g).filter(function(K){var Q="$"+K;if(Y[Q])return!1;return Y[Q]=!0,!0})}}});var lZ=p((bJ,oW)=>{var dZ=Object.create(null,{location:{get:function(){throw Error("window.location is not supported.")}}}),FD=function($,J){return $.compareDocumentPosition(J)},zD=function($,J){return FD($,J)&2?1:-1},cZ=function($){while(($=$.nextSibling)&&$.nodeType!==1);return $},xJ=function($){while(($=$.previousSibling)&&$.nodeType!==1);return $},CD=function($){if($=$.firstChild)while($.nodeType!==1&&($=$.nextSibling));return $},MD=function($){if($=$.lastChild)while($.nodeType!==1&&($=$.previousSibling));return $},EJ=function($){if(!$.parentNode)return!1;var J=$.parentNode.nodeType;return J===1||J===9},uW=function($){if(!$)return $;var J=$[0];if(J==='"'||J==="'"){if($[$.length-1]===J)$=$.slice(1,-1);else $=$.slice(1);return $.replace(_$.str_escape,function(Z){var Y=/^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(Z);if(!Y)return Z.slice(1);if(Y[2])return"";var K=parseInt(Y[1],16);return String.fromCodePoint?String.fromCodePoint(K):String.fromCharCode(K)})}else if(_$.ident.test($))return _2($);else return $},_2=function($){return $.replace(_$.escape,function(J){var Z=/^\\([0-9A-Fa-f]+)/.exec(J);if(!Z)return J[1];var Y=parseInt(Z[1],16);return String.fromCodePoint?String.fromCodePoint(Y):String.fromCharCode(Y)})},DD=function(){if(Array.prototype.indexOf)return Array.prototype.indexOf;return function($,J){var Z=this.length;while(Z--)if(this[Z]===J)return Z;return-1}}(),pW=function($,J){var Z=_$.inside.source.replace(/</g,$).replace(/>/g,J);return new RegExp(Z)},m0=function($,J,Z){return $=$.source,$=$.replace(J,Z.source||Z),new RegExp($)},dW=function($,J){return $.replace(/^(?:\w+:\/\/|\/+)/,"").replace(/(?:\/+|\/*#.*?)$/,"").split("/",J).join("/")},PD=function($,J){var Z=$.replace(/\s+/g,""),Y;if(Z==="even")Z="2n+0";else if(Z==="odd")Z="2n+1";else if(Z.indexOf("n")===-1)Z="0n"+Z;return Y=/^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(Z),{group:Y[1]==="-"?-(Y[2]||1):+(Y[2]||1),offset:Y[4]?Y[3]==="-"?-Y[4]:+Y[4]:0}},FY=function($,J,Z){var Y=PD($),K=Y.group,Q=Y.offset,V=!Z?CD:MD,X=!Z?cZ:xJ;return function(W){if(!EJ(W))return;var _=V(W.parentNode),j=0;while(_){if(J(_,W))j++;if(_===W)return j-=Q,K&&j?j%K===0&&j<0===K<0:!j;_=X(_)}}},z0={"*":function(){return function(){return!0}}(),type:function($){return $=$.toLowerCase(),function(J){return J.nodeName.toLowerCase()===$}},attr:function($,J,Z,Y){return J=cW[J],function(K){var Q;switch($){case"for":Q=K.htmlFor;break;case"class":if(Q=K.className,Q===""&&K.getAttribute("class")==null)Q=null;break;case"href":case"src":Q=K.getAttribute($,2);break;case"title":Q=K.getAttribute("title")||null;break;case"id":case"lang":case"dir":case"accessKey":case"hidden":case"tabIndex":case"style":if(K.getAttribute){Q=K.getAttribute($);break}default:if(K.hasAttribute&&!K.hasAttribute($))break;Q=K[$]!=null?K[$]:K.getAttribute&&K.getAttribute($);break}if(Q==null)return;if(Q=Q+"",Y)Q=Q.toLowerCase(),Z=Z.toLowerCase();return J(Q,Z)}},":first-child":function($){return!xJ($)&&EJ($)},":last-child":function($){return!cZ($)&&EJ($)},":only-child":function($){return!xJ($)&&!cZ($)&&EJ($)},":nth-child":function($,J){return FY($,function(){return!0},J)},":nth-last-child":function($){return z0[":nth-child"]($,!0)},":root":function($){return $.ownerDocument.documentElement===$},":empty":function($){return!$.firstChild},":not":function($){var J=CY($);return function(Z){return!J(Z)}},":first-of-type":function($){if(!EJ($))return;var J=$.nodeName;while($=xJ($))if($.nodeName===J)return;return!0},":last-of-type":function($){if(!EJ($))return;var J=$.nodeName;while($=cZ($))if($.nodeName===J)return;return!0},":only-of-type":function($){return z0[":first-of-type"]($)&&z0[":last-of-type"]($)},":nth-of-type":function($,J){return FY($,function(Z,Y){return Z.nodeName===Y.nodeName},J)},":nth-last-of-type":function($){return z0[":nth-of-type"]($,!0)},":checked":function($){return!!($.checked||$.selected)},":indeterminate":function($){return!z0[":checked"]($)},":enabled":function($){return!$.disabled&&$.type!=="hidden"},":disabled":function($){return!!$.disabled},":target":function($){return $.id===dZ.location.hash.substring(1)},":focus":function($){return $===$.ownerDocument.activeElement},":is":function($){return CY($)},":matches":function($){return z0[":is"]($)},":nth-match":function($,J){var Z=$.split(/\s*,\s*/),Y=Z.shift(),K=CY(Z.join(","));return FY(Y,K,J)},":nth-last-match":function($){return z0[":nth-match"]($,!0)},":links-here":function($){return $+""===dZ.location+""},":lang":function($){return function(J){while(J){if(J.lang)return J.lang.indexOf($)===0;J=J.parentNode}}},":dir":function($){return function(J){while(J){if(J.dir)return J.dir===$;J=J.parentNode}}},":scope":function($,J){var Z=J||$.ownerDocument;if(Z.nodeType===9)return $===Z.documentElement;return $===Z},":any-link":function($){return typeof $.href==="string"},":local-link":function($){if($.nodeName)return $.href&&$.host===dZ.location.host;var J=+$+1;return function(Z){if(!Z.href)return;var Y=dZ.location+"",K=Z+"";return dW(Y,J)===dW(K,J)}},":default":function($){return!!$.defaultSelected},":valid":function($){return $.willValidate||$.validity&&$.validity.valid},":invalid":function($){return!z0[":valid"]($)},":in-range":function($){return $.value>$.min&&$.value<=$.max},":out-of-range":function($){return!z0[":in-range"]($)},":required":function($){return!!$.required},":optional":function($){return!$.required},":read-only":function($){if($.readOnly)return!0;var J=$.getAttribute("contenteditable"),Z=$.contentEditable,Y=$.nodeName.toLowerCase();return Y=Y!=="input"&&Y!=="textarea",(Y||$.disabled)&&J==null&&Z!=="true"},":read-write":function($){return!z0[":read-only"]($)},":hover":function(){throw Error(":hover is not supported.")},":active":function(){throw Error(":active is not supported.")},":link":function(){throw Error(":link is not supported.")},":visited":function(){throw Error(":visited is not supported.")},":column":function(){throw Error(":column is not supported.")},":nth-column":function(){throw Error(":nth-column is not supported.")},":nth-last-column":function(){throw Error(":nth-last-column is not supported.")},":current":function(){throw Error(":current is not supported.")},":past":function(){throw Error(":past is not supported.")},":future":function(){throw Error(":future is not supported.")},":contains":function($){return function(J){var Z=J.innerText||J.textContent||J.value||"";return Z.indexOf($)!==-1}},":has":function($){return function(J){return lW($,J).length>0}}},cW={"-":function(){return!0},"=":function($,J){return $===J},"*=":function($,J){return $.indexOf(J)!==-1},"~=":function($,J){var Z,Y,K,Q;for(Y=0;;Y=Z+1){if(Z=$.indexOf(J,Y),Z===-1)return!1;if(K=$[Z-1],Q=$[Z+J.length],(!K||K===" ")&&(!Q||Q===" "))return!0}},"|=":function($,J){var Z=$.indexOf(J),Y;if(Z!==0)return;return Y=$[Z+J.length],Y==="-"||!Y},"^=":function($,J){return $.indexOf(J)===0},"$=":function($,J){var Z=$.lastIndexOf(J);return Z!==-1&&Z+J.length===$.length},"!=":function($,J){return $!==J}},L8={" ":function($){return function(J){while(J=J.parentNode)if($(J))return J}},">":function($){return function(J){if(J=J.parentNode)return $(J)&&J}},"+":function($){return function(J){if(J=xJ(J))return $(J)&&J}},"~":function($){return function(J){while(J=xJ(J))if($(J))return J}},noop:function($){return function(J){return $(J)&&J}},ref:function($,J){var Z;function Y(K){var Q=K.ownerDocument,V=Q.getElementsByTagName("*"),X=V.length;while(X--)if(Z=V[X],Y.test(K))return Z=null,!0;Z=null}return Y.combinator=function(K){if(!Z||!Z.getAttribute)return;var Q=Z.getAttribute(J)||"";if(Q[0]==="#")Q=Q.substring(1);if(Q===K.id&&$(Z))return Z},Y}},_$={escape:/\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g,str_escape:/(escape)|\\(\n|\r\n?|\f)/g,nonascii:/[\u00A0-\uFFFF]/,cssid:/(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/,qname:/^ *(cssid|\*)/,simple:/^(?:([.#]cssid)|pseudo|attr)/,ref:/^ *\/(cssid)\/ */,combinator:/^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/,attr:/^\[(cssid)(?:([^\w]?=)(inside))?\]/,pseudo:/^(:cssid)(?:\((inside)\))?/,inside:/(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/,ident:/^(cssid)$/};_$.cssid=m0(_$.cssid,"nonascii",_$.nonascii);_$.cssid=m0(_$.cssid,"escape",_$.escape);_$.qname=m0(_$.qname,"cssid",_$.cssid);_$.simple=m0(_$.simple,"cssid",_$.cssid);_$.ref=m0(_$.ref,"cssid",_$.cssid);_$.attr=m0(_$.attr,"cssid",_$.cssid);_$.pseudo=m0(_$.pseudo,"cssid",_$.cssid);_$.inside=m0(_$.inside,`[^"'>]*`,_$.inside);_$.attr=m0(_$.attr,"inside",pW("\\[","\\]"));_$.pseudo=m0(_$.pseudo,"inside",pW("\\(","\\)"));_$.simple=m0(_$.simple,"pseudo",_$.pseudo);_$.simple=m0(_$.simple,"attr",_$.attr);_$.ident=m0(_$.ident,"cssid",_$.cssid);_$.str_escape=m0(_$.str_escape,"escape",_$.escape);var N8=function($){var J=$.replace(/^\s+|\s+$/g,""),Z,Y=[],K=[],Q,V,X,W,_;while(J){if(X=_$.qname.exec(J))J=J.substring(X[0].length),V=_2(X[1]),K.push(pZ(V,!0));else if(X=_$.simple.exec(J))J=J.substring(X[0].length),V="*",K.push(pZ(V,!0)),K.push(pZ(X));else throw SyntaxError("Invalid selector.");while(X=_$.simple.exec(J))J=J.substring(X[0].length),K.push(pZ(X));if(J[0]==="!")J=J.substring(1),Q=AD(),Q.qname=V,K.push(Q.simple);if(X=_$.ref.exec(J)){J=J.substring(X[0].length),_=L8.ref(zY(K),_2(X[1])),Y.push(_.combinator),K=[];continue}if(X=_$.combinator.exec(J)){if(J=J.substring(X[0].length),W=X[1]||X[2]||X[3],W===","){Y.push(L8.noop(zY(K)));break}}else W="noop";if(!L8[W])throw SyntaxError("Bad combinator.");Y.push(L8[W](zY(K))),K=[]}if(Z=ID(Y),Z.qname=V,Z.sel=J,Q)Q.lname=Z.qname,Q.test=Z,Q.qname=Q.qname,Q.sel=Z.sel,Z=Q;if(_)_.test=Z,_.qname=Z.qname,_.sel=Z.sel,Z=_;return Z},pZ=function($,J){if(J)return $==="*"?z0["*"]:z0.type($);if($[1])return $[1][0]==="."?z0.attr("class","~=",_2($[1].substring(1)),!1):z0.attr("id","=",_2($[1].substring(1)),!1);if($[2])return $[3]?z0[_2($[2])](uW($[3])):z0[_2($[2])];if($[4]){var Z=$[6],Y=/["'\s]\s*I$/i.test(Z);if(Y)Z=Z.replace(/\s*I$/i,"");return z0.attr(_2($[4]),$[5]||"-",uW(Z),Y)}throw SyntaxError("Unknown Selector.")},zY=function($){var J=$.length,Z;if(J<2)return $[0];return function(Y){if(!Y)return;for(Z=0;Z<J;Z++)if(!$[Z](Y))return;return!0}},ID=function($){if($.length<2)return function(J){return!!$[0](J)};return function(J){var Z=$.length;while(Z--)if(!(J=$[Z](J)))return;return!0}},AD=function(){var $;function J(Z){var Y=Z.ownerDocument,K=Y.getElementsByTagName(J.lname),Q=K.length;while(Q--)if(J.test(K[Q])&&$===Z)return $=null,!0;$=null}return J.simple=function(Z){return $=Z,!0},J},CY=function($){var J=N8($),Z=[J];while(J.sel)J=N8(J.sel),Z.push(J);if(Z.length<2)return J;return function(Y){var K=Z.length,Q=0;for(;Q<K;Q++)if(Z[Q](Y))return!0}},lW=function($,J){var Z=[],Y=N8($),K=J.getElementsByTagName(Y.qname),Q=0,V;while(V=K[Q++])if(Y(V))Z.push(V);if(Y.sel){while(Y.sel){Y=N8(Y.sel),K=J.getElementsByTagName(Y.qname),Q=0;while(V=K[Q++])if(Y(V)&&DD.call(Z,V)===-1)Z.push(V)}Z.sort(zD)}return Z};oW.exports=bJ=function($,J){var Z,Y;if(J.nodeType!==11&&$.indexOf(" ")===-1){if($[0]==="#"&&J.rooted&&/^#[A-Z_][-A-Z0-9_]*$/i.test($)){if(J.doc._hasMultipleElementsWithId){if(Z=$.substring(1),!J.doc._hasMultipleElementsWithId(Z))return Y=J.doc.getElementById(Z),Y?[Y]:[]}}if($[0]==="."&&/^\.\w+$/.test($))return J.getElementsByClassName($.substring(1));if(/^\w+$/.test($))return J.getElementsByTagName($)}return lW($,J)};bJ.selectors=z0;bJ.operators=cW;bJ.combinators=L8;bJ.matches=function($,J){var Z={sel:J};do if(Z=N8(Z.sel),Z($))return!0;while(Z.sel);return!1}});var oZ=p((Tb,rW)=>{var SD=P0(),wD=JY(),MY=function($,J){var Z=$.createDocumentFragment();for(var Y=0;Y<J.length;Y++){var K=J[Y],Q=K instanceof SD;Z.appendChild(Q?K:$.createTextNode(String(K)))}return Z},RD={after:{value:function(){var J=Array.prototype.slice.call(arguments),Z=this.parentNode,Y=this.nextSibling;if(Z===null)return;while(Y&&J.some(function(Q){return Q===Y}))Y=Y.nextSibling;var K=MY(this.doc,J);Z.insertBefore(K,Y)}},before:{value:function(){var J=Array.prototype.slice.call(arguments),Z=this.parentNode,Y=this.previousSibling;if(Z===null)return;while(Y&&J.some(function(V){return V===Y}))Y=Y.previousSibling;var K=MY(this.doc,J),Q=Y?Y.nextSibling:Z.firstChild;Z.insertBefore(K,Q)}},remove:{value:function(){if(this.parentNode===null)return;if(this.doc){if(this.doc._preremoveNodeIterators(this),this.rooted)this.doc.mutateRemove(this)}this._remove(),this.parentNode=null}},_remove:{value:function(){var J=this.parentNode;if(J===null)return;if(J._childNodes)J._childNodes.splice(this.index,1);else if(J._firstChild===this)if(this._nextSibling===this)J._firstChild=null;else J._firstChild=this._nextSibling;wD.remove(this),J.modify()}},replaceWith:{value:function(){var J=Array.prototype.slice.call(arguments),Z=this.parentNode,Y=this.nextSibling;if(Z===null)return;while(Y&&J.some(function(Q){return Q===Y}))Y=Y.nextSibling;var K=MY(this.doc,J);if(this.parentNode===Z)Z.replaceChild(K,this);else Z.insertBefore(K,Y)}}};rW.exports=RD});var DY=p((kb,sW)=>{var iW=P0(),LD={nextElementSibling:{get:function(){if(this.parentNode){for(var $=this.nextSibling;$!==null;$=$.nextSibling)if($.nodeType===iW.ELEMENT_NODE)return $}return null}},previousElementSibling:{get:function(){if(this.parentNode){for(var $=this.previousSibling;$!==null;$=$.previousSibling)if($.nodeType===iW.ELEMENT_NODE)return $}return null}}};sW.exports=LD});var PY=p((Eb,aW)=>{aW.exports=nW;var vJ=X0();function nW($){this.element=$}Object.defineProperties(nW.prototype,{length:{get:vJ.shouldOverride},item:{value:vJ.shouldOverride},getNamedItem:{value:function(J){return this.element.getAttributeNode(J)}},getNamedItemNS:{value:function(J,Z){return this.element.getAttributeNodeNS(J,Z)}},setNamedItem:{value:vJ.nyi},setNamedItemNS:{value:vJ.nyi},removeNamedItem:{value:function(J){var Z=this.element.getAttributeNode(J);if(Z)return this.element.removeAttribute(J),Z;vJ.NotFoundError()}},removeNamedItemNS:{value:function(J,Z){var Y=this.element.getAttributeNodeNS(J,Z);if(Y)return this.element.removeAttributeNS(J,Z),Y;vJ.NotFoundError()}}})});var gJ=p((xb,Z5)=>{Z5.exports=O2;var IY=uZ(),Y0=X0(),N1=Y0.NAMESPACE,iZ=_Y(),q1=P0(),AY=n2(),ND=ZY(),rZ=hW(),hJ=vZ(),yD=qY(),SY=lZ(),eW=mZ(),TD=oZ(),kD=DY(),$5=PY(),tW=Object.create(null);function O2($,J,Z,Y){eW.call(this),this.nodeType=q1.ELEMENT_NODE,this.ownerDocument=$,this.localName=J,this.namespaceURI=Z,this.prefix=Y,this._tagName=void 0,this._attrsByQName=Object.create(null),this._attrsByLName=Object.create(null),this._attrKeys=[]}function wY($,J){if($.nodeType===q1.TEXT_NODE)J.push($._data);else for(var Z=0,Y=$.childNodes.length;Z<Y;Z++)wY($.childNodes[Z],J)}O2.prototype=Object.create(eW.prototype,{isHTML:{get:function(){return this.namespaceURI===N1.HTML&&this.ownerDocument.isHTML}},tagName:{get:function(){if(this._tagName===void 0){var J;if(this.prefix===null)J=this.localName;else J=this.prefix+":"+this.localName;if(this.isHTML){var Z=tW[J];if(!Z)tW[J]=Z=Y0.toASCIIUpperCase(J);J=Z}this._tagName=J}return this._tagName}},nodeName:{get:function(){return this.tagName}},nodeValue:{get:function(){return null},set:function(){}},textContent:{get:function(){var $=[];return wY(this,$),$.join("")},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerText:{get:function(){var $=[];return wY(this,$),$.join("").replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerHTML:{get:function(){return this.serialize()},set:Y0.nyi},outerHTML:{get:function(){return ND.serializeOne(this,{nodeType:0})},set:function($){var J=this.ownerDocument,Z=this.parentNode;if(Z===null)return;if(Z.nodeType===q1.DOCUMENT_NODE)Y0.NoModificationAllowedError();if(Z.nodeType===q1.DOCUMENT_FRAGMENT_NODE)Z=Z.ownerDocument.createElement("body");var Y=J.implementation.mozHTMLParser(J._address,Z);Y.parse($===null?"":String($),!0),this.replaceWith(Y._asDocumentFragment())}},_insertAdjacent:{value:function(J,Z){var Y=!1;switch(J){case"beforebegin":Y=!0;case"afterend":var K=this.parentNode;if(K===null)return null;return K.insertBefore(Z,Y?this:this.nextSibling);case"afterbegin":Y=!0;case"beforeend":return this.insertBefore(Z,Y?this.firstChild:null);default:return Y0.SyntaxError()}}},insertAdjacentElement:{value:function(J,Z){if(Z.nodeType!==q1.ELEMENT_NODE)throw TypeError("not an element");return J=Y0.toASCIILowerCase(String(J)),this._insertAdjacent(J,Z)}},insertAdjacentText:{value:function(J,Z){var Y=this.ownerDocument.createTextNode(Z);J=Y0.toASCIILowerCase(String(J)),this._insertAdjacent(J,Y)}},insertAdjacentHTML:{value:function(J,Z){J=Y0.toASCIILowerCase(String(J)),Z=String(Z);var Y;switch(J){case"beforebegin":case"afterend":if(Y=this.parentNode,Y===null||Y.nodeType===q1.DOCUMENT_NODE)Y0.NoModificationAllowedError();break;case"afterbegin":case"beforeend":Y=this;break;default:Y0.SyntaxError()}if(!(Y instanceof O2)||Y.ownerDocument.isHTML&&Y.localName==="html"&&Y.namespaceURI===N1.HTML)Y=Y.ownerDocument.createElementNS(N1.HTML,"body");var K=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,Y);K.parse(Z,!0),this._insertAdjacent(J,K._asDocumentFragment())}},children:{get:function(){if(!this._children)this._children=new J5(this);return this._children}},attributes:{get:function(){if(!this._attributes)this._attributes=new LY(this);return this._attributes}},firstElementChild:{get:function(){for(var $=this.firstChild;$!==null;$=$.nextSibling)if($.nodeType===q1.ELEMENT_NODE)return $;return null}},lastElementChild:{get:function(){for(var $=this.lastChild;$!==null;$=$.previousSibling)if($.nodeType===q1.ELEMENT_NODE)return $;return null}},childElementCount:{get:function(){return this.children.length}},nextElement:{value:function($){if(!$)$=this.ownerDocument.documentElement;var J=this.firstElementChild;if(!J){if(this===$)return null;J=this.nextElementSibling}if(J)return J;for(var Z=this.parentElement;Z&&Z!==$;Z=Z.parentElement)if(J=Z.nextElementSibling,J)return J;return null}},getElementsByTagName:{value:function(J){var Z;if(!J)return new AY;if(J==="*")Z=function(){return!0};else if(this.isHTML)Z=ED(J);else Z=RY(J);return new rZ(this,Z)}},getElementsByTagNameNS:{value:function(J,Z){var Y;if(J==="*"&&Z==="*")Y=function(){return!0};else if(J==="*")Y=RY(Z);else if(Z==="*")Y=xD(J);else Y=bD(J,Z);return new rZ(this,Y)}},getElementsByClassName:{value:function(J){if(J=String(J).trim(),J===""){var Z=new AY;return Z}return J=J.split(/[ \t\r\n\f]+/),new rZ(this,vD(J))}},getElementsByName:{value:function(J){return new rZ(this,hD(String(J)))}},clone:{value:function(){var J;if(this.namespaceURI!==N1.HTML||this.prefix||!this.ownerDocument.isHTML)J=this.ownerDocument.createElementNS(this.namespaceURI,this.prefix!==null?this.prefix+":"+this.localName:this.localName);else J=this.ownerDocument.createElement(this.localName);for(var Z=0,Y=this._attrKeys.length;Z<Y;Z++){var K=this._attrKeys[Z],Q=this._attrsByLName[K],V=Q.cloneNode();V._setOwnerElement(J),J._attrsByLName[K]=V,J._addQName(V)}return J._attrKeys=this._attrKeys.concat(),J}},isEqual:{value:function(J){if(this.localName!==J.localName||this.namespaceURI!==J.namespaceURI||this.prefix!==J.prefix||this._numattrs!==J._numattrs)return!1;for(var Z=0,Y=this._numattrs;Z<Y;Z++){var K=this._attr(Z);if(!J.hasAttributeNS(K.namespaceURI,K.localName))return!1;if(J.getAttributeNS(K.namespaceURI,K.localName)!==K.value)return!1}return!0}},_lookupNamespacePrefix:{value:function(J,Z){if(this.namespaceURI&&this.namespaceURI===J&&this.prefix!==null&&Z.lookupNamespaceURI(this.prefix)===J)return this.prefix;for(var Y=0,K=this._numattrs;Y<K;Y++){var Q=this._attr(Y);if(Q.prefix==="xmlns"&&Q.value===J&&Z.lookupNamespaceURI(Q.localName)===J)return Q.localName}var V=this.parentElement;return V?V._lookupNamespacePrefix(J,Z):null}},lookupNamespaceURI:{value:function(J){if(J===""||J===void 0)J=null;if(this.namespaceURI!==null&&this.prefix===J)return this.namespaceURI;for(var Z=0,Y=this._numattrs;Z<Y;Z++){var K=this._attr(Z);if(K.namespaceURI===N1.XMLNS){if(K.prefix==="xmlns"&&K.localName===J||J===null&&K.prefix===null&&K.localName==="xmlns")return K.value||null}}var Q=this.parentElement;return Q?Q.lookupNamespaceURI(J):null}},getAttribute:{value:function(J){var Z=this.getAttributeNode(J);return Z?Z.value:null}},getAttributeNS:{value:function(J,Z){var Y=this.getAttributeNodeNS(J,Z);return Y?Y.value:null}},getAttributeNode:{value:function(J){if(J=String(J),/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);var Z=this._attrsByQName[J];if(!Z)return null;if(Array.isArray(Z))Z=Z[0];return Z}},getAttributeNodeNS:{value:function(J,Z){J=J===void 0||J===null?"":String(J),Z=String(Z);var Y=this._attrsByLName[J+"|"+Z];return Y?Y:null}},hasAttribute:{value:function(J){if(J=String(J),/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);return this._attrsByQName[J]!==void 0}},hasAttributeNS:{value:function(J,Z){J=J===void 0||J===null?"":String(J),Z=String(Z);var Y=J+"|"+Z;return this._attrsByLName[Y]!==void 0}},hasAttributes:{value:function(){return this._numattrs>0}},toggleAttribute:{value:function(J,Z){if(J=String(J),!IY.isValidName(J))Y0.InvalidCharacterError();if(/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);var Y=this._attrsByQName[J];if(Y===void 0){if(Z===void 0||Z===!0)return this._setAttribute(J,""),!0;return!1}else{if(Z===void 0||Z===!1)return this.removeAttribute(J),!1;return!0}}},_setAttribute:{value:function(J,Z){var Y=this._attrsByQName[J],K;if(!Y)Y=this._newattr(J),K=!0;else if(Array.isArray(Y))Y=Y[0];if(Y.value=Z,this._attributes)this._attributes[J]=Y;if(K&&this._newattrhook)this._newattrhook(J,Z)}},setAttribute:{value:function(J,Z){if(J=String(J),!IY.isValidName(J))Y0.InvalidCharacterError();if(/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);this._setAttribute(J,String(Z))}},_setAttributeNS:{value:function(J,Z,Y){var K=Z.indexOf(":"),Q,V;if(K<0)Q=null,V=Z;else Q=Z.substring(0,K),V=Z.substring(K+1);if(J===""||J===void 0)J=null;var X=(J===null?"":J)+"|"+V,W=this._attrsByLName[X],_;if(!W){if(W=new y8(this,V,Q,J),_=!0,this._attrsByLName[X]=W,this._attributes)this._attributes[this._attrKeys.length]=W;this._attrKeys.push(X),this._addQName(W)}if(W.value=Y,_&&this._newattrhook)this._newattrhook(Z,Y)}},setAttributeNS:{value:function(J,Z,Y){if(J=J===null||J===void 0||J===""?null:String(J),Z=String(Z),!IY.isValidQName(Z))Y0.InvalidCharacterError();var K=Z.indexOf(":"),Q=K<0?null:Z.substring(0,K);if(Q!==null&&J===null||Q==="xml"&&J!==N1.XML||(Z==="xmlns"||Q==="xmlns")&&J!==N1.XMLNS||J===N1.XMLNS&&!(Z==="xmlns"||Q==="xmlns"))Y0.NamespaceError();this._setAttributeNS(J,Z,String(Y))}},setAttributeNode:{value:function(J){if(J.ownerElement!==null&&J.ownerElement!==this)throw new hJ(hJ.INUSE_ATTRIBUTE_ERR);var Z=null,Y=this._attrsByQName[J.name];if(Y){if(!Array.isArray(Y))Y=[Y];if(Y.some(function(K){return K===J}))return J;else if(J.ownerElement!==null)throw new hJ(hJ.INUSE_ATTRIBUTE_ERR);Y.forEach(function(K){this.removeAttributeNode(K)},this),Z=Y[0]}return this.setAttributeNodeNS(J),Z}},setAttributeNodeNS:{value:function(J){if(J.ownerElement!==null)throw new hJ(hJ.INUSE_ATTRIBUTE_ERR);var Z=J.namespaceURI,Y=(Z===null?"":Z)+"|"+J.localName,K=this._attrsByLName[Y];if(K)this.removeAttributeNode(K);if(J._setOwnerElement(this),this._attrsByLName[Y]=J,this._attributes)this._attributes[this._attrKeys.length]=J;if(this._attrKeys.push(Y),this._addQName(J),this._newattrhook)this._newattrhook(J.name,J.value);return K||null}},removeAttribute:{value:function(J){if(J=String(J),/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);var Z=this._attrsByQName[J];if(!Z)return;if(Array.isArray(Z))if(Z.length>2)Z=Z.shift();else this._attrsByQName[J]=Z[1],Z=Z[0];else this._attrsByQName[J]=void 0;var Y=Z.namespaceURI,K=(Y===null?"":Y)+"|"+Z.localName;this._attrsByLName[K]=void 0;var Q=this._attrKeys.indexOf(K);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1),this._attributes[J]=void 0;this._attrKeys.splice(Q,1);var V=Z.onchange;if(Z._setOwnerElement(null),V)V.call(Z,this,Z.localName,Z.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(Z)}},removeAttributeNS:{value:function(J,Z){J=J===void 0||J===null?"":String(J),Z=String(Z);var Y=J+"|"+Z,K=this._attrsByLName[Y];if(!K)return;this._attrsByLName[Y]=void 0;var Q=this._attrKeys.indexOf(Y);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1);this._attrKeys.splice(Q,1),this._removeQName(K);var V=K.onchange;if(K._setOwnerElement(null),V)V.call(K,this,K.localName,K.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(K)}},removeAttributeNode:{value:function(J){var Z=J.namespaceURI,Y=(Z===null?"":Z)+"|"+J.localName;if(this._attrsByLName[Y]!==J)Y0.NotFoundError();return this.removeAttributeNS(Z,J.localName),J}},getAttributeNames:{value:function(){var J=this;return this._attrKeys.map(function(Z){return J._attrsByLName[Z].name})}},_getattr:{value:function(J){var Z=this._attrsByQName[J];return Z?Z.value:null}},_setattr:{value:function(J,Z){var Y=this._attrsByQName[J],K;if(!Y)Y=this._newattr(J),K=!0;if(Y.value=String(Z),this._attributes)this._attributes[J]=Y;if(K&&this._newattrhook)this._newattrhook(J,Z)}},_newattr:{value:function(J){var Z=new y8(this,J,null,null),Y="|"+J;if(this._attrsByQName[J]=Z,this._attrsByLName[Y]=Z,this._attributes)this._attributes[this._attrKeys.length]=Z;return this._attrKeys.push(Y),Z}},_addQName:{value:function($){var J=$.name,Z=this._attrsByQName[J];if(!Z)this._attrsByQName[J]=$;else if(Array.isArray(Z))Z.push($);else this._attrsByQName[J]=[Z,$];if(this._attributes)this._attributes[J]=$}},_removeQName:{value:function($){var J=$.name,Z=this._attrsByQName[J];if(Array.isArray(Z)){var Y=Z.indexOf($);if(Y0.assert(Y!==-1),Z.length===2){if(this._attrsByQName[J]=Z[1-Y],this._attributes)this._attributes[J]=this._attrsByQName[J]}else if(Z.splice(Y,1),this._attributes&&this._attributes[J]===$)this._attributes[J]=Z[0]}else if(Y0.assert(Z===$),this._attrsByQName[J]=void 0,this._attributes)this._attributes[J]=void 0}},_numattrs:{get:function(){return this._attrKeys.length}},_attr:{value:function($){return this._attrsByLName[this._attrKeys[$]]}},id:iZ.property({name:"id"}),className:iZ.property({name:"class"}),classList:{get:function(){var $=this;if(this._classList)return this._classList;var J=new yD(function(){return $.className||""},function(Z){$.className=Z});return this._classList=J,J},set:function($){this.className=$}},matches:{value:function($){return SY.matches(this,$)}},closest:{value:function($){var J=this;do{if(J.matches&&J.matches($))return J;J=J.parentElement||J.parentNode}while(J!==null&&J.nodeType===q1.ELEMENT_NODE);return null}},querySelector:{value:function($){return SY($,this)[0]}},querySelectorAll:{value:function($){var J=SY($,this);return J.item?J:new AY(J)}}});Object.defineProperties(O2.prototype,TD);Object.defineProperties(O2.prototype,kD);iZ.registerChangeHandler(O2,"id",function($,J,Z,Y){if($.rooted){if(Z)$.ownerDocument.delId(Z,$);if(Y)$.ownerDocument.addId(Y,$)}});iZ.registerChangeHandler(O2,"class",function($,J,Z,Y){if($._classList)$._classList._update()});function y8($,J,Z,Y,K){this.localName=J,this.prefix=Z===null||Z===""?null:""+Z,this.namespaceURI=Y===null||Y===""?null:""+Y,this.data=K,this._setOwnerElement($)}y8.prototype=Object.create(Object.prototype,{ownerElement:{get:function(){return this._ownerElement}},_setOwnerElement:{value:function(J){if(this._ownerElement=J,this.prefix===null&&this.namespaceURI===null&&J)this.onchange=J._attributeChangeHandlers[this.localName];else this.onchange=null}},name:{get:function(){return this.prefix?this.prefix+":"+this.localName:this.localName}},specified:{get:function(){return!0}},value:{get:function(){return this.data},set:function($){var J=this.data;if($=$===void 0?"":$+"",$===J)return;if(this.data=$,this.ownerElement){if(this.onchange)this.onchange(this.ownerElement,this.localName,J,$);if(this.ownerElement.rooted)this.ownerElement.ownerDocument.mutateAttr(this,J)}}},cloneNode:{value:function(J){return new y8(null,this.localName,this.prefix,this.namespaceURI,this.data)}},nodeType:{get:function(){return q1.ATTRIBUTE_NODE}},nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return this.value},set:function($){this.value=$}},textContent:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}},innerText:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}}});O2._Attr=y8;function LY($){$5.call(this,$);for(var J in $._attrsByQName)this[J]=$._attrsByQName[J];for(var Z=0;Z<$._attrKeys.length;Z++)this[Z]=$._attrsByLName[$._attrKeys[Z]]}LY.prototype=Object.create($5.prototype,{length:{get:function(){return this.element._attrKeys.length},set:function(){}},item:{value:function($){if($=$>>>0,$>=this.length)return null;return this.element._attrsByLName[this.element._attrKeys[$]]}}});if(globalThis.Symbol?.iterator)LY.prototype[globalThis.Symbol.iterator]=function(){var $=0,J=this.length,Z=this;return{next:function(){if($<J)return{value:Z.item($++)};return{done:!0}}}};function J5($){this.element=$,this.updateCache()}J5.prototype=Object.create(Object.prototype,{length:{get:function(){return this.updateCache(),this.childrenByNumber.length}},item:{value:function(J){return this.updateCache(),this.childrenByNumber[J]||null}},namedItem:{value:function(J){return this.updateCache(),this.childrenByName[J]||null}},namedItems:{get:function(){return this.updateCache(),this.childrenByName}},updateCache:{value:function(){var J=/^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/;if(this.lastModTime!==this.element.lastModTime){this.lastModTime=this.element.lastModTime;var Z=this.childrenByNumber&&this.childrenByNumber.length||0;for(var Y=0;Y<Z;Y++)this[Y]=void 0;this.childrenByNumber=[],this.childrenByName=Object.create(null);for(var K=this.element.firstChild;K!==null;K=K.nextSibling)if(K.nodeType===q1.ELEMENT_NODE){this[this.childrenByNumber.length]=K,this.childrenByNumber.push(K);var Q=K.getAttribute("id");if(Q&&!this.childrenByName[Q])this.childrenByName[Q]=K;var V=K.getAttribute("name");if(V&&this.element.namespaceURI===N1.HTML&&J.test(this.element.localName)&&!this.childrenByName[V])this.childrenByName[Q]=K}}}}});function RY($){return function(J){return J.localName===$}}function ED($){var J=Y0.toASCIILowerCase($);if(J===$)return RY($);return function(Z){return Z.isHTML?Z.localName===J:Z.localName===$}}function xD($){return function(J){return J.namespaceURI===$}}function bD($,J){return function(Z){return Z.namespaceURI===$&&Z.localName===J}}function vD($){return function(J){return $.every(function(Z){return J.classList.contains(Z)})}}function hD($){return function(J){if(J.namespaceURI!==N1.HTML)return!1;return J.getAttribute("name")===$}}});var NY=p((bb,G5)=>{G5.exports=V5;var K5=P0(),gD=n2(),Q5=X0(),Y5=Q5.HierarchyRequestError,fD=Q5.NotFoundError;function V5(){K5.call(this)}V5.prototype=Object.create(K5.prototype,{hasChildNodes:{value:function(){return!1}},firstChild:{value:null},lastChild:{value:null},insertBefore:{value:function($,J){if(!$.nodeType)throw TypeError("not a node");Y5()}},replaceChild:{value:function($,J){if(!$.nodeType)throw TypeError("not a node");Y5()}},removeChild:{value:function($){if(!$.nodeType)throw TypeError("not a node");fD()}},removeChildren:{value:function(){}},childNodes:{get:function(){if(!this._childNodes)this._childNodes=new gD;return this._childNodes}}})});var T8=p((vb,j5)=>{j5.exports=sZ;var W5=NY(),X5=X0(),mD=oZ(),uD=DY();function sZ(){W5.call(this)}sZ.prototype=Object.create(W5.prototype,{substringData:{value:function(J,Z){if(arguments.length<2)throw TypeError("Not enough arguments");if(J=J>>>0,Z=Z>>>0,J>this.data.length||J<0||Z<0)X5.IndexSizeError();return this.data.substring(J,J+Z)}},appendData:{value:function(J){if(arguments.length<1)throw TypeError("Not enough arguments");this.data+=String(J)}},insertData:{value:function(J,Z){return this.replaceData(J,0,Z)}},deleteData:{value:function(J,Z){return this.replaceData(J,Z,"")}},replaceData:{value:function(J,Z,Y){var K=this.data,Q=K.length;if(J=J>>>0,Z=Z>>>0,Y=String(Y),J>Q||J<0)X5.IndexSizeError();if(J+Z>Q)Z=Q-J;var V=K.substring(0,J),X=K.substring(J+Z);this.data=V+Y+X}},isEqual:{value:function(J){return this._data===J._data}},length:{get:function(){return this.data.length}}});Object.defineProperties(sZ.prototype,mD);Object.defineProperties(sZ.prototype,uD)});var TY=p((hb,_5)=>{_5.exports=yY;var U5=X0(),B5=P0(),H5=T8();function yY($,J){H5.call(this),this.nodeType=B5.TEXT_NODE,this.ownerDocument=$,this._data=J,this._index=void 0}var k8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if($===this._data)return;if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this);if(this.parentNode&&this.parentNode._textchangehook)this.parentNode._textchangehook(this)}};yY.prototype=Object.create(H5.prototype,{nodeName:{value:"#text"},nodeValue:k8,textContent:k8,innerText:k8,data:{get:k8.get,set:function($){k8.set.call(this,$===null?"":String($))}},splitText:{value:function(J){if(J>this._data.length||J<0)U5.IndexSizeError();var Z=this._data.substring(J),Y=this.ownerDocument.createTextNode(Z);this.data=this.data.substring(0,J);var K=this.parentNode;if(K!==null)K.insertBefore(Y,this.nextSibling);return Y}},wholeText:{get:function(){var J=this.textContent;for(var Z=this.nextSibling;Z;Z=Z.nextSibling){if(Z.nodeType!==B5.TEXT_NODE)break;J+=Z.textContent}return J}},replaceWholeText:{value:U5.nyi},clone:{value:function(){return new yY(this.ownerDocument,this._data)}}})});var EY=p((gb,q5)=>{q5.exports=kY;var dD=P0(),O5=T8();function kY($,J){O5.call(this),this.nodeType=dD.COMMENT_NODE,this.ownerDocument=$,this._data=J}var E8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};kY.prototype=Object.create(O5.prototype,{nodeName:{value:"#comment"},nodeValue:E8,textContent:E8,innerText:E8,data:{get:E8.get,set:function($){E8.set.call(this,$===null?"":String($))}},clone:{value:function(){return new kY(this.ownerDocument,this._data)}}})});var bY=p((fb,C5)=>{C5.exports=xY;var pD=P0(),cD=n2(),z5=mZ(),nZ=gJ(),lD=lZ(),F5=X0();function xY($){z5.call(this),this.nodeType=pD.DOCUMENT_FRAGMENT_NODE,this.ownerDocument=$}xY.prototype=Object.create(z5.prototype,{nodeName:{value:"#document-fragment"},nodeValue:{get:function(){return null},set:function(){}},textContent:Object.getOwnPropertyDescriptor(nZ.prototype,"textContent"),innerText:Object.getOwnPropertyDescriptor(nZ.prototype,"innerText"),querySelector:{value:function($){var J=this.querySelectorAll($);return J.length?J[0]:null}},querySelectorAll:{value:function($){var J=Object.create(this);J.isHTML=!0,J.getElementsByTagName=nZ.prototype.getElementsByTagName,J.nextElement=Object.getOwnPropertyDescriptor(nZ.prototype,"firstElementChild").get;var Z=lD($,J);return Z.item?Z:new cD(Z)}},clone:{value:function(){return new xY(this.ownerDocument)}},isEqual:{value:function(J){return!0}},innerHTML:{get:function(){return this.serialize()},set:F5.nyi},outerHTML:{get:function(){return this.serialize()},set:F5.nyi}})});var hY=p((mb,D5)=>{D5.exports=vY;var oD=P0(),M5=T8();function vY($,J,Z){M5.call(this),this.nodeType=oD.PROCESSING_INSTRUCTION_NODE,this.ownerDocument=$,this.target=J,this._data=Z}var x8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};vY.prototype=Object.create(M5.prototype,{nodeName:{get:function(){return this.target}},nodeValue:x8,textContent:x8,innerText:x8,data:{get:x8.get,set:function($){x8.set.call(this,$===null?"":String($))}},clone:{value:function(){return new vY(this.ownerDocument,this.target,this._data)}},isEqual:{value:function(J){return this.target===J.target&&this._data===J._data}}})});var b8=p((ub,P5)=>{var gY={FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048};P5.exports=gY.constructor=gY.prototype=gY});var mY=p((pb,A5)=>{var db=A5.exports={nextSkippingChildren:rD,nextAncestorSibling:fY,next:iD,previous:sD,deepLastChild:I5};function rD($,J){if($===J)return null;if($.nextSibling!==null)return $.nextSibling;return fY($,J)}function fY($,J){for($=$.parentNode;$!==null;$=$.parentNode){if($===J)return null;if($.nextSibling!==null)return $.nextSibling}return null}function iD($,J){var Z=$.firstChild;if(Z!==null)return Z;if($===J)return null;if(Z=$.nextSibling,Z!==null)return Z;return fY($,J)}function I5($){while($.lastChild)$=$.lastChild;return $}function sD($,J){var Z=$.previousSibling;if(Z!==null)return I5(Z);if(Z=$.parentNode,Z===J)return null;return Z}});var T5=p((cb,y5)=>{y5.exports=N5;var nD=P0(),I0=b8(),S5=mY(),L5=X0(),uY={first:"firstChild",last:"lastChild",next:"firstChild",previous:"lastChild"},dY={first:"nextSibling",last:"previousSibling",next:"nextSibling",previous:"previousSibling"};function w5($,J){var Z,Y,K,Q,V;Y=$._currentNode[uY[J]];while(Y!==null){if(Q=$._internalFilter(Y),Q===I0.FILTER_ACCEPT)return $._currentNode=Y,Y;if(Q===I0.FILTER_SKIP){if(Z=Y[uY[J]],Z!==null){Y=Z;continue}}while(Y!==null){if(V=Y[dY[J]],V!==null){Y=V;break}if(K=Y.parentNode,K===null||K===$.root||K===$._currentNode)return null;else Y=K}}return null}function R5($,J){var Z,Y,K;if(Z=$._currentNode,Z===$.root)return null;while(!0){K=Z[dY[J]];while(K!==null){if(Z=K,Y=$._internalFilter(Z),Y===I0.FILTER_ACCEPT)return $._currentNode=Z,Z;if(K=Z[uY[J]],Y===I0.FILTER_REJECT||K===null)K=Z[dY[J]]}if(Z=Z.parentNode,Z===null||Z===$.root)return null;if($._internalFilter(Z)===I0.FILTER_ACCEPT)return null}}function N5($,J,Z){if(!$||!$.nodeType)L5.NotSupportedError();this._root=$,this._whatToShow=Number(J)||0,this._filter=Z||null,this._active=!1,this._currentNode=$}Object.defineProperties(N5.prototype,{root:{get:function(){return this._root}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},currentNode:{get:function(){return this._currentNode},set:function(J){if(!(J instanceof nD))throw TypeError("Not a Node");this._currentNode=J}},_internalFilter:{value:function(J){var Z,Y;if(this._active)L5.InvalidStateError();if(!(1<<J.nodeType-1&this._whatToShow))return I0.FILTER_SKIP;if(Y=this._filter,Y===null)Z=I0.FILTER_ACCEPT;else{this._active=!0;try{if(typeof Y==="function")Z=Y(J);else Z=Y.acceptNode(J)}finally{this._active=!1}}return+Z}},parentNode:{value:function(){var J=this._currentNode;while(J!==this.root){if(J=J.parentNode,J===null)return null;if(this._internalFilter(J)===I0.FILTER_ACCEPT)return this._currentNode=J,J}return null}},firstChild:{value:function(){return w5(this,"first")}},lastChild:{value:function(){return w5(this,"last")}},previousSibling:{value:function(){return R5(this,"previous")}},nextSibling:{value:function(){return R5(this,"next")}},previousNode:{value:function(){var J,Z,Y,K;J=this._currentNode;while(J!==this._root){for(Y=J.previousSibling;Y;Y=J.previousSibling){if(J=Y,Z=this._internalFilter(J),Z===I0.FILTER_REJECT)continue;for(K=J.lastChild;K;K=J.lastChild)if(J=K,Z=this._internalFilter(J),Z===I0.FILTER_REJECT)break;if(Z===I0.FILTER_ACCEPT)return this._currentNode=J,J}if(J===this.root||J.parentNode===null)return null;if(J=J.parentNode,this._internalFilter(J)===I0.FILTER_ACCEPT)return this._currentNode=J,J}return null}},nextNode:{value:function(){var J,Z,Y,K;J=this._currentNode,Z=I0.FILTER_ACCEPT;$:while(!0){for(Y=J.firstChild;Y;Y=J.firstChild)if(J=Y,Z=this._internalFilter(J),Z===I0.FILTER_ACCEPT)return this._currentNode=J,J;else if(Z===I0.FILTER_REJECT)break;for(K=S5.nextSkippingChildren(J,this.root);K;K=S5.nextSkippingChildren(J,this.root))if(J=K,Z=this._internalFilter(J),Z===I0.FILTER_ACCEPT)return this._currentNode=J,J;else if(Z===I0.FILTER_SKIP)continue $;return null}}},toString:{value:function(){return"[object TreeWalker]"}}})});var h5=p((lb,v5)=>{v5.exports=b5;var pY=b8(),cY=mY(),x5=X0();function aD($,J,Z){if(Z)return cY.next($,J);else{if($===J)return null;return cY.previous($,null)}}function k5($,J){for(;J;J=J.parentNode)if($===J)return!0;return!1}function E5($,J){var Z,Y;Z=$._referenceNode,Y=$._pointerBeforeReferenceNode;while(!0){if(Y===J)Y=!Y;else if(Z=aD(Z,$._root,J),Z===null)return null;var K=$._internalFilter(Z);if(K===pY.FILTER_ACCEPT)break}return $._referenceNode=Z,$._pointerBeforeReferenceNode=Y,Z}function b5($,J,Z){if(!$||!$.nodeType)x5.NotSupportedError();this._root=$,this._referenceNode=$,this._pointerBeforeReferenceNode=!0,this._whatToShow=Number(J)||0,this._filter=Z||null,this._active=!1,$.doc._attachNodeIterator(this)}Object.defineProperties(b5.prototype,{root:{get:function(){return this._root}},referenceNode:{get:function(){return this._referenceNode}},pointerBeforeReferenceNode:{get:function(){return this._pointerBeforeReferenceNode}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},_internalFilter:{value:function(J){var Z,Y;if(this._active)x5.InvalidStateError();if(!(1<<J.nodeType-1&this._whatToShow))return pY.FILTER_SKIP;if(Y=this._filter,Y===null)Z=pY.FILTER_ACCEPT;else{this._active=!0;try{if(typeof Y==="function")Z=Y(J);else Z=Y.acceptNode(J)}finally{this._active=!1}}return+Z}},_preremove:{value:function(J){if(k5(J,this._root))return;if(!k5(J,this._referenceNode))return;if(this._pointerBeforeReferenceNode){var Z=J;while(Z.lastChild)Z=Z.lastChild;if(Z=cY.next(Z,this.root),Z){this._referenceNode=Z;return}this._pointerBeforeReferenceNode=!1}if(J.previousSibling===null)this._referenceNode=J.parentNode;else{this._referenceNode=J.previousSibling;var Y;for(Y=this._referenceNode.lastChild;Y;Y=this._referenceNode.lastChild)this._referenceNode=Y}}},nextNode:{value:function(){return E5(this,!0)}},previousNode:{value:function(){return E5(this,!1)}},detach:{value:function(){}},toString:{value:function(){return"[object NodeIterator]"}}})});var aZ=p((ob,g5)=>{g5.exports=A0;function A0($){if(!$)return Object.create(A0.prototype);this.url=$.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g,"");var J=A0.pattern.exec(this.url);if(J){if(J[2])this.scheme=J[2];if(J[4]){var Z=J[4].match(A0.userinfoPattern);if(Z)this.username=Z[1],this.password=Z[3],J[4]=J[4].substring(Z[0].length);if(J[4].match(A0.portPattern)){var Y=J[4].lastIndexOf(":");this.host=J[4].substring(0,Y),this.port=J[4].substring(Y+1)}else this.host=J[4]}if(J[5])this.path=J[5];if(J[6])this.query=J[7];if(J[8])this.fragment=J[9]}}A0.pattern=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;A0.userinfoPattern=/^([^@:]*)(:([^@]*))?@/;A0.portPattern=/:\d+$/;A0.authorityPattern=/^[^:\/?#]+:\/\//;A0.hierarchyPattern=/^[^:\/?#]+:\//;A0.percentEncode=function(J){var Z=J.charCodeAt(0);if(Z<256)return"%"+Z.toString(16);else throw Error("can't percent-encode codepoints > 255 yet")};A0.prototype={constructor:A0,isAbsolute:function(){return!!this.scheme},isAuthorityBased:function(){return A0.authorityPattern.test(this.url)},isHierarchical:function(){return A0.hierarchyPattern.test(this.url)},toString:function(){var $="";if(this.scheme!==void 0)$+=this.scheme+":";if(this.isAbsolute()){if($+="//",this.username||this.password){if($+=this.username||"",this.password)$+=":"+this.password;$+="@"}if(this.host)$+=this.host}if(this.port!==void 0)$+=":"+this.port;if(this.path!==void 0)$+=this.path;if(this.query!==void 0)$+="?"+this.query;if(this.fragment!==void 0)$+="#"+this.fragment;return $},resolve:function($){var J=this,Z=new A0($),Y=new A0;if(Z.scheme!==void 0)Y.scheme=Z.scheme,Y.username=Z.username,Y.password=Z.password,Y.host=Z.host,Y.port=Z.port,Y.path=Q(Z.path),Y.query=Z.query;else if(Y.scheme=J.scheme,Z.host!==void 0)Y.username=Z.username,Y.password=Z.password,Y.host=Z.host,Y.port=Z.port,Y.path=Q(Z.path),Y.query=Z.query;else if(Y.username=J.username,Y.password=J.password,Y.host=J.host,Y.port=J.port,!Z.path)if(Y.path=J.path,Z.query!==void 0)Y.query=Z.query;else Y.query=J.query;else{if(Z.path.charAt(0)==="/")Y.path=Q(Z.path);else Y.path=K(J.path,Z.path),Y.path=Q(Y.path);Y.query=Z.query}return Y.fragment=Z.fragment,Y.toString();function K(V,X){if(J.host!==void 0&&!J.path)return"/"+X;var W=V.lastIndexOf("/");if(W===-1)return X;else return V.substring(0,W+1)+X}function Q(V){if(!V)return V;var X="";while(V.length>0){if(V==="."||V===".."){V="";break}var W=V.substring(0,2),_=V.substring(0,3),j=V.substring(0,4);if(_==="../")V=V.substring(3);else if(W==="./")V=V.substring(2);else if(_==="/./")V="/"+V.substring(3);else if(W==="/."&&V.length===2)V="/";else if(j==="/../"||_==="/.."&&V.length===3)V="/"+V.substring(4),X=X.replace(/\/?[^\/]*$/,"");else{var H=V.match(/(\/?([^\/]*))/)[0];X+=H,V=V.substring(H.length)}}return X}}}});var u5=p((rb,m5)=>{m5.exports=lY;var f5=TJ();function lY($,J){f5.call(this,$,J)}lY.prototype=Object.create(f5.prototype,{constructor:{value:lY}})});var oY=p((ib,d5)=>{d5.exports={Event:TJ(),UIEvent:a7(),MouseEvent:e7(),CustomEvent:u5()}});var o5=p((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.hyphenate=c5.parse=void 0;function tD($){let J=[],Z=0,Y=0,K=0,Q=0,V=0,X=null;while(Z<$.length)switch($.charCodeAt(Z++)){case 40:Y++;break;case 41:Y--;break;case 39:if(K===0)K=39;else if(K===39&&$.charCodeAt(Z-1)!==92)K=0;break;case 34:if(K===0)K=34;else if(K===34&&$.charCodeAt(Z-1)!==92)K=0;break;case 58:if(!X&&Y===0&&K===0)X=p5($.substring(V,Z-1).trim()),Q=Z;break;case 59:if(X&&Q>0&&Y===0&&K===0){let _=$.substring(Q,Z-1).trim();J.push(X,_),V=Z,Q=0,X=null}break}if(X&&Q){let W=$.slice(Q).trim();J.push(X,W)}return J}c5.parse=tD;function p5($){return $.replace(/[a-z][A-Z]/g,(J)=>{return J.charAt(0)+"-"+J.charAt(1)}).toLowerCase()}c5.hyphenate=p5});var tZ=p((nb,a5)=>{var{parse:$P}=o5();a5.exports=function($){let J=new n5($);return new Proxy(J,{get:function(Y,K){return K in Y?Y[K]:Y.getPropertyValue(r5(K))},has:function(Y,K){return!0},set:function(Y,K,Q){if(K in Y)Y[K]=Q;else Y.setProperty(r5(K),Q??void 0);return!0}})};function r5($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function n5($){this._element=$}var i5="!important";function s5($){let J={property:{},priority:{}};if(!$)return J;let Z=$P($);if(Z.length<2)return J;for(let Y=0;Y<Z.length;Y+=2){let K=Z[Y],Q=Z[Y+1];if(Q.endsWith(i5))J.priority[K]="important",Q=Q.slice(0,-i5.length).trim();J.property[K]=Q}return J}var fJ={};n5.prototype=Object.create(Object.prototype,{_parsed:{get:function(){if(!this._parsedStyles||this.cssText!==this._lastParsedText){var $=this.cssText;this._parsedStyles=s5($),this._lastParsedText=$,delete this._names}return this._parsedStyles}},_serialize:{value:function(){var $=this._parsed,J="";for(var Z in $.property){if(J)J+=" ";if(J+=Z+": "+$.property[Z],$.priority[Z])J+=" !"+$.priority[Z];J+=";"}this.cssText=J,this._lastParsedText=J,delete this._names}},cssText:{get:function(){return this._element.getAttribute("style")},set:function($){this._element.setAttribute("style",$)}},length:{get:function(){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names.length}},item:{value:function($){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names[$]}},getPropertyValue:{value:function($){return $=$.toLowerCase(),this._parsed.property[$]||""}},getPropertyPriority:{value:function($){return $=$.toLowerCase(),this._parsed.priority[$]||""}},setProperty:{value:function($,J,Z){if($=$.toLowerCase(),J===null||J===void 0)J="";if(Z===null||Z===void 0)Z="";if(J!==fJ)J=""+J;if(J=J.trim(),J===""){this.removeProperty($);return}if(Z!==""&&Z!==fJ&&!/^important$/i.test(Z))return;var Y=this._parsed;if(J===fJ){if(!Y.property[$])return;if(Z!=="")Y.priority[$]="important";else delete Y.priority[$]}else{if(J.indexOf(";")!==-1)return;var K=s5($+":"+J);if(Object.getOwnPropertyNames(K.property).length===0)return;if(Object.getOwnPropertyNames(K.priority).length!==0)return;for(var Q in K.property)if(Y.property[Q]=K.property[Q],Z===fJ)continue;else if(Z!=="")Y.priority[Q]="important";else if(Y.priority[Q])delete Y.priority[Q]}this._serialize()}},setPropertyValue:{value:function($,J){return this.setProperty($,J,fJ)}},setPropertyPriority:{value:function($,J){return this.setProperty($,fJ,J)}},removeProperty:{value:function($){$=$.toLowerCase();var J=this._parsed;if($ in J.property)delete J.property[$],delete J.priority[$],this._serialize()}}})});var rY=p((ab,t5)=>{var C0=aZ();t5.exports=v8;function v8(){}v8.prototype=Object.create(Object.prototype,{_url:{get:function(){return new C0(this.href)}},protocol:{get:function(){var $=this._url;if($&&$.scheme)return $.scheme+":";else return":"},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()){if($=$.replace(/:+$/,""),$=$.replace(/[^-+\.a-zA-Z0-9]/g,C0.percentEncode),$.length>0)Z.scheme=$,J=Z.toString()}this.href=J}},host:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host+($.port?":"+$.port:"");else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isAuthorityBased()){if($=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,C0.percentEncode),$.length>0)Z.host=$,delete Z.port,J=Z.toString()}this.href=J}},hostname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isAuthorityBased()){if($=$.replace(/^\/+/,""),$=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,C0.percentEncode),$.length>0)Z.host=$,J=Z.toString()}this.href=J}},port:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased()&&$.port!==void 0)return $.port;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isAuthorityBased()){if($=""+$,$=$.replace(/[^0-9].*$/,""),$=$.replace(/^0+/,""),$.length===0)$="0";if(parseInt($,10)<=65535)Z.port=$,J=Z.toString()}this.href=J}},pathname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical())return $.path;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isHierarchical()){if($.charAt(0)!=="/")$="/"+$;$=$.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g,C0.percentEncode),Z.path=$,J=Z.toString()}this.href=J}},search:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical()&&$.query!==void 0)return"?"+$.query;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isHierarchical()){if($.charAt(0)==="?")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,C0.percentEncode),Z.query=$,J=Z.toString()}this.href=J}},hash:{get:function(){var $=this._url;if($==null||$.fragment==null||$.fragment==="")return"";else return"#"+$.fragment},set:function($){var J=this.href,Z=new C0(J);if($.charAt(0)==="#")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,C0.percentEncode),Z.fragment=$,J=Z.toString(),this.href=J}},username:{get:function(){var $=this._url;return $.username||""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute())$=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g,C0.percentEncode),Z.username=$,J=Z.toString();this.href=J}},password:{get:function(){var $=this._url;return $.password||""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()){if($==="")Z.password=null;else $=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g,C0.percentEncode),Z.password=$;J=Z.toString()}this.href=J}},origin:{get:function(){var $=this._url;if($==null)return"";var J=function(Z){var Y=[$.scheme,$.host,+$.port||Z];return Y[0]+"://"+Y[1]+(Y[2]===Z?"":":"+Y[2])};switch($.scheme){case"ftp":return J(21);case"gopher":return J(70);case"http":case"ws":return J(80);case"https":case"wss":return J(443);default:return $.scheme+"://"}}}});v8._inherit=function($){Object.getOwnPropertyNames(v8.prototype).forEach(function(J){if(J==="constructor"||J==="href")return;var Z=Object.getOwnPropertyDescriptor(v8.prototype,J);Object.defineProperty($,J,Z)})}});var iY=p((tb,Jj)=>{var e5=_Y(),JP=hZ().isApiWritable;Jj.exports=function($,J,Z,Y){var K=$.ctor;if(K){var Q=$.props||{};if($.attributes)for(var V in $.attributes){var X=$.attributes[V];if(typeof X!=="object"||Array.isArray(X))X={type:X};if(!X.name)X.name=V.toLowerCase();Q[V]=e5.property(X)}if(Q.constructor={value:K,writable:JP},K.prototype=Object.create(($.superclass||J).prototype,Q),$.events)YP(K,$.events);Z[$.name]=K}else K=J;return($.tags||$.tag&&[$.tag]||[]).forEach(function(W){Y[W]=K}),K};function $j($,J,Z,Y){this.body=$,this.document=J,this.form=Z,this.element=Y}$j.prototype.build=function(){return()=>{}};function ZP($,J,Z,Y){var K=$.ownerDocument||Object.create(null),Q=$.form||Object.create(null);$[J]=new $j(Y,K,Q,$).build()}function YP($,J){var Z=$.prototype;J.forEach(function(Y){Object.defineProperty(Z,"on"+Y,{get:function(){return this._getEventHandler(Y)},set:function(K){this._setEventHandler(Y,K)}}),e5.registerChangeHandler($,"on"+Y,ZP)})}});var $6=p((XP)=>{var sY=P0(),Zj=gJ(),KP=tZ(),c0=X0(),Yj=rY(),QP=iY(),i1=XP.elements={},h8=Object.create(null);XP.createElement=function($,J,Z){var Y=h8[J]||GP;return new Y($,J,Z)};function o($){return QP($,K$,i1,h8)}function W0($){return{get:function(){var J=this._getattr($);if(J===null)return"";var Z=this.doc._resolve(J);return Z===null?J:Z},set:function(J){this._setattr($,J)}}}function eZ($){return{get:function(){var J=this._getattr($);if(J===null)return null;if(J.toLowerCase()==="use-credentials")return"use-credentials";return"anonymous"},set:function(J){if(J===null||J===void 0)this.removeAttribute($);else this._setattr($,J)}}}var mJ={type:["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],missing:""},VP={A:!0,LINK:!0,BUTTON:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0,COMMAND:!0},F1=function($,J,Z){K$.call(this,$,J,Z),this._form=null},K$=XP.HTMLElement=o({superclass:Zj,name:"HTMLElement",ctor:function(J,Z,Y){Zj.call(this,J,Z,c0.NAMESPACE.HTML,Y)},props:{dangerouslySetInnerHTML:{set:function($){this._innerHTML=$}},innerHTML:{get:function(){return this.serialize()},set:function($){var J=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,this);J.parse($===null?"":String($),!0);var Z=this instanceof h8.template?this.content:this;while(Z.hasChildNodes())Z.removeChild(Z.firstChild);Z.appendChild(J._asDocumentFragment())}},style:{get:function(){if(!this._style)this._style=new KP(this);return this._style},set:function($){if($===null||$===void 0)$="";this._setattr("style",String($))}},blur:{value:function(){}},focus:{value:function(){}},forceSpellCheck:{value:function(){}},click:{value:function(){if(this._click_in_progress)return;this._click_in_progress=!0;try{if(this._pre_click_activation_steps)this._pre_click_activation_steps();var $=this.ownerDocument.createEvent("MouseEvent");$.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);var J=this.dispatchEvent($);if(J){if(this._post_click_activation_steps)this._post_click_activation_steps($)}else if(this._cancelled_activation_steps)this._cancelled_activation_steps()}finally{this._click_in_progress=!1}}},submit:{value:c0.nyi}},attributes:{title:String,lang:String,dir:{type:["ltr","rtl","auto"],missing:""},draggable:{type:["true","false"],treatNullAsEmptyString:!0},spellcheck:{type:["true","false"],missing:""},enterKeyHint:{type:["enter","done","go","next","previous","search","send"],missing:""},autoCapitalize:{type:["off","on","none","sentences","words","characters"],missing:""},autoFocus:Boolean,accessKey:String,nonce:String,hidden:Boolean,translate:{type:["no","yes"],missing:""},tabIndex:{type:"long",default:function(){if(this.tagName in VP||this.contentEditable)return 0;else return-1}}},events:["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"]}),GP=o({name:"HTMLUnknownElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}}),z1={form:{get:function(){return this._form}}};o({tag:"a",name:"HTMLAnchorElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{_post_click_activation_steps:{value:function($){if(this.href)this.ownerDocument.defaultView.location=this.href}}},attributes:{href:W0,ping:String,download:String,target:String,rel:String,media:String,hreflang:String,type:String,referrerPolicy:mJ,coords:String,charset:String,name:String,rev:String,shape:String}});Yj._inherit(h8.a.prototype);o({tag:"area",name:"HTMLAreaElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{alt:String,target:String,download:String,rel:String,media:String,href:W0,hreflang:String,type:String,shape:String,coords:String,ping:String,referrerPolicy:mJ,noHref:Boolean}});Yj._inherit(h8.area.prototype);o({tag:"br",name:"HTMLBRElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{clear:String}});o({tag:"base",name:"HTMLBaseElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{target:String}});o({tag:"body",name:"HTMLBodyElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},events:["afterprint","beforeprint","beforeunload","blur","error","focus","hashchange","load","message","offline","online","pagehide","pageshow","popstate","resize","scroll","storage","unload"],attributes:{text:{type:String,treatNullAsEmptyString:!0},link:{type:String,treatNullAsEmptyString:!0},vLink:{type:String,treatNullAsEmptyString:!0},aLink:{type:String,treatNullAsEmptyString:!0},bgColor:{type:String,treatNullAsEmptyString:!0},background:String}});o({tag:"button",name:"HTMLButtonElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{name:String,value:String,disabled:Boolean,autofocus:Boolean,type:{type:["submit","reset","button","menu"],missing:"submit"},formTarget:String,formAction:W0,formNoValidate:Boolean,formMethod:{type:["get","post","dialog"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""}}});o({tag:"dl",name:"HTMLDListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{compact:Boolean}});o({tag:"data",name:"HTMLDataElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{value:String}});o({tag:"datalist",name:"HTMLDataListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"details",name:"HTMLDetailsElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{open:Boolean}});o({tag:"div",name:"HTMLDivElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"embed",name:"HTMLEmbedElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,type:String,width:String,height:String,align:String,name:String}});o({tag:"fieldset",name:"HTMLFieldSetElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{disabled:Boolean,name:String}});o({tag:"form",name:"HTMLFormElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{action:String,autocomplete:{type:["on","off"],missing:"on"},name:String,acceptCharset:{name:"accept-charset"},target:String,noValidate:Boolean,method:{type:["get","post","dialog"],invalid:"get",missing:"get"},enctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"},encoding:{name:"enctype",type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"}}});o({tag:"hr",name:"HTMLHRElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String,color:String,noShade:Boolean,size:String,width:String}});o({tag:"head",name:"HTMLHeadElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tags:["h1","h2","h3","h4","h5","h6"],name:"HTMLHeadingElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"html",name:"HTMLHtmlElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{xmlns:W0,version:String}});o({tag:"iframe",name:"HTMLIFrameElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,srcdoc:String,name:String,width:String,height:String,seamless:Boolean,allow:Boolean,allowFullscreen:Boolean,allowUserMedia:Boolean,allowPaymentRequest:Boolean,referrerPolicy:mJ,loading:{type:["eager","lazy"],treatNullAsEmptyString:!0},align:String,scrolling:String,frameBorder:String,longDesc:W0,marginHeight:{type:String,treatNullAsEmptyString:!0},marginWidth:{type:String,treatNullAsEmptyString:!0}}});o({tag:"img",name:"HTMLImageElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{alt:String,src:W0,srcset:String,crossOrigin:eZ,useMap:String,isMap:Boolean,sizes:String,height:{type:"unsigned long",default:0},width:{type:"unsigned long",default:0},referrerPolicy:mJ,loading:{type:["eager","lazy"],missing:""},name:String,lowsrc:W0,align:String,hspace:{type:"unsigned long",default:0},vspace:{type:"unsigned long",default:0},longDesc:W0,border:{type:String,treatNullAsEmptyString:!0}}});o({tag:"input",name:"HTMLInputElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:{form:z1.form,_post_click_activation_steps:{value:function($){if(this.type==="checkbox")this.checked=!this.checked;else if(this.type==="radio"){var J=this.form.getElementsByName(this.name);for(var Z=J.length-1;Z>=0;Z--){var Y=J[Z];Y.checked=Y===this}}}}},attributes:{name:String,disabled:Boolean,autofocus:Boolean,accept:String,alt:String,max:String,min:String,pattern:String,placeholder:String,step:String,dirName:String,defaultValue:{name:"value"},multiple:Boolean,required:Boolean,readOnly:Boolean,checked:Boolean,value:String,src:W0,defaultChecked:{name:"checked",type:Boolean},size:{type:"unsigned long",default:20,min:1,setmin:1},width:{type:"unsigned long",min:0,setmin:0,default:0},height:{type:"unsigned long",min:0,setmin:0,default:0},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},autocomplete:String,type:{type:["text","hidden","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"],missing:"text"},formTarget:String,formNoValidate:Boolean,formMethod:{type:["get","post"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""},align:String,useMap:String}});o({tag:"keygen",name:"HTMLKeygenElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{name:String,disabled:Boolean,autofocus:Boolean,challenge:String,keytype:{type:["rsa"],missing:""}}});o({tag:"li",name:"HTMLLIElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{value:{type:"long",default:0},type:String}});o({tag:"label",name:"HTMLLabelElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{htmlFor:{name:"for",type:String}}});o({tag:"legend",name:"HTMLLegendElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"link",name:"HTMLLinkElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{href:W0,rel:String,media:String,hreflang:String,type:String,crossOrigin:eZ,nonce:String,integrity:String,referrerPolicy:mJ,imageSizes:String,imageSrcset:String,charset:String,rev:String,target:String}});o({tag:"map",name:"HTMLMapElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{name:String}});o({tag:"menu",name:"HTMLMenuElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{type:{type:["context","popup","toolbar"],missing:"toolbar"},label:String,compact:Boolean}});o({tag:"meta",name:"HTMLMetaElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{name:String,content:String,httpEquiv:{name:"http-equiv",type:String},scheme:String}});o({tag:"meter",name:"HTMLMeterElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1});o({tags:["ins","del"],name:"HTMLModElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{cite:W0,dateTime:String}});o({tag:"ol",name:"HTMLOListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{_numitems:{get:function(){var $=0;return this.childNodes.forEach(function(J){if(J.nodeType===sY.ELEMENT_NODE&&J.tagName==="LI")$++}),$}}},attributes:{type:String,reversed:Boolean,start:{type:"long",default:function(){if(this.reversed)return this._numitems;else return 1}},compact:Boolean}});o({tag:"object",name:"HTMLObjectElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{data:W0,type:String,name:String,useMap:String,typeMustMatch:Boolean,width:String,height:String,align:String,archive:String,code:String,declare:Boolean,hspace:{type:"unsigned long",default:0},standby:String,vspace:{type:"unsigned long",default:0},codeBase:W0,codeType:String,border:{type:String,treatNullAsEmptyString:!0}}});o({tag:"optgroup",name:"HTMLOptGroupElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{disabled:Boolean,label:String}});o({tag:"option",name:"HTMLOptionElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{form:{get:function(){var $=this.parentNode;while($&&$.nodeType===sY.ELEMENT_NODE){if($.localName==="select")return $.form;$=$.parentNode}}},value:{get:function(){return this._getattr("value")||this.text},set:function($){this._setattr("value",$)}},text:{get:function(){return this.textContent.replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){this.textContent=$}}},attributes:{disabled:Boolean,defaultSelected:{name:"selected",type:Boolean},label:String}});o({tag:"output",name:"HTMLOutputElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{name:String}});o({tag:"p",name:"HTMLParagraphElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"param",name:"HTMLParamElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{name:String,value:String,type:String,valueType:String}});o({tags:["pre","listing","xmp"],name:"HTMLPreElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{width:{type:"long",default:0}}});o({tag:"progress",name:"HTMLProgressElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{max:{type:Number,float:!0,default:1,min:0}}});o({tags:["q","blockquote"],name:"HTMLQuoteElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{cite:W0}});o({tag:"script",name:"HTMLScriptElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{text:{get:function(){var $="";for(var J=0,Z=this.childNodes.length;J<Z;J++){var Y=this.childNodes[J];if(Y.nodeType===sY.TEXT_NODE)$+=Y._data}return $},set:function($){if(this.removeChildren(),$!==null&&$!=="")this.appendChild(this.ownerDocument.createTextNode($))}}},attributes:{src:W0,type:String,charset:String,referrerPolicy:mJ,defer:Boolean,async:Boolean,nomodule:Boolean,crossOrigin:eZ,nonce:String,integrity:String}});o({tag:"select",name:"HTMLSelectElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:{form:z1.form,options:{get:function(){return this.getElementsByTagName("option")}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,multiple:Boolean,required:Boolean,size:{type:"unsigned long",default:0}}});o({tag:"span",name:"HTMLSpanElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"style",name:"HTMLStyleElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{media:String,type:String,scoped:Boolean}});o({tag:"caption",name:"HTMLTableCaptionElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({name:"HTMLTableCellElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{colSpan:{type:"unsigned long",default:1},rowSpan:{type:"unsigned long",default:1},scope:{type:["row","col","rowgroup","colgroup"],missing:""},abbr:String,align:String,axis:String,height:String,width:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},noWrap:Boolean,vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});o({tags:["col","colgroup"],name:"HTMLTableColElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{span:{type:"limited unsigned long with fallback",default:1,min:1},align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,width:String}});o({tag:"table",name:"HTMLTableElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,border:String,frame:String,rules:String,summary:String,width:String,bgColor:{type:String,treatNullAsEmptyString:!0},cellPadding:{type:String,treatNullAsEmptyString:!0},cellSpacing:{type:String,treatNullAsEmptyString:!0}}});o({tag:"template",name:"HTMLTemplateElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y),this._contentFragment=J._templateDoc.createDocumentFragment()},props:{content:{get:function(){return this._contentFragment}},serialize:{value:function(){return this.content.serialize()}}}});o({tag:"tr",name:"HTMLTableRowElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{cells:{get:function(){return this.querySelectorAll("td,th")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});o({tags:["thead","tfoot","tbody"],name:"HTMLTableSectionElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String}});o({tag:"textarea",name:"HTMLTextAreaElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:{form:z1.form,type:{get:function(){return"textarea"}},defaultValue:{get:function(){return this.textContent},set:function($){this.textContent=$}},value:{get:function(){return this.defaultValue},set:function($){this.defaultValue=$}},textLength:{get:function(){return this.value.length}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,placeholder:String,wrap:String,dirName:String,required:Boolean,readOnly:Boolean,rows:{type:"limited unsigned long with fallback",default:2},cols:{type:"limited unsigned long with fallback",default:20},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""}}});o({tag:"time",name:"HTMLTimeElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{dateTime:String,pubDate:Boolean}});o({tag:"title",name:"HTMLTitleElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{text:{get:function(){return this.textContent}}}});o({tag:"ul",name:"HTMLUListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{type:String,compact:Boolean}});o({name:"HTMLMediaElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,crossOrigin:eZ,preload:{type:["metadata","none","auto",{value:"",alias:"auto"}],missing:"auto"},loop:Boolean,autoplay:Boolean,mediaGroup:String,controls:Boolean,defaultMuted:{name:"muted",type:Boolean}}});o({name:"HTMLAudioElement",tag:"audio",superclass:i1.HTMLMediaElement,ctor:function(J,Z,Y){i1.HTMLMediaElement.call(this,J,Z,Y)}});o({name:"HTMLVideoElement",tag:"video",superclass:i1.HTMLMediaElement,ctor:function(J,Z,Y){i1.HTMLMediaElement.call(this,J,Z,Y)},attributes:{poster:W0,width:{type:"unsigned long",min:0,default:0},height:{type:"unsigned long",min:0,default:0}}});o({tag:"td",name:"HTMLTableDataCellElement",superclass:i1.HTMLTableCellElement,ctor:function(J,Z,Y){i1.HTMLTableCellElement.call(this,J,Z,Y)}});o({tag:"th",name:"HTMLTableHeaderCellElement",superclass:i1.HTMLTableCellElement,ctor:function(J,Z,Y){i1.HTMLTableCellElement.call(this,J,Z,Y)}});o({tag:"frameset",name:"HTMLFrameSetElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"frame",name:"HTMLFrameElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"canvas",name:"HTMLCanvasElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{getContext:{value:c0.nyi},probablySupportsContext:{value:c0.nyi},setContext:{value:c0.nyi},transferControlToProxy:{value:c0.nyi},toDataURL:{value:c0.nyi},toBlob:{value:c0.nyi}},attributes:{width:{type:"unsigned long",default:300},height:{type:"unsigned long",default:150}}});o({tag:"dialog",name:"HTMLDialogElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{show:{value:c0.nyi},showModal:{value:c0.nyi},close:{value:c0.nyi}},attributes:{open:Boolean,returnValue:String}});o({tag:"menuitem",name:"HTMLMenuItemElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{_label:{get:function(){var $=this._getattr("label");if($!==null&&$!=="")return $;return $=this.textContent,$.replace(/[ \t\n\f\r]+/g," ").trim()}},label:{get:function(){var $=this._getattr("label");if($!==null)return $;return this._label},set:function($){this._setattr("label",$)}}},attributes:{type:{type:["command","checkbox","radio"],missing:"command"},icon:W0,disabled:Boolean,checked:Boolean,radiogroup:String,default:Boolean}});o({tag:"source",name:"HTMLSourceElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{srcset:String,sizes:String,media:String,src:W0,type:String,width:String,height:String}});o({tag:"track",name:"HTMLTrackElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,srclang:String,label:String,default:Boolean,kind:{type:["subtitles","captions","descriptions","chapters","metadata"],missing:"subtitles",invalid:"metadata"}},props:{NONE:{get:function(){return 0}},LOADING:{get:function(){return 1}},LOADED:{get:function(){return 2}},ERROR:{get:function(){return 3}},readyState:{get:c0.nyi},track:{get:c0.nyi}}});o({tag:"font",name:"HTMLFontElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{color:{type:String,treatNullAsEmptyString:!0},face:{type:String},size:{type:String}}});o({tag:"dir",name:"HTMLDirectoryElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{compact:Boolean}});o({tags:["abbr","address","article","aside","b","bdi","bdo","cite","content","code","dd","dfn","dt","em","figcaption","figure","footer","header","hgroup","i","kbd","main","mark","nav","noscript","rb","rp","rt","rtc","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr","acronym","basefont","big","center","nobr","noembed","noframes","plaintext","strike","tt"]})});var tY=p((_P)=>{var Kj=gJ(),jP=iY(),UP=X0(),BP=tZ(),HP=_P.elements={},Qj=Object.create(null);_P.createElement=function($,J,Z){var Y=Qj[J]||aY;return new Y($,J,Z)};function nY($){return jP($,aY,HP,Qj)}var aY=nY({superclass:Kj,name:"SVGElement",ctor:function(J,Z,Y){Kj.call(this,J,Z,UP.NAMESPACE.SVG,Y)},props:{style:{get:function(){if(!this._style)this._style=new BP(this);return this._style}}}});nY({name:"SVGSVGElement",ctor:function(J,Z,Y){aY.call(this,J,Z,Y)},tag:"svg",props:{createSVGRect:{value:function(){return _P.createElement(this.ownerDocument,"rect",null)}}}});nY({tags:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","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","script","set","stop","style","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]})});var Xj=p((Kv,Gj)=>{Gj.exports={VALUE:1,ATTR:2,REMOVE_ATTR:3,REMOVE:4,MOVE:5,INSERT:6}});var Z6=p((Qv,zj)=>{zj.exports=f8;var R0=P0(),OP=n2(),_j=mZ(),q2=gJ(),qP=TY(),FP=EY(),g8=TJ(),zP=bY(),CP=hY(),MP=m8(),DP=T5(),PP=h5(),Wj=b8(),jj=aZ(),Uj=lZ(),IP=oY(),J6=uZ(),eY=$6(),AP=tY(),v$=X0(),uJ=Xj(),pJ=v$.NAMESPACE,$3=hZ().isApiWritable;function f8($,J){_j.call(this),this.nodeType=R0.DOCUMENT_NODE,this.isHTML=$,this._address=J||"about:blank",this.readyState="loading",this.implementation=new MP(this),this.ownerDocument=null,this._contentType=$?"text/html":"application/xml",this.doctype=null,this.documentElement=null,this._templateDocCache=null,this._nodeIterators=null,this._nid=1,this._nextnid=2,this._nodes=[null,this],this.byId=Object.create(null),this.modclock=0}var SP={event:"Event",customevent:"CustomEvent",uievent:"UIEvent",mouseevent:"MouseEvent"},wP={events:"event",htmlevents:"event",mouseevents:"mouseevent",mutationevents:"mutationevent",uievents:"uievent"},dJ=function($,J,Z){return{get:function(){var Y=$.call(this);if(Y)return Y[J];return Z},set:function(Y){var K=$.call(this);if(K)K[J]=Y}}};function Bj($,J){var Z,Y,K;if($==="")$=null;if(!J6.isValidQName(J))v$.InvalidCharacterError();if(Z=null,Y=J,K=J.indexOf(":"),K>=0)Z=J.substring(0,K),Y=J.substring(K+1);if(Z!==null&&$===null)v$.NamespaceError();if(Z==="xml"&&$!==pJ.XML)v$.NamespaceError();if((Z==="xmlns"||J==="xmlns")&&$!==pJ.XMLNS)v$.NamespaceError();if($===pJ.XMLNS&&!(Z==="xmlns"||J==="xmlns"))v$.NamespaceError();return{namespace:$,prefix:Z,localName:Y}}f8.prototype=Object.create(_j.prototype,{_setMutationHandler:{value:function($){this.mutationHandler=$}},_dispatchRendererEvent:{value:function($,J,Z){var Y=this._nodes[$];if(!Y)return;Y._dispatchEvent(new g8(J,Z),!0)}},nodeName:{value:"#document"},nodeValue:{get:function(){return null},set:function(){}},documentURI:{get:function(){return this._address},set:v$.nyi},compatMode:{get:function(){return this._quirks?"BackCompat":"CSS1Compat"}},createTextNode:{value:function($){return new qP(this,String($))}},createComment:{value:function($){return new FP(this,$)}},createDocumentFragment:{value:function(){return new zP(this)}},createProcessingInstruction:{value:function($,J){if(!J6.isValidName($)||J.indexOf("?>")!==-1)v$.InvalidCharacterError();return new CP(this,$,J)}},createAttribute:{value:function($){if($=String($),!J6.isValidName($))v$.InvalidCharacterError();if(this.isHTML)$=v$.toASCIILowerCase($);return new q2._Attr(null,$,null,null,"")}},createAttributeNS:{value:function($,J){$=$===null||$===void 0||$===""?null:String($),J=String(J);var Z=Bj($,J);return new q2._Attr(null,Z.localName,Z.prefix,Z.namespace,"")}},createElement:{value:function($){if($=String($),!J6.isValidName($))v$.InvalidCharacterError();if(this.isHTML){if(/[A-Z]/.test($))$=v$.toASCIILowerCase($);return eY.createElement(this,$,null)}else if(this.contentType==="application/xhtml+xml")return eY.createElement(this,$,null);else return new q2(this,$,null,null)},writable:$3},createElementNS:{value:function($,J){$=$===null||$===void 0||$===""?null:String($),J=String(J);var Z=Bj($,J);return this._createElementNS(Z.localName,Z.namespace,Z.prefix)},writable:$3},_createElementNS:{value:function($,J,Z){if(J===pJ.HTML)return eY.createElement(this,$,Z);else if(J===pJ.SVG)return AP.createElement(this,$,Z);return new q2(this,$,J,Z)}},createEvent:{value:function(J){J=J.toLowerCase();var Z=wP[J]||J,Y=IP[SP[Z]];if(Y){var K=new Y;return K._initialized=!1,K}else v$.NotSupportedError()}},createTreeWalker:{value:function($,J,Z){if(!$)throw TypeError("root argument is required");if(!($ instanceof R0))throw TypeError("root not a node");return J=J===void 0?Wj.SHOW_ALL:+J,Z=Z===void 0?null:Z,new DP($,J,Z)}},createNodeIterator:{value:function($,J,Z){if(!$)throw TypeError("root argument is required");if(!($ instanceof R0))throw TypeError("root not a node");return J=J===void 0?Wj.SHOW_ALL:+J,Z=Z===void 0?null:Z,new PP($,J,Z)}},_attachNodeIterator:{value:function($){if(!this._nodeIterators)this._nodeIterators=[];this._nodeIterators.push($)}},_detachNodeIterator:{value:function($){var J=this._nodeIterators.indexOf($);this._nodeIterators.splice(J,1)}},_preremoveNodeIterators:{value:function($){if(this._nodeIterators)this._nodeIterators.forEach(function(J){J._preremove($)})}},_updateDocTypeElement:{value:function(){this.doctype=this.documentElement=null;for(var J=this.firstChild;J!==null;J=J.nextSibling)if(J.nodeType===R0.DOCUMENT_TYPE_NODE)this.doctype=J;else if(J.nodeType===R0.ELEMENT_NODE)this.documentElement=J}},insertBefore:{value:function(J,Z){return R0.prototype.insertBefore.call(this,J,Z),this._updateDocTypeElement(),J}},replaceChild:{value:function(J,Z){return R0.prototype.replaceChild.call(this,J,Z),this._updateDocTypeElement(),Z}},removeChild:{value:function(J){return R0.prototype.removeChild.call(this,J),this._updateDocTypeElement(),J}},getElementById:{value:function($){var J=this.byId[$];if(!J)return null;if(J instanceof s1)return J.getFirst();return J}},_hasMultipleElementsWithId:{value:function($){return this.byId[$]instanceof s1}},getElementsByName:{value:q2.prototype.getElementsByName},getElementsByTagName:{value:q2.prototype.getElementsByTagName},getElementsByTagNameNS:{value:q2.prototype.getElementsByTagNameNS},getElementsByClassName:{value:q2.prototype.getElementsByClassName},adoptNode:{value:function(J){if(J.nodeType===R0.DOCUMENT_NODE)v$.NotSupportedError();if(J.nodeType===R0.ATTRIBUTE_NODE)return J;if(J.parentNode)J.parentNode.removeChild(J);if(J.ownerDocument!==this)Fj(J,this);return J}},importNode:{value:function(J,Z){return this.adoptNode(J.cloneNode(Z))},writable:$3},origin:{get:function(){return null}},characterSet:{get:function(){return"UTF-8"}},contentType:{get:function(){return this._contentType}},URL:{get:function(){return this._address}},domain:{get:v$.nyi,set:v$.nyi},referrer:{get:v$.nyi},cookie:{get:v$.nyi,set:v$.nyi},lastModified:{get:v$.nyi},location:{get:function(){return this.defaultView?this.defaultView.location:null},set:v$.nyi},_titleElement:{get:function(){return this.getElementsByTagName("title").item(0)||null}},title:{get:function(){var $=this._titleElement,J=$?$.textContent:"";return J.replace(/[ \t\n\r\f]+/g," ").replace(/(^ )|( $)/g,"")},set:function($){var J=this._titleElement,Z=this.head;if(!J&&!Z)return;if(!J)J=this.createElement("title"),Z.appendChild(J);J.textContent=$}},dir:dJ(function(){var $=this.documentElement;if($&&$.tagName==="HTML")return $},"dir",""),fgColor:dJ(function(){return this.body},"text",""),linkColor:dJ(function(){return this.body},"link",""),vlinkColor:dJ(function(){return this.body},"vLink",""),alinkColor:dJ(function(){return this.body},"aLink",""),bgColor:dJ(function(){return this.body},"bgColor",""),charset:{get:function(){return this.characterSet}},inputEncoding:{get:function(){return this.characterSet}},scrollingElement:{get:function(){return this._quirks?this.body:this.documentElement}},body:{get:function(){return Hj(this.documentElement,"body")},set:v$.nyi},head:{get:function(){return Hj(this.documentElement,"head")}},images:{get:v$.nyi},embeds:{get:v$.nyi},plugins:{get:v$.nyi},links:{get:v$.nyi},forms:{get:v$.nyi},scripts:{get:v$.nyi},applets:{get:function(){return[]}},activeElement:{get:function(){return null}},innerHTML:{get:function(){return this.serialize()},set:v$.nyi},outerHTML:{get:function(){return this.serialize()},set:v$.nyi},write:{value:function($){if(!this.isHTML)v$.InvalidStateError();if(!this._parser)return;if(!this._parser);var J=arguments.join("");this._parser.parse(J)}},writeln:{value:function(J){this.write(Array.prototype.join.call(arguments,"")+`
32
- `)}},open:{value:function(){this.documentElement=null}},close:{value:function(){if(this.readyState="interactive",this._dispatchEvent(new g8("readystatechange"),!0),this._dispatchEvent(new g8("DOMContentLoaded"),!0),this.readyState="complete",this._dispatchEvent(new g8("readystatechange"),!0),this.defaultView)this.defaultView._dispatchEvent(new g8("load"),!0)}},clone:{value:function(){var J=new f8(this.isHTML,this._address);return J._quirks=this._quirks,J._contentType=this._contentType,J}},cloneNode:{value:function(J){var Z=R0.prototype.cloneNode.call(this,!1);if(J)for(var Y=this.firstChild;Y!==null;Y=Y.nextSibling)Z._appendChild(Z.importNode(Y,!0));return Z._updateDocTypeElement(),Z}},isEqual:{value:function(J){return!0}},mutateValue:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.VALUE,target:$,data:$.data})}},mutateAttr:{value:function($,J){if(this.mutationHandler)this.mutationHandler({type:uJ.ATTR,target:$.ownerElement,attr:$})}},mutateRemoveAttr:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.REMOVE_ATTR,target:$.ownerElement,attr:$})}},mutateRemove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.REMOVE,target:$.parentNode,node:$});qj($)}},mutateInsert:{value:function($){if(Oj($),this.mutationHandler)this.mutationHandler({type:uJ.INSERT,target:$.parentNode,node:$})}},mutateMove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.MOVE,target:$})}},addId:{value:function(J,Z){var Y=this.byId[J];if(!Y)this.byId[J]=Z;else{if(!(Y instanceof s1))Y=new s1(Y),this.byId[J]=Y;Y.add(Z)}}},delId:{value:function(J,Z){var Y=this.byId[J];if(v$.assert(Y),Y instanceof s1){if(Y.del(Z),Y.length===1)this.byId[J]=Y.downgrade()}else this.byId[J]=void 0}},_resolve:{value:function($){return new jj(this._documentBaseURL).resolve($)}},_documentBaseURL:{get:function(){var $=this._address;if($==="about:blank")$="/";var J=this.querySelector("base[href]");if(J)return new jj($).resolve(J.getAttribute("href"));return $}},_templateDoc:{get:function(){if(!this._templateDocCache){var $=new f8(this.isHTML,this._address);this._templateDocCache=$._templateDocCache=$}return this._templateDocCache}},querySelector:{value:function($){return Uj($,this)[0]}},querySelectorAll:{value:function($){var J=Uj($,this);return J.item?J:new OP(J)}}});var RP=["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"];RP.forEach(function($){Object.defineProperty(f8.prototype,"on"+$,{get:function(){return this._getEventHandler($)},set:function(J){this._setEventHandler($,J)}})});function Hj($,J){if($&&$.isHTML){for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)if(Z.nodeType===R0.ELEMENT_NODE&&Z.localName===J&&Z.namespaceURI===pJ.HTML)return Z}return null}function LP($){if($._nid=$.ownerDocument._nextnid++,$.ownerDocument._nodes[$._nid]=$,$.nodeType===R0.ELEMENT_NODE){var J=$.getAttribute("id");if(J)$.ownerDocument.addId(J,$);if($._roothook)$._roothook()}}function NP($){if($.nodeType===R0.ELEMENT_NODE){var J=$.getAttribute("id");if(J)$.ownerDocument.delId(J,$)}$.ownerDocument._nodes[$._nid]=void 0,$._nid=void 0}function Oj($){if(LP($),$.nodeType===R0.ELEMENT_NODE)for(var J=$.firstChild;J!==null;J=J.nextSibling)Oj(J)}function qj($){NP($);for(var J=$.firstChild;J!==null;J=J.nextSibling)qj(J)}function Fj($,J){if($.ownerDocument=J,$._lastModTime=void 0,Object.prototype.hasOwnProperty.call($,"_tagName"))$._tagName=void 0;for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)Fj(Z,J)}function s1($){this.nodes=Object.create(null),this.nodes[$._nid]=$,this.length=1,this.firstNode=void 0}s1.prototype.add=function($){if(!this.nodes[$._nid])this.nodes[$._nid]=$,this.length++,this.firstNode=void 0};s1.prototype.del=function($){if(this.nodes[$._nid])delete this.nodes[$._nid],this.length--,this.firstNode=void 0};s1.prototype.getFirst=function(){if(!this.firstNode){var $;for($ in this.nodes)if(this.firstNode===void 0||this.firstNode.compareDocumentPosition(this.nodes[$])&R0.DOCUMENT_POSITION_PRECEDING)this.firstNode=this.nodes[$]}return this.firstNode};s1.prototype.downgrade=function(){if(this.length===1){var $;for($ in this.nodes)return this.nodes[$]}return this}});var K6=p((Vv,Mj)=>{Mj.exports=Y6;var yP=P0(),Cj=NY(),TP=oZ();function Y6($,J,Z,Y){Cj.call(this),this.nodeType=yP.DOCUMENT_TYPE_NODE,this.ownerDocument=$||null,this.name=J,this.publicId=Z||"",this.systemId=Y||""}Y6.prototype=Object.create(Cj.prototype,{nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return null},set:function(){}},clone:{value:function(){return new Y6(this.ownerDocument,this.name,this.publicId,this.systemId)}},isEqual:{value:function(J){return this.name===J.name&&this.publicId===J.publicId&&this.systemId===J.systemId}}});Object.defineProperties(Y6.prototype,TP)});var U6=p((Gv,pj)=>{pj.exports=b$;var kP=Z6(),EP=K6(),J3=P0(),X$=X0().NAMESPACE,bj=$6(),u$=bj.elements,t2=Function.prototype.apply.bind(Array.prototype.push),Q6=-1,cJ=1,L0=2,N$=3,y1=4,xP=5,bP=[],vP=/^HTML$|^-\/\/W3O\/\/DTD W3 HTML Strict 3\.0\/\/EN\/\/$|^-\/W3C\/DTD HTML 4\.0 Transitional\/EN$|^\+\/\/Silmaril\/\/dtd html Pro v0r11 19970101\/\/|^-\/\/AdvaSoft Ltd\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/AS\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict\/\/|^-\/\/IETF\/\/DTD HTML 2\.0\/\/|^-\/\/IETF\/\/DTD HTML 2\.1E\/\/|^-\/\/IETF\/\/DTD HTML 3\.0\/\/|^-\/\/IETF\/\/DTD HTML 3\.2 Final\/\/|^-\/\/IETF\/\/DTD HTML 3\.2\/\/|^-\/\/IETF\/\/DTD HTML 3\/\/|^-\/\/IETF\/\/DTD HTML Level 0\/\/|^-\/\/IETF\/\/DTD HTML Level 1\/\/|^-\/\/IETF\/\/DTD HTML Level 2\/\/|^-\/\/IETF\/\/DTD HTML Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 0\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict\/\/|^-\/\/IETF\/\/DTD HTML\/\/|^-\/\/Metrius\/\/DTD Metrius Presentational\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 Tables\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 Tables\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD HTML\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD Strict HTML\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML 2\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended 1\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended Relaxed 1\.0\/\/|^-\/\/SoftQuad Software\/\/DTD HoTMetaL PRO 6\.0::19990601::extensions to HTML 4\.0\/\/|^-\/\/SoftQuad\/\/DTD HoTMetaL PRO 4\.0::19971010::extensions to HTML 4\.0\/\/|^-\/\/Spyglass\/\/DTD HTML 2\.0 Extended\/\/|^-\/\/SQ\/\/DTD HTML 2\.0 HoTMetaL \+ extensions\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava HTML\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava Strict HTML\/\/|^-\/\/W3C\/\/DTD HTML 3 1995-03-24\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Draft\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Final\/\/|^-\/\/W3C\/\/DTD HTML 3\.2\/\/|^-\/\/W3C\/\/DTD HTML 3\.2S Draft\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Transitional\/\/|^-\/\/W3C\/\/DTD HTML Experimental 19960712\/\/|^-\/\/W3C\/\/DTD HTML Experimental 970421\/\/|^-\/\/W3C\/\/DTD W3 HTML\/\/|^-\/\/W3O\/\/DTD W3 HTML 3\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML 2\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML\/\//i,hP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Dj=/^-\/\/W3C\/\/DTD HTML 4\.01 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\//i,gP=/^-\/\/W3C\/\/DTD XHTML 1\.0 Frameset\/\/|^-\/\/W3C\/\/DTD XHTML 1\.0 Transitional\/\//i,$J=Object.create(null);$J[X$.HTML]={__proto__:null,address:!0,applet:!0,area:!0,article:!0,aside:!0,base:!0,basefont:!0,bgsound:!0,blockquote:!0,body:!0,br:!0,button:!0,caption:!0,center:!0,col:!0,colgroup:!0,dd:!0,details:!0,dir:!0,div:!0,dl:!0,dt:!0,embed:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,frame:!0,frameset:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,head:!0,header:!0,hgroup:!0,hr:!0,html:!0,iframe:!0,img:!0,input:!0,li:!0,link:!0,listing:!0,main:!0,marquee:!0,menu:!0,meta:!0,nav:!0,noembed:!0,noframes:!0,noscript:!0,object:!0,ol:!0,p:!0,param:!0,plaintext:!0,pre:!0,script:!0,section:!0,select:!0,source:!0,style:!0,summary:!0,table:!0,tbody:!0,td:!0,template:!0,textarea:!0,tfoot:!0,th:!0,thead:!0,title:!0,tr:!0,track:!0,ul:!0,wbr:!0,xmp:!0};$J[X$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};$J[X$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};var K3=Object.create(null);K3[X$.HTML]={__proto__:null,address:!0,div:!0,p:!0};var vj=Object.create(null);vj[X$.HTML]={__proto__:null,dd:!0,dt:!0};var lJ=Object.create(null);lJ[X$.HTML]={__proto__:null,table:!0,thead:!0,tbody:!0,tfoot:!0,tr:!0};var hj=Object.create(null);hj[X$.HTML]={__proto__:null,dd:!0,dt:!0,li:!0,menuitem:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0};var gj=Object.create(null);gj[X$.HTML]={__proto__:null,caption:!0,colgroup:!0,dd:!0,dt:!0,li:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0,tbody:!0,td:!0,tfoot:!0,th:!0,thead:!0,tr:!0};var X6=Object.create(null);X6[X$.HTML]={__proto__:null,table:!0,template:!0,html:!0};var W6=Object.create(null);W6[X$.HTML]={__proto__:null,tbody:!0,tfoot:!0,thead:!0,template:!0,html:!0};var Q3=Object.create(null);Q3[X$.HTML]={__proto__:null,tr:!0,template:!0,html:!0};var fj=Object.create(null);fj[X$.HTML]={__proto__:null,button:!0,fieldset:!0,input:!0,keygen:!0,object:!0,output:!0,select:!0,textarea:!0,img:!0};var T1=Object.create(null);T1[X$.HTML]={__proto__:null,applet:!0,caption:!0,html:!0,table:!0,td:!0,th:!0,marquee:!0,object:!0,template:!0};T1[X$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};T1[X$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var j6=Object.create(T1);j6[X$.HTML]=Object.create(T1[X$.HTML]);j6[X$.HTML].ol=!0;j6[X$.HTML].ul=!0;var V3=Object.create(T1);V3[X$.HTML]=Object.create(T1[X$.HTML]);V3[X$.HTML].button=!0;var mj=Object.create(null);mj[X$.HTML]={__proto__:null,html:!0,table:!0,template:!0};var fP=Object.create(null);fP[X$.HTML]={__proto__:null,optgroup:!0,option:!0};var uj=Object.create(null);uj[X$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0};var dj=Object.create(null);dj[X$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var Pj={__proto__:null,"xlink:actuate":X$.XLINK,"xlink:arcrole":X$.XLINK,"xlink:href":X$.XLINK,"xlink:role":X$.XLINK,"xlink:show":X$.XLINK,"xlink:title":X$.XLINK,"xlink:type":X$.XLINK,"xml:base":X$.XML,"xml:lang":X$.XML,"xml:space":X$.XML,xmlns:X$.XMLNS,"xmlns:xlink":X$.XMLNS},Ij={__proto__:null,attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Aj={__proto__:null,altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Sj={__proto__:null,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},mP={__proto__:null,AElig:198,"AElig;":198,AMP:38,"AMP;":38,Aacute:193,"Aacute;":193,"Abreve;":258,Acirc:194,"Acirc;":194,"Acy;":1040,"Afr;":[55349,56580],Agrave:192,"Agrave;":192,"Alpha;":913,"Amacr;":256,"And;":10835,"Aogon;":260,"Aopf;":[55349,56632],"ApplyFunction;":8289,Aring:197,"Aring;":197,"Ascr;":[55349,56476],"Assign;":8788,Atilde:195,"Atilde;":195,Auml:196,"Auml;":196,"Backslash;":8726,"Barv;":10983,"Barwed;":8966,"Bcy;":1041,"Because;":8757,"Bernoullis;":8492,"Beta;":914,"Bfr;":[55349,56581],"Bopf;":[55349,56633],"Breve;":728,"Bscr;":8492,"Bumpeq;":8782,"CHcy;":1063,COPY:169,"COPY;":169,"Cacute;":262,"Cap;":8914,"CapitalDifferentialD;":8517,"Cayleys;":8493,"Ccaron;":268,Ccedil:199,"Ccedil;":199,"Ccirc;":264,"Cconint;":8752,"Cdot;":266,"Cedilla;":184,"CenterDot;":183,"Cfr;":8493,"Chi;":935,"CircleDot;":8857,"CircleMinus;":8854,"CirclePlus;":8853,"CircleTimes;":8855,"ClockwiseContourIntegral;":8754,"CloseCurlyDoubleQuote;":8221,"CloseCurlyQuote;":8217,"Colon;":8759,"Colone;":10868,"Congruent;":8801,"Conint;":8751,"ContourIntegral;":8750,"Copf;":8450,"Coproduct;":8720,"CounterClockwiseContourIntegral;":8755,"Cross;":10799,"Cscr;":[55349,56478],"Cup;":8915,"CupCap;":8781,"DD;":8517,"DDotrahd;":10513,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Dagger;":8225,"Darr;":8609,"Dashv;":10980,"Dcaron;":270,"Dcy;":1044,"Del;":8711,"Delta;":916,"Dfr;":[55349,56583],"DiacriticalAcute;":180,"DiacriticalDot;":729,"DiacriticalDoubleAcute;":733,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"Diamond;":8900,"DifferentialD;":8518,"Dopf;":[55349,56635],"Dot;":168,"DotDot;":8412,"DotEqual;":8784,"DoubleContourIntegral;":8751,"DoubleDot;":168,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DoubleLeftRightArrow;":8660,"DoubleLeftTee;":10980,"DoubleLongLeftArrow;":10232,"DoubleLongLeftRightArrow;":10234,"DoubleLongRightArrow;":10233,"DoubleRightArrow;":8658,"DoubleRightTee;":8872,"DoubleUpArrow;":8657,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownArrow;":8595,"DownArrowBar;":10515,"DownArrowUpArrow;":8693,"DownBreve;":785,"DownLeftRightVector;":10576,"DownLeftTeeVector;":10590,"DownLeftVector;":8637,"DownLeftVectorBar;":10582,"DownRightTeeVector;":10591,"DownRightVector;":8641,"DownRightVectorBar;":10583,"DownTee;":8868,"DownTeeArrow;":8615,"Downarrow;":8659,"Dscr;":[55349,56479],"Dstrok;":272,"ENG;":330,ETH:208,"ETH;":208,Eacute:201,"Eacute;":201,"Ecaron;":282,Ecirc:202,"Ecirc;":202,"Ecy;":1069,"Edot;":278,"Efr;":[55349,56584],Egrave:200,"Egrave;":200,"Element;":8712,"Emacr;":274,"EmptySmallSquare;":9723,"EmptyVerySmallSquare;":9643,"Eogon;":280,"Eopf;":[55349,56636],"Epsilon;":917,"Equal;":10869,"EqualTilde;":8770,"Equilibrium;":8652,"Escr;":8496,"Esim;":10867,"Eta;":919,Euml:203,"Euml;":203,"Exists;":8707,"ExponentialE;":8519,"Fcy;":1060,"Ffr;":[55349,56585],"FilledSmallSquare;":9724,"FilledVerySmallSquare;":9642,"Fopf;":[55349,56637],"ForAll;":8704,"Fouriertrf;":8497,"Fscr;":8497,"GJcy;":1027,GT:62,"GT;":62,"Gamma;":915,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"Gcirc;":284,"Gcy;":1043,"Gdot;":288,"Gfr;":[55349,56586],"Gg;":8921,"Gopf;":[55349,56638],"GreaterEqual;":8805,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"GreaterGreater;":10914,"GreaterLess;":8823,"GreaterSlantEqual;":10878,"GreaterTilde;":8819,"Gscr;":[55349,56482],"Gt;":8811,"HARDcy;":1066,"Hacek;":711,"Hat;":94,"Hcirc;":292,"Hfr;":8460,"HilbertSpace;":8459,"Hopf;":8461,"HorizontalLine;":9472,"Hscr;":8459,"Hstrok;":294,"HumpDownHump;":8782,"HumpEqual;":8783,"IEcy;":1045,"IJlig;":306,"IOcy;":1025,Iacute:205,"Iacute;":205,Icirc:206,"Icirc;":206,"Icy;":1048,"Idot;":304,"Ifr;":8465,Igrave:204,"Igrave;":204,"Im;":8465,"Imacr;":298,"ImaginaryI;":8520,"Implies;":8658,"Int;":8748,"Integral;":8747,"Intersection;":8898,"InvisibleComma;":8291,"InvisibleTimes;":8290,"Iogon;":302,"Iopf;":[55349,56640],"Iota;":921,"Iscr;":8464,"Itilde;":296,"Iukcy;":1030,Iuml:207,"Iuml;":207,"Jcirc;":308,"Jcy;":1049,"Jfr;":[55349,56589],"Jopf;":[55349,56641],"Jscr;":[55349,56485],"Jsercy;":1032,"Jukcy;":1028,"KHcy;":1061,"KJcy;":1036,"Kappa;":922,"Kcedil;":310,"Kcy;":1050,"Kfr;":[55349,56590],"Kopf;":[55349,56642],"Kscr;":[55349,56486],"LJcy;":1033,LT:60,"LT;":60,"Lacute;":313,"Lambda;":923,"Lang;":10218,"Laplacetrf;":8466,"Larr;":8606,"Lcaron;":317,"Lcedil;":315,"Lcy;":1051,"LeftAngleBracket;":10216,"LeftArrow;":8592,"LeftArrowBar;":8676,"LeftArrowRightArrow;":8646,"LeftCeiling;":8968,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVector;":8643,"LeftDownVectorBar;":10585,"LeftFloor;":8970,"LeftRightArrow;":8596,"LeftRightVector;":10574,"LeftTee;":8867,"LeftTeeArrow;":8612,"LeftTeeVector;":10586,"LeftTriangle;":8882,"LeftTriangleBar;":10703,"LeftTriangleEqual;":8884,"LeftUpDownVector;":10577,"LeftUpTeeVector;":10592,"LeftUpVector;":8639,"LeftUpVectorBar;":10584,"LeftVector;":8636,"LeftVectorBar;":10578,"Leftarrow;":8656,"Leftrightarrow;":8660,"LessEqualGreater;":8922,"LessFullEqual;":8806,"LessGreater;":8822,"LessLess;":10913,"LessSlantEqual;":10877,"LessTilde;":8818,"Lfr;":[55349,56591],"Ll;":8920,"Lleftarrow;":8666,"Lmidot;":319,"LongLeftArrow;":10229,"LongLeftRightArrow;":10231,"LongRightArrow;":10230,"Longleftarrow;":10232,"Longleftrightarrow;":10234,"Longrightarrow;":10233,"Lopf;":[55349,56643],"LowerLeftArrow;":8601,"LowerRightArrow;":8600,"Lscr;":8466,"Lsh;":8624,"Lstrok;":321,"Lt;":8810,"Map;":10501,"Mcy;":1052,"MediumSpace;":8287,"Mellintrf;":8499,"Mfr;":[55349,56592],"MinusPlus;":8723,"Mopf;":[55349,56644],"Mscr;":8499,"Mu;":924,"NJcy;":1034,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ncy;":1053,"NegativeMediumSpace;":8203,"NegativeThickSpace;":8203,"NegativeThinSpace;":8203,"NegativeVeryThinSpace;":8203,"NestedGreaterGreater;":8811,"NestedLessLess;":8810,"NewLine;":10,"Nfr;":[55349,56593],"NoBreak;":8288,"NonBreakingSpace;":160,"Nopf;":8469,"Not;":10988,"NotCongruent;":8802,"NotCupCap;":8813,"NotDoubleVerticalBar;":8742,"NotElement;":8713,"NotEqual;":8800,"NotEqualTilde;":[8770,824],"NotExists;":8708,"NotGreater;":8815,"NotGreaterEqual;":8817,"NotGreaterFullEqual;":[8807,824],"NotGreaterGreater;":[8811,824],"NotGreaterLess;":8825,"NotGreaterSlantEqual;":[10878,824],"NotGreaterTilde;":8821,"NotHumpDownHump;":[8782,824],"NotHumpEqual;":[8783,824],"NotLeftTriangle;":8938,"NotLeftTriangleBar;":[10703,824],"NotLeftTriangleEqual;":8940,"NotLess;":8814,"NotLessEqual;":8816,"NotLessGreater;":8824,"NotLessLess;":[8810,824],"NotLessSlantEqual;":[10877,824],"NotLessTilde;":8820,"NotNestedGreaterGreater;":[10914,824],"NotNestedLessLess;":[10913,824],"NotPrecedes;":8832,"NotPrecedesEqual;":[10927,824],"NotPrecedesSlantEqual;":8928,"NotReverseElement;":8716,"NotRightTriangle;":8939,"NotRightTriangleBar;":[10704,824],"NotRightTriangleEqual;":8941,"NotSquareSubset;":[8847,824],"NotSquareSubsetEqual;":8930,"NotSquareSuperset;":[8848,824],"NotSquareSupersetEqual;":8931,"NotSubset;":[8834,8402],"NotSubsetEqual;":8840,"NotSucceeds;":8833,"NotSucceedsEqual;":[10928,824],"NotSucceedsSlantEqual;":8929,"NotSucceedsTilde;":[8831,824],"NotSuperset;":[8835,8402],"NotSupersetEqual;":8841,"NotTilde;":8769,"NotTildeEqual;":8772,"NotTildeFullEqual;":8775,"NotTildeTilde;":8777,"NotVerticalBar;":8740,"Nscr;":[55349,56489],Ntilde:209,"Ntilde;":209,"Nu;":925,"OElig;":338,Oacute:211,"Oacute;":211,Ocirc:212,"Ocirc;":212,"Ocy;":1054,"Odblac;":336,"Ofr;":[55349,56594],Ograve:210,"Ograve;":210,"Omacr;":332,"Omega;":937,"Omicron;":927,"Oopf;":[55349,56646],"OpenCurlyDoubleQuote;":8220,"OpenCurlyQuote;":8216,"Or;":10836,"Oscr;":[55349,56490],Oslash:216,"Oslash;":216,Otilde:213,"Otilde;":213,"Otimes;":10807,Ouml:214,"Ouml;":214,"OverBar;":8254,"OverBrace;":9182,"OverBracket;":9140,"OverParenthesis;":9180,"PartialD;":8706,"Pcy;":1055,"Pfr;":[55349,56595],"Phi;":934,"Pi;":928,"PlusMinus;":177,"Poincareplane;":8460,"Popf;":8473,"Pr;":10939,"Precedes;":8826,"PrecedesEqual;":10927,"PrecedesSlantEqual;":8828,"PrecedesTilde;":8830,"Prime;":8243,"Product;":8719,"Proportion;":8759,"Proportional;":8733,"Pscr;":[55349,56491],"Psi;":936,QUOT:34,"QUOT;":34,"Qfr;":[55349,56596],"Qopf;":8474,"Qscr;":[55349,56492],"RBarr;":10512,REG:174,"REG;":174,"Racute;":340,"Rang;":10219,"Rarr;":8608,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"Rcy;":1056,"Re;":8476,"ReverseElement;":8715,"ReverseEquilibrium;":8651,"ReverseUpEquilibrium;":10607,"Rfr;":8476,"Rho;":929,"RightAngleBracket;":10217,"RightArrow;":8594,"RightArrowBar;":8677,"RightArrowLeftArrow;":8644,"RightCeiling;":8969,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVector;":8642,"RightDownVectorBar;":10581,"RightFloor;":8971,"RightTee;":8866,"RightTeeArrow;":8614,"RightTeeVector;":10587,"RightTriangle;":8883,"RightTriangleBar;":10704,"RightTriangleEqual;":8885,"RightUpDownVector;":10575,"RightUpTeeVector;":10588,"RightUpVector;":8638,"RightUpVectorBar;":10580,"RightVector;":8640,"RightVectorBar;":10579,"Rightarrow;":8658,"Ropf;":8477,"RoundImplies;":10608,"Rrightarrow;":8667,"Rscr;":8475,"Rsh;":8625,"RuleDelayed;":10740,"SHCHcy;":1065,"SHcy;":1064,"SOFTcy;":1068,"Sacute;":346,"Sc;":10940,"Scaron;":352,"Scedil;":350,"Scirc;":348,"Scy;":1057,"Sfr;":[55349,56598],"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"ShortRightArrow;":8594,"ShortUpArrow;":8593,"Sigma;":931,"SmallCircle;":8728,"Sopf;":[55349,56650],"Sqrt;":8730,"Square;":9633,"SquareIntersection;":8851,"SquareSubset;":8847,"SquareSubsetEqual;":8849,"SquareSuperset;":8848,"SquareSupersetEqual;":8850,"SquareUnion;":8852,"Sscr;":[55349,56494],"Star;":8902,"Sub;":8912,"Subset;":8912,"SubsetEqual;":8838,"Succeeds;":8827,"SucceedsEqual;":10928,"SucceedsSlantEqual;":8829,"SucceedsTilde;":8831,"SuchThat;":8715,"Sum;":8721,"Sup;":8913,"Superset;":8835,"SupersetEqual;":8839,"Supset;":8913,THORN:222,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"TScy;":1062,"Tab;":9,"Tau;":932,"Tcaron;":356,"Tcedil;":354,"Tcy;":1058,"Tfr;":[55349,56599],"Therefore;":8756,"Theta;":920,"ThickSpace;":[8287,8202],"ThinSpace;":8201,"Tilde;":8764,"TildeEqual;":8771,"TildeFullEqual;":8773,"TildeTilde;":8776,"Topf;":[55349,56651],"TripleDot;":8411,"Tscr;":[55349,56495],"Tstrok;":358,Uacute:218,"Uacute;":218,"Uarr;":8607,"Uarrocir;":10569,"Ubrcy;":1038,"Ubreve;":364,Ucirc:219,"Ucirc;":219,"Ucy;":1059,"Udblac;":368,"Ufr;":[55349,56600],Ugrave:217,"Ugrave;":217,"Umacr;":362,"UnderBar;":95,"UnderBrace;":9183,"UnderBracket;":9141,"UnderParenthesis;":9181,"Union;":8899,"UnionPlus;":8846,"Uogon;":370,"Uopf;":[55349,56652],"UpArrow;":8593,"UpArrowBar;":10514,"UpArrowDownArrow;":8645,"UpDownArrow;":8597,"UpEquilibrium;":10606,"UpTee;":8869,"UpTeeArrow;":8613,"Uparrow;":8657,"Updownarrow;":8661,"UpperLeftArrow;":8598,"UpperRightArrow;":8599,"Upsi;":978,"Upsilon;":933,"Uring;":366,"Uscr;":[55349,56496],"Utilde;":360,Uuml:220,"Uuml;":220,"VDash;":8875,"Vbar;":10987,"Vcy;":1042,"Vdash;":8873,"Vdashl;":10982,"Vee;":8897,"Verbar;":8214,"Vert;":8214,"VerticalBar;":8739,"VerticalLine;":124,"VerticalSeparator;":10072,"VerticalTilde;":8768,"VeryThinSpace;":8202,"Vfr;":[55349,56601],"Vopf;":[55349,56653],"Vscr;":[55349,56497],"Vvdash;":8874,"Wcirc;":372,"Wedge;":8896,"Wfr;":[55349,56602],"Wopf;":[55349,56654],"Wscr;":[55349,56498],"Xfr;":[55349,56603],"Xi;":926,"Xopf;":[55349,56655],"Xscr;":[55349,56499],"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,Yacute:221,"Yacute;":221,"Ycirc;":374,"Ycy;":1067,"Yfr;":[55349,56604],"Yopf;":[55349,56656],"Yscr;":[55349,56500],"Yuml;":376,"ZHcy;":1046,"Zacute;":377,"Zcaron;":381,"Zcy;":1047,"Zdot;":379,"ZeroWidthSpace;":8203,"Zeta;":918,"Zfr;":8488,"Zopf;":8484,"Zscr;":[55349,56501],aacute:225,"aacute;":225,"abreve;":259,"ac;":8766,"acE;":[8766,819],"acd;":8767,acirc:226,"acirc;":226,acute:180,"acute;":180,"acy;":1072,aelig:230,"aelig;":230,"af;":8289,"afr;":[55349,56606],agrave:224,"agrave;":224,"alefsym;":8501,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,amp:38,"amp;":38,"and;":8743,"andand;":10837,"andd;":10844,"andslope;":10840,"andv;":10842,"ang;":8736,"ange;":10660,"angle;":8736,"angmsd;":8737,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrt;":8735,"angrtvb;":8894,"angrtvbd;":10653,"angsph;":8738,"angst;":197,"angzarr;":9084,"aogon;":261,"aopf;":[55349,56658],"ap;":8776,"apE;":10864,"apacir;":10863,"ape;":8778,"apid;":8779,"apos;":39,"approx;":8776,"approxeq;":8778,aring:229,"aring;":229,"ascr;":[55349,56502],"ast;":42,"asymp;":8776,"asympeq;":8781,atilde:227,"atilde;":227,auml:228,"auml;":228,"awconint;":8755,"awint;":10769,"bNot;":10989,"backcong;":8780,"backepsilon;":1014,"backprime;":8245,"backsim;":8765,"backsimeq;":8909,"barvee;":8893,"barwed;":8965,"barwedge;":8965,"bbrk;":9141,"bbrktbrk;":9142,"bcong;":8780,"bcy;":1073,"bdquo;":8222,"becaus;":8757,"because;":8757,"bemptyv;":10672,"bepsi;":1014,"bernou;":8492,"beta;":946,"beth;":8502,"between;":8812,"bfr;":[55349,56607],"bigcap;":8898,"bigcirc;":9711,"bigcup;":8899,"bigodot;":10752,"bigoplus;":10753,"bigotimes;":10754,"bigsqcup;":10758,"bigstar;":9733,"bigtriangledown;":9661,"bigtriangleup;":9651,"biguplus;":10756,"bigvee;":8897,"bigwedge;":8896,"bkarow;":10509,"blacklozenge;":10731,"blacksquare;":9642,"blacktriangle;":9652,"blacktriangledown;":9662,"blacktriangleleft;":9666,"blacktriangleright;":9656,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"bne;":[61,8421],"bnequiv;":[8801,8421],"bnot;":8976,"bopf;":[55349,56659],"bot;":8869,"bottom;":8869,"bowtie;":8904,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxH;":9552,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxV;":9553,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxbox;":10697,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxh;":9472,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxminus;":8863,"boxplus;":8862,"boxtimes;":8864,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxv;":9474,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"bprime;":8245,"breve;":728,brvbar:166,"brvbar;":166,"bscr;":[55349,56503],"bsemi;":8271,"bsim;":8765,"bsime;":8909,"bsol;":92,"bsolb;":10693,"bsolhsub;":10184,"bull;":8226,"bullet;":8226,"bump;":8782,"bumpE;":10926,"bumpe;":8783,"bumpeq;":8783,"cacute;":263,"cap;":8745,"capand;":10820,"capbrcup;":10825,"capcap;":10827,"capcup;":10823,"capdot;":10816,"caps;":[8745,65024],"caret;":8257,"caron;":711,"ccaps;":10829,"ccaron;":269,ccedil:231,"ccedil;":231,"ccirc;":265,"ccups;":10828,"ccupssm;":10832,"cdot;":267,cedil:184,"cedil;":184,"cemptyv;":10674,cent:162,"cent;":162,"centerdot;":183,"cfr;":[55349,56608],"chcy;":1095,"check;":10003,"checkmark;":10003,"chi;":967,"cir;":9675,"cirE;":10691,"circ;":710,"circeq;":8791,"circlearrowleft;":8634,"circlearrowright;":8635,"circledR;":174,"circledS;":9416,"circledast;":8859,"circledcirc;":8858,"circleddash;":8861,"cire;":8791,"cirfnint;":10768,"cirmid;":10991,"cirscir;":10690,"clubs;":9827,"clubsuit;":9827,"colon;":58,"colone;":8788,"coloneq;":8788,"comma;":44,"commat;":64,"comp;":8705,"compfn;":8728,"complement;":8705,"complexes;":8450,"cong;":8773,"congdot;":10861,"conint;":8750,"copf;":[55349,56660],"coprod;":8720,copy:169,"copy;":169,"copysr;":8471,"crarr;":8629,"cross;":10007,"cscr;":[55349,56504],"csub;":10959,"csube;":10961,"csup;":10960,"csupe;":10962,"ctdot;":8943,"cudarrl;":10552,"cudarrr;":10549,"cuepr;":8926,"cuesc;":8927,"cularr;":8630,"cularrp;":10557,"cup;":8746,"cupbrcap;":10824,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"cupor;":10821,"cups;":[8746,65024],"curarr;":8631,"curarrm;":10556,"curlyeqprec;":8926,"curlyeqsucc;":8927,"curlyvee;":8910,"curlywedge;":8911,curren:164,"curren;":164,"curvearrowleft;":8630,"curvearrowright;":8631,"cuvee;":8910,"cuwed;":8911,"cwconint;":8754,"cwint;":8753,"cylcty;":9005,"dArr;":8659,"dHar;":10597,"dagger;":8224,"daleth;":8504,"darr;":8595,"dash;":8208,"dashv;":8867,"dbkarow;":10511,"dblac;":733,"dcaron;":271,"dcy;":1076,"dd;":8518,"ddagger;":8225,"ddarr;":8650,"ddotseq;":10871,deg:176,"deg;":176,"delta;":948,"demptyv;":10673,"dfisht;":10623,"dfr;":[55349,56609],"dharl;":8643,"dharr;":8642,"diam;":8900,"diamond;":8900,"diamondsuit;":9830,"diams;":9830,"die;":168,"digamma;":989,"disin;":8946,"div;":247,divide:247,"divide;":247,"divideontimes;":8903,"divonx;":8903,"djcy;":1106,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"dopf;":[55349,56661],"dot;":729,"doteq;":8784,"doteqdot;":8785,"dotminus;":8760,"dotplus;":8724,"dotsquare;":8865,"doublebarwedge;":8966,"downarrow;":8595,"downdownarrows;":8650,"downharpoonleft;":8643,"downharpoonright;":8642,"drbkarow;":10512,"drcorn;":8991,"drcrop;":8972,"dscr;":[55349,56505],"dscy;":1109,"dsol;":10742,"dstrok;":273,"dtdot;":8945,"dtri;":9663,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"dwangle;":10662,"dzcy;":1119,"dzigrarr;":10239,"eDDot;":10871,"eDot;":8785,eacute:233,"eacute;":233,"easter;":10862,"ecaron;":283,"ecir;":8790,ecirc:234,"ecirc;":234,"ecolon;":8789,"ecy;":1101,"edot;":279,"ee;":8519,"efDot;":8786,"efr;":[55349,56610],"eg;":10906,egrave:232,"egrave;":232,"egs;":10902,"egsdot;":10904,"el;":10905,"elinters;":9191,"ell;":8467,"els;":10901,"elsdot;":10903,"emacr;":275,"empty;":8709,"emptyset;":8709,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"emsp;":8195,"eng;":331,"ensp;":8194,"eogon;":281,"eopf;":[55349,56662],"epar;":8917,"eparsl;":10723,"eplus;":10865,"epsi;":949,"epsilon;":949,"epsiv;":1013,"eqcirc;":8790,"eqcolon;":8789,"eqsim;":8770,"eqslantgtr;":10902,"eqslantless;":10901,"equals;":61,"equest;":8799,"equiv;":8801,"equivDD;":10872,"eqvparsl;":10725,"erDot;":8787,"erarr;":10609,"escr;":8495,"esdot;":8784,"esim;":8770,"eta;":951,eth:240,"eth;":240,euml:235,"euml;":235,"euro;":8364,"excl;":33,"exist;":8707,"expectation;":8496,"exponentiale;":8519,"fallingdotseq;":8786,"fcy;":1092,"female;":9792,"ffilig;":64259,"fflig;":64256,"ffllig;":64260,"ffr;":[55349,56611],"filig;":64257,"fjlig;":[102,106],"flat;":9837,"fllig;":64258,"fltns;":9649,"fnof;":402,"fopf;":[55349,56663],"forall;":8704,"fork;":8916,"forkv;":10969,"fpartint;":10765,frac12:189,"frac12;":189,"frac13;":8531,frac14:188,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,frac34:190,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"frasl;":8260,"frown;":8994,"fscr;":[55349,56507],"gE;":8807,"gEl;":10892,"gacute;":501,"gamma;":947,"gammad;":989,"gap;":10886,"gbreve;":287,"gcirc;":285,"gcy;":1075,"gdot;":289,"ge;":8805,"gel;":8923,"geq;":8805,"geqq;":8807,"geqslant;":10878,"ges;":10878,"gescc;":10921,"gesdot;":10880,"gesdoto;":10882,"gesdotol;":10884,"gesl;":[8923,65024],"gesles;":10900,"gfr;":[55349,56612],"gg;":8811,"ggg;":8921,"gimel;":8503,"gjcy;":1107,"gl;":8823,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gnap;":10890,"gnapprox;":10890,"gne;":10888,"gneq;":10888,"gneqq;":8809,"gnsim;":8935,"gopf;":[55349,56664],"grave;":96,"gscr;":8458,"gsim;":8819,"gsime;":10894,"gsiml;":10896,gt:62,"gt;":62,"gtcc;":10919,"gtcir;":10874,"gtdot;":8919,"gtlPar;":10645,"gtquest;":10876,"gtrapprox;":10886,"gtrarr;":10616,"gtrdot;":8919,"gtreqless;":8923,"gtreqqless;":10892,"gtrless;":8823,"gtrsim;":8819,"gvertneqq;":[8809,65024],"gvnE;":[8809,65024],"hArr;":8660,"hairsp;":8202,"half;":189,"hamilt;":8459,"hardcy;":1098,"harr;":8596,"harrcir;":10568,"harrw;":8621,"hbar;":8463,"hcirc;":293,"hearts;":9829,"heartsuit;":9829,"hellip;":8230,"hercon;":8889,"hfr;":[55349,56613],"hksearow;":10533,"hkswarow;":10534,"hoarr;":8703,"homtht;":8763,"hookleftarrow;":8617,"hookrightarrow;":8618,"hopf;":[55349,56665],"horbar;":8213,"hscr;":[55349,56509],"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,iacute:237,"iacute;":237,"ic;":8291,icirc:238,"icirc;":238,"icy;":1080,"iecy;":1077,iexcl:161,"iexcl;":161,"iff;":8660,"ifr;":[55349,56614],igrave:236,"igrave;":236,"ii;":8520,"iiiint;":10764,"iiint;":8749,"iinfin;":10716,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imagline;":8464,"imagpart;":8465,"imath;":305,"imof;":8887,"imped;":437,"in;":8712,"incare;":8453,"infin;":8734,"infintie;":10717,"inodot;":305,"int;":8747,"intcal;":8890,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"intprod;":10812,"iocy;":1105,"iogon;":303,"iopf;":[55349,56666],"iota;":953,"iprod;":10812,iquest:191,"iquest;":191,"iscr;":[55349,56510],"isin;":8712,"isinE;":8953,"isindot;":8949,"isins;":8948,"isinsv;":8947,"isinv;":8712,"it;":8290,"itilde;":297,"iukcy;":1110,iuml:239,"iuml;":239,"jcirc;":309,"jcy;":1081,"jfr;":[55349,56615],"jmath;":567,"jopf;":[55349,56667],"jscr;":[55349,56511],"jsercy;":1112,"jukcy;":1108,"kappa;":954,"kappav;":1008,"kcedil;":311,"kcy;":1082,"kfr;":[55349,56616],"kgreen;":312,"khcy;":1093,"kjcy;":1116,"kopf;":[55349,56668],"kscr;":[55349,56512],"lAarr;":8666,"lArr;":8656,"lAtail;":10523,"lBarr;":10510,"lE;":8806,"lEg;":10891,"lHar;":10594,"lacute;":314,"laemptyv;":10676,"lagran;":8466,"lambda;":955,"lang;":10216,"langd;":10641,"langle;":10216,"lap;":10885,laquo:171,"laquo;":171,"larr;":8592,"larrb;":8676,"larrbfs;":10527,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrsim;":10611,"larrtl;":8610,"lat;":10923,"latail;":10521,"late;":10925,"lates;":[10925,65024],"lbarr;":10508,"lbbrk;":10098,"lbrace;":123,"lbrack;":91,"lbrke;":10635,"lbrksld;":10639,"lbrkslu;":10637,"lcaron;":318,"lcedil;":316,"lceil;":8968,"lcub;":123,"lcy;":1083,"ldca;":10550,"ldquo;":8220,"ldquor;":8222,"ldrdhar;":10599,"ldrushar;":10571,"ldsh;":8626,"le;":8804,"leftarrow;":8592,"leftarrowtail;":8610,"leftharpoondown;":8637,"leftharpoonup;":8636,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftrightarrows;":8646,"leftrightharpoons;":8651,"leftrightsquigarrow;":8621,"leftthreetimes;":8907,"leg;":8922,"leq;":8804,"leqq;":8806,"leqslant;":10877,"les;":10877,"lescc;":10920,"lesdot;":10879,"lesdoto;":10881,"lesdotor;":10883,"lesg;":[8922,65024],"lesges;":10899,"lessapprox;":10885,"lessdot;":8918,"lesseqgtr;":8922,"lesseqqgtr;":10891,"lessgtr;":8822,"lesssim;":8818,"lfisht;":10620,"lfloor;":8970,"lfr;":[55349,56617],"lg;":8822,"lgE;":10897,"lhard;":8637,"lharu;":8636,"lharul;":10602,"lhblk;":9604,"ljcy;":1113,"ll;":8810,"llarr;":8647,"llcorner;":8990,"llhard;":10603,"lltri;":9722,"lmidot;":320,"lmoust;":9136,"lmoustache;":9136,"lnE;":8808,"lnap;":10889,"lnapprox;":10889,"lne;":10887,"lneq;":10887,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"longleftarrow;":10229,"longleftrightarrow;":10231,"longmapsto;":10236,"longrightarrow;":10230,"looparrowleft;":8619,"looparrowright;":8620,"lopar;":10629,"lopf;":[55349,56669],"loplus;":10797,"lotimes;":10804,"lowast;":8727,"lowbar;":95,"loz;":9674,"lozenge;":9674,"lozf;":10731,"lpar;":40,"lparlt;":10643,"lrarr;":8646,"lrcorner;":8991,"lrhar;":8651,"lrhard;":10605,"lrm;":8206,"lrtri;":8895,"lsaquo;":8249,"lscr;":[55349,56513],"lsh;":8624,"lsim;":8818,"lsime;":10893,"lsimg;":10895,"lsqb;":91,"lsquo;":8216,"lsquor;":8218,"lstrok;":322,lt:60,"lt;":60,"ltcc;":10918,"ltcir;":10873,"ltdot;":8918,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltquest;":10875,"ltrPar;":10646,"ltri;":9667,"ltrie;":8884,"ltrif;":9666,"lurdshar;":10570,"luruhar;":10598,"lvertneqq;":[8808,65024],"lvnE;":[8808,65024],"mDDot;":8762,macr:175,"macr;":175,"male;":9794,"malt;":10016,"maltese;":10016,"map;":8614,"mapsto;":8614,"mapstodown;":8615,"mapstoleft;":8612,"mapstoup;":8613,"marker;":9646,"mcomma;":10793,"mcy;":1084,"mdash;":8212,"measuredangle;":8737,"mfr;":[55349,56618],"mho;":8487,micro:181,"micro;":181,"mid;":8739,"midast;":42,"midcir;":10992,middot:183,"middot;":183,"minus;":8722,"minusb;":8863,"minusd;":8760,"minusdu;":10794,"mlcp;":10971,"mldr;":8230,"mnplus;":8723,"models;":8871,"mopf;":[55349,56670],"mp;":8723,"mscr;":[55349,56514],"mstpos;":8766,"mu;":956,"multimap;":8888,"mumap;":8888,"nGg;":[8921,824],"nGt;":[8811,8402],"nGtv;":[8811,824],"nLeftarrow;":8653,"nLeftrightarrow;":8654,"nLl;":[8920,824],"nLt;":[8810,8402],"nLtv;":[8810,824],"nRightarrow;":8655,"nVDash;":8879,"nVdash;":8878,"nabla;":8711,"nacute;":324,"nang;":[8736,8402],"nap;":8777,"napE;":[10864,824],"napid;":[8779,824],"napos;":329,"napprox;":8777,"natur;":9838,"natural;":9838,"naturals;":8469,nbsp:160,"nbsp;":160,"nbump;":[8782,824],"nbumpe;":[8783,824],"ncap;":10819,"ncaron;":328,"ncedil;":326,"ncong;":8775,"ncongdot;":[10861,824],"ncup;":10818,"ncy;":1085,"ndash;":8211,"ne;":8800,"neArr;":8663,"nearhk;":10532,"nearr;":8599,"nearrow;":8599,"nedot;":[8784,824],"nequiv;":8802,"nesear;":10536,"nesim;":[8770,824],"nexist;":8708,"nexists;":8708,"nfr;":[55349,56619],"ngE;":[8807,824],"nge;":8817,"ngeq;":8817,"ngeqq;":[8807,824],"ngeqslant;":[10878,824],"nges;":[10878,824],"ngsim;":8821,"ngt;":8815,"ngtr;":8815,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"ni;":8715,"nis;":8956,"nisd;":8954,"niv;":8715,"njcy;":1114,"nlArr;":8653,"nlE;":[8806,824],"nlarr;":8602,"nldr;":8229,"nle;":8816,"nleftarrow;":8602,"nleftrightarrow;":8622,"nleq;":8816,"nleqq;":[8806,824],"nleqslant;":[10877,824],"nles;":[10877,824],"nless;":8814,"nlsim;":8820,"nlt;":8814,"nltri;":8938,"nltrie;":8940,"nmid;":8740,"nopf;":[55349,56671],not:172,"not;":172,"notin;":8713,"notinE;":[8953,824],"notindot;":[8949,824],"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notni;":8716,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npar;":8742,"nparallel;":8742,"nparsl;":[11005,8421],"npart;":[8706,824],"npolint;":10772,"npr;":8832,"nprcue;":8928,"npre;":[10927,824],"nprec;":8832,"npreceq;":[10927,824],"nrArr;":8655,"nrarr;":8603,"nrarrc;":[10547,824],"nrarrw;":[8605,824],"nrightarrow;":8603,"nrtri;":8939,"nrtrie;":8941,"nsc;":8833,"nsccue;":8929,"nsce;":[10928,824],"nscr;":[55349,56515],"nshortmid;":8740,"nshortparallel;":8742,"nsim;":8769,"nsime;":8772,"nsimeq;":8772,"nsmid;":8740,"nspar;":8742,"nsqsube;":8930,"nsqsupe;":8931,"nsub;":8836,"nsubE;":[10949,824],"nsube;":8840,"nsubset;":[8834,8402],"nsubseteq;":8840,"nsubseteqq;":[10949,824],"nsucc;":8833,"nsucceq;":[10928,824],"nsup;":8837,"nsupE;":[10950,824],"nsupe;":8841,"nsupset;":[8835,8402],"nsupseteq;":8841,"nsupseteqq;":[10950,824],"ntgl;":8825,ntilde:241,"ntilde;":241,"ntlg;":8824,"ntriangleleft;":8938,"ntrianglelefteq;":8940,"ntriangleright;":8939,"ntrianglerighteq;":8941,"nu;":957,"num;":35,"numero;":8470,"numsp;":8199,"nvDash;":8877,"nvHarr;":10500,"nvap;":[8781,8402],"nvdash;":8876,"nvge;":[8805,8402],"nvgt;":[62,8402],"nvinfin;":10718,"nvlArr;":10498,"nvle;":[8804,8402],"nvlt;":[60,8402],"nvltrie;":[8884,8402],"nvrArr;":10499,"nvrtrie;":[8885,8402],"nvsim;":[8764,8402],"nwArr;":8662,"nwarhk;":10531,"nwarr;":8598,"nwarrow;":8598,"nwnear;":10535,"oS;":9416,oacute:243,"oacute;":243,"oast;":8859,"ocir;":8858,ocirc:244,"ocirc;":244,"ocy;":1086,"odash;":8861,"odblac;":337,"odiv;":10808,"odot;":8857,"odsold;":10684,"oelig;":339,"ofcir;":10687,"ofr;":[55349,56620],"ogon;":731,ograve:242,"ograve;":242,"ogt;":10689,"ohbar;":10677,"ohm;":937,"oint;":8750,"olarr;":8634,"olcir;":10686,"olcross;":10683,"oline;":8254,"olt;":10688,"omacr;":333,"omega;":969,"omicron;":959,"omid;":10678,"ominus;":8854,"oopf;":[55349,56672],"opar;":10679,"operp;":10681,"oplus;":8853,"or;":8744,"orarr;":8635,"ord;":10845,"order;":8500,"orderof;":8500,ordf:170,"ordf;":170,ordm:186,"ordm;":186,"origof;":8886,"oror;":10838,"orslope;":10839,"orv;":10843,"oscr;":8500,oslash:248,"oslash;":248,"osol;":8856,otilde:245,"otilde;":245,"otimes;":8855,"otimesas;":10806,ouml:246,"ouml;":246,"ovbar;":9021,"par;":8741,para:182,"para;":182,"parallel;":8741,"parsim;":10995,"parsl;":11005,"part;":8706,"pcy;":1087,"percnt;":37,"period;":46,"permil;":8240,"perp;":8869,"pertenk;":8241,"pfr;":[55349,56621],"phi;":966,"phiv;":981,"phmmat;":8499,"phone;":9742,"pi;":960,"pitchfork;":8916,"piv;":982,"planck;":8463,"planckh;":8462,"plankv;":8463,"plus;":43,"plusacir;":10787,"plusb;":8862,"pluscir;":10786,"plusdo;":8724,"plusdu;":10789,"pluse;":10866,plusmn:177,"plusmn;":177,"plussim;":10790,"plustwo;":10791,"pm;":177,"pointint;":10773,"popf;":[55349,56673],pound:163,"pound;":163,"pr;":8826,"prE;":10931,"prap;":10935,"prcue;":8828,"pre;":10927,"prec;":8826,"precapprox;":10935,"preccurlyeq;":8828,"preceq;":10927,"precnapprox;":10937,"precneqq;":10933,"precnsim;":8936,"precsim;":8830,"prime;":8242,"primes;":8473,"prnE;":10933,"prnap;":10937,"prnsim;":8936,"prod;":8719,"profalar;":9006,"profline;":8978,"profsurf;":8979,"prop;":8733,"propto;":8733,"prsim;":8830,"prurel;":8880,"pscr;":[55349,56517],"psi;":968,"puncsp;":8200,"qfr;":[55349,56622],"qint;":10764,"qopf;":[55349,56674],"qprime;":8279,"qscr;":[55349,56518],"quaternions;":8461,"quatint;":10774,"quest;":63,"questeq;":8799,quot:34,"quot;":34,"rAarr;":8667,"rArr;":8658,"rAtail;":10524,"rBarr;":10511,"rHar;":10596,"race;":[8765,817],"racute;":341,"radic;":8730,"raemptyv;":10675,"rang;":10217,"rangd;":10642,"range;":10661,"rangle;":10217,raquo:187,"raquo;":187,"rarr;":8594,"rarrap;":10613,"rarrb;":8677,"rarrbfs;":10528,"rarrc;":10547,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrsim;":10612,"rarrtl;":8611,"rarrw;":8605,"ratail;":10522,"ratio;":8758,"rationals;":8474,"rbarr;":10509,"rbbrk;":10099,"rbrace;":125,"rbrack;":93,"rbrke;":10636,"rbrksld;":10638,"rbrkslu;":10640,"rcaron;":345,"rcedil;":343,"rceil;":8969,"rcub;":125,"rcy;":1088,"rdca;":10551,"rdldhar;":10601,"rdquo;":8221,"rdquor;":8221,"rdsh;":8627,"real;":8476,"realine;":8475,"realpart;":8476,"reals;":8477,"rect;":9645,reg:174,"reg;":174,"rfisht;":10621,"rfloor;":8971,"rfr;":[55349,56623],"rhard;":8641,"rharu;":8640,"rharul;":10604,"rho;":961,"rhov;":1009,"rightarrow;":8594,"rightarrowtail;":8611,"rightharpoondown;":8641,"rightharpoonup;":8640,"rightleftarrows;":8644,"rightleftharpoons;":8652,"rightrightarrows;":8649,"rightsquigarrow;":8605,"rightthreetimes;":8908,"ring;":730,"risingdotseq;":8787,"rlarr;":8644,"rlhar;":8652,"rlm;":8207,"rmoust;":9137,"rmoustache;":9137,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"ropf;":[55349,56675],"roplus;":10798,"rotimes;":10805,"rpar;":41,"rpargt;":10644,"rppolint;":10770,"rrarr;":8649,"rsaquo;":8250,"rscr;":[55349,56519],"rsh;":8625,"rsqb;":93,"rsquo;":8217,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"rtri;":9657,"rtrie;":8885,"rtrif;":9656,"rtriltri;":10702,"ruluhar;":10600,"rx;":8478,"sacute;":347,"sbquo;":8218,"sc;":8827,"scE;":10932,"scap;":10936,"scaron;":353,"sccue;":8829,"sce;":10928,"scedil;":351,"scirc;":349,"scnE;":10934,"scnap;":10938,"scnsim;":8937,"scpolint;":10771,"scsim;":8831,"scy;":1089,"sdot;":8901,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searhk;":10533,"searr;":8600,"searrow;":8600,sect:167,"sect;":167,"semi;":59,"seswar;":10537,"setminus;":8726,"setmn;":8726,"sext;":10038,"sfr;":[55349,56624],"sfrown;":8994,"sharp;":9839,"shchcy;":1097,"shcy;":1096,"shortmid;":8739,"shortparallel;":8741,shy:173,"shy;":173,"sigma;":963,"sigmaf;":962,"sigmav;":962,"sim;":8764,"simdot;":10858,"sime;":8771,"simeq;":8771,"simg;":10910,"simgE;":10912,"siml;":10909,"simlE;":10911,"simne;":8774,"simplus;":10788,"simrarr;":10610,"slarr;":8592,"smallsetminus;":8726,"smashp;":10803,"smeparsl;":10724,"smid;":8739,"smile;":8995,"smt;":10922,"smte;":10924,"smtes;":[10924,65024],"softcy;":1100,"sol;":47,"solb;":10692,"solbar;":9023,"sopf;":[55349,56676],"spades;":9824,"spadesuit;":9824,"spar;":8741,"sqcap;":8851,"sqcaps;":[8851,65024],"sqcup;":8852,"sqcups;":[8852,65024],"sqsub;":8847,"sqsube;":8849,"sqsubset;":8847,"sqsubseteq;":8849,"sqsup;":8848,"sqsupe;":8850,"sqsupset;":8848,"sqsupseteq;":8850,"squ;":9633,"square;":9633,"squarf;":9642,"squf;":9642,"srarr;":8594,"sscr;":[55349,56520],"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"star;":9734,"starf;":9733,"straightepsilon;":1013,"straightphi;":981,"strns;":175,"sub;":8834,"subE;":10949,"subdot;":10941,"sube;":8838,"subedot;":10947,"submult;":10945,"subnE;":10955,"subne;":8842,"subplus;":10943,"subrarr;":10617,"subset;":8834,"subseteq;":8838,"subseteqq;":10949,"subsetneq;":8842,"subsetneqq;":10955,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succ;":8827,"succapprox;":10936,"succcurlyeq;":8829,"succeq;":10928,"succnapprox;":10938,"succneqq;":10934,"succnsim;":8937,"succsim;":8831,"sum;":8721,"sung;":9834,sup1:185,"sup1;":185,sup2:178,"sup2;":178,sup3:179,"sup3;":179,"sup;":8835,"supE;":10950,"supdot;":10942,"supdsub;":10968,"supe;":8839,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supnE;":10956,"supne;":8843,"supplus;":10944,"supset;":8835,"supseteq;":8839,"supseteqq;":10950,"supsetneq;":8843,"supsetneqq;":10956,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swArr;":8665,"swarhk;":10534,"swarr;":8601,"swarrow;":8601,"swnwar;":10538,szlig:223,"szlig;":223,"target;":8982,"tau;":964,"tbrk;":9140,"tcaron;":357,"tcedil;":355,"tcy;":1090,"tdot;":8411,"telrec;":8981,"tfr;":[55349,56625],"there4;":8756,"therefore;":8756,"theta;":952,"thetasym;":977,"thetav;":977,"thickapprox;":8776,"thicksim;":8764,"thinsp;":8201,"thkap;":8776,"thksim;":8764,thorn:254,"thorn;":254,"tilde;":732,times:215,"times;":215,"timesb;":8864,"timesbar;":10801,"timesd;":10800,"tint;":8749,"toea;":10536,"top;":8868,"topbot;":9014,"topcir;":10993,"topf;":[55349,56677],"topfork;":10970,"tosa;":10537,"tprime;":8244,"trade;":8482,"triangle;":9653,"triangledown;":9663,"triangleleft;":9667,"trianglelefteq;":8884,"triangleq;":8796,"triangleright;":9657,"trianglerighteq;":8885,"tridot;":9708,"trie;":8796,"triminus;":10810,"triplus;":10809,"trisb;":10701,"tritime;":10811,"trpezium;":9186,"tscr;":[55349,56521],"tscy;":1094,"tshcy;":1115,"tstrok;":359,"twixt;":8812,"twoheadleftarrow;":8606,"twoheadrightarrow;":8608,"uArr;":8657,"uHar;":10595,uacute:250,"uacute;":250,"uarr;":8593,"ubrcy;":1118,"ubreve;":365,ucirc:251,"ucirc;":251,"ucy;":1091,"udarr;":8645,"udblac;":369,"udhar;":10606,"ufisht;":10622,"ufr;":[55349,56626],ugrave:249,"ugrave;":249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ulcorn;":8988,"ulcorner;":8988,"ulcrop;":8975,"ultri;":9720,"umacr;":363,uml:168,"uml;":168,"uogon;":371,"uopf;":[55349,56678],"uparrow;":8593,"updownarrow;":8597,"upharpoonleft;":8639,"upharpoonright;":8638,"uplus;":8846,"upsi;":965,"upsih;":978,"upsilon;":965,"upuparrows;":8648,"urcorn;":8989,"urcorner;":8989,"urcrop;":8974,"uring;":367,"urtri;":9721,"uscr;":[55349,56522],"utdot;":8944,"utilde;":361,"utri;":9653,"utrif;":9652,"uuarr;":8648,uuml:252,"uuml;":252,"uwangle;":10663,"vArr;":8661,"vBar;":10984,"vBarv;":10985,"vDash;":8872,"vangrt;":10652,"varepsilon;":1013,"varkappa;":1008,"varnothing;":8709,"varphi;":981,"varpi;":982,"varpropto;":8733,"varr;":8597,"varrho;":1009,"varsigma;":962,"varsubsetneq;":[8842,65024],"varsubsetneqq;":[10955,65024],"varsupsetneq;":[8843,65024],"varsupsetneqq;":[10956,65024],"vartheta;":977,"vartriangleleft;":8882,"vartriangleright;":8883,"vcy;":1074,"vdash;":8866,"vee;":8744,"veebar;":8891,"veeeq;":8794,"vellip;":8942,"verbar;":124,"vert;":124,"vfr;":[55349,56627],"vltri;":8882,"vnsub;":[8834,8402],"vnsup;":[8835,8402],"vopf;":[55349,56679],"vprop;":8733,"vrtri;":8883,"vscr;":[55349,56523],"vsubnE;":[10955,65024],"vsubne;":[8842,65024],"vsupnE;":[10956,65024],"vsupne;":[8843,65024],"vzigzag;":10650,"wcirc;":373,"wedbar;":10847,"wedge;":8743,"wedgeq;":8793,"weierp;":8472,"wfr;":[55349,56628],"wopf;":[55349,56680],"wp;":8472,"wr;":8768,"wreath;":8768,"wscr;":[55349,56524],"xcap;":8898,"xcirc;":9711,"xcup;":8899,"xdtri;":9661,"xfr;":[55349,56629],"xhArr;":10234,"xharr;":10231,"xi;":958,"xlArr;":10232,"xlarr;":10229,"xmap;":10236,"xnis;":8955,"xodot;":10752,"xopf;":[55349,56681],"xoplus;":10753,"xotime;":10754,"xrArr;":10233,"xrarr;":10230,"xscr;":[55349,56525],"xsqcup;":10758,"xuplus;":10756,"xutri;":9651,"xvee;":8897,"xwedge;":8896,yacute:253,"yacute;":253,"yacy;":1103,"ycirc;":375,"ycy;":1099,yen:165,"yen;":165,"yfr;":[55349,56630],"yicy;":1111,"yopf;":[55349,56682],"yscr;":[55349,56526],"yucy;":1102,yuml:255,"yuml;":255,"zacute;":378,"zcaron;":382,"zcy;":1079,"zdot;":380,"zeetrf;":8488,"zeta;":950,"zfr;":[55349,56631],"zhcy;":1078,"zigrarr;":8669,"zopf;":[55349,56683],"zscr;":[55349,56527],"zwj;":8205,"zwnj;":8204},wj=/(A(?:Elig;?|MP;?|acute;?|breve;|c(?:irc;?|y;)|fr;|grave;?|lpha;|macr;|nd;|o(?:gon;|pf;)|pplyFunction;|ring;?|s(?:cr;|sign;)|tilde;?|uml;?)|B(?:a(?:ckslash;|r(?:v;|wed;))|cy;|e(?:cause;|rnoullis;|ta;)|fr;|opf;|reve;|scr;|umpeq;)|C(?:Hcy;|OPY;?|a(?:cute;|p(?:;|italDifferentialD;)|yleys;)|c(?:aron;|edil;?|irc;|onint;)|dot;|e(?:dilla;|nterDot;)|fr;|hi;|ircle(?:Dot;|Minus;|Plus;|Times;)|lo(?:ckwiseContourIntegral;|seCurly(?:DoubleQuote;|Quote;))|o(?:lon(?:;|e;)|n(?:gruent;|int;|tourIntegral;)|p(?:f;|roduct;)|unterClockwiseContourIntegral;)|ross;|scr;|up(?:;|Cap;))|D(?:D(?:;|otrahd;)|Jcy;|Scy;|Zcy;|a(?:gger;|rr;|shv;)|c(?:aron;|y;)|el(?:;|ta;)|fr;|i(?:a(?:critical(?:Acute;|Do(?:t;|ubleAcute;)|Grave;|Tilde;)|mond;)|fferentialD;)|o(?:pf;|t(?:;|Dot;|Equal;)|uble(?:ContourIntegral;|Do(?:t;|wnArrow;)|L(?:eft(?:Arrow;|RightArrow;|Tee;)|ong(?:Left(?:Arrow;|RightArrow;)|RightArrow;))|Right(?:Arrow;|Tee;)|Up(?:Arrow;|DownArrow;)|VerticalBar;)|wn(?:Arrow(?:;|Bar;|UpArrow;)|Breve;|Left(?:RightVector;|TeeVector;|Vector(?:;|Bar;))|Right(?:TeeVector;|Vector(?:;|Bar;))|Tee(?:;|Arrow;)|arrow;))|s(?:cr;|trok;))|E(?:NG;|TH;?|acute;?|c(?:aron;|irc;?|y;)|dot;|fr;|grave;?|lement;|m(?:acr;|pty(?:SmallSquare;|VerySmallSquare;))|o(?:gon;|pf;)|psilon;|qu(?:al(?:;|Tilde;)|ilibrium;)|s(?:cr;|im;)|ta;|uml;?|x(?:ists;|ponentialE;))|F(?:cy;|fr;|illed(?:SmallSquare;|VerySmallSquare;)|o(?:pf;|rAll;|uriertrf;)|scr;)|G(?:Jcy;|T;?|amma(?:;|d;)|breve;|c(?:edil;|irc;|y;)|dot;|fr;|g;|opf;|reater(?:Equal(?:;|Less;)|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|scr;|t;)|H(?:ARDcy;|a(?:cek;|t;)|circ;|fr;|ilbertSpace;|o(?:pf;|rizontalLine;)|s(?:cr;|trok;)|ump(?:DownHump;|Equal;))|I(?:Ecy;|Jlig;|Ocy;|acute;?|c(?:irc;?|y;)|dot;|fr;|grave;?|m(?:;|a(?:cr;|ginaryI;)|plies;)|n(?:t(?:;|e(?:gral;|rsection;))|visible(?:Comma;|Times;))|o(?:gon;|pf;|ta;)|scr;|tilde;|u(?:kcy;|ml;?))|J(?:c(?:irc;|y;)|fr;|opf;|s(?:cr;|ercy;)|ukcy;)|K(?:Hcy;|Jcy;|appa;|c(?:edil;|y;)|fr;|opf;|scr;)|L(?:Jcy;|T;?|a(?:cute;|mbda;|ng;|placetrf;|rr;)|c(?:aron;|edil;|y;)|e(?:ft(?:A(?:ngleBracket;|rrow(?:;|Bar;|RightArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|Right(?:Arrow;|Vector;)|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;|rightarrow;)|ss(?:EqualGreater;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;))|fr;|l(?:;|eftarrow;)|midot;|o(?:ng(?:Left(?:Arrow;|RightArrow;)|RightArrow;|left(?:arrow;|rightarrow;)|rightarrow;)|pf;|wer(?:LeftArrow;|RightArrow;))|s(?:cr;|h;|trok;)|t;)|M(?:ap;|cy;|e(?:diumSpace;|llintrf;)|fr;|inusPlus;|opf;|scr;|u;)|N(?:Jcy;|acute;|c(?:aron;|edil;|y;)|e(?:gative(?:MediumSpace;|Thi(?:ckSpace;|nSpace;)|VeryThinSpace;)|sted(?:GreaterGreater;|LessLess;)|wLine;)|fr;|o(?:Break;|nBreakingSpace;|pf;|t(?:;|C(?:ongruent;|upCap;)|DoubleVerticalBar;|E(?:lement;|qual(?:;|Tilde;)|xists;)|Greater(?:;|Equal;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|Hump(?:DownHump;|Equal;)|Le(?:ftTriangle(?:;|Bar;|Equal;)|ss(?:;|Equal;|Greater;|Less;|SlantEqual;|Tilde;))|Nested(?:GreaterGreater;|LessLess;)|Precedes(?:;|Equal;|SlantEqual;)|R(?:everseElement;|ightTriangle(?:;|Bar;|Equal;))|S(?:quareSu(?:bset(?:;|Equal;)|perset(?:;|Equal;))|u(?:bset(?:;|Equal;)|cceeds(?:;|Equal;|SlantEqual;|Tilde;)|perset(?:;|Equal;)))|Tilde(?:;|Equal;|FullEqual;|Tilde;)|VerticalBar;))|scr;|tilde;?|u;)|O(?:Elig;|acute;?|c(?:irc;?|y;)|dblac;|fr;|grave;?|m(?:acr;|ega;|icron;)|opf;|penCurly(?:DoubleQuote;|Quote;)|r;|s(?:cr;|lash;?)|ti(?:lde;?|mes;)|uml;?|ver(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;))|P(?:artialD;|cy;|fr;|hi;|i;|lusMinus;|o(?:incareplane;|pf;)|r(?:;|ecedes(?:;|Equal;|SlantEqual;|Tilde;)|ime;|o(?:duct;|portion(?:;|al;)))|s(?:cr;|i;))|Q(?:UOT;?|fr;|opf;|scr;)|R(?:Barr;|EG;?|a(?:cute;|ng;|rr(?:;|tl;))|c(?:aron;|edil;|y;)|e(?:;|verse(?:E(?:lement;|quilibrium;)|UpEquilibrium;))|fr;|ho;|ight(?:A(?:ngleBracket;|rrow(?:;|Bar;|LeftArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;)|o(?:pf;|undImplies;)|rightarrow;|s(?:cr;|h;)|uleDelayed;)|S(?:H(?:CHcy;|cy;)|OFTcy;|acute;|c(?:;|aron;|edil;|irc;|y;)|fr;|hort(?:DownArrow;|LeftArrow;|RightArrow;|UpArrow;)|igma;|mallCircle;|opf;|q(?:rt;|uare(?:;|Intersection;|Su(?:bset(?:;|Equal;)|perset(?:;|Equal;))|Union;))|scr;|tar;|u(?:b(?:;|set(?:;|Equal;))|c(?:ceeds(?:;|Equal;|SlantEqual;|Tilde;)|hThat;)|m;|p(?:;|erset(?:;|Equal;)|set;)))|T(?:HORN;?|RADE;|S(?:Hcy;|cy;)|a(?:b;|u;)|c(?:aron;|edil;|y;)|fr;|h(?:e(?:refore;|ta;)|i(?:ckSpace;|nSpace;))|ilde(?:;|Equal;|FullEqual;|Tilde;)|opf;|ripleDot;|s(?:cr;|trok;))|U(?:a(?:cute;?|rr(?:;|ocir;))|br(?:cy;|eve;)|c(?:irc;?|y;)|dblac;|fr;|grave;?|macr;|n(?:der(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;)|ion(?:;|Plus;))|o(?:gon;|pf;)|p(?:Arrow(?:;|Bar;|DownArrow;)|DownArrow;|Equilibrium;|Tee(?:;|Arrow;)|arrow;|downarrow;|per(?:LeftArrow;|RightArrow;)|si(?:;|lon;))|ring;|scr;|tilde;|uml;?)|V(?:Dash;|bar;|cy;|dash(?:;|l;)|e(?:e;|r(?:bar;|t(?:;|ical(?:Bar;|Line;|Separator;|Tilde;))|yThinSpace;))|fr;|opf;|scr;|vdash;)|W(?:circ;|edge;|fr;|opf;|scr;)|X(?:fr;|i;|opf;|scr;)|Y(?:Acy;|Icy;|Ucy;|acute;?|c(?:irc;|y;)|fr;|opf;|scr;|uml;)|Z(?:Hcy;|acute;|c(?:aron;|y;)|dot;|e(?:roWidthSpace;|ta;)|fr;|opf;|scr;)|a(?:acute;?|breve;|c(?:;|E;|d;|irc;?|ute;?|y;)|elig;?|f(?:;|r;)|grave;?|l(?:e(?:fsym;|ph;)|pha;)|m(?:a(?:cr;|lg;)|p;?)|n(?:d(?:;|and;|d;|slope;|v;)|g(?:;|e;|le;|msd(?:;|a(?:a;|b;|c;|d;|e;|f;|g;|h;))|rt(?:;|vb(?:;|d;))|s(?:ph;|t;)|zarr;))|o(?:gon;|pf;)|p(?:;|E;|acir;|e;|id;|os;|prox(?:;|eq;))|ring;?|s(?:cr;|t;|ymp(?:;|eq;))|tilde;?|uml;?|w(?:conint;|int;))|b(?:Not;|a(?:ck(?:cong;|epsilon;|prime;|sim(?:;|eq;))|r(?:vee;|wed(?:;|ge;)))|brk(?:;|tbrk;)|c(?:ong;|y;)|dquo;|e(?:caus(?:;|e;)|mptyv;|psi;|rnou;|t(?:a;|h;|ween;))|fr;|ig(?:c(?:ap;|irc;|up;)|o(?:dot;|plus;|times;)|s(?:qcup;|tar;)|triangle(?:down;|up;)|uplus;|vee;|wedge;)|karow;|l(?:a(?:ck(?:lozenge;|square;|triangle(?:;|down;|left;|right;))|nk;)|k(?:1(?:2;|4;)|34;)|ock;)|n(?:e(?:;|quiv;)|ot;)|o(?:pf;|t(?:;|tom;)|wtie;|x(?:D(?:L;|R;|l;|r;)|H(?:;|D;|U;|d;|u;)|U(?:L;|R;|l;|r;)|V(?:;|H;|L;|R;|h;|l;|r;)|box;|d(?:L;|R;|l;|r;)|h(?:;|D;|U;|d;|u;)|minus;|plus;|times;|u(?:L;|R;|l;|r;)|v(?:;|H;|L;|R;|h;|l;|r;)))|prime;|r(?:eve;|vbar;?)|s(?:cr;|emi;|im(?:;|e;)|ol(?:;|b;|hsub;))|u(?:ll(?:;|et;)|mp(?:;|E;|e(?:;|q;))))|c(?:a(?:cute;|p(?:;|and;|brcup;|c(?:ap;|up;)|dot;|s;)|r(?:et;|on;))|c(?:a(?:ps;|ron;)|edil;?|irc;|ups(?:;|sm;))|dot;|e(?:dil;?|mptyv;|nt(?:;|erdot;|))|fr;|h(?:cy;|eck(?:;|mark;)|i;)|ir(?:;|E;|c(?:;|eq;|le(?:arrow(?:left;|right;)|d(?:R;|S;|ast;|circ;|dash;)))|e;|fnint;|mid;|scir;)|lubs(?:;|uit;)|o(?:lon(?:;|e(?:;|q;))|m(?:ma(?:;|t;)|p(?:;|fn;|le(?:ment;|xes;)))|n(?:g(?:;|dot;)|int;)|p(?:f;|rod;|y(?:;|sr;|)))|r(?:arr;|oss;)|s(?:cr;|u(?:b(?:;|e;)|p(?:;|e;)))|tdot;|u(?:darr(?:l;|r;)|e(?:pr;|sc;)|larr(?:;|p;)|p(?:;|brcap;|c(?:ap;|up;)|dot;|or;|s;)|r(?:arr(?:;|m;)|ly(?:eq(?:prec;|succ;)|vee;|wedge;)|ren;?|vearrow(?:left;|right;))|vee;|wed;)|w(?:conint;|int;)|ylcty;)|d(?:Arr;|Har;|a(?:gger;|leth;|rr;|sh(?:;|v;))|b(?:karow;|lac;)|c(?:aron;|y;)|d(?:;|a(?:gger;|rr;)|otseq;)|e(?:g;?|lta;|mptyv;)|f(?:isht;|r;)|har(?:l;|r;)|i(?:am(?:;|ond(?:;|suit;)|s;)|e;|gamma;|sin;|v(?:;|ide(?:;|ontimes;|)|onx;))|jcy;|lc(?:orn;|rop;)|o(?:llar;|pf;|t(?:;|eq(?:;|dot;)|minus;|plus;|square;)|ublebarwedge;|wn(?:arrow;|downarrows;|harpoon(?:left;|right;)))|r(?:bkarow;|c(?:orn;|rop;))|s(?:c(?:r;|y;)|ol;|trok;)|t(?:dot;|ri(?:;|f;))|u(?:arr;|har;)|wangle;|z(?:cy;|igrarr;))|e(?:D(?:Dot;|ot;)|a(?:cute;?|ster;)|c(?:aron;|ir(?:;|c;?)|olon;|y;)|dot;|e;|f(?:Dot;|r;)|g(?:;|rave;?|s(?:;|dot;))|l(?:;|inters;|l;|s(?:;|dot;))|m(?:acr;|pty(?:;|set;|v;)|sp(?:1(?:3;|4;)|;))|n(?:g;|sp;)|o(?:gon;|pf;)|p(?:ar(?:;|sl;)|lus;|si(?:;|lon;|v;))|q(?:c(?:irc;|olon;)|s(?:im;|lant(?:gtr;|less;))|u(?:als;|est;|iv(?:;|DD;))|vparsl;)|r(?:Dot;|arr;)|s(?:cr;|dot;|im;)|t(?:a;|h;?)|u(?:ml;?|ro;)|x(?:cl;|ist;|p(?:ectation;|onentiale;)))|f(?:allingdotseq;|cy;|emale;|f(?:ilig;|l(?:ig;|lig;)|r;)|ilig;|jlig;|l(?:at;|lig;|tns;)|nof;|o(?:pf;|r(?:all;|k(?:;|v;)))|partint;|r(?:a(?:c(?:1(?:2;?|3;|4;?|5;|6;|8;)|2(?:3;|5;)|3(?:4;?|5;|8;)|45;|5(?:6;|8;)|78;)|sl;)|own;)|scr;)|g(?:E(?:;|l;)|a(?:cute;|mma(?:;|d;)|p;)|breve;|c(?:irc;|y;)|dot;|e(?:;|l;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|l;))|l(?:;|es;)))|fr;|g(?:;|g;)|imel;|jcy;|l(?:;|E;|a;|j;)|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|opf;|rave;|s(?:cr;|im(?:;|e;|l;))|t(?:;|c(?:c;|ir;)|dot;|lPar;|quest;|r(?:a(?:pprox;|rr;)|dot;|eq(?:less;|qless;)|less;|sim;)|)|v(?:ertneqq;|nE;))|h(?:Arr;|a(?:irsp;|lf;|milt;|r(?:dcy;|r(?:;|cir;|w;)))|bar;|circ;|e(?:arts(?:;|uit;)|llip;|rcon;)|fr;|ks(?:earow;|warow;)|o(?:arr;|mtht;|ok(?:leftarrow;|rightarrow;)|pf;|rbar;)|s(?:cr;|lash;|trok;)|y(?:bull;|phen;))|i(?:acute;?|c(?:;|irc;?|y;)|e(?:cy;|xcl;?)|f(?:f;|r;)|grave;?|i(?:;|i(?:int;|nt;)|nfin;|ota;)|jlig;|m(?:a(?:cr;|g(?:e;|line;|part;)|th;)|of;|ped;)|n(?:;|care;|fin(?:;|tie;)|odot;|t(?:;|cal;|e(?:gers;|rcal;)|larhk;|prod;))|o(?:cy;|gon;|pf;|ta;)|prod;|quest;?|s(?:cr;|in(?:;|E;|dot;|s(?:;|v;)|v;))|t(?:;|ilde;)|u(?:kcy;|ml;?))|j(?:c(?:irc;|y;)|fr;|math;|opf;|s(?:cr;|ercy;)|ukcy;)|k(?:appa(?:;|v;)|c(?:edil;|y;)|fr;|green;|hcy;|jcy;|opf;|scr;)|l(?:A(?:arr;|rr;|tail;)|Barr;|E(?:;|g;)|Har;|a(?:cute;|emptyv;|gran;|mbda;|ng(?:;|d;|le;)|p;|quo;?|rr(?:;|b(?:;|fs;)|fs;|hk;|lp;|pl;|sim;|tl;)|t(?:;|ail;|e(?:;|s;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|quo(?:;|r;)|r(?:dhar;|ushar;)|sh;)|e(?:;|ft(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|leftarrows;|right(?:arrow(?:;|s;)|harpoons;|squigarrow;)|threetimes;)|g;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|r;))|g(?:;|es;)|s(?:approx;|dot;|eq(?:gtr;|qgtr;)|gtr;|sim;)))|f(?:isht;|loor;|r;)|g(?:;|E;)|h(?:ar(?:d;|u(?:;|l;))|blk;)|jcy;|l(?:;|arr;|corner;|hard;|tri;)|m(?:idot;|oust(?:;|ache;))|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|o(?:a(?:ng;|rr;)|brk;|ng(?:left(?:arrow;|rightarrow;)|mapsto;|rightarrow;)|oparrow(?:left;|right;)|p(?:ar;|f;|lus;)|times;|w(?:ast;|bar;)|z(?:;|enge;|f;))|par(?:;|lt;)|r(?:arr;|corner;|har(?:;|d;)|m;|tri;)|s(?:aquo;|cr;|h;|im(?:;|e;|g;)|q(?:b;|uo(?:;|r;))|trok;)|t(?:;|c(?:c;|ir;)|dot;|hree;|imes;|larr;|quest;|r(?:Par;|i(?:;|e;|f;))|)|ur(?:dshar;|uhar;)|v(?:ertneqq;|nE;))|m(?:DDot;|a(?:cr;?|l(?:e;|t(?:;|ese;))|p(?:;|sto(?:;|down;|left;|up;))|rker;)|c(?:omma;|y;)|dash;|easuredangle;|fr;|ho;|i(?:cro;?|d(?:;|ast;|cir;|dot;?)|nus(?:;|b;|d(?:;|u;)))|l(?:cp;|dr;)|nplus;|o(?:dels;|pf;)|p;|s(?:cr;|tpos;)|u(?:;|ltimap;|map;))|n(?:G(?:g;|t(?:;|v;))|L(?:eft(?:arrow;|rightarrow;)|l;|t(?:;|v;))|Rightarrow;|V(?:Dash;|dash;)|a(?:bla;|cute;|ng;|p(?:;|E;|id;|os;|prox;)|tur(?:;|al(?:;|s;)))|b(?:sp;?|ump(?:;|e;))|c(?:a(?:p;|ron;)|edil;|ong(?:;|dot;)|up;|y;)|dash;|e(?:;|Arr;|ar(?:hk;|r(?:;|ow;))|dot;|quiv;|s(?:ear;|im;)|xist(?:;|s;))|fr;|g(?:E;|e(?:;|q(?:;|q;|slant;)|s;)|sim;|t(?:;|r;))|h(?:Arr;|arr;|par;)|i(?:;|s(?:;|d;)|v;)|jcy;|l(?:Arr;|E;|arr;|dr;|e(?:;|ft(?:arrow;|rightarrow;)|q(?:;|q;|slant;)|s(?:;|s;))|sim;|t(?:;|ri(?:;|e;)))|mid;|o(?:pf;|t(?:;|in(?:;|E;|dot;|v(?:a;|b;|c;))|ni(?:;|v(?:a;|b;|c;))|))|p(?:ar(?:;|allel;|sl;|t;)|olint;|r(?:;|cue;|e(?:;|c(?:;|eq;))))|r(?:Arr;|arr(?:;|c;|w;)|ightarrow;|tri(?:;|e;))|s(?:c(?:;|cue;|e;|r;)|hort(?:mid;|parallel;)|im(?:;|e(?:;|q;))|mid;|par;|qsu(?:be;|pe;)|u(?:b(?:;|E;|e;|set(?:;|eq(?:;|q;)))|cc(?:;|eq;)|p(?:;|E;|e;|set(?:;|eq(?:;|q;)))))|t(?:gl;|ilde;?|lg;|riangle(?:left(?:;|eq;)|right(?:;|eq;)))|u(?:;|m(?:;|ero;|sp;))|v(?:Dash;|Harr;|ap;|dash;|g(?:e;|t;)|infin;|l(?:Arr;|e;|t(?:;|rie;))|r(?:Arr;|trie;)|sim;)|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|near;))|o(?:S;|a(?:cute;?|st;)|c(?:ir(?:;|c;?)|y;)|d(?:ash;|blac;|iv;|ot;|sold;)|elig;|f(?:cir;|r;)|g(?:on;|rave;?|t;)|h(?:bar;|m;)|int;|l(?:arr;|c(?:ir;|ross;)|ine;|t;)|m(?:acr;|ega;|i(?:cron;|d;|nus;))|opf;|p(?:ar;|erp;|lus;)|r(?:;|arr;|d(?:;|er(?:;|of;)|f;?|m;?)|igof;|or;|slope;|v;)|s(?:cr;|lash;?|ol;)|ti(?:lde;?|mes(?:;|as;))|uml;?|vbar;)|p(?:ar(?:;|a(?:;|llel;|)|s(?:im;|l;)|t;)|cy;|er(?:cnt;|iod;|mil;|p;|tenk;)|fr;|h(?:i(?:;|v;)|mmat;|one;)|i(?:;|tchfork;|v;)|l(?:an(?:ck(?:;|h;)|kv;)|us(?:;|acir;|b;|cir;|d(?:o;|u;)|e;|mn;?|sim;|two;))|m;|o(?:intint;|pf;|und;?)|r(?:;|E;|ap;|cue;|e(?:;|c(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;))|ime(?:;|s;)|n(?:E;|ap;|sim;)|o(?:d;|f(?:alar;|line;|surf;)|p(?:;|to;))|sim;|urel;)|s(?:cr;|i;)|uncsp;)|q(?:fr;|int;|opf;|prime;|scr;|u(?:at(?:ernions;|int;)|est(?:;|eq;)|ot;?))|r(?:A(?:arr;|rr;|tail;)|Barr;|Har;|a(?:c(?:e;|ute;)|dic;|emptyv;|ng(?:;|d;|e;|le;)|quo;?|rr(?:;|ap;|b(?:;|fs;)|c;|fs;|hk;|lp;|pl;|sim;|tl;|w;)|t(?:ail;|io(?:;|nals;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|ldhar;|quo(?:;|r;)|sh;)|e(?:al(?:;|ine;|part;|s;)|ct;|g;?)|f(?:isht;|loor;|r;)|h(?:ar(?:d;|u(?:;|l;))|o(?:;|v;))|i(?:ght(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|left(?:arrows;|harpoons;)|rightarrows;|squigarrow;|threetimes;)|ng;|singdotseq;)|l(?:arr;|har;|m;)|moust(?:;|ache;)|nmid;|o(?:a(?:ng;|rr;)|brk;|p(?:ar;|f;|lus;)|times;)|p(?:ar(?:;|gt;)|polint;)|rarr;|s(?:aquo;|cr;|h;|q(?:b;|uo(?:;|r;)))|t(?:hree;|imes;|ri(?:;|e;|f;|ltri;))|uluhar;|x;)|s(?:acute;|bquo;|c(?:;|E;|a(?:p;|ron;)|cue;|e(?:;|dil;)|irc;|n(?:E;|ap;|sim;)|polint;|sim;|y;)|dot(?:;|b;|e;)|e(?:Arr;|ar(?:hk;|r(?:;|ow;))|ct;?|mi;|swar;|tm(?:inus;|n;)|xt;)|fr(?:;|own;)|h(?:arp;|c(?:hcy;|y;)|ort(?:mid;|parallel;)|y;?)|i(?:gma(?:;|f;|v;)|m(?:;|dot;|e(?:;|q;)|g(?:;|E;)|l(?:;|E;)|ne;|plus;|rarr;))|larr;|m(?:a(?:llsetminus;|shp;)|eparsl;|i(?:d;|le;)|t(?:;|e(?:;|s;)))|o(?:ftcy;|l(?:;|b(?:;|ar;))|pf;)|pa(?:des(?:;|uit;)|r;)|q(?:c(?:ap(?:;|s;)|up(?:;|s;))|su(?:b(?:;|e;|set(?:;|eq;))|p(?:;|e;|set(?:;|eq;)))|u(?:;|ar(?:e;|f;)|f;))|rarr;|s(?:cr;|etmn;|mile;|tarf;)|t(?:ar(?:;|f;)|r(?:aight(?:epsilon;|phi;)|ns;))|u(?:b(?:;|E;|dot;|e(?:;|dot;)|mult;|n(?:E;|e;)|plus;|rarr;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;)))|cc(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;)|m;|ng;|p(?:1;?|2;?|3;?|;|E;|d(?:ot;|sub;)|e(?:;|dot;)|hs(?:ol;|ub;)|larr;|mult;|n(?:E;|e;)|plus;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;))))|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|nwar;)|zlig;?)|t(?:a(?:rget;|u;)|brk;|c(?:aron;|edil;|y;)|dot;|elrec;|fr;|h(?:e(?:re(?:4;|fore;)|ta(?:;|sym;|v;))|i(?:ck(?:approx;|sim;)|nsp;)|k(?:ap;|sim;)|orn;?)|i(?:lde;|mes(?:;|b(?:;|ar;)|d;|)|nt;)|o(?:ea;|p(?:;|bot;|cir;|f(?:;|ork;))|sa;)|prime;|r(?:ade;|i(?:angle(?:;|down;|left(?:;|eq;)|q;|right(?:;|eq;))|dot;|e;|minus;|plus;|sb;|time;)|pezium;)|s(?:c(?:r;|y;)|hcy;|trok;)|w(?:ixt;|ohead(?:leftarrow;|rightarrow;)))|u(?:Arr;|Har;|a(?:cute;?|rr;)|br(?:cy;|eve;)|c(?:irc;?|y;)|d(?:arr;|blac;|har;)|f(?:isht;|r;)|grave;?|h(?:ar(?:l;|r;)|blk;)|l(?:c(?:orn(?:;|er;)|rop;)|tri;)|m(?:acr;|l;?)|o(?:gon;|pf;)|p(?:arrow;|downarrow;|harpoon(?:left;|right;)|lus;|si(?:;|h;|lon;)|uparrows;)|r(?:c(?:orn(?:;|er;)|rop;)|ing;|tri;)|scr;|t(?:dot;|ilde;|ri(?:;|f;))|u(?:arr;|ml;?)|wangle;)|v(?:Arr;|Bar(?:;|v;)|Dash;|a(?:ngrt;|r(?:epsilon;|kappa;|nothing;|p(?:hi;|i;|ropto;)|r(?:;|ho;)|s(?:igma;|u(?:bsetneq(?:;|q;)|psetneq(?:;|q;)))|t(?:heta;|riangle(?:left;|right;))))|cy;|dash;|e(?:e(?:;|bar;|eq;)|llip;|r(?:bar;|t;))|fr;|ltri;|nsu(?:b;|p;)|opf;|prop;|rtri;|s(?:cr;|u(?:bn(?:E;|e;)|pn(?:E;|e;)))|zigzag;)|w(?:circ;|e(?:d(?:bar;|ge(?:;|q;))|ierp;)|fr;|opf;|p;|r(?:;|eath;)|scr;)|x(?:c(?:ap;|irc;|up;)|dtri;|fr;|h(?:Arr;|arr;)|i;|l(?:Arr;|arr;)|map;|nis;|o(?:dot;|p(?:f;|lus;)|time;)|r(?:Arr;|arr;)|s(?:cr;|qcup;)|u(?:plus;|tri;)|vee;|wedge;)|y(?:ac(?:ute;?|y;)|c(?:irc;|y;)|en;?|fr;|icy;|opf;|scr;|u(?:cy;|ml;?))|z(?:acute;|c(?:aron;|y;)|dot;|e(?:etrf;|ta;)|fr;|hcy;|igrarr;|opf;|scr;|w(?:j;|nj;)))|[\s\S]/g,uP=32,dP=/[^\r"&\u0000]+/g,pP=/[^\r'&\u0000]+/g,cP=/[^\r\t\n\f &>\u0000]+/g,lP=/[^\r\t\n\f \/>A-Z\u0000]+/g,oP=/[^\r\t\n\f \/=>A-Z\u0000]+/g,rP=/[^\]\r\u0000\uffff]*/g,iP=/[^&<\r\u0000\uffff]*/g,Rj=/[^<\r\u0000\uffff]*/g,sP=/[^\r\u0000\uffff]*/g,Lj=/(?:(\/)?([a-z]+)>)|[\s\S]/g,Nj=/(?:([-a-z]+)[ \t\n\f]*=[ \t\n\f]*('[^'&\r\u0000]*'|"[^"&\r\u0000]*"|[^\t\n\r\f "&'\u0000>][^&> \t\n\r\f\u0000]*[ \t\n\f]))|[\s\S]/g,V6=/[^\x09\x0A\x0C\x0D\x20]/,Z3=/[^\x09\x0A\x0C\x0D\x20]/g,nP=/[^\x00\x09\x0A\x0C\x0D\x20]/,e2=/^[\x09\x0A\x0C\x0D\x20]+/,G6=/\x00/g;function N0($){var J=16384;if($.length<J)return String.fromCharCode.apply(String,$);var Z="";for(var Y=0;Y<$.length;Y+=J)Z+=String.fromCharCode.apply(String,$.slice(Y,Y+J));return Z}function aP($){var J=[];for(var Z=0;Z<$.length;Z++)J[Z]=$.charCodeAt(Z);return J}function d$($,J){if(typeof J==="string")return $.namespaceURI===X$.HTML&&$.localName===J;var Z=J[$.namespaceURI];return Z&&Z[$.localName]}function yj($){return d$($,uj)}function Tj($){if(d$($,dj))return!0;if($.namespaceURI===X$.MATHML&&$.localName==="annotation-xml"){var J=$.getAttribute("encoding");if(J)J=J.toLowerCase();if(J==="text/html"||J==="application/xhtml+xml")return!0}return!1}function tP($){if($ in Aj)return Aj[$];else return $}function kj($){for(var J=0,Z=$.length;J<Z;J++)if($[J][0]in Ij)$[J][0]=Ij[$[J][0]]}function Ej($){for(var J=0,Z=$.length;J<Z;J++)if($[J][0]==="definitionurl"){$[J][0]="definitionURL";break}}function Y3($){for(var J=0,Z=$.length;J<Z;J++)if($[J][0]in Pj)$[J].push(Pj[$[J][0]])}function xj($,J){for(var Z=0,Y=$.length;Z<Y;Z++){var K=$[Z][0],Q=$[Z][1];if(J.hasAttribute(K))continue;J._setAttribute(K,Q)}}b$.ElementStack=function(){this.elements=[],this.top=null};b$.ElementStack.prototype.push=function($){this.elements.push($),this.top=$};b$.ElementStack.prototype.pop=function($){this.elements.pop(),this.top=this.elements[this.elements.length-1]};b$.ElementStack.prototype.popTag=function($){for(var J=this.elements.length-1;J>0;J--){var Z=this.elements[J];if(d$(Z,$))break}this.elements.length=J,this.top=this.elements[J-1]};b$.ElementStack.prototype.popElementType=function($){for(var J=this.elements.length-1;J>0;J--)if(this.elements[J]instanceof $)break;this.elements.length=J,this.top=this.elements[J-1]};b$.ElementStack.prototype.popElement=function($){for(var J=this.elements.length-1;J>0;J--)if(this.elements[J]===$)break;this.elements.length=J,this.top=this.elements[J-1]};b$.ElementStack.prototype.removeElement=function($){if(this.top===$)this.pop();else{var J=this.elements.lastIndexOf($);if(J!==-1)this.elements.splice(J,1)}};b$.ElementStack.prototype.clearToContext=function($){for(var J=this.elements.length-1;J>0;J--)if(d$(this.elements[J],$))break;this.elements.length=J+1,this.top=this.elements[J]};b$.ElementStack.prototype.contains=function($){return this.inSpecificScope($,Object.create(null))};b$.ElementStack.prototype.inSpecificScope=function($,J){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(d$(Y,$))return!0;if(d$(Y,J))return!1}return!1};b$.ElementStack.prototype.elementInSpecificScope=function($,J){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(Y===$)return!0;if(d$(Y,J))return!1}return!1};b$.ElementStack.prototype.elementTypeInSpecificScope=function($,J){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(Y instanceof $)return!0;if(d$(Y,J))return!1}return!1};b$.ElementStack.prototype.inScope=function($){return this.inSpecificScope($,T1)};b$.ElementStack.prototype.elementInScope=function($){return this.elementInSpecificScope($,T1)};b$.ElementStack.prototype.elementTypeInScope=function($){return this.elementTypeInSpecificScope($,T1)};b$.ElementStack.prototype.inButtonScope=function($){return this.inSpecificScope($,V3)};b$.ElementStack.prototype.inListItemScope=function($){return this.inSpecificScope($,j6)};b$.ElementStack.prototype.inTableScope=function($){return this.inSpecificScope($,mj)};b$.ElementStack.prototype.inSelectScope=function($){for(var J=this.elements.length-1;J>=0;J--){var Z=this.elements[J];if(Z.namespaceURI!==X$.HTML)return!1;var Y=Z.localName;if(Y===$)return!0;if(Y!=="optgroup"&&Y!=="option")return!1}return!1};b$.ElementStack.prototype.generateImpliedEndTags=function($,J){var Z=J?gj:hj;for(var Y=this.elements.length-1;Y>=0;Y--){var K=this.elements[Y];if($&&d$(K,$))break;if(!d$(this.elements[Y],Z))break}this.elements.length=Y+1,this.top=this.elements[Y]};b$.ActiveFormattingElements=function(){this.list=[],this.attrs=[]};b$.ActiveFormattingElements.prototype.MARKER={localName:"|"};b$.ActiveFormattingElements.prototype.insertMarker=function(){this.list.push(this.MARKER),this.attrs.push(this.MARKER)};b$.ActiveFormattingElements.prototype.push=function($,J){var Z=0;for(var Y=this.list.length-1;Y>=0;Y--){if(this.list[Y]===this.MARKER)break;if(V($,this.list[Y],this.attrs[Y])){if(Z++,Z===3){this.list.splice(Y,1),this.attrs.splice(Y,1);break}}}this.list.push($);var K=[];for(var Q=0;Q<J.length;Q++)K[Q]=J[Q];this.attrs.push(K);function V(X,W,_){if(X.localName!==W.localName)return!1;if(X._numattrs!==_.length)return!1;for(var j=0,H=_.length;j<H;j++){var q=_[j][0],U=_[j][1];if(!X.hasAttribute(q))return!1;if(X.getAttribute(q)!==U)return!1}return!0}};b$.ActiveFormattingElements.prototype.clearToMarker=function(){for(var $=this.list.length-1;$>=0;$--)if(this.list[$]===this.MARKER)break;if($<0)$=0;this.list.length=$,this.attrs.length=$};b$.ActiveFormattingElements.prototype.findElementByTag=function($){for(var J=this.list.length-1;J>=0;J--){var Z=this.list[J];if(Z===this.MARKER)break;if(Z.localName===$)return Z}return null};b$.ActiveFormattingElements.prototype.indexOf=function($){return this.list.lastIndexOf($)};b$.ActiveFormattingElements.prototype.remove=function($){var J=this.list.lastIndexOf($);if(J!==-1)this.list.splice(J,1),this.attrs.splice(J,1)};b$.ActiveFormattingElements.prototype.replace=function($,J,Z){var Y=this.list.lastIndexOf($);if(Y!==-1)this.list[Y]=J,this.attrs[Y]=Z};b$.ActiveFormattingElements.prototype.insertAfter=function($,J){var Z=this.list.lastIndexOf($);if(Z!==-1)this.list.splice(Z,0,J),this.attrs.splice(Z,0,J)};function b$($,J,Z){var Y=null,K=0,Q=0,V=!1,X=!1,W=0,_=[],j="",H=!0,q=0,U=S$,z,M,I="",C="",P=[],D="",L="",R=[],N=[],x=[],b=[],v=[],m=!1,A=fH,u=null,r=[],S=new b$.ElementStack,T=new b$.ActiveFormattingElements,k=J!==void 0,A$=null,s=null,J$=!0;if(J)J$=J.ownerDocument._scripting_enabled;if(Z&&Z.scripting_enabled===!1)J$=!1;var Z$=!0,W$=!1,y$,Q$,y=[],n=!1,a=!1,c$={document:function(){return l},_asDocumentFragment:function(){var B=l.createDocumentFragment(),O=l.firstChild;while(O.hasChildNodes())B.appendChild(O.firstChild);return B},pause:function(){q++},resume:function(){q--,this.parse("")},parse:function(B,O,w){var E;if(q>0)return j+=B,!0;if(W===0){if(j)B=j+B,j="";if(O)B+="\uFFFF",V=!0;if(Y=B,K=B.length,Q=0,H){if(H=!1,Y.charCodeAt(0)===65279)Q=1}W++,E=g(w),j=Y.substring(Q,K),W--}else{if(W++,_.push(Y,K,Q),Y=B,K=B.length,Q=0,g(),E=!1,j=Y.substring(Q,K),Q=_.pop(),K=_.pop(),Y=_.pop(),j)Y=j+Y.substring(Q),K=Y.length,Q=0,j="";W--}return E}},l=new kP(!0,$);if(l._parser=c$,l._scripting_enabled=J$,J){if(J.ownerDocument._quirks)l._quirks=!0;if(J.ownerDocument._limitedQuirks)l._limitedQuirks=!0;if(J.namespaceURI===X$.HTML)switch(J.localName){case"title":case"textarea":U=J2;break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":case"script":case"plaintext":U=L6;break}var d=l.createElement("html");if(l._appendChild(d),S.push(d),J instanceof u$.HTMLTemplateElement)r.push(g6);nJ();for(var Y$=J;Y$!==null;Y$=Y$.parentElement)if(Y$ instanceof u$.HTMLFormElement){s=Y$;break}}function g(B){var O,w,E,h;while(Q<K){if(q>0||B&&B())return!0;switch(typeof U.lookahead){case"undefined":if(O=Y.charCodeAt(Q++),X){if(X=!1,O===10){Q++;continue}}switch(O){case 13:if(Q<K){if(Y.charCodeAt(Q)===10)Q++}else X=!0;U(10);break;case 65535:if(V&&Q===K){U(Q6);break}default:U(O);break}break;case"number":O=Y.charCodeAt(Q);var c=U.lookahead,U$=!0;if(c<0)U$=!1,c=-c;if(c<K-Q)w=U$?Y.substring(Q,Q+c):null,h=!1;else if(V){if(w=U$?Y.substring(Q,K):null,h=!0,O===65535&&Q===K-1)O=Q6}else return!0;U(O,w,h);break;case"string":O=Y.charCodeAt(Q),E=U.lookahead;var w$=Y.indexOf(E,Q);if(w$!==-1)w=Y.substring(Q,w$+E.length),h=!1;else{if(!V)return!0;if(w=Y.substring(Q,K),O===65535&&Q===K-1)O=Q6;h=!0}U(O,w,h);break}}return!1}function t(B,O){for(var w=0;w<v.length;w++)if(v[w][0]===B)return;if(O!==void 0)v.push([B,O]);else v.push([B])}function C$(){Nj.lastIndex=Q-1;var B=Nj.exec(Y);if(!B)throw Error("should never happen");var O=B[1];if(!O)return!1;var w=B[2],E=w.length;switch(w[0]){case'"':case"'":w=w.substring(1,E-1),Q+=B[0].length-1,U=k6;break;default:U=A1,Q+=B[0].length-1,w=w.substring(0,E-1);break}for(var h=0;h<v.length;h++)if(v[h][0]===O)return!0;return v.push([O,w]),!0}function T$(){m=!1,I="",v.length=0}function M$(){m=!0,I="",v.length=0}function r$(){P.length=0}function K0(){D=""}function t1(){L=""}function a8(){R.length=0}function e1(){N.length=0,x=null,b=null}function C1(){x=[]}function M1(){b=[]}function h$(){W$=!0}function lB(){return S.top&&S.top.namespaceURI!=="http://www.w3.org/1999/xhtml"}function r0(B){return C===B}function VJ(){if(y.length>0){var B=N0(y);if(y.length=0,a){if(a=!1,B[0]===`
31
+ `;Z+=_,Z+="</"+Q+">"}break;case 3:case 4:var j;if(J.nodeType===1&&J.namespaceURI===s2.HTML)j=J.tagName;else j="";if(WW[j]||j==="NOSCRIPT"&&J.ownerDocument._scripting_enabled)Z+=$.data;else Z+=cM($.data);break;case 8:Z+="<!--"+_W($.data)+"-->";break;case 7:let H=OW($.data);Z+="<?"+$.target+" "+H+"?>";break;case 10:Z+="<!DOCTYPE "+$.name,Z+=">";break;default:BW.InvalidStateError()}return Z}});var P0=p((Pb,PW)=>{PW.exports=$0;var DW=$Y(),gZ=JY(),FW=ZY(),m$=X0();function $0(){DW.call(this),this.parentNode=null,this._nextSibling=this._previousSibling=this,this._index=void 0}var f0=$0.ELEMENT_NODE=1,YY=$0.ATTRIBUTE_NODE=2,fZ=$0.TEXT_NODE=3,sM=$0.CDATA_SECTION_NODE=4,nM=$0.ENTITY_REFERENCE_NODE=5,KY=$0.ENTITY_NODE=6,zW=$0.PROCESSING_INSTRUCTION_NODE=7,CW=$0.COMMENT_NODE=8,A8=$0.DOCUMENT_NODE=9,G1=$0.DOCUMENT_TYPE_NODE=10,H2=$0.DOCUMENT_FRAGMENT_NODE=11,QY=$0.NOTATION_NODE=12,VY=$0.DOCUMENT_POSITION_DISCONNECTED=1,GY=$0.DOCUMENT_POSITION_PRECEDING=2,XY=$0.DOCUMENT_POSITION_FOLLOWING=4,MW=$0.DOCUMENT_POSITION_CONTAINS=8,WY=$0.DOCUMENT_POSITION_CONTAINED_BY=16,jY=$0.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;$0.prototype=Object.create(DW.prototype,{baseURI:{get:m$.nyi},parentElement:{get:function(){return this.parentNode&&this.parentNode.nodeType===f0?this.parentNode:null}},hasChildNodes:{value:m$.shouldOverride},firstChild:{get:m$.shouldOverride},lastChild:{get:m$.shouldOverride},isConnected:{get:function(){let $=this;while($!=null){if($.nodeType===$0.DOCUMENT_NODE)return!0;if($=$.parentNode,$!=null&&$.nodeType===$0.DOCUMENT_FRAGMENT_NODE)$=$.host}return!1}},previousSibling:{get:function(){var $=this.parentNode;if(!$)return null;if(this===$.firstChild)return null;return this._previousSibling}},nextSibling:{get:function(){var $=this.parentNode,J=this._nextSibling;if(!$)return null;if(J===$.firstChild)return null;return J}},textContent:{get:function(){return null},set:function($){}},innerText:{get:function(){return null},set:function($){}},_countChildrenOfType:{value:function($){var J=0;for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)if(Z.nodeType===$)J++;return J}},_ensureInsertValid:{value:function(J,Z,Y){var K=this,Q,V;if(!J.nodeType)throw TypeError("not a node");switch(K.nodeType){case A8:case H2:case f0:break;default:m$.HierarchyRequestError()}if(J.isAncestor(K))m$.HierarchyRequestError();if(Z!==null||!Y){if(Z.parentNode!==K)m$.NotFoundError()}switch(J.nodeType){case H2:case G1:case f0:case fZ:case zW:case CW:break;default:m$.HierarchyRequestError()}if(K.nodeType===A8)switch(J.nodeType){case fZ:m$.HierarchyRequestError();break;case H2:if(J._countChildrenOfType(fZ)>0)m$.HierarchyRequestError();switch(J._countChildrenOfType(f0)){case 0:break;case 1:if(Z!==null){if(Y&&Z.nodeType===G1)m$.HierarchyRequestError();for(V=Z.nextSibling;V!==null;V=V.nextSibling)if(V.nodeType===G1)m$.HierarchyRequestError()}if(Q=K._countChildrenOfType(f0),Y){if(Q>0)m$.HierarchyRequestError()}else if(Q>1||Q===1&&Z.nodeType!==f0)m$.HierarchyRequestError();break;default:m$.HierarchyRequestError()}break;case f0:if(Z!==null){if(Y&&Z.nodeType===G1)m$.HierarchyRequestError();for(V=Z.nextSibling;V!==null;V=V.nextSibling)if(V.nodeType===G1)m$.HierarchyRequestError()}if(Q=K._countChildrenOfType(f0),Y){if(Q>0)m$.HierarchyRequestError()}else if(Q>1||Q===1&&Z.nodeType!==f0)m$.HierarchyRequestError();break;case G1:if(Z===null){if(K._countChildrenOfType(f0))m$.HierarchyRequestError()}else for(V=K.firstChild;V!==null;V=V.nextSibling){if(V===Z)break;if(V.nodeType===f0)m$.HierarchyRequestError()}if(Q=K._countChildrenOfType(G1),Y){if(Q>0)m$.HierarchyRequestError()}else if(Q>1||Q===1&&Z.nodeType!==G1)m$.HierarchyRequestError();break}else if(J.nodeType===G1)m$.HierarchyRequestError()}},insertBefore:{value:function(J,Z){var Y=this;Y._ensureInsertValid(J,Z,!0);var K=Z;if(K===J)K=J.nextSibling;return Y.doc.adoptNode(J),J._insertOrReplace(Y,K,!1),J}},appendChild:{value:function($){return this.insertBefore($,null)}},_appendChild:{value:function($){$._insertOrReplace(this,null,!1)}},removeChild:{value:function(J){var Z=this;if(!J.nodeType)throw TypeError("not a node");if(J.parentNode!==Z)m$.NotFoundError();return J.remove(),J}},replaceChild:{value:function(J,Z){var Y=this;if(Y._ensureInsertValid(J,Z,!1),J.doc!==Y.doc)Y.doc.adoptNode(J);return J._insertOrReplace(Y,Z,!0),Z}},contains:{value:function(J){if(J===null)return!1;if(this===J)return!0;return(this.compareDocumentPosition(J)&WY)!==0}},compareDocumentPosition:{value:function(J){if(this===J)return 0;if(this.doc!==J.doc||this.rooted!==J.rooted)return VY+jY;var Z=[],Y=[];for(var K=this;K!==null;K=K.parentNode)Z.push(K);for(K=J;K!==null;K=K.parentNode)Y.push(K);if(Z.reverse(),Y.reverse(),Z[0]!==Y[0])return VY+jY;K=Math.min(Z.length,Y.length);for(var Q=1;Q<K;Q++)if(Z[Q]!==Y[Q])if(Z[Q].index<Y[Q].index)return XY;else return GY;if(Z.length<Y.length)return XY+WY;else return GY+MW}},isSameNode:{value:function(J){return this===J}},isEqualNode:{value:function(J){if(!J)return!1;if(J.nodeType!==this.nodeType)return!1;if(!this.isEqual(J))return!1;for(var Z=this.firstChild,Y=J.firstChild;Z&&Y;Z=Z.nextSibling,Y=Y.nextSibling)if(!Z.isEqualNode(Y))return!1;return Z===null&&Y===null}},cloneNode:{value:function($){var J=this.clone();if($)for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)J._appendChild(Z.cloneNode(!0));return J}},lookupPrefix:{value:function(J){var Z;if(J===""||J===null||J===void 0)return null;switch(this.nodeType){case f0:return this._lookupNamespacePrefix(J,this);case A8:return Z=this.documentElement,Z?Z.lookupPrefix(J):null;case KY:case QY:case H2:case G1:return null;case YY:return Z=this.ownerElement,Z?Z.lookupPrefix(J):null;default:return Z=this.parentElement,Z?Z.lookupPrefix(J):null}}},lookupNamespaceURI:{value:function(J){if(J===""||J===void 0)J=null;var Z;switch(this.nodeType){case f0:return m$.shouldOverride();case A8:return Z=this.documentElement,Z?Z.lookupNamespaceURI(J):null;case KY:case QY:case G1:case H2:return null;case YY:return Z=this.ownerElement,Z?Z.lookupNamespaceURI(J):null;default:return Z=this.parentElement,Z?Z.lookupNamespaceURI(J):null}}},isDefaultNamespace:{value:function(J){if(J===""||J===void 0)J=null;var Z=this.lookupNamespaceURI(null);return Z===J}},index:{get:function(){var $=this.parentNode;if(this===$.firstChild)return 0;var J=$.childNodes;if(this._index===void 0||J[this._index]!==this){for(var Z=0;Z<J.length;Z++)J[Z]._index=Z;m$.assert(J[this._index]===this)}return this._index}},isAncestor:{value:function($){if(this.doc!==$.doc)return!1;if(this.rooted!==$.rooted)return!1;for(var J=$;J;J=J.parentNode)if(J===this)return!0;return!1}},ensureSameDoc:{value:function($){if($.ownerDocument===null)$.ownerDocument=this.doc;else if($.ownerDocument!==this.doc)m$.WrongDocumentError()}},removeChildren:{value:m$.shouldOverride},_insertOrReplace:{value:function(J,Z,Y){var K=this,Q,V;if(K.nodeType===H2&&K.rooted)m$.HierarchyRequestError();if(J._childNodes){if(Q=Z===null?J._childNodes.length:Z.index,K.parentNode===J){var X=K.index;if(X<Q)Q--}}if(Y){if(Z.rooted)Z.doc.mutateRemove(Z);Z.parentNode=null}var W=Z;if(W===null)W=J.firstChild;var _=K.rooted&&J.rooted;if(K.nodeType===H2){var j=[0,Y?1:0],H;for(var q=K.firstChild;q!==null;q=H)H=q.nextSibling,j.push(q),q.parentNode=J;var U=j.length;if(Y)gZ.replace(W,U>2?j[2]:null);else if(U>2&&W!==null)gZ.insertBefore(j[2],W);if(J._childNodes){j[0]=Z===null?J._childNodes.length:Z._index,J._childNodes.splice.apply(J._childNodes,j);for(V=2;V<U;V++)j[V]._index=j[0]+(V-2)}else if(J._firstChild===Z){if(U>2)J._firstChild=j[2];else if(Y)J._firstChild=null}if(K._childNodes)K._childNodes.length=0;else K._firstChild=null;if(J.rooted){J.modify();for(V=2;V<U;V++)J.doc.mutateInsert(j[V])}}else{if(Z===K)return;if(_)K._remove();else if(K.parentNode)K.remove();if(K.parentNode=J,Y){if(gZ.replace(W,K),J._childNodes)K._index=Q,J._childNodes[Q]=K;else if(J._firstChild===Z)J._firstChild=K}else{if(W!==null)gZ.insertBefore(K,W);if(J._childNodes)K._index=Q,J._childNodes.splice(Q,0,K);else if(J._firstChild===Z)J._firstChild=K}if(_)J.modify(),J.doc.mutateMove(K);else if(J.rooted)J.modify(),J.doc.mutateInsert(K)}}},lastModTime:{get:function(){if(!this._lastModTime)this._lastModTime=this.doc.modclock;return this._lastModTime}},modify:{value:function(){if(this.doc.modclock){var $=++this.doc.modclock;for(var J=this;J;J=J.parentElement)if(J._lastModTime)J._lastModTime=$}}},doc:{get:function(){return this.ownerDocument||this}},rooted:{get:function(){return!!this._nid}},normalize:{value:function(){var $;for(var J=this.firstChild;J!==null;J=$){if($=J.nextSibling,J.normalize)J.normalize();if(J.nodeType!==$0.TEXT_NODE)continue;if(J.nodeValue===""){this.removeChild(J);continue}var Z=J.previousSibling;if(Z===null)continue;else if(Z.nodeType===$0.TEXT_NODE)Z.appendData(J.nodeValue),this.removeChild(J)}}},serialize:{value:function(){if(this._innerHTML)return this._innerHTML;var $="";for(var J=this.firstChild;J!==null;J=J.nextSibling)$+=FW.serializeOne(J,this);return $}},outerHTML:{get:function(){return FW.serializeOne(this,{nodeType:0})},set:m$.nyi},ELEMENT_NODE:{value:f0},ATTRIBUTE_NODE:{value:YY},TEXT_NODE:{value:fZ},CDATA_SECTION_NODE:{value:sM},ENTITY_REFERENCE_NODE:{value:nM},ENTITY_NODE:{value:KY},PROCESSING_INSTRUCTION_NODE:{value:zW},COMMENT_NODE:{value:CW},DOCUMENT_NODE:{value:A8},DOCUMENT_TYPE_NODE:{value:G1},DOCUMENT_FRAGMENT_NODE:{value:H2},NOTATION_NODE:{value:QY},DOCUMENT_POSITION_DISCONNECTED:{value:VY},DOCUMENT_POSITION_PRECEDING:{value:GY},DOCUMENT_POSITION_FOLLOWING:{value:XY},DOCUMENT_POSITION_CONTAINS:{value:MW},DOCUMENT_POSITION_CONTAINED_BY:{value:WY},DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:{value:jY}})});var AW=p((Ib,IW)=>{IW.exports=class extends Array{constructor(J){super(J&&J.length||0);if(J)for(var Z in J)this[Z]=J[Z]}item(J){return this[J]||null}}});var wW=p((Ab,SW)=>{function aM($){return this[$]||null}function tM($){if(!$)$=[];return $.item=aM,$}SW.exports=tM});var n2=p((Sb,RW)=>{var UY;try{UY=AW()}catch($){UY=wW()}RW.exports=UY});var mZ=p((wb,yW)=>{yW.exports=NW;var LW=P0(),eM=n2();function NW(){LW.call(this),this._firstChild=this._childNodes=null}NW.prototype=Object.create(LW.prototype,{hasChildNodes:{value:function(){if(this._childNodes)return this._childNodes.length>0;return this._firstChild!==null}},childNodes:{get:function(){return this._ensureChildNodes(),this._childNodes}},firstChild:{get:function(){if(this._childNodes)return this._childNodes.length===0?null:this._childNodes[0];return this._firstChild}},lastChild:{get:function(){var $=this._childNodes,J;if($)return $.length===0?null:$[$.length-1];if(J=this._firstChild,J===null)return null;return J._previousSibling}},_ensureChildNodes:{value:function(){if(this._childNodes)return;var $=this._firstChild,J=$,Z=this._childNodes=new eM;if($)do Z.push(J),J=J._nextSibling;while(J!==$);this._firstChild=null}},removeChildren:{value:function(){var J=this.rooted?this.ownerDocument:null,Z=this.firstChild,Y;while(Z!==null){if(Y=Z,Z=Y.nextSibling,J)J.mutateRemove(Y);Y.parentNode=null}if(this._childNodes)this._childNodes.length=0;else this._firstChild=null;this.modify()}}})});var uZ=p((XD)=>{XD.isValidName=VD;XD.isValidQName=GD;var $D=/^[_:A-Za-z][-.:\w]+$/,JD=/^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/,S8="_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",w8="-._A-Za-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",a2="["+S8+"]["+w8+"]*",BY=S8+":",HY=w8+":",ZD=new RegExp("^["+BY+"]["+HY+"]*$"),YD=new RegExp("^("+a2+"|"+a2+":"+a2+")$"),TW=/[\uD800-\uDB7F\uDC00-\uDFFF]/,kW=/[\uD800-\uDB7F\uDC00-\uDFFF]/g,EW=/[\uD800-\uDB7F][\uDC00-\uDFFF]/g;S8+="\uD800-\uDB7F\uDC00-\uDFFF";w8+="\uD800-\uDB7F\uDC00-\uDFFF";a2="["+S8+"]["+w8+"]*";BY=S8+":";HY=w8+":";var KD=new RegExp("^["+BY+"]["+HY+"]*$"),QD=new RegExp("^("+a2+"|"+a2+":"+a2+")$");function VD($){if($D.test($))return!0;if(ZD.test($))return!0;if(!TW.test($))return!1;if(!KD.test($))return!1;var J=$.match(kW),Z=$.match(EW);return Z!==null&&2*Z.length===J.length}function GD($){if(JD.test($))return!0;if(YD.test($))return!0;if(!TW.test($))return!1;if(!QD.test($))return!1;var J=$.match(kW),Z=$.match(EW);return Z!==null&&2*Z.length===J.length}});var _Y=p((BD)=>{var xW=X0();BD.property=function($){if(Array.isArray($.type)){var J=Object.create(null);$.type.forEach(function(K){J[K.value||K]=K.alias||K});var Z=$.missing;if(Z===void 0)Z=null;var Y=$.invalid;if(Y===void 0)Y=Z;return{get:function(){var K=this._getattr($.name);if(K===null)return Z;if(K=J[K.toLowerCase()],K!==void 0)return K;if(Y!==null)return Y;return K},set:function(K){this._setattr($.name,K)}}}else if($.type===Boolean)return{get:function(){return this.hasAttribute($.name)},set:function(K){if(K)this._setattr($.name,"");else this.removeAttribute($.name)}};else if($.type===Number||$.type==="long"||$.type==="unsigned long"||$.type==="limited unsigned long with fallback")return UD($);else if(!$.type||$.type===String)return{get:function(){return this._getattr($.name)||""},set:function(K){if($.treatNullAsEmptyString&&K===null)K="";this._setattr($.name,K)}};else if(typeof $.type==="function")return $.type($.name,$);throw Error("Invalid attribute definition")};function UD($){var J;if(typeof $.default==="function")J=$.default;else if(typeof $.default==="number")J=function(){return $.default};else J=function(){xW.assert(!1,typeof $.default)};var Z=$.type==="unsigned long",Y=$.type==="long",K=$.type==="limited unsigned long with fallback",Q=$.min,V=$.max,X=$.setmin;if(Q===void 0){if(Z)Q=0;if(Y)Q=-2147483648;if(K)Q=1}if(V===void 0){if(Z||Y||K)V=2147483647}return{get:function(){var W=this._getattr($.name),_=$.float?parseFloat(W):parseInt(W,10);if(W===null||!isFinite(_)||Q!==void 0&&_<Q||V!==void 0&&_>V)return J.call(this);if(Z||Y||K){if(!/^[ \t\n\f\r]*[-+]?[0-9]/.test(W))return J.call(this);_=_|0}return _},set:function(W){if(!$.float)W=Math.floor(W);if(X!==void 0&&W<X)xW.IndexSizeError($.name+" set to "+W);if(Z)W=W<0||W>2147483647?J.call(this):W|0;else if(K)W=W<1||W>2147483647?J.call(this):W|0;else if(Y)W=W<-2147483648||W>2147483647?J.call(this):W|0;this._setattr($.name,String(W))}}}BD.registerChangeHandler=function($,J,Z){var Y=$.prototype;if(!Object.prototype.hasOwnProperty.call(Y,"_attributeChangeHandlers"))Y._attributeChangeHandlers=Object.create(Y._attributeChangeHandlers||null);Y._attributeChangeHandlers[J]=Z}});var hW=p((Nb,vW)=>{vW.exports=bW;var OD=P0();function bW($,J){this.root=$,this.filter=J,this.lastModTime=$.lastModTime,this.done=!1,this.cache=[],this.traverse()}bW.prototype=Object.create(Object.prototype,{length:{get:function(){if(this.checkcache(),!this.done)this.traverse();return this.cache.length}},item:{value:function($){if(this.checkcache(),!this.done&&$>=this.cache.length)this.traverse();return this.cache[$]}},checkcache:{value:function(){if(this.lastModTime!==this.root.lastModTime){for(var $=this.cache.length-1;$>=0;$--)this[$]=void 0;this.cache.length=0,this.done=!1,this.lastModTime=this.root.lastModTime}}},traverse:{value:function($){if($!==void 0)$++;var J;while((J=this.next())!==null)if(this[this.cache.length]=J,this.cache.push(J),$&&this.cache.length===$)return;this.done=!0}},next:{value:function(){var $=this.cache.length===0?this.root:this.cache[this.cache.length-1],J;if($.nodeType===OD.DOCUMENT_NODE)J=$.documentElement;else J=$.nextElement(this.root);while(J){if(this.filter(J))return J;J=J.nextElement(this.root)}return null}}})});var qY=p((yb,mW)=>{var OY=X0();mW.exports=fW;function fW($,J){this._getString=$,this._setString=J,this._length=0,this._lastStringValue="",this._update()}Object.defineProperties(fW.prototype,{length:{get:function(){return this._length}},item:{value:function($){var J=kJ(this);if($<0||$>=J.length)return null;return J[$]}},contains:{value:function($){$=String($);var J=kJ(this);return J.indexOf($)>-1}},add:{value:function(){var $=kJ(this);for(var J=0,Z=arguments.length;J<Z;J++){var Y=R8(arguments[J]);if($.indexOf(Y)<0)$.push(Y)}this._update($)}},remove:{value:function(){var $=kJ(this);for(var J=0,Z=arguments.length;J<Z;J++){var Y=R8(arguments[J]),K=$.indexOf(Y);if(K>-1)$.splice(K,1)}this._update($)}},toggle:{value:function(J,Z){if(J=R8(J),this.contains(J)){if(Z===void 0||Z===!1)return this.remove(J),!1;return!0}else{if(Z===void 0||Z===!0)return this.add(J),!0;return!1}}},replace:{value:function(J,Z){if(String(Z)==="")OY.SyntaxError();J=R8(J),Z=R8(Z);var Y=kJ(this),K=Y.indexOf(J);if(K<0)return!1;var Q=Y.indexOf(Z);if(Q<0)Y[K]=Z;else if(K<Q)Y[K]=Z,Y.splice(Q,1);else Y.splice(K,1);return this._update(Y),!0}},toString:{value:function(){return this._getString()}},value:{get:function(){return this._getString()},set:function($){this._setString($),this._update()}},_update:{value:function($){if($)gW(this,$),this._setString($.join(" ").trim());else gW(this,kJ(this));this._lastStringValue=this._getString()}}});function gW($,J){var Z=$._length,Y;$._length=J.length;for(Y=0;Y<J.length;Y++)$[Y]=J[Y];for(;Y<Z;Y++)$[Y]=void 0}function R8($){if($=String($),$==="")OY.SyntaxError();if(/[ \t\r\n\f]/.test($))OY.InvalidCharacterError();return $}function qD($){var J=$._length,Z=Array(J);for(var Y=0;Y<J;Y++)Z[Y]=$[Y];return Z}function kJ($){var J=$._getString();if(J===$._lastStringValue)return qD($);var Z=J.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g,"");if(Z==="")return[];else{var Y=Object.create(null);return Z.split(/[ \t\r\n\f]+/g).filter(function(K){var Q="$"+K;if(Y[Q])return!1;return Y[Q]=!0,!0})}}});var lZ=p((bJ,oW)=>{var dZ=Object.create(null,{location:{get:function(){throw Error("window.location is not supported.")}}}),FD=function($,J){return $.compareDocumentPosition(J)},zD=function($,J){return FD($,J)&2?1:-1},cZ=function($){while(($=$.nextSibling)&&$.nodeType!==1);return $},xJ=function($){while(($=$.previousSibling)&&$.nodeType!==1);return $},CD=function($){if($=$.firstChild)while($.nodeType!==1&&($=$.nextSibling));return $},MD=function($){if($=$.lastChild)while($.nodeType!==1&&($=$.previousSibling));return $},EJ=function($){if(!$.parentNode)return!1;var J=$.parentNode.nodeType;return J===1||J===9},uW=function($){if(!$)return $;var J=$[0];if(J==='"'||J==="'"){if($[$.length-1]===J)$=$.slice(1,-1);else $=$.slice(1);return $.replace(_$.str_escape,function(Z){var Y=/^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(Z);if(!Y)return Z.slice(1);if(Y[2])return"";var K=parseInt(Y[1],16);return String.fromCodePoint?String.fromCodePoint(K):String.fromCharCode(K)})}else if(_$.ident.test($))return _2($);else return $},_2=function($){return $.replace(_$.escape,function(J){var Z=/^\\([0-9A-Fa-f]+)/.exec(J);if(!Z)return J[1];var Y=parseInt(Z[1],16);return String.fromCodePoint?String.fromCodePoint(Y):String.fromCharCode(Y)})},DD=function(){if(Array.prototype.indexOf)return Array.prototype.indexOf;return function($,J){var Z=this.length;while(Z--)if(this[Z]===J)return Z;return-1}}(),pW=function($,J){var Z=_$.inside.source.replace(/</g,$).replace(/>/g,J);return new RegExp(Z)},m0=function($,J,Z){return $=$.source,$=$.replace(J,Z.source||Z),new RegExp($)},dW=function($,J){return $.replace(/^(?:\w+:\/\/|\/+)/,"").replace(/(?:\/+|\/*#.*?)$/,"").split("/",J).join("/")},PD=function($,J){var Z=$.replace(/\s+/g,""),Y;if(Z==="even")Z="2n+0";else if(Z==="odd")Z="2n+1";else if(Z.indexOf("n")===-1)Z="0n"+Z;return Y=/^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(Z),{group:Y[1]==="-"?-(Y[2]||1):+(Y[2]||1),offset:Y[4]?Y[3]==="-"?-Y[4]:+Y[4]:0}},FY=function($,J,Z){var Y=PD($),K=Y.group,Q=Y.offset,V=!Z?CD:MD,X=!Z?cZ:xJ;return function(W){if(!EJ(W))return;var _=V(W.parentNode),j=0;while(_){if(J(_,W))j++;if(_===W)return j-=Q,K&&j?j%K===0&&j<0===K<0:!j;_=X(_)}}},z0={"*":function(){return function(){return!0}}(),type:function($){return $=$.toLowerCase(),function(J){return J.nodeName.toLowerCase()===$}},attr:function($,J,Z,Y){return J=cW[J],function(K){var Q;switch($){case"for":Q=K.htmlFor;break;case"class":if(Q=K.className,Q===""&&K.getAttribute("class")==null)Q=null;break;case"href":case"src":Q=K.getAttribute($,2);break;case"title":Q=K.getAttribute("title")||null;break;case"id":case"lang":case"dir":case"accessKey":case"hidden":case"tabIndex":case"style":if(K.getAttribute){Q=K.getAttribute($);break}default:if(K.hasAttribute&&!K.hasAttribute($))break;Q=K[$]!=null?K[$]:K.getAttribute&&K.getAttribute($);break}if(Q==null)return;if(Q=Q+"",Y)Q=Q.toLowerCase(),Z=Z.toLowerCase();return J(Q,Z)}},":first-child":function($){return!xJ($)&&EJ($)},":last-child":function($){return!cZ($)&&EJ($)},":only-child":function($){return!xJ($)&&!cZ($)&&EJ($)},":nth-child":function($,J){return FY($,function(){return!0},J)},":nth-last-child":function($){return z0[":nth-child"]($,!0)},":root":function($){return $.ownerDocument.documentElement===$},":empty":function($){return!$.firstChild},":not":function($){var J=CY($);return function(Z){return!J(Z)}},":first-of-type":function($){if(!EJ($))return;var J=$.nodeName;while($=xJ($))if($.nodeName===J)return;return!0},":last-of-type":function($){if(!EJ($))return;var J=$.nodeName;while($=cZ($))if($.nodeName===J)return;return!0},":only-of-type":function($){return z0[":first-of-type"]($)&&z0[":last-of-type"]($)},":nth-of-type":function($,J){return FY($,function(Z,Y){return Z.nodeName===Y.nodeName},J)},":nth-last-of-type":function($){return z0[":nth-of-type"]($,!0)},":checked":function($){return!!($.checked||$.selected)},":indeterminate":function($){return!z0[":checked"]($)},":enabled":function($){return!$.disabled&&$.type!=="hidden"},":disabled":function($){return!!$.disabled},":target":function($){return $.id===dZ.location.hash.substring(1)},":focus":function($){return $===$.ownerDocument.activeElement},":is":function($){return CY($)},":matches":function($){return z0[":is"]($)},":nth-match":function($,J){var Z=$.split(/\s*,\s*/),Y=Z.shift(),K=CY(Z.join(","));return FY(Y,K,J)},":nth-last-match":function($){return z0[":nth-match"]($,!0)},":links-here":function($){return $+""===dZ.location+""},":lang":function($){return function(J){while(J){if(J.lang)return J.lang.indexOf($)===0;J=J.parentNode}}},":dir":function($){return function(J){while(J){if(J.dir)return J.dir===$;J=J.parentNode}}},":scope":function($,J){var Z=J||$.ownerDocument;if(Z.nodeType===9)return $===Z.documentElement;return $===Z},":any-link":function($){return typeof $.href==="string"},":local-link":function($){if($.nodeName)return $.href&&$.host===dZ.location.host;var J=+$+1;return function(Z){if(!Z.href)return;var Y=dZ.location+"",K=Z+"";return dW(Y,J)===dW(K,J)}},":default":function($){return!!$.defaultSelected},":valid":function($){return $.willValidate||$.validity&&$.validity.valid},":invalid":function($){return!z0[":valid"]($)},":in-range":function($){return $.value>$.min&&$.value<=$.max},":out-of-range":function($){return!z0[":in-range"]($)},":required":function($){return!!$.required},":optional":function($){return!$.required},":read-only":function($){if($.readOnly)return!0;var J=$.getAttribute("contenteditable"),Z=$.contentEditable,Y=$.nodeName.toLowerCase();return Y=Y!=="input"&&Y!=="textarea",(Y||$.disabled)&&J==null&&Z!=="true"},":read-write":function($){return!z0[":read-only"]($)},":hover":function(){throw Error(":hover is not supported.")},":active":function(){throw Error(":active is not supported.")},":link":function(){throw Error(":link is not supported.")},":visited":function(){throw Error(":visited is not supported.")},":column":function(){throw Error(":column is not supported.")},":nth-column":function(){throw Error(":nth-column is not supported.")},":nth-last-column":function(){throw Error(":nth-last-column is not supported.")},":current":function(){throw Error(":current is not supported.")},":past":function(){throw Error(":past is not supported.")},":future":function(){throw Error(":future is not supported.")},":contains":function($){return function(J){var Z=J.innerText||J.textContent||J.value||"";return Z.indexOf($)!==-1}},":has":function($){return function(J){return lW($,J).length>0}}},cW={"-":function(){return!0},"=":function($,J){return $===J},"*=":function($,J){return $.indexOf(J)!==-1},"~=":function($,J){var Z,Y,K,Q;for(Y=0;;Y=Z+1){if(Z=$.indexOf(J,Y),Z===-1)return!1;if(K=$[Z-1],Q=$[Z+J.length],(!K||K===" ")&&(!Q||Q===" "))return!0}},"|=":function($,J){var Z=$.indexOf(J),Y;if(Z!==0)return;return Y=$[Z+J.length],Y==="-"||!Y},"^=":function($,J){return $.indexOf(J)===0},"$=":function($,J){var Z=$.lastIndexOf(J);return Z!==-1&&Z+J.length===$.length},"!=":function($,J){return $!==J}},L8={" ":function($){return function(J){while(J=J.parentNode)if($(J))return J}},">":function($){return function(J){if(J=J.parentNode)return $(J)&&J}},"+":function($){return function(J){if(J=xJ(J))return $(J)&&J}},"~":function($){return function(J){while(J=xJ(J))if($(J))return J}},noop:function($){return function(J){return $(J)&&J}},ref:function($,J){var Z;function Y(K){var Q=K.ownerDocument,V=Q.getElementsByTagName("*"),X=V.length;while(X--)if(Z=V[X],Y.test(K))return Z=null,!0;Z=null}return Y.combinator=function(K){if(!Z||!Z.getAttribute)return;var Q=Z.getAttribute(J)||"";if(Q[0]==="#")Q=Q.substring(1);if(Q===K.id&&$(Z))return Z},Y}},_$={escape:/\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g,str_escape:/(escape)|\\(\n|\r\n?|\f)/g,nonascii:/[\u00A0-\uFFFF]/,cssid:/(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/,qname:/^ *(cssid|\*)/,simple:/^(?:([.#]cssid)|pseudo|attr)/,ref:/^ *\/(cssid)\/ */,combinator:/^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/,attr:/^\[(cssid)(?:([^\w]?=)(inside))?\]/,pseudo:/^(:cssid)(?:\((inside)\))?/,inside:/(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/,ident:/^(cssid)$/};_$.cssid=m0(_$.cssid,"nonascii",_$.nonascii);_$.cssid=m0(_$.cssid,"escape",_$.escape);_$.qname=m0(_$.qname,"cssid",_$.cssid);_$.simple=m0(_$.simple,"cssid",_$.cssid);_$.ref=m0(_$.ref,"cssid",_$.cssid);_$.attr=m0(_$.attr,"cssid",_$.cssid);_$.pseudo=m0(_$.pseudo,"cssid",_$.cssid);_$.inside=m0(_$.inside,`[^"'>]*`,_$.inside);_$.attr=m0(_$.attr,"inside",pW("\\[","\\]"));_$.pseudo=m0(_$.pseudo,"inside",pW("\\(","\\)"));_$.simple=m0(_$.simple,"pseudo",_$.pseudo);_$.simple=m0(_$.simple,"attr",_$.attr);_$.ident=m0(_$.ident,"cssid",_$.cssid);_$.str_escape=m0(_$.str_escape,"escape",_$.escape);var N8=function($){var J=$.replace(/^\s+|\s+$/g,""),Z,Y=[],K=[],Q,V,X,W,_;while(J){if(X=_$.qname.exec(J))J=J.substring(X[0].length),V=_2(X[1]),K.push(pZ(V,!0));else if(X=_$.simple.exec(J))J=J.substring(X[0].length),V="*",K.push(pZ(V,!0)),K.push(pZ(X));else throw SyntaxError("Invalid selector.");while(X=_$.simple.exec(J))J=J.substring(X[0].length),K.push(pZ(X));if(J[0]==="!")J=J.substring(1),Q=AD(),Q.qname=V,K.push(Q.simple);if(X=_$.ref.exec(J)){J=J.substring(X[0].length),_=L8.ref(zY(K),_2(X[1])),Y.push(_.combinator),K=[];continue}if(X=_$.combinator.exec(J)){if(J=J.substring(X[0].length),W=X[1]||X[2]||X[3],W===","){Y.push(L8.noop(zY(K)));break}}else W="noop";if(!L8[W])throw SyntaxError("Bad combinator.");Y.push(L8[W](zY(K))),K=[]}if(Z=ID(Y),Z.qname=V,Z.sel=J,Q)Q.lname=Z.qname,Q.test=Z,Q.qname=Q.qname,Q.sel=Z.sel,Z=Q;if(_)_.test=Z,_.qname=Z.qname,_.sel=Z.sel,Z=_;return Z},pZ=function($,J){if(J)return $==="*"?z0["*"]:z0.type($);if($[1])return $[1][0]==="."?z0.attr("class","~=",_2($[1].substring(1)),!1):z0.attr("id","=",_2($[1].substring(1)),!1);if($[2])return $[3]?z0[_2($[2])](uW($[3])):z0[_2($[2])];if($[4]){var Z=$[6],Y=/["'\s]\s*I$/i.test(Z);if(Y)Z=Z.replace(/\s*I$/i,"");return z0.attr(_2($[4]),$[5]||"-",uW(Z),Y)}throw SyntaxError("Unknown Selector.")},zY=function($){var J=$.length,Z;if(J<2)return $[0];return function(Y){if(!Y)return;for(Z=0;Z<J;Z++)if(!$[Z](Y))return;return!0}},ID=function($){if($.length<2)return function(J){return!!$[0](J)};return function(J){var Z=$.length;while(Z--)if(!(J=$[Z](J)))return;return!0}},AD=function(){var $;function J(Z){var Y=Z.ownerDocument,K=Y.getElementsByTagName(J.lname),Q=K.length;while(Q--)if(J.test(K[Q])&&$===Z)return $=null,!0;$=null}return J.simple=function(Z){return $=Z,!0},J},CY=function($){var J=N8($),Z=[J];while(J.sel)J=N8(J.sel),Z.push(J);if(Z.length<2)return J;return function(Y){var K=Z.length,Q=0;for(;Q<K;Q++)if(Z[Q](Y))return!0}},lW=function($,J){var Z=[],Y=N8($),K=J.getElementsByTagName(Y.qname),Q=0,V;while(V=K[Q++])if(Y(V))Z.push(V);if(Y.sel){while(Y.sel){Y=N8(Y.sel),K=J.getElementsByTagName(Y.qname),Q=0;while(V=K[Q++])if(Y(V)&&DD.call(Z,V)===-1)Z.push(V)}Z.sort(zD)}return Z};oW.exports=bJ=function($,J){var Z,Y;if(J.nodeType!==11&&$.indexOf(" ")===-1){if($[0]==="#"&&J.rooted&&/^#[A-Z_][-A-Z0-9_]*$/i.test($)){if(J.doc._hasMultipleElementsWithId){if(Z=$.substring(1),!J.doc._hasMultipleElementsWithId(Z))return Y=J.doc.getElementById(Z),Y?[Y]:[]}}if($[0]==="."&&/^\.\w+$/.test($))return J.getElementsByClassName($.substring(1));if(/^\w+$/.test($))return J.getElementsByTagName($)}return lW($,J)};bJ.selectors=z0;bJ.operators=cW;bJ.combinators=L8;bJ.matches=function($,J){var Z={sel:J};do if(Z=N8(Z.sel),Z($))return!0;while(Z.sel);return!1}});var oZ=p((Tb,rW)=>{var SD=P0(),wD=JY(),MY=function($,J){var Z=$.createDocumentFragment();for(var Y=0;Y<J.length;Y++){var K=J[Y],Q=K instanceof SD;Z.appendChild(Q?K:$.createTextNode(String(K)))}return Z},RD={after:{value:function(){var J=Array.prototype.slice.call(arguments),Z=this.parentNode,Y=this.nextSibling;if(Z===null)return;while(Y&&J.some(function(Q){return Q===Y}))Y=Y.nextSibling;var K=MY(this.doc,J);Z.insertBefore(K,Y)}},before:{value:function(){var J=Array.prototype.slice.call(arguments),Z=this.parentNode,Y=this.previousSibling;if(Z===null)return;while(Y&&J.some(function(V){return V===Y}))Y=Y.previousSibling;var K=MY(this.doc,J),Q=Y?Y.nextSibling:Z.firstChild;Z.insertBefore(K,Q)}},remove:{value:function(){if(this.parentNode===null)return;if(this.doc){if(this.doc._preremoveNodeIterators(this),this.rooted)this.doc.mutateRemove(this)}this._remove(),this.parentNode=null}},_remove:{value:function(){var J=this.parentNode;if(J===null)return;if(J._childNodes)J._childNodes.splice(this.index,1);else if(J._firstChild===this)if(this._nextSibling===this)J._firstChild=null;else J._firstChild=this._nextSibling;wD.remove(this),J.modify()}},replaceWith:{value:function(){var J=Array.prototype.slice.call(arguments),Z=this.parentNode,Y=this.nextSibling;if(Z===null)return;while(Y&&J.some(function(Q){return Q===Y}))Y=Y.nextSibling;var K=MY(this.doc,J);if(this.parentNode===Z)Z.replaceChild(K,this);else Z.insertBefore(K,Y)}}};rW.exports=RD});var DY=p((kb,sW)=>{var iW=P0(),LD={nextElementSibling:{get:function(){if(this.parentNode){for(var $=this.nextSibling;$!==null;$=$.nextSibling)if($.nodeType===iW.ELEMENT_NODE)return $}return null}},previousElementSibling:{get:function(){if(this.parentNode){for(var $=this.previousSibling;$!==null;$=$.previousSibling)if($.nodeType===iW.ELEMENT_NODE)return $}return null}}};sW.exports=LD});var PY=p((Eb,aW)=>{aW.exports=nW;var vJ=X0();function nW($){this.element=$}Object.defineProperties(nW.prototype,{length:{get:vJ.shouldOverride},item:{value:vJ.shouldOverride},getNamedItem:{value:function(J){return this.element.getAttributeNode(J)}},getNamedItemNS:{value:function(J,Z){return this.element.getAttributeNodeNS(J,Z)}},setNamedItem:{value:vJ.nyi},setNamedItemNS:{value:vJ.nyi},removeNamedItem:{value:function(J){var Z=this.element.getAttributeNode(J);if(Z)return this.element.removeAttribute(J),Z;vJ.NotFoundError()}},removeNamedItemNS:{value:function(J,Z){var Y=this.element.getAttributeNodeNS(J,Z);if(Y)return this.element.removeAttributeNS(J,Z),Y;vJ.NotFoundError()}}})});var gJ=p((xb,Z5)=>{Z5.exports=O2;var IY=uZ(),Y0=X0(),N1=Y0.NAMESPACE,iZ=_Y(),q1=P0(),AY=n2(),ND=ZY(),rZ=hW(),hJ=vZ(),yD=qY(),SY=lZ(),eW=mZ(),TD=oZ(),kD=DY(),$5=PY(),tW=Object.create(null);function O2($,J,Z,Y){eW.call(this),this.nodeType=q1.ELEMENT_NODE,this.ownerDocument=$,this.localName=J,this.namespaceURI=Z,this.prefix=Y,this._tagName=void 0,this._attrsByQName=Object.create(null),this._attrsByLName=Object.create(null),this._attrKeys=[]}function wY($,J){if($.nodeType===q1.TEXT_NODE)J.push($._data);else for(var Z=0,Y=$.childNodes.length;Z<Y;Z++)wY($.childNodes[Z],J)}O2.prototype=Object.create(eW.prototype,{isHTML:{get:function(){return this.namespaceURI===N1.HTML&&this.ownerDocument.isHTML}},tagName:{get:function(){if(this._tagName===void 0){var J;if(this.prefix===null)J=this.localName;else J=this.prefix+":"+this.localName;if(this.isHTML){var Z=tW[J];if(!Z)tW[J]=Z=Y0.toASCIIUpperCase(J);J=Z}this._tagName=J}return this._tagName}},nodeName:{get:function(){return this.tagName}},nodeValue:{get:function(){return null},set:function(){}},textContent:{get:function(){var $=[];return wY(this,$),$.join("")},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerText:{get:function(){var $=[];return wY(this,$),$.join("").replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerHTML:{get:function(){return this.serialize()},set:Y0.nyi},outerHTML:{get:function(){return ND.serializeOne(this,{nodeType:0})},set:function($){var J=this.ownerDocument,Z=this.parentNode;if(Z===null)return;if(Z.nodeType===q1.DOCUMENT_NODE)Y0.NoModificationAllowedError();if(Z.nodeType===q1.DOCUMENT_FRAGMENT_NODE)Z=Z.ownerDocument.createElement("body");var Y=J.implementation.mozHTMLParser(J._address,Z);Y.parse($===null?"":String($),!0),this.replaceWith(Y._asDocumentFragment())}},_insertAdjacent:{value:function(J,Z){var Y=!1;switch(J){case"beforebegin":Y=!0;case"afterend":var K=this.parentNode;if(K===null)return null;return K.insertBefore(Z,Y?this:this.nextSibling);case"afterbegin":Y=!0;case"beforeend":return this.insertBefore(Z,Y?this.firstChild:null);default:return Y0.SyntaxError()}}},insertAdjacentElement:{value:function(J,Z){if(Z.nodeType!==q1.ELEMENT_NODE)throw TypeError("not an element");return J=Y0.toASCIILowerCase(String(J)),this._insertAdjacent(J,Z)}},insertAdjacentText:{value:function(J,Z){var Y=this.ownerDocument.createTextNode(Z);J=Y0.toASCIILowerCase(String(J)),this._insertAdjacent(J,Y)}},insertAdjacentHTML:{value:function(J,Z){J=Y0.toASCIILowerCase(String(J)),Z=String(Z);var Y;switch(J){case"beforebegin":case"afterend":if(Y=this.parentNode,Y===null||Y.nodeType===q1.DOCUMENT_NODE)Y0.NoModificationAllowedError();break;case"afterbegin":case"beforeend":Y=this;break;default:Y0.SyntaxError()}if(!(Y instanceof O2)||Y.ownerDocument.isHTML&&Y.localName==="html"&&Y.namespaceURI===N1.HTML)Y=Y.ownerDocument.createElementNS(N1.HTML,"body");var K=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,Y);K.parse(Z,!0),this._insertAdjacent(J,K._asDocumentFragment())}},children:{get:function(){if(!this._children)this._children=new J5(this);return this._children}},attributes:{get:function(){if(!this._attributes)this._attributes=new LY(this);return this._attributes}},firstElementChild:{get:function(){for(var $=this.firstChild;$!==null;$=$.nextSibling)if($.nodeType===q1.ELEMENT_NODE)return $;return null}},lastElementChild:{get:function(){for(var $=this.lastChild;$!==null;$=$.previousSibling)if($.nodeType===q1.ELEMENT_NODE)return $;return null}},childElementCount:{get:function(){return this.children.length}},nextElement:{value:function($){if(!$)$=this.ownerDocument.documentElement;var J=this.firstElementChild;if(!J){if(this===$)return null;J=this.nextElementSibling}if(J)return J;for(var Z=this.parentElement;Z&&Z!==$;Z=Z.parentElement)if(J=Z.nextElementSibling,J)return J;return null}},getElementsByTagName:{value:function(J){var Z;if(!J)return new AY;if(J==="*")Z=function(){return!0};else if(this.isHTML)Z=ED(J);else Z=RY(J);return new rZ(this,Z)}},getElementsByTagNameNS:{value:function(J,Z){var Y;if(J==="*"&&Z==="*")Y=function(){return!0};else if(J==="*")Y=RY(Z);else if(Z==="*")Y=xD(J);else Y=bD(J,Z);return new rZ(this,Y)}},getElementsByClassName:{value:function(J){if(J=String(J).trim(),J===""){var Z=new AY;return Z}return J=J.split(/[ \t\r\n\f]+/),new rZ(this,vD(J))}},getElementsByName:{value:function(J){return new rZ(this,hD(String(J)))}},clone:{value:function(){var J;if(this.namespaceURI!==N1.HTML||this.prefix||!this.ownerDocument.isHTML)J=this.ownerDocument.createElementNS(this.namespaceURI,this.prefix!==null?this.prefix+":"+this.localName:this.localName);else J=this.ownerDocument.createElement(this.localName);for(var Z=0,Y=this._attrKeys.length;Z<Y;Z++){var K=this._attrKeys[Z],Q=this._attrsByLName[K],V=Q.cloneNode();V._setOwnerElement(J),J._attrsByLName[K]=V,J._addQName(V)}return J._attrKeys=this._attrKeys.concat(),J}},isEqual:{value:function(J){if(this.localName!==J.localName||this.namespaceURI!==J.namespaceURI||this.prefix!==J.prefix||this._numattrs!==J._numattrs)return!1;for(var Z=0,Y=this._numattrs;Z<Y;Z++){var K=this._attr(Z);if(!J.hasAttributeNS(K.namespaceURI,K.localName))return!1;if(J.getAttributeNS(K.namespaceURI,K.localName)!==K.value)return!1}return!0}},_lookupNamespacePrefix:{value:function(J,Z){if(this.namespaceURI&&this.namespaceURI===J&&this.prefix!==null&&Z.lookupNamespaceURI(this.prefix)===J)return this.prefix;for(var Y=0,K=this._numattrs;Y<K;Y++){var Q=this._attr(Y);if(Q.prefix==="xmlns"&&Q.value===J&&Z.lookupNamespaceURI(Q.localName)===J)return Q.localName}var V=this.parentElement;return V?V._lookupNamespacePrefix(J,Z):null}},lookupNamespaceURI:{value:function(J){if(J===""||J===void 0)J=null;if(this.namespaceURI!==null&&this.prefix===J)return this.namespaceURI;for(var Z=0,Y=this._numattrs;Z<Y;Z++){var K=this._attr(Z);if(K.namespaceURI===N1.XMLNS){if(K.prefix==="xmlns"&&K.localName===J||J===null&&K.prefix===null&&K.localName==="xmlns")return K.value||null}}var Q=this.parentElement;return Q?Q.lookupNamespaceURI(J):null}},getAttribute:{value:function(J){var Z=this.getAttributeNode(J);return Z?Z.value:null}},getAttributeNS:{value:function(J,Z){var Y=this.getAttributeNodeNS(J,Z);return Y?Y.value:null}},getAttributeNode:{value:function(J){if(J=String(J),/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);var Z=this._attrsByQName[J];if(!Z)return null;if(Array.isArray(Z))Z=Z[0];return Z}},getAttributeNodeNS:{value:function(J,Z){J=J===void 0||J===null?"":String(J),Z=String(Z);var Y=this._attrsByLName[J+"|"+Z];return Y?Y:null}},hasAttribute:{value:function(J){if(J=String(J),/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);return this._attrsByQName[J]!==void 0}},hasAttributeNS:{value:function(J,Z){J=J===void 0||J===null?"":String(J),Z=String(Z);var Y=J+"|"+Z;return this._attrsByLName[Y]!==void 0}},hasAttributes:{value:function(){return this._numattrs>0}},toggleAttribute:{value:function(J,Z){if(J=String(J),!IY.isValidName(J))Y0.InvalidCharacterError();if(/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);var Y=this._attrsByQName[J];if(Y===void 0){if(Z===void 0||Z===!0)return this._setAttribute(J,""),!0;return!1}else{if(Z===void 0||Z===!1)return this.removeAttribute(J),!1;return!0}}},_setAttribute:{value:function(J,Z){var Y=this._attrsByQName[J],K;if(!Y)Y=this._newattr(J),K=!0;else if(Array.isArray(Y))Y=Y[0];if(Y.value=Z,this._attributes)this._attributes[J]=Y;if(K&&this._newattrhook)this._newattrhook(J,Z)}},setAttribute:{value:function(J,Z){if(J=String(J),!IY.isValidName(J))Y0.InvalidCharacterError();if(/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);this._setAttribute(J,String(Z))}},_setAttributeNS:{value:function(J,Z,Y){var K=Z.indexOf(":"),Q,V;if(K<0)Q=null,V=Z;else Q=Z.substring(0,K),V=Z.substring(K+1);if(J===""||J===void 0)J=null;var X=(J===null?"":J)+"|"+V,W=this._attrsByLName[X],_;if(!W){if(W=new y8(this,V,Q,J),_=!0,this._attrsByLName[X]=W,this._attributes)this._attributes[this._attrKeys.length]=W;this._attrKeys.push(X),this._addQName(W)}if(W.value=Y,_&&this._newattrhook)this._newattrhook(Z,Y)}},setAttributeNS:{value:function(J,Z,Y){if(J=J===null||J===void 0||J===""?null:String(J),Z=String(Z),!IY.isValidQName(Z))Y0.InvalidCharacterError();var K=Z.indexOf(":"),Q=K<0?null:Z.substring(0,K);if(Q!==null&&J===null||Q==="xml"&&J!==N1.XML||(Z==="xmlns"||Q==="xmlns")&&J!==N1.XMLNS||J===N1.XMLNS&&!(Z==="xmlns"||Q==="xmlns"))Y0.NamespaceError();this._setAttributeNS(J,Z,String(Y))}},setAttributeNode:{value:function(J){if(J.ownerElement!==null&&J.ownerElement!==this)throw new hJ(hJ.INUSE_ATTRIBUTE_ERR);var Z=null,Y=this._attrsByQName[J.name];if(Y){if(!Array.isArray(Y))Y=[Y];if(Y.some(function(K){return K===J}))return J;else if(J.ownerElement!==null)throw new hJ(hJ.INUSE_ATTRIBUTE_ERR);Y.forEach(function(K){this.removeAttributeNode(K)},this),Z=Y[0]}return this.setAttributeNodeNS(J),Z}},setAttributeNodeNS:{value:function(J){if(J.ownerElement!==null)throw new hJ(hJ.INUSE_ATTRIBUTE_ERR);var Z=J.namespaceURI,Y=(Z===null?"":Z)+"|"+J.localName,K=this._attrsByLName[Y];if(K)this.removeAttributeNode(K);if(J._setOwnerElement(this),this._attrsByLName[Y]=J,this._attributes)this._attributes[this._attrKeys.length]=J;if(this._attrKeys.push(Y),this._addQName(J),this._newattrhook)this._newattrhook(J.name,J.value);return K||null}},removeAttribute:{value:function(J){if(J=String(J),/[A-Z]/.test(J)&&this.isHTML)J=Y0.toASCIILowerCase(J);var Z=this._attrsByQName[J];if(!Z)return;if(Array.isArray(Z))if(Z.length>2)Z=Z.shift();else this._attrsByQName[J]=Z[1],Z=Z[0];else this._attrsByQName[J]=void 0;var Y=Z.namespaceURI,K=(Y===null?"":Y)+"|"+Z.localName;this._attrsByLName[K]=void 0;var Q=this._attrKeys.indexOf(K);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1),this._attributes[J]=void 0;this._attrKeys.splice(Q,1);var V=Z.onchange;if(Z._setOwnerElement(null),V)V.call(Z,this,Z.localName,Z.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(Z)}},removeAttributeNS:{value:function(J,Z){J=J===void 0||J===null?"":String(J),Z=String(Z);var Y=J+"|"+Z,K=this._attrsByLName[Y];if(!K)return;this._attrsByLName[Y]=void 0;var Q=this._attrKeys.indexOf(Y);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1);this._attrKeys.splice(Q,1),this._removeQName(K);var V=K.onchange;if(K._setOwnerElement(null),V)V.call(K,this,K.localName,K.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(K)}},removeAttributeNode:{value:function(J){var Z=J.namespaceURI,Y=(Z===null?"":Z)+"|"+J.localName;if(this._attrsByLName[Y]!==J)Y0.NotFoundError();return this.removeAttributeNS(Z,J.localName),J}},getAttributeNames:{value:function(){var J=this;return this._attrKeys.map(function(Z){return J._attrsByLName[Z].name})}},_getattr:{value:function(J){var Z=this._attrsByQName[J];return Z?Z.value:null}},_setattr:{value:function(J,Z){var Y=this._attrsByQName[J],K;if(!Y)Y=this._newattr(J),K=!0;if(Y.value=String(Z),this._attributes)this._attributes[J]=Y;if(K&&this._newattrhook)this._newattrhook(J,Z)}},_newattr:{value:function(J){var Z=new y8(this,J,null,null),Y="|"+J;if(this._attrsByQName[J]=Z,this._attrsByLName[Y]=Z,this._attributes)this._attributes[this._attrKeys.length]=Z;return this._attrKeys.push(Y),Z}},_addQName:{value:function($){var J=$.name,Z=this._attrsByQName[J];if(!Z)this._attrsByQName[J]=$;else if(Array.isArray(Z))Z.push($);else this._attrsByQName[J]=[Z,$];if(this._attributes)this._attributes[J]=$}},_removeQName:{value:function($){var J=$.name,Z=this._attrsByQName[J];if(Array.isArray(Z)){var Y=Z.indexOf($);if(Y0.assert(Y!==-1),Z.length===2){if(this._attrsByQName[J]=Z[1-Y],this._attributes)this._attributes[J]=this._attrsByQName[J]}else if(Z.splice(Y,1),this._attributes&&this._attributes[J]===$)this._attributes[J]=Z[0]}else if(Y0.assert(Z===$),this._attrsByQName[J]=void 0,this._attributes)this._attributes[J]=void 0}},_numattrs:{get:function(){return this._attrKeys.length}},_attr:{value:function($){return this._attrsByLName[this._attrKeys[$]]}},id:iZ.property({name:"id"}),className:iZ.property({name:"class"}),classList:{get:function(){var $=this;if(this._classList)return this._classList;var J=new yD(function(){return $.className||""},function(Z){$.className=Z});return this._classList=J,J},set:function($){this.className=$}},matches:{value:function($){return SY.matches(this,$)}},closest:{value:function($){var J=this;do{if(J.matches&&J.matches($))return J;J=J.parentElement||J.parentNode}while(J!==null&&J.nodeType===q1.ELEMENT_NODE);return null}},querySelector:{value:function($){return SY($,this)[0]}},querySelectorAll:{value:function($){var J=SY($,this);return J.item?J:new AY(J)}}});Object.defineProperties(O2.prototype,TD);Object.defineProperties(O2.prototype,kD);iZ.registerChangeHandler(O2,"id",function($,J,Z,Y){if($.rooted){if(Z)$.ownerDocument.delId(Z,$);if(Y)$.ownerDocument.addId(Y,$)}});iZ.registerChangeHandler(O2,"class",function($,J,Z,Y){if($._classList)$._classList._update()});function y8($,J,Z,Y,K){this.localName=J,this.prefix=Z===null||Z===""?null:""+Z,this.namespaceURI=Y===null||Y===""?null:""+Y,this.data=K,this._setOwnerElement($)}y8.prototype=Object.create(Object.prototype,{ownerElement:{get:function(){return this._ownerElement}},_setOwnerElement:{value:function(J){if(this._ownerElement=J,this.prefix===null&&this.namespaceURI===null&&J)this.onchange=J._attributeChangeHandlers[this.localName];else this.onchange=null}},name:{get:function(){return this.prefix?this.prefix+":"+this.localName:this.localName}},specified:{get:function(){return!0}},value:{get:function(){return this.data},set:function($){var J=this.data;if($=$===void 0?"":$+"",$===J)return;if(this.data=$,this.ownerElement){if(this.onchange)this.onchange(this.ownerElement,this.localName,J,$);if(this.ownerElement.rooted)this.ownerElement.ownerDocument.mutateAttr(this,J)}}},cloneNode:{value:function(J){return new y8(null,this.localName,this.prefix,this.namespaceURI,this.data)}},nodeType:{get:function(){return q1.ATTRIBUTE_NODE}},nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return this.value},set:function($){this.value=$}},textContent:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}},innerText:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}}});O2._Attr=y8;function LY($){$5.call(this,$);for(var J in $._attrsByQName)this[J]=$._attrsByQName[J];for(var Z=0;Z<$._attrKeys.length;Z++)this[Z]=$._attrsByLName[$._attrKeys[Z]]}LY.prototype=Object.create($5.prototype,{length:{get:function(){return this.element._attrKeys.length},set:function(){}},item:{value:function($){if($=$>>>0,$>=this.length)return null;return this.element._attrsByLName[this.element._attrKeys[$]]}}});if(globalThis.Symbol?.iterator)LY.prototype[globalThis.Symbol.iterator]=function(){var $=0,J=this.length,Z=this;return{next:function(){if($<J)return{value:Z.item($++)};return{done:!0}}}};function J5($){this.element=$,this.updateCache()}J5.prototype=Object.create(Object.prototype,{length:{get:function(){return this.updateCache(),this.childrenByNumber.length}},item:{value:function(J){return this.updateCache(),this.childrenByNumber[J]||null}},namedItem:{value:function(J){return this.updateCache(),this.childrenByName[J]||null}},namedItems:{get:function(){return this.updateCache(),this.childrenByName}},updateCache:{value:function(){var J=/^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/;if(this.lastModTime!==this.element.lastModTime){this.lastModTime=this.element.lastModTime;var Z=this.childrenByNumber&&this.childrenByNumber.length||0;for(var Y=0;Y<Z;Y++)this[Y]=void 0;this.childrenByNumber=[],this.childrenByName=Object.create(null);for(var K=this.element.firstChild;K!==null;K=K.nextSibling)if(K.nodeType===q1.ELEMENT_NODE){this[this.childrenByNumber.length]=K,this.childrenByNumber.push(K);var Q=K.getAttribute("id");if(Q&&!this.childrenByName[Q])this.childrenByName[Q]=K;var V=K.getAttribute("name");if(V&&this.element.namespaceURI===N1.HTML&&J.test(this.element.localName)&&!this.childrenByName[V])this.childrenByName[Q]=K}}}}});function RY($){return function(J){return J.localName===$}}function ED($){var J=Y0.toASCIILowerCase($);if(J===$)return RY($);return function(Z){return Z.isHTML?Z.localName===J:Z.localName===$}}function xD($){return function(J){return J.namespaceURI===$}}function bD($,J){return function(Z){return Z.namespaceURI===$&&Z.localName===J}}function vD($){return function(J){return $.every(function(Z){return J.classList.contains(Z)})}}function hD($){return function(J){if(J.namespaceURI!==N1.HTML)return!1;return J.getAttribute("name")===$}}});var NY=p((bb,G5)=>{G5.exports=V5;var K5=P0(),gD=n2(),Q5=X0(),Y5=Q5.HierarchyRequestError,fD=Q5.NotFoundError;function V5(){K5.call(this)}V5.prototype=Object.create(K5.prototype,{hasChildNodes:{value:function(){return!1}},firstChild:{value:null},lastChild:{value:null},insertBefore:{value:function($,J){if(!$.nodeType)throw TypeError("not a node");Y5()}},replaceChild:{value:function($,J){if(!$.nodeType)throw TypeError("not a node");Y5()}},removeChild:{value:function($){if(!$.nodeType)throw TypeError("not a node");fD()}},removeChildren:{value:function(){}},childNodes:{get:function(){if(!this._childNodes)this._childNodes=new gD;return this._childNodes}}})});var T8=p((vb,j5)=>{j5.exports=sZ;var W5=NY(),X5=X0(),mD=oZ(),uD=DY();function sZ(){W5.call(this)}sZ.prototype=Object.create(W5.prototype,{substringData:{value:function(J,Z){if(arguments.length<2)throw TypeError("Not enough arguments");if(J=J>>>0,Z=Z>>>0,J>this.data.length||J<0||Z<0)X5.IndexSizeError();return this.data.substring(J,J+Z)}},appendData:{value:function(J){if(arguments.length<1)throw TypeError("Not enough arguments");this.data+=String(J)}},insertData:{value:function(J,Z){return this.replaceData(J,0,Z)}},deleteData:{value:function(J,Z){return this.replaceData(J,Z,"")}},replaceData:{value:function(J,Z,Y){var K=this.data,Q=K.length;if(J=J>>>0,Z=Z>>>0,Y=String(Y),J>Q||J<0)X5.IndexSizeError();if(J+Z>Q)Z=Q-J;var V=K.substring(0,J),X=K.substring(J+Z);this.data=V+Y+X}},isEqual:{value:function(J){return this._data===J._data}},length:{get:function(){return this.data.length}}});Object.defineProperties(sZ.prototype,mD);Object.defineProperties(sZ.prototype,uD)});var TY=p((hb,_5)=>{_5.exports=yY;var U5=X0(),B5=P0(),H5=T8();function yY($,J){H5.call(this),this.nodeType=B5.TEXT_NODE,this.ownerDocument=$,this._data=J,this._index=void 0}var k8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if($===this._data)return;if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this);if(this.parentNode&&this.parentNode._textchangehook)this.parentNode._textchangehook(this)}};yY.prototype=Object.create(H5.prototype,{nodeName:{value:"#text"},nodeValue:k8,textContent:k8,innerText:k8,data:{get:k8.get,set:function($){k8.set.call(this,$===null?"":String($))}},splitText:{value:function(J){if(J>this._data.length||J<0)U5.IndexSizeError();var Z=this._data.substring(J),Y=this.ownerDocument.createTextNode(Z);this.data=this.data.substring(0,J);var K=this.parentNode;if(K!==null)K.insertBefore(Y,this.nextSibling);return Y}},wholeText:{get:function(){var J=this.textContent;for(var Z=this.nextSibling;Z;Z=Z.nextSibling){if(Z.nodeType!==B5.TEXT_NODE)break;J+=Z.textContent}return J}},replaceWholeText:{value:U5.nyi},clone:{value:function(){return new yY(this.ownerDocument,this._data)}}})});var EY=p((gb,q5)=>{q5.exports=kY;var dD=P0(),O5=T8();function kY($,J){O5.call(this),this.nodeType=dD.COMMENT_NODE,this.ownerDocument=$,this._data=J}var E8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};kY.prototype=Object.create(O5.prototype,{nodeName:{value:"#comment"},nodeValue:E8,textContent:E8,innerText:E8,data:{get:E8.get,set:function($){E8.set.call(this,$===null?"":String($))}},clone:{value:function(){return new kY(this.ownerDocument,this._data)}}})});var bY=p((fb,C5)=>{C5.exports=xY;var pD=P0(),cD=n2(),z5=mZ(),nZ=gJ(),lD=lZ(),F5=X0();function xY($){z5.call(this),this.nodeType=pD.DOCUMENT_FRAGMENT_NODE,this.ownerDocument=$}xY.prototype=Object.create(z5.prototype,{nodeName:{value:"#document-fragment"},nodeValue:{get:function(){return null},set:function(){}},textContent:Object.getOwnPropertyDescriptor(nZ.prototype,"textContent"),innerText:Object.getOwnPropertyDescriptor(nZ.prototype,"innerText"),querySelector:{value:function($){var J=this.querySelectorAll($);return J.length?J[0]:null}},querySelectorAll:{value:function($){var J=Object.create(this);J.isHTML=!0,J.getElementsByTagName=nZ.prototype.getElementsByTagName,J.nextElement=Object.getOwnPropertyDescriptor(nZ.prototype,"firstElementChild").get;var Z=lD($,J);return Z.item?Z:new cD(Z)}},clone:{value:function(){return new xY(this.ownerDocument)}},isEqual:{value:function(J){return!0}},innerHTML:{get:function(){return this.serialize()},set:F5.nyi},outerHTML:{get:function(){return this.serialize()},set:F5.nyi}})});var hY=p((mb,D5)=>{D5.exports=vY;var oD=P0(),M5=T8();function vY($,J,Z){M5.call(this),this.nodeType=oD.PROCESSING_INSTRUCTION_NODE,this.ownerDocument=$,this.target=J,this._data=Z}var x8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};vY.prototype=Object.create(M5.prototype,{nodeName:{get:function(){return this.target}},nodeValue:x8,textContent:x8,innerText:x8,data:{get:x8.get,set:function($){x8.set.call(this,$===null?"":String($))}},clone:{value:function(){return new vY(this.ownerDocument,this.target,this._data)}},isEqual:{value:function(J){return this.target===J.target&&this._data===J._data}}})});var b8=p((ub,P5)=>{var gY={FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048};P5.exports=gY.constructor=gY.prototype=gY});var mY=p((pb,A5)=>{var db=A5.exports={nextSkippingChildren:rD,nextAncestorSibling:fY,next:iD,previous:sD,deepLastChild:I5};function rD($,J){if($===J)return null;if($.nextSibling!==null)return $.nextSibling;return fY($,J)}function fY($,J){for($=$.parentNode;$!==null;$=$.parentNode){if($===J)return null;if($.nextSibling!==null)return $.nextSibling}return null}function iD($,J){var Z=$.firstChild;if(Z!==null)return Z;if($===J)return null;if(Z=$.nextSibling,Z!==null)return Z;return fY($,J)}function I5($){while($.lastChild)$=$.lastChild;return $}function sD($,J){var Z=$.previousSibling;if(Z!==null)return I5(Z);if(Z=$.parentNode,Z===J)return null;return Z}});var T5=p((cb,y5)=>{y5.exports=N5;var nD=P0(),I0=b8(),S5=mY(),L5=X0(),uY={first:"firstChild",last:"lastChild",next:"firstChild",previous:"lastChild"},dY={first:"nextSibling",last:"previousSibling",next:"nextSibling",previous:"previousSibling"};function w5($,J){var Z,Y,K,Q,V;Y=$._currentNode[uY[J]];while(Y!==null){if(Q=$._internalFilter(Y),Q===I0.FILTER_ACCEPT)return $._currentNode=Y,Y;if(Q===I0.FILTER_SKIP){if(Z=Y[uY[J]],Z!==null){Y=Z;continue}}while(Y!==null){if(V=Y[dY[J]],V!==null){Y=V;break}if(K=Y.parentNode,K===null||K===$.root||K===$._currentNode)return null;else Y=K}}return null}function R5($,J){var Z,Y,K;if(Z=$._currentNode,Z===$.root)return null;while(!0){K=Z[dY[J]];while(K!==null){if(Z=K,Y=$._internalFilter(Z),Y===I0.FILTER_ACCEPT)return $._currentNode=Z,Z;if(K=Z[uY[J]],Y===I0.FILTER_REJECT||K===null)K=Z[dY[J]]}if(Z=Z.parentNode,Z===null||Z===$.root)return null;if($._internalFilter(Z)===I0.FILTER_ACCEPT)return null}}function N5($,J,Z){if(!$||!$.nodeType)L5.NotSupportedError();this._root=$,this._whatToShow=Number(J)||0,this._filter=Z||null,this._active=!1,this._currentNode=$}Object.defineProperties(N5.prototype,{root:{get:function(){return this._root}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},currentNode:{get:function(){return this._currentNode},set:function(J){if(!(J instanceof nD))throw TypeError("Not a Node");this._currentNode=J}},_internalFilter:{value:function(J){var Z,Y;if(this._active)L5.InvalidStateError();if(!(1<<J.nodeType-1&this._whatToShow))return I0.FILTER_SKIP;if(Y=this._filter,Y===null)Z=I0.FILTER_ACCEPT;else{this._active=!0;try{if(typeof Y==="function")Z=Y(J);else Z=Y.acceptNode(J)}finally{this._active=!1}}return+Z}},parentNode:{value:function(){var J=this._currentNode;while(J!==this.root){if(J=J.parentNode,J===null)return null;if(this._internalFilter(J)===I0.FILTER_ACCEPT)return this._currentNode=J,J}return null}},firstChild:{value:function(){return w5(this,"first")}},lastChild:{value:function(){return w5(this,"last")}},previousSibling:{value:function(){return R5(this,"previous")}},nextSibling:{value:function(){return R5(this,"next")}},previousNode:{value:function(){var J,Z,Y,K;J=this._currentNode;while(J!==this._root){for(Y=J.previousSibling;Y;Y=J.previousSibling){if(J=Y,Z=this._internalFilter(J),Z===I0.FILTER_REJECT)continue;for(K=J.lastChild;K;K=J.lastChild)if(J=K,Z=this._internalFilter(J),Z===I0.FILTER_REJECT)break;if(Z===I0.FILTER_ACCEPT)return this._currentNode=J,J}if(J===this.root||J.parentNode===null)return null;if(J=J.parentNode,this._internalFilter(J)===I0.FILTER_ACCEPT)return this._currentNode=J,J}return null}},nextNode:{value:function(){var J,Z,Y,K;J=this._currentNode,Z=I0.FILTER_ACCEPT;$:while(!0){for(Y=J.firstChild;Y;Y=J.firstChild)if(J=Y,Z=this._internalFilter(J),Z===I0.FILTER_ACCEPT)return this._currentNode=J,J;else if(Z===I0.FILTER_REJECT)break;for(K=S5.nextSkippingChildren(J,this.root);K;K=S5.nextSkippingChildren(J,this.root))if(J=K,Z=this._internalFilter(J),Z===I0.FILTER_ACCEPT)return this._currentNode=J,J;else if(Z===I0.FILTER_SKIP)continue $;return null}}},toString:{value:function(){return"[object TreeWalker]"}}})});var h5=p((lb,v5)=>{v5.exports=b5;var pY=b8(),cY=mY(),x5=X0();function aD($,J,Z){if(Z)return cY.next($,J);else{if($===J)return null;return cY.previous($,null)}}function k5($,J){for(;J;J=J.parentNode)if($===J)return!0;return!1}function E5($,J){var Z,Y;Z=$._referenceNode,Y=$._pointerBeforeReferenceNode;while(!0){if(Y===J)Y=!Y;else if(Z=aD(Z,$._root,J),Z===null)return null;var K=$._internalFilter(Z);if(K===pY.FILTER_ACCEPT)break}return $._referenceNode=Z,$._pointerBeforeReferenceNode=Y,Z}function b5($,J,Z){if(!$||!$.nodeType)x5.NotSupportedError();this._root=$,this._referenceNode=$,this._pointerBeforeReferenceNode=!0,this._whatToShow=Number(J)||0,this._filter=Z||null,this._active=!1,$.doc._attachNodeIterator(this)}Object.defineProperties(b5.prototype,{root:{get:function(){return this._root}},referenceNode:{get:function(){return this._referenceNode}},pointerBeforeReferenceNode:{get:function(){return this._pointerBeforeReferenceNode}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},_internalFilter:{value:function(J){var Z,Y;if(this._active)x5.InvalidStateError();if(!(1<<J.nodeType-1&this._whatToShow))return pY.FILTER_SKIP;if(Y=this._filter,Y===null)Z=pY.FILTER_ACCEPT;else{this._active=!0;try{if(typeof Y==="function")Z=Y(J);else Z=Y.acceptNode(J)}finally{this._active=!1}}return+Z}},_preremove:{value:function(J){if(k5(J,this._root))return;if(!k5(J,this._referenceNode))return;if(this._pointerBeforeReferenceNode){var Z=J;while(Z.lastChild)Z=Z.lastChild;if(Z=cY.next(Z,this.root),Z){this._referenceNode=Z;return}this._pointerBeforeReferenceNode=!1}if(J.previousSibling===null)this._referenceNode=J.parentNode;else{this._referenceNode=J.previousSibling;var Y;for(Y=this._referenceNode.lastChild;Y;Y=this._referenceNode.lastChild)this._referenceNode=Y}}},nextNode:{value:function(){return E5(this,!0)}},previousNode:{value:function(){return E5(this,!1)}},detach:{value:function(){}},toString:{value:function(){return"[object NodeIterator]"}}})});var aZ=p((ob,g5)=>{g5.exports=A0;function A0($){if(!$)return Object.create(A0.prototype);this.url=$.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g,"");var J=A0.pattern.exec(this.url);if(J){if(J[2])this.scheme=J[2];if(J[4]){var Z=J[4].match(A0.userinfoPattern);if(Z)this.username=Z[1],this.password=Z[3],J[4]=J[4].substring(Z[0].length);if(J[4].match(A0.portPattern)){var Y=J[4].lastIndexOf(":");this.host=J[4].substring(0,Y),this.port=J[4].substring(Y+1)}else this.host=J[4]}if(J[5])this.path=J[5];if(J[6])this.query=J[7];if(J[8])this.fragment=J[9]}}A0.pattern=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;A0.userinfoPattern=/^([^@:]*)(:([^@]*))?@/;A0.portPattern=/:\d+$/;A0.authorityPattern=/^[^:\/?#]+:\/\//;A0.hierarchyPattern=/^[^:\/?#]+:\//;A0.percentEncode=function(J){var Z=J.charCodeAt(0);if(Z<256)return"%"+Z.toString(16);else throw Error("can't percent-encode codepoints > 255 yet")};A0.prototype={constructor:A0,isAbsolute:function(){return!!this.scheme},isAuthorityBased:function(){return A0.authorityPattern.test(this.url)},isHierarchical:function(){return A0.hierarchyPattern.test(this.url)},toString:function(){var $="";if(this.scheme!==void 0)$+=this.scheme+":";if(this.isAbsolute()){if($+="//",this.username||this.password){if($+=this.username||"",this.password)$+=":"+this.password;$+="@"}if(this.host)$+=this.host}if(this.port!==void 0)$+=":"+this.port;if(this.path!==void 0)$+=this.path;if(this.query!==void 0)$+="?"+this.query;if(this.fragment!==void 0)$+="#"+this.fragment;return $},resolve:function($){var J=this,Z=new A0($),Y=new A0;if(Z.scheme!==void 0)Y.scheme=Z.scheme,Y.username=Z.username,Y.password=Z.password,Y.host=Z.host,Y.port=Z.port,Y.path=Q(Z.path),Y.query=Z.query;else if(Y.scheme=J.scheme,Z.host!==void 0)Y.username=Z.username,Y.password=Z.password,Y.host=Z.host,Y.port=Z.port,Y.path=Q(Z.path),Y.query=Z.query;else if(Y.username=J.username,Y.password=J.password,Y.host=J.host,Y.port=J.port,!Z.path)if(Y.path=J.path,Z.query!==void 0)Y.query=Z.query;else Y.query=J.query;else{if(Z.path.charAt(0)==="/")Y.path=Q(Z.path);else Y.path=K(J.path,Z.path),Y.path=Q(Y.path);Y.query=Z.query}return Y.fragment=Z.fragment,Y.toString();function K(V,X){if(J.host!==void 0&&!J.path)return"/"+X;var W=V.lastIndexOf("/");if(W===-1)return X;else return V.substring(0,W+1)+X}function Q(V){if(!V)return V;var X="";while(V.length>0){if(V==="."||V===".."){V="";break}var W=V.substring(0,2),_=V.substring(0,3),j=V.substring(0,4);if(_==="../")V=V.substring(3);else if(W==="./")V=V.substring(2);else if(_==="/./")V="/"+V.substring(3);else if(W==="/."&&V.length===2)V="/";else if(j==="/../"||_==="/.."&&V.length===3)V="/"+V.substring(4),X=X.replace(/\/?[^\/]*$/,"");else{var H=V.match(/(\/?([^\/]*))/)[0];X+=H,V=V.substring(H.length)}}return X}}}});var u5=p((rb,m5)=>{m5.exports=lY;var f5=TJ();function lY($,J){f5.call(this,$,J)}lY.prototype=Object.create(f5.prototype,{constructor:{value:lY}})});var oY=p((ib,d5)=>{d5.exports={Event:TJ(),UIEvent:a7(),MouseEvent:e7(),CustomEvent:u5()}});var o5=p((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.hyphenate=c5.parse=void 0;function tD($){let J=[],Z=0,Y=0,K=0,Q=0,V=0,X=null;while(Z<$.length)switch($.charCodeAt(Z++)){case 40:Y++;break;case 41:Y--;break;case 39:if(K===0)K=39;else if(K===39&&$.charCodeAt(Z-1)!==92)K=0;break;case 34:if(K===0)K=34;else if(K===34&&$.charCodeAt(Z-1)!==92)K=0;break;case 58:if(!X&&Y===0&&K===0)X=p5($.substring(V,Z-1).trim()),Q=Z;break;case 59:if(X&&Q>0&&Y===0&&K===0){let _=$.substring(Q,Z-1).trim();J.push(X,_),V=Z,Q=0,X=null}break}if(X&&Q){let W=$.slice(Q).trim();J.push(X,W)}return J}c5.parse=tD;function p5($){return $.replace(/[a-z][A-Z]/g,(J)=>{return J.charAt(0)+"-"+J.charAt(1)}).toLowerCase()}c5.hyphenate=p5});var tZ=p((nb,a5)=>{var{parse:$P}=o5();a5.exports=function($){let J=new n5($);return new Proxy(J,{get:function(Y,K){return K in Y?Y[K]:Y.getPropertyValue(r5(K))},has:function(Y,K){return!0},set:function(Y,K,Q){if(K in Y)Y[K]=Q;else Y.setProperty(r5(K),Q??void 0);return!0}})};function r5($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function n5($){this._element=$}var i5="!important";function s5($){let J={property:{},priority:{}};if(!$)return J;let Z=$P($);if(Z.length<2)return J;for(let Y=0;Y<Z.length;Y+=2){let K=Z[Y],Q=Z[Y+1];if(Q.endsWith(i5))J.priority[K]="important",Q=Q.slice(0,-i5.length).trim();J.property[K]=Q}return J}var fJ={};n5.prototype=Object.create(Object.prototype,{_parsed:{get:function(){if(!this._parsedStyles||this.cssText!==this._lastParsedText){var $=this.cssText;this._parsedStyles=s5($),this._lastParsedText=$,delete this._names}return this._parsedStyles}},_serialize:{value:function(){var $=this._parsed,J="";for(var Z in $.property){if(J)J+=" ";if(J+=Z+": "+$.property[Z],$.priority[Z])J+=" !"+$.priority[Z];J+=";"}this.cssText=J,this._lastParsedText=J,delete this._names}},cssText:{get:function(){return this._element.getAttribute("style")},set:function($){this._element.setAttribute("style",$)}},length:{get:function(){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names.length}},item:{value:function($){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names[$]}},getPropertyValue:{value:function($){return $=$.toLowerCase(),this._parsed.property[$]||""}},getPropertyPriority:{value:function($){return $=$.toLowerCase(),this._parsed.priority[$]||""}},setProperty:{value:function($,J,Z){if($=$.toLowerCase(),J===null||J===void 0)J="";if(Z===null||Z===void 0)Z="";if(J!==fJ)J=""+J;if(J=J.trim(),J===""){this.removeProperty($);return}if(Z!==""&&Z!==fJ&&!/^important$/i.test(Z))return;var Y=this._parsed;if(J===fJ){if(!Y.property[$])return;if(Z!=="")Y.priority[$]="important";else delete Y.priority[$]}else{if(J.indexOf(";")!==-1)return;var K=s5($+":"+J);if(Object.getOwnPropertyNames(K.property).length===0)return;if(Object.getOwnPropertyNames(K.priority).length!==0)return;for(var Q in K.property)if(Y.property[Q]=K.property[Q],Z===fJ)continue;else if(Z!=="")Y.priority[Q]="important";else if(Y.priority[Q])delete Y.priority[Q]}this._serialize()}},setPropertyValue:{value:function($,J){return this.setProperty($,J,fJ)}},setPropertyPriority:{value:function($,J){return this.setProperty($,fJ,J)}},removeProperty:{value:function($){$=$.toLowerCase();var J=this._parsed;if($ in J.property)delete J.property[$],delete J.priority[$],this._serialize()}}})});var rY=p((ab,t5)=>{var C0=aZ();t5.exports=v8;function v8(){}v8.prototype=Object.create(Object.prototype,{_url:{get:function(){return new C0(this.href)}},protocol:{get:function(){var $=this._url;if($&&$.scheme)return $.scheme+":";else return":"},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()){if($=$.replace(/:+$/,""),$=$.replace(/[^-+\.a-zA-Z0-9]/g,C0.percentEncode),$.length>0)Z.scheme=$,J=Z.toString()}this.href=J}},host:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host+($.port?":"+$.port:"");else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isAuthorityBased()){if($=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,C0.percentEncode),$.length>0)Z.host=$,delete Z.port,J=Z.toString()}this.href=J}},hostname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isAuthorityBased()){if($=$.replace(/^\/+/,""),$=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,C0.percentEncode),$.length>0)Z.host=$,J=Z.toString()}this.href=J}},port:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased()&&$.port!==void 0)return $.port;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isAuthorityBased()){if($=""+$,$=$.replace(/[^0-9].*$/,""),$=$.replace(/^0+/,""),$.length===0)$="0";if(parseInt($,10)<=65535)Z.port=$,J=Z.toString()}this.href=J}},pathname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical())return $.path;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isHierarchical()){if($.charAt(0)!=="/")$="/"+$;$=$.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g,C0.percentEncode),Z.path=$,J=Z.toString()}this.href=J}},search:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical()&&$.query!==void 0)return"?"+$.query;else return""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()&&Z.isHierarchical()){if($.charAt(0)==="?")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,C0.percentEncode),Z.query=$,J=Z.toString()}this.href=J}},hash:{get:function(){var $=this._url;if($==null||$.fragment==null||$.fragment==="")return"";else return"#"+$.fragment},set:function($){var J=this.href,Z=new C0(J);if($.charAt(0)==="#")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,C0.percentEncode),Z.fragment=$,J=Z.toString(),this.href=J}},username:{get:function(){var $=this._url;return $.username||""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute())$=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g,C0.percentEncode),Z.username=$,J=Z.toString();this.href=J}},password:{get:function(){var $=this._url;return $.password||""},set:function($){var J=this.href,Z=new C0(J);if(Z.isAbsolute()){if($==="")Z.password=null;else $=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g,C0.percentEncode),Z.password=$;J=Z.toString()}this.href=J}},origin:{get:function(){var $=this._url;if($==null)return"";var J=function(Z){var Y=[$.scheme,$.host,+$.port||Z];return Y[0]+"://"+Y[1]+(Y[2]===Z?"":":"+Y[2])};switch($.scheme){case"ftp":return J(21);case"gopher":return J(70);case"http":case"ws":return J(80);case"https":case"wss":return J(443);default:return $.scheme+"://"}}}});v8._inherit=function($){Object.getOwnPropertyNames(v8.prototype).forEach(function(J){if(J==="constructor"||J==="href")return;var Z=Object.getOwnPropertyDescriptor(v8.prototype,J);Object.defineProperty($,J,Z)})}});var iY=p((tb,Jj)=>{var e5=_Y(),JP=hZ().isApiWritable;Jj.exports=function($,J,Z,Y){var K=$.ctor;if(K){var Q=$.props||{};if($.attributes)for(var V in $.attributes){var X=$.attributes[V];if(typeof X!=="object"||Array.isArray(X))X={type:X};if(!X.name)X.name=V.toLowerCase();Q[V]=e5.property(X)}if(Q.constructor={value:K,writable:JP},K.prototype=Object.create(($.superclass||J).prototype,Q),$.events)YP(K,$.events);Z[$.name]=K}else K=J;return($.tags||$.tag&&[$.tag]||[]).forEach(function(W){Y[W]=K}),K};function $j($,J,Z,Y){this.body=$,this.document=J,this.form=Z,this.element=Y}$j.prototype.build=function(){return()=>{}};function ZP($,J,Z,Y){var K=$.ownerDocument||Object.create(null),Q=$.form||Object.create(null);$[J]=new $j(Y,K,Q,$).build()}function YP($,J){var Z=$.prototype;J.forEach(function(Y){Object.defineProperty(Z,"on"+Y,{get:function(){return this._getEventHandler(Y)},set:function(K){this._setEventHandler(Y,K)}}),e5.registerChangeHandler($,"on"+Y,ZP)})}});var $6=p((XP)=>{var sY=P0(),Zj=gJ(),KP=tZ(),l0=X0(),Yj=rY(),QP=iY(),i1=XP.elements={},h8=Object.create(null);XP.createElement=function($,J,Z){var Y=h8[J]||GP;return new Y($,J,Z)};function o($){return QP($,K$,i1,h8)}function W0($){return{get:function(){var J=this._getattr($);if(J===null)return"";var Z=this.doc._resolve(J);return Z===null?J:Z},set:function(J){this._setattr($,J)}}}function eZ($){return{get:function(){var J=this._getattr($);if(J===null)return null;if(J.toLowerCase()==="use-credentials")return"use-credentials";return"anonymous"},set:function(J){if(J===null||J===void 0)this.removeAttribute($);else this._setattr($,J)}}}var mJ={type:["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],missing:""},VP={A:!0,LINK:!0,BUTTON:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0,COMMAND:!0},F1=function($,J,Z){K$.call(this,$,J,Z),this._form=null},K$=XP.HTMLElement=o({superclass:Zj,name:"HTMLElement",ctor:function(J,Z,Y){Zj.call(this,J,Z,l0.NAMESPACE.HTML,Y)},props:{dangerouslySetInnerHTML:{set:function($){this._innerHTML=$}},innerHTML:{get:function(){return this.serialize()},set:function($){var J=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,this);J.parse($===null?"":String($),!0);var Z=this instanceof h8.template?this.content:this;while(Z.hasChildNodes())Z.removeChild(Z.firstChild);Z.appendChild(J._asDocumentFragment())}},style:{get:function(){if(!this._style)this._style=new KP(this);return this._style},set:function($){if($===null||$===void 0)$="";this._setattr("style",String($))}},blur:{value:function(){}},focus:{value:function(){}},forceSpellCheck:{value:function(){}},click:{value:function(){if(this._click_in_progress)return;this._click_in_progress=!0;try{if(this._pre_click_activation_steps)this._pre_click_activation_steps();var $=this.ownerDocument.createEvent("MouseEvent");$.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);var J=this.dispatchEvent($);if(J){if(this._post_click_activation_steps)this._post_click_activation_steps($)}else if(this._cancelled_activation_steps)this._cancelled_activation_steps()}finally{this._click_in_progress=!1}}},submit:{value:l0.nyi}},attributes:{title:String,lang:String,dir:{type:["ltr","rtl","auto"],missing:""},draggable:{type:["true","false"],treatNullAsEmptyString:!0},spellcheck:{type:["true","false"],missing:""},enterKeyHint:{type:["enter","done","go","next","previous","search","send"],missing:""},autoCapitalize:{type:["off","on","none","sentences","words","characters"],missing:""},autoFocus:Boolean,accessKey:String,nonce:String,hidden:Boolean,translate:{type:["no","yes"],missing:""},tabIndex:{type:"long",default:function(){if(this.tagName in VP||this.contentEditable)return 0;else return-1}}},events:["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"]}),GP=o({name:"HTMLUnknownElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}}),z1={form:{get:function(){return this._form}}};o({tag:"a",name:"HTMLAnchorElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{_post_click_activation_steps:{value:function($){if(this.href)this.ownerDocument.defaultView.location=this.href}}},attributes:{href:W0,ping:String,download:String,target:String,rel:String,media:String,hreflang:String,type:String,referrerPolicy:mJ,coords:String,charset:String,name:String,rev:String,shape:String}});Yj._inherit(h8.a.prototype);o({tag:"area",name:"HTMLAreaElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{alt:String,target:String,download:String,rel:String,media:String,href:W0,hreflang:String,type:String,shape:String,coords:String,ping:String,referrerPolicy:mJ,noHref:Boolean}});Yj._inherit(h8.area.prototype);o({tag:"br",name:"HTMLBRElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{clear:String}});o({tag:"base",name:"HTMLBaseElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{target:String}});o({tag:"body",name:"HTMLBodyElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},events:["afterprint","beforeprint","beforeunload","blur","error","focus","hashchange","load","message","offline","online","pagehide","pageshow","popstate","resize","scroll","storage","unload"],attributes:{text:{type:String,treatNullAsEmptyString:!0},link:{type:String,treatNullAsEmptyString:!0},vLink:{type:String,treatNullAsEmptyString:!0},aLink:{type:String,treatNullAsEmptyString:!0},bgColor:{type:String,treatNullAsEmptyString:!0},background:String}});o({tag:"button",name:"HTMLButtonElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{name:String,value:String,disabled:Boolean,autofocus:Boolean,type:{type:["submit","reset","button","menu"],missing:"submit"},formTarget:String,formAction:W0,formNoValidate:Boolean,formMethod:{type:["get","post","dialog"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""}}});o({tag:"dl",name:"HTMLDListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{compact:Boolean}});o({tag:"data",name:"HTMLDataElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{value:String}});o({tag:"datalist",name:"HTMLDataListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"details",name:"HTMLDetailsElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{open:Boolean}});o({tag:"div",name:"HTMLDivElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"embed",name:"HTMLEmbedElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,type:String,width:String,height:String,align:String,name:String}});o({tag:"fieldset",name:"HTMLFieldSetElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{disabled:Boolean,name:String}});o({tag:"form",name:"HTMLFormElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{action:String,autocomplete:{type:["on","off"],missing:"on"},name:String,acceptCharset:{name:"accept-charset"},target:String,noValidate:Boolean,method:{type:["get","post","dialog"],invalid:"get",missing:"get"},enctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"},encoding:{name:"enctype",type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"}}});o({tag:"hr",name:"HTMLHRElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String,color:String,noShade:Boolean,size:String,width:String}});o({tag:"head",name:"HTMLHeadElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tags:["h1","h2","h3","h4","h5","h6"],name:"HTMLHeadingElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"html",name:"HTMLHtmlElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{xmlns:W0,version:String}});o({tag:"iframe",name:"HTMLIFrameElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,srcdoc:String,name:String,width:String,height:String,seamless:Boolean,allow:Boolean,allowFullscreen:Boolean,allowUserMedia:Boolean,allowPaymentRequest:Boolean,referrerPolicy:mJ,loading:{type:["eager","lazy"],treatNullAsEmptyString:!0},align:String,scrolling:String,frameBorder:String,longDesc:W0,marginHeight:{type:String,treatNullAsEmptyString:!0},marginWidth:{type:String,treatNullAsEmptyString:!0}}});o({tag:"img",name:"HTMLImageElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{alt:String,src:W0,srcset:String,crossOrigin:eZ,useMap:String,isMap:Boolean,sizes:String,height:{type:"unsigned long",default:0},width:{type:"unsigned long",default:0},referrerPolicy:mJ,loading:{type:["eager","lazy"],missing:""},name:String,lowsrc:W0,align:String,hspace:{type:"unsigned long",default:0},vspace:{type:"unsigned long",default:0},longDesc:W0,border:{type:String,treatNullAsEmptyString:!0}}});o({tag:"input",name:"HTMLInputElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:{form:z1.form,_post_click_activation_steps:{value:function($){if(this.type==="checkbox")this.checked=!this.checked;else if(this.type==="radio"){var J=this.form.getElementsByName(this.name);for(var Z=J.length-1;Z>=0;Z--){var Y=J[Z];Y.checked=Y===this}}}}},attributes:{name:String,disabled:Boolean,autofocus:Boolean,accept:String,alt:String,max:String,min:String,pattern:String,placeholder:String,step:String,dirName:String,defaultValue:{name:"value"},multiple:Boolean,required:Boolean,readOnly:Boolean,checked:Boolean,value:String,src:W0,defaultChecked:{name:"checked",type:Boolean},size:{type:"unsigned long",default:20,min:1,setmin:1},width:{type:"unsigned long",min:0,setmin:0,default:0},height:{type:"unsigned long",min:0,setmin:0,default:0},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},autocomplete:String,type:{type:["text","hidden","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"],missing:"text"},formTarget:String,formNoValidate:Boolean,formMethod:{type:["get","post"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""},align:String,useMap:String}});o({tag:"keygen",name:"HTMLKeygenElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{name:String,disabled:Boolean,autofocus:Boolean,challenge:String,keytype:{type:["rsa"],missing:""}}});o({tag:"li",name:"HTMLLIElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{value:{type:"long",default:0},type:String}});o({tag:"label",name:"HTMLLabelElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{htmlFor:{name:"for",type:String}}});o({tag:"legend",name:"HTMLLegendElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"link",name:"HTMLLinkElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{href:W0,rel:String,media:String,hreflang:String,type:String,crossOrigin:eZ,nonce:String,integrity:String,referrerPolicy:mJ,imageSizes:String,imageSrcset:String,charset:String,rev:String,target:String}});o({tag:"map",name:"HTMLMapElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{name:String}});o({tag:"menu",name:"HTMLMenuElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{type:{type:["context","popup","toolbar"],missing:"toolbar"},label:String,compact:Boolean}});o({tag:"meta",name:"HTMLMetaElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{name:String,content:String,httpEquiv:{name:"http-equiv",type:String},scheme:String}});o({tag:"meter",name:"HTMLMeterElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1});o({tags:["ins","del"],name:"HTMLModElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{cite:W0,dateTime:String}});o({tag:"ol",name:"HTMLOListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{_numitems:{get:function(){var $=0;return this.childNodes.forEach(function(J){if(J.nodeType===sY.ELEMENT_NODE&&J.tagName==="LI")$++}),$}}},attributes:{type:String,reversed:Boolean,start:{type:"long",default:function(){if(this.reversed)return this._numitems;else return 1}},compact:Boolean}});o({tag:"object",name:"HTMLObjectElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{data:W0,type:String,name:String,useMap:String,typeMustMatch:Boolean,width:String,height:String,align:String,archive:String,code:String,declare:Boolean,hspace:{type:"unsigned long",default:0},standby:String,vspace:{type:"unsigned long",default:0},codeBase:W0,codeType:String,border:{type:String,treatNullAsEmptyString:!0}}});o({tag:"optgroup",name:"HTMLOptGroupElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{disabled:Boolean,label:String}});o({tag:"option",name:"HTMLOptionElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{form:{get:function(){var $=this.parentNode;while($&&$.nodeType===sY.ELEMENT_NODE){if($.localName==="select")return $.form;$=$.parentNode}}},value:{get:function(){return this._getattr("value")||this.text},set:function($){this._setattr("value",$)}},text:{get:function(){return this.textContent.replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){this.textContent=$}}},attributes:{disabled:Boolean,defaultSelected:{name:"selected",type:Boolean},label:String}});o({tag:"output",name:"HTMLOutputElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{name:String}});o({tag:"p",name:"HTMLParagraphElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({tag:"param",name:"HTMLParamElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{name:String,value:String,type:String,valueType:String}});o({tags:["pre","listing","xmp"],name:"HTMLPreElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{width:{type:"long",default:0}}});o({tag:"progress",name:"HTMLProgressElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:z1,attributes:{max:{type:Number,float:!0,default:1,min:0}}});o({tags:["q","blockquote"],name:"HTMLQuoteElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{cite:W0}});o({tag:"script",name:"HTMLScriptElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{text:{get:function(){var $="";for(var J=0,Z=this.childNodes.length;J<Z;J++){var Y=this.childNodes[J];if(Y.nodeType===sY.TEXT_NODE)$+=Y._data}return $},set:function($){if(this.removeChildren(),$!==null&&$!=="")this.appendChild(this.ownerDocument.createTextNode($))}}},attributes:{src:W0,type:String,charset:String,referrerPolicy:mJ,defer:Boolean,async:Boolean,nomodule:Boolean,crossOrigin:eZ,nonce:String,integrity:String}});o({tag:"select",name:"HTMLSelectElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:{form:z1.form,options:{get:function(){return this.getElementsByTagName("option")}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,multiple:Boolean,required:Boolean,size:{type:"unsigned long",default:0}}});o({tag:"span",name:"HTMLSpanElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"style",name:"HTMLStyleElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{media:String,type:String,scoped:Boolean}});o({tag:"caption",name:"HTMLTableCaptionElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{align:String}});o({name:"HTMLTableCellElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{colSpan:{type:"unsigned long",default:1},rowSpan:{type:"unsigned long",default:1},scope:{type:["row","col","rowgroup","colgroup"],missing:""},abbr:String,align:String,axis:String,height:String,width:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},noWrap:Boolean,vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});o({tags:["col","colgroup"],name:"HTMLTableColElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{span:{type:"limited unsigned long with fallback",default:1,min:1},align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,width:String}});o({tag:"table",name:"HTMLTableElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,border:String,frame:String,rules:String,summary:String,width:String,bgColor:{type:String,treatNullAsEmptyString:!0},cellPadding:{type:String,treatNullAsEmptyString:!0},cellSpacing:{type:String,treatNullAsEmptyString:!0}}});o({tag:"template",name:"HTMLTemplateElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y),this._contentFragment=J._templateDoc.createDocumentFragment()},props:{content:{get:function(){return this._contentFragment}},serialize:{value:function(){return this.content.serialize()}}}});o({tag:"tr",name:"HTMLTableRowElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{cells:{get:function(){return this.querySelectorAll("td,th")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});o({tags:["thead","tfoot","tbody"],name:"HTMLTableSectionElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String}});o({tag:"textarea",name:"HTMLTextAreaElement",ctor:function(J,Z,Y){F1.call(this,J,Z,Y)},props:{form:z1.form,type:{get:function(){return"textarea"}},defaultValue:{get:function(){return this.textContent},set:function($){this.textContent=$}},value:{get:function(){return this.defaultValue},set:function($){this.defaultValue=$}},textLength:{get:function(){return this.value.length}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,placeholder:String,wrap:String,dirName:String,required:Boolean,readOnly:Boolean,rows:{type:"limited unsigned long with fallback",default:2},cols:{type:"limited unsigned long with fallback",default:20},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""}}});o({tag:"time",name:"HTMLTimeElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{dateTime:String,pubDate:Boolean}});o({tag:"title",name:"HTMLTitleElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{text:{get:function(){return this.textContent}}}});o({tag:"ul",name:"HTMLUListElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{type:String,compact:Boolean}});o({name:"HTMLMediaElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,crossOrigin:eZ,preload:{type:["metadata","none","auto",{value:"",alias:"auto"}],missing:"auto"},loop:Boolean,autoplay:Boolean,mediaGroup:String,controls:Boolean,defaultMuted:{name:"muted",type:Boolean}}});o({name:"HTMLAudioElement",tag:"audio",superclass:i1.HTMLMediaElement,ctor:function(J,Z,Y){i1.HTMLMediaElement.call(this,J,Z,Y)}});o({name:"HTMLVideoElement",tag:"video",superclass:i1.HTMLMediaElement,ctor:function(J,Z,Y){i1.HTMLMediaElement.call(this,J,Z,Y)},attributes:{poster:W0,width:{type:"unsigned long",min:0,default:0},height:{type:"unsigned long",min:0,default:0}}});o({tag:"td",name:"HTMLTableDataCellElement",superclass:i1.HTMLTableCellElement,ctor:function(J,Z,Y){i1.HTMLTableCellElement.call(this,J,Z,Y)}});o({tag:"th",name:"HTMLTableHeaderCellElement",superclass:i1.HTMLTableCellElement,ctor:function(J,Z,Y){i1.HTMLTableCellElement.call(this,J,Z,Y)}});o({tag:"frameset",name:"HTMLFrameSetElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"frame",name:"HTMLFrameElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)}});o({tag:"canvas",name:"HTMLCanvasElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{getContext:{value:l0.nyi},probablySupportsContext:{value:l0.nyi},setContext:{value:l0.nyi},transferControlToProxy:{value:l0.nyi},toDataURL:{value:l0.nyi},toBlob:{value:l0.nyi}},attributes:{width:{type:"unsigned long",default:300},height:{type:"unsigned long",default:150}}});o({tag:"dialog",name:"HTMLDialogElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{show:{value:l0.nyi},showModal:{value:l0.nyi},close:{value:l0.nyi}},attributes:{open:Boolean,returnValue:String}});o({tag:"menuitem",name:"HTMLMenuItemElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},props:{_label:{get:function(){var $=this._getattr("label");if($!==null&&$!=="")return $;return $=this.textContent,$.replace(/[ \t\n\f\r]+/g," ").trim()}},label:{get:function(){var $=this._getattr("label");if($!==null)return $;return this._label},set:function($){this._setattr("label",$)}}},attributes:{type:{type:["command","checkbox","radio"],missing:"command"},icon:W0,disabled:Boolean,checked:Boolean,radiogroup:String,default:Boolean}});o({tag:"source",name:"HTMLSourceElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{srcset:String,sizes:String,media:String,src:W0,type:String,width:String,height:String}});o({tag:"track",name:"HTMLTrackElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{src:W0,srclang:String,label:String,default:Boolean,kind:{type:["subtitles","captions","descriptions","chapters","metadata"],missing:"subtitles",invalid:"metadata"}},props:{NONE:{get:function(){return 0}},LOADING:{get:function(){return 1}},LOADED:{get:function(){return 2}},ERROR:{get:function(){return 3}},readyState:{get:l0.nyi},track:{get:l0.nyi}}});o({tag:"font",name:"HTMLFontElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{color:{type:String,treatNullAsEmptyString:!0},face:{type:String},size:{type:String}}});o({tag:"dir",name:"HTMLDirectoryElement",ctor:function(J,Z,Y){K$.call(this,J,Z,Y)},attributes:{compact:Boolean}});o({tags:["abbr","address","article","aside","b","bdi","bdo","cite","content","code","dd","dfn","dt","em","figcaption","figure","footer","header","hgroup","i","kbd","main","mark","nav","noscript","rb","rp","rt","rtc","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr","acronym","basefont","big","center","nobr","noembed","noframes","plaintext","strike","tt"]})});var tY=p((_P)=>{var Kj=gJ(),jP=iY(),UP=X0(),BP=tZ(),HP=_P.elements={},Qj=Object.create(null);_P.createElement=function($,J,Z){var Y=Qj[J]||aY;return new Y($,J,Z)};function nY($){return jP($,aY,HP,Qj)}var aY=nY({superclass:Kj,name:"SVGElement",ctor:function(J,Z,Y){Kj.call(this,J,Z,UP.NAMESPACE.SVG,Y)},props:{style:{get:function(){if(!this._style)this._style=new BP(this);return this._style}}}});nY({name:"SVGSVGElement",ctor:function(J,Z,Y){aY.call(this,J,Z,Y)},tag:"svg",props:{createSVGRect:{value:function(){return _P.createElement(this.ownerDocument,"rect",null)}}}});nY({tags:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","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","script","set","stop","style","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]})});var Xj=p((Kv,Gj)=>{Gj.exports={VALUE:1,ATTR:2,REMOVE_ATTR:3,REMOVE:4,MOVE:5,INSERT:6}});var Z6=p((Qv,zj)=>{zj.exports=f8;var L0=P0(),OP=n2(),_j=mZ(),q2=gJ(),qP=TY(),FP=EY(),g8=TJ(),zP=bY(),CP=hY(),MP=m8(),DP=T5(),PP=h5(),Wj=b8(),jj=aZ(),Uj=lZ(),IP=oY(),J6=uZ(),eY=$6(),AP=tY(),v$=X0(),uJ=Xj(),pJ=v$.NAMESPACE,$3=hZ().isApiWritable;function f8($,J){_j.call(this),this.nodeType=L0.DOCUMENT_NODE,this.isHTML=$,this._address=J||"about:blank",this.readyState="loading",this.implementation=new MP(this),this.ownerDocument=null,this._contentType=$?"text/html":"application/xml",this.doctype=null,this.documentElement=null,this._templateDocCache=null,this._nodeIterators=null,this._nid=1,this._nextnid=2,this._nodes=[null,this],this.byId=Object.create(null),this.modclock=0}var SP={event:"Event",customevent:"CustomEvent",uievent:"UIEvent",mouseevent:"MouseEvent"},wP={events:"event",htmlevents:"event",mouseevents:"mouseevent",mutationevents:"mutationevent",uievents:"uievent"},dJ=function($,J,Z){return{get:function(){var Y=$.call(this);if(Y)return Y[J];return Z},set:function(Y){var K=$.call(this);if(K)K[J]=Y}}};function Bj($,J){var Z,Y,K;if($==="")$=null;if(!J6.isValidQName(J))v$.InvalidCharacterError();if(Z=null,Y=J,K=J.indexOf(":"),K>=0)Z=J.substring(0,K),Y=J.substring(K+1);if(Z!==null&&$===null)v$.NamespaceError();if(Z==="xml"&&$!==pJ.XML)v$.NamespaceError();if((Z==="xmlns"||J==="xmlns")&&$!==pJ.XMLNS)v$.NamespaceError();if($===pJ.XMLNS&&!(Z==="xmlns"||J==="xmlns"))v$.NamespaceError();return{namespace:$,prefix:Z,localName:Y}}f8.prototype=Object.create(_j.prototype,{_setMutationHandler:{value:function($){this.mutationHandler=$}},_dispatchRendererEvent:{value:function($,J,Z){var Y=this._nodes[$];if(!Y)return;Y._dispatchEvent(new g8(J,Z),!0)}},nodeName:{value:"#document"},nodeValue:{get:function(){return null},set:function(){}},documentURI:{get:function(){return this._address},set:v$.nyi},compatMode:{get:function(){return this._quirks?"BackCompat":"CSS1Compat"}},createTextNode:{value:function($){return new qP(this,String($))}},createComment:{value:function($){return new FP(this,$)}},createDocumentFragment:{value:function(){return new zP(this)}},createProcessingInstruction:{value:function($,J){if(!J6.isValidName($)||J.indexOf("?>")!==-1)v$.InvalidCharacterError();return new CP(this,$,J)}},createAttribute:{value:function($){if($=String($),!J6.isValidName($))v$.InvalidCharacterError();if(this.isHTML)$=v$.toASCIILowerCase($);return new q2._Attr(null,$,null,null,"")}},createAttributeNS:{value:function($,J){$=$===null||$===void 0||$===""?null:String($),J=String(J);var Z=Bj($,J);return new q2._Attr(null,Z.localName,Z.prefix,Z.namespace,"")}},createElement:{value:function($){if($=String($),!J6.isValidName($))v$.InvalidCharacterError();if(this.isHTML){if(/[A-Z]/.test($))$=v$.toASCIILowerCase($);return eY.createElement(this,$,null)}else if(this.contentType==="application/xhtml+xml")return eY.createElement(this,$,null);else return new q2(this,$,null,null)},writable:$3},createElementNS:{value:function($,J){$=$===null||$===void 0||$===""?null:String($),J=String(J);var Z=Bj($,J);return this._createElementNS(Z.localName,Z.namespace,Z.prefix)},writable:$3},_createElementNS:{value:function($,J,Z){if(J===pJ.HTML)return eY.createElement(this,$,Z);else if(J===pJ.SVG)return AP.createElement(this,$,Z);return new q2(this,$,J,Z)}},createEvent:{value:function(J){J=J.toLowerCase();var Z=wP[J]||J,Y=IP[SP[Z]];if(Y){var K=new Y;return K._initialized=!1,K}else v$.NotSupportedError()}},createTreeWalker:{value:function($,J,Z){if(!$)throw TypeError("root argument is required");if(!($ instanceof L0))throw TypeError("root not a node");return J=J===void 0?Wj.SHOW_ALL:+J,Z=Z===void 0?null:Z,new DP($,J,Z)}},createNodeIterator:{value:function($,J,Z){if(!$)throw TypeError("root argument is required");if(!($ instanceof L0))throw TypeError("root not a node");return J=J===void 0?Wj.SHOW_ALL:+J,Z=Z===void 0?null:Z,new PP($,J,Z)}},_attachNodeIterator:{value:function($){if(!this._nodeIterators)this._nodeIterators=[];this._nodeIterators.push($)}},_detachNodeIterator:{value:function($){var J=this._nodeIterators.indexOf($);this._nodeIterators.splice(J,1)}},_preremoveNodeIterators:{value:function($){if(this._nodeIterators)this._nodeIterators.forEach(function(J){J._preremove($)})}},_updateDocTypeElement:{value:function(){this.doctype=this.documentElement=null;for(var J=this.firstChild;J!==null;J=J.nextSibling)if(J.nodeType===L0.DOCUMENT_TYPE_NODE)this.doctype=J;else if(J.nodeType===L0.ELEMENT_NODE)this.documentElement=J}},insertBefore:{value:function(J,Z){return L0.prototype.insertBefore.call(this,J,Z),this._updateDocTypeElement(),J}},replaceChild:{value:function(J,Z){return L0.prototype.replaceChild.call(this,J,Z),this._updateDocTypeElement(),Z}},removeChild:{value:function(J){return L0.prototype.removeChild.call(this,J),this._updateDocTypeElement(),J}},getElementById:{value:function($){var J=this.byId[$];if(!J)return null;if(J instanceof s1)return J.getFirst();return J}},_hasMultipleElementsWithId:{value:function($){return this.byId[$]instanceof s1}},getElementsByName:{value:q2.prototype.getElementsByName},getElementsByTagName:{value:q2.prototype.getElementsByTagName},getElementsByTagNameNS:{value:q2.prototype.getElementsByTagNameNS},getElementsByClassName:{value:q2.prototype.getElementsByClassName},adoptNode:{value:function(J){if(J.nodeType===L0.DOCUMENT_NODE)v$.NotSupportedError();if(J.nodeType===L0.ATTRIBUTE_NODE)return J;if(J.parentNode)J.parentNode.removeChild(J);if(J.ownerDocument!==this)Fj(J,this);return J}},importNode:{value:function(J,Z){return this.adoptNode(J.cloneNode(Z))},writable:$3},origin:{get:function(){return null}},characterSet:{get:function(){return"UTF-8"}},contentType:{get:function(){return this._contentType}},URL:{get:function(){return this._address}},domain:{get:v$.nyi,set:v$.nyi},referrer:{get:v$.nyi},cookie:{get:v$.nyi,set:v$.nyi},lastModified:{get:v$.nyi},location:{get:function(){return this.defaultView?this.defaultView.location:null},set:v$.nyi},_titleElement:{get:function(){return this.getElementsByTagName("title").item(0)||null}},title:{get:function(){var $=this._titleElement,J=$?$.textContent:"";return J.replace(/[ \t\n\r\f]+/g," ").replace(/(^ )|( $)/g,"")},set:function($){var J=this._titleElement,Z=this.head;if(!J&&!Z)return;if(!J)J=this.createElement("title"),Z.appendChild(J);J.textContent=$}},dir:dJ(function(){var $=this.documentElement;if($&&$.tagName==="HTML")return $},"dir",""),fgColor:dJ(function(){return this.body},"text",""),linkColor:dJ(function(){return this.body},"link",""),vlinkColor:dJ(function(){return this.body},"vLink",""),alinkColor:dJ(function(){return this.body},"aLink",""),bgColor:dJ(function(){return this.body},"bgColor",""),charset:{get:function(){return this.characterSet}},inputEncoding:{get:function(){return this.characterSet}},scrollingElement:{get:function(){return this._quirks?this.body:this.documentElement}},body:{get:function(){return Hj(this.documentElement,"body")},set:v$.nyi},head:{get:function(){return Hj(this.documentElement,"head")}},images:{get:v$.nyi},embeds:{get:v$.nyi},plugins:{get:v$.nyi},links:{get:v$.nyi},forms:{get:v$.nyi},scripts:{get:v$.nyi},applets:{get:function(){return[]}},activeElement:{get:function(){return null}},innerHTML:{get:function(){return this.serialize()},set:v$.nyi},outerHTML:{get:function(){return this.serialize()},set:v$.nyi},write:{value:function($){if(!this.isHTML)v$.InvalidStateError();if(!this._parser)return;if(!this._parser);var J=arguments.join("");this._parser.parse(J)}},writeln:{value:function(J){this.write(Array.prototype.join.call(arguments,"")+`
32
+ `)}},open:{value:function(){this.documentElement=null}},close:{value:function(){if(this.readyState="interactive",this._dispatchEvent(new g8("readystatechange"),!0),this._dispatchEvent(new g8("DOMContentLoaded"),!0),this.readyState="complete",this._dispatchEvent(new g8("readystatechange"),!0),this.defaultView)this.defaultView._dispatchEvent(new g8("load"),!0)}},clone:{value:function(){var J=new f8(this.isHTML,this._address);return J._quirks=this._quirks,J._contentType=this._contentType,J}},cloneNode:{value:function(J){var Z=L0.prototype.cloneNode.call(this,!1);if(J)for(var Y=this.firstChild;Y!==null;Y=Y.nextSibling)Z._appendChild(Z.importNode(Y,!0));return Z._updateDocTypeElement(),Z}},isEqual:{value:function(J){return!0}},mutateValue:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.VALUE,target:$,data:$.data})}},mutateAttr:{value:function($,J){if(this.mutationHandler)this.mutationHandler({type:uJ.ATTR,target:$.ownerElement,attr:$})}},mutateRemoveAttr:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.REMOVE_ATTR,target:$.ownerElement,attr:$})}},mutateRemove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.REMOVE,target:$.parentNode,node:$});qj($)}},mutateInsert:{value:function($){if(Oj($),this.mutationHandler)this.mutationHandler({type:uJ.INSERT,target:$.parentNode,node:$})}},mutateMove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:uJ.MOVE,target:$})}},addId:{value:function(J,Z){var Y=this.byId[J];if(!Y)this.byId[J]=Z;else{if(!(Y instanceof s1))Y=new s1(Y),this.byId[J]=Y;Y.add(Z)}}},delId:{value:function(J,Z){var Y=this.byId[J];if(v$.assert(Y),Y instanceof s1){if(Y.del(Z),Y.length===1)this.byId[J]=Y.downgrade()}else this.byId[J]=void 0}},_resolve:{value:function($){return new jj(this._documentBaseURL).resolve($)}},_documentBaseURL:{get:function(){var $=this._address;if($==="about:blank")$="/";var J=this.querySelector("base[href]");if(J)return new jj($).resolve(J.getAttribute("href"));return $}},_templateDoc:{get:function(){if(!this._templateDocCache){var $=new f8(this.isHTML,this._address);this._templateDocCache=$._templateDocCache=$}return this._templateDocCache}},querySelector:{value:function($){return Uj($,this)[0]}},querySelectorAll:{value:function($){var J=Uj($,this);return J.item?J:new OP(J)}}});var RP=["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"];RP.forEach(function($){Object.defineProperty(f8.prototype,"on"+$,{get:function(){return this._getEventHandler($)},set:function(J){this._setEventHandler($,J)}})});function Hj($,J){if($&&$.isHTML){for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)if(Z.nodeType===L0.ELEMENT_NODE&&Z.localName===J&&Z.namespaceURI===pJ.HTML)return Z}return null}function LP($){if($._nid=$.ownerDocument._nextnid++,$.ownerDocument._nodes[$._nid]=$,$.nodeType===L0.ELEMENT_NODE){var J=$.getAttribute("id");if(J)$.ownerDocument.addId(J,$);if($._roothook)$._roothook()}}function NP($){if($.nodeType===L0.ELEMENT_NODE){var J=$.getAttribute("id");if(J)$.ownerDocument.delId(J,$)}$.ownerDocument._nodes[$._nid]=void 0,$._nid=void 0}function Oj($){if(LP($),$.nodeType===L0.ELEMENT_NODE)for(var J=$.firstChild;J!==null;J=J.nextSibling)Oj(J)}function qj($){NP($);for(var J=$.firstChild;J!==null;J=J.nextSibling)qj(J)}function Fj($,J){if($.ownerDocument=J,$._lastModTime=void 0,Object.prototype.hasOwnProperty.call($,"_tagName"))$._tagName=void 0;for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)Fj(Z,J)}function s1($){this.nodes=Object.create(null),this.nodes[$._nid]=$,this.length=1,this.firstNode=void 0}s1.prototype.add=function($){if(!this.nodes[$._nid])this.nodes[$._nid]=$,this.length++,this.firstNode=void 0};s1.prototype.del=function($){if(this.nodes[$._nid])delete this.nodes[$._nid],this.length--,this.firstNode=void 0};s1.prototype.getFirst=function(){if(!this.firstNode){var $;for($ in this.nodes)if(this.firstNode===void 0||this.firstNode.compareDocumentPosition(this.nodes[$])&L0.DOCUMENT_POSITION_PRECEDING)this.firstNode=this.nodes[$]}return this.firstNode};s1.prototype.downgrade=function(){if(this.length===1){var $;for($ in this.nodes)return this.nodes[$]}return this}});var K6=p((Vv,Mj)=>{Mj.exports=Y6;var yP=P0(),Cj=NY(),TP=oZ();function Y6($,J,Z,Y){Cj.call(this),this.nodeType=yP.DOCUMENT_TYPE_NODE,this.ownerDocument=$||null,this.name=J,this.publicId=Z||"",this.systemId=Y||""}Y6.prototype=Object.create(Cj.prototype,{nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return null},set:function(){}},clone:{value:function(){return new Y6(this.ownerDocument,this.name,this.publicId,this.systemId)}},isEqual:{value:function(J){return this.name===J.name&&this.publicId===J.publicId&&this.systemId===J.systemId}}});Object.defineProperties(Y6.prototype,TP)});var U6=p((Gv,pj)=>{pj.exports=b$;var kP=Z6(),EP=K6(),J3=P0(),X$=X0().NAMESPACE,bj=$6(),u$=bj.elements,t2=Function.prototype.apply.bind(Array.prototype.push),Q6=-1,cJ=1,N0=2,N$=3,y1=4,xP=5,bP=[],vP=/^HTML$|^-\/\/W3O\/\/DTD W3 HTML Strict 3\.0\/\/EN\/\/$|^-\/W3C\/DTD HTML 4\.0 Transitional\/EN$|^\+\/\/Silmaril\/\/dtd html Pro v0r11 19970101\/\/|^-\/\/AdvaSoft Ltd\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/AS\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict\/\/|^-\/\/IETF\/\/DTD HTML 2\.0\/\/|^-\/\/IETF\/\/DTD HTML 2\.1E\/\/|^-\/\/IETF\/\/DTD HTML 3\.0\/\/|^-\/\/IETF\/\/DTD HTML 3\.2 Final\/\/|^-\/\/IETF\/\/DTD HTML 3\.2\/\/|^-\/\/IETF\/\/DTD HTML 3\/\/|^-\/\/IETF\/\/DTD HTML Level 0\/\/|^-\/\/IETF\/\/DTD HTML Level 1\/\/|^-\/\/IETF\/\/DTD HTML Level 2\/\/|^-\/\/IETF\/\/DTD HTML Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 0\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict\/\/|^-\/\/IETF\/\/DTD HTML\/\/|^-\/\/Metrius\/\/DTD Metrius Presentational\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 Tables\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 Tables\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD HTML\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD Strict HTML\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML 2\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended 1\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended Relaxed 1\.0\/\/|^-\/\/SoftQuad Software\/\/DTD HoTMetaL PRO 6\.0::19990601::extensions to HTML 4\.0\/\/|^-\/\/SoftQuad\/\/DTD HoTMetaL PRO 4\.0::19971010::extensions to HTML 4\.0\/\/|^-\/\/Spyglass\/\/DTD HTML 2\.0 Extended\/\/|^-\/\/SQ\/\/DTD HTML 2\.0 HoTMetaL \+ extensions\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava HTML\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava Strict HTML\/\/|^-\/\/W3C\/\/DTD HTML 3 1995-03-24\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Draft\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Final\/\/|^-\/\/W3C\/\/DTD HTML 3\.2\/\/|^-\/\/W3C\/\/DTD HTML 3\.2S Draft\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Transitional\/\/|^-\/\/W3C\/\/DTD HTML Experimental 19960712\/\/|^-\/\/W3C\/\/DTD HTML Experimental 970421\/\/|^-\/\/W3C\/\/DTD W3 HTML\/\/|^-\/\/W3O\/\/DTD W3 HTML 3\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML 2\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML\/\//i,hP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Dj=/^-\/\/W3C\/\/DTD HTML 4\.01 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\//i,gP=/^-\/\/W3C\/\/DTD XHTML 1\.0 Frameset\/\/|^-\/\/W3C\/\/DTD XHTML 1\.0 Transitional\/\//i,$J=Object.create(null);$J[X$.HTML]={__proto__:null,address:!0,applet:!0,area:!0,article:!0,aside:!0,base:!0,basefont:!0,bgsound:!0,blockquote:!0,body:!0,br:!0,button:!0,caption:!0,center:!0,col:!0,colgroup:!0,dd:!0,details:!0,dir:!0,div:!0,dl:!0,dt:!0,embed:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,frame:!0,frameset:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,head:!0,header:!0,hgroup:!0,hr:!0,html:!0,iframe:!0,img:!0,input:!0,li:!0,link:!0,listing:!0,main:!0,marquee:!0,menu:!0,meta:!0,nav:!0,noembed:!0,noframes:!0,noscript:!0,object:!0,ol:!0,p:!0,param:!0,plaintext:!0,pre:!0,script:!0,section:!0,select:!0,source:!0,style:!0,summary:!0,table:!0,tbody:!0,td:!0,template:!0,textarea:!0,tfoot:!0,th:!0,thead:!0,title:!0,tr:!0,track:!0,ul:!0,wbr:!0,xmp:!0};$J[X$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};$J[X$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};var K3=Object.create(null);K3[X$.HTML]={__proto__:null,address:!0,div:!0,p:!0};var vj=Object.create(null);vj[X$.HTML]={__proto__:null,dd:!0,dt:!0};var lJ=Object.create(null);lJ[X$.HTML]={__proto__:null,table:!0,thead:!0,tbody:!0,tfoot:!0,tr:!0};var hj=Object.create(null);hj[X$.HTML]={__proto__:null,dd:!0,dt:!0,li:!0,menuitem:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0};var gj=Object.create(null);gj[X$.HTML]={__proto__:null,caption:!0,colgroup:!0,dd:!0,dt:!0,li:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0,tbody:!0,td:!0,tfoot:!0,th:!0,thead:!0,tr:!0};var X6=Object.create(null);X6[X$.HTML]={__proto__:null,table:!0,template:!0,html:!0};var W6=Object.create(null);W6[X$.HTML]={__proto__:null,tbody:!0,tfoot:!0,thead:!0,template:!0,html:!0};var Q3=Object.create(null);Q3[X$.HTML]={__proto__:null,tr:!0,template:!0,html:!0};var fj=Object.create(null);fj[X$.HTML]={__proto__:null,button:!0,fieldset:!0,input:!0,keygen:!0,object:!0,output:!0,select:!0,textarea:!0,img:!0};var T1=Object.create(null);T1[X$.HTML]={__proto__:null,applet:!0,caption:!0,html:!0,table:!0,td:!0,th:!0,marquee:!0,object:!0,template:!0};T1[X$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};T1[X$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var j6=Object.create(T1);j6[X$.HTML]=Object.create(T1[X$.HTML]);j6[X$.HTML].ol=!0;j6[X$.HTML].ul=!0;var V3=Object.create(T1);V3[X$.HTML]=Object.create(T1[X$.HTML]);V3[X$.HTML].button=!0;var mj=Object.create(null);mj[X$.HTML]={__proto__:null,html:!0,table:!0,template:!0};var fP=Object.create(null);fP[X$.HTML]={__proto__:null,optgroup:!0,option:!0};var uj=Object.create(null);uj[X$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0};var dj=Object.create(null);dj[X$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var Pj={__proto__:null,"xlink:actuate":X$.XLINK,"xlink:arcrole":X$.XLINK,"xlink:href":X$.XLINK,"xlink:role":X$.XLINK,"xlink:show":X$.XLINK,"xlink:title":X$.XLINK,"xlink:type":X$.XLINK,"xml:base":X$.XML,"xml:lang":X$.XML,"xml:space":X$.XML,xmlns:X$.XMLNS,"xmlns:xlink":X$.XMLNS},Ij={__proto__:null,attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Aj={__proto__:null,altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Sj={__proto__:null,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},mP={__proto__:null,AElig:198,"AElig;":198,AMP:38,"AMP;":38,Aacute:193,"Aacute;":193,"Abreve;":258,Acirc:194,"Acirc;":194,"Acy;":1040,"Afr;":[55349,56580],Agrave:192,"Agrave;":192,"Alpha;":913,"Amacr;":256,"And;":10835,"Aogon;":260,"Aopf;":[55349,56632],"ApplyFunction;":8289,Aring:197,"Aring;":197,"Ascr;":[55349,56476],"Assign;":8788,Atilde:195,"Atilde;":195,Auml:196,"Auml;":196,"Backslash;":8726,"Barv;":10983,"Barwed;":8966,"Bcy;":1041,"Because;":8757,"Bernoullis;":8492,"Beta;":914,"Bfr;":[55349,56581],"Bopf;":[55349,56633],"Breve;":728,"Bscr;":8492,"Bumpeq;":8782,"CHcy;":1063,COPY:169,"COPY;":169,"Cacute;":262,"Cap;":8914,"CapitalDifferentialD;":8517,"Cayleys;":8493,"Ccaron;":268,Ccedil:199,"Ccedil;":199,"Ccirc;":264,"Cconint;":8752,"Cdot;":266,"Cedilla;":184,"CenterDot;":183,"Cfr;":8493,"Chi;":935,"CircleDot;":8857,"CircleMinus;":8854,"CirclePlus;":8853,"CircleTimes;":8855,"ClockwiseContourIntegral;":8754,"CloseCurlyDoubleQuote;":8221,"CloseCurlyQuote;":8217,"Colon;":8759,"Colone;":10868,"Congruent;":8801,"Conint;":8751,"ContourIntegral;":8750,"Copf;":8450,"Coproduct;":8720,"CounterClockwiseContourIntegral;":8755,"Cross;":10799,"Cscr;":[55349,56478],"Cup;":8915,"CupCap;":8781,"DD;":8517,"DDotrahd;":10513,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Dagger;":8225,"Darr;":8609,"Dashv;":10980,"Dcaron;":270,"Dcy;":1044,"Del;":8711,"Delta;":916,"Dfr;":[55349,56583],"DiacriticalAcute;":180,"DiacriticalDot;":729,"DiacriticalDoubleAcute;":733,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"Diamond;":8900,"DifferentialD;":8518,"Dopf;":[55349,56635],"Dot;":168,"DotDot;":8412,"DotEqual;":8784,"DoubleContourIntegral;":8751,"DoubleDot;":168,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DoubleLeftRightArrow;":8660,"DoubleLeftTee;":10980,"DoubleLongLeftArrow;":10232,"DoubleLongLeftRightArrow;":10234,"DoubleLongRightArrow;":10233,"DoubleRightArrow;":8658,"DoubleRightTee;":8872,"DoubleUpArrow;":8657,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownArrow;":8595,"DownArrowBar;":10515,"DownArrowUpArrow;":8693,"DownBreve;":785,"DownLeftRightVector;":10576,"DownLeftTeeVector;":10590,"DownLeftVector;":8637,"DownLeftVectorBar;":10582,"DownRightTeeVector;":10591,"DownRightVector;":8641,"DownRightVectorBar;":10583,"DownTee;":8868,"DownTeeArrow;":8615,"Downarrow;":8659,"Dscr;":[55349,56479],"Dstrok;":272,"ENG;":330,ETH:208,"ETH;":208,Eacute:201,"Eacute;":201,"Ecaron;":282,Ecirc:202,"Ecirc;":202,"Ecy;":1069,"Edot;":278,"Efr;":[55349,56584],Egrave:200,"Egrave;":200,"Element;":8712,"Emacr;":274,"EmptySmallSquare;":9723,"EmptyVerySmallSquare;":9643,"Eogon;":280,"Eopf;":[55349,56636],"Epsilon;":917,"Equal;":10869,"EqualTilde;":8770,"Equilibrium;":8652,"Escr;":8496,"Esim;":10867,"Eta;":919,Euml:203,"Euml;":203,"Exists;":8707,"ExponentialE;":8519,"Fcy;":1060,"Ffr;":[55349,56585],"FilledSmallSquare;":9724,"FilledVerySmallSquare;":9642,"Fopf;":[55349,56637],"ForAll;":8704,"Fouriertrf;":8497,"Fscr;":8497,"GJcy;":1027,GT:62,"GT;":62,"Gamma;":915,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"Gcirc;":284,"Gcy;":1043,"Gdot;":288,"Gfr;":[55349,56586],"Gg;":8921,"Gopf;":[55349,56638],"GreaterEqual;":8805,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"GreaterGreater;":10914,"GreaterLess;":8823,"GreaterSlantEqual;":10878,"GreaterTilde;":8819,"Gscr;":[55349,56482],"Gt;":8811,"HARDcy;":1066,"Hacek;":711,"Hat;":94,"Hcirc;":292,"Hfr;":8460,"HilbertSpace;":8459,"Hopf;":8461,"HorizontalLine;":9472,"Hscr;":8459,"Hstrok;":294,"HumpDownHump;":8782,"HumpEqual;":8783,"IEcy;":1045,"IJlig;":306,"IOcy;":1025,Iacute:205,"Iacute;":205,Icirc:206,"Icirc;":206,"Icy;":1048,"Idot;":304,"Ifr;":8465,Igrave:204,"Igrave;":204,"Im;":8465,"Imacr;":298,"ImaginaryI;":8520,"Implies;":8658,"Int;":8748,"Integral;":8747,"Intersection;":8898,"InvisibleComma;":8291,"InvisibleTimes;":8290,"Iogon;":302,"Iopf;":[55349,56640],"Iota;":921,"Iscr;":8464,"Itilde;":296,"Iukcy;":1030,Iuml:207,"Iuml;":207,"Jcirc;":308,"Jcy;":1049,"Jfr;":[55349,56589],"Jopf;":[55349,56641],"Jscr;":[55349,56485],"Jsercy;":1032,"Jukcy;":1028,"KHcy;":1061,"KJcy;":1036,"Kappa;":922,"Kcedil;":310,"Kcy;":1050,"Kfr;":[55349,56590],"Kopf;":[55349,56642],"Kscr;":[55349,56486],"LJcy;":1033,LT:60,"LT;":60,"Lacute;":313,"Lambda;":923,"Lang;":10218,"Laplacetrf;":8466,"Larr;":8606,"Lcaron;":317,"Lcedil;":315,"Lcy;":1051,"LeftAngleBracket;":10216,"LeftArrow;":8592,"LeftArrowBar;":8676,"LeftArrowRightArrow;":8646,"LeftCeiling;":8968,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVector;":8643,"LeftDownVectorBar;":10585,"LeftFloor;":8970,"LeftRightArrow;":8596,"LeftRightVector;":10574,"LeftTee;":8867,"LeftTeeArrow;":8612,"LeftTeeVector;":10586,"LeftTriangle;":8882,"LeftTriangleBar;":10703,"LeftTriangleEqual;":8884,"LeftUpDownVector;":10577,"LeftUpTeeVector;":10592,"LeftUpVector;":8639,"LeftUpVectorBar;":10584,"LeftVector;":8636,"LeftVectorBar;":10578,"Leftarrow;":8656,"Leftrightarrow;":8660,"LessEqualGreater;":8922,"LessFullEqual;":8806,"LessGreater;":8822,"LessLess;":10913,"LessSlantEqual;":10877,"LessTilde;":8818,"Lfr;":[55349,56591],"Ll;":8920,"Lleftarrow;":8666,"Lmidot;":319,"LongLeftArrow;":10229,"LongLeftRightArrow;":10231,"LongRightArrow;":10230,"Longleftarrow;":10232,"Longleftrightarrow;":10234,"Longrightarrow;":10233,"Lopf;":[55349,56643],"LowerLeftArrow;":8601,"LowerRightArrow;":8600,"Lscr;":8466,"Lsh;":8624,"Lstrok;":321,"Lt;":8810,"Map;":10501,"Mcy;":1052,"MediumSpace;":8287,"Mellintrf;":8499,"Mfr;":[55349,56592],"MinusPlus;":8723,"Mopf;":[55349,56644],"Mscr;":8499,"Mu;":924,"NJcy;":1034,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ncy;":1053,"NegativeMediumSpace;":8203,"NegativeThickSpace;":8203,"NegativeThinSpace;":8203,"NegativeVeryThinSpace;":8203,"NestedGreaterGreater;":8811,"NestedLessLess;":8810,"NewLine;":10,"Nfr;":[55349,56593],"NoBreak;":8288,"NonBreakingSpace;":160,"Nopf;":8469,"Not;":10988,"NotCongruent;":8802,"NotCupCap;":8813,"NotDoubleVerticalBar;":8742,"NotElement;":8713,"NotEqual;":8800,"NotEqualTilde;":[8770,824],"NotExists;":8708,"NotGreater;":8815,"NotGreaterEqual;":8817,"NotGreaterFullEqual;":[8807,824],"NotGreaterGreater;":[8811,824],"NotGreaterLess;":8825,"NotGreaterSlantEqual;":[10878,824],"NotGreaterTilde;":8821,"NotHumpDownHump;":[8782,824],"NotHumpEqual;":[8783,824],"NotLeftTriangle;":8938,"NotLeftTriangleBar;":[10703,824],"NotLeftTriangleEqual;":8940,"NotLess;":8814,"NotLessEqual;":8816,"NotLessGreater;":8824,"NotLessLess;":[8810,824],"NotLessSlantEqual;":[10877,824],"NotLessTilde;":8820,"NotNestedGreaterGreater;":[10914,824],"NotNestedLessLess;":[10913,824],"NotPrecedes;":8832,"NotPrecedesEqual;":[10927,824],"NotPrecedesSlantEqual;":8928,"NotReverseElement;":8716,"NotRightTriangle;":8939,"NotRightTriangleBar;":[10704,824],"NotRightTriangleEqual;":8941,"NotSquareSubset;":[8847,824],"NotSquareSubsetEqual;":8930,"NotSquareSuperset;":[8848,824],"NotSquareSupersetEqual;":8931,"NotSubset;":[8834,8402],"NotSubsetEqual;":8840,"NotSucceeds;":8833,"NotSucceedsEqual;":[10928,824],"NotSucceedsSlantEqual;":8929,"NotSucceedsTilde;":[8831,824],"NotSuperset;":[8835,8402],"NotSupersetEqual;":8841,"NotTilde;":8769,"NotTildeEqual;":8772,"NotTildeFullEqual;":8775,"NotTildeTilde;":8777,"NotVerticalBar;":8740,"Nscr;":[55349,56489],Ntilde:209,"Ntilde;":209,"Nu;":925,"OElig;":338,Oacute:211,"Oacute;":211,Ocirc:212,"Ocirc;":212,"Ocy;":1054,"Odblac;":336,"Ofr;":[55349,56594],Ograve:210,"Ograve;":210,"Omacr;":332,"Omega;":937,"Omicron;":927,"Oopf;":[55349,56646],"OpenCurlyDoubleQuote;":8220,"OpenCurlyQuote;":8216,"Or;":10836,"Oscr;":[55349,56490],Oslash:216,"Oslash;":216,Otilde:213,"Otilde;":213,"Otimes;":10807,Ouml:214,"Ouml;":214,"OverBar;":8254,"OverBrace;":9182,"OverBracket;":9140,"OverParenthesis;":9180,"PartialD;":8706,"Pcy;":1055,"Pfr;":[55349,56595],"Phi;":934,"Pi;":928,"PlusMinus;":177,"Poincareplane;":8460,"Popf;":8473,"Pr;":10939,"Precedes;":8826,"PrecedesEqual;":10927,"PrecedesSlantEqual;":8828,"PrecedesTilde;":8830,"Prime;":8243,"Product;":8719,"Proportion;":8759,"Proportional;":8733,"Pscr;":[55349,56491],"Psi;":936,QUOT:34,"QUOT;":34,"Qfr;":[55349,56596],"Qopf;":8474,"Qscr;":[55349,56492],"RBarr;":10512,REG:174,"REG;":174,"Racute;":340,"Rang;":10219,"Rarr;":8608,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"Rcy;":1056,"Re;":8476,"ReverseElement;":8715,"ReverseEquilibrium;":8651,"ReverseUpEquilibrium;":10607,"Rfr;":8476,"Rho;":929,"RightAngleBracket;":10217,"RightArrow;":8594,"RightArrowBar;":8677,"RightArrowLeftArrow;":8644,"RightCeiling;":8969,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVector;":8642,"RightDownVectorBar;":10581,"RightFloor;":8971,"RightTee;":8866,"RightTeeArrow;":8614,"RightTeeVector;":10587,"RightTriangle;":8883,"RightTriangleBar;":10704,"RightTriangleEqual;":8885,"RightUpDownVector;":10575,"RightUpTeeVector;":10588,"RightUpVector;":8638,"RightUpVectorBar;":10580,"RightVector;":8640,"RightVectorBar;":10579,"Rightarrow;":8658,"Ropf;":8477,"RoundImplies;":10608,"Rrightarrow;":8667,"Rscr;":8475,"Rsh;":8625,"RuleDelayed;":10740,"SHCHcy;":1065,"SHcy;":1064,"SOFTcy;":1068,"Sacute;":346,"Sc;":10940,"Scaron;":352,"Scedil;":350,"Scirc;":348,"Scy;":1057,"Sfr;":[55349,56598],"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"ShortRightArrow;":8594,"ShortUpArrow;":8593,"Sigma;":931,"SmallCircle;":8728,"Sopf;":[55349,56650],"Sqrt;":8730,"Square;":9633,"SquareIntersection;":8851,"SquareSubset;":8847,"SquareSubsetEqual;":8849,"SquareSuperset;":8848,"SquareSupersetEqual;":8850,"SquareUnion;":8852,"Sscr;":[55349,56494],"Star;":8902,"Sub;":8912,"Subset;":8912,"SubsetEqual;":8838,"Succeeds;":8827,"SucceedsEqual;":10928,"SucceedsSlantEqual;":8829,"SucceedsTilde;":8831,"SuchThat;":8715,"Sum;":8721,"Sup;":8913,"Superset;":8835,"SupersetEqual;":8839,"Supset;":8913,THORN:222,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"TScy;":1062,"Tab;":9,"Tau;":932,"Tcaron;":356,"Tcedil;":354,"Tcy;":1058,"Tfr;":[55349,56599],"Therefore;":8756,"Theta;":920,"ThickSpace;":[8287,8202],"ThinSpace;":8201,"Tilde;":8764,"TildeEqual;":8771,"TildeFullEqual;":8773,"TildeTilde;":8776,"Topf;":[55349,56651],"TripleDot;":8411,"Tscr;":[55349,56495],"Tstrok;":358,Uacute:218,"Uacute;":218,"Uarr;":8607,"Uarrocir;":10569,"Ubrcy;":1038,"Ubreve;":364,Ucirc:219,"Ucirc;":219,"Ucy;":1059,"Udblac;":368,"Ufr;":[55349,56600],Ugrave:217,"Ugrave;":217,"Umacr;":362,"UnderBar;":95,"UnderBrace;":9183,"UnderBracket;":9141,"UnderParenthesis;":9181,"Union;":8899,"UnionPlus;":8846,"Uogon;":370,"Uopf;":[55349,56652],"UpArrow;":8593,"UpArrowBar;":10514,"UpArrowDownArrow;":8645,"UpDownArrow;":8597,"UpEquilibrium;":10606,"UpTee;":8869,"UpTeeArrow;":8613,"Uparrow;":8657,"Updownarrow;":8661,"UpperLeftArrow;":8598,"UpperRightArrow;":8599,"Upsi;":978,"Upsilon;":933,"Uring;":366,"Uscr;":[55349,56496],"Utilde;":360,Uuml:220,"Uuml;":220,"VDash;":8875,"Vbar;":10987,"Vcy;":1042,"Vdash;":8873,"Vdashl;":10982,"Vee;":8897,"Verbar;":8214,"Vert;":8214,"VerticalBar;":8739,"VerticalLine;":124,"VerticalSeparator;":10072,"VerticalTilde;":8768,"VeryThinSpace;":8202,"Vfr;":[55349,56601],"Vopf;":[55349,56653],"Vscr;":[55349,56497],"Vvdash;":8874,"Wcirc;":372,"Wedge;":8896,"Wfr;":[55349,56602],"Wopf;":[55349,56654],"Wscr;":[55349,56498],"Xfr;":[55349,56603],"Xi;":926,"Xopf;":[55349,56655],"Xscr;":[55349,56499],"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,Yacute:221,"Yacute;":221,"Ycirc;":374,"Ycy;":1067,"Yfr;":[55349,56604],"Yopf;":[55349,56656],"Yscr;":[55349,56500],"Yuml;":376,"ZHcy;":1046,"Zacute;":377,"Zcaron;":381,"Zcy;":1047,"Zdot;":379,"ZeroWidthSpace;":8203,"Zeta;":918,"Zfr;":8488,"Zopf;":8484,"Zscr;":[55349,56501],aacute:225,"aacute;":225,"abreve;":259,"ac;":8766,"acE;":[8766,819],"acd;":8767,acirc:226,"acirc;":226,acute:180,"acute;":180,"acy;":1072,aelig:230,"aelig;":230,"af;":8289,"afr;":[55349,56606],agrave:224,"agrave;":224,"alefsym;":8501,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,amp:38,"amp;":38,"and;":8743,"andand;":10837,"andd;":10844,"andslope;":10840,"andv;":10842,"ang;":8736,"ange;":10660,"angle;":8736,"angmsd;":8737,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrt;":8735,"angrtvb;":8894,"angrtvbd;":10653,"angsph;":8738,"angst;":197,"angzarr;":9084,"aogon;":261,"aopf;":[55349,56658],"ap;":8776,"apE;":10864,"apacir;":10863,"ape;":8778,"apid;":8779,"apos;":39,"approx;":8776,"approxeq;":8778,aring:229,"aring;":229,"ascr;":[55349,56502],"ast;":42,"asymp;":8776,"asympeq;":8781,atilde:227,"atilde;":227,auml:228,"auml;":228,"awconint;":8755,"awint;":10769,"bNot;":10989,"backcong;":8780,"backepsilon;":1014,"backprime;":8245,"backsim;":8765,"backsimeq;":8909,"barvee;":8893,"barwed;":8965,"barwedge;":8965,"bbrk;":9141,"bbrktbrk;":9142,"bcong;":8780,"bcy;":1073,"bdquo;":8222,"becaus;":8757,"because;":8757,"bemptyv;":10672,"bepsi;":1014,"bernou;":8492,"beta;":946,"beth;":8502,"between;":8812,"bfr;":[55349,56607],"bigcap;":8898,"bigcirc;":9711,"bigcup;":8899,"bigodot;":10752,"bigoplus;":10753,"bigotimes;":10754,"bigsqcup;":10758,"bigstar;":9733,"bigtriangledown;":9661,"bigtriangleup;":9651,"biguplus;":10756,"bigvee;":8897,"bigwedge;":8896,"bkarow;":10509,"blacklozenge;":10731,"blacksquare;":9642,"blacktriangle;":9652,"blacktriangledown;":9662,"blacktriangleleft;":9666,"blacktriangleright;":9656,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"bne;":[61,8421],"bnequiv;":[8801,8421],"bnot;":8976,"bopf;":[55349,56659],"bot;":8869,"bottom;":8869,"bowtie;":8904,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxH;":9552,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxV;":9553,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxbox;":10697,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxh;":9472,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxminus;":8863,"boxplus;":8862,"boxtimes;":8864,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxv;":9474,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"bprime;":8245,"breve;":728,brvbar:166,"brvbar;":166,"bscr;":[55349,56503],"bsemi;":8271,"bsim;":8765,"bsime;":8909,"bsol;":92,"bsolb;":10693,"bsolhsub;":10184,"bull;":8226,"bullet;":8226,"bump;":8782,"bumpE;":10926,"bumpe;":8783,"bumpeq;":8783,"cacute;":263,"cap;":8745,"capand;":10820,"capbrcup;":10825,"capcap;":10827,"capcup;":10823,"capdot;":10816,"caps;":[8745,65024],"caret;":8257,"caron;":711,"ccaps;":10829,"ccaron;":269,ccedil:231,"ccedil;":231,"ccirc;":265,"ccups;":10828,"ccupssm;":10832,"cdot;":267,cedil:184,"cedil;":184,"cemptyv;":10674,cent:162,"cent;":162,"centerdot;":183,"cfr;":[55349,56608],"chcy;":1095,"check;":10003,"checkmark;":10003,"chi;":967,"cir;":9675,"cirE;":10691,"circ;":710,"circeq;":8791,"circlearrowleft;":8634,"circlearrowright;":8635,"circledR;":174,"circledS;":9416,"circledast;":8859,"circledcirc;":8858,"circleddash;":8861,"cire;":8791,"cirfnint;":10768,"cirmid;":10991,"cirscir;":10690,"clubs;":9827,"clubsuit;":9827,"colon;":58,"colone;":8788,"coloneq;":8788,"comma;":44,"commat;":64,"comp;":8705,"compfn;":8728,"complement;":8705,"complexes;":8450,"cong;":8773,"congdot;":10861,"conint;":8750,"copf;":[55349,56660],"coprod;":8720,copy:169,"copy;":169,"copysr;":8471,"crarr;":8629,"cross;":10007,"cscr;":[55349,56504],"csub;":10959,"csube;":10961,"csup;":10960,"csupe;":10962,"ctdot;":8943,"cudarrl;":10552,"cudarrr;":10549,"cuepr;":8926,"cuesc;":8927,"cularr;":8630,"cularrp;":10557,"cup;":8746,"cupbrcap;":10824,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"cupor;":10821,"cups;":[8746,65024],"curarr;":8631,"curarrm;":10556,"curlyeqprec;":8926,"curlyeqsucc;":8927,"curlyvee;":8910,"curlywedge;":8911,curren:164,"curren;":164,"curvearrowleft;":8630,"curvearrowright;":8631,"cuvee;":8910,"cuwed;":8911,"cwconint;":8754,"cwint;":8753,"cylcty;":9005,"dArr;":8659,"dHar;":10597,"dagger;":8224,"daleth;":8504,"darr;":8595,"dash;":8208,"dashv;":8867,"dbkarow;":10511,"dblac;":733,"dcaron;":271,"dcy;":1076,"dd;":8518,"ddagger;":8225,"ddarr;":8650,"ddotseq;":10871,deg:176,"deg;":176,"delta;":948,"demptyv;":10673,"dfisht;":10623,"dfr;":[55349,56609],"dharl;":8643,"dharr;":8642,"diam;":8900,"diamond;":8900,"diamondsuit;":9830,"diams;":9830,"die;":168,"digamma;":989,"disin;":8946,"div;":247,divide:247,"divide;":247,"divideontimes;":8903,"divonx;":8903,"djcy;":1106,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"dopf;":[55349,56661],"dot;":729,"doteq;":8784,"doteqdot;":8785,"dotminus;":8760,"dotplus;":8724,"dotsquare;":8865,"doublebarwedge;":8966,"downarrow;":8595,"downdownarrows;":8650,"downharpoonleft;":8643,"downharpoonright;":8642,"drbkarow;":10512,"drcorn;":8991,"drcrop;":8972,"dscr;":[55349,56505],"dscy;":1109,"dsol;":10742,"dstrok;":273,"dtdot;":8945,"dtri;":9663,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"dwangle;":10662,"dzcy;":1119,"dzigrarr;":10239,"eDDot;":10871,"eDot;":8785,eacute:233,"eacute;":233,"easter;":10862,"ecaron;":283,"ecir;":8790,ecirc:234,"ecirc;":234,"ecolon;":8789,"ecy;":1101,"edot;":279,"ee;":8519,"efDot;":8786,"efr;":[55349,56610],"eg;":10906,egrave:232,"egrave;":232,"egs;":10902,"egsdot;":10904,"el;":10905,"elinters;":9191,"ell;":8467,"els;":10901,"elsdot;":10903,"emacr;":275,"empty;":8709,"emptyset;":8709,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"emsp;":8195,"eng;":331,"ensp;":8194,"eogon;":281,"eopf;":[55349,56662],"epar;":8917,"eparsl;":10723,"eplus;":10865,"epsi;":949,"epsilon;":949,"epsiv;":1013,"eqcirc;":8790,"eqcolon;":8789,"eqsim;":8770,"eqslantgtr;":10902,"eqslantless;":10901,"equals;":61,"equest;":8799,"equiv;":8801,"equivDD;":10872,"eqvparsl;":10725,"erDot;":8787,"erarr;":10609,"escr;":8495,"esdot;":8784,"esim;":8770,"eta;":951,eth:240,"eth;":240,euml:235,"euml;":235,"euro;":8364,"excl;":33,"exist;":8707,"expectation;":8496,"exponentiale;":8519,"fallingdotseq;":8786,"fcy;":1092,"female;":9792,"ffilig;":64259,"fflig;":64256,"ffllig;":64260,"ffr;":[55349,56611],"filig;":64257,"fjlig;":[102,106],"flat;":9837,"fllig;":64258,"fltns;":9649,"fnof;":402,"fopf;":[55349,56663],"forall;":8704,"fork;":8916,"forkv;":10969,"fpartint;":10765,frac12:189,"frac12;":189,"frac13;":8531,frac14:188,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,frac34:190,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"frasl;":8260,"frown;":8994,"fscr;":[55349,56507],"gE;":8807,"gEl;":10892,"gacute;":501,"gamma;":947,"gammad;":989,"gap;":10886,"gbreve;":287,"gcirc;":285,"gcy;":1075,"gdot;":289,"ge;":8805,"gel;":8923,"geq;":8805,"geqq;":8807,"geqslant;":10878,"ges;":10878,"gescc;":10921,"gesdot;":10880,"gesdoto;":10882,"gesdotol;":10884,"gesl;":[8923,65024],"gesles;":10900,"gfr;":[55349,56612],"gg;":8811,"ggg;":8921,"gimel;":8503,"gjcy;":1107,"gl;":8823,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gnap;":10890,"gnapprox;":10890,"gne;":10888,"gneq;":10888,"gneqq;":8809,"gnsim;":8935,"gopf;":[55349,56664],"grave;":96,"gscr;":8458,"gsim;":8819,"gsime;":10894,"gsiml;":10896,gt:62,"gt;":62,"gtcc;":10919,"gtcir;":10874,"gtdot;":8919,"gtlPar;":10645,"gtquest;":10876,"gtrapprox;":10886,"gtrarr;":10616,"gtrdot;":8919,"gtreqless;":8923,"gtreqqless;":10892,"gtrless;":8823,"gtrsim;":8819,"gvertneqq;":[8809,65024],"gvnE;":[8809,65024],"hArr;":8660,"hairsp;":8202,"half;":189,"hamilt;":8459,"hardcy;":1098,"harr;":8596,"harrcir;":10568,"harrw;":8621,"hbar;":8463,"hcirc;":293,"hearts;":9829,"heartsuit;":9829,"hellip;":8230,"hercon;":8889,"hfr;":[55349,56613],"hksearow;":10533,"hkswarow;":10534,"hoarr;":8703,"homtht;":8763,"hookleftarrow;":8617,"hookrightarrow;":8618,"hopf;":[55349,56665],"horbar;":8213,"hscr;":[55349,56509],"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,iacute:237,"iacute;":237,"ic;":8291,icirc:238,"icirc;":238,"icy;":1080,"iecy;":1077,iexcl:161,"iexcl;":161,"iff;":8660,"ifr;":[55349,56614],igrave:236,"igrave;":236,"ii;":8520,"iiiint;":10764,"iiint;":8749,"iinfin;":10716,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imagline;":8464,"imagpart;":8465,"imath;":305,"imof;":8887,"imped;":437,"in;":8712,"incare;":8453,"infin;":8734,"infintie;":10717,"inodot;":305,"int;":8747,"intcal;":8890,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"intprod;":10812,"iocy;":1105,"iogon;":303,"iopf;":[55349,56666],"iota;":953,"iprod;":10812,iquest:191,"iquest;":191,"iscr;":[55349,56510],"isin;":8712,"isinE;":8953,"isindot;":8949,"isins;":8948,"isinsv;":8947,"isinv;":8712,"it;":8290,"itilde;":297,"iukcy;":1110,iuml:239,"iuml;":239,"jcirc;":309,"jcy;":1081,"jfr;":[55349,56615],"jmath;":567,"jopf;":[55349,56667],"jscr;":[55349,56511],"jsercy;":1112,"jukcy;":1108,"kappa;":954,"kappav;":1008,"kcedil;":311,"kcy;":1082,"kfr;":[55349,56616],"kgreen;":312,"khcy;":1093,"kjcy;":1116,"kopf;":[55349,56668],"kscr;":[55349,56512],"lAarr;":8666,"lArr;":8656,"lAtail;":10523,"lBarr;":10510,"lE;":8806,"lEg;":10891,"lHar;":10594,"lacute;":314,"laemptyv;":10676,"lagran;":8466,"lambda;":955,"lang;":10216,"langd;":10641,"langle;":10216,"lap;":10885,laquo:171,"laquo;":171,"larr;":8592,"larrb;":8676,"larrbfs;":10527,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrsim;":10611,"larrtl;":8610,"lat;":10923,"latail;":10521,"late;":10925,"lates;":[10925,65024],"lbarr;":10508,"lbbrk;":10098,"lbrace;":123,"lbrack;":91,"lbrke;":10635,"lbrksld;":10639,"lbrkslu;":10637,"lcaron;":318,"lcedil;":316,"lceil;":8968,"lcub;":123,"lcy;":1083,"ldca;":10550,"ldquo;":8220,"ldquor;":8222,"ldrdhar;":10599,"ldrushar;":10571,"ldsh;":8626,"le;":8804,"leftarrow;":8592,"leftarrowtail;":8610,"leftharpoondown;":8637,"leftharpoonup;":8636,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftrightarrows;":8646,"leftrightharpoons;":8651,"leftrightsquigarrow;":8621,"leftthreetimes;":8907,"leg;":8922,"leq;":8804,"leqq;":8806,"leqslant;":10877,"les;":10877,"lescc;":10920,"lesdot;":10879,"lesdoto;":10881,"lesdotor;":10883,"lesg;":[8922,65024],"lesges;":10899,"lessapprox;":10885,"lessdot;":8918,"lesseqgtr;":8922,"lesseqqgtr;":10891,"lessgtr;":8822,"lesssim;":8818,"lfisht;":10620,"lfloor;":8970,"lfr;":[55349,56617],"lg;":8822,"lgE;":10897,"lhard;":8637,"lharu;":8636,"lharul;":10602,"lhblk;":9604,"ljcy;":1113,"ll;":8810,"llarr;":8647,"llcorner;":8990,"llhard;":10603,"lltri;":9722,"lmidot;":320,"lmoust;":9136,"lmoustache;":9136,"lnE;":8808,"lnap;":10889,"lnapprox;":10889,"lne;":10887,"lneq;":10887,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"longleftarrow;":10229,"longleftrightarrow;":10231,"longmapsto;":10236,"longrightarrow;":10230,"looparrowleft;":8619,"looparrowright;":8620,"lopar;":10629,"lopf;":[55349,56669],"loplus;":10797,"lotimes;":10804,"lowast;":8727,"lowbar;":95,"loz;":9674,"lozenge;":9674,"lozf;":10731,"lpar;":40,"lparlt;":10643,"lrarr;":8646,"lrcorner;":8991,"lrhar;":8651,"lrhard;":10605,"lrm;":8206,"lrtri;":8895,"lsaquo;":8249,"lscr;":[55349,56513],"lsh;":8624,"lsim;":8818,"lsime;":10893,"lsimg;":10895,"lsqb;":91,"lsquo;":8216,"lsquor;":8218,"lstrok;":322,lt:60,"lt;":60,"ltcc;":10918,"ltcir;":10873,"ltdot;":8918,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltquest;":10875,"ltrPar;":10646,"ltri;":9667,"ltrie;":8884,"ltrif;":9666,"lurdshar;":10570,"luruhar;":10598,"lvertneqq;":[8808,65024],"lvnE;":[8808,65024],"mDDot;":8762,macr:175,"macr;":175,"male;":9794,"malt;":10016,"maltese;":10016,"map;":8614,"mapsto;":8614,"mapstodown;":8615,"mapstoleft;":8612,"mapstoup;":8613,"marker;":9646,"mcomma;":10793,"mcy;":1084,"mdash;":8212,"measuredangle;":8737,"mfr;":[55349,56618],"mho;":8487,micro:181,"micro;":181,"mid;":8739,"midast;":42,"midcir;":10992,middot:183,"middot;":183,"minus;":8722,"minusb;":8863,"minusd;":8760,"minusdu;":10794,"mlcp;":10971,"mldr;":8230,"mnplus;":8723,"models;":8871,"mopf;":[55349,56670],"mp;":8723,"mscr;":[55349,56514],"mstpos;":8766,"mu;":956,"multimap;":8888,"mumap;":8888,"nGg;":[8921,824],"nGt;":[8811,8402],"nGtv;":[8811,824],"nLeftarrow;":8653,"nLeftrightarrow;":8654,"nLl;":[8920,824],"nLt;":[8810,8402],"nLtv;":[8810,824],"nRightarrow;":8655,"nVDash;":8879,"nVdash;":8878,"nabla;":8711,"nacute;":324,"nang;":[8736,8402],"nap;":8777,"napE;":[10864,824],"napid;":[8779,824],"napos;":329,"napprox;":8777,"natur;":9838,"natural;":9838,"naturals;":8469,nbsp:160,"nbsp;":160,"nbump;":[8782,824],"nbumpe;":[8783,824],"ncap;":10819,"ncaron;":328,"ncedil;":326,"ncong;":8775,"ncongdot;":[10861,824],"ncup;":10818,"ncy;":1085,"ndash;":8211,"ne;":8800,"neArr;":8663,"nearhk;":10532,"nearr;":8599,"nearrow;":8599,"nedot;":[8784,824],"nequiv;":8802,"nesear;":10536,"nesim;":[8770,824],"nexist;":8708,"nexists;":8708,"nfr;":[55349,56619],"ngE;":[8807,824],"nge;":8817,"ngeq;":8817,"ngeqq;":[8807,824],"ngeqslant;":[10878,824],"nges;":[10878,824],"ngsim;":8821,"ngt;":8815,"ngtr;":8815,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"ni;":8715,"nis;":8956,"nisd;":8954,"niv;":8715,"njcy;":1114,"nlArr;":8653,"nlE;":[8806,824],"nlarr;":8602,"nldr;":8229,"nle;":8816,"nleftarrow;":8602,"nleftrightarrow;":8622,"nleq;":8816,"nleqq;":[8806,824],"nleqslant;":[10877,824],"nles;":[10877,824],"nless;":8814,"nlsim;":8820,"nlt;":8814,"nltri;":8938,"nltrie;":8940,"nmid;":8740,"nopf;":[55349,56671],not:172,"not;":172,"notin;":8713,"notinE;":[8953,824],"notindot;":[8949,824],"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notni;":8716,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npar;":8742,"nparallel;":8742,"nparsl;":[11005,8421],"npart;":[8706,824],"npolint;":10772,"npr;":8832,"nprcue;":8928,"npre;":[10927,824],"nprec;":8832,"npreceq;":[10927,824],"nrArr;":8655,"nrarr;":8603,"nrarrc;":[10547,824],"nrarrw;":[8605,824],"nrightarrow;":8603,"nrtri;":8939,"nrtrie;":8941,"nsc;":8833,"nsccue;":8929,"nsce;":[10928,824],"nscr;":[55349,56515],"nshortmid;":8740,"nshortparallel;":8742,"nsim;":8769,"nsime;":8772,"nsimeq;":8772,"nsmid;":8740,"nspar;":8742,"nsqsube;":8930,"nsqsupe;":8931,"nsub;":8836,"nsubE;":[10949,824],"nsube;":8840,"nsubset;":[8834,8402],"nsubseteq;":8840,"nsubseteqq;":[10949,824],"nsucc;":8833,"nsucceq;":[10928,824],"nsup;":8837,"nsupE;":[10950,824],"nsupe;":8841,"nsupset;":[8835,8402],"nsupseteq;":8841,"nsupseteqq;":[10950,824],"ntgl;":8825,ntilde:241,"ntilde;":241,"ntlg;":8824,"ntriangleleft;":8938,"ntrianglelefteq;":8940,"ntriangleright;":8939,"ntrianglerighteq;":8941,"nu;":957,"num;":35,"numero;":8470,"numsp;":8199,"nvDash;":8877,"nvHarr;":10500,"nvap;":[8781,8402],"nvdash;":8876,"nvge;":[8805,8402],"nvgt;":[62,8402],"nvinfin;":10718,"nvlArr;":10498,"nvle;":[8804,8402],"nvlt;":[60,8402],"nvltrie;":[8884,8402],"nvrArr;":10499,"nvrtrie;":[8885,8402],"nvsim;":[8764,8402],"nwArr;":8662,"nwarhk;":10531,"nwarr;":8598,"nwarrow;":8598,"nwnear;":10535,"oS;":9416,oacute:243,"oacute;":243,"oast;":8859,"ocir;":8858,ocirc:244,"ocirc;":244,"ocy;":1086,"odash;":8861,"odblac;":337,"odiv;":10808,"odot;":8857,"odsold;":10684,"oelig;":339,"ofcir;":10687,"ofr;":[55349,56620],"ogon;":731,ograve:242,"ograve;":242,"ogt;":10689,"ohbar;":10677,"ohm;":937,"oint;":8750,"olarr;":8634,"olcir;":10686,"olcross;":10683,"oline;":8254,"olt;":10688,"omacr;":333,"omega;":969,"omicron;":959,"omid;":10678,"ominus;":8854,"oopf;":[55349,56672],"opar;":10679,"operp;":10681,"oplus;":8853,"or;":8744,"orarr;":8635,"ord;":10845,"order;":8500,"orderof;":8500,ordf:170,"ordf;":170,ordm:186,"ordm;":186,"origof;":8886,"oror;":10838,"orslope;":10839,"orv;":10843,"oscr;":8500,oslash:248,"oslash;":248,"osol;":8856,otilde:245,"otilde;":245,"otimes;":8855,"otimesas;":10806,ouml:246,"ouml;":246,"ovbar;":9021,"par;":8741,para:182,"para;":182,"parallel;":8741,"parsim;":10995,"parsl;":11005,"part;":8706,"pcy;":1087,"percnt;":37,"period;":46,"permil;":8240,"perp;":8869,"pertenk;":8241,"pfr;":[55349,56621],"phi;":966,"phiv;":981,"phmmat;":8499,"phone;":9742,"pi;":960,"pitchfork;":8916,"piv;":982,"planck;":8463,"planckh;":8462,"plankv;":8463,"plus;":43,"plusacir;":10787,"plusb;":8862,"pluscir;":10786,"plusdo;":8724,"plusdu;":10789,"pluse;":10866,plusmn:177,"plusmn;":177,"plussim;":10790,"plustwo;":10791,"pm;":177,"pointint;":10773,"popf;":[55349,56673],pound:163,"pound;":163,"pr;":8826,"prE;":10931,"prap;":10935,"prcue;":8828,"pre;":10927,"prec;":8826,"precapprox;":10935,"preccurlyeq;":8828,"preceq;":10927,"precnapprox;":10937,"precneqq;":10933,"precnsim;":8936,"precsim;":8830,"prime;":8242,"primes;":8473,"prnE;":10933,"prnap;":10937,"prnsim;":8936,"prod;":8719,"profalar;":9006,"profline;":8978,"profsurf;":8979,"prop;":8733,"propto;":8733,"prsim;":8830,"prurel;":8880,"pscr;":[55349,56517],"psi;":968,"puncsp;":8200,"qfr;":[55349,56622],"qint;":10764,"qopf;":[55349,56674],"qprime;":8279,"qscr;":[55349,56518],"quaternions;":8461,"quatint;":10774,"quest;":63,"questeq;":8799,quot:34,"quot;":34,"rAarr;":8667,"rArr;":8658,"rAtail;":10524,"rBarr;":10511,"rHar;":10596,"race;":[8765,817],"racute;":341,"radic;":8730,"raemptyv;":10675,"rang;":10217,"rangd;":10642,"range;":10661,"rangle;":10217,raquo:187,"raquo;":187,"rarr;":8594,"rarrap;":10613,"rarrb;":8677,"rarrbfs;":10528,"rarrc;":10547,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrsim;":10612,"rarrtl;":8611,"rarrw;":8605,"ratail;":10522,"ratio;":8758,"rationals;":8474,"rbarr;":10509,"rbbrk;":10099,"rbrace;":125,"rbrack;":93,"rbrke;":10636,"rbrksld;":10638,"rbrkslu;":10640,"rcaron;":345,"rcedil;":343,"rceil;":8969,"rcub;":125,"rcy;":1088,"rdca;":10551,"rdldhar;":10601,"rdquo;":8221,"rdquor;":8221,"rdsh;":8627,"real;":8476,"realine;":8475,"realpart;":8476,"reals;":8477,"rect;":9645,reg:174,"reg;":174,"rfisht;":10621,"rfloor;":8971,"rfr;":[55349,56623],"rhard;":8641,"rharu;":8640,"rharul;":10604,"rho;":961,"rhov;":1009,"rightarrow;":8594,"rightarrowtail;":8611,"rightharpoondown;":8641,"rightharpoonup;":8640,"rightleftarrows;":8644,"rightleftharpoons;":8652,"rightrightarrows;":8649,"rightsquigarrow;":8605,"rightthreetimes;":8908,"ring;":730,"risingdotseq;":8787,"rlarr;":8644,"rlhar;":8652,"rlm;":8207,"rmoust;":9137,"rmoustache;":9137,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"ropf;":[55349,56675],"roplus;":10798,"rotimes;":10805,"rpar;":41,"rpargt;":10644,"rppolint;":10770,"rrarr;":8649,"rsaquo;":8250,"rscr;":[55349,56519],"rsh;":8625,"rsqb;":93,"rsquo;":8217,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"rtri;":9657,"rtrie;":8885,"rtrif;":9656,"rtriltri;":10702,"ruluhar;":10600,"rx;":8478,"sacute;":347,"sbquo;":8218,"sc;":8827,"scE;":10932,"scap;":10936,"scaron;":353,"sccue;":8829,"sce;":10928,"scedil;":351,"scirc;":349,"scnE;":10934,"scnap;":10938,"scnsim;":8937,"scpolint;":10771,"scsim;":8831,"scy;":1089,"sdot;":8901,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searhk;":10533,"searr;":8600,"searrow;":8600,sect:167,"sect;":167,"semi;":59,"seswar;":10537,"setminus;":8726,"setmn;":8726,"sext;":10038,"sfr;":[55349,56624],"sfrown;":8994,"sharp;":9839,"shchcy;":1097,"shcy;":1096,"shortmid;":8739,"shortparallel;":8741,shy:173,"shy;":173,"sigma;":963,"sigmaf;":962,"sigmav;":962,"sim;":8764,"simdot;":10858,"sime;":8771,"simeq;":8771,"simg;":10910,"simgE;":10912,"siml;":10909,"simlE;":10911,"simne;":8774,"simplus;":10788,"simrarr;":10610,"slarr;":8592,"smallsetminus;":8726,"smashp;":10803,"smeparsl;":10724,"smid;":8739,"smile;":8995,"smt;":10922,"smte;":10924,"smtes;":[10924,65024],"softcy;":1100,"sol;":47,"solb;":10692,"solbar;":9023,"sopf;":[55349,56676],"spades;":9824,"spadesuit;":9824,"spar;":8741,"sqcap;":8851,"sqcaps;":[8851,65024],"sqcup;":8852,"sqcups;":[8852,65024],"sqsub;":8847,"sqsube;":8849,"sqsubset;":8847,"sqsubseteq;":8849,"sqsup;":8848,"sqsupe;":8850,"sqsupset;":8848,"sqsupseteq;":8850,"squ;":9633,"square;":9633,"squarf;":9642,"squf;":9642,"srarr;":8594,"sscr;":[55349,56520],"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"star;":9734,"starf;":9733,"straightepsilon;":1013,"straightphi;":981,"strns;":175,"sub;":8834,"subE;":10949,"subdot;":10941,"sube;":8838,"subedot;":10947,"submult;":10945,"subnE;":10955,"subne;":8842,"subplus;":10943,"subrarr;":10617,"subset;":8834,"subseteq;":8838,"subseteqq;":10949,"subsetneq;":8842,"subsetneqq;":10955,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succ;":8827,"succapprox;":10936,"succcurlyeq;":8829,"succeq;":10928,"succnapprox;":10938,"succneqq;":10934,"succnsim;":8937,"succsim;":8831,"sum;":8721,"sung;":9834,sup1:185,"sup1;":185,sup2:178,"sup2;":178,sup3:179,"sup3;":179,"sup;":8835,"supE;":10950,"supdot;":10942,"supdsub;":10968,"supe;":8839,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supnE;":10956,"supne;":8843,"supplus;":10944,"supset;":8835,"supseteq;":8839,"supseteqq;":10950,"supsetneq;":8843,"supsetneqq;":10956,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swArr;":8665,"swarhk;":10534,"swarr;":8601,"swarrow;":8601,"swnwar;":10538,szlig:223,"szlig;":223,"target;":8982,"tau;":964,"tbrk;":9140,"tcaron;":357,"tcedil;":355,"tcy;":1090,"tdot;":8411,"telrec;":8981,"tfr;":[55349,56625],"there4;":8756,"therefore;":8756,"theta;":952,"thetasym;":977,"thetav;":977,"thickapprox;":8776,"thicksim;":8764,"thinsp;":8201,"thkap;":8776,"thksim;":8764,thorn:254,"thorn;":254,"tilde;":732,times:215,"times;":215,"timesb;":8864,"timesbar;":10801,"timesd;":10800,"tint;":8749,"toea;":10536,"top;":8868,"topbot;":9014,"topcir;":10993,"topf;":[55349,56677],"topfork;":10970,"tosa;":10537,"tprime;":8244,"trade;":8482,"triangle;":9653,"triangledown;":9663,"triangleleft;":9667,"trianglelefteq;":8884,"triangleq;":8796,"triangleright;":9657,"trianglerighteq;":8885,"tridot;":9708,"trie;":8796,"triminus;":10810,"triplus;":10809,"trisb;":10701,"tritime;":10811,"trpezium;":9186,"tscr;":[55349,56521],"tscy;":1094,"tshcy;":1115,"tstrok;":359,"twixt;":8812,"twoheadleftarrow;":8606,"twoheadrightarrow;":8608,"uArr;":8657,"uHar;":10595,uacute:250,"uacute;":250,"uarr;":8593,"ubrcy;":1118,"ubreve;":365,ucirc:251,"ucirc;":251,"ucy;":1091,"udarr;":8645,"udblac;":369,"udhar;":10606,"ufisht;":10622,"ufr;":[55349,56626],ugrave:249,"ugrave;":249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ulcorn;":8988,"ulcorner;":8988,"ulcrop;":8975,"ultri;":9720,"umacr;":363,uml:168,"uml;":168,"uogon;":371,"uopf;":[55349,56678],"uparrow;":8593,"updownarrow;":8597,"upharpoonleft;":8639,"upharpoonright;":8638,"uplus;":8846,"upsi;":965,"upsih;":978,"upsilon;":965,"upuparrows;":8648,"urcorn;":8989,"urcorner;":8989,"urcrop;":8974,"uring;":367,"urtri;":9721,"uscr;":[55349,56522],"utdot;":8944,"utilde;":361,"utri;":9653,"utrif;":9652,"uuarr;":8648,uuml:252,"uuml;":252,"uwangle;":10663,"vArr;":8661,"vBar;":10984,"vBarv;":10985,"vDash;":8872,"vangrt;":10652,"varepsilon;":1013,"varkappa;":1008,"varnothing;":8709,"varphi;":981,"varpi;":982,"varpropto;":8733,"varr;":8597,"varrho;":1009,"varsigma;":962,"varsubsetneq;":[8842,65024],"varsubsetneqq;":[10955,65024],"varsupsetneq;":[8843,65024],"varsupsetneqq;":[10956,65024],"vartheta;":977,"vartriangleleft;":8882,"vartriangleright;":8883,"vcy;":1074,"vdash;":8866,"vee;":8744,"veebar;":8891,"veeeq;":8794,"vellip;":8942,"verbar;":124,"vert;":124,"vfr;":[55349,56627],"vltri;":8882,"vnsub;":[8834,8402],"vnsup;":[8835,8402],"vopf;":[55349,56679],"vprop;":8733,"vrtri;":8883,"vscr;":[55349,56523],"vsubnE;":[10955,65024],"vsubne;":[8842,65024],"vsupnE;":[10956,65024],"vsupne;":[8843,65024],"vzigzag;":10650,"wcirc;":373,"wedbar;":10847,"wedge;":8743,"wedgeq;":8793,"weierp;":8472,"wfr;":[55349,56628],"wopf;":[55349,56680],"wp;":8472,"wr;":8768,"wreath;":8768,"wscr;":[55349,56524],"xcap;":8898,"xcirc;":9711,"xcup;":8899,"xdtri;":9661,"xfr;":[55349,56629],"xhArr;":10234,"xharr;":10231,"xi;":958,"xlArr;":10232,"xlarr;":10229,"xmap;":10236,"xnis;":8955,"xodot;":10752,"xopf;":[55349,56681],"xoplus;":10753,"xotime;":10754,"xrArr;":10233,"xrarr;":10230,"xscr;":[55349,56525],"xsqcup;":10758,"xuplus;":10756,"xutri;":9651,"xvee;":8897,"xwedge;":8896,yacute:253,"yacute;":253,"yacy;":1103,"ycirc;":375,"ycy;":1099,yen:165,"yen;":165,"yfr;":[55349,56630],"yicy;":1111,"yopf;":[55349,56682],"yscr;":[55349,56526],"yucy;":1102,yuml:255,"yuml;":255,"zacute;":378,"zcaron;":382,"zcy;":1079,"zdot;":380,"zeetrf;":8488,"zeta;":950,"zfr;":[55349,56631],"zhcy;":1078,"zigrarr;":8669,"zopf;":[55349,56683],"zscr;":[55349,56527],"zwj;":8205,"zwnj;":8204},wj=/(A(?:Elig;?|MP;?|acute;?|breve;|c(?:irc;?|y;)|fr;|grave;?|lpha;|macr;|nd;|o(?:gon;|pf;)|pplyFunction;|ring;?|s(?:cr;|sign;)|tilde;?|uml;?)|B(?:a(?:ckslash;|r(?:v;|wed;))|cy;|e(?:cause;|rnoullis;|ta;)|fr;|opf;|reve;|scr;|umpeq;)|C(?:Hcy;|OPY;?|a(?:cute;|p(?:;|italDifferentialD;)|yleys;)|c(?:aron;|edil;?|irc;|onint;)|dot;|e(?:dilla;|nterDot;)|fr;|hi;|ircle(?:Dot;|Minus;|Plus;|Times;)|lo(?:ckwiseContourIntegral;|seCurly(?:DoubleQuote;|Quote;))|o(?:lon(?:;|e;)|n(?:gruent;|int;|tourIntegral;)|p(?:f;|roduct;)|unterClockwiseContourIntegral;)|ross;|scr;|up(?:;|Cap;))|D(?:D(?:;|otrahd;)|Jcy;|Scy;|Zcy;|a(?:gger;|rr;|shv;)|c(?:aron;|y;)|el(?:;|ta;)|fr;|i(?:a(?:critical(?:Acute;|Do(?:t;|ubleAcute;)|Grave;|Tilde;)|mond;)|fferentialD;)|o(?:pf;|t(?:;|Dot;|Equal;)|uble(?:ContourIntegral;|Do(?:t;|wnArrow;)|L(?:eft(?:Arrow;|RightArrow;|Tee;)|ong(?:Left(?:Arrow;|RightArrow;)|RightArrow;))|Right(?:Arrow;|Tee;)|Up(?:Arrow;|DownArrow;)|VerticalBar;)|wn(?:Arrow(?:;|Bar;|UpArrow;)|Breve;|Left(?:RightVector;|TeeVector;|Vector(?:;|Bar;))|Right(?:TeeVector;|Vector(?:;|Bar;))|Tee(?:;|Arrow;)|arrow;))|s(?:cr;|trok;))|E(?:NG;|TH;?|acute;?|c(?:aron;|irc;?|y;)|dot;|fr;|grave;?|lement;|m(?:acr;|pty(?:SmallSquare;|VerySmallSquare;))|o(?:gon;|pf;)|psilon;|qu(?:al(?:;|Tilde;)|ilibrium;)|s(?:cr;|im;)|ta;|uml;?|x(?:ists;|ponentialE;))|F(?:cy;|fr;|illed(?:SmallSquare;|VerySmallSquare;)|o(?:pf;|rAll;|uriertrf;)|scr;)|G(?:Jcy;|T;?|amma(?:;|d;)|breve;|c(?:edil;|irc;|y;)|dot;|fr;|g;|opf;|reater(?:Equal(?:;|Less;)|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|scr;|t;)|H(?:ARDcy;|a(?:cek;|t;)|circ;|fr;|ilbertSpace;|o(?:pf;|rizontalLine;)|s(?:cr;|trok;)|ump(?:DownHump;|Equal;))|I(?:Ecy;|Jlig;|Ocy;|acute;?|c(?:irc;?|y;)|dot;|fr;|grave;?|m(?:;|a(?:cr;|ginaryI;)|plies;)|n(?:t(?:;|e(?:gral;|rsection;))|visible(?:Comma;|Times;))|o(?:gon;|pf;|ta;)|scr;|tilde;|u(?:kcy;|ml;?))|J(?:c(?:irc;|y;)|fr;|opf;|s(?:cr;|ercy;)|ukcy;)|K(?:Hcy;|Jcy;|appa;|c(?:edil;|y;)|fr;|opf;|scr;)|L(?:Jcy;|T;?|a(?:cute;|mbda;|ng;|placetrf;|rr;)|c(?:aron;|edil;|y;)|e(?:ft(?:A(?:ngleBracket;|rrow(?:;|Bar;|RightArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|Right(?:Arrow;|Vector;)|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;|rightarrow;)|ss(?:EqualGreater;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;))|fr;|l(?:;|eftarrow;)|midot;|o(?:ng(?:Left(?:Arrow;|RightArrow;)|RightArrow;|left(?:arrow;|rightarrow;)|rightarrow;)|pf;|wer(?:LeftArrow;|RightArrow;))|s(?:cr;|h;|trok;)|t;)|M(?:ap;|cy;|e(?:diumSpace;|llintrf;)|fr;|inusPlus;|opf;|scr;|u;)|N(?:Jcy;|acute;|c(?:aron;|edil;|y;)|e(?:gative(?:MediumSpace;|Thi(?:ckSpace;|nSpace;)|VeryThinSpace;)|sted(?:GreaterGreater;|LessLess;)|wLine;)|fr;|o(?:Break;|nBreakingSpace;|pf;|t(?:;|C(?:ongruent;|upCap;)|DoubleVerticalBar;|E(?:lement;|qual(?:;|Tilde;)|xists;)|Greater(?:;|Equal;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|Hump(?:DownHump;|Equal;)|Le(?:ftTriangle(?:;|Bar;|Equal;)|ss(?:;|Equal;|Greater;|Less;|SlantEqual;|Tilde;))|Nested(?:GreaterGreater;|LessLess;)|Precedes(?:;|Equal;|SlantEqual;)|R(?:everseElement;|ightTriangle(?:;|Bar;|Equal;))|S(?:quareSu(?:bset(?:;|Equal;)|perset(?:;|Equal;))|u(?:bset(?:;|Equal;)|cceeds(?:;|Equal;|SlantEqual;|Tilde;)|perset(?:;|Equal;)))|Tilde(?:;|Equal;|FullEqual;|Tilde;)|VerticalBar;))|scr;|tilde;?|u;)|O(?:Elig;|acute;?|c(?:irc;?|y;)|dblac;|fr;|grave;?|m(?:acr;|ega;|icron;)|opf;|penCurly(?:DoubleQuote;|Quote;)|r;|s(?:cr;|lash;?)|ti(?:lde;?|mes;)|uml;?|ver(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;))|P(?:artialD;|cy;|fr;|hi;|i;|lusMinus;|o(?:incareplane;|pf;)|r(?:;|ecedes(?:;|Equal;|SlantEqual;|Tilde;)|ime;|o(?:duct;|portion(?:;|al;)))|s(?:cr;|i;))|Q(?:UOT;?|fr;|opf;|scr;)|R(?:Barr;|EG;?|a(?:cute;|ng;|rr(?:;|tl;))|c(?:aron;|edil;|y;)|e(?:;|verse(?:E(?:lement;|quilibrium;)|UpEquilibrium;))|fr;|ho;|ight(?:A(?:ngleBracket;|rrow(?:;|Bar;|LeftArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;)|o(?:pf;|undImplies;)|rightarrow;|s(?:cr;|h;)|uleDelayed;)|S(?:H(?:CHcy;|cy;)|OFTcy;|acute;|c(?:;|aron;|edil;|irc;|y;)|fr;|hort(?:DownArrow;|LeftArrow;|RightArrow;|UpArrow;)|igma;|mallCircle;|opf;|q(?:rt;|uare(?:;|Intersection;|Su(?:bset(?:;|Equal;)|perset(?:;|Equal;))|Union;))|scr;|tar;|u(?:b(?:;|set(?:;|Equal;))|c(?:ceeds(?:;|Equal;|SlantEqual;|Tilde;)|hThat;)|m;|p(?:;|erset(?:;|Equal;)|set;)))|T(?:HORN;?|RADE;|S(?:Hcy;|cy;)|a(?:b;|u;)|c(?:aron;|edil;|y;)|fr;|h(?:e(?:refore;|ta;)|i(?:ckSpace;|nSpace;))|ilde(?:;|Equal;|FullEqual;|Tilde;)|opf;|ripleDot;|s(?:cr;|trok;))|U(?:a(?:cute;?|rr(?:;|ocir;))|br(?:cy;|eve;)|c(?:irc;?|y;)|dblac;|fr;|grave;?|macr;|n(?:der(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;)|ion(?:;|Plus;))|o(?:gon;|pf;)|p(?:Arrow(?:;|Bar;|DownArrow;)|DownArrow;|Equilibrium;|Tee(?:;|Arrow;)|arrow;|downarrow;|per(?:LeftArrow;|RightArrow;)|si(?:;|lon;))|ring;|scr;|tilde;|uml;?)|V(?:Dash;|bar;|cy;|dash(?:;|l;)|e(?:e;|r(?:bar;|t(?:;|ical(?:Bar;|Line;|Separator;|Tilde;))|yThinSpace;))|fr;|opf;|scr;|vdash;)|W(?:circ;|edge;|fr;|opf;|scr;)|X(?:fr;|i;|opf;|scr;)|Y(?:Acy;|Icy;|Ucy;|acute;?|c(?:irc;|y;)|fr;|opf;|scr;|uml;)|Z(?:Hcy;|acute;|c(?:aron;|y;)|dot;|e(?:roWidthSpace;|ta;)|fr;|opf;|scr;)|a(?:acute;?|breve;|c(?:;|E;|d;|irc;?|ute;?|y;)|elig;?|f(?:;|r;)|grave;?|l(?:e(?:fsym;|ph;)|pha;)|m(?:a(?:cr;|lg;)|p;?)|n(?:d(?:;|and;|d;|slope;|v;)|g(?:;|e;|le;|msd(?:;|a(?:a;|b;|c;|d;|e;|f;|g;|h;))|rt(?:;|vb(?:;|d;))|s(?:ph;|t;)|zarr;))|o(?:gon;|pf;)|p(?:;|E;|acir;|e;|id;|os;|prox(?:;|eq;))|ring;?|s(?:cr;|t;|ymp(?:;|eq;))|tilde;?|uml;?|w(?:conint;|int;))|b(?:Not;|a(?:ck(?:cong;|epsilon;|prime;|sim(?:;|eq;))|r(?:vee;|wed(?:;|ge;)))|brk(?:;|tbrk;)|c(?:ong;|y;)|dquo;|e(?:caus(?:;|e;)|mptyv;|psi;|rnou;|t(?:a;|h;|ween;))|fr;|ig(?:c(?:ap;|irc;|up;)|o(?:dot;|plus;|times;)|s(?:qcup;|tar;)|triangle(?:down;|up;)|uplus;|vee;|wedge;)|karow;|l(?:a(?:ck(?:lozenge;|square;|triangle(?:;|down;|left;|right;))|nk;)|k(?:1(?:2;|4;)|34;)|ock;)|n(?:e(?:;|quiv;)|ot;)|o(?:pf;|t(?:;|tom;)|wtie;|x(?:D(?:L;|R;|l;|r;)|H(?:;|D;|U;|d;|u;)|U(?:L;|R;|l;|r;)|V(?:;|H;|L;|R;|h;|l;|r;)|box;|d(?:L;|R;|l;|r;)|h(?:;|D;|U;|d;|u;)|minus;|plus;|times;|u(?:L;|R;|l;|r;)|v(?:;|H;|L;|R;|h;|l;|r;)))|prime;|r(?:eve;|vbar;?)|s(?:cr;|emi;|im(?:;|e;)|ol(?:;|b;|hsub;))|u(?:ll(?:;|et;)|mp(?:;|E;|e(?:;|q;))))|c(?:a(?:cute;|p(?:;|and;|brcup;|c(?:ap;|up;)|dot;|s;)|r(?:et;|on;))|c(?:a(?:ps;|ron;)|edil;?|irc;|ups(?:;|sm;))|dot;|e(?:dil;?|mptyv;|nt(?:;|erdot;|))|fr;|h(?:cy;|eck(?:;|mark;)|i;)|ir(?:;|E;|c(?:;|eq;|le(?:arrow(?:left;|right;)|d(?:R;|S;|ast;|circ;|dash;)))|e;|fnint;|mid;|scir;)|lubs(?:;|uit;)|o(?:lon(?:;|e(?:;|q;))|m(?:ma(?:;|t;)|p(?:;|fn;|le(?:ment;|xes;)))|n(?:g(?:;|dot;)|int;)|p(?:f;|rod;|y(?:;|sr;|)))|r(?:arr;|oss;)|s(?:cr;|u(?:b(?:;|e;)|p(?:;|e;)))|tdot;|u(?:darr(?:l;|r;)|e(?:pr;|sc;)|larr(?:;|p;)|p(?:;|brcap;|c(?:ap;|up;)|dot;|or;|s;)|r(?:arr(?:;|m;)|ly(?:eq(?:prec;|succ;)|vee;|wedge;)|ren;?|vearrow(?:left;|right;))|vee;|wed;)|w(?:conint;|int;)|ylcty;)|d(?:Arr;|Har;|a(?:gger;|leth;|rr;|sh(?:;|v;))|b(?:karow;|lac;)|c(?:aron;|y;)|d(?:;|a(?:gger;|rr;)|otseq;)|e(?:g;?|lta;|mptyv;)|f(?:isht;|r;)|har(?:l;|r;)|i(?:am(?:;|ond(?:;|suit;)|s;)|e;|gamma;|sin;|v(?:;|ide(?:;|ontimes;|)|onx;))|jcy;|lc(?:orn;|rop;)|o(?:llar;|pf;|t(?:;|eq(?:;|dot;)|minus;|plus;|square;)|ublebarwedge;|wn(?:arrow;|downarrows;|harpoon(?:left;|right;)))|r(?:bkarow;|c(?:orn;|rop;))|s(?:c(?:r;|y;)|ol;|trok;)|t(?:dot;|ri(?:;|f;))|u(?:arr;|har;)|wangle;|z(?:cy;|igrarr;))|e(?:D(?:Dot;|ot;)|a(?:cute;?|ster;)|c(?:aron;|ir(?:;|c;?)|olon;|y;)|dot;|e;|f(?:Dot;|r;)|g(?:;|rave;?|s(?:;|dot;))|l(?:;|inters;|l;|s(?:;|dot;))|m(?:acr;|pty(?:;|set;|v;)|sp(?:1(?:3;|4;)|;))|n(?:g;|sp;)|o(?:gon;|pf;)|p(?:ar(?:;|sl;)|lus;|si(?:;|lon;|v;))|q(?:c(?:irc;|olon;)|s(?:im;|lant(?:gtr;|less;))|u(?:als;|est;|iv(?:;|DD;))|vparsl;)|r(?:Dot;|arr;)|s(?:cr;|dot;|im;)|t(?:a;|h;?)|u(?:ml;?|ro;)|x(?:cl;|ist;|p(?:ectation;|onentiale;)))|f(?:allingdotseq;|cy;|emale;|f(?:ilig;|l(?:ig;|lig;)|r;)|ilig;|jlig;|l(?:at;|lig;|tns;)|nof;|o(?:pf;|r(?:all;|k(?:;|v;)))|partint;|r(?:a(?:c(?:1(?:2;?|3;|4;?|5;|6;|8;)|2(?:3;|5;)|3(?:4;?|5;|8;)|45;|5(?:6;|8;)|78;)|sl;)|own;)|scr;)|g(?:E(?:;|l;)|a(?:cute;|mma(?:;|d;)|p;)|breve;|c(?:irc;|y;)|dot;|e(?:;|l;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|l;))|l(?:;|es;)))|fr;|g(?:;|g;)|imel;|jcy;|l(?:;|E;|a;|j;)|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|opf;|rave;|s(?:cr;|im(?:;|e;|l;))|t(?:;|c(?:c;|ir;)|dot;|lPar;|quest;|r(?:a(?:pprox;|rr;)|dot;|eq(?:less;|qless;)|less;|sim;)|)|v(?:ertneqq;|nE;))|h(?:Arr;|a(?:irsp;|lf;|milt;|r(?:dcy;|r(?:;|cir;|w;)))|bar;|circ;|e(?:arts(?:;|uit;)|llip;|rcon;)|fr;|ks(?:earow;|warow;)|o(?:arr;|mtht;|ok(?:leftarrow;|rightarrow;)|pf;|rbar;)|s(?:cr;|lash;|trok;)|y(?:bull;|phen;))|i(?:acute;?|c(?:;|irc;?|y;)|e(?:cy;|xcl;?)|f(?:f;|r;)|grave;?|i(?:;|i(?:int;|nt;)|nfin;|ota;)|jlig;|m(?:a(?:cr;|g(?:e;|line;|part;)|th;)|of;|ped;)|n(?:;|care;|fin(?:;|tie;)|odot;|t(?:;|cal;|e(?:gers;|rcal;)|larhk;|prod;))|o(?:cy;|gon;|pf;|ta;)|prod;|quest;?|s(?:cr;|in(?:;|E;|dot;|s(?:;|v;)|v;))|t(?:;|ilde;)|u(?:kcy;|ml;?))|j(?:c(?:irc;|y;)|fr;|math;|opf;|s(?:cr;|ercy;)|ukcy;)|k(?:appa(?:;|v;)|c(?:edil;|y;)|fr;|green;|hcy;|jcy;|opf;|scr;)|l(?:A(?:arr;|rr;|tail;)|Barr;|E(?:;|g;)|Har;|a(?:cute;|emptyv;|gran;|mbda;|ng(?:;|d;|le;)|p;|quo;?|rr(?:;|b(?:;|fs;)|fs;|hk;|lp;|pl;|sim;|tl;)|t(?:;|ail;|e(?:;|s;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|quo(?:;|r;)|r(?:dhar;|ushar;)|sh;)|e(?:;|ft(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|leftarrows;|right(?:arrow(?:;|s;)|harpoons;|squigarrow;)|threetimes;)|g;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|r;))|g(?:;|es;)|s(?:approx;|dot;|eq(?:gtr;|qgtr;)|gtr;|sim;)))|f(?:isht;|loor;|r;)|g(?:;|E;)|h(?:ar(?:d;|u(?:;|l;))|blk;)|jcy;|l(?:;|arr;|corner;|hard;|tri;)|m(?:idot;|oust(?:;|ache;))|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|o(?:a(?:ng;|rr;)|brk;|ng(?:left(?:arrow;|rightarrow;)|mapsto;|rightarrow;)|oparrow(?:left;|right;)|p(?:ar;|f;|lus;)|times;|w(?:ast;|bar;)|z(?:;|enge;|f;))|par(?:;|lt;)|r(?:arr;|corner;|har(?:;|d;)|m;|tri;)|s(?:aquo;|cr;|h;|im(?:;|e;|g;)|q(?:b;|uo(?:;|r;))|trok;)|t(?:;|c(?:c;|ir;)|dot;|hree;|imes;|larr;|quest;|r(?:Par;|i(?:;|e;|f;))|)|ur(?:dshar;|uhar;)|v(?:ertneqq;|nE;))|m(?:DDot;|a(?:cr;?|l(?:e;|t(?:;|ese;))|p(?:;|sto(?:;|down;|left;|up;))|rker;)|c(?:omma;|y;)|dash;|easuredangle;|fr;|ho;|i(?:cro;?|d(?:;|ast;|cir;|dot;?)|nus(?:;|b;|d(?:;|u;)))|l(?:cp;|dr;)|nplus;|o(?:dels;|pf;)|p;|s(?:cr;|tpos;)|u(?:;|ltimap;|map;))|n(?:G(?:g;|t(?:;|v;))|L(?:eft(?:arrow;|rightarrow;)|l;|t(?:;|v;))|Rightarrow;|V(?:Dash;|dash;)|a(?:bla;|cute;|ng;|p(?:;|E;|id;|os;|prox;)|tur(?:;|al(?:;|s;)))|b(?:sp;?|ump(?:;|e;))|c(?:a(?:p;|ron;)|edil;|ong(?:;|dot;)|up;|y;)|dash;|e(?:;|Arr;|ar(?:hk;|r(?:;|ow;))|dot;|quiv;|s(?:ear;|im;)|xist(?:;|s;))|fr;|g(?:E;|e(?:;|q(?:;|q;|slant;)|s;)|sim;|t(?:;|r;))|h(?:Arr;|arr;|par;)|i(?:;|s(?:;|d;)|v;)|jcy;|l(?:Arr;|E;|arr;|dr;|e(?:;|ft(?:arrow;|rightarrow;)|q(?:;|q;|slant;)|s(?:;|s;))|sim;|t(?:;|ri(?:;|e;)))|mid;|o(?:pf;|t(?:;|in(?:;|E;|dot;|v(?:a;|b;|c;))|ni(?:;|v(?:a;|b;|c;))|))|p(?:ar(?:;|allel;|sl;|t;)|olint;|r(?:;|cue;|e(?:;|c(?:;|eq;))))|r(?:Arr;|arr(?:;|c;|w;)|ightarrow;|tri(?:;|e;))|s(?:c(?:;|cue;|e;|r;)|hort(?:mid;|parallel;)|im(?:;|e(?:;|q;))|mid;|par;|qsu(?:be;|pe;)|u(?:b(?:;|E;|e;|set(?:;|eq(?:;|q;)))|cc(?:;|eq;)|p(?:;|E;|e;|set(?:;|eq(?:;|q;)))))|t(?:gl;|ilde;?|lg;|riangle(?:left(?:;|eq;)|right(?:;|eq;)))|u(?:;|m(?:;|ero;|sp;))|v(?:Dash;|Harr;|ap;|dash;|g(?:e;|t;)|infin;|l(?:Arr;|e;|t(?:;|rie;))|r(?:Arr;|trie;)|sim;)|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|near;))|o(?:S;|a(?:cute;?|st;)|c(?:ir(?:;|c;?)|y;)|d(?:ash;|blac;|iv;|ot;|sold;)|elig;|f(?:cir;|r;)|g(?:on;|rave;?|t;)|h(?:bar;|m;)|int;|l(?:arr;|c(?:ir;|ross;)|ine;|t;)|m(?:acr;|ega;|i(?:cron;|d;|nus;))|opf;|p(?:ar;|erp;|lus;)|r(?:;|arr;|d(?:;|er(?:;|of;)|f;?|m;?)|igof;|or;|slope;|v;)|s(?:cr;|lash;?|ol;)|ti(?:lde;?|mes(?:;|as;))|uml;?|vbar;)|p(?:ar(?:;|a(?:;|llel;|)|s(?:im;|l;)|t;)|cy;|er(?:cnt;|iod;|mil;|p;|tenk;)|fr;|h(?:i(?:;|v;)|mmat;|one;)|i(?:;|tchfork;|v;)|l(?:an(?:ck(?:;|h;)|kv;)|us(?:;|acir;|b;|cir;|d(?:o;|u;)|e;|mn;?|sim;|two;))|m;|o(?:intint;|pf;|und;?)|r(?:;|E;|ap;|cue;|e(?:;|c(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;))|ime(?:;|s;)|n(?:E;|ap;|sim;)|o(?:d;|f(?:alar;|line;|surf;)|p(?:;|to;))|sim;|urel;)|s(?:cr;|i;)|uncsp;)|q(?:fr;|int;|opf;|prime;|scr;|u(?:at(?:ernions;|int;)|est(?:;|eq;)|ot;?))|r(?:A(?:arr;|rr;|tail;)|Barr;|Har;|a(?:c(?:e;|ute;)|dic;|emptyv;|ng(?:;|d;|e;|le;)|quo;?|rr(?:;|ap;|b(?:;|fs;)|c;|fs;|hk;|lp;|pl;|sim;|tl;|w;)|t(?:ail;|io(?:;|nals;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|ldhar;|quo(?:;|r;)|sh;)|e(?:al(?:;|ine;|part;|s;)|ct;|g;?)|f(?:isht;|loor;|r;)|h(?:ar(?:d;|u(?:;|l;))|o(?:;|v;))|i(?:ght(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|left(?:arrows;|harpoons;)|rightarrows;|squigarrow;|threetimes;)|ng;|singdotseq;)|l(?:arr;|har;|m;)|moust(?:;|ache;)|nmid;|o(?:a(?:ng;|rr;)|brk;|p(?:ar;|f;|lus;)|times;)|p(?:ar(?:;|gt;)|polint;)|rarr;|s(?:aquo;|cr;|h;|q(?:b;|uo(?:;|r;)))|t(?:hree;|imes;|ri(?:;|e;|f;|ltri;))|uluhar;|x;)|s(?:acute;|bquo;|c(?:;|E;|a(?:p;|ron;)|cue;|e(?:;|dil;)|irc;|n(?:E;|ap;|sim;)|polint;|sim;|y;)|dot(?:;|b;|e;)|e(?:Arr;|ar(?:hk;|r(?:;|ow;))|ct;?|mi;|swar;|tm(?:inus;|n;)|xt;)|fr(?:;|own;)|h(?:arp;|c(?:hcy;|y;)|ort(?:mid;|parallel;)|y;?)|i(?:gma(?:;|f;|v;)|m(?:;|dot;|e(?:;|q;)|g(?:;|E;)|l(?:;|E;)|ne;|plus;|rarr;))|larr;|m(?:a(?:llsetminus;|shp;)|eparsl;|i(?:d;|le;)|t(?:;|e(?:;|s;)))|o(?:ftcy;|l(?:;|b(?:;|ar;))|pf;)|pa(?:des(?:;|uit;)|r;)|q(?:c(?:ap(?:;|s;)|up(?:;|s;))|su(?:b(?:;|e;|set(?:;|eq;))|p(?:;|e;|set(?:;|eq;)))|u(?:;|ar(?:e;|f;)|f;))|rarr;|s(?:cr;|etmn;|mile;|tarf;)|t(?:ar(?:;|f;)|r(?:aight(?:epsilon;|phi;)|ns;))|u(?:b(?:;|E;|dot;|e(?:;|dot;)|mult;|n(?:E;|e;)|plus;|rarr;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;)))|cc(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;)|m;|ng;|p(?:1;?|2;?|3;?|;|E;|d(?:ot;|sub;)|e(?:;|dot;)|hs(?:ol;|ub;)|larr;|mult;|n(?:E;|e;)|plus;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;))))|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|nwar;)|zlig;?)|t(?:a(?:rget;|u;)|brk;|c(?:aron;|edil;|y;)|dot;|elrec;|fr;|h(?:e(?:re(?:4;|fore;)|ta(?:;|sym;|v;))|i(?:ck(?:approx;|sim;)|nsp;)|k(?:ap;|sim;)|orn;?)|i(?:lde;|mes(?:;|b(?:;|ar;)|d;|)|nt;)|o(?:ea;|p(?:;|bot;|cir;|f(?:;|ork;))|sa;)|prime;|r(?:ade;|i(?:angle(?:;|down;|left(?:;|eq;)|q;|right(?:;|eq;))|dot;|e;|minus;|plus;|sb;|time;)|pezium;)|s(?:c(?:r;|y;)|hcy;|trok;)|w(?:ixt;|ohead(?:leftarrow;|rightarrow;)))|u(?:Arr;|Har;|a(?:cute;?|rr;)|br(?:cy;|eve;)|c(?:irc;?|y;)|d(?:arr;|blac;|har;)|f(?:isht;|r;)|grave;?|h(?:ar(?:l;|r;)|blk;)|l(?:c(?:orn(?:;|er;)|rop;)|tri;)|m(?:acr;|l;?)|o(?:gon;|pf;)|p(?:arrow;|downarrow;|harpoon(?:left;|right;)|lus;|si(?:;|h;|lon;)|uparrows;)|r(?:c(?:orn(?:;|er;)|rop;)|ing;|tri;)|scr;|t(?:dot;|ilde;|ri(?:;|f;))|u(?:arr;|ml;?)|wangle;)|v(?:Arr;|Bar(?:;|v;)|Dash;|a(?:ngrt;|r(?:epsilon;|kappa;|nothing;|p(?:hi;|i;|ropto;)|r(?:;|ho;)|s(?:igma;|u(?:bsetneq(?:;|q;)|psetneq(?:;|q;)))|t(?:heta;|riangle(?:left;|right;))))|cy;|dash;|e(?:e(?:;|bar;|eq;)|llip;|r(?:bar;|t;))|fr;|ltri;|nsu(?:b;|p;)|opf;|prop;|rtri;|s(?:cr;|u(?:bn(?:E;|e;)|pn(?:E;|e;)))|zigzag;)|w(?:circ;|e(?:d(?:bar;|ge(?:;|q;))|ierp;)|fr;|opf;|p;|r(?:;|eath;)|scr;)|x(?:c(?:ap;|irc;|up;)|dtri;|fr;|h(?:Arr;|arr;)|i;|l(?:Arr;|arr;)|map;|nis;|o(?:dot;|p(?:f;|lus;)|time;)|r(?:Arr;|arr;)|s(?:cr;|qcup;)|u(?:plus;|tri;)|vee;|wedge;)|y(?:ac(?:ute;?|y;)|c(?:irc;|y;)|en;?|fr;|icy;|opf;|scr;|u(?:cy;|ml;?))|z(?:acute;|c(?:aron;|y;)|dot;|e(?:etrf;|ta;)|fr;|hcy;|igrarr;|opf;|scr;|w(?:j;|nj;)))|[\s\S]/g,uP=32,dP=/[^\r"&\u0000]+/g,pP=/[^\r'&\u0000]+/g,cP=/[^\r\t\n\f &>\u0000]+/g,lP=/[^\r\t\n\f \/>A-Z\u0000]+/g,oP=/[^\r\t\n\f \/=>A-Z\u0000]+/g,rP=/[^\]\r\u0000\uffff]*/g,iP=/[^&<\r\u0000\uffff]*/g,Rj=/[^<\r\u0000\uffff]*/g,sP=/[^\r\u0000\uffff]*/g,Lj=/(?:(\/)?([a-z]+)>)|[\s\S]/g,Nj=/(?:([-a-z]+)[ \t\n\f]*=[ \t\n\f]*('[^'&\r\u0000]*'|"[^"&\r\u0000]*"|[^\t\n\r\f "&'\u0000>][^&> \t\n\r\f\u0000]*[ \t\n\f]))|[\s\S]/g,V6=/[^\x09\x0A\x0C\x0D\x20]/,Z3=/[^\x09\x0A\x0C\x0D\x20]/g,nP=/[^\x00\x09\x0A\x0C\x0D\x20]/,e2=/^[\x09\x0A\x0C\x0D\x20]+/,G6=/\x00/g;function y0($){var J=16384;if($.length<J)return String.fromCharCode.apply(String,$);var Z="";for(var Y=0;Y<$.length;Y+=J)Z+=String.fromCharCode.apply(String,$.slice(Y,Y+J));return Z}function aP($){var J=[];for(var Z=0;Z<$.length;Z++)J[Z]=$.charCodeAt(Z);return J}function d$($,J){if(typeof J==="string")return $.namespaceURI===X$.HTML&&$.localName===J;var Z=J[$.namespaceURI];return Z&&Z[$.localName]}function yj($){return d$($,uj)}function Tj($){if(d$($,dj))return!0;if($.namespaceURI===X$.MATHML&&$.localName==="annotation-xml"){var J=$.getAttribute("encoding");if(J)J=J.toLowerCase();if(J==="text/html"||J==="application/xhtml+xml")return!0}return!1}function tP($){if($ in Aj)return Aj[$];else return $}function kj($){for(var J=0,Z=$.length;J<Z;J++)if($[J][0]in Ij)$[J][0]=Ij[$[J][0]]}function Ej($){for(var J=0,Z=$.length;J<Z;J++)if($[J][0]==="definitionurl"){$[J][0]="definitionURL";break}}function Y3($){for(var J=0,Z=$.length;J<Z;J++)if($[J][0]in Pj)$[J].push(Pj[$[J][0]])}function xj($,J){for(var Z=0,Y=$.length;Z<Y;Z++){var K=$[Z][0],Q=$[Z][1];if(J.hasAttribute(K))continue;J._setAttribute(K,Q)}}b$.ElementStack=function(){this.elements=[],this.top=null};b$.ElementStack.prototype.push=function($){this.elements.push($),this.top=$};b$.ElementStack.prototype.pop=function($){this.elements.pop(),this.top=this.elements[this.elements.length-1]};b$.ElementStack.prototype.popTag=function($){for(var J=this.elements.length-1;J>0;J--){var Z=this.elements[J];if(d$(Z,$))break}this.elements.length=J,this.top=this.elements[J-1]};b$.ElementStack.prototype.popElementType=function($){for(var J=this.elements.length-1;J>0;J--)if(this.elements[J]instanceof $)break;this.elements.length=J,this.top=this.elements[J-1]};b$.ElementStack.prototype.popElement=function($){for(var J=this.elements.length-1;J>0;J--)if(this.elements[J]===$)break;this.elements.length=J,this.top=this.elements[J-1]};b$.ElementStack.prototype.removeElement=function($){if(this.top===$)this.pop();else{var J=this.elements.lastIndexOf($);if(J!==-1)this.elements.splice(J,1)}};b$.ElementStack.prototype.clearToContext=function($){for(var J=this.elements.length-1;J>0;J--)if(d$(this.elements[J],$))break;this.elements.length=J+1,this.top=this.elements[J]};b$.ElementStack.prototype.contains=function($){return this.inSpecificScope($,Object.create(null))};b$.ElementStack.prototype.inSpecificScope=function($,J){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(d$(Y,$))return!0;if(d$(Y,J))return!1}return!1};b$.ElementStack.prototype.elementInSpecificScope=function($,J){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(Y===$)return!0;if(d$(Y,J))return!1}return!1};b$.ElementStack.prototype.elementTypeInSpecificScope=function($,J){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(Y instanceof $)return!0;if(d$(Y,J))return!1}return!1};b$.ElementStack.prototype.inScope=function($){return this.inSpecificScope($,T1)};b$.ElementStack.prototype.elementInScope=function($){return this.elementInSpecificScope($,T1)};b$.ElementStack.prototype.elementTypeInScope=function($){return this.elementTypeInSpecificScope($,T1)};b$.ElementStack.prototype.inButtonScope=function($){return this.inSpecificScope($,V3)};b$.ElementStack.prototype.inListItemScope=function($){return this.inSpecificScope($,j6)};b$.ElementStack.prototype.inTableScope=function($){return this.inSpecificScope($,mj)};b$.ElementStack.prototype.inSelectScope=function($){for(var J=this.elements.length-1;J>=0;J--){var Z=this.elements[J];if(Z.namespaceURI!==X$.HTML)return!1;var Y=Z.localName;if(Y===$)return!0;if(Y!=="optgroup"&&Y!=="option")return!1}return!1};b$.ElementStack.prototype.generateImpliedEndTags=function($,J){var Z=J?gj:hj;for(var Y=this.elements.length-1;Y>=0;Y--){var K=this.elements[Y];if($&&d$(K,$))break;if(!d$(this.elements[Y],Z))break}this.elements.length=Y+1,this.top=this.elements[Y]};b$.ActiveFormattingElements=function(){this.list=[],this.attrs=[]};b$.ActiveFormattingElements.prototype.MARKER={localName:"|"};b$.ActiveFormattingElements.prototype.insertMarker=function(){this.list.push(this.MARKER),this.attrs.push(this.MARKER)};b$.ActiveFormattingElements.prototype.push=function($,J){var Z=0;for(var Y=this.list.length-1;Y>=0;Y--){if(this.list[Y]===this.MARKER)break;if(V($,this.list[Y],this.attrs[Y])){if(Z++,Z===3){this.list.splice(Y,1),this.attrs.splice(Y,1);break}}}this.list.push($);var K=[];for(var Q=0;Q<J.length;Q++)K[Q]=J[Q];this.attrs.push(K);function V(X,W,_){if(X.localName!==W.localName)return!1;if(X._numattrs!==_.length)return!1;for(var j=0,H=_.length;j<H;j++){var q=_[j][0],U=_[j][1];if(!X.hasAttribute(q))return!1;if(X.getAttribute(q)!==U)return!1}return!0}};b$.ActiveFormattingElements.prototype.clearToMarker=function(){for(var $=this.list.length-1;$>=0;$--)if(this.list[$]===this.MARKER)break;if($<0)$=0;this.list.length=$,this.attrs.length=$};b$.ActiveFormattingElements.prototype.findElementByTag=function($){for(var J=this.list.length-1;J>=0;J--){var Z=this.list[J];if(Z===this.MARKER)break;if(Z.localName===$)return Z}return null};b$.ActiveFormattingElements.prototype.indexOf=function($){return this.list.lastIndexOf($)};b$.ActiveFormattingElements.prototype.remove=function($){var J=this.list.lastIndexOf($);if(J!==-1)this.list.splice(J,1),this.attrs.splice(J,1)};b$.ActiveFormattingElements.prototype.replace=function($,J,Z){var Y=this.list.lastIndexOf($);if(Y!==-1)this.list[Y]=J,this.attrs[Y]=Z};b$.ActiveFormattingElements.prototype.insertAfter=function($,J){var Z=this.list.lastIndexOf($);if(Z!==-1)this.list.splice(Z,0,J),this.attrs.splice(Z,0,J)};function b$($,J,Z){var Y=null,K=0,Q=0,V=!1,X=!1,W=0,_=[],j="",H=!0,q=0,U=S$,z,M,I="",C="",P=[],D="",L="",R=[],N=[],x=[],b=[],v=[],m=!1,A=fH,u=null,r=[],S=new b$.ElementStack,T=new b$.ActiveFormattingElements,k=J!==void 0,A$=null,s=null,J$=!0;if(J)J$=J.ownerDocument._scripting_enabled;if(Z&&Z.scripting_enabled===!1)J$=!1;var Z$=!0,W$=!1,y$,Q$,y=[],n=!1,a=!1,c$={document:function(){return l},_asDocumentFragment:function(){var B=l.createDocumentFragment(),O=l.firstChild;while(O.hasChildNodes())B.appendChild(O.firstChild);return B},pause:function(){q++},resume:function(){q--,this.parse("")},parse:function(B,O,w){var E;if(q>0)return j+=B,!0;if(W===0){if(j)B=j+B,j="";if(O)B+="\uFFFF",V=!0;if(Y=B,K=B.length,Q=0,H){if(H=!1,Y.charCodeAt(0)===65279)Q=1}W++,E=g(w),j=Y.substring(Q,K),W--}else{if(W++,_.push(Y,K,Q),Y=B,K=B.length,Q=0,g(),E=!1,j=Y.substring(Q,K),Q=_.pop(),K=_.pop(),Y=_.pop(),j)Y=j+Y.substring(Q),K=Y.length,Q=0,j="";W--}return E}},l=new kP(!0,$);if(l._parser=c$,l._scripting_enabled=J$,J){if(J.ownerDocument._quirks)l._quirks=!0;if(J.ownerDocument._limitedQuirks)l._limitedQuirks=!0;if(J.namespaceURI===X$.HTML)switch(J.localName){case"title":case"textarea":U=J2;break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":case"script":case"plaintext":U=L6;break}var d=l.createElement("html");if(l._appendChild(d),S.push(d),J instanceof u$.HTMLTemplateElement)r.push(g6);nJ();for(var Y$=J;Y$!==null;Y$=Y$.parentElement)if(Y$ instanceof u$.HTMLFormElement){s=Y$;break}}function g(B){var O,w,E,h;while(Q<K){if(q>0||B&&B())return!0;switch(typeof U.lookahead){case"undefined":if(O=Y.charCodeAt(Q++),X){if(X=!1,O===10){Q++;continue}}switch(O){case 13:if(Q<K){if(Y.charCodeAt(Q)===10)Q++}else X=!0;U(10);break;case 65535:if(V&&Q===K){U(Q6);break}default:U(O);break}break;case"number":O=Y.charCodeAt(Q);var c=U.lookahead,U$=!0;if(c<0)U$=!1,c=-c;if(c<K-Q)w=U$?Y.substring(Q,Q+c):null,h=!1;else if(V){if(w=U$?Y.substring(Q,K):null,h=!0,O===65535&&Q===K-1)O=Q6}else return!0;U(O,w,h);break;case"string":O=Y.charCodeAt(Q),E=U.lookahead;var w$=Y.indexOf(E,Q);if(w$!==-1)w=Y.substring(Q,w$+E.length),h=!1;else{if(!V)return!0;if(w=Y.substring(Q,K),O===65535&&Q===K-1)O=Q6;h=!0}U(O,w,h);break}}return!1}function t(B,O){for(var w=0;w<v.length;w++)if(v[w][0]===B)return;if(O!==void 0)v.push([B,O]);else v.push([B])}function C$(){Nj.lastIndex=Q-1;var B=Nj.exec(Y);if(!B)throw Error("should never happen");var O=B[1];if(!O)return!1;var w=B[2],E=w.length;switch(w[0]){case'"':case"'":w=w.substring(1,E-1),Q+=B[0].length-1,U=k6;break;default:U=A1,Q+=B[0].length-1,w=w.substring(0,E-1);break}for(var h=0;h<v.length;h++)if(v[h][0]===O)return!0;return v.push([O,w]),!0}function T$(){m=!1,I="",v.length=0}function M$(){m=!0,I="",v.length=0}function r$(){P.length=0}function K0(){D=""}function t1(){L=""}function a8(){R.length=0}function e1(){N.length=0,x=null,b=null}function C1(){x=[]}function M1(){b=[]}function h$(){W$=!0}function lB(){return S.top&&S.top.namespaceURI!=="http://www.w3.org/1999/xhtml"}function i0(B){return C===B}function VJ(){if(y.length>0){var B=y0(y);if(y.length=0,a){if(a=!1,B[0]===`
33
33
  `)B=B.substring(1);if(B.length===0)return}j0(cJ,B),n=!1}a=!1}function rJ(B){B.lastIndex=Q-1;var O=B.exec(Y);if(O&&O.index===Q-1){if(O=O[0],Q+=O.length-1,V&&Q===K)O=O.slice(0,-1),Q--;return O}else throw Error("should never happen")}function iJ(B){B.lastIndex=Q-1;var O=B.exec(Y)[0];if(!O)return!1;return oB(O),Q+=O.length-1,!0}function oB(B){if(y.length>0)VJ();if(a){if(a=!1,B[0]===`
34
- `)B=B.substring(1);if(B.length===0)return}j0(cJ,B)}function k1(){if(m)j0(N$,I);else{var B=I;I="",C=B,j0(L0,B,v)}}function rB(){if(Q===K)return!1;Lj.lastIndex=Q;var B=Lj.exec(Y);if(!B)throw Error("should never happen");var O=B[2];if(!O)return!1;var w=B[1];if(w)Q+=O.length+2,j0(N$,O);else Q+=O.length+1,C=O,j0(L0,O,bP);return!0}function iB(){if(m)j0(N$,I,null,!0);else j0(L0,I,v,!0)}function g$(){j0(xP,N0(N),x?N0(x):void 0,b?N0(b):void 0)}function I$(){VJ(),A(Q6),l.modclock=1}var j0=c$.insertToken=function(O,w,E,h){VJ();var c=S.top;if(!c||c.namespaceURI===X$.HTML)A(O,w,E,h);else if(O!==L0&&O!==cJ)ZK(O,w,E,h);else if(yj(c)&&(O===cJ||O===L0&&w!=="mglyph"&&w!=="malignmark")||O===L0&&w==="svg"&&c.namespaceURI===X$.MATHML&&c.localName==="annotation-xml"||Tj(c))Q$=!0,A(O,w,E,h),Q$=!1;else ZK(O,w,E,h)};function D1(B){var O=S.top;if($2&&d$(O,lJ))e8(function(w){return w.createComment(B)});else{if(O instanceof u$.HTMLTemplateElement)O=O.content;O._appendChild(O.ownerDocument.createComment(B))}}function P1(B){var O=S.top;if($2&&d$(O,lJ))e8(function(E){return E.createTextNode(B)});else{if(O instanceof u$.HTMLTemplateElement)O=O.content;var w=O.lastChild;if(w&&w.nodeType===J3.TEXT_NODE)w.appendData(B);else O._appendChild(O.ownerDocument.createTextNode(B))}}function sJ(B,O,w){var E=bj.createElement(B,O,null);if(w)for(var h=0,c=w.length;h<c;h++)E._setAttribute(w[h][0],w[h][1]);return E}var $2=!1;function q$(B,O){var w=t8(function(E){return sJ(E,B,O)});if(d$(w,fj))w._form=s;return w}function t8(B){var O;if($2&&d$(S.top,lJ))O=e8(B);else if(S.top instanceof u$.HTMLTemplateElement)O=B(S.top.content.ownerDocument),S.top.content._appendChild(O);else O=B(S.top.ownerDocument),S.top._appendChild(O);return S.push(O),O}function w6(B,O,w){return t8(function(E){var h=E._createElementNS(B,w,null);if(O)for(var c=0,U$=O.length;c<U$;c++){var w$=O[c];if(w$.length===2)h._setAttribute(w$[0],w$[1]);else h._setAttributeNS(w$[2],w$[0],w$[1])}return h})}function u3(B){for(var O=S.elements.length-1;O>=0;O--)if(S.elements[O]instanceof B)return O;return-1}function e8(B){var O,w,E=-1,h=-1,c;if(E=u3(u$.HTMLTableElement),h=u3(u$.HTMLTemplateElement),h>=0&&(E<0||h>E))O=S.elements[h];else if(E>=0)if(O=S.elements[E].parentNode,O)w=S.elements[E];else O=S.elements[E-1];if(!O)O=S.elements[0];if(O instanceof u$.HTMLTemplateElement)O=O.content;if(c=B(O.ownerDocument),c.nodeType===J3.TEXT_NODE){var U$;if(w)U$=w.previousSibling;else U$=O.lastChild;if(U$&&U$.nodeType===J3.TEXT_NODE)return U$.appendData(c.data),c}if(w)O.insertBefore(c,w);else O._appendChild(c);return c}function nJ(){var B=!1;for(var O=S.elements.length-1;O>=0;O--){var w=S.elements[O];if(O===0){if(B=!0,k)w=J}if(w.namespaceURI===X$.HTML){var E=w.localName;switch(E){case"select":for(var h=O;h>0;){var c=S.elements[--h];if(c instanceof u$.HTMLTemplateElement)break;else if(c instanceof u$.HTMLTableElement){A=H9;return}}A=E1;return;case"tr":A=eJ;return;case"tbody":case"tfoot":case"thead":A=I2;return;case"caption":A=h6;return;case"colgroup":A=B9;return;case"table":A=i0;return;case"template":A=r[r.length-1];return;case"body":A=j$;return;case"frameset":A=f6;return;case"html":if(A$===null)A=j9;else A=v6;return;default:if(!B){if(E==="head"){A=Q0;return}if(E==="td"||E==="th"){A=GJ;return}}}}if(B){A=j$;return}}}function $9(B,O){q$(B,O),U=aJ,u=A,A=U9}function sB(B,O){q$(B,O),U=J2,u=A,A=U9}function R6(B,O){return{elt:sJ(B,T.list[O].localName,T.attrs[O]),attrs:T.attrs[O]}}function T0(){if(T.list.length===0)return;var B=T.list[T.list.length-1];if(B===T.MARKER)return;if(S.elements.lastIndexOf(B)!==-1)return;for(var O=T.list.length-2;O>=0;O--){if(B=T.list[O],B===T.MARKER)break;if(S.elements.lastIndexOf(B)!==-1)break}for(O=O+1;O<T.list.length;O++){var w=t8(function(E){return R6(E,O).elt});T.list[O]=w}}var J9={localName:"BM"};function nB(B){if(d$(S.top,B)&&T.indexOf(S.top)===-1)return S.pop(),!0;var O=0;while(O<8){O++;var w=T.findElementByTag(B);if(!w)return!1;var E=S.elements.lastIndexOf(w);if(E===-1)return T.remove(w),!0;if(!S.elementInScope(w))return!0;var h=null,c;for(var U$=E+1;U$<S.elements.length;U$++)if(d$(S.elements[U$],$J)){h=S.elements[U$],c=U$;break}if(!h)return S.popElement(w),T.remove(w),!0;else{var w$=S.elements[E-1];T.insertAfter(w,J9);var J0=h,M0=h,s0=c,X1,A2=0;while(!0){if(A2++,J0=S.elements[--s0],J0===w)break;if(X1=T.indexOf(J0),A2>3&&X1!==-1)T.remove(J0),X1=-1;if(X1===-1){S.removeElement(J0);continue}var V2=R6(w$.ownerDocument,X1);if(T.replace(J0,V2.elt,V2.attrs),S.elements[s0]=V2.elt,J0=V2.elt,M0===h)T.remove(J9),T.insertAfter(V2.elt,J9);J0._appendChild(M0),M0=J0}if($2&&d$(w$,lJ))e8(function(){return M0});else if(w$ instanceof u$.HTMLTemplateElement)w$.content._appendChild(M0);else w$._appendChild(M0);var $8=R6(h.ownerDocument,T.indexOf(w));while(h.hasChildNodes())$8.elt._appendChild(h.firstChild);h._appendChild($8.elt),T.remove(w),T.replace(J9,$8.elt,$8.attrs),S.removeElement(w);var cH=S.elements.lastIndexOf(h);S.elements.splice(cH+1,0,$8.elt)}}return!0}function aB(){S.pop(),A=u;return}function M2(){if(delete l._parser,S.elements.length=0,l.defaultView)l.defaultView.dispatchEvent(new u$.Event("load",{}))}function V$(B,O){U=O,Q--}function S$(B){switch(B){case 38:z=S$,U=tJ;break;case 60:if(rB())break;U=tB;break;case 0:y.push(B),n=!0;break;case-1:I$();break;default:iJ(iP)||y.push(B);break}}function J2(B){switch(B){case 38:z=J2,U=tJ;break;case 60:U=$H;break;case 0:y.push(65533),n=!0;break;case-1:I$();break;default:y.push(B);break}}function aJ(B){switch(B){case 60:U=YH;break;case 0:y.push(65533);break;case-1:I$();break;default:iJ(Rj)||y.push(B);break}}function Z2(B){switch(B){case 60:U=VH;break;case 0:y.push(65533);break;case-1:I$();break;default:iJ(Rj)||y.push(B);break}}function L6(B){switch(B){case 0:y.push(65533);break;case-1:I$();break;default:iJ(sP)||y.push(B);break}}function tB(B){switch(B){case 33:U=l3;break;case 47:U=eB;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:T$(),V$(B,d3);break;case 63:V$(B,Q9);break;default:y.push(60),V$(B,S$);break}}function eB(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,d3);break;case 62:U=S$;break;case-1:y.push(60),y.push(47),I$();break;default:V$(B,Q9);break}}function d3(B){switch(B){case 9:case 10:case 12:case 32:U=A1;break;case 47:U=K2;break;case 62:U=S$,k1();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32);break;case 0:I+=String.fromCharCode(65533);break;case-1:I$();break;default:I+=rJ(lP);break}}function $H(B){if(B===47)r$(),U=JH;else y.push(60),V$(B,J2)}function JH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,ZH);break;default:y.push(60),y.push(47),V$(B,J2);break}}function ZH(B){switch(B){case 9:case 10:case 12:case 32:if(r0(I)){U=A1;return}break;case 47:if(r0(I)){U=K2;return}break;case 62:if(r0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,J2)}function YH(B){if(B===47)r$(),U=KH;else y.push(60),V$(B,aJ)}function KH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,QH);break;default:y.push(60),y.push(47),V$(B,aJ);break}}function QH(B){switch(B){case 9:case 10:case 12:case 32:if(r0(I)){U=A1;return}break;case 47:if(r0(I)){U=K2;return}break;case 62:if(r0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,aJ)}function VH(B){switch(B){case 47:r$(),U=GH;break;case 33:U=WH,y.push(60),y.push(33);break;default:y.push(60),V$(B,Z2);break}}function GH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,XH);break;default:y.push(60),y.push(47),V$(B,Z2);break}}function XH(B){switch(B){case 9:case 10:case 12:case 32:if(r0(I)){U=A1;return}break;case 47:if(r0(I)){U=K2;return}break;case 62:if(r0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,Z2)}function WH(B){if(B===45)U=jH,y.push(45);else V$(B,Z2)}function jH(B){if(B===45)U=p3,y.push(45);else V$(B,Z2)}function I1(B){switch(B){case 45:U=UH,y.push(45);break;case 60:U=N6;break;case 0:y.push(65533);break;case-1:I$();break;default:y.push(B);break}}function UH(B){switch(B){case 45:U=p3,y.push(45);break;case 60:U=N6;break;case 0:U=I1,y.push(65533);break;case-1:I$();break;default:U=I1,y.push(B);break}}function p3(B){switch(B){case 45:y.push(45);break;case 60:U=N6;break;case 62:U=Z2,y.push(62);break;case 0:U=I1,y.push(65533);break;case-1:I$();break;default:U=I1,y.push(B);break}}function N6(B){switch(B){case 47:r$(),U=BH;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:r$(),y.push(60),V$(B,_H);break;default:y.push(60),V$(B,I1);break}}function BH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,HH);break;default:y.push(60),y.push(47),V$(B,I1);break}}function HH(B){switch(B){case 9:case 10:case 12:case 32:if(r0(I)){U=A1;return}break;case 47:if(r0(I)){U=K2;return}break;case 62:if(r0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,I1)}function _H(B){switch(B){case 9:case 10:case 12:case 32:case 47:case 62:if(N0(P)==="script")U=Y2;else U=I1;y.push(B);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:P.push(B+32),y.push(B);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:P.push(B),y.push(B);break;default:V$(B,I1);break}}function Y2(B){switch(B){case 45:U=OH,y.push(45);break;case 60:U=y6,y.push(60);break;case 0:y.push(65533);break;case-1:I$();break;default:y.push(B);break}}function OH(B){switch(B){case 45:U=qH,y.push(45);break;case 60:U=y6,y.push(60);break;case 0:U=Y2,y.push(65533);break;case-1:I$();break;default:U=Y2,y.push(B);break}}function qH(B){switch(B){case 45:y.push(45);break;case 60:U=y6,y.push(60);break;case 62:U=Z2,y.push(62);break;case 0:U=Y2,y.push(65533);break;case-1:I$();break;default:U=Y2,y.push(B);break}}function y6(B){if(B===47)r$(),U=FH,y.push(47);else V$(B,Y2)}function FH(B){switch(B){case 9:case 10:case 12:case 32:case 47:case 62:if(N0(P)==="script")U=I1;else U=Y2;y.push(B);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:P.push(B+32),y.push(B);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:P.push(B),y.push(B);break;default:V$(B,Y2);break}}function A1(B){switch(B){case 9:case 10:case 12:case 32:break;case 47:U=K2;break;case 62:U=S$,k1();break;case-1:I$();break;case 61:K0(),D+=String.fromCharCode(B),U=T6;break;default:if(C$())break;K0(),V$(B,T6);break}}function T6(B){switch(B){case 9:case 10:case 12:case 32:case 47:case 62:case-1:V$(B,zH);break;case 61:U=c3;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:D+=String.fromCharCode(B+32);break;case 0:D+=String.fromCharCode(65533);break;case 34:case 39:case 60:default:D+=rJ(oP);break}}function zH(B){switch(B){case 9:case 10:case 12:case 32:break;case 47:t(D),U=K2;break;case 61:U=c3;break;case 62:U=S$,t(D),k1();break;case-1:t(D),I$();break;default:t(D),K0(),V$(B,T6);break}}function c3(B){switch(B){case 9:case 10:case 12:case 32:break;case 34:t1(),U=Z9;break;case 39:t1(),U=Y9;break;case 62:default:t1(),V$(B,K9);break}}function Z9(B){switch(B){case 34:t(D,L),U=k6;break;case 38:z=Z9,U=tJ;break;case 0:L+=String.fromCharCode(65533);break;case-1:I$();break;case 10:L+=String.fromCharCode(B);break;default:L+=rJ(dP);break}}function Y9(B){switch(B){case 39:t(D,L),U=k6;break;case 38:z=Y9,U=tJ;break;case 0:L+=String.fromCharCode(65533);break;case-1:I$();break;case 10:L+=String.fromCharCode(B);break;default:L+=rJ(pP);break}}function K9(B){switch(B){case 9:case 10:case 12:case 32:t(D,L),U=A1;break;case 38:z=K9,U=tJ;break;case 62:t(D,L),U=S$,k1();break;case 0:L+=String.fromCharCode(65533);break;case-1:Q--,U=S$;break;case 34:case 39:case 60:case 61:case 96:default:L+=rJ(cP);break}}function k6(B){switch(B){case 9:case 10:case 12:case 32:U=A1;break;case 47:U=K2;break;case 62:U=S$,k1();break;case-1:I$();break;default:V$(B,A1);break}}function K2(B){switch(B){case 62:U=S$,iB(!0);break;case-1:I$();break;default:V$(B,A1);break}}function Q9(B,O,w){var E=O.length;if(w)Q+=E-1;else Q+=E;var h=O.substring(0,E-1);h=h.replace(/\u0000/g,"\uFFFD"),h=h.replace(/\u000D\u000A/g,`
34
+ `)B=B.substring(1);if(B.length===0)return}j0(cJ,B)}function k1(){if(m)j0(N$,I);else{var B=I;I="",C=B,j0(N0,B,v)}}function rB(){if(Q===K)return!1;Lj.lastIndex=Q;var B=Lj.exec(Y);if(!B)throw Error("should never happen");var O=B[2];if(!O)return!1;var w=B[1];if(w)Q+=O.length+2,j0(N$,O);else Q+=O.length+1,C=O,j0(N0,O,bP);return!0}function iB(){if(m)j0(N$,I,null,!0);else j0(N0,I,v,!0)}function g$(){j0(xP,y0(N),x?y0(x):void 0,b?y0(b):void 0)}function I$(){VJ(),A(Q6),l.modclock=1}var j0=c$.insertToken=function(O,w,E,h){VJ();var c=S.top;if(!c||c.namespaceURI===X$.HTML)A(O,w,E,h);else if(O!==N0&&O!==cJ)ZK(O,w,E,h);else if(yj(c)&&(O===cJ||O===N0&&w!=="mglyph"&&w!=="malignmark")||O===N0&&w==="svg"&&c.namespaceURI===X$.MATHML&&c.localName==="annotation-xml"||Tj(c))Q$=!0,A(O,w,E,h),Q$=!1;else ZK(O,w,E,h)};function D1(B){var O=S.top;if($2&&d$(O,lJ))e8(function(w){return w.createComment(B)});else{if(O instanceof u$.HTMLTemplateElement)O=O.content;O._appendChild(O.ownerDocument.createComment(B))}}function P1(B){var O=S.top;if($2&&d$(O,lJ))e8(function(E){return E.createTextNode(B)});else{if(O instanceof u$.HTMLTemplateElement)O=O.content;var w=O.lastChild;if(w&&w.nodeType===J3.TEXT_NODE)w.appendData(B);else O._appendChild(O.ownerDocument.createTextNode(B))}}function sJ(B,O,w){var E=bj.createElement(B,O,null);if(w)for(var h=0,c=w.length;h<c;h++)E._setAttribute(w[h][0],w[h][1]);return E}var $2=!1;function q$(B,O){var w=t8(function(E){return sJ(E,B,O)});if(d$(w,fj))w._form=s;return w}function t8(B){var O;if($2&&d$(S.top,lJ))O=e8(B);else if(S.top instanceof u$.HTMLTemplateElement)O=B(S.top.content.ownerDocument),S.top.content._appendChild(O);else O=B(S.top.ownerDocument),S.top._appendChild(O);return S.push(O),O}function w6(B,O,w){return t8(function(E){var h=E._createElementNS(B,w,null);if(O)for(var c=0,U$=O.length;c<U$;c++){var w$=O[c];if(w$.length===2)h._setAttribute(w$[0],w$[1]);else h._setAttributeNS(w$[2],w$[0],w$[1])}return h})}function u3(B){for(var O=S.elements.length-1;O>=0;O--)if(S.elements[O]instanceof B)return O;return-1}function e8(B){var O,w,E=-1,h=-1,c;if(E=u3(u$.HTMLTableElement),h=u3(u$.HTMLTemplateElement),h>=0&&(E<0||h>E))O=S.elements[h];else if(E>=0)if(O=S.elements[E].parentNode,O)w=S.elements[E];else O=S.elements[E-1];if(!O)O=S.elements[0];if(O instanceof u$.HTMLTemplateElement)O=O.content;if(c=B(O.ownerDocument),c.nodeType===J3.TEXT_NODE){var U$;if(w)U$=w.previousSibling;else U$=O.lastChild;if(U$&&U$.nodeType===J3.TEXT_NODE)return U$.appendData(c.data),c}if(w)O.insertBefore(c,w);else O._appendChild(c);return c}function nJ(){var B=!1;for(var O=S.elements.length-1;O>=0;O--){var w=S.elements[O];if(O===0){if(B=!0,k)w=J}if(w.namespaceURI===X$.HTML){var E=w.localName;switch(E){case"select":for(var h=O;h>0;){var c=S.elements[--h];if(c instanceof u$.HTMLTemplateElement)break;else if(c instanceof u$.HTMLTableElement){A=H9;return}}A=E1;return;case"tr":A=eJ;return;case"tbody":case"tfoot":case"thead":A=I2;return;case"caption":A=h6;return;case"colgroup":A=B9;return;case"table":A=s0;return;case"template":A=r[r.length-1];return;case"body":A=j$;return;case"frameset":A=f6;return;case"html":if(A$===null)A=j9;else A=v6;return;default:if(!B){if(E==="head"){A=Q0;return}if(E==="td"||E==="th"){A=GJ;return}}}}if(B){A=j$;return}}}function $9(B,O){q$(B,O),U=aJ,u=A,A=U9}function sB(B,O){q$(B,O),U=J2,u=A,A=U9}function R6(B,O){return{elt:sJ(B,T.list[O].localName,T.attrs[O]),attrs:T.attrs[O]}}function k0(){if(T.list.length===0)return;var B=T.list[T.list.length-1];if(B===T.MARKER)return;if(S.elements.lastIndexOf(B)!==-1)return;for(var O=T.list.length-2;O>=0;O--){if(B=T.list[O],B===T.MARKER)break;if(S.elements.lastIndexOf(B)!==-1)break}for(O=O+1;O<T.list.length;O++){var w=t8(function(E){return R6(E,O).elt});T.list[O]=w}}var J9={localName:"BM"};function nB(B){if(d$(S.top,B)&&T.indexOf(S.top)===-1)return S.pop(),!0;var O=0;while(O<8){O++;var w=T.findElementByTag(B);if(!w)return!1;var E=S.elements.lastIndexOf(w);if(E===-1)return T.remove(w),!0;if(!S.elementInScope(w))return!0;var h=null,c;for(var U$=E+1;U$<S.elements.length;U$++)if(d$(S.elements[U$],$J)){h=S.elements[U$],c=U$;break}if(!h)return S.popElement(w),T.remove(w),!0;else{var w$=S.elements[E-1];T.insertAfter(w,J9);var J0=h,M0=h,n0=c,X1,A2=0;while(!0){if(A2++,J0=S.elements[--n0],J0===w)break;if(X1=T.indexOf(J0),A2>3&&X1!==-1)T.remove(J0),X1=-1;if(X1===-1){S.removeElement(J0);continue}var V2=R6(w$.ownerDocument,X1);if(T.replace(J0,V2.elt,V2.attrs),S.elements[n0]=V2.elt,J0=V2.elt,M0===h)T.remove(J9),T.insertAfter(V2.elt,J9);J0._appendChild(M0),M0=J0}if($2&&d$(w$,lJ))e8(function(){return M0});else if(w$ instanceof u$.HTMLTemplateElement)w$.content._appendChild(M0);else w$._appendChild(M0);var $8=R6(h.ownerDocument,T.indexOf(w));while(h.hasChildNodes())$8.elt._appendChild(h.firstChild);h._appendChild($8.elt),T.remove(w),T.replace(J9,$8.elt,$8.attrs),S.removeElement(w);var cH=S.elements.lastIndexOf(h);S.elements.splice(cH+1,0,$8.elt)}}return!0}function aB(){S.pop(),A=u;return}function M2(){if(delete l._parser,S.elements.length=0,l.defaultView)l.defaultView.dispatchEvent(new u$.Event("load",{}))}function V$(B,O){U=O,Q--}function S$(B){switch(B){case 38:z=S$,U=tJ;break;case 60:if(rB())break;U=tB;break;case 0:y.push(B),n=!0;break;case-1:I$();break;default:iJ(iP)||y.push(B);break}}function J2(B){switch(B){case 38:z=J2,U=tJ;break;case 60:U=$H;break;case 0:y.push(65533),n=!0;break;case-1:I$();break;default:y.push(B);break}}function aJ(B){switch(B){case 60:U=YH;break;case 0:y.push(65533);break;case-1:I$();break;default:iJ(Rj)||y.push(B);break}}function Z2(B){switch(B){case 60:U=VH;break;case 0:y.push(65533);break;case-1:I$();break;default:iJ(Rj)||y.push(B);break}}function L6(B){switch(B){case 0:y.push(65533);break;case-1:I$();break;default:iJ(sP)||y.push(B);break}}function tB(B){switch(B){case 33:U=l3;break;case 47:U=eB;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:T$(),V$(B,d3);break;case 63:V$(B,Q9);break;default:y.push(60),V$(B,S$);break}}function eB(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,d3);break;case 62:U=S$;break;case-1:y.push(60),y.push(47),I$();break;default:V$(B,Q9);break}}function d3(B){switch(B){case 9:case 10:case 12:case 32:U=A1;break;case 47:U=K2;break;case 62:U=S$,k1();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32);break;case 0:I+=String.fromCharCode(65533);break;case-1:I$();break;default:I+=rJ(lP);break}}function $H(B){if(B===47)r$(),U=JH;else y.push(60),V$(B,J2)}function JH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,ZH);break;default:y.push(60),y.push(47),V$(B,J2);break}}function ZH(B){switch(B){case 9:case 10:case 12:case 32:if(i0(I)){U=A1;return}break;case 47:if(i0(I)){U=K2;return}break;case 62:if(i0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,J2)}function YH(B){if(B===47)r$(),U=KH;else y.push(60),V$(B,aJ)}function KH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,QH);break;default:y.push(60),y.push(47),V$(B,aJ);break}}function QH(B){switch(B){case 9:case 10:case 12:case 32:if(i0(I)){U=A1;return}break;case 47:if(i0(I)){U=K2;return}break;case 62:if(i0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,aJ)}function VH(B){switch(B){case 47:r$(),U=GH;break;case 33:U=WH,y.push(60),y.push(33);break;default:y.push(60),V$(B,Z2);break}}function GH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,XH);break;default:y.push(60),y.push(47),V$(B,Z2);break}}function XH(B){switch(B){case 9:case 10:case 12:case 32:if(i0(I)){U=A1;return}break;case 47:if(i0(I)){U=K2;return}break;case 62:if(i0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,Z2)}function WH(B){if(B===45)U=jH,y.push(45);else V$(B,Z2)}function jH(B){if(B===45)U=p3,y.push(45);else V$(B,Z2)}function I1(B){switch(B){case 45:U=UH,y.push(45);break;case 60:U=N6;break;case 0:y.push(65533);break;case-1:I$();break;default:y.push(B);break}}function UH(B){switch(B){case 45:U=p3,y.push(45);break;case 60:U=N6;break;case 0:U=I1,y.push(65533);break;case-1:I$();break;default:U=I1,y.push(B);break}}function p3(B){switch(B){case 45:y.push(45);break;case 60:U=N6;break;case 62:U=Z2,y.push(62);break;case 0:U=I1,y.push(65533);break;case-1:I$();break;default:U=I1,y.push(B);break}}function N6(B){switch(B){case 47:r$(),U=BH;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:r$(),y.push(60),V$(B,_H);break;default:y.push(60),V$(B,I1);break}}function BH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:M$(),V$(B,HH);break;default:y.push(60),y.push(47),V$(B,I1);break}}function HH(B){switch(B){case 9:case 10:case 12:case 32:if(i0(I)){U=A1;return}break;case 47:if(i0(I)){U=K2;return}break;case 62:if(i0(I)){U=S$,k1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:I+=String.fromCharCode(B+32),P.push(B);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:I+=String.fromCharCode(B),P.push(B);return;default:break}y.push(60),y.push(47),t2(y,P),V$(B,I1)}function _H(B){switch(B){case 9:case 10:case 12:case 32:case 47:case 62:if(y0(P)==="script")U=Y2;else U=I1;y.push(B);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:P.push(B+32),y.push(B);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:P.push(B),y.push(B);break;default:V$(B,I1);break}}function Y2(B){switch(B){case 45:U=OH,y.push(45);break;case 60:U=y6,y.push(60);break;case 0:y.push(65533);break;case-1:I$();break;default:y.push(B);break}}function OH(B){switch(B){case 45:U=qH,y.push(45);break;case 60:U=y6,y.push(60);break;case 0:U=Y2,y.push(65533);break;case-1:I$();break;default:U=Y2,y.push(B);break}}function qH(B){switch(B){case 45:y.push(45);break;case 60:U=y6,y.push(60);break;case 62:U=Z2,y.push(62);break;case 0:U=Y2,y.push(65533);break;case-1:I$();break;default:U=Y2,y.push(B);break}}function y6(B){if(B===47)r$(),U=FH,y.push(47);else V$(B,Y2)}function FH(B){switch(B){case 9:case 10:case 12:case 32:case 47:case 62:if(y0(P)==="script")U=I1;else U=Y2;y.push(B);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:P.push(B+32),y.push(B);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:P.push(B),y.push(B);break;default:V$(B,Y2);break}}function A1(B){switch(B){case 9:case 10:case 12:case 32:break;case 47:U=K2;break;case 62:U=S$,k1();break;case-1:I$();break;case 61:K0(),D+=String.fromCharCode(B),U=T6;break;default:if(C$())break;K0(),V$(B,T6);break}}function T6(B){switch(B){case 9:case 10:case 12:case 32:case 47:case 62:case-1:V$(B,zH);break;case 61:U=c3;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:D+=String.fromCharCode(B+32);break;case 0:D+=String.fromCharCode(65533);break;case 34:case 39:case 60:default:D+=rJ(oP);break}}function zH(B){switch(B){case 9:case 10:case 12:case 32:break;case 47:t(D),U=K2;break;case 61:U=c3;break;case 62:U=S$,t(D),k1();break;case-1:t(D),I$();break;default:t(D),K0(),V$(B,T6);break}}function c3(B){switch(B){case 9:case 10:case 12:case 32:break;case 34:t1(),U=Z9;break;case 39:t1(),U=Y9;break;case 62:default:t1(),V$(B,K9);break}}function Z9(B){switch(B){case 34:t(D,L),U=k6;break;case 38:z=Z9,U=tJ;break;case 0:L+=String.fromCharCode(65533);break;case-1:I$();break;case 10:L+=String.fromCharCode(B);break;default:L+=rJ(dP);break}}function Y9(B){switch(B){case 39:t(D,L),U=k6;break;case 38:z=Y9,U=tJ;break;case 0:L+=String.fromCharCode(65533);break;case-1:I$();break;case 10:L+=String.fromCharCode(B);break;default:L+=rJ(pP);break}}function K9(B){switch(B){case 9:case 10:case 12:case 32:t(D,L),U=A1;break;case 38:z=K9,U=tJ;break;case 62:t(D,L),U=S$,k1();break;case 0:L+=String.fromCharCode(65533);break;case-1:Q--,U=S$;break;case 34:case 39:case 60:case 61:case 96:default:L+=rJ(cP);break}}function k6(B){switch(B){case 9:case 10:case 12:case 32:U=A1;break;case 47:U=K2;break;case 62:U=S$,k1();break;case-1:I$();break;default:V$(B,A1);break}}function K2(B){switch(B){case 62:U=S$,iB(!0);break;case-1:I$();break;default:V$(B,A1);break}}function Q9(B,O,w){var E=O.length;if(w)Q+=E-1;else Q+=E;var h=O.substring(0,E-1);h=h.replace(/\u0000/g,"\uFFFD"),h=h.replace(/\u000D\u000A/g,`
35
35
  `),h=h.replace(/\u000D/g,`
36
- `),j0(y1,h),U=S$}Q9.lookahead=">";function l3(B,O,w){if(O[0]==="-"&&O[1]==="-"){Q+=2,a8(),U=CH;return}if(O.toUpperCase()==="DOCTYPE")Q+=7,U=wH;else if(O==="[CDATA["&&lB())Q+=7,U=b6;else U=Q9}l3.lookahead=7;function CH(B){switch(a8(),B){case 45:U=MH;break;case 62:U=S$,j0(y1,N0(R));break;default:V$(B,D2);break}}function MH(B){switch(B){case 45:U=V9;break;case 62:U=S$,j0(y1,N0(R));break;case-1:j0(y1,N0(R)),I$();break;default:R.push(45),V$(B,D2);break}}function D2(B){switch(B){case 60:R.push(B),U=DH;break;case 45:U=E6;break;case 0:R.push(65533);break;case-1:j0(y1,N0(R)),I$();break;default:R.push(B);break}}function DH(B){switch(B){case 33:R.push(B),U=PH;break;case 60:R.push(B);break;default:V$(B,D2);break}}function PH(B){switch(B){case 45:U=IH;break;default:V$(B,D2);break}}function IH(B){switch(B){case 45:U=AH;break;default:V$(B,E6);break}}function AH(B){switch(B){case 62:case-1:V$(B,V9);break;default:V$(B,V9);break}}function E6(B){switch(B){case 45:U=V9;break;case-1:j0(y1,N0(R)),I$();break;default:R.push(45),V$(B,D2);break}}function V9(B){switch(B){case 62:U=S$,j0(y1,N0(R));break;case 33:U=SH;break;case 45:R.push(45);break;case-1:j0(y1,N0(R)),I$();break;default:R.push(45),R.push(45),V$(B,D2);break}}function SH(B){switch(B){case 45:R.push(45),R.push(45),R.push(33),U=E6;break;case 62:U=S$,j0(y1,N0(R));break;case-1:j0(y1,N0(R)),I$();break;default:R.push(45),R.push(45),R.push(33),V$(B,D2);break}}function wH(B){switch(B){case 9:case 10:case 12:case 32:U=o3;break;case-1:e1(),h$(),g$(),I$();break;default:V$(B,o3);break}}function o3(B){switch(B){case 9:case 10:case 12:case 32:break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:e1(),N.push(B+32),U=x6;break;case 0:e1(),N.push(65533),U=x6;break;case 62:e1(),h$(),U=S$,g$();break;case-1:e1(),h$(),g$(),I$();break;default:e1(),N.push(B),U=x6;break}}function x6(B){switch(B){case 9:case 10:case 12:case 32:U=r3;break;case 62:U=S$,g$();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:N.push(B+32);break;case 0:N.push(65533);break;case-1:h$(),g$(),I$();break;default:N.push(B);break}}function r3(B,O,w){switch(B){case 9:case 10:case 12:case 32:Q+=1;break;case 62:U=S$,Q+=1,g$();break;case-1:h$(),g$(),I$();break;default:if(O=O.toUpperCase(),O==="PUBLIC")Q+=6,U=RH;else if(O==="SYSTEM")Q+=6,U=yH;else h$(),U=Q2;break}}r3.lookahead=6;function RH(B){switch(B){case 9:case 10:case 12:case 32:U=LH;break;case 34:C1(),U=i3;break;case 39:C1(),U=s3;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function LH(B){switch(B){case 9:case 10:case 12:case 32:break;case 34:C1(),U=i3;break;case 39:C1(),U=s3;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function i3(B){switch(B){case 34:U=n3;break;case 0:x.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:x.push(B);break}}function s3(B){switch(B){case 39:U=n3;break;case 0:x.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:x.push(B);break}}function n3(B){switch(B){case 9:case 10:case 12:case 32:U=NH;break;case 62:U=S$,g$();break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function NH(B){switch(B){case 9:case 10:case 12:case 32:break;case 62:U=S$,g$();break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function yH(B){switch(B){case 9:case 10:case 12:case 32:U=TH;break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function TH(B){switch(B){case 9:case 10:case 12:case 32:break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function G9(B){switch(B){case 34:U=a3;break;case 0:b.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:b.push(B);break}}function X9(B){switch(B){case 39:U=a3;break;case 0:b.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:b.push(B);break}}function a3(B){switch(B){case 9:case 10:case 12:case 32:break;case 62:U=S$,g$();break;case-1:h$(),g$(),I$();break;default:U=Q2;break}}function Q2(B){switch(B){case 62:U=S$,g$();break;case-1:g$(),I$();break;default:break}}function b6(B){switch(B){case 93:U=kH;break;case-1:I$();break;case 0:n=!0;default:iJ(rP)||y.push(B);break}}function kH(B){switch(B){case 93:U=EH;break;default:y.push(93),V$(B,b6);break}}function EH(B){switch(B){case 93:y.push(93);break;case 62:VJ(),U=S$;break;default:y.push(93),y.push(93),V$(B,b6);break}}function tJ(B){switch(r$(),P.push(38),B){case 9:case 10:case 12:case 32:case 60:case 38:case-1:V$(B,P2);break;case 35:P.push(B),U=xH;break;default:V$(B,t3);break}}function t3(B){wj.lastIndex=Q;var O=wj.exec(Y);if(!O)throw Error("should never happen");var w=O[1];if(!w){U=P2;return}switch(Q+=w.length,t2(P,aP(w)),z){case Z9:case Y9:case K9:if(w[w.length-1]!==";"){if(/[=A-Za-z0-9]/.test(Y[Q])){U=P2;return}}break;default:break}r$();var E=mP[w];if(typeof E==="number")P.push(E);else t2(P,E);U=P2}t3.lookahead=-uP;function xH(B){switch(M=0,B){case 120:case 88:P.push(B),U=bH;break;default:V$(B,vH);break}}function bH(B){switch(B){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 66:case 67:case 68:case 69:case 70:case 97:case 98:case 99:case 100:case 101:case 102:V$(B,hH);break;default:V$(B,P2);break}}function vH(B){switch(B){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:V$(B,gH);break;default:V$(B,P2);break}}function hH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:M*=16,M+=B-55;break;case 97:case 98:case 99:case 100:case 101:case 102:M*=16,M+=B-87;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:M*=16,M+=B-48;break;case 59:U=W9;break;default:V$(B,W9);break}}function gH(B){switch(B){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:M*=10,M+=B-48;break;case 59:U=W9;break;default:V$(B,W9);break}}function W9(B){if(M in Sj)M=Sj[M];else if(M>1114111||M>=55296&&M<57344)M=65533;if(r$(),M<=65535)P.push(M);else M=M-65536,P.push(55296+(M>>10)),P.push(56320+(M&1023));V$(B,P2)}function P2(B){switch(z){case Z9:case Y9:case K9:L+=N0(P);break;default:t2(y,P);break}V$(B,z)}function fH(B,O,w,E){switch(B){case 1:if(O=O.replace(e2,""),O.length===0)return;break;case 4:l._appendChild(l.createComment(O));return;case 5:var h=O,c=w,U$=E;if(l.appendChild(new EP(l,h,c,U$)),W$||h.toLowerCase()!=="html"||vP.test(c)||U$&&U$.toLowerCase()===hP||U$===void 0&&Dj.test(c))l._quirks=!0;else if(gP.test(c)||U$!==void 0&&Dj.test(c))l._limitedQuirks=!0;A=e3;return}l._quirks=!0,A=e3,A(B,O,w,E)}function e3(B,O,w,E){var h;switch(B){case 1:if(O=O.replace(e2,""),O.length===0)return;break;case 5:return;case 4:l._appendChild(l.createComment(O));return;case 2:if(O==="html"){h=sJ(l,O,w),S.push(h),l.appendChild(h),A=j9;return}break;case 3:switch(O){case"html":case"head":case"body":case"br":break;default:return}}h=sJ(l,"html",null),S.push(h),l.appendChild(h),A=j9,A(B,O,w,E)}function j9(B,O,w,E){switch(B){case 1:if(O=O.replace(e2,""),O.length===0)return;break;case 5:return;case 4:D1(O);return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"head":var h=q$(O,w);A$=h,A=Q0;return}break;case 3:switch(O){case"html":case"head":case"body":case"br":break;default:return}}j9(L0,"head",null),A(B,O,w,E)}function Q0(B,O,w,E){switch(B){case 1:var h=O.match(e2);if(h)P1(h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"meta":case"base":case"basefont":case"bgsound":case"link":q$(O,w),S.pop();return;case"title":sB(O,w);return;case"noscript":if(!J$){q$(O,w),A=$K;return}case"noframes":case"style":$9(O,w);return;case"script":t8(function(c){var U$=sJ(c,O,w);if(U$._parser_inserted=!0,U$._force_async=!1,k)U$._already_started=!0;return VJ(),U$}),U=Z2,u=A,A=U9;return;case"template":q$(O,w),T.insertMarker(),Z$=!1,A=g6,r.push(A);return;case"head":return}break;case 3:switch(O){case"head":S.pop(),A=v6;return;case"body":case"html":case"br":break;case"template":if(!S.contains("template"))return;S.generateImpliedEndTags(null,"thorough"),S.popTag("template"),T.clearToMarker(),r.pop(),nJ();return;default:return}break}Q0(N$,"head",null),A(B,O,w,E)}function $K(B,O,w,E){switch(B){case 5:return;case 4:Q0(B,O);return;case 1:var h=O.match(e2);if(h)Q0(B,h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 2:switch(O){case"html":j$(B,O,w,E);return;case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"style":Q0(B,O,w);return;case"head":case"noscript":return}break;case 3:switch(O){case"noscript":S.pop(),A=Q0;return;case"br":break;default:return}break}$K(N$,"noscript",null),A(B,O,w,E)}function v6(B,O,w,E){switch(B){case 1:var h=O.match(e2);if(h)P1(h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"body":q$(O,w),Z$=!1,A=j$;return;case"frameset":q$(O,w),A=f6;return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":S.push(A$),Q0(L0,O,w),S.removeElement(A$);return;case"head":return}break;case 3:switch(O){case"template":return Q0(B,O,w,E);case"body":case"html":case"br":break;default:return}break}v6(L0,"body",null),Z$=!0,A(B,O,w,E)}function j$(B,O,w,E){var h,c,U$,w$;switch(B){case 1:if(n){if(O=O.replace(G6,""),O.length===0)return}if(Z$&&V6.test(O))Z$=!1;T0(),P1(O);return;case 5:return;case 4:D1(O);return;case-1:if(r.length)return g6(B);M2();return;case 2:switch(O){case"html":if(S.contains("template"))return;xj(w,S.elements[0]);return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":Q0(L0,O,w);return;case"body":if(h=S.elements[1],!h||!(h instanceof u$.HTMLBodyElement)||S.contains("template"))return;Z$=!1,xj(w,h);return;case"frameset":if(!Z$)return;if(h=S.elements[1],!h||!(h instanceof u$.HTMLBodyElement))return;if(h.parentNode)h.parentNode.removeChild(h);while(!(S.top instanceof u$.HTMLHtmlElement))S.pop();q$(O,w),A=f6;return;case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"nav":case"ol":case"p":case"section":case"summary":case"ul":if(S.inButtonScope("p"))j$(N$,"p");q$(O,w);return;case"menu":if(S.inButtonScope("p"))j$(N$,"p");if(d$(S.top,"menuitem"))S.pop();q$(O,w);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(S.inButtonScope("p"))j$(N$,"p");if(S.top instanceof u$.HTMLHeadingElement)S.pop();q$(O,w);return;case"pre":case"listing":if(S.inButtonScope("p"))j$(N$,"p");q$(O,w),a=!0,Z$=!1;return;case"form":if(s&&!S.contains("template"))return;if(S.inButtonScope("p"))j$(N$,"p");if(w$=q$(O,w),!S.contains("template"))s=w$;return;case"li":Z$=!1;for(c=S.elements.length-1;c>=0;c--){if(U$=S.elements[c],U$ instanceof u$.HTMLLIElement){j$(N$,"li");break}if(d$(U$,$J)&&!d$(U$,K3))break}if(S.inButtonScope("p"))j$(N$,"p");q$(O,w);return;case"dd":case"dt":Z$=!1;for(c=S.elements.length-1;c>=0;c--){if(U$=S.elements[c],d$(U$,vj)){j$(N$,U$.localName);break}if(d$(U$,$J)&&!d$(U$,K3))break}if(S.inButtonScope("p"))j$(N$,"p");q$(O,w);return;case"plaintext":if(S.inButtonScope("p"))j$(N$,"p");q$(O,w),U=L6;return;case"button":if(S.inScope("button"))j$(N$,"button"),A(B,O,w,E);else T0(),q$(O,w),Z$=!1;return;case"a":var J0=T.findElementByTag("a");if(J0)j$(N$,O),T.remove(J0),S.removeElement(J0);case"b":case"big":case"code":case"em":case"font":case"i":case"s":case"small":case"strike":case"strong":case"tt":case"u":T0(),T.push(q$(O,w),w);return;case"nobr":if(T0(),S.inScope(O))j$(N$,O),T0();T.push(q$(O,w),w);return;case"applet":case"marquee":case"object":T0(),q$(O,w),T.insertMarker(),Z$=!1;return;case"table":if(!l._quirks&&S.inButtonScope("p"))j$(N$,"p");q$(O,w),Z$=!1,A=i0;return;case"area":case"br":case"embed":case"img":case"keygen":case"wbr":T0(),q$(O,w),S.pop(),Z$=!1;return;case"input":T0(),w$=q$(O,w),S.pop();var M0=w$.getAttribute("type");if(!M0||M0.toLowerCase()!=="hidden")Z$=!1;return;case"param":case"source":case"track":q$(O,w),S.pop();return;case"hr":if(S.inButtonScope("p"))j$(N$,"p");if(d$(S.top,"menuitem"))S.pop();q$(O,w),S.pop(),Z$=!1;return;case"image":j$(L0,"img",w,E);return;case"textarea":q$(O,w),a=!0,Z$=!1,U=J2,u=A,A=U9;return;case"xmp":if(S.inButtonScope("p"))j$(N$,"p");T0(),Z$=!1,$9(O,w);return;case"iframe":Z$=!1,$9(O,w);return;case"noembed":$9(O,w);return;case"select":if(T0(),q$(O,w),Z$=!1,A===i0||A===h6||A===I2||A===eJ||A===GJ)A=H9;else A=E1;return;case"optgroup":case"option":if(S.top instanceof u$.HTMLOptionElement)j$(N$,"option");T0(),q$(O,w);return;case"menuitem":if(d$(S.top,"menuitem"))S.pop();T0(),q$(O,w);return;case"rb":case"rtc":if(S.inScope("ruby"))S.generateImpliedEndTags();q$(O,w);return;case"rp":case"rt":if(S.inScope("ruby"))S.generateImpliedEndTags("rtc");q$(O,w);return;case"math":if(T0(),Ej(w),Y3(w),w6(O,w,X$.MATHML),E)S.pop();return;case"svg":if(T0(),kj(w),Y3(w),w6(O,w,X$.SVG),E)S.pop();return;case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}T0(),q$(O,w);return;case 3:switch(O){case"template":Q0(N$,O,w);return;case"body":if(!S.inScope("body"))return;A=JK;return;case"html":if(!S.inScope("body"))return;A=JK,A(B,O,w);return;case"address":case"article":case"aside":case"blockquote":case"button":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"listing":case"main":case"menu":case"nav":case"ol":case"pre":case"section":case"summary":case"ul":if(!S.inScope(O))return;S.generateImpliedEndTags(),S.popTag(O);return;case"form":if(!S.contains("template")){var s0=s;if(s=null,!s0||!S.elementInScope(s0))return;S.generateImpliedEndTags(),S.removeElement(s0)}else{if(!S.inScope("form"))return;S.generateImpliedEndTags(),S.popTag("form")}return;case"p":if(!S.inButtonScope(O))j$(L0,O,null),A(B,O,w,E);else S.generateImpliedEndTags(O),S.popTag(O);return;case"li":if(!S.inListItemScope(O))return;S.generateImpliedEndTags(O),S.popTag(O);return;case"dd":case"dt":if(!S.inScope(O))return;S.generateImpliedEndTags(O),S.popTag(O);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(!S.elementTypeInScope(u$.HTMLHeadingElement))return;S.generateImpliedEndTags(),S.popElementType(u$.HTMLHeadingElement);return;case"sarcasm":break;case"a":case"b":case"big":case"code":case"em":case"font":case"i":case"nobr":case"s":case"small":case"strike":case"strong":case"tt":case"u":var X1=nB(O);if(X1)return;break;case"applet":case"marquee":case"object":if(!S.inScope(O))return;S.generateImpliedEndTags(),S.popTag(O),T.clearToMarker();return;case"br":j$(L0,O,null);return}for(c=S.elements.length-1;c>=0;c--)if(U$=S.elements[c],d$(U$,O)){S.generateImpliedEndTags(O),S.popElement(U$);break}else if(d$(U$,$J))return;return}}function U9(B,O,w,E){switch(B){case 1:P1(O);return;case-1:if(S.top instanceof u$.HTMLScriptElement)S.top._already_started=!0;S.pop(),A=u,A(B);return;case 3:if(O==="script")aB();else S.pop(),A=u;return;default:return}}function i0(B,O,w,E){function h(U$){for(var w$=0,J0=U$.length;w$<J0;w$++)if(U$[w$][0]==="type")return U$[w$][1].toLowerCase();return null}switch(B){case 1:if(Q$){j$(B,O,w,E);return}else if(d$(S.top,lJ)){y$=[],u=A,A=mH,A(B,O,w,E);return}break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"caption":S.clearToContext(X6),T.insertMarker(),q$(O,w),A=h6;return;case"colgroup":S.clearToContext(X6),q$(O,w),A=B9;return;case"col":i0(L0,"colgroup",null),A(B,O,w,E);return;case"tbody":case"tfoot":case"thead":S.clearToContext(X6),q$(O,w),A=I2;return;case"td":case"th":case"tr":i0(L0,"tbody",null),A(B,O,w,E);return;case"table":if(!S.inTableScope(O))return;i0(N$,O),A(B,O,w,E);return;case"style":case"script":case"template":Q0(B,O,w,E);return;case"input":var c=h(w);if(c!=="hidden")break;q$(O,w),S.pop();return;case"form":if(s||S.contains("template"))return;s=q$(O,w),S.popElement(s);return}break;case 3:switch(O){case"table":if(!S.inTableScope(O))return;S.popTag(O),nJ();return;case"body":case"caption":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return;case"template":Q0(B,O,w,E);return}break;case-1:j$(B,O,w,E);return}$2=!0,j$(B,O,w,E),$2=!1}function mH(B,O,w,E){if(B===cJ){if(n){if(O=O.replace(G6,""),O.length===0)return}y$.push(O)}else{var h=y$.join("");if(y$.length=0,V6.test(h))$2=!0,j$(cJ,h),$2=!1;else P1(h);A=u,A(B,O,w,E)}}function h6(B,O,w,E){function h(){if(!S.inTableScope("caption"))return!1;return S.generateImpliedEndTags(),S.popTag("caption"),T.clearToMarker(),A=i0,!0}switch(B){case 2:switch(O){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(h())A(B,O,w,E);return}break;case 3:switch(O){case"caption":h();return;case"table":if(h())A(B,O,w,E);return;case"body":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}break}j$(B,O,w,E)}function B9(B,O,w,E){switch(B){case 1:var h=O.match(e2);if(h)P1(h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"col":q$(O,w),S.pop();return;case"template":Q0(B,O,w,E);return}break;case 3:switch(O){case"colgroup":if(!d$(S.top,"colgroup"))return;S.pop(),A=i0;return;case"col":return;case"template":Q0(B,O,w,E);return}break;case-1:j$(B,O,w,E);return}if(!d$(S.top,"colgroup"))return;B9(N$,"colgroup"),A(B,O,w,E)}function I2(B,O,w,E){function h(){if(!S.inTableScope("tbody")&&!S.inTableScope("thead")&&!S.inTableScope("tfoot"))return;S.clearToContext(W6),I2(N$,S.top.localName,null),A(B,O,w,E)}switch(B){case 2:switch(O){case"tr":S.clearToContext(W6),q$(O,w),A=eJ;return;case"th":case"td":I2(L0,"tr",null),A(B,O,w,E);return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":h();return}break;case 3:switch(O){case"table":h();return;case"tbody":case"tfoot":case"thead":if(S.inTableScope(O))S.clearToContext(W6),S.pop(),A=i0;return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":case"tr":return}break}i0(B,O,w,E)}function eJ(B,O,w,E){function h(){if(!S.inTableScope("tr"))return!1;return S.clearToContext(Q3),S.pop(),A=I2,!0}switch(B){case 2:switch(O){case"th":case"td":S.clearToContext(Q3),q$(O,w),A=GJ,T.insertMarker();return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":case"tr":if(h())A(B,O,w,E);return}break;case 3:switch(O){case"tr":h();return;case"table":if(h())A(B,O,w,E);return;case"tbody":case"tfoot":case"thead":if(S.inTableScope(O)){if(h())A(B,O,w,E)}return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":return}break}i0(B,O,w,E)}function GJ(B,O,w,E){switch(B){case 2:switch(O){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(S.inTableScope("td"))GJ(N$,"td"),A(B,O,w,E);else if(S.inTableScope("th"))GJ(N$,"th"),A(B,O,w,E);return}break;case 3:switch(O){case"td":case"th":if(!S.inTableScope(O))return;S.generateImpliedEndTags(),S.popTag(O),T.clearToMarker(),A=eJ;return;case"body":case"caption":case"col":case"colgroup":case"html":return;case"table":case"tbody":case"tfoot":case"thead":case"tr":if(!S.inTableScope(O))return;GJ(N$,S.inTableScope("td")?"td":"th"),A(B,O,w,E);return}break}j$(B,O,w,E)}function E1(B,O,w,E){switch(B){case 1:if(n){if(O=O.replace(G6,""),O.length===0)return}P1(O);return;case 4:D1(O);return;case 5:return;case-1:j$(B,O,w,E);return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"option":if(S.top instanceof u$.HTMLOptionElement)E1(N$,O);q$(O,w);return;case"optgroup":if(S.top instanceof u$.HTMLOptionElement)E1(N$,"option");if(S.top instanceof u$.HTMLOptGroupElement)E1(N$,O);q$(O,w);return;case"select":E1(N$,O);return;case"input":case"keygen":case"textarea":if(!S.inSelectScope("select"))return;E1(N$,"select"),A(B,O,w,E);return;case"script":case"template":Q0(B,O,w,E);return}break;case 3:switch(O){case"optgroup":if(S.top instanceof u$.HTMLOptionElement&&S.elements[S.elements.length-2]instanceof u$.HTMLOptGroupElement)E1(N$,"option");if(S.top instanceof u$.HTMLOptGroupElement)S.pop();return;case"option":if(S.top instanceof u$.HTMLOptionElement)S.pop();return;case"select":if(!S.inSelectScope(O))return;S.popTag(O),nJ();return;case"template":Q0(B,O,w,E);return}break}}function H9(B,O,w,E){switch(O){case"caption":case"table":case"tbody":case"tfoot":case"thead":case"tr":case"td":case"th":switch(B){case 2:H9(N$,"select"),A(B,O,w,E);return;case 3:if(S.inTableScope(O))H9(N$,"select"),A(B,O,w,E);return}}E1(B,O,w,E)}function g6(B,O,w,E){function h(c){A=c,r[r.length-1]=A,A(B,O,w,E)}switch(B){case 1:case 4:case 5:j$(B,O,w,E);return;case-1:if(!S.contains("template"))M2();else S.popTag("template"),T.clearToMarker(),r.pop(),nJ(),A(B,O,w,E);return;case 2:switch(O){case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":Q0(B,O,w,E);return;case"caption":case"colgroup":case"tbody":case"tfoot":case"thead":h(i0);return;case"col":h(B9);return;case"tr":h(I2);return;case"td":case"th":h(eJ);return}h(j$);return;case 3:switch(O){case"template":Q0(B,O,w,E);return;default:return}}}function JK(B,O,w,E){switch(B){case 1:if(V6.test(O))break;j$(B,O);return;case 4:S.elements[0]._appendChild(l.createComment(O));return;case 5:return;case-1:M2();return;case 2:if(O==="html"){j$(B,O,w,E);return}break;case 3:if(O==="html"){if(k)return;A=dH;return}break}A=j$,A(B,O,w,E)}function f6(B,O,w,E){switch(B){case 1:if(O=O.replace(Z3,""),O.length>0)P1(O);return;case 4:D1(O);return;case 5:return;case-1:M2();return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"frameset":q$(O,w);return;case"frame":q$(O,w),S.pop();return;case"noframes":Q0(B,O,w,E);return}break;case 3:if(O==="frameset"){if(k&&S.top instanceof u$.HTMLHtmlElement)return;if(S.pop(),!k&&!(S.top instanceof u$.HTMLFrameSetElement))A=uH;return}break}}function uH(B,O,w,E){switch(B){case 1:if(O=O.replace(Z3,""),O.length>0)P1(O);return;case 4:D1(O);return;case 5:return;case-1:M2();return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"noframes":Q0(B,O,w,E);return}break;case 3:if(O==="html"){A=pH;return}break}}function dH(B,O,w,E){switch(B){case 1:if(V6.test(O))break;j$(B,O,w,E);return;case 4:l._appendChild(l.createComment(O));return;case 5:j$(B,O,w,E);return;case-1:M2();return;case 2:if(O==="html"){j$(B,O,w,E);return}break}A=j$,A(B,O,w,E)}function pH(B,O,w,E){switch(B){case 1:if(O=O.replace(Z3,""),O.length>0)j$(B,O,w,E);return;case 4:l._appendChild(l.createComment(O));return;case 5:j$(B,O,w,E);return;case-1:M2();return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"noframes":Q0(B,O,w,E);return}break}}function ZK(B,O,w,E){function h(J0){for(var M0=0,s0=J0.length;M0<s0;M0++)switch(J0[M0][0]){case"color":case"face":case"size":return!0}return!1}var c;switch(B){case 1:if(Z$&&nP.test(O))Z$=!1;if(n)O=O.replace(G6,"\uFFFD");P1(O);return;case 4:D1(O);return;case 5:return;case 2:switch(O){case"font":if(!h(w))break;case"b":case"big":case"blockquote":case"body":case"br":case"center":case"code":case"dd":case"div":case"dl":case"dt":case"em":case"embed":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"head":case"hr":case"i":case"img":case"li":case"listing":case"menu":case"meta":case"nobr":case"ol":case"p":case"pre":case"ruby":case"s":case"small":case"span":case"strong":case"strike":case"sub":case"sup":case"table":case"tt":case"u":case"ul":case"var":if(k)break;do S.pop(),c=S.top;while(c.namespaceURI!==X$.HTML&&!yj(c)&&!Tj(c));j0(B,O,w,E);return}if(c=S.elements.length===1&&k?J:S.top,c.namespaceURI===X$.MATHML)Ej(w);else if(c.namespaceURI===X$.SVG)O=tP(O),kj(w);if(Y3(w),w6(O,w,c.namespaceURI),E){if(O==="script"&&c.namespaceURI===X$.SVG);S.pop()}return;case 3:if(c=S.top,O==="script"&&c.namespaceURI===X$.SVG&&c.localName==="script")S.pop();else{var U$=S.elements.length-1,w$=S.elements[U$];for(;;){if(w$.localName.toLowerCase()===O){S.popElement(w$);break}if(w$=S.elements[--U$],w$.namespaceURI!==X$.HTML)continue;A(B,O,w,E);break}}return}}return c$.testTokenizer=function(B,O,w,E){var h=[];switch(O){case"PCDATA state":U=S$;break;case"RCDATA state":U=J2;break;case"RAWTEXT state":U=aJ;break;case"PLAINTEXT state":U=L6;break}if(w)C=w;if(j0=function(U$,w$,J0,M0){switch(VJ(),U$){case 1:if(h.length>0&&h[h.length-1][0]==="Character")h[h.length-1][1]+=w$;else h.push(["Character",w$]);break;case 4:h.push(["Comment",w$]);break;case 5:h.push(["DOCTYPE",w$,J0===void 0?null:J0,M0===void 0?null:M0,!W$]);break;case 2:var s0=Object.create(null);for(var X1=0;X1<J0.length;X1++){var A2=J0[X1];if(A2.length===1)s0[A2[0]]="";else s0[A2[0]]=A2[1]}var V2=["StartTag",w$,s0];if(M0)V2.push(!0);h.push(V2);break;case 3:h.push(["EndTag",w$]);break;case-1:break}},!E)this.parse(B,!0);else{for(var c=0;c<B.length;c++)this.parse(B[c]);this.parse("",!0)}return h},c$}});var m8=p((Xv,rj)=>{rj.exports=oj;var cj=Z6(),lj=K6(),eP=U6(),B6=X0(),$I=uZ();function oj($){this.contextObject=$}var JI={xml:{"":!0,"1.0":!0,"2.0":!0},core:{"":!0,"2.0":!0},html:{"":!0,"1.0":!0,"2.0":!0},xhtml:{"":!0,"1.0":!0,"2.0":!0}};oj.prototype={hasFeature:function(J,Z){var Y=JI[(J||"").toLowerCase()];return Y&&Y[Z||""]||!1},createDocumentType:function(J,Z,Y){if(!$I.isValidQName(J))B6.InvalidCharacterError();return new lj(this.contextObject,J,Z,Y)},createDocument:function(J,Z,Y){var K=new cj(!1,null),Q;if(Z)Q=K.createElementNS(J,Z);else Q=null;if(Y)K.appendChild(Y);if(Q)K.appendChild(Q);if(J===B6.NAMESPACE.HTML)K._contentType="application/xhtml+xml";else if(J===B6.NAMESPACE.SVG)K._contentType="image/svg+xml";else K._contentType="application/xml";return K},createHTMLDocument:function(J){var Z=new cj(!0,null);Z.appendChild(new lj(Z,"html"));var Y=Z.createElement("html");Z.appendChild(Y);var K=Z.createElement("head");if(Y.appendChild(K),J!==void 0){var Q=Z.createElement("title");K.appendChild(Q),Q.appendChild(Z.createTextNode(J))}return Y.appendChild(Z.createElement("body")),Z.modclock=1,Z},mozSetOutputMutationHandler:function($,J){$.mutationHandler=J},mozGetInputMutationHandler:function($){B6.nyi()},mozHTMLParser:eP}});var sj=p((Wv,ij)=>{var ZI=aZ(),YI=rY();ij.exports=G3;function G3($,J){this._window=$,this._href=J}G3.prototype=Object.create(YI.prototype,{constructor:{value:G3},href:{get:function(){return this._href},set:function($){this.assign($)}},assign:{value:function($){var J=new ZI(this._href),Z=J.resolve($);this._href=Z}},replace:{value:function($){this.assign($)}},reload:{value:function(){this.assign(this.href)}},toString:{value:function(){return this.href}}})});var aj=p((jv,nj)=>{var KI=Object.create(null,{appCodeName:{value:"Mozilla"},appName:{value:"Netscape"},appVersion:{value:"4.0"},platform:{value:""},product:{value:"Gecko"},productSub:{value:"20100101"},userAgent:{value:""},vendor:{value:""},vendorSub:{value:""},taintEnabled:{value:function(){return!1}}});nj.exports=KI});var ej=p((Uv,tj)=>{var QI={setTimeout,clearTimeout,setInterval,clearInterval};tj.exports=QI});var W3=p((u8,$U)=>{var X3=X0();u8=$U.exports={CSSStyleDeclaration:tZ(),CharacterData:T8(),Comment:EY(),DOMException:vZ(),DOMImplementation:m8(),DOMTokenList:qY(),Document:Z6(),DocumentFragment:bY(),DocumentType:K6(),Element:gJ(),HTMLParser:U6(),NamedNodeMap:PY(),Node:P0(),NodeList:n2(),NodeFilter:b8(),ProcessingInstruction:hY(),Text:TY(),Window:j3()};X3.merge(u8,oY());X3.merge(u8,$6().elements);X3.merge(u8,tY().elements)});var j3=p((Bv,JU)=>{var VI=m8(),GI=$Y(),XI=sj(),d8=X0();JU.exports=H6;function H6($){this.document=$||new VI(null).createHTMLDocument(""),this.document._scripting_enabled=!0,this.document.defaultView=this,this.location=new XI(this,this.document._address||"about:blank")}H6.prototype=Object.create(GI.prototype,{console:{value:console},history:{value:{back:d8.nyi,forward:d8.nyi,go:d8.nyi}},navigator:{value:aj()},window:{get:function(){return this}},self:{get:function(){return this}},frames:{get:function(){return this}},parent:{get:function(){return this}},top:{get:function(){return this}},length:{value:0},frameElement:{value:null},opener:{value:null},onload:{get:function(){return this._getEventHandler("load")},set:function($){this._setEventHandler("load",$)}},getComputedStyle:{value:function(J){return J.style}}});d8.expose(ej(),H6);d8.expose(W3(),H6)});var VU=p((WI)=>{var ZU=m8(),YU=U6(),Hv=j3(),KU=W3();WI.createDOMImplementation=function(){return new ZU(null)};WI.createDocument=function($,J){if($||J){var Z=new YU;return Z.parse($||"",!0),Z.document()}return new ZU(null).createHTMLDocument("")};WI.createIncrementalHTMLParser=function(){var $=new YU;return{write:function(J){if(J.length>0)$.parse(J,!1,function(){return!0})},end:function(J){$.parse(J||"",!0,function(){return!0})},process:function(J){return $.parse("",!1,J)},document:function(){return $.document()}}};WI.createWindow=function($,J){var Z=WI.createDocument($);if(J!==void 0)Z._address=J;return new KU.Window(Z)};WI.impl=KU});var W1={};o$(W1,{layer:()=>GK,defaultLayer:()=>z_,Status:()=>F_,Service:()=>q9,Format:()=>W1});import q_ from"path";var O9={};o$(O9,{zig:()=>nH,uvformat:()=>$_,terraform:()=>V_,standardrb:()=>Z_,shfmt:()=>W_,rustfmt:()=>U_,ruff:()=>QK,rubocop:()=>J_,rlang:()=>eH,prettier:()=>rH,pint:()=>B_,oxfmt:()=>iH,ormolu:()=>H_,ocamlformat:()=>Q_,nixfmt:()=>j_,mix:()=>oH,latexindent:()=>G_,ktlint:()=>tH,htmlbeautifier:()=>Y_,gofmt:()=>lH,gleam:()=>X_,dfmt:()=>O_,dart:()=>K_,cljfmt:()=>__,clang:()=>aH,biome:()=>sH});var lH={name:"gofmt",extensions:[".go"],async enabled(){let $=x$("gofmt");if(!$)return!1;return[$,"-w","$FILE"]}},oH={name:"mix",extensions:[".ex",".exs",".eex",".heex",".leex",".neex",".sface"],async enabled(){let $=x$("mix");if(!$)return!1;return[$,"format","$FILE"]}},YK=[".js",".jsx",".mjs",".cjs",".ts",".tsx",".mts",".cts",".html",".htm",".css",".scss",".sass",".less",".vue",".svelte",".json",".jsonc",".yaml",".yml",".toml",".xml",".md",".mdx",".graphql",".gql"];async function KK($,J){let Z=await O0.findUp("package.json",$.directory,$.worktree);for(let Y of Z){let K=await O0.readJson(Y);if(K.dependencies?.[J]||K.devDependencies?.[J]){let Q=await m6.which(J);if(Q)return Q}}return}var rH={name:"prettier",environment:{BUN_BE_BUN:"1"},extensions:[...YK],async enabled($){let J=await KK($,"prettier");return J?[J,"--write","$FILE"]:!1}},iH={name:"oxfmt",environment:{BUN_BE_BUN:"1"},extensions:[".js",".jsx",".mjs",".cjs",".ts",".tsx",".mts",".cts"],async enabled($){if(!k$.QITQODE_EXPERIMENTAL_OXFMT)return!1;let J=await KK($,"oxfmt");return J?[J,"$FILE"]:!1}},sH={name:"biome",environment:{BUN_BE_BUN:"1"},extensions:[...YK],async enabled($){let J=["biome.json","biome.jsonc"];for(let Z of J)if((await O0.findUp(Z,$.directory,$.worktree)).length>0){let K=await m6.which("@biomejs/biome");if(K)return[K,"format","--write","$FILE"]}return!1}},nH={name:"zig",extensions:[".zig",".zon"],async enabled(){let $=x$("zig");if(!$)return!1;return[$,"fmt","$FILE"]}},aH={name:"clang-format",extensions:[".c",".cc",".cpp",".cxx",".c++",".h",".hh",".hpp",".hxx",".h++",".ino",".C",".H"],async enabled($){if((await O0.findUp(".clang-format",$.directory,$.worktree)).length>0){let Z=x$("clang-format");if(Z)return[Z,"-i","$FILE"]}return!1}},tH={name:"ktlint",extensions:[".kt",".kts"],async enabled(){let $=x$("ktlint");if(!$)return!1;return[$,"-F","$FILE"]}},QK={name:"ruff",extensions:[".py",".pyi"],async enabled($){if(!x$("ruff"))return!1;let J=["pyproject.toml","ruff.toml",".ruff.toml"];for(let Y of J){let K=await O0.findUp(Y,$.directory,$.worktree);if(K.length>0)if(Y==="pyproject.toml"){if((await O0.readText(K[0])).includes("[tool.ruff]"))return["ruff","format","$FILE"]}else return["ruff","format","$FILE"]}let Z=["requirements.txt","pyproject.toml","Pipfile"];for(let Y of Z){let K=await O0.findUp(Y,$.directory,$.worktree);if(K.length>0){if((await O0.readText(K[0])).includes("ruff"))return["ruff","format","$FILE"]}}return!1}},eH={name:"air",extensions:[".R"],async enabled(){let $=x$("air");if($==null)return!1;let J=await _9.text([$,"--help"],{nothrow:!0}),Z=J.text.split(`
37
- `)[0],Y=Z.includes("R language"),K=Z.includes("formatter");if(J.code===0&&Y&&K)return[$,"format","$FILE"];return!1}},$_={name:"uv",extensions:[".py",".pyi"],async enabled($){if(await QK.enabled($))return!1;let J=x$("uv");if(J==null)return!1;if((await _9.run([J,"format","--help"],{nothrow:!0})).code===0)return[J,"format","--","$FILE"];return!1}},J_={name:"rubocop",extensions:[".rb",".rake",".gemspec",".ru"],async enabled(){let $=x$("rubocop");if(!$)return!1;return[$,"--autocorrect","$FILE"]}},Z_={name:"standardrb",extensions:[".rb",".rake",".gemspec",".ru"],async enabled(){let $=x$("standardrb");if(!$)return!1;return[$,"--fix","$FILE"]}},Y_={name:"htmlbeautifier",extensions:[".erb",".html.erb"],async enabled(){let $=x$("htmlbeautifier");if(!$)return!1;return[$,"$FILE"]}},K_={name:"dart",extensions:[".dart"],async enabled(){let $=x$("dart");if(!$)return!1;return[$,"format","$FILE"]}},Q_={name:"ocamlformat",extensions:[".ml",".mli"],async enabled($){if(!x$("ocamlformat"))return!1;if((await O0.findUp(".ocamlformat",$.directory,$.worktree)).length>0)return["ocamlformat","-i","$FILE"];return!1}},V_={name:"terraform",extensions:[".tf",".tfvars"],async enabled(){let $=x$("terraform");if(!$)return!1;return[$,"fmt","$FILE"]}},G_={name:"latexindent",extensions:[".tex"],async enabled(){let $=x$("latexindent");if(!$)return!1;return[$,"-w","-s","$FILE"]}},X_={name:"gleam",extensions:[".gleam"],async enabled(){let $=x$("gleam");if(!$)return!1;return[$,"format","$FILE"]}},W_={name:"shfmt",extensions:[".sh",".bash"],async enabled(){let $=x$("shfmt");if(!$)return!1;return[$,"-w","$FILE"]}},j_={name:"nixfmt",extensions:[".nix"],async enabled(){let $=x$("nixfmt");if(!$)return!1;return[$,"$FILE"]}},U_={name:"rustfmt",extensions:[".rs"],async enabled(){let $=x$("rustfmt");if(!$)return!1;return[$,"$FILE"]}},B_={name:"pint",extensions:[".php"],async enabled($){let J=await O0.findUp("composer.json",$.directory,$.worktree);for(let Z of J){let Y=await O0.readJson(Z);if(Y.require?.["laravel/pint"]||Y["require-dev"]?.["laravel/pint"])return["./vendor/bin/pint","$FILE"]}return!1}},H_={name:"ormolu",extensions:[".hs"],async enabled(){let $=x$("ormolu");if(!$)return!1;return[$,"-i","$FILE"]}},__={name:"cljfmt",extensions:[".clj",".cljs",".cljc",".edn"],async enabled(){let $=x$("cljfmt");if(!$)return!1;return[$,"fix","--quiet","$FILE"]}},O_={name:"dfmt",extensions:[".d"],async enabled(){let $=x$("dfmt");if(!$)return!1;return[$,"-i","$FILE"]}};var x1=O$.create({service:"format"}),F_=F.object({name:F.string(),extensions:F.string().array(),enabled:F.boolean()}).meta({ref:"FormatterStatus"});class q9 extends D$.Service()("@qitqode/Format"){}var GK=f.effect(q9,G.gen(function*(){let $=yield*R$.Service,J=yield*u6.ChildProcessSpawner,Z=yield*i.make(G.fn("Format.state")(function*(V){let X={},W={};async function _(z){let M=X[z.name];if(M===!1||M===void 0)M=await z.enabled(V),X[z.name]=M;return M}async function j(z){return await _(z)!==!1}async function H(z){let M=Object.values(W).filter((C)=>C.extensions.includes(z));return(await Promise.all(M.map(async(C)=>{x1.info("checking",{name:C.name,ext:z});let P=await _(C);if(P)x1.info("enabled",{name:C.name,ext:z});return{item:C,cmd:P}}))).filter((C)=>C.cmd).map((C)=>({item:C.item,cmd:C.cmd}))}function q(z){return G.gen(function*(){x1.info("formatting",{file:z});let M=q_.extname(z);for(let{item:I,cmd:C}of yield*G.promise(()=>H(M))){if(C===!1)continue;x1.info("running",{command:C});let P=C.map((R)=>R.replace("$FILE",z)),D=yield*i.directory;if((yield*J.spawn(S1.make(P[0],P.slice(1),{cwd:D,env:I.environment,extendEnv:!0})).pipe(G.flatMap((R)=>R.exitCode),G.scoped,G.catch(()=>G.sync(()=>{return x1.error("failed to format file",{error:"spawn failed",command:C,...I.environment,file:z}),u6.ExitCode(1)}))))!==0)x1.error("failed",{command:C,...I.environment})}})}let U=yield*$.get();if(!U.formatter)return x1.info("all formatters are disabled"),x1.info("init"),{formatters:W,isEnabled:j,formatFile:q};for(let z of Object.values(O9))W[z.name]=z;if(U.formatter!==!0)for(let[z,M]of Object.entries(U.formatter)){let I=O9[z];if(["ruff","uv"].includes(z)&&(U.formatter.ruff?.disabled||U.formatter.uv?.disabled)){delete W.ruff,delete W.uv;continue}if(M.disabled){delete W[z];continue}let C=F9(I??{extensions:[]},M);W[z]={...C,name:z,extensions:C.extensions??[],enabled:I&&!C.command?I.enabled:async(P)=>C.command??!1}}return x1.info("init"),{formatters:W,isEnabled:j,formatFile:q}})),Y=G.fn("Format.init")(function*(){yield*i.get(Z)}),K=G.fn("Format.status")(function*(){let{formatters:V,isEnabled:X}=yield*i.get(Z),W=[];for(let _ of Object.values(V)){let j=yield*G.promise(()=>X(_));W.push({name:_.name,extensions:_.extensions,enabled:j})}return W}),Q=G.fn("Format.file")(function*(V){let{formatFile:X}=yield*i.get(Z);yield*X(V)});return q9.of({init:Y,status:K,file:Q})})),z_=GK.pipe(f.provide(R$.defaultLayer),f.provide(XJ));var h0={};o$(h0,{layer:()=>qK,defaultLayer:()=>y_,Service:()=>C9,Ripgrep:()=>h0,Match:()=>_K});import J8 from"path";var XK=O$.create({service:"ripgrep"}),d6="15.1.0",C_={"arm64-darwin":{platform:"aarch64-apple-darwin",extension:"tar.gz"},"arm64-linux":{platform:"aarch64-unknown-linux-gnu",extension:"tar.gz"},"x64-darwin":{platform:"x86_64-apple-darwin",extension:"tar.gz"},"x64-linux":{platform:"x86_64-unknown-linux-musl",extension:"tar.gz"},"arm64-win32":{platform:"aarch64-pc-windows-msvc",extension:"zip"},"ia32-win32":{platform:"i686-pc-windows-msvc",extension:"zip"},"x64-win32":{platform:"x86_64-pc-windows-msvc",extension:"zip"}},HK=F.object({elapsed:F.object({secs:F.number(),nanos:F.number(),human:F.string()}),searches:F.number(),searches_with_match:F.number(),bytes_searched:F.number(),bytes_printed:F.number(),matched_lines:F.number(),matches:F.number()}),M_=F.object({type:F.literal("begin"),data:F.object({path:F.object({text:F.string()})})}),_K=F.object({type:F.literal("match"),data:F.object({path:F.object({text:F.string()}),lines:F.object({text:F.string()}),line_number:F.number(),absolute_offset:F.number(),submatches:F.array(F.object({match:F.object({text:F.string()}),start:F.number(),end:F.number()}))})}),D_=F.object({type:F.literal("end"),data:F.object({path:F.object({text:F.string()}),binary_offset:F.number().nullable(),stats:HK})}),P_=F.object({type:F.literal("summary"),data:F.object({elapsed_total:F.object({human:F.string(),nanos:F.number(),secs:F.number()}),stats:HK})}),I_=F.union([M_,_K,D_,P_]);class C9 extends D$.Service()("@qitqode/Ripgrep"){}function A_(){let $=BK();return delete $.RIPGREP_CONFIG_PATH,$}function WK($){let J=$?.reason;if(J instanceof Error)return J;let Z=Error("Aborted");return Z.name="AbortError",Z}function S_($){if(!$)return G.never;if($.aborted)return G.fail(WK($));return G.callback((J)=>{let Z=()=>J(G.fail(WK($)));if($.addEventListener("abort",Z,{once:!0}),$.aborted)Z();return G.sync(()=>$.removeEventListener("abort",Z))})}function z9($,J){let Z=Error($.trim()||`ripgrep failed with code ${J}`);return Z.name="RipgrepError",Z}function OK($){return J8.normalize($.replace(/^\.[\\/]/,""))}function w_($){return{...$,path:{...$.path,text:OK($.path.text)}}}function R_($){return G.try({try:()=>I_.parse(JSON.parse($)),catch:(J)=>Error("invalid ripgrep output",{cause:J})})}function jK($,J){b1.failCauseUnsafe($,n0.fail(J))}function L_($){let J=["--no-config","--files","--glob=!.git/*"];if($.follow)J.push("--follow");if($.hidden!==!1)J.push("--hidden");if($.hidden===!1)J.push("--glob=!.*");if($.maxDepth!==void 0)J.push(`--max-depth=${$.maxDepth}`);if($.glob)for(let Z of $.glob)J.push(`--glob=${Z}`);return J.push("."),J}function N_($){let J=["--no-config","--json","--hidden","--glob=!.git/*","--no-messages"];if($.follow)J.push("--follow");if($.glob)for(let Z of $.glob)J.push(`--glob=${Z}`);if($.limit)J.push(`--max-count=${$.limit}`);return J.push("--",$.pattern,...$.file??["."]),J}function UK($,J){return J?$.pipe(G.raceFirst(S_(J))):$}var qK=f.effect(C9,G.gen(function*(){let $=yield*$$.Service,J=v1.filterStatusOk(yield*v1.HttpClient),Z=yield*M9,Y=G.fnUntraced(function*(H,q,U){let z=yield*Z.spawn(S1.make(H,q,{cwd:U?.cwd,extendEnv:!0,stdin:"ignore"})),[M,I,C]=yield*G.all([l$.mkString(l$.decodeText(z.stdout)),l$.mkString(l$.decodeText(z.stderr)),z.exitCode],{concurrency:"unbounded"});return{stdout:M,stderr:I,code:C}},G.scoped),K=G.fnUntraced(function*(H,q,U){let z=yield*$.makeTempDirectoryScoped({directory:f$.Path.bin,prefix:"ripgrep-"});if(q.extension==="zip"){let I=(yield*G.sync(()=>x$("powershell.exe")??x$("pwsh.exe")))??"powershell.exe",C=yield*Y(I,["-NoProfile","-NonInteractive","-Command",`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -LiteralPath '${H.replaceAll("'","''")}' -DestinationPath '${z.replaceAll("'","''")}' -Force`]);if(C.code!==0)return yield*G.fail(z9(C.stderr||C.stdout,C.code))}if(q.extension==="tar.gz"){let I=yield*Y("tar",["-xzf",H,"-C",z]);if(I.code!==0)return yield*G.fail(z9(I.stderr||I.stdout,I.code))}let M=J8.join(z,`ripgrep-${d6}-${q.platform}`,process.platform==="win32"?"rg.exe":"rg");if(!(yield*$.isFile(M)))return yield*G.fail(Error(`ripgrep archive did not contain executable: ${M}`));if(yield*$.copyFile(M,U),process.platform==="win32")return;yield*$.chmod(U,493)},G.scoped),Q=yield*G.cached(G.gen(function*(){let H=yield*G.sync(()=>x$(process.platform==="win32"?"rg.exe":"rg"));if(H&&(yield*$.isFile(H).pipe(G.orDie)))return H;let q=J8.join(f$.Path.bin,`rg${process.platform==="win32"?".exe":""}`);if(yield*$.isFile(q).pipe(G.orDie))return q;let U=`${process.arch}-${process.platform}`,z=C_[U];if(!z)return yield*G.fail(Error(`unsupported platform for ripgrep: ${U}`));let M=`ripgrep-${d6}-${z.platform}.${z.extension}`,I=`https://github.com/BurntSushi/ripgrep/releases/download/${d6}/${M}`,C=J8.join(f$.Path.bin,M);XK.info("downloading ripgrep",{url:I}),yield*$.ensureDir(f$.Path.bin).pipe(G.orDie);let P=yield*G2.get(I).pipe(J.execute,G.flatMap((D)=>D.arrayBuffer),G.mapError((D)=>D instanceof Error?D:Error(String(D))));if(P.byteLength===0)return yield*G.fail(Error(`failed to download ripgrep from ${I}`));return yield*$.writeWithDirs(C,new Uint8Array(P)),yield*K(C,z,q),yield*$.remove(C,{force:!0}).pipe(G.ignore),q})),V=G.fnUntraced(function*(H){if(yield*$.isDir(H).pipe(G.orDie))return;return yield*G.fail(Object.assign(Error(`No such file or directory: '${H}'`),{code:"ENOENT",errno:-2,path:H}))}),X=G.fnUntraced(function*(H,q){let U=yield*Q;return S1.make(U,q,{cwd:H,env:A_(),extendEnv:!0,stdin:"ignore"})}),W=(H)=>l$.callback((q)=>G.gen(function*(){yield*G.forkScoped(G.gen(function*(){yield*V(H.cwd);let U=yield*Z.spawn(yield*X(H.cwd,L_(H))),z=yield*l$.mkString(l$.decodeText(U.stderr)).pipe(G.forkScoped),M=yield*l$.decodeText(U.stdout).pipe(l$.splitLines,l$.filter((C)=>C.length>0),l$.runForEach((C)=>G.sync(()=>b1.offerUnsafe(q,OK(C)))),G.forkScoped),I=yield*UK(U.exitCode,H.signal);if(yield*Z8.join(M),I===0||I===1){b1.endUnsafe(q);return}jK(q,z9(yield*Z8.join(z),I))}).pipe(G.catch((U)=>G.sync(()=>{jK(q,U)}))))})),_=G.fn("Ripgrep.search")(function*(H){yield*V(H.cwd);let q=G.scoped(G.gen(function*(){let U=yield*Z.spawn(yield*X(H.cwd,N_(H))),[z,M,I]=yield*G.all([l$.decodeText(U.stdout).pipe(l$.splitLines,l$.filter((C)=>C.length>0),l$.mapEffect(R_),l$.filter((C)=>C.type==="match"),l$.map((C)=>w_(C.data)),l$.runCollect,G.map((C)=>[...C])),l$.mkString(l$.decodeText(U.stderr)),U.exitCode],{concurrency:"unbounded"});if(I!==0&&I!==1&&I!==2)return yield*G.fail(z9(M,I));return{items:I===1?[]:z,partial:I===2}}));return yield*UK(q,H.signal)}),j=G.fn("Ripgrep.tree")(function*(H){XK.info("tree",H);let q=Array.from(yield*W({cwd:H.cwd,signal:H.signal}).pipe(l$.runCollect));function U(R,N){let x=R.children.get(N);if(x)return x;let b={name:N,children:new Map};return R.children.set(N,b),b}function z(R){return Array.from(R.children.values()).reduce((N,x)=>N+1+z(x),0)}let M={name:"",children:new Map};for(let R of q){if(R.includes(".qitqode"))continue;let N=R.split(J8.sep);if(N.length<2)continue;let x=M;for(let b of N.slice(0,-1))x=U(x,b)}let I=z(M),C=H.limit??I,P=[],D=Array.from(M.children.values()).sort((R,N)=>R.name.localeCompare(N.name)).map((R)=>({node:R,path:R.name})),L=0;for(let R=0;R<D.length&&L<C;R++){let N=D[R];P.push(N.path),L++,D.push(...Array.from(N.node.children.values()).sort((x,b)=>x.name.localeCompare(b.name)).map((x)=>({node:x,path:`${N.path}/${x.name}`})))}if(I>L)P.push(`[${I-L} truncated]`);return P.join(`
38
- `)});return C9.of({files:W,tree:j,search:_})})),y_=qK.pipe(f.provide(X2.layer),f.provide($$.defaultLayer),f.provide(XJ));var w2={};o$(w2,{layer:()=>gK,defaultLayer:()=>M4,Service:()=>A9,Node:()=>K4,Info:()=>Y4,File:()=>w2,Event:()=>V4,Content:()=>Q4});var vK=S9(Z4(),1),hK=S9(LK(),1);import k0 from"path";var S2={};o$(S2,{paths:()=>J4,names:()=>$4,Protected:()=>S2});import o6 from"path";import a_ from"os";var r6=a_.homedir(),NK=["Music","Pictures","Movies","Downloads","Desktop","Documents","Public","Applications","Library"],t_=["Application Support/AddressBook","Calendars","Mail","Messages","Safari","Cookies","Application Support/com.apple.TCC","PersonalizationPortrait","Metadata/CoreSpotlight","Suggestions"],e_=["/.DocumentRevisions-V100","/.Spotlight-V100","/.Trashes","/.fseventsd"],yK=["AppData","Downloads","Desktop","Documents","Pictures","Music","Videos","OneDrive"];function $4(){if(process.platform==="darwin")return new Set(NK);if(process.platform==="win32")return new Set(yK);return new Set}function J4(){if(process.platform==="darwin")return[...NK.map(($)=>o6.join(r6,$)),...t_.map(($)=>o6.join(r6,"Library",$)),...e_];if(process.platform==="win32")return yK.map(($)=>o6.join(r6,$));return[]}var Y4=F.object({path:F.string(),added:F.number().int(),removed:F.number().int(),status:F.enum(["added","deleted","modified"])}).meta({ref:"File"}),K4=F.object({name:F.string(),path:F.string(),absolute:F.string(),type:F.enum(["file","directory"]),ignored:F.boolean()}).meta({ref:"FileNode"}),Q4=F.object({type:F.enum(["text","binary"]),content:F.string(),diff:F.string().optional(),patch:F.object({oldFileName:F.string(),newFileName:F.string(),oldHeader:F.string().optional(),newHeader:F.string().optional(),hunks:F.array(F.object({oldStart:F.number(),oldLines:F.number(),newStart:F.number(),newLines:F.number(),lines:F.array(F.string())})),index:F.string().optional()}).optional(),encoding:F.literal("base64").optional(),mimeType:F.string().optional()}).meta({ref:"FileContent"}),V4={Edited:Z0.define("file.edited",F.object({file:F.string()}))},K8=O$.create({service:"file"}),TK=393216,G4=new Set(["exe","dll","pdb","bin","so","dylib","o","a","lib","wav","mp3","ogg","oga","ogv","ogx","flac","aac","wma","m4a","weba","mp4","avi","mov","wmv","flv","webm","mkv","zip","tar","gz","gzip","bz","bz2","bzip","bzip2","7z","rar","xz","lz","z","pdf","doc","docx","ppt","pptx","xls","xlsx","dmg","iso","img","vmdk","ttf","otf","woff","woff2","eot","sqlite","db","mdb","apk","ipa","aab","xapk","app","pkg","deb","rpm","snap","flatpak","appimage","msi","msp","jar","war","ear","class","kotlin_module","dex","vdex","odex","oat","art","wasm","wat","bc","ll","s","ko","sys","drv","efi","rom","com"]),X4=new Set(["png","jpg","jpeg","gif","bmp","webp","ico","tif","tiff","svg","svgz","avif","apng","jxl","heic","heif","raw","cr2","nef","arw","dng","orf","raf","pef","x3f"]),W4=new Set(["ts","tsx","mts","cts","mtsx","ctsx","js","jsx","mjs","cjs","sh","bash","zsh","fish","ps1","psm1","cmd","bat","json","jsonc","json5","yaml","yml","toml","md","mdx","txt","xml","html","htm","css","scss","sass","less","graphql","gql","sql","ini","cfg","conf","env"]),j4=new Set(["dockerfile","makefile",".gitignore",".gitattributes",".editorconfig",".npmrc",".nvmrc",".prettierrc",".eslintrc"]),U4={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",webp:"image/webp",ico:"image/x-icon",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",svgz:"image/svg+xml",avif:"image/avif",apng:"image/apng",jxl:"image/jxl",heic:"image/heic",heif:"image/heif"},Q8=($)=>k0.extname($).toLowerCase().slice(1),B4=($)=>k0.basename($).toLowerCase(),H4=($)=>X4.has(Q8($)),_4=($)=>W4.has(Q8($)),O4=($)=>j4.has(B4($)),q4=($)=>G4.has(Q8($)),F4=($)=>$.startsWith("image/"),kK=($)=>U4[Q8($)]||"image/"+Q8($);function z4($){let J=$.toLowerCase();if(K8.debug("shouldEncode",{type:J}),!J)return!1;if(J.startsWith("text/"))return!1;if(J.includes("charset="))return!1;let Z=J.split("/",2)[0];return["image","audio","video","font","model","multipart"].includes(Z)}var C4=($)=>{return $.replaceAll("\\","/").replace(/\/+$/,"").split("/").some((Z)=>Z.startsWith(".")&&Z.length>1)},EK=($,J)=>{if(J)return $;let Z=[],Y=[];for(let K of $)if(C4(K))Y.push(K);else Z.push(K);return[...Z,...Y]};class A9 extends D$.Service()("@qitqode/File"){}var gK=f.effect(A9,G.gen(function*(){let $=yield*$$.Service,J=yield*h0.Service,Z=yield*HJ.Service,Y=yield*UJ.Scope,K=yield*i.make(G.fn("File.state")(()=>G.succeed({cache:{files:[],dirs:[]}}))),Q=G.fn("File.scan")(function*(){let M=yield*i.context;if(M.directory===k0.parse(M.directory).root)return;let I=M.directory===f$.Path.home&&M.project.id==="global",C={files:[],dirs:[]};if(I){let D=new Set,L=S2.names(),R=new Set(["node_modules","dist","build","target","vendor"]),N=(v)=>v.startsWith(".")||L.has(v),x=(v)=>v.startsWith(".")||R.has(v),b=yield*$.readDirectoryEntries(M.directory).pipe(G.orElseSucceed(()=>[]));for(let v of b){if(v.type!=="directory")continue;if(N(v.name))continue;D.add(v.name+"/");let m=k0.join(M.directory,v.name),A=yield*$.readDirectoryEntries(m).pipe(G.orElseSucceed(()=>[]));for(let u of A){if(u.type!=="directory")continue;if(x(u.name))continue;D.add(v.name+"/"+u.name+"/")}}C.dirs=Array.from(D).toSorted()}else{let D=yield*J.files({cwd:M.directory}).pipe(BJ,G.map((R)=>[...R])),L=new Set;for(let R of D){C.files.push(R);let N=R;while(!0){let x=k0.dirname(N);if(x===".")break;if(x===N)break;if(N=x,L.has(x))continue;L.add(x),C.dirs.push(x+"/")}}}let P=yield*i.get(K);P.cache=C}),V=yield*G.cached(Q().pipe(G.catchCause(()=>G.void))),X=G.fn("File.ensure")(function*(){yield*V,V=yield*G.cached(Q().pipe(G.catchCause(()=>G.void)))}),W=G.fnUntraced(function*(M){return(yield*Z.run(M,{cwd:(yield*i.context).directory})).text()}),_=(M,I)=>{if(!B$.containsPath(M,I))throw Error("Access denied: path escapes project directory");let C=$$.canonical(M);if(!B$.containsPath(C,I))throw Error("Access denied: path escapes project directory")},j=G.fn("File.init")(function*(){yield*X().pipe(G.forkIn(Y))}),H=G.fn("File.status")(function*(){let M=yield*i.context;if(M.project.vcs!=="git")return[];let I=yield*W(["-c","core.fsmonitor=false","-c","core.quotepath=false","diff","--numstat","HEAD"]),C=[];if(I.trim())for(let L of I.trim().split(`
36
+ `),j0(y1,h),U=S$}Q9.lookahead=">";function l3(B,O,w){if(O[0]==="-"&&O[1]==="-"){Q+=2,a8(),U=CH;return}if(O.toUpperCase()==="DOCTYPE")Q+=7,U=wH;else if(O==="[CDATA["&&lB())Q+=7,U=b6;else U=Q9}l3.lookahead=7;function CH(B){switch(a8(),B){case 45:U=MH;break;case 62:U=S$,j0(y1,y0(R));break;default:V$(B,D2);break}}function MH(B){switch(B){case 45:U=V9;break;case 62:U=S$,j0(y1,y0(R));break;case-1:j0(y1,y0(R)),I$();break;default:R.push(45),V$(B,D2);break}}function D2(B){switch(B){case 60:R.push(B),U=DH;break;case 45:U=E6;break;case 0:R.push(65533);break;case-1:j0(y1,y0(R)),I$();break;default:R.push(B);break}}function DH(B){switch(B){case 33:R.push(B),U=PH;break;case 60:R.push(B);break;default:V$(B,D2);break}}function PH(B){switch(B){case 45:U=IH;break;default:V$(B,D2);break}}function IH(B){switch(B){case 45:U=AH;break;default:V$(B,E6);break}}function AH(B){switch(B){case 62:case-1:V$(B,V9);break;default:V$(B,V9);break}}function E6(B){switch(B){case 45:U=V9;break;case-1:j0(y1,y0(R)),I$();break;default:R.push(45),V$(B,D2);break}}function V9(B){switch(B){case 62:U=S$,j0(y1,y0(R));break;case 33:U=SH;break;case 45:R.push(45);break;case-1:j0(y1,y0(R)),I$();break;default:R.push(45),R.push(45),V$(B,D2);break}}function SH(B){switch(B){case 45:R.push(45),R.push(45),R.push(33),U=E6;break;case 62:U=S$,j0(y1,y0(R));break;case-1:j0(y1,y0(R)),I$();break;default:R.push(45),R.push(45),R.push(33),V$(B,D2);break}}function wH(B){switch(B){case 9:case 10:case 12:case 32:U=o3;break;case-1:e1(),h$(),g$(),I$();break;default:V$(B,o3);break}}function o3(B){switch(B){case 9:case 10:case 12:case 32:break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:e1(),N.push(B+32),U=x6;break;case 0:e1(),N.push(65533),U=x6;break;case 62:e1(),h$(),U=S$,g$();break;case-1:e1(),h$(),g$(),I$();break;default:e1(),N.push(B),U=x6;break}}function x6(B){switch(B){case 9:case 10:case 12:case 32:U=r3;break;case 62:U=S$,g$();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:N.push(B+32);break;case 0:N.push(65533);break;case-1:h$(),g$(),I$();break;default:N.push(B);break}}function r3(B,O,w){switch(B){case 9:case 10:case 12:case 32:Q+=1;break;case 62:U=S$,Q+=1,g$();break;case-1:h$(),g$(),I$();break;default:if(O=O.toUpperCase(),O==="PUBLIC")Q+=6,U=RH;else if(O==="SYSTEM")Q+=6,U=yH;else h$(),U=Q2;break}}r3.lookahead=6;function RH(B){switch(B){case 9:case 10:case 12:case 32:U=LH;break;case 34:C1(),U=i3;break;case 39:C1(),U=s3;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function LH(B){switch(B){case 9:case 10:case 12:case 32:break;case 34:C1(),U=i3;break;case 39:C1(),U=s3;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function i3(B){switch(B){case 34:U=n3;break;case 0:x.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:x.push(B);break}}function s3(B){switch(B){case 39:U=n3;break;case 0:x.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:x.push(B);break}}function n3(B){switch(B){case 9:case 10:case 12:case 32:U=NH;break;case 62:U=S$,g$();break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function NH(B){switch(B){case 9:case 10:case 12:case 32:break;case 62:U=S$,g$();break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function yH(B){switch(B){case 9:case 10:case 12:case 32:U=TH;break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function TH(B){switch(B){case 9:case 10:case 12:case 32:break;case 34:M1(),U=G9;break;case 39:M1(),U=X9;break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:h$(),U=Q2;break}}function G9(B){switch(B){case 34:U=a3;break;case 0:b.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:b.push(B);break}}function X9(B){switch(B){case 39:U=a3;break;case 0:b.push(65533);break;case 62:h$(),U=S$,g$();break;case-1:h$(),g$(),I$();break;default:b.push(B);break}}function a3(B){switch(B){case 9:case 10:case 12:case 32:break;case 62:U=S$,g$();break;case-1:h$(),g$(),I$();break;default:U=Q2;break}}function Q2(B){switch(B){case 62:U=S$,g$();break;case-1:g$(),I$();break;default:break}}function b6(B){switch(B){case 93:U=kH;break;case-1:I$();break;case 0:n=!0;default:iJ(rP)||y.push(B);break}}function kH(B){switch(B){case 93:U=EH;break;default:y.push(93),V$(B,b6);break}}function EH(B){switch(B){case 93:y.push(93);break;case 62:VJ(),U=S$;break;default:y.push(93),y.push(93),V$(B,b6);break}}function tJ(B){switch(r$(),P.push(38),B){case 9:case 10:case 12:case 32:case 60:case 38:case-1:V$(B,P2);break;case 35:P.push(B),U=xH;break;default:V$(B,t3);break}}function t3(B){wj.lastIndex=Q;var O=wj.exec(Y);if(!O)throw Error("should never happen");var w=O[1];if(!w){U=P2;return}switch(Q+=w.length,t2(P,aP(w)),z){case Z9:case Y9:case K9:if(w[w.length-1]!==";"){if(/[=A-Za-z0-9]/.test(Y[Q])){U=P2;return}}break;default:break}r$();var E=mP[w];if(typeof E==="number")P.push(E);else t2(P,E);U=P2}t3.lookahead=-uP;function xH(B){switch(M=0,B){case 120:case 88:P.push(B),U=bH;break;default:V$(B,vH);break}}function bH(B){switch(B){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 66:case 67:case 68:case 69:case 70:case 97:case 98:case 99:case 100:case 101:case 102:V$(B,hH);break;default:V$(B,P2);break}}function vH(B){switch(B){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:V$(B,gH);break;default:V$(B,P2);break}}function hH(B){switch(B){case 65:case 66:case 67:case 68:case 69:case 70:M*=16,M+=B-55;break;case 97:case 98:case 99:case 100:case 101:case 102:M*=16,M+=B-87;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:M*=16,M+=B-48;break;case 59:U=W9;break;default:V$(B,W9);break}}function gH(B){switch(B){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:M*=10,M+=B-48;break;case 59:U=W9;break;default:V$(B,W9);break}}function W9(B){if(M in Sj)M=Sj[M];else if(M>1114111||M>=55296&&M<57344)M=65533;if(r$(),M<=65535)P.push(M);else M=M-65536,P.push(55296+(M>>10)),P.push(56320+(M&1023));V$(B,P2)}function P2(B){switch(z){case Z9:case Y9:case K9:L+=y0(P);break;default:t2(y,P);break}V$(B,z)}function fH(B,O,w,E){switch(B){case 1:if(O=O.replace(e2,""),O.length===0)return;break;case 4:l._appendChild(l.createComment(O));return;case 5:var h=O,c=w,U$=E;if(l.appendChild(new EP(l,h,c,U$)),W$||h.toLowerCase()!=="html"||vP.test(c)||U$&&U$.toLowerCase()===hP||U$===void 0&&Dj.test(c))l._quirks=!0;else if(gP.test(c)||U$!==void 0&&Dj.test(c))l._limitedQuirks=!0;A=e3;return}l._quirks=!0,A=e3,A(B,O,w,E)}function e3(B,O,w,E){var h;switch(B){case 1:if(O=O.replace(e2,""),O.length===0)return;break;case 5:return;case 4:l._appendChild(l.createComment(O));return;case 2:if(O==="html"){h=sJ(l,O,w),S.push(h),l.appendChild(h),A=j9;return}break;case 3:switch(O){case"html":case"head":case"body":case"br":break;default:return}}h=sJ(l,"html",null),S.push(h),l.appendChild(h),A=j9,A(B,O,w,E)}function j9(B,O,w,E){switch(B){case 1:if(O=O.replace(e2,""),O.length===0)return;break;case 5:return;case 4:D1(O);return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"head":var h=q$(O,w);A$=h,A=Q0;return}break;case 3:switch(O){case"html":case"head":case"body":case"br":break;default:return}}j9(N0,"head",null),A(B,O,w,E)}function Q0(B,O,w,E){switch(B){case 1:var h=O.match(e2);if(h)P1(h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"meta":case"base":case"basefont":case"bgsound":case"link":q$(O,w),S.pop();return;case"title":sB(O,w);return;case"noscript":if(!J$){q$(O,w),A=$K;return}case"noframes":case"style":$9(O,w);return;case"script":t8(function(c){var U$=sJ(c,O,w);if(U$._parser_inserted=!0,U$._force_async=!1,k)U$._already_started=!0;return VJ(),U$}),U=Z2,u=A,A=U9;return;case"template":q$(O,w),T.insertMarker(),Z$=!1,A=g6,r.push(A);return;case"head":return}break;case 3:switch(O){case"head":S.pop(),A=v6;return;case"body":case"html":case"br":break;case"template":if(!S.contains("template"))return;S.generateImpliedEndTags(null,"thorough"),S.popTag("template"),T.clearToMarker(),r.pop(),nJ();return;default:return}break}Q0(N$,"head",null),A(B,O,w,E)}function $K(B,O,w,E){switch(B){case 5:return;case 4:Q0(B,O);return;case 1:var h=O.match(e2);if(h)Q0(B,h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 2:switch(O){case"html":j$(B,O,w,E);return;case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"style":Q0(B,O,w);return;case"head":case"noscript":return}break;case 3:switch(O){case"noscript":S.pop(),A=Q0;return;case"br":break;default:return}break}$K(N$,"noscript",null),A(B,O,w,E)}function v6(B,O,w,E){switch(B){case 1:var h=O.match(e2);if(h)P1(h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"body":q$(O,w),Z$=!1,A=j$;return;case"frameset":q$(O,w),A=f6;return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":S.push(A$),Q0(N0,O,w),S.removeElement(A$);return;case"head":return}break;case 3:switch(O){case"template":return Q0(B,O,w,E);case"body":case"html":case"br":break;default:return}break}v6(N0,"body",null),Z$=!0,A(B,O,w,E)}function j$(B,O,w,E){var h,c,U$,w$;switch(B){case 1:if(n){if(O=O.replace(G6,""),O.length===0)return}if(Z$&&V6.test(O))Z$=!1;k0(),P1(O);return;case 5:return;case 4:D1(O);return;case-1:if(r.length)return g6(B);M2();return;case 2:switch(O){case"html":if(S.contains("template"))return;xj(w,S.elements[0]);return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":Q0(N0,O,w);return;case"body":if(h=S.elements[1],!h||!(h instanceof u$.HTMLBodyElement)||S.contains("template"))return;Z$=!1,xj(w,h);return;case"frameset":if(!Z$)return;if(h=S.elements[1],!h||!(h instanceof u$.HTMLBodyElement))return;if(h.parentNode)h.parentNode.removeChild(h);while(!(S.top instanceof u$.HTMLHtmlElement))S.pop();q$(O,w),A=f6;return;case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"nav":case"ol":case"p":case"section":case"summary":case"ul":if(S.inButtonScope("p"))j$(N$,"p");q$(O,w);return;case"menu":if(S.inButtonScope("p"))j$(N$,"p");if(d$(S.top,"menuitem"))S.pop();q$(O,w);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(S.inButtonScope("p"))j$(N$,"p");if(S.top instanceof u$.HTMLHeadingElement)S.pop();q$(O,w);return;case"pre":case"listing":if(S.inButtonScope("p"))j$(N$,"p");q$(O,w),a=!0,Z$=!1;return;case"form":if(s&&!S.contains("template"))return;if(S.inButtonScope("p"))j$(N$,"p");if(w$=q$(O,w),!S.contains("template"))s=w$;return;case"li":Z$=!1;for(c=S.elements.length-1;c>=0;c--){if(U$=S.elements[c],U$ instanceof u$.HTMLLIElement){j$(N$,"li");break}if(d$(U$,$J)&&!d$(U$,K3))break}if(S.inButtonScope("p"))j$(N$,"p");q$(O,w);return;case"dd":case"dt":Z$=!1;for(c=S.elements.length-1;c>=0;c--){if(U$=S.elements[c],d$(U$,vj)){j$(N$,U$.localName);break}if(d$(U$,$J)&&!d$(U$,K3))break}if(S.inButtonScope("p"))j$(N$,"p");q$(O,w);return;case"plaintext":if(S.inButtonScope("p"))j$(N$,"p");q$(O,w),U=L6;return;case"button":if(S.inScope("button"))j$(N$,"button"),A(B,O,w,E);else k0(),q$(O,w),Z$=!1;return;case"a":var J0=T.findElementByTag("a");if(J0)j$(N$,O),T.remove(J0),S.removeElement(J0);case"b":case"big":case"code":case"em":case"font":case"i":case"s":case"small":case"strike":case"strong":case"tt":case"u":k0(),T.push(q$(O,w),w);return;case"nobr":if(k0(),S.inScope(O))j$(N$,O),k0();T.push(q$(O,w),w);return;case"applet":case"marquee":case"object":k0(),q$(O,w),T.insertMarker(),Z$=!1;return;case"table":if(!l._quirks&&S.inButtonScope("p"))j$(N$,"p");q$(O,w),Z$=!1,A=s0;return;case"area":case"br":case"embed":case"img":case"keygen":case"wbr":k0(),q$(O,w),S.pop(),Z$=!1;return;case"input":k0(),w$=q$(O,w),S.pop();var M0=w$.getAttribute("type");if(!M0||M0.toLowerCase()!=="hidden")Z$=!1;return;case"param":case"source":case"track":q$(O,w),S.pop();return;case"hr":if(S.inButtonScope("p"))j$(N$,"p");if(d$(S.top,"menuitem"))S.pop();q$(O,w),S.pop(),Z$=!1;return;case"image":j$(N0,"img",w,E);return;case"textarea":q$(O,w),a=!0,Z$=!1,U=J2,u=A,A=U9;return;case"xmp":if(S.inButtonScope("p"))j$(N$,"p");k0(),Z$=!1,$9(O,w);return;case"iframe":Z$=!1,$9(O,w);return;case"noembed":$9(O,w);return;case"select":if(k0(),q$(O,w),Z$=!1,A===s0||A===h6||A===I2||A===eJ||A===GJ)A=H9;else A=E1;return;case"optgroup":case"option":if(S.top instanceof u$.HTMLOptionElement)j$(N$,"option");k0(),q$(O,w);return;case"menuitem":if(d$(S.top,"menuitem"))S.pop();k0(),q$(O,w);return;case"rb":case"rtc":if(S.inScope("ruby"))S.generateImpliedEndTags();q$(O,w);return;case"rp":case"rt":if(S.inScope("ruby"))S.generateImpliedEndTags("rtc");q$(O,w);return;case"math":if(k0(),Ej(w),Y3(w),w6(O,w,X$.MATHML),E)S.pop();return;case"svg":if(k0(),kj(w),Y3(w),w6(O,w,X$.SVG),E)S.pop();return;case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}k0(),q$(O,w);return;case 3:switch(O){case"template":Q0(N$,O,w);return;case"body":if(!S.inScope("body"))return;A=JK;return;case"html":if(!S.inScope("body"))return;A=JK,A(B,O,w);return;case"address":case"article":case"aside":case"blockquote":case"button":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"listing":case"main":case"menu":case"nav":case"ol":case"pre":case"section":case"summary":case"ul":if(!S.inScope(O))return;S.generateImpliedEndTags(),S.popTag(O);return;case"form":if(!S.contains("template")){var n0=s;if(s=null,!n0||!S.elementInScope(n0))return;S.generateImpliedEndTags(),S.removeElement(n0)}else{if(!S.inScope("form"))return;S.generateImpliedEndTags(),S.popTag("form")}return;case"p":if(!S.inButtonScope(O))j$(N0,O,null),A(B,O,w,E);else S.generateImpliedEndTags(O),S.popTag(O);return;case"li":if(!S.inListItemScope(O))return;S.generateImpliedEndTags(O),S.popTag(O);return;case"dd":case"dt":if(!S.inScope(O))return;S.generateImpliedEndTags(O),S.popTag(O);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(!S.elementTypeInScope(u$.HTMLHeadingElement))return;S.generateImpliedEndTags(),S.popElementType(u$.HTMLHeadingElement);return;case"sarcasm":break;case"a":case"b":case"big":case"code":case"em":case"font":case"i":case"nobr":case"s":case"small":case"strike":case"strong":case"tt":case"u":var X1=nB(O);if(X1)return;break;case"applet":case"marquee":case"object":if(!S.inScope(O))return;S.generateImpliedEndTags(),S.popTag(O),T.clearToMarker();return;case"br":j$(N0,O,null);return}for(c=S.elements.length-1;c>=0;c--)if(U$=S.elements[c],d$(U$,O)){S.generateImpliedEndTags(O),S.popElement(U$);break}else if(d$(U$,$J))return;return}}function U9(B,O,w,E){switch(B){case 1:P1(O);return;case-1:if(S.top instanceof u$.HTMLScriptElement)S.top._already_started=!0;S.pop(),A=u,A(B);return;case 3:if(O==="script")aB();else S.pop(),A=u;return;default:return}}function s0(B,O,w,E){function h(U$){for(var w$=0,J0=U$.length;w$<J0;w$++)if(U$[w$][0]==="type")return U$[w$][1].toLowerCase();return null}switch(B){case 1:if(Q$){j$(B,O,w,E);return}else if(d$(S.top,lJ)){y$=[],u=A,A=mH,A(B,O,w,E);return}break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"caption":S.clearToContext(X6),T.insertMarker(),q$(O,w),A=h6;return;case"colgroup":S.clearToContext(X6),q$(O,w),A=B9;return;case"col":s0(N0,"colgroup",null),A(B,O,w,E);return;case"tbody":case"tfoot":case"thead":S.clearToContext(X6),q$(O,w),A=I2;return;case"td":case"th":case"tr":s0(N0,"tbody",null),A(B,O,w,E);return;case"table":if(!S.inTableScope(O))return;s0(N$,O),A(B,O,w,E);return;case"style":case"script":case"template":Q0(B,O,w,E);return;case"input":var c=h(w);if(c!=="hidden")break;q$(O,w),S.pop();return;case"form":if(s||S.contains("template"))return;s=q$(O,w),S.popElement(s);return}break;case 3:switch(O){case"table":if(!S.inTableScope(O))return;S.popTag(O),nJ();return;case"body":case"caption":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return;case"template":Q0(B,O,w,E);return}break;case-1:j$(B,O,w,E);return}$2=!0,j$(B,O,w,E),$2=!1}function mH(B,O,w,E){if(B===cJ){if(n){if(O=O.replace(G6,""),O.length===0)return}y$.push(O)}else{var h=y$.join("");if(y$.length=0,V6.test(h))$2=!0,j$(cJ,h),$2=!1;else P1(h);A=u,A(B,O,w,E)}}function h6(B,O,w,E){function h(){if(!S.inTableScope("caption"))return!1;return S.generateImpliedEndTags(),S.popTag("caption"),T.clearToMarker(),A=s0,!0}switch(B){case 2:switch(O){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(h())A(B,O,w,E);return}break;case 3:switch(O){case"caption":h();return;case"table":if(h())A(B,O,w,E);return;case"body":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}break}j$(B,O,w,E)}function B9(B,O,w,E){switch(B){case 1:var h=O.match(e2);if(h)P1(h[0]),O=O.substring(h[0].length);if(O.length===0)return;break;case 4:D1(O);return;case 5:return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"col":q$(O,w),S.pop();return;case"template":Q0(B,O,w,E);return}break;case 3:switch(O){case"colgroup":if(!d$(S.top,"colgroup"))return;S.pop(),A=s0;return;case"col":return;case"template":Q0(B,O,w,E);return}break;case-1:j$(B,O,w,E);return}if(!d$(S.top,"colgroup"))return;B9(N$,"colgroup"),A(B,O,w,E)}function I2(B,O,w,E){function h(){if(!S.inTableScope("tbody")&&!S.inTableScope("thead")&&!S.inTableScope("tfoot"))return;S.clearToContext(W6),I2(N$,S.top.localName,null),A(B,O,w,E)}switch(B){case 2:switch(O){case"tr":S.clearToContext(W6),q$(O,w),A=eJ;return;case"th":case"td":I2(N0,"tr",null),A(B,O,w,E);return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":h();return}break;case 3:switch(O){case"table":h();return;case"tbody":case"tfoot":case"thead":if(S.inTableScope(O))S.clearToContext(W6),S.pop(),A=s0;return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":case"tr":return}break}s0(B,O,w,E)}function eJ(B,O,w,E){function h(){if(!S.inTableScope("tr"))return!1;return S.clearToContext(Q3),S.pop(),A=I2,!0}switch(B){case 2:switch(O){case"th":case"td":S.clearToContext(Q3),q$(O,w),A=GJ,T.insertMarker();return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":case"tr":if(h())A(B,O,w,E);return}break;case 3:switch(O){case"tr":h();return;case"table":if(h())A(B,O,w,E);return;case"tbody":case"tfoot":case"thead":if(S.inTableScope(O)){if(h())A(B,O,w,E)}return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":return}break}s0(B,O,w,E)}function GJ(B,O,w,E){switch(B){case 2:switch(O){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(S.inTableScope("td"))GJ(N$,"td"),A(B,O,w,E);else if(S.inTableScope("th"))GJ(N$,"th"),A(B,O,w,E);return}break;case 3:switch(O){case"td":case"th":if(!S.inTableScope(O))return;S.generateImpliedEndTags(),S.popTag(O),T.clearToMarker(),A=eJ;return;case"body":case"caption":case"col":case"colgroup":case"html":return;case"table":case"tbody":case"tfoot":case"thead":case"tr":if(!S.inTableScope(O))return;GJ(N$,S.inTableScope("td")?"td":"th"),A(B,O,w,E);return}break}j$(B,O,w,E)}function E1(B,O,w,E){switch(B){case 1:if(n){if(O=O.replace(G6,""),O.length===0)return}P1(O);return;case 4:D1(O);return;case 5:return;case-1:j$(B,O,w,E);return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"option":if(S.top instanceof u$.HTMLOptionElement)E1(N$,O);q$(O,w);return;case"optgroup":if(S.top instanceof u$.HTMLOptionElement)E1(N$,"option");if(S.top instanceof u$.HTMLOptGroupElement)E1(N$,O);q$(O,w);return;case"select":E1(N$,O);return;case"input":case"keygen":case"textarea":if(!S.inSelectScope("select"))return;E1(N$,"select"),A(B,O,w,E);return;case"script":case"template":Q0(B,O,w,E);return}break;case 3:switch(O){case"optgroup":if(S.top instanceof u$.HTMLOptionElement&&S.elements[S.elements.length-2]instanceof u$.HTMLOptGroupElement)E1(N$,"option");if(S.top instanceof u$.HTMLOptGroupElement)S.pop();return;case"option":if(S.top instanceof u$.HTMLOptionElement)S.pop();return;case"select":if(!S.inSelectScope(O))return;S.popTag(O),nJ();return;case"template":Q0(B,O,w,E);return}break}}function H9(B,O,w,E){switch(O){case"caption":case"table":case"tbody":case"tfoot":case"thead":case"tr":case"td":case"th":switch(B){case 2:H9(N$,"select"),A(B,O,w,E);return;case 3:if(S.inTableScope(O))H9(N$,"select"),A(B,O,w,E);return}}E1(B,O,w,E)}function g6(B,O,w,E){function h(c){A=c,r[r.length-1]=A,A(B,O,w,E)}switch(B){case 1:case 4:case 5:j$(B,O,w,E);return;case-1:if(!S.contains("template"))M2();else S.popTag("template"),T.clearToMarker(),r.pop(),nJ(),A(B,O,w,E);return;case 2:switch(O){case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":Q0(B,O,w,E);return;case"caption":case"colgroup":case"tbody":case"tfoot":case"thead":h(s0);return;case"col":h(B9);return;case"tr":h(I2);return;case"td":case"th":h(eJ);return}h(j$);return;case 3:switch(O){case"template":Q0(B,O,w,E);return;default:return}}}function JK(B,O,w,E){switch(B){case 1:if(V6.test(O))break;j$(B,O);return;case 4:S.elements[0]._appendChild(l.createComment(O));return;case 5:return;case-1:M2();return;case 2:if(O==="html"){j$(B,O,w,E);return}break;case 3:if(O==="html"){if(k)return;A=dH;return}break}A=j$,A(B,O,w,E)}function f6(B,O,w,E){switch(B){case 1:if(O=O.replace(Z3,""),O.length>0)P1(O);return;case 4:D1(O);return;case 5:return;case-1:M2();return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"frameset":q$(O,w);return;case"frame":q$(O,w),S.pop();return;case"noframes":Q0(B,O,w,E);return}break;case 3:if(O==="frameset"){if(k&&S.top instanceof u$.HTMLHtmlElement)return;if(S.pop(),!k&&!(S.top instanceof u$.HTMLFrameSetElement))A=uH;return}break}}function uH(B,O,w,E){switch(B){case 1:if(O=O.replace(Z3,""),O.length>0)P1(O);return;case 4:D1(O);return;case 5:return;case-1:M2();return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"noframes":Q0(B,O,w,E);return}break;case 3:if(O==="html"){A=pH;return}break}}function dH(B,O,w,E){switch(B){case 1:if(V6.test(O))break;j$(B,O,w,E);return;case 4:l._appendChild(l.createComment(O));return;case 5:j$(B,O,w,E);return;case-1:M2();return;case 2:if(O==="html"){j$(B,O,w,E);return}break}A=j$,A(B,O,w,E)}function pH(B,O,w,E){switch(B){case 1:if(O=O.replace(Z3,""),O.length>0)j$(B,O,w,E);return;case 4:l._appendChild(l.createComment(O));return;case 5:j$(B,O,w,E);return;case-1:M2();return;case 2:switch(O){case"html":j$(B,O,w,E);return;case"noframes":Q0(B,O,w,E);return}break}}function ZK(B,O,w,E){function h(J0){for(var M0=0,n0=J0.length;M0<n0;M0++)switch(J0[M0][0]){case"color":case"face":case"size":return!0}return!1}var c;switch(B){case 1:if(Z$&&nP.test(O))Z$=!1;if(n)O=O.replace(G6,"\uFFFD");P1(O);return;case 4:D1(O);return;case 5:return;case 2:switch(O){case"font":if(!h(w))break;case"b":case"big":case"blockquote":case"body":case"br":case"center":case"code":case"dd":case"div":case"dl":case"dt":case"em":case"embed":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"head":case"hr":case"i":case"img":case"li":case"listing":case"menu":case"meta":case"nobr":case"ol":case"p":case"pre":case"ruby":case"s":case"small":case"span":case"strong":case"strike":case"sub":case"sup":case"table":case"tt":case"u":case"ul":case"var":if(k)break;do S.pop(),c=S.top;while(c.namespaceURI!==X$.HTML&&!yj(c)&&!Tj(c));j0(B,O,w,E);return}if(c=S.elements.length===1&&k?J:S.top,c.namespaceURI===X$.MATHML)Ej(w);else if(c.namespaceURI===X$.SVG)O=tP(O),kj(w);if(Y3(w),w6(O,w,c.namespaceURI),E){if(O==="script"&&c.namespaceURI===X$.SVG);S.pop()}return;case 3:if(c=S.top,O==="script"&&c.namespaceURI===X$.SVG&&c.localName==="script")S.pop();else{var U$=S.elements.length-1,w$=S.elements[U$];for(;;){if(w$.localName.toLowerCase()===O){S.popElement(w$);break}if(w$=S.elements[--U$],w$.namespaceURI!==X$.HTML)continue;A(B,O,w,E);break}}return}}return c$.testTokenizer=function(B,O,w,E){var h=[];switch(O){case"PCDATA state":U=S$;break;case"RCDATA state":U=J2;break;case"RAWTEXT state":U=aJ;break;case"PLAINTEXT state":U=L6;break}if(w)C=w;if(j0=function(U$,w$,J0,M0){switch(VJ(),U$){case 1:if(h.length>0&&h[h.length-1][0]==="Character")h[h.length-1][1]+=w$;else h.push(["Character",w$]);break;case 4:h.push(["Comment",w$]);break;case 5:h.push(["DOCTYPE",w$,J0===void 0?null:J0,M0===void 0?null:M0,!W$]);break;case 2:var n0=Object.create(null);for(var X1=0;X1<J0.length;X1++){var A2=J0[X1];if(A2.length===1)n0[A2[0]]="";else n0[A2[0]]=A2[1]}var V2=["StartTag",w$,n0];if(M0)V2.push(!0);h.push(V2);break;case 3:h.push(["EndTag",w$]);break;case-1:break}},!E)this.parse(B,!0);else{for(var c=0;c<B.length;c++)this.parse(B[c]);this.parse("",!0)}return h},c$}});var m8=p((Xv,rj)=>{rj.exports=oj;var cj=Z6(),lj=K6(),eP=U6(),B6=X0(),$I=uZ();function oj($){this.contextObject=$}var JI={xml:{"":!0,"1.0":!0,"2.0":!0},core:{"":!0,"2.0":!0},html:{"":!0,"1.0":!0,"2.0":!0},xhtml:{"":!0,"1.0":!0,"2.0":!0}};oj.prototype={hasFeature:function(J,Z){var Y=JI[(J||"").toLowerCase()];return Y&&Y[Z||""]||!1},createDocumentType:function(J,Z,Y){if(!$I.isValidQName(J))B6.InvalidCharacterError();return new lj(this.contextObject,J,Z,Y)},createDocument:function(J,Z,Y){var K=new cj(!1,null),Q;if(Z)Q=K.createElementNS(J,Z);else Q=null;if(Y)K.appendChild(Y);if(Q)K.appendChild(Q);if(J===B6.NAMESPACE.HTML)K._contentType="application/xhtml+xml";else if(J===B6.NAMESPACE.SVG)K._contentType="image/svg+xml";else K._contentType="application/xml";return K},createHTMLDocument:function(J){var Z=new cj(!0,null);Z.appendChild(new lj(Z,"html"));var Y=Z.createElement("html");Z.appendChild(Y);var K=Z.createElement("head");if(Y.appendChild(K),J!==void 0){var Q=Z.createElement("title");K.appendChild(Q),Q.appendChild(Z.createTextNode(J))}return Y.appendChild(Z.createElement("body")),Z.modclock=1,Z},mozSetOutputMutationHandler:function($,J){$.mutationHandler=J},mozGetInputMutationHandler:function($){B6.nyi()},mozHTMLParser:eP}});var sj=p((Wv,ij)=>{var ZI=aZ(),YI=rY();ij.exports=G3;function G3($,J){this._window=$,this._href=J}G3.prototype=Object.create(YI.prototype,{constructor:{value:G3},href:{get:function(){return this._href},set:function($){this.assign($)}},assign:{value:function($){var J=new ZI(this._href),Z=J.resolve($);this._href=Z}},replace:{value:function($){this.assign($)}},reload:{value:function(){this.assign(this.href)}},toString:{value:function(){return this.href}}})});var aj=p((jv,nj)=>{var KI=Object.create(null,{appCodeName:{value:"Mozilla"},appName:{value:"Netscape"},appVersion:{value:"4.0"},platform:{value:""},product:{value:"Gecko"},productSub:{value:"20100101"},userAgent:{value:""},vendor:{value:""},vendorSub:{value:""},taintEnabled:{value:function(){return!1}}});nj.exports=KI});var ej=p((Uv,tj)=>{var QI={setTimeout,clearTimeout,setInterval,clearInterval};tj.exports=QI});var W3=p((u8,$U)=>{var X3=X0();u8=$U.exports={CSSStyleDeclaration:tZ(),CharacterData:T8(),Comment:EY(),DOMException:vZ(),DOMImplementation:m8(),DOMTokenList:qY(),Document:Z6(),DocumentFragment:bY(),DocumentType:K6(),Element:gJ(),HTMLParser:U6(),NamedNodeMap:PY(),Node:P0(),NodeList:n2(),NodeFilter:b8(),ProcessingInstruction:hY(),Text:TY(),Window:j3()};X3.merge(u8,oY());X3.merge(u8,$6().elements);X3.merge(u8,tY().elements)});var j3=p((Bv,JU)=>{var VI=m8(),GI=$Y(),XI=sj(),d8=X0();JU.exports=H6;function H6($){this.document=$||new VI(null).createHTMLDocument(""),this.document._scripting_enabled=!0,this.document.defaultView=this,this.location=new XI(this,this.document._address||"about:blank")}H6.prototype=Object.create(GI.prototype,{console:{value:console},history:{value:{back:d8.nyi,forward:d8.nyi,go:d8.nyi}},navigator:{value:aj()},window:{get:function(){return this}},self:{get:function(){return this}},frames:{get:function(){return this}},parent:{get:function(){return this}},top:{get:function(){return this}},length:{value:0},frameElement:{value:null},opener:{value:null},onload:{get:function(){return this._getEventHandler("load")},set:function($){this._setEventHandler("load",$)}},getComputedStyle:{value:function(J){return J.style}}});d8.expose(ej(),H6);d8.expose(W3(),H6)});var VU=p((WI)=>{var ZU=m8(),YU=U6(),Hv=j3(),KU=W3();WI.createDOMImplementation=function(){return new ZU(null)};WI.createDocument=function($,J){if($||J){var Z=new YU;return Z.parse($||"",!0),Z.document()}return new ZU(null).createHTMLDocument("")};WI.createIncrementalHTMLParser=function(){var $=new YU;return{write:function(J){if(J.length>0)$.parse(J,!1,function(){return!0})},end:function(J){$.parse(J||"",!0,function(){return!0})},process:function(J){return $.parse("",!1,J)},document:function(){return $.document()}}};WI.createWindow=function($,J){var Z=WI.createDocument($);if(J!==void 0)Z._address=J;return new KU.Window(Z)};WI.impl=KU});var W1={};o$(W1,{layer:()=>GK,defaultLayer:()=>z_,Status:()=>F_,Service:()=>q9,Format:()=>W1});import q_ from"path";var O9={};o$(O9,{zig:()=>nH,uvformat:()=>$_,terraform:()=>V_,standardrb:()=>Z_,shfmt:()=>W_,rustfmt:()=>U_,ruff:()=>QK,rubocop:()=>J_,rlang:()=>eH,prettier:()=>rH,pint:()=>B_,oxfmt:()=>iH,ormolu:()=>H_,ocamlformat:()=>Q_,nixfmt:()=>j_,mix:()=>oH,latexindent:()=>G_,ktlint:()=>tH,htmlbeautifier:()=>Y_,gofmt:()=>lH,gleam:()=>X_,dfmt:()=>O_,dart:()=>K_,cljfmt:()=>__,clang:()=>aH,biome:()=>sH});var lH={name:"gofmt",extensions:[".go"],async enabled(){let $=x$("gofmt");if(!$)return!1;return[$,"-w","$FILE"]}},oH={name:"mix",extensions:[".ex",".exs",".eex",".heex",".leex",".neex",".sface"],async enabled(){let $=x$("mix");if(!$)return!1;return[$,"format","$FILE"]}},YK=[".js",".jsx",".mjs",".cjs",".ts",".tsx",".mts",".cts",".html",".htm",".css",".scss",".sass",".less",".vue",".svelte",".json",".jsonc",".yaml",".yml",".toml",".xml",".md",".mdx",".graphql",".gql"];async function KK($,J){let Z=await O0.findUp("package.json",$.directory,$.worktree);for(let Y of Z){let K=await O0.readJson(Y);if(K.dependencies?.[J]||K.devDependencies?.[J]){let Q=await m6.which(J);if(Q)return Q}}return}var rH={name:"prettier",environment:{BUN_BE_BUN:"1"},extensions:[...YK],async enabled($){let J=await KK($,"prettier");return J?[J,"--write","$FILE"]:!1}},iH={name:"oxfmt",environment:{BUN_BE_BUN:"1"},extensions:[".js",".jsx",".mjs",".cjs",".ts",".tsx",".mts",".cts"],async enabled($){if(!k$.QITQODE_EXPERIMENTAL_OXFMT)return!1;let J=await KK($,"oxfmt");return J?[J,"$FILE"]:!1}},sH={name:"biome",environment:{BUN_BE_BUN:"1"},extensions:[...YK],async enabled($){let J=["biome.json","biome.jsonc"];for(let Z of J)if((await O0.findUp(Z,$.directory,$.worktree)).length>0){let K=await m6.which("@biomejs/biome");if(K)return[K,"format","--write","$FILE"]}return!1}},nH={name:"zig",extensions:[".zig",".zon"],async enabled(){let $=x$("zig");if(!$)return!1;return[$,"fmt","$FILE"]}},aH={name:"clang-format",extensions:[".c",".cc",".cpp",".cxx",".c++",".h",".hh",".hpp",".hxx",".h++",".ino",".C",".H"],async enabled($){if((await O0.findUp(".clang-format",$.directory,$.worktree)).length>0){let Z=x$("clang-format");if(Z)return[Z,"-i","$FILE"]}return!1}},tH={name:"ktlint",extensions:[".kt",".kts"],async enabled(){let $=x$("ktlint");if(!$)return!1;return[$,"-F","$FILE"]}},QK={name:"ruff",extensions:[".py",".pyi"],async enabled($){if(!x$("ruff"))return!1;let J=["pyproject.toml","ruff.toml",".ruff.toml"];for(let Y of J){let K=await O0.findUp(Y,$.directory,$.worktree);if(K.length>0)if(Y==="pyproject.toml"){if((await O0.readText(K[0])).includes("[tool.ruff]"))return["ruff","format","$FILE"]}else return["ruff","format","$FILE"]}let Z=["requirements.txt","pyproject.toml","Pipfile"];for(let Y of Z){let K=await O0.findUp(Y,$.directory,$.worktree);if(K.length>0){if((await O0.readText(K[0])).includes("ruff"))return["ruff","format","$FILE"]}}return!1}},eH={name:"air",extensions:[".R"],async enabled(){let $=x$("air");if($==null)return!1;let J=await _9.text([$,"--help"],{nothrow:!0}),Z=J.text.split(`
37
+ `)[0],Y=Z.includes("R language"),K=Z.includes("formatter");if(J.code===0&&Y&&K)return[$,"format","$FILE"];return!1}},$_={name:"uv",extensions:[".py",".pyi"],async enabled($){if(await QK.enabled($))return!1;let J=x$("uv");if(J==null)return!1;if((await _9.run([J,"format","--help"],{nothrow:!0})).code===0)return[J,"format","--","$FILE"];return!1}},J_={name:"rubocop",extensions:[".rb",".rake",".gemspec",".ru"],async enabled(){let $=x$("rubocop");if(!$)return!1;return[$,"--autocorrect","$FILE"]}},Z_={name:"standardrb",extensions:[".rb",".rake",".gemspec",".ru"],async enabled(){let $=x$("standardrb");if(!$)return!1;return[$,"--fix","$FILE"]}},Y_={name:"htmlbeautifier",extensions:[".erb",".html.erb"],async enabled(){let $=x$("htmlbeautifier");if(!$)return!1;return[$,"$FILE"]}},K_={name:"dart",extensions:[".dart"],async enabled(){let $=x$("dart");if(!$)return!1;return[$,"format","$FILE"]}},Q_={name:"ocamlformat",extensions:[".ml",".mli"],async enabled($){if(!x$("ocamlformat"))return!1;if((await O0.findUp(".ocamlformat",$.directory,$.worktree)).length>0)return["ocamlformat","-i","$FILE"];return!1}},V_={name:"terraform",extensions:[".tf",".tfvars"],async enabled(){let $=x$("terraform");if(!$)return!1;return[$,"fmt","$FILE"]}},G_={name:"latexindent",extensions:[".tex"],async enabled(){let $=x$("latexindent");if(!$)return!1;return[$,"-w","-s","$FILE"]}},X_={name:"gleam",extensions:[".gleam"],async enabled(){let $=x$("gleam");if(!$)return!1;return[$,"format","$FILE"]}},W_={name:"shfmt",extensions:[".sh",".bash"],async enabled(){let $=x$("shfmt");if(!$)return!1;return[$,"-w","$FILE"]}},j_={name:"nixfmt",extensions:[".nix"],async enabled(){let $=x$("nixfmt");if(!$)return!1;return[$,"$FILE"]}},U_={name:"rustfmt",extensions:[".rs"],async enabled(){let $=x$("rustfmt");if(!$)return!1;return[$,"$FILE"]}},B_={name:"pint",extensions:[".php"],async enabled($){let J=await O0.findUp("composer.json",$.directory,$.worktree);for(let Z of J){let Y=await O0.readJson(Z);if(Y.require?.["laravel/pint"]||Y["require-dev"]?.["laravel/pint"])return["./vendor/bin/pint","$FILE"]}return!1}},H_={name:"ormolu",extensions:[".hs"],async enabled(){let $=x$("ormolu");if(!$)return!1;return[$,"-i","$FILE"]}},__={name:"cljfmt",extensions:[".clj",".cljs",".cljc",".edn"],async enabled(){let $=x$("cljfmt");if(!$)return!1;return[$,"fix","--quiet","$FILE"]}},O_={name:"dfmt",extensions:[".d"],async enabled(){let $=x$("dfmt");if(!$)return!1;return[$,"-i","$FILE"]}};var x1=O$.create({service:"format"}),F_=F.object({name:F.string(),extensions:F.string().array(),enabled:F.boolean()}).meta({ref:"FormatterStatus"});class q9 extends D$.Service()("@qitqode/Format"){}var GK=f.effect(q9,G.gen(function*(){let $=yield*R$.Service,J=yield*u6.ChildProcessSpawner,Z=yield*i.make(G.fn("Format.state")(function*(V){let X={},W={};async function _(z){let M=X[z.name];if(M===!1||M===void 0)M=await z.enabled(V),X[z.name]=M;return M}async function j(z){return await _(z)!==!1}async function H(z){let M=Object.values(W).filter((C)=>C.extensions.includes(z));return(await Promise.all(M.map(async(C)=>{x1.info("checking",{name:C.name,ext:z});let P=await _(C);if(P)x1.info("enabled",{name:C.name,ext:z});return{item:C,cmd:P}}))).filter((C)=>C.cmd).map((C)=>({item:C.item,cmd:C.cmd}))}function q(z){return G.gen(function*(){x1.info("formatting",{file:z});let M=q_.extname(z);for(let{item:I,cmd:C}of yield*G.promise(()=>H(M))){if(C===!1)continue;x1.info("running",{command:C});let P=C.map((R)=>R.replace("$FILE",z)),D=yield*i.directory;if((yield*J.spawn(S1.make(P[0],P.slice(1),{cwd:D,env:I.environment,extendEnv:!0})).pipe(G.flatMap((R)=>R.exitCode),G.scoped,G.catch(()=>G.sync(()=>{return x1.error("failed to format file",{error:"spawn failed",command:C,...I.environment,file:z}),u6.ExitCode(1)}))))!==0)x1.error("failed",{command:C,...I.environment})}})}let U=yield*$.get();if(!U.formatter)return x1.info("all formatters are disabled"),x1.info("init"),{formatters:W,isEnabled:j,formatFile:q};for(let z of Object.values(O9))W[z.name]=z;if(U.formatter!==!0)for(let[z,M]of Object.entries(U.formatter)){let I=O9[z];if(["ruff","uv"].includes(z)&&(U.formatter.ruff?.disabled||U.formatter.uv?.disabled)){delete W.ruff,delete W.uv;continue}if(M.disabled){delete W[z];continue}let C=F9(I??{extensions:[]},M);W[z]={...C,name:z,extensions:C.extensions??[],enabled:I&&!C.command?I.enabled:async(P)=>C.command??!1}}return x1.info("init"),{formatters:W,isEnabled:j,formatFile:q}})),Y=G.fn("Format.init")(function*(){yield*i.get(Z)}),K=G.fn("Format.status")(function*(){let{formatters:V,isEnabled:X}=yield*i.get(Z),W=[];for(let _ of Object.values(V)){let j=yield*G.promise(()=>X(_));W.push({name:_.name,extensions:_.extensions,enabled:j})}return W}),Q=G.fn("Format.file")(function*(V){let{formatFile:X}=yield*i.get(Z);yield*X(V)});return q9.of({init:Y,status:K,file:Q})})),z_=GK.pipe(f.provide(R$.defaultLayer),f.provide(XJ));var h0={};o$(h0,{layer:()=>qK,defaultLayer:()=>y_,Service:()=>C9,Ripgrep:()=>h0,Match:()=>_K});import J8 from"path";var XK=O$.create({service:"ripgrep"}),d6="15.1.0",C_={"arm64-darwin":{platform:"aarch64-apple-darwin",extension:"tar.gz"},"arm64-linux":{platform:"aarch64-unknown-linux-gnu",extension:"tar.gz"},"x64-darwin":{platform:"x86_64-apple-darwin",extension:"tar.gz"},"x64-linux":{platform:"x86_64-unknown-linux-musl",extension:"tar.gz"},"arm64-win32":{platform:"aarch64-pc-windows-msvc",extension:"zip"},"ia32-win32":{platform:"i686-pc-windows-msvc",extension:"zip"},"x64-win32":{platform:"x86_64-pc-windows-msvc",extension:"zip"}},HK=F.object({elapsed:F.object({secs:F.number(),nanos:F.number(),human:F.string()}),searches:F.number(),searches_with_match:F.number(),bytes_searched:F.number(),bytes_printed:F.number(),matched_lines:F.number(),matches:F.number()}),M_=F.object({type:F.literal("begin"),data:F.object({path:F.object({text:F.string()})})}),_K=F.object({type:F.literal("match"),data:F.object({path:F.object({text:F.string()}),lines:F.object({text:F.string()}),line_number:F.number(),absolute_offset:F.number(),submatches:F.array(F.object({match:F.object({text:F.string()}),start:F.number(),end:F.number()}))})}),D_=F.object({type:F.literal("end"),data:F.object({path:F.object({text:F.string()}),binary_offset:F.number().nullable(),stats:HK})}),P_=F.object({type:F.literal("summary"),data:F.object({elapsed_total:F.object({human:F.string(),nanos:F.number(),secs:F.number()}),stats:HK})}),I_=F.union([M_,_K,D_,P_]);class C9 extends D$.Service()("@qitqode/Ripgrep"){}function A_(){let $=BK();return delete $.RIPGREP_CONFIG_PATH,$}function WK($){let J=$?.reason;if(J instanceof Error)return J;let Z=Error("Aborted");return Z.name="AbortError",Z}function S_($){if(!$)return G.never;if($.aborted)return G.fail(WK($));return G.callback((J)=>{let Z=()=>J(G.fail(WK($)));if($.addEventListener("abort",Z,{once:!0}),$.aborted)Z();return G.sync(()=>$.removeEventListener("abort",Z))})}function z9($,J){let Z=Error($.trim()||`ripgrep failed with code ${J}`);return Z.name="RipgrepError",Z}function OK($){return J8.normalize($.replace(/^\.[\\/]/,""))}function w_($){return{...$,path:{...$.path,text:OK($.path.text)}}}function R_($){return G.try({try:()=>I_.parse(JSON.parse($)),catch:(J)=>Error("invalid ripgrep output",{cause:J})})}function jK($,J){b1.failCauseUnsafe($,u0.fail(J))}function L_($){let J=["--no-config","--files","--glob=!.git/*"];if($.follow)J.push("--follow");if($.hidden!==!1)J.push("--hidden");if($.hidden===!1)J.push("--glob=!.*");if($.maxDepth!==void 0)J.push(`--max-depth=${$.maxDepth}`);if($.glob)for(let Z of $.glob)J.push(`--glob=${Z}`);return J.push("."),J}function N_($){let J=["--no-config","--json","--hidden","--glob=!.git/*","--no-messages"];if($.follow)J.push("--follow");if($.glob)for(let Z of $.glob)J.push(`--glob=${Z}`);if($.limit)J.push(`--max-count=${$.limit}`);return J.push("--",$.pattern,...$.file??["."]),J}function UK($,J){return J?$.pipe(G.raceFirst(S_(J))):$}var qK=f.effect(C9,G.gen(function*(){let $=yield*$$.Service,J=v1.filterStatusOk(yield*v1.HttpClient),Z=yield*M9,Y=G.fnUntraced(function*(H,q,U){let z=yield*Z.spawn(S1.make(H,q,{cwd:U?.cwd,extendEnv:!0,stdin:"ignore"})),[M,I,C]=yield*G.all([l$.mkString(l$.decodeText(z.stdout)),l$.mkString(l$.decodeText(z.stderr)),z.exitCode],{concurrency:"unbounded"});return{stdout:M,stderr:I,code:C}},G.scoped),K=G.fnUntraced(function*(H,q,U){let z=yield*$.makeTempDirectoryScoped({directory:f$.Path.bin,prefix:"ripgrep-"});if(q.extension==="zip"){let I=(yield*G.sync(()=>x$("powershell.exe")??x$("pwsh.exe")))??"powershell.exe",C=yield*Y(I,["-NoProfile","-NonInteractive","-Command",`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -LiteralPath '${H.replaceAll("'","''")}' -DestinationPath '${z.replaceAll("'","''")}' -Force`]);if(C.code!==0)return yield*G.fail(z9(C.stderr||C.stdout,C.code))}if(q.extension==="tar.gz"){let I=yield*Y("tar",["-xzf",H,"-C",z]);if(I.code!==0)return yield*G.fail(z9(I.stderr||I.stdout,I.code))}let M=J8.join(z,`ripgrep-${d6}-${q.platform}`,process.platform==="win32"?"rg.exe":"rg");if(!(yield*$.isFile(M)))return yield*G.fail(Error(`ripgrep archive did not contain executable: ${M}`));if(yield*$.copyFile(M,U),process.platform==="win32")return;yield*$.chmod(U,493)},G.scoped),Q=yield*G.cached(G.gen(function*(){let H=yield*G.sync(()=>x$(process.platform==="win32"?"rg.exe":"rg"));if(H&&(yield*$.isFile(H).pipe(G.orDie)))return H;let q=J8.join(f$.Path.bin,`rg${process.platform==="win32"?".exe":""}`);if(yield*$.isFile(q).pipe(G.orDie))return q;let U=`${process.arch}-${process.platform}`,z=C_[U];if(!z)return yield*G.fail(Error(`unsupported platform for ripgrep: ${U}`));let M=`ripgrep-${d6}-${z.platform}.${z.extension}`,I=`https://github.com/BurntSushi/ripgrep/releases/download/${d6}/${M}`,C=J8.join(f$.Path.bin,M);XK.info("downloading ripgrep",{url:I}),yield*$.ensureDir(f$.Path.bin).pipe(G.orDie);let P=yield*G2.get(I).pipe(J.execute,G.flatMap((D)=>D.arrayBuffer),G.mapError((D)=>D instanceof Error?D:Error(String(D))));if(P.byteLength===0)return yield*G.fail(Error(`failed to download ripgrep from ${I}`));return yield*$.writeWithDirs(C,new Uint8Array(P)),yield*K(C,z,q),yield*$.remove(C,{force:!0}).pipe(G.ignore),q})),V=G.fnUntraced(function*(H){if(yield*$.isDir(H).pipe(G.orDie))return;return yield*G.fail(Object.assign(Error(`No such file or directory: '${H}'`),{code:"ENOENT",errno:-2,path:H}))}),X=G.fnUntraced(function*(H,q){let U=yield*Q;return S1.make(U,q,{cwd:H,env:A_(),extendEnv:!0,stdin:"ignore"})}),W=(H)=>l$.callback((q)=>G.gen(function*(){yield*G.forkScoped(G.gen(function*(){yield*V(H.cwd);let U=yield*Z.spawn(yield*X(H.cwd,L_(H))),z=yield*l$.mkString(l$.decodeText(U.stderr)).pipe(G.forkScoped),M=yield*l$.decodeText(U.stdout).pipe(l$.splitLines,l$.filter((C)=>C.length>0),l$.runForEach((C)=>G.sync(()=>b1.offerUnsafe(q,OK(C)))),G.forkScoped),I=yield*UK(U.exitCode,H.signal);if(yield*Z8.join(M),I===0||I===1){b1.endUnsafe(q);return}jK(q,z9(yield*Z8.join(z),I))}).pipe(G.catch((U)=>G.sync(()=>{jK(q,U)}))))})),_=G.fn("Ripgrep.search")(function*(H){yield*V(H.cwd);let q=G.scoped(G.gen(function*(){let U=yield*Z.spawn(yield*X(H.cwd,N_(H))),[z,M,I]=yield*G.all([l$.decodeText(U.stdout).pipe(l$.splitLines,l$.filter((C)=>C.length>0),l$.mapEffect(R_),l$.filter((C)=>C.type==="match"),l$.map((C)=>w_(C.data)),l$.runCollect,G.map((C)=>[...C])),l$.mkString(l$.decodeText(U.stderr)),U.exitCode],{concurrency:"unbounded"});if(I!==0&&I!==1&&I!==2)return yield*G.fail(z9(M,I));return{items:I===1?[]:z,partial:I===2}}));return yield*UK(q,H.signal)}),j=G.fn("Ripgrep.tree")(function*(H){XK.info("tree",H);let q=Array.from(yield*W({cwd:H.cwd,signal:H.signal}).pipe(l$.runCollect));function U(R,N){let x=R.children.get(N);if(x)return x;let b={name:N,children:new Map};return R.children.set(N,b),b}function z(R){return Array.from(R.children.values()).reduce((N,x)=>N+1+z(x),0)}let M={name:"",children:new Map};for(let R of q){if(R.includes(".qitqode"))continue;let N=R.split(J8.sep);if(N.length<2)continue;let x=M;for(let b of N.slice(0,-1))x=U(x,b)}let I=z(M),C=H.limit??I,P=[],D=Array.from(M.children.values()).sort((R,N)=>R.name.localeCompare(N.name)).map((R)=>({node:R,path:R.name})),L=0;for(let R=0;R<D.length&&L<C;R++){let N=D[R];P.push(N.path),L++,D.push(...Array.from(N.node.children.values()).sort((x,b)=>x.name.localeCompare(b.name)).map((x)=>({node:x,path:`${N.path}/${x.name}`})))}if(I>L)P.push(`[${I-L} truncated]`);return P.join(`
38
+ `)});return C9.of({files:W,tree:j,search:_})})),y_=qK.pipe(f.provide(X2.layer),f.provide($$.defaultLayer),f.provide(XJ));var w2={};o$(w2,{layer:()=>gK,defaultLayer:()=>M4,Service:()=>A9,Node:()=>K4,Info:()=>Y4,File:()=>w2,Event:()=>V4,Content:()=>Q4});var vK=S9(Z4(),1),hK=S9(LK(),1);import E0 from"path";var S2={};o$(S2,{paths:()=>J4,names:()=>$4,Protected:()=>S2});import o6 from"path";import a_ from"os";var r6=a_.homedir(),NK=["Music","Pictures","Movies","Downloads","Desktop","Documents","Public","Applications","Library"],t_=["Application Support/AddressBook","Calendars","Mail","Messages","Safari","Cookies","Application Support/com.apple.TCC","PersonalizationPortrait","Metadata/CoreSpotlight","Suggestions"],e_=["/.DocumentRevisions-V100","/.Spotlight-V100","/.Trashes","/.fseventsd"],yK=["AppData","Downloads","Desktop","Documents","Pictures","Music","Videos","OneDrive"];function $4(){if(process.platform==="darwin")return new Set(NK);if(process.platform==="win32")return new Set(yK);return new Set}function J4(){if(process.platform==="darwin")return[...NK.map(($)=>o6.join(r6,$)),...t_.map(($)=>o6.join(r6,"Library",$)),...e_];if(process.platform==="win32")return yK.map(($)=>o6.join(r6,$));return[]}var Y4=F.object({path:F.string(),added:F.number().int(),removed:F.number().int(),status:F.enum(["added","deleted","modified"])}).meta({ref:"File"}),K4=F.object({name:F.string(),path:F.string(),absolute:F.string(),type:F.enum(["file","directory"]),ignored:F.boolean()}).meta({ref:"FileNode"}),Q4=F.object({type:F.enum(["text","binary"]),content:F.string(),diff:F.string().optional(),patch:F.object({oldFileName:F.string(),newFileName:F.string(),oldHeader:F.string().optional(),newHeader:F.string().optional(),hunks:F.array(F.object({oldStart:F.number(),oldLines:F.number(),newStart:F.number(),newLines:F.number(),lines:F.array(F.string())})),index:F.string().optional()}).optional(),encoding:F.literal("base64").optional(),mimeType:F.string().optional()}).meta({ref:"FileContent"}),V4={Edited:Z0.define("file.edited",F.object({file:F.string()}))},K8=O$.create({service:"file"}),TK=393216,G4=new Set(["exe","dll","pdb","bin","so","dylib","o","a","lib","wav","mp3","ogg","oga","ogv","ogx","flac","aac","wma","m4a","weba","mp4","avi","mov","wmv","flv","webm","mkv","zip","tar","gz","gzip","bz","bz2","bzip","bzip2","7z","rar","xz","lz","z","pdf","doc","docx","ppt","pptx","xls","xlsx","dmg","iso","img","vmdk","ttf","otf","woff","woff2","eot","sqlite","db","mdb","apk","ipa","aab","xapk","app","pkg","deb","rpm","snap","flatpak","appimage","msi","msp","jar","war","ear","class","kotlin_module","dex","vdex","odex","oat","art","wasm","wat","bc","ll","s","ko","sys","drv","efi","rom","com"]),X4=new Set(["png","jpg","jpeg","gif","bmp","webp","ico","tif","tiff","svg","svgz","avif","apng","jxl","heic","heif","raw","cr2","nef","arw","dng","orf","raf","pef","x3f"]),W4=new Set(["ts","tsx","mts","cts","mtsx","ctsx","js","jsx","mjs","cjs","sh","bash","zsh","fish","ps1","psm1","cmd","bat","json","jsonc","json5","yaml","yml","toml","md","mdx","txt","xml","html","htm","css","scss","sass","less","graphql","gql","sql","ini","cfg","conf","env"]),j4=new Set(["dockerfile","makefile",".gitignore",".gitattributes",".editorconfig",".npmrc",".nvmrc",".prettierrc",".eslintrc"]),U4={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",webp:"image/webp",ico:"image/x-icon",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",svgz:"image/svg+xml",avif:"image/avif",apng:"image/apng",jxl:"image/jxl",heic:"image/heic",heif:"image/heif"},Q8=($)=>E0.extname($).toLowerCase().slice(1),B4=($)=>E0.basename($).toLowerCase(),H4=($)=>X4.has(Q8($)),_4=($)=>W4.has(Q8($)),O4=($)=>j4.has(B4($)),q4=($)=>G4.has(Q8($)),F4=($)=>$.startsWith("image/"),kK=($)=>U4[Q8($)]||"image/"+Q8($);function z4($){let J=$.toLowerCase();if(K8.debug("shouldEncode",{type:J}),!J)return!1;if(J.startsWith("text/"))return!1;if(J.includes("charset="))return!1;let Z=J.split("/",2)[0];return["image","audio","video","font","model","multipart"].includes(Z)}var C4=($)=>{return $.replaceAll("\\","/").replace(/\/+$/,"").split("/").some((Z)=>Z.startsWith(".")&&Z.length>1)},EK=($,J)=>{if(J)return $;let Z=[],Y=[];for(let K of $)if(C4(K))Y.push(K);else Z.push(K);return[...Z,...Y]};class A9 extends D$.Service()("@qitqode/File"){}var gK=f.effect(A9,G.gen(function*(){let $=yield*$$.Service,J=yield*h0.Service,Z=yield*HJ.Service,Y=yield*UJ.Scope,K=yield*i.make(G.fn("File.state")(()=>G.succeed({cache:{files:[],dirs:[]}}))),Q=G.fn("File.scan")(function*(){let M=yield*i.context;if(M.directory===E0.parse(M.directory).root)return;let I=M.directory===f$.Path.home&&M.project.id==="global",C={files:[],dirs:[]};if(I){let D=new Set,L=S2.names(),R=new Set(["node_modules","dist","build","target","vendor"]),N=(v)=>v.startsWith(".")||L.has(v),x=(v)=>v.startsWith(".")||R.has(v),b=yield*$.readDirectoryEntries(M.directory).pipe(G.orElseSucceed(()=>[]));for(let v of b){if(v.type!=="directory")continue;if(N(v.name))continue;D.add(v.name+"/");let m=E0.join(M.directory,v.name),A=yield*$.readDirectoryEntries(m).pipe(G.orElseSucceed(()=>[]));for(let u of A){if(u.type!=="directory")continue;if(x(u.name))continue;D.add(v.name+"/"+u.name+"/")}}C.dirs=Array.from(D).toSorted()}else{let D=yield*J.files({cwd:M.directory}).pipe(BJ,G.map((R)=>[...R])),L=new Set;for(let R of D){C.files.push(R);let N=R;while(!0){let x=E0.dirname(N);if(x===".")break;if(x===N)break;if(N=x,L.has(x))continue;L.add(x),C.dirs.push(x+"/")}}}let P=yield*i.get(K);P.cache=C}),V=yield*G.cached(Q().pipe(G.catchCause(()=>G.void))),X=G.fn("File.ensure")(function*(){yield*V,V=yield*G.cached(Q().pipe(G.catchCause(()=>G.void)))}),W=G.fnUntraced(function*(M){return(yield*Z.run(M,{cwd:(yield*i.context).directory})).text()}),_=(M,I)=>{if(!B$.containsPath(M,I))throw Error("Access denied: path escapes project directory");let C=$$.canonical(M);if(!B$.containsPath(C,I))throw Error("Access denied: path escapes project directory")},j=G.fn("File.init")(function*(){yield*X().pipe(G.forkIn(Y))}),H=G.fn("File.status")(function*(){let M=yield*i.context;if(M.project.vcs!=="git")return[];let I=yield*W(["-c","core.fsmonitor=false","-c","core.quotepath=false","diff","--numstat","HEAD"]),C=[];if(I.trim())for(let L of I.trim().split(`
39
39
  `)){let[R,N,x]=L.split("\t");C.push({path:x,added:R==="-"?0:parseInt(R,10),removed:N==="-"?0:parseInt(N,10),status:"modified"})}let P=yield*W(["-c","core.fsmonitor=false","-c","core.quotepath=false","ls-files","--others","--exclude-standard"]);if(P.trim())for(let L of P.trim().split(`
40
- `)){let R=yield*$.readFileString(k0.join(M.directory,L)).pipe(G.catch(()=>G.succeed(void 0)));if(R===void 0)continue;C.push({path:L,added:R.split(`
40
+ `)){let R=yield*$.readFileString(E0.join(M.directory,L)).pipe(G.catch(()=>G.succeed(void 0)));if(R===void 0)continue;C.push({path:L,added:R.split(`
41
41
  `).length,removed:0,status:"added"})}let D=yield*W(["-c","core.fsmonitor=false","-c","core.quotepath=false","diff","--name-only","--diff-filter=D","HEAD"]);if(D.trim())for(let L of D.trim().split(`
42
- `))C.push({path:L,added:0,removed:0,status:"deleted"});return C.map((L)=>{let R=k0.isAbsolute(L.path)?L.path:k0.join(M.directory,L.path);return{...L,path:k0.relative(M.directory,R)}})}),q=G.fn("File.read")(function*(M){let b=[];try{const I=w9(b,K8.time("read",{file:M}),0);let C=yield*i.context;let P=k0.join(C.directory,M);_(P,C);if(H4(M)){let u=yield*$.stat(P).pipe(G.catch(()=>G.succeed(void 0)));if(!u)return{type:"text",content:""};if(Number(u.size)>TK)return{type:"binary",content:"",mimeType:kK(M)};let r=yield*$.readFile(P).pipe(G.catch(()=>G.succeed(new Uint8Array)));return{type:"text",content:Buffer.from(r).toString("base64"),mimeType:kK(M),encoding:"base64"}}let D=_4(M)||O4(M);if(q4(M)&&!D)return{type:"binary",content:""};let L=yield*$.stat(P).pipe(G.catch(()=>G.succeed(void 0)));if(!L)return{type:"text",content:""};let R=$$.mimeType(P);let N=D?!1:z4(R);if(N&&!F4(R))return{type:"binary",content:"",mimeType:R};if(N){if(Number(L.size)>TK)return{type:"binary",content:"",mimeType:R};let u=yield*$.readFile(P).pipe(G.catch(()=>G.succeed(new Uint8Array)));return{type:"text",content:Buffer.from(u).toString("base64"),mimeType:R,encoding:"base64"}}let x=yield*$.readFileString(P).pipe(G.map((u)=>u.trim()),G.catch(()=>G.succeed("")));if(C.project.vcs==="git"){let u=yield*W(["-c","core.fsmonitor=false","diff","--",M]);if(!u.trim())u=yield*W(["-c","core.fsmonitor=false","diff","--staged","--",M]);if(u.trim()){let r=yield*Z.show(C.directory,"HEAD",M),S=xK(M,M,r,x,"old","new",{context:1/0,ignoreWhitespace:!0});return{type:"text",content:x,patch:S,diff:bK(S)}}return{type:"text",content:x}}return{type:"text",content:x}}catch(v){var m=v,A=1}finally{R9(b,m,A)}}),U=G.fn("File.list")(function*(M){let I=yield*i.context,C=[".git",".DS_Store"],P=(N)=>!1;if(I.project.vcs==="git"){let N=hK.default(),x=k0.join(I.worktree,".gitignore"),b=yield*$.readFileString(x).pipe(G.catch(()=>G.succeed("")));if(b)N.add(b);let v=k0.join(I.worktree,".ignore"),m=yield*$.readFileString(v).pipe(G.catch(()=>G.succeed("")));if(m)N.add(m);P=N.ignores.bind(N)}let D=M?k0.join(I.directory,M):I.directory;_(D,I);let L=yield*$.readDirectoryEntries(D).pipe(G.orElseSucceed(()=>[])),R=[];for(let N of L){if(C.includes(N.name))continue;let x=k0.join(D,N.name),b=k0.relative(I.directory,x),v=N.type==="directory"?"directory":"file";R.push({name:N.name,path:b,absolute:x,type:v,ignored:P(v==="directory"?b+"/":b)})}return R.sort((N,x)=>{if(N.type!==x.type)return N.type==="directory"?-1:1;return N.name.localeCompare(x.name)})}),z=G.fn("File.search")(function*(M){yield*X();let{cache:I}=yield*i.get(K),C=M.query.trim(),P=M.limit??100,D=M.type??(M.dirs===!1?"file":"all");K8.info("search",{query:C,kind:D});let L=C.startsWith(".")||C.includes("/.");if(!C){if(D==="file")return I.files.slice(0,P);return EK(I.dirs.toSorted(),L).slice(0,P)}let R=D==="file"?I.files:D==="directory"?I.dirs:[...I.files,...I.dirs],N=D==="directory"&&!L?P*20:P,x=vK.default.go(C,R,{limit:N}).map((v)=>v.target),b=D==="directory"?EK(x,L).slice(0,P):x;return K8.info("search",{query:C,kind:D,results:b.length}),b});return K8.info("init"),A9.of({init:j,status:H,read:q,list:U,search:z})})),M4=gK.pipe(f.provide(h0.defaultLayer),f.provide($$.defaultLayer),f.provide(HJ.defaultLayer));var k2={};o$(k2,{layer:()=>$V,hasNativeBinding:()=>Gq,defaultLayer:()=>Xq,Service:()=>v9,FileWatcher:()=>k2,Event:()=>b9});var N2=u0("path"),eO=lQ(),$q=nQ();function E9($,J={}){let{ignore:Z,...Y}=J;if(Array.isArray(Z)){J={...Y};for(let K of Z)if($q(K)){if(!J.ignoreGlobs)J.ignoreGlobs=[];let Q=eO.makeRe(K,{dot:!0,lookbehinds:!1});J.ignoreGlobs.push(Q.source)}else{if(!J.ignorePaths)J.ignorePaths=[];J.ignorePaths.push(N2.resolve($,K))}}return J}var j7=($)=>{return{writeSnapshot(J,Z,Y){return $.writeSnapshot(N2.resolve(J),N2.resolve(Z),E9(J,Y))},getEventsSince(J,Z,Y){return $.getEventsSince(N2.resolve(J),N2.resolve(Z),E9(J,Y))},async subscribe(J,Z,Y){return J=N2.resolve(J),Y=E9(J,Y),await $.subscribe(J,Z,Y),{unsubscribe(){return $.unsubscribe(J,Z,Y)}}},unsubscribe(J,Z,Y){return $.unsubscribe(N2.resolve(J),Z,E9(J,Y))}}};import{readdir as Yq}from"fs/promises";import x9 from"path";var U8={};o$(U8,{match:()=>Zq,PATTERNS:()=>Jq,FileIgnore:()=>U8});var aQ=new Set(["node_modules","bower_components",".pnpm-store","vendor",".npm","dist","build","out",".next","target","bin","obj",".git",".svn",".hg",".vscode",".idea",".turbo",".output","desktop",".sst",".cache",".webkit-cache","__pycache__",".pytest_cache","mypy_cache",".history",".gradle"]),tQ=["**/*.swp","**/*.swo","**/*.pyc","**/.DS_Store","**/Thumbs.db","**/logs/**","**/tmp/**","**/temp/**","**/*.log","**/coverage/**","**/.nyc_output/**"],Jq=[...tQ,...aQ];function Zq($,J){for(let K of J?.whitelist||[])if(y2.match(K,$))return!1;let Z=$.split(/[/\\]/);for(let K=0;K<Z.length;K++)if(aQ.has(Z[K]))return!0;let Y=J?.extra||[];for(let K of[...tQ,...Y])if(y2.match(K,$))return!0;return!1}var qJ=O$.create({service:"file.watcher"}),Kq=1e4,b9={Updated:Z0.define("file.watcher.updated",F.object({file:F.string(),event:F.union([F.literal("add"),F.literal("change"),F.literal("unlink")])}))},eQ=T2(()=>{try{let $=u0(`@parcel/watcher-${process.platform}-${process.arch}${process.platform==="linux"?"-bionic":""}`);return j7($)}catch($){qJ.error("failed to load watcher binding",{error:$});return}});function Qq(){if(process.platform==="win32")return"windows";if(process.platform==="darwin")return"fs-events";if(process.platform==="linux")return"inotify"}function Vq($){return S2.paths().filter((J)=>{let Z=x9.relative($,J);return Z!==""&&Z!==".."&&!Z.startsWith(`..${x9.sep}`)&&!x9.isAbsolute(Z)})}var Gq=()=>!!eQ();class v9 extends D$.Service()("@qitqode/FileWatcher"){}var $V=f.effect(v9,G.gen(function*(){let $=yield*R$.Service,J=yield*HJ.Service,Z=yield*i.make(G.fn("FileWatcher.state")(function*(){if(yield*k$.QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER)return;qJ.info("init",{directory:B$.directory});let Y=Qq();if(!Y){qJ.error("watcher backend not supported",{directory:B$.directory,platform:process.platform});return}let K=eQ();if(!K)return;qJ.info("watcher backend",{directory:B$.directory,platform:process.platform,backend:Y});let Q=[];yield*G.addFinalizer(()=>G.promise(()=>Promise.allSettled(Q.map((j)=>j.unsubscribe()))));let V=B$.bind((j,H)=>{if(j)return;for(let q of H){if(q.type==="create")P$.publish(b9.Updated,{file:q.path,event:"add"});if(q.type==="update")P$.publish(b9.Updated,{file:q.path,event:"change"});if(q.type==="delete")P$.publish(b9.Updated,{file:q.path,event:"unlink"})}}),X=(j,H)=>{let q=K.subscribe(j,V,{ignore:H,backend:Y});return G.gen(function*(){let U=yield*G.promise(()=>q);Q.push(U)}).pipe(G.timeout(Kq),G.catchCause((U)=>{return qJ.error("failed to subscribe",{dir:j,cause:n0.pretty(U)}),q.then((z)=>z.unsubscribe()).catch(()=>{}),G.void}))},_=(yield*$.get()).watcher?.ignore??[];if(yield*k$.QITQODE_EXPERIMENTAL_FILEWATCHER)yield*X(B$.directory,[...U8.PATTERNS,..._,...Vq(B$.directory)]);if(B$.project.vcs==="git"){let j=yield*J.run(["rev-parse","--git-dir"],{cwd:B$.project.worktree}),H=j.exitCode===0?x9.resolve(B$.project.worktree,j.text().trim()):void 0;if(H&&!_.includes(".git")&&!_.includes(H)){let q=(yield*G.promise(()=>Yq(H).catch(()=>[]))).filter((U)=>U!=="HEAD");yield*X(H,q)}}},G.catchCause((Y)=>{return qJ.error("failed to init watcher service",{cause:n0.pretty(Y)}),G.void})));return v9.of({init:G.fn("FileWatcher.init")(function*(){yield*i.get(Z)})})})),Xq=$V.pipe(f.provide(R$.defaultLayer),f.provide(HJ.defaultLayer));var FJ={};o$(FJ,{layer:()=>QV,defaultLayer:()=>Uq,Service:()=>h9,Discovery:()=>FJ});var Wq=4,jq=8;class YV extends F$.Class("IndexSkill")({name:F$.String,files:F$.Array(F$.String)}){}class KV extends F$.Class("Index")({skills:F$.Array(YV)}){}class h9 extends D$.Service()("@qitqode/SkillDiscovery"){}var QV=f.effect(h9,G.gen(function*(){let $=O$.create({service:"skill-discovery"}),J=yield*$$.Service,Z=yield*JV.Path,Y=v1.filterStatusOk(f9(yield*v1.HttpClient)),K=Z.join(f$.Path.cache,"skills"),Q=G.fn("Discovery.download")(function*(X,W){if(yield*J.exists(W).pipe(G.orDie))return!0;return yield*G2.get(X).pipe(Y.execute,G.flatMap((_)=>_.arrayBuffer),G.flatMap((_)=>J.writeWithDirs(W,new Uint8Array(_))),G.as(!0),G.catch((_)=>G.sync(()=>{return $.error("failed to download",{url:X,err:_}),!1})))}),V=G.fn("Discovery.pull")(function*(X){let W=X.endsWith("/")?X:`${X}/`,_=new URL("index.json",W).href,j=W.slice(0,-1);$.info("fetching index",{url:_});let H=yield*G2.get(_).pipe(G2.acceptJson,Y.execute,G.flatMap(ZV.schemaBodyJson(KV)),G.catch((z)=>G.sync(()=>{return $.error("failed to fetch index",{url:_,err:z}),null})));if(!H)return[];let q=H.skills.filter((z)=>{if(!z.files.includes("SKILL.md"))return $.warn("skill entry missing SKILL.md",{url:_,skill:z.name}),!1;return!0});return(yield*G.forEach(q,(z)=>G.gen(function*(){let M=Z.join(K,z.name);yield*G.forEach(z.files,(C)=>Q(new URL(C,`${j}/${z.name}/`).href,Z.join(M,C)),{concurrency:jq});let I=Z.join(M,"SKILL.md");return(yield*J.exists(I).pipe(G.orDie))?M:null}),{concurrency:Wq})).filter((z)=>z!==null)});return h9.of({pull:V})})),Uq=QV.pipe(f.provide(X2.layer),f.provide($$.defaultLayer),f.provide(g9.layer));var a0={};o$(a0,{layer:()=>FV,fmt:()=>kq,defaultLayer:()=>Tq,Skill:()=>a0,Service:()=>l9,NameMismatchError:()=>Rq,InvalidError:()=>wq,Info:()=>qV});import Pq from"os";import zJ from"path";import{pathToFileURL as Iq}from"url";import d9 from"path";import{pathToFileURL as _q}from"url";var H7=S9(Hq(),1);import Bq from"path";import U7 from"fs";import B7 from"path";function VV($,J,Z){let Y=J?B7.join($,J):$;for(let K of U7.readdirSync(Y,{withFileTypes:!0})){let Q=J?`${J}/${K.name}`:K.name;if(K.isDirectory())VV($,Q,Z);else Z[Q]=U7.readFileSync(B7.join(Y,K.name),"utf8")}}function m9($){let J={};for(let Z of U7.readdirSync($,{withFileTypes:!0})){if(!Z.isDirectory())continue;let Y={};if(VV(B7.join($,Z.name),"",Y),Object.keys(Y).length>0)J[Z.name]=Y}return J}function GV(){return m9(Bq.resolve(import.meta.dir,".bundle"))}import XV from"path";function u9($){return G.gen(function*(){if($.skipIfPresent&&(yield*$.fsys.existsSafe($.marker)))return $.root;for(let[J,Z]of Object.entries($.bundle)){let Y=XV.join($.root,"skills",J);for(let[K,Q]of Object.entries(Z))yield*$.fsys.writeWithDirs(XV.join(Y,K),Q)}return yield*$.fsys.writeWithDirs($.marker,$.markerContent),$.onExtracted($.root),$.root})}function Oq(){try{return{ask:{"SKILL.md":`---
42
+ `))C.push({path:L,added:0,removed:0,status:"deleted"});return C.map((L)=>{let R=E0.isAbsolute(L.path)?L.path:E0.join(M.directory,L.path);return{...L,path:E0.relative(M.directory,R)}})}),q=G.fn("File.read")(function*(M){let b=[];try{const I=w9(b,K8.time("read",{file:M}),0);let C=yield*i.context;let P=E0.join(C.directory,M);_(P,C);if(H4(M)){let u=yield*$.stat(P).pipe(G.catch(()=>G.succeed(void 0)));if(!u)return{type:"text",content:""};if(Number(u.size)>TK)return{type:"binary",content:"",mimeType:kK(M)};let r=yield*$.readFile(P).pipe(G.catch(()=>G.succeed(new Uint8Array)));return{type:"text",content:Buffer.from(r).toString("base64"),mimeType:kK(M),encoding:"base64"}}let D=_4(M)||O4(M);if(q4(M)&&!D)return{type:"binary",content:""};let L=yield*$.stat(P).pipe(G.catch(()=>G.succeed(void 0)));if(!L)return{type:"text",content:""};let R=$$.mimeType(P);let N=D?!1:z4(R);if(N&&!F4(R))return{type:"binary",content:"",mimeType:R};if(N){if(Number(L.size)>TK)return{type:"binary",content:"",mimeType:R};let u=yield*$.readFile(P).pipe(G.catch(()=>G.succeed(new Uint8Array)));return{type:"text",content:Buffer.from(u).toString("base64"),mimeType:R,encoding:"base64"}}let x=yield*$.readFileString(P).pipe(G.map((u)=>u.trim()),G.catch(()=>G.succeed("")));if(C.project.vcs==="git"){let u=yield*W(["-c","core.fsmonitor=false","diff","--",M]);if(!u.trim())u=yield*W(["-c","core.fsmonitor=false","diff","--staged","--",M]);if(u.trim()){let r=yield*Z.show(C.directory,"HEAD",M),S=xK(M,M,r,x,"old","new",{context:1/0,ignoreWhitespace:!0});return{type:"text",content:x,patch:S,diff:bK(S)}}return{type:"text",content:x}}return{type:"text",content:x}}catch(v){var m=v,A=1}finally{R9(b,m,A)}}),U=G.fn("File.list")(function*(M){let I=yield*i.context,C=[".git",".DS_Store"],P=(N)=>!1;if(I.project.vcs==="git"){let N=hK.default(),x=E0.join(I.worktree,".gitignore"),b=yield*$.readFileString(x).pipe(G.catch(()=>G.succeed("")));if(b)N.add(b);let v=E0.join(I.worktree,".ignore"),m=yield*$.readFileString(v).pipe(G.catch(()=>G.succeed("")));if(m)N.add(m);P=N.ignores.bind(N)}let D=M?E0.join(I.directory,M):I.directory;_(D,I);let L=yield*$.readDirectoryEntries(D).pipe(G.orElseSucceed(()=>[])),R=[];for(let N of L){if(C.includes(N.name))continue;let x=E0.join(D,N.name),b=E0.relative(I.directory,x),v=N.type==="directory"?"directory":"file";R.push({name:N.name,path:b,absolute:x,type:v,ignored:P(v==="directory"?b+"/":b)})}return R.sort((N,x)=>{if(N.type!==x.type)return N.type==="directory"?-1:1;return N.name.localeCompare(x.name)})}),z=G.fn("File.search")(function*(M){yield*X();let{cache:I}=yield*i.get(K),C=M.query.trim(),P=M.limit??100,D=M.type??(M.dirs===!1?"file":"all");K8.info("search",{query:C,kind:D});let L=C.startsWith(".")||C.includes("/.");if(!C){if(D==="file")return I.files.slice(0,P);return EK(I.dirs.toSorted(),L).slice(0,P)}let R=D==="file"?I.files:D==="directory"?I.dirs:[...I.files,...I.dirs],N=D==="directory"&&!L?P*20:P,x=vK.default.go(C,R,{limit:N}).map((v)=>v.target),b=D==="directory"?EK(x,L).slice(0,P):x;return K8.info("search",{query:C,kind:D,results:b.length}),b});return K8.info("init"),A9.of({init:j,status:H,read:q,list:U,search:z})})),M4=gK.pipe(f.provide(h0.defaultLayer),f.provide($$.defaultLayer),f.provide(HJ.defaultLayer));var k2={};o$(k2,{layer:()=>$V,hasNativeBinding:()=>Gq,defaultLayer:()=>Xq,Service:()=>v9,FileWatcher:()=>k2,Event:()=>b9});var N2=d0("path"),eO=lQ(),$q=nQ();function E9($,J={}){let{ignore:Z,...Y}=J;if(Array.isArray(Z)){J={...Y};for(let K of Z)if($q(K)){if(!J.ignoreGlobs)J.ignoreGlobs=[];let Q=eO.makeRe(K,{dot:!0,lookbehinds:!1});J.ignoreGlobs.push(Q.source)}else{if(!J.ignorePaths)J.ignorePaths=[];J.ignorePaths.push(N2.resolve($,K))}}return J}var j7=($)=>{return{writeSnapshot(J,Z,Y){return $.writeSnapshot(N2.resolve(J),N2.resolve(Z),E9(J,Y))},getEventsSince(J,Z,Y){return $.getEventsSince(N2.resolve(J),N2.resolve(Z),E9(J,Y))},async subscribe(J,Z,Y){return J=N2.resolve(J),Y=E9(J,Y),await $.subscribe(J,Z,Y),{unsubscribe(){return $.unsubscribe(J,Z,Y)}}},unsubscribe(J,Z,Y){return $.unsubscribe(N2.resolve(J),Z,E9(J,Y))}}};import{readdir as Yq}from"fs/promises";import x9 from"path";var U8={};o$(U8,{match:()=>Zq,PATTERNS:()=>Jq,FileIgnore:()=>U8});var aQ=new Set(["node_modules","bower_components",".pnpm-store","vendor",".npm","dist","build","out",".next","target","bin","obj",".git",".svn",".hg",".vscode",".idea",".turbo",".output","desktop",".sst",".cache",".webkit-cache","__pycache__",".pytest_cache","mypy_cache",".history",".gradle"]),tQ=["**/*.swp","**/*.swo","**/*.pyc","**/.DS_Store","**/Thumbs.db","**/logs/**","**/tmp/**","**/temp/**","**/*.log","**/coverage/**","**/.nyc_output/**"],Jq=[...tQ,...aQ];function Zq($,J){for(let K of J?.whitelist||[])if(y2.match(K,$))return!1;let Z=$.split(/[/\\]/);for(let K=0;K<Z.length;K++)if(aQ.has(Z[K]))return!0;let Y=J?.extra||[];for(let K of[...tQ,...Y])if(y2.match(K,$))return!0;return!1}var qJ=O$.create({service:"file.watcher"}),Kq=1e4,b9={Updated:Z0.define("file.watcher.updated",F.object({file:F.string(),event:F.union([F.literal("add"),F.literal("change"),F.literal("unlink")])}))},eQ=T2(()=>{try{let $=d0(`@parcel/watcher-${process.platform}-${process.arch}${process.platform==="linux"?"-bionic":""}`);return j7($)}catch($){qJ.error("failed to load watcher binding",{error:$});return}});function Qq(){if(process.platform==="win32")return"windows";if(process.platform==="darwin")return"fs-events";if(process.platform==="linux")return"inotify"}function Vq($){return S2.paths().filter((J)=>{let Z=x9.relative($,J);return Z!==""&&Z!==".."&&!Z.startsWith(`..${x9.sep}`)&&!x9.isAbsolute(Z)})}var Gq=()=>!!eQ();class v9 extends D$.Service()("@qitqode/FileWatcher"){}var $V=f.effect(v9,G.gen(function*(){let $=yield*R$.Service,J=yield*HJ.Service,Z=yield*i.make(G.fn("FileWatcher.state")(function*(){if(yield*k$.QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER)return;qJ.info("init",{directory:B$.directory});let Y=Qq();if(!Y){qJ.error("watcher backend not supported",{directory:B$.directory,platform:process.platform});return}let K=eQ();if(!K)return;qJ.info("watcher backend",{directory:B$.directory,platform:process.platform,backend:Y});let Q=[];yield*G.addFinalizer(()=>G.promise(()=>Promise.allSettled(Q.map((j)=>j.unsubscribe()))));let V=B$.bind((j,H)=>{if(j)return;for(let q of H){if(q.type==="create")P$.publish(b9.Updated,{file:q.path,event:"add"});if(q.type==="update")P$.publish(b9.Updated,{file:q.path,event:"change"});if(q.type==="delete")P$.publish(b9.Updated,{file:q.path,event:"unlink"})}}),X=(j,H)=>{let q=K.subscribe(j,V,{ignore:H,backend:Y});return G.gen(function*(){let U=yield*G.promise(()=>q);Q.push(U)}).pipe(G.timeout(Kq),G.catchCause((U)=>{return qJ.error("failed to subscribe",{dir:j,cause:u0.pretty(U)}),q.then((z)=>z.unsubscribe()).catch(()=>{}),G.void}))},_=(yield*$.get()).watcher?.ignore??[];if(yield*k$.QITQODE_EXPERIMENTAL_FILEWATCHER)yield*X(B$.directory,[...U8.PATTERNS,..._,...Vq(B$.directory)]);if(B$.project.vcs==="git"){let j=yield*J.run(["rev-parse","--git-dir"],{cwd:B$.project.worktree}),H=j.exitCode===0?x9.resolve(B$.project.worktree,j.text().trim()):void 0;if(H&&!_.includes(".git")&&!_.includes(H)){let q=(yield*G.promise(()=>Yq(H).catch(()=>[]))).filter((U)=>U!=="HEAD");yield*X(H,q)}}},G.catchCause((Y)=>{return qJ.error("failed to init watcher service",{cause:u0.pretty(Y)}),G.void})));return v9.of({init:G.fn("FileWatcher.init")(function*(){yield*i.get(Z)})})})),Xq=$V.pipe(f.provide(R$.defaultLayer),f.provide(HJ.defaultLayer));var FJ={};o$(FJ,{layer:()=>QV,defaultLayer:()=>Uq,Service:()=>h9,Discovery:()=>FJ});var Wq=4,jq=8;class YV extends F$.Class("IndexSkill")({name:F$.String,files:F$.Array(F$.String)}){}class KV extends F$.Class("Index")({skills:F$.Array(YV)}){}class h9 extends D$.Service()("@qitqode/SkillDiscovery"){}var QV=f.effect(h9,G.gen(function*(){let $=O$.create({service:"skill-discovery"}),J=yield*$$.Service,Z=yield*JV.Path,Y=v1.filterStatusOk(f9(yield*v1.HttpClient)),K=Z.join(f$.Path.cache,"skills"),Q=G.fn("Discovery.download")(function*(X,W){if(yield*J.exists(W).pipe(G.orDie))return!0;return yield*G2.get(X).pipe(Y.execute,G.flatMap((_)=>_.arrayBuffer),G.flatMap((_)=>J.writeWithDirs(W,new Uint8Array(_))),G.as(!0),G.catch((_)=>G.sync(()=>{return $.error("failed to download",{url:X,err:_}),!1})))}),V=G.fn("Discovery.pull")(function*(X){let W=X.endsWith("/")?X:`${X}/`,_=new URL("index.json",W).href,j=W.slice(0,-1);$.info("fetching index",{url:_});let H=yield*G2.get(_).pipe(G2.acceptJson,Y.execute,G.flatMap(ZV.schemaBodyJson(KV)),G.catch((z)=>G.sync(()=>{return $.error("failed to fetch index",{url:_,err:z}),null})));if(!H)return[];let q=H.skills.filter((z)=>{if(!z.files.includes("SKILL.md"))return $.warn("skill entry missing SKILL.md",{url:_,skill:z.name}),!1;return!0});return(yield*G.forEach(q,(z)=>G.gen(function*(){let M=Z.join(K,z.name);yield*G.forEach(z.files,(C)=>Q(new URL(C,`${j}/${z.name}/`).href,Z.join(M,C)),{concurrency:jq});let I=Z.join(M,"SKILL.md");return(yield*J.exists(I).pipe(G.orDie))?M:null}),{concurrency:Wq})).filter((z)=>z!==null)});return h9.of({pull:V})})),Uq=QV.pipe(f.provide(X2.layer),f.provide($$.defaultLayer),f.provide(g9.layer));var a0={};o$(a0,{layer:()=>FV,fmt:()=>kq,defaultLayer:()=>Tq,Skill:()=>a0,Service:()=>l9,NameMismatchError:()=>Rq,InvalidError:()=>wq,Info:()=>qV});import Pq from"os";import zJ from"path";import{pathToFileURL as Iq}from"url";import d9 from"path";import{pathToFileURL as _q}from"url";var H7=S9(Hq(),1);import Bq from"path";import U7 from"fs";import B7 from"path";function VV($,J,Z){let Y=J?B7.join($,J):$;for(let K of U7.readdirSync(Y,{withFileTypes:!0})){let Q=J?`${J}/${K.name}`:K.name;if(K.isDirectory())VV($,Q,Z);else Z[Q]=U7.readFileSync(B7.join(Y,K.name),"utf8")}}function m9($){let J={};for(let Z of U7.readdirSync($,{withFileTypes:!0})){if(!Z.isDirectory())continue;let Y={};if(VV(B7.join($,Z.name),"",Y),Object.keys(Y).length>0)J[Z.name]=Y}return J}function GV(){return m9(Bq.resolve(import.meta.dir,".bundle"))}import XV from"path";function u9($){return G.gen(function*(){if($.skipIfPresent&&(yield*$.fsys.existsSafe($.marker)))return $.root;for(let[J,Z]of Object.entries($.bundle)){let Y=XV.join($.root,"skills",J);for(let[K,Q]of Object.entries(Z))yield*$.fsys.writeWithDirs(XV.join(Y,K),Q)}return yield*$.fsys.writeWithDirs($.marker,$.markerContent),$.onExtracted($.root),$.root})}function Oq(){try{return{ask:{"SKILL.md":`---
43
43
  name: compose:ask
44
44
  hidden: true
45
45
  description: "Use whenever you need a decision, clarification, or approval from the user \u2014 covers how to ask with the question tool, and how to resolve the decision yourself when no user is available (question tool absent, or a [Never-Ask] response)"
@@ -7204,7 +7204,7 @@ For full type signatures, all available fields, and more examples:
7204
7204
  - Cannot modify the permission system
7205
7205
  - Tool output truncated at 50KB / 2000 lines
7206
7206
  - Prefer small, composable extensions over monolithic ones
7207
- `}}}catch($){if($ instanceof ReferenceError)return BV();throw $}}var Mq=Cq(),Dq=O$.create({service:"skill.builtin"}),_V=G.fn("Skill.extractBuiltinBundle")(function*($){let J=HV.join(B8.data,"builtin_skills",E2),Z=HV.join(J,".extracted");return yield*u9({fsys:$,bundle:Mq,root:J,marker:Z,markerContent:E2,skipIfPresent:!p9,onExtracted:(Y)=>Dq.info("extracted builtin skills",{root:Y})})});var H8=O$.create({service:"skill"}),Aq=[".claude",".agents",".codex",".opencode"],OV="skills/**/SKILL.md",Sq="{skill,skills}/**/SKILL.md",c9="**/SKILL.md",qV=F.object({name:F.string(),description:F.string(),location:F.string(),content:F.string(),hidden:F.boolean().optional()}),wq=o9.create("SkillInvalidError",F.object({path:F.string(),message:F.string().optional(),issues:F.custom().optional()})),Rq=o9.create("SkillNameMismatchError",F.object({path:F.string(),expected:F.string(),actual:F.string()})),Lq=G.fnUntraced(function*($,J,Z){let Y=yield*G.tryPromise({try:()=>_7.parse(J),catch:(Q)=>Q}).pipe(G.catch(G.fnUntraced(function*(Q){let V=_7.FrontmatterError.isInstance(Q)?Q.data.message:`Failed to parse skill ${J}`,{Session:X}=yield*G.promise(()=>import("./chunk-0j6dhrew.js"));yield*Z.publish(X.Event.Error,{error:new o9.Unknown({message:V}).toObject()}),H8.error("failed to load skill",{skill:J,err:Q});return})));if(!Y)return;let K=qV.pick({name:!0,description:!0,hidden:!0}).safeParse(Y.data);if(!K.success)return;if($.skills[K.data.name])H8.warn("duplicate skill name",{name:K.data.name,existing:$.skills[K.data.name].location,duplicate:J});$.dirs.add(zJ.dirname(J)),$.skills[K.data.name]={name:K.data.name,description:K.data.description,location:J,content:Y.content,hidden:K.data.hidden}}),x2=G.fnUntraced(function*($,J,Z,Y){let K=yield*G.tryPromise({try:()=>y2.scan(Z,{cwd:J,absolute:!0,include:"file",symlink:!0,dot:Y?.dot}),catch:(Q)=>Q}).pipe(G.catch((Q)=>{if(!Y?.scope)return G.die(Q);return H8.error(`failed to scan ${Y.scope} skills`,{dir:J,error:Q}),G.succeed([])}));for(let Q of K)$.matches.add(Q),$.dirs.add(zJ.dirname(Q))}),Nq=G.fnUntraced(function*($,J,Z,Y,K){let Q={matches:new Set,dirs:new Set};if(!k$.QITQODE_DISABLE_BUILTIN_SKILLS){let W=yield*_V(Z).pipe(G.catch(()=>G.succeed(void 0)));if(W&&(yield*Z.isDir(W)))yield*x2(Q,W,c9,{scope:"builtin"})}if(!k$.QITQODE_DISABLE_COMPOSE_SKILLS){let W=yield*UV(Z).pipe(G.catch(()=>G.succeed(void 0)));if(W&&(yield*Z.isDir(W)))yield*x2(Q,W,c9,{scope:"compose"})}if(!k$.QITQODE_DISABLE_EXTERNAL_SKILLS){let W=Aq.filter((j)=>{if(j===".claude"&&k$.QITQODE_DISABLE_CLAUDE_CODE_SKILLS)return!1;if(j===".codex"&&k$.QITQODE_DISABLE_CODEX_SKILLS)return!1;if(j===".opencode"&&k$.QITQODE_DISABLE_OPENCODE_SKILLS)return!1;return!0});for(let j of W){let H=zJ.join(f$.Path.home,j);if(!(yield*Z.isDir(H)))continue;yield*x2(Q,H,OV,{dot:!0,scope:"global"})}let _=yield*Z.up({targets:W,start:Y,stop:K}).pipe(G.catch(()=>G.succeed([])));for(let j of _)yield*x2(Q,j,OV,{dot:!0,scope:"project"})}let V=yield*$.directories();for(let W of V)yield*x2(Q,W,Sq);let X=yield*$.get();for(let W of X.skills?.paths??[]){let _=W.startsWith("~/")?zJ.join(Pq.homedir(),W.slice(2)):W,j=zJ.isAbsolute(_)?_:zJ.join(Y,_);if(!(yield*Z.isDir(j))){H8.warn("skill path not found",{path:j});continue}yield*x2(Q,j,c9)}for(let W of X.skills?.urls??[]){let _=yield*J.pull(W);for(let j of _)yield*x2(Q,j,c9)}return{matches:Array.from(Q.matches),dirs:Array.from(Q.dirs)}}),yq=G.fnUntraced(function*($,J,Z){yield*G.forEach(J.matches,(Y)=>Lq($,Y,Z),{concurrency:16,discard:!0}),H8.info("init",{count:Object.keys($.skills).length})});class l9 extends D$.Service()("@qitqode/Skill"){}var FV=f.effect(l9,G.gen(function*(){let $=yield*FJ.Service,J=yield*R$.Service,Z=yield*P$.Service,Y=yield*$$.Service,K=yield*i.make(G.fn("Skill.discovery")(function*(H){return yield*Nq(J,$,Y,H.directory,H.worktree)})),Q=yield*i.make(G.fn("Skill.state")(function*(H){let q={skills:{},dirs:new Set};return yield*yq(q,yield*i.get(K),Z),q})),V=G.fn("Skill.get")(function*(H){return(yield*i.get(Q)).skills[H]}),X=G.fn("Skill.all")(function*(){let H=yield*i.get(Q);return Object.values(H.skills)}),W=G.fn("Skill.dirs")(function*(){return(yield*i.get(K)).dirs}),_=G.fn("Skill.available")(function*(H){let q=yield*i.get(Q),U=Object.values(q.skills).filter((z)=>!z.hidden);if(U=U.toSorted((z,M)=>z.name.localeCompare(M.name)),!H)return U;return U.filter((z)=>E$.evaluate("skill",z.name,H.permission).action!=="deny")}),j=G.fn("Skill.reload")(function*(){yield*i.invalidate(K),yield*i.invalidate(Q)});return l9.of({get:V,all:X,dirs:W,available:_,reload:j})})),Tq=FV.pipe(f.provide(FJ.defaultLayer),f.provide(R$.defaultLayer),f.provide(P$.layer),f.provide($$.defaultLayer));function kq($,J){if($.length===0)return"No skills are currently available.";if(J.verbose)return["<available_skills>",...$.sort((Z,Y)=>Z.name.localeCompare(Y.name)).flatMap((Z)=>[" <skill>",` <name>${Z.name}</name>`,` <description>${Z.description}</description>`,` <location>${Iq(Z.location).href}</location>`," </skill>"]),"</available_skills>"].join(`
7207
+ `}}}catch($){if($ instanceof ReferenceError)return BV();throw $}}var Mq=Cq(),Dq=O$.create({service:"skill.builtin"}),_V=G.fn("Skill.extractBuiltinBundle")(function*($){let J=HV.join(B8.data,"builtin_skills",E2),Z=HV.join(J,".extracted");return yield*u9({fsys:$,bundle:Mq,root:J,marker:Z,markerContent:E2,skipIfPresent:!p9,onExtracted:(Y)=>Dq.info("extracted builtin skills",{root:Y})})});var H8=O$.create({service:"skill"}),Aq=[".claude",".agents",".codex",".opencode"],OV="skills/**/SKILL.md",Sq="{skill,skills}/**/SKILL.md",c9="**/SKILL.md",qV=F.object({name:F.string(),description:F.string(),location:F.string(),content:F.string(),hidden:F.boolean().optional()}),wq=o9.create("SkillInvalidError",F.object({path:F.string(),message:F.string().optional(),issues:F.custom().optional()})),Rq=o9.create("SkillNameMismatchError",F.object({path:F.string(),expected:F.string(),actual:F.string()})),Lq=G.fnUntraced(function*($,J,Z){let Y=yield*G.tryPromise({try:()=>_7.parse(J),catch:(Q)=>Q}).pipe(G.catch(G.fnUntraced(function*(Q){let V=_7.FrontmatterError.isInstance(Q)?Q.data.message:`Failed to parse skill ${J}`,{Session:X}=yield*G.promise(()=>import("./chunk-hd8q4msp.js"));yield*Z.publish(X.Event.Error,{error:new o9.Unknown({message:V}).toObject()}),H8.error("failed to load skill",{skill:J,err:Q});return})));if(!Y)return;let K=qV.pick({name:!0,description:!0,hidden:!0}).safeParse(Y.data);if(!K.success)return;if($.skills[K.data.name])H8.warn("duplicate skill name",{name:K.data.name,existing:$.skills[K.data.name].location,duplicate:J});$.dirs.add(zJ.dirname(J)),$.skills[K.data.name]={name:K.data.name,description:K.data.description,location:J,content:Y.content,hidden:K.data.hidden}}),x2=G.fnUntraced(function*($,J,Z,Y){let K=yield*G.tryPromise({try:()=>y2.scan(Z,{cwd:J,absolute:!0,include:"file",symlink:!0,dot:Y?.dot}),catch:(Q)=>Q}).pipe(G.catch((Q)=>{if(!Y?.scope)return G.die(Q);return H8.error(`failed to scan ${Y.scope} skills`,{dir:J,error:Q}),G.succeed([])}));for(let Q of K)$.matches.add(Q),$.dirs.add(zJ.dirname(Q))}),Nq=G.fnUntraced(function*($,J,Z,Y,K){let Q={matches:new Set,dirs:new Set};if(!k$.QITQODE_DISABLE_BUILTIN_SKILLS){let W=yield*_V(Z).pipe(G.catch(()=>G.succeed(void 0)));if(W&&(yield*Z.isDir(W)))yield*x2(Q,W,c9,{scope:"builtin"})}if(!k$.QITQODE_DISABLE_COMPOSE_SKILLS){let W=yield*UV(Z).pipe(G.catch(()=>G.succeed(void 0)));if(W&&(yield*Z.isDir(W)))yield*x2(Q,W,c9,{scope:"compose"})}if(!k$.QITQODE_DISABLE_EXTERNAL_SKILLS){let W=Aq.filter((j)=>{if(j===".claude"&&k$.QITQODE_DISABLE_CLAUDE_CODE_SKILLS)return!1;if(j===".codex"&&k$.QITQODE_DISABLE_CODEX_SKILLS)return!1;if(j===".opencode"&&k$.QITQODE_DISABLE_OPENCODE_SKILLS)return!1;return!0});for(let j of W){let H=zJ.join(f$.Path.home,j);if(!(yield*Z.isDir(H)))continue;yield*x2(Q,H,OV,{dot:!0,scope:"global"})}let _=yield*Z.up({targets:W,start:Y,stop:K}).pipe(G.catch(()=>G.succeed([])));for(let j of _)yield*x2(Q,j,OV,{dot:!0,scope:"project"})}let V=yield*$.directories();for(let W of V)yield*x2(Q,W,Sq);let X=yield*$.get();for(let W of X.skills?.paths??[]){let _=W.startsWith("~/")?zJ.join(Pq.homedir(),W.slice(2)):W,j=zJ.isAbsolute(_)?_:zJ.join(Y,_);if(!(yield*Z.isDir(j))){H8.warn("skill path not found",{path:j});continue}yield*x2(Q,j,c9)}for(let W of X.skills?.urls??[]){let _=yield*J.pull(W);for(let j of _)yield*x2(Q,j,c9)}return{matches:Array.from(Q.matches),dirs:Array.from(Q.dirs)}}),yq=G.fnUntraced(function*($,J,Z){yield*G.forEach(J.matches,(Y)=>Lq($,Y,Z),{concurrency:16,discard:!0}),H8.info("init",{count:Object.keys($.skills).length})});class l9 extends D$.Service()("@qitqode/Skill"){}var FV=f.effect(l9,G.gen(function*(){let $=yield*FJ.Service,J=yield*R$.Service,Z=yield*P$.Service,Y=yield*$$.Service,K=yield*i.make(G.fn("Skill.discovery")(function*(H){return yield*Nq(J,$,Y,H.directory,H.worktree)})),Q=yield*i.make(G.fn("Skill.state")(function*(H){let q={skills:{},dirs:new Set};return yield*yq(q,yield*i.get(K),Z),q})),V=G.fn("Skill.get")(function*(H){return(yield*i.get(Q)).skills[H]}),X=G.fn("Skill.all")(function*(){let H=yield*i.get(Q);return Object.values(H.skills)}),W=G.fn("Skill.dirs")(function*(){return(yield*i.get(K)).dirs}),_=G.fn("Skill.available")(function*(H){let q=yield*i.get(Q),U=Object.values(q.skills).filter((z)=>!z.hidden);if(U=U.toSorted((z,M)=>z.name.localeCompare(M.name)),!H)return U;return U.filter((z)=>E$.evaluate("skill",z.name,H.permission).action!=="deny")}),j=G.fn("Skill.reload")(function*(){yield*i.invalidate(K),yield*i.invalidate(Q)});return l9.of({get:V,all:X,dirs:W,available:_,reload:j})})),Tq=FV.pipe(f.provide(FJ.defaultLayer),f.provide(R$.defaultLayer),f.provide(P$.layer),f.provide($$.defaultLayer));function kq($,J){if($.length===0)return"No skills are currently available.";if(J.verbose)return["<available_skills>",...$.sort((Z,Y)=>Z.name.localeCompare(Y.name)).flatMap((Z)=>[" <skill>",` <name>${Z.name}</name>`,` <description>${Z.description}</description>`,` <location>${Iq(Z.location).href}</location>`," </skill>"]),"</available_skills>"].join(`
7208
7208
  `);return["## Available Skills",...$.toSorted((Z,Y)=>Z.name.localeCompare(Y.name)).map((Z)=>`- **${Z.name}**: ${Z.description}`)].join(`
7209
7209
  `)}var g1={};o$(g1,{layer:()=>RV,defaultLayer:()=>pq,Service:()=>n9});import wV from"path";import dq from"os";import*as CJ from"fs/promises";import IV from"path";var q0=b2("memory_fts",{id:t0().primaryKey({autoIncrement:!0}),path:i$().notNull().unique(),scope:i$().notNull(),scope_id:i$().notNull().default(""),type:i$().notNull(),body:i$().notNull(),fingerprint:i$().notNull(),last_indexed_at:t0().notNull()},($)=>[e0("memory_fts_scope_idx").on($.scope,$.scope_id),e0("memory_fts_type_idx").on($.type)]);var Eq=["feedback","project","reference","user"],xq=[{match:/^memory$/i,type:"memory"},{match:/^memory-/i,type:"memory"},{match:/^checkpoint$/,type:"checkpoint"},{match:/^checkpoint-/,type:"checkpoint"},{match:/^tasks\/[^/]+\/progress$/,type:"progress"},{match:/^tasks\/[^/]+\/notes$/,type:"notes"}];function bq($){for(let J of xq)if(J.match.test($))return J.type;return"free"}function zV($){let Z=$.replaceAll("\\","/").match(/\/memory\/(global|projects|sessions)(?:\/([^/]+))?\/(.+)\.md$/);if(!Z)return null;let[,Y,K,Q]=Z,V=Y==="global"?"":K??"",X=Q;return{scope:Y,scope_id:V,type:bq(X),key:X}}var vq=/\/\.claude\/projects\/([^/]+)\/memory\/(.+)\.md$/;function CV($){let J=$.replaceAll("\\","/").match(vq);if(!J)return null;let[,Z,Y]=J;return{scope:"cc",scope_id:Z,type:"free",key:Y}}var hq=/^---\n([\s\S]*?)\n---\n/,gq=/^[ \t]+type:[ \t]*(\w+)[ \t]*$/m;function MV($){let J=$.match(hq);if(!J)return null;let Y=J[1].match(gq);if(!Y)return null;let K=Y[1];return Eq.includes(K)?K:null}var DV=O$.create({service:"memory.reconcile"});async function AV($){let J=[];async function Z(Y){let K=await CJ.readdir(Y,{withFileTypes:!0}).catch((Q)=>{if(Q.code==="ENOENT")return[];throw Q});for(let Q of K){let V=IV.join(Y,Q.name);if(Q.isDirectory())await Z(V);else if(Q.isFile()&&V.endsWith(".md"))J.push(V)}}return await Z($),J}async function fq($){let J=await CJ.readdir($,{withFileTypes:!0}).catch((Y)=>{if(Y.code==="ENOENT")return[];throw Y}),Z=[];for(let Y of J){if(!Y.isDirectory())continue;let K=IV.join($,Y.name,"memory");if(!await CJ.stat(K).then(()=>!0).catch(()=>!1))continue;let V=await AV(K);for(let X of V)Z.push(X)}return Z}async function PV($,J,Z,Y){let K=await CJ.stat($).catch((W)=>{if(W.code==="ENOENT")return null;throw W});if(!K)return"skipped";let Q=`${K.size}-${K.mtimeMs}`;if(Y===Q)return"hit";let V=await Bun.file($).text(),X=Z==="cc"?MV(V)??"free":J.type;return z$.use((W)=>W.insert(q0).values({path:$,scope:J.scope,scope_id:J.scope_id,type:X,body:V,fingerprint:Q,last_indexed_at:Date.now()}).onConflictDoUpdate({target:q0.path,set:{scope:J.scope,scope_id:J.scope_id,type:X,body:V,fingerprint:Q,last_indexed_at:Date.now()}}).run()),"updated"}async function O7($){let J=new Set(await AV($.qode)),Z=$.cc?new Set(await fq($.cc)):new Set,Y=new Set([...J,...Z]),K=new Map(z$.use((X)=>X.select({path:q0.path,fingerprint:q0.fingerprint}).from(q0).all()).map((X)=>[X.path,X.fingerprint])),Q=0;for(let X of K.keys())if(!Y.has(X))z$.use((W)=>W.delete(q0).where(G$(q0.path,X)).run()),Q++;let V=0;for(let X of J){let W=zV(X);if(!W){DV.warn("path outside memory layout, skipping",{path:X});continue}if(await PV(X,W,"qode",K.get(X))==="updated")V++}for(let X of Z){let W=CV(X);if(!W){DV.warn("CC path failed to parse, skipping",{path:X});continue}if(await PV(X,W,"cc",K.get(X))==="updated")V++}return{indexed:V,pruned:Q}}function r9($,J){let Z=$.match(/[\p{L}\p{N}_]+/gu)?.map((K)=>K.trim()).filter(Boolean)??[];if(Z.length===0)return null;return Z.map((K)=>`"${K.replaceAll('"',"")}"`).join(` ${J} `)}function SV($){return r9($,"OR")}var mq=64,uq=8,i9=4096;function s9($){let J=z$.Client().$client,Z=$.conditions.length>0?`WHERE ${$.conditions.join(" AND ")}`:"",Y=`
7210
7210
  WITH matched(fts_rowid, fts_score) AS (
@@ -7233,7 +7233,7 @@ For full type signatures, all available fields, and more examples:
7233
7233
  FROM ${$.idx}
7234
7234
  WHERE ${$.idx} MATCH ?
7235
7235
  AND rowid IN (${W.map(()=>"?").join(",")})
7236
- `,j=new Map;for(let H of J.query(_).all($.ftsQuery,...W))j.set(H.fts_rowid,H.snippet);return{rows:Q.map(({fts_rowid:H,...q})=>({...q,snippet:j.get(H)??"",score:-q.score})),capped:X}}class n9 extends D$.Service()("@qitqode/Memory"){}var RV=f.effect(n9,G.gen(function*(){let $=yield*R$.Service,J=wV.join(f$.Path.data,"memory"),Z=wV.join(dq.homedir(),".claude","projects"),Y=G.fn("Memory.root")(function*(){return J}),K=G.fn("Memory.reconcile")(function*(){let X=(yield*$.get()).memory?.cc_index?Z:void 0;return yield*G.promise(()=>O7({qode:J,cc:X}))}),Q=G.fn("Memory.search")(function*(V){let X=yield*$.get();if(X.checkpoint?.memory_reconcile_on_search??!0){let D=X.memory?.cc_index?Z:void 0;yield*G.promise(()=>O7({qode:J,cc:D}))}let W=V.limit??10,_=SV(V.query);if(!_)return{results:[],incomplete:!1};let j=X.checkpoint?.memory_search_score_floor??0.15,H=[],q=[];if(V.scope)H.push("memory_fts.scope = ?"),q.push(V.scope);if(V.scope_id)H.push("memory_fts.scope_id = ?"),q.push(V.scope_id);if(V.type)H.push("memory_fts.type = ?"),q.push(V.type);let U=Math.min(W*3,50),z=s9({select:"memory_fts.path, memory_fts.scope, memory_fts.scope_id, memory_fts.type",idx:"memory_fts_idx",contentTable:"memory_fts",contentRowid:"memory_fts.id",conditions:H,params:q,ftsQuery:_,limit:U}),M=z.rows.map((D)=>({path:D.path,snippet:D.snippet,score:D.score,scope:D.scope,scope_id:D.scope_id,type:D.type})),I=z.capped&&M.length<W;if(M.length===0)return{results:[],incomplete:I};let C=M[0].score,P=j>0?C*j:-1/0;return{results:M.filter((D,L)=>L===0||D.score>=P).slice(0,W),incomplete:I}});return n9.of({root:Y,reconcile:K,search:Q})})),pq=f.suspend(()=>RV.pipe(f.provide(R$.defaultLayer)));var MJ={};o$(MJ,{layer:()=>TV,defaultLayer:()=>aq,Service:()=>ZZ});function LV($){return r9($,"AND")}var W2=b2("history_fts",{part_id:i$().primaryKey(),session_id:i$().notNull(),message_id:i$().notNull(),project_id:i$().notNull(),kind:i$().notNull(),tool_name:i$(),body:i$().notNull(),time_created:t0().notNull()},($)=>[e0("history_fts_session_idx").on($.session_id,$.time_created),e0("history_fts_project_idx").on($.project_id,$.time_created),e0("history_fts_message_idx").on($.message_id)]);var _8=["user_text","assistant_text","tool_input","tool_error"];function a9($,J,Z){switch($.type){case"text":{let Y=J==="user"?"user_text":"assistant_text";if(!Z.has(Y))return null;if(!$.text)return null;return{kind:Y,body:$.text,tool_name:null}}case"reasoning":{if(!Z.has("reasoning"))return null;if(!$.text)return null;return{kind:"reasoning",body:$.text,tool_name:null}}case"tool":{let Y=$.state;if(Y.status==="pending"||Y.status==="running")return null;if(Y.status==="error"&&Z.has("tool_error"))return{kind:"tool_error",body:`${$.tool} ${JSON.stringify(Y.input??{})} ${Y.error??""}`,tool_name:$.tool};if(Y.status==="completed"&&Z.has("tool_output"))return{kind:"tool_output",body:`${$.tool} ${JSON.stringify(Y.input??{})} ${JSON.stringify(Y.output??"")}`,tool_name:$.tool};if(Z.has("tool_input"))return{kind:"tool_input",body:`${$.tool} ${JSON.stringify(Y.input??{})}`,tool_name:$.tool};return null}default:return null}}class q7{max;map=new Map;constructor($){this.max=$}get($){let J=this.map.get($);if(J===void 0)return;return this.map.delete($),this.map.set($,J),J}set($,J){if(this.map.has($))this.map.delete($);if(this.map.set($,J),this.map.size>this.max){let Z=this.map.keys().next().value;if(Z!==void 0)this.map.delete(Z)}}}function t9(){let $=new q7(1024),J=new q7(512);return{role:(Z)=>G.sync(()=>{let Y=$.get(Z);if(Y)return Y;let Q=z$.use((V)=>V.select({data:e$.data}).from(e$).where(G$(e$.id,Z)).get())?.data?.role==="user"?"user":"assistant";return $.set(Z,Q),Q}),projectID:(Z)=>G.sync(()=>{let Y=J.get(Z);if(Y)return Y;let Q=z$.use((V)=>V.select({project_id:V0.project_id}).from(V0).where(G$(V0.id,Z)).get())?.project_id??"";return J.set(Z,Q),Q})}}var cq=O$.create({service:"history.writer"});class e9 extends D$.Service()("@qitqode/History.Writer"){}var NV=f.effect(e9,G.gen(function*(){let $=yield*R$.Service,J=yield*P$.Service,Z=yield*i.make(G.fn("History.Writer.state")(function*(Y){let Q=(yield*$.get()).history?.kinds??_8,V=new Set(Q);if(V.size===0)return{started:!0};let X=yield*b1.unbounded(),W=t9();return yield*J.subscribeCallback(E0.Event.PartUpdated,(_)=>{b1.offerUnsafe(X,{type:"upsert",part:_.properties.part,time:_.properties.time})}),yield*J.subscribeCallback(E0.Event.PartRemoved,(_)=>{b1.offerUnsafe(X,{type:"delete",partID:_.properties.partID})}),yield*G.forever(G.gen(function*(){let _=yield*b1.take(X);yield*lq(_,W,V).pipe(G.catchCause((j)=>G.sync(()=>cq.warn("write failed",{cause:String(j)}))))})).pipe(G.forkScoped),{started:!0}}));return e9.of({init:G.fn("History.Writer.init")(function*(){yield*i.get(Z)})})}));function lq($,J,Z){if($.type==="delete")return G.sync(()=>z$.use((Y)=>Y.delete(W2).where(G$(W2.part_id,$.partID)).run()));return G.gen(function*(){let Y=$.part,K=yield*J.role(Y.messageID),Q=a9(Y,K,Z);if(!Q)return;let V=yield*J.projectID(Y.sessionID);z$.use((X)=>X.insert(W2).values({part_id:Y.id,session_id:Y.sessionID,message_id:Y.messageID,project_id:V,kind:Q.kind,tool_name:Q.tool_name,body:Q.body,time_created:$.time}).onConflictDoUpdate({target:W2.part_id,set:{kind:Q.kind,tool_name:Q.tool_name,body:Q.body,time_created:$.time}}).run())})}var F7=O$.create({service:"history.backfill"}),oq=500;function rq($=new Set(_8)){return G.gen(function*(){if($.size===0)return;let J=t9(),Z=z$.use((Y)=>Y.select({id:V0.id,project_id:V0.project_id}).from(V0).orderBy(O8(V0.time_updated)).all());for(let Y of Z)yield*iq(Y,J,$).pipe(G.catchCause((K)=>G.sync(()=>F7.warn("session scan failed",{session:Y.id,cause:String(K)})))),yield*G.sleep("50 millis");F7.info("backfill complete",{sessions:Z.length})})}function iq($,J,Z){return G.gen(function*(){let Y="";while(!0){let K=z$.use((Q)=>Q.select().from($1).where(_0(G$($1.session_id,$.id),JZ($1.id,Y),f1`NOT EXISTS (SELECT 1 FROM history_fts WHERE history_fts.part_id = ${$1.id})`)).orderBy(m1($1.id)).limit(oq).all());if(K.length===0)return;yield*sq(K,$.project_id,J,Z),Y=K[K.length-1].id,yield*G.sleep("10 millis")}})}function sq($,J,Z,Y){return G.gen(function*(){let K=[];for(let Q of $){let V=yield*Z.role(Q.message_id),X={id:Q.id,sessionID:Q.session_id,messageID:Q.message_id,...Q.data},W=a9(X,V,Y);if(!W)continue;K.push({part:Q,kind:W.kind,body:W.body,tool_name:W.tool_name,time:Q.time_created})}if(K.length===0)return;z$.transaction((Q)=>{for(let V of K)Q.insert(W2).values({part_id:V.part.id,session_id:V.part.session_id,message_id:V.part.message_id,project_id:J,kind:V.kind,tool_name:V.tool_name,body:V.body,time_created:V.time}).onConflictDoUpdate({target:W2.part_id,set:{kind:V.kind,tool_name:V.tool_name,body:V.body,time_created:V.time}}).run()})})}class $Z extends D$.Service()("@qitqode/History.Backfill"){}var yV=f.effect($Z,G.gen(function*(){let $=yield*R$.Service;return $Z.of({init:G.fn("History.Backfill.init")(function*(){let Z=(yield*$.get()).history?.kinds??_8,Y=new Set(Z);yield*rq(Y).pipe(G.catchCause((K)=>G.sync(()=>F7.warn("backfill aborted",{cause:String(K)}))),G.forkDetach)})})}));class ZZ extends D$.Service()("@qitqode/History"){}var nq=50,aq=f.suspend(()=>f.mergeAll(TV,NV,yV).pipe(f.provide(R$.defaultLayer),f.provide(P$.defaultLayer))),TV=f.effect(ZZ,G.gen(function*(){let $=G.fn("History.search")(function*(Z){let Y=LV(Z.query);if(!Y)return{hits:[],incomplete:!1};let K=Math.min(Z.limit??10,nq),Q=[],V=[];if((Z.scope??"project")==="project")Q.push("history_fts.project_id = ?"),V.push(B$.project.id);if(Z.session_id)Q.push("history_fts.session_id = ?"),V.push(Z.session_id);if(Z.kind){let _=Array.isArray(Z.kind)?Z.kind:[Z.kind];Q.push(`history_fts.kind IN (${_.map(()=>"?").join(",")})`);for(let j of _)V.push(j)}if(Z.tool_name)Q.push("history_fts.tool_name = ?"),V.push(Z.tool_name);if(Z.time_after!==void 0)Q.push("history_fts.time_created >= ?"),V.push(Z.time_after);if(Z.time_before!==void 0)Q.push("history_fts.time_created <= ?"),V.push(Z.time_before);let W=s9({select:"history_fts.part_id, history_fts.session_id, history_fts.message_id, history_fts.project_id, history_fts.kind, history_fts.tool_name, history_fts.time_created",idx:"history_fts_idx",contentTable:"history_fts",contentRowid:"history_fts.rowid",conditions:Q,params:V,ftsQuery:Y,limit:K});return{hits:W.rows.map((_)=>({part_id:_.part_id,session_id:_.session_id,message_id:_.message_id,project_id:_.project_id,kind:_.kind,tool_name:_.tool_name,snippet:_.snippet,score:_.score,time_created:_.time_created})),incomplete:W.capped}}),J=G.fn("History.around")(function*(Z){let Y=Z.before??5,K=Z.after??5,Q=z$.use((q)=>q.select({id:e$.id,session_id:e$.session_id,time_created:e$.time_created}).from(e$).where(G$(e$.id,Z.message_id)).get());if(!Q)return{session_id:"",messages:[]};let V=z$.use((q)=>q.select().from(e$).where(_0(G$(e$.session_id,Q.session_id),f1`(${e$.time_created} < ${Q.time_created} OR (${e$.time_created} = ${Q.time_created} AND ${e$.id} <= ${Q.id}))`)).orderBy(O8(e$.time_created),O8(e$.id)).limit(Y+1).all()),X=z$.use((q)=>q.select().from(e$).where(_0(G$(e$.session_id,Q.session_id),f1`(${e$.time_created} > ${Q.time_created} OR (${e$.time_created} = ${Q.time_created} AND ${e$.id} > ${Q.id}))`)).orderBy(m1(e$.time_created),m1(e$.id)).limit(K).all()),W=[...V.reverse(),...X];if(W.length===0)return{session_id:Q.session_id,messages:[]};let _=z$.use((q)=>q.select().from($1).where(_0(G$($1.session_id,Q.session_id),f1`${$1.message_id} IN (${f1.join(W.map((U)=>f1`${U.id}`),f1`, `)})`)).orderBy(m1($1.message_id),m1($1.id)).all()),j=new Map;for(let q of _){let U=j.get(q.message_id)??[];U.push(q),j.set(q.message_id,U)}let H=W.map((q)=>{let U=q.data?.role==="user"?"user":"assistant",z=(j.get(q.id)??[]).map((M)=>{let I=M.data,C=I.type==="text"||I.type==="reasoning"?I.text??"":I.type==="tool"?`tool: ${I.tool??""}
7236
+ `,j=new Map;for(let H of J.query(_).all($.ftsQuery,...W))j.set(H.fts_rowid,H.snippet);return{rows:Q.map(({fts_rowid:H,...q})=>({...q,snippet:j.get(H)??"",score:-q.score})),capped:X}}class n9 extends D$.Service()("@qitqode/Memory"){}var RV=f.effect(n9,G.gen(function*(){let $=yield*R$.Service,J=wV.join(f$.Path.data,"memory"),Z=wV.join(dq.homedir(),".claude","projects"),Y=G.fn("Memory.root")(function*(){return J}),K=G.fn("Memory.reconcile")(function*(){let X=(yield*$.get()).memory?.cc_index?Z:void 0;return yield*G.promise(()=>O7({qode:J,cc:X}))}),Q=G.fn("Memory.search")(function*(V){let X=yield*$.get();if(X.checkpoint?.memory_reconcile_on_search??!0){let D=X.memory?.cc_index?Z:void 0;yield*G.promise(()=>O7({qode:J,cc:D}))}let W=V.limit??10,_=SV(V.query);if(!_)return{results:[],incomplete:!1};let j=X.checkpoint?.memory_search_score_floor??0.15,H=[],q=[];if(V.scope)H.push("memory_fts.scope = ?"),q.push(V.scope);if(V.scope_id)H.push("memory_fts.scope_id = ?"),q.push(V.scope_id);if(V.type)H.push("memory_fts.type = ?"),q.push(V.type);let U=Math.min(W*3,50),z=s9({select:"memory_fts.path, memory_fts.scope, memory_fts.scope_id, memory_fts.type",idx:"memory_fts_idx",contentTable:"memory_fts",contentRowid:"memory_fts.id",conditions:H,params:q,ftsQuery:_,limit:U}),M=z.rows.map((D)=>({path:D.path,snippet:D.snippet,score:D.score,scope:D.scope,scope_id:D.scope_id,type:D.type})),I=z.capped&&M.length<W;if(M.length===0)return{results:[],incomplete:I};let C=M[0].score,P=j>0?C*j:-1/0;return{results:M.filter((D,L)=>L===0||D.score>=P).slice(0,W),incomplete:I}});return n9.of({root:Y,reconcile:K,search:Q})})),pq=f.suspend(()=>RV.pipe(f.provide(R$.defaultLayer)));var MJ={};o$(MJ,{layer:()=>TV,defaultLayer:()=>aq,Service:()=>ZZ});function LV($){return r9($,"AND")}var W2=b2("history_fts",{part_id:i$().primaryKey(),session_id:i$().notNull(),message_id:i$().notNull(),project_id:i$().notNull(),kind:i$().notNull(),tool_name:i$(),body:i$().notNull(),time_created:t0().notNull()},($)=>[e0("history_fts_session_idx").on($.session_id,$.time_created),e0("history_fts_project_idx").on($.project_id,$.time_created),e0("history_fts_message_idx").on($.message_id)]);var _8=["user_text","assistant_text","tool_input","tool_error"];function a9($,J,Z){switch($.type){case"text":{let Y=J==="user"?"user_text":"assistant_text";if(!Z.has(Y))return null;if(!$.text)return null;return{kind:Y,body:$.text,tool_name:null}}case"reasoning":{if(!Z.has("reasoning"))return null;if(!$.text)return null;return{kind:"reasoning",body:$.text,tool_name:null}}case"tool":{let Y=$.state;if(Y.status==="pending"||Y.status==="running")return null;if(Y.status==="error"&&Z.has("tool_error"))return{kind:"tool_error",body:`${$.tool} ${JSON.stringify(Y.input??{})} ${Y.error??""}`,tool_name:$.tool};if(Y.status==="completed"&&Z.has("tool_output"))return{kind:"tool_output",body:`${$.tool} ${JSON.stringify(Y.input??{})} ${JSON.stringify(Y.output??"")}`,tool_name:$.tool};if(Z.has("tool_input"))return{kind:"tool_input",body:`${$.tool} ${JSON.stringify(Y.input??{})}`,tool_name:$.tool};return null}default:return null}}class q7{max;map=new Map;constructor($){this.max=$}get($){let J=this.map.get($);if(J===void 0)return;return this.map.delete($),this.map.set($,J),J}set($,J){if(this.map.has($))this.map.delete($);if(this.map.set($,J),this.map.size>this.max){let Z=this.map.keys().next().value;if(Z!==void 0)this.map.delete(Z)}}}function t9(){let $=new q7(1024),J=new q7(512);return{role:(Z)=>G.sync(()=>{let Y=$.get(Z);if(Y)return Y;let Q=z$.use((V)=>V.select({data:e$.data}).from(e$).where(G$(e$.id,Z)).get())?.data?.role==="user"?"user":"assistant";return $.set(Z,Q),Q}),projectID:(Z)=>G.sync(()=>{let Y=J.get(Z);if(Y)return Y;let Q=z$.use((V)=>V.select({project_id:V0.project_id}).from(V0).where(G$(V0.id,Z)).get())?.project_id??"";return J.set(Z,Q),Q})}}var cq=O$.create({service:"history.writer"});class e9 extends D$.Service()("@qitqode/History.Writer"){}var NV=f.effect(e9,G.gen(function*(){let $=yield*R$.Service,J=yield*P$.Service,Z=yield*i.make(G.fn("History.Writer.state")(function*(Y){let Q=(yield*$.get()).history?.kinds??_8,V=new Set(Q);if(V.size===0)return{started:!0};let X=yield*b1.unbounded(),W=t9();return yield*J.subscribeCallback(w0.Event.PartUpdated,(_)=>{b1.offerUnsafe(X,{type:"upsert",part:_.properties.part,time:_.properties.time})}),yield*J.subscribeCallback(w0.Event.PartRemoved,(_)=>{b1.offerUnsafe(X,{type:"delete",partID:_.properties.partID})}),yield*G.forever(G.gen(function*(){let _=yield*b1.take(X);yield*lq(_,W,V).pipe(G.catchCause((j)=>G.sync(()=>cq.warn("write failed",{cause:String(j)}))))})).pipe(G.forkScoped),{started:!0}}));return e9.of({init:G.fn("History.Writer.init")(function*(){yield*i.get(Z)})})}));function lq($,J,Z){if($.type==="delete")return G.sync(()=>z$.use((Y)=>Y.delete(W2).where(G$(W2.part_id,$.partID)).run()));return G.gen(function*(){let Y=$.part,K=yield*J.role(Y.messageID),Q=a9(Y,K,Z);if(!Q)return;let V=yield*J.projectID(Y.sessionID);z$.use((X)=>X.insert(W2).values({part_id:Y.id,session_id:Y.sessionID,message_id:Y.messageID,project_id:V,kind:Q.kind,tool_name:Q.tool_name,body:Q.body,time_created:$.time}).onConflictDoUpdate({target:W2.part_id,set:{kind:Q.kind,tool_name:Q.tool_name,body:Q.body,time_created:$.time}}).run())})}var F7=O$.create({service:"history.backfill"}),oq=500;function rq($=new Set(_8)){return G.gen(function*(){if($.size===0)return;let J=t9(),Z=z$.use((Y)=>Y.select({id:V0.id,project_id:V0.project_id}).from(V0).orderBy(O8(V0.time_updated)).all());for(let Y of Z)yield*iq(Y,J,$).pipe(G.catchCause((K)=>G.sync(()=>F7.warn("session scan failed",{session:Y.id,cause:String(K)})))),yield*G.sleep("50 millis");F7.info("backfill complete",{sessions:Z.length})})}function iq($,J,Z){return G.gen(function*(){let Y="";while(!0){let K=z$.use((Q)=>Q.select().from($1).where(_0(G$($1.session_id,$.id),JZ($1.id,Y),f1`NOT EXISTS (SELECT 1 FROM history_fts WHERE history_fts.part_id = ${$1.id})`)).orderBy(m1($1.id)).limit(oq).all());if(K.length===0)return;yield*sq(K,$.project_id,J,Z),Y=K[K.length-1].id,yield*G.sleep("10 millis")}})}function sq($,J,Z,Y){return G.gen(function*(){let K=[];for(let Q of $){let V=yield*Z.role(Q.message_id),X={id:Q.id,sessionID:Q.session_id,messageID:Q.message_id,...Q.data},W=a9(X,V,Y);if(!W)continue;K.push({part:Q,kind:W.kind,body:W.body,tool_name:W.tool_name,time:Q.time_created})}if(K.length===0)return;z$.transaction((Q)=>{for(let V of K)Q.insert(W2).values({part_id:V.part.id,session_id:V.part.session_id,message_id:V.part.message_id,project_id:J,kind:V.kind,tool_name:V.tool_name,body:V.body,time_created:V.time}).onConflictDoUpdate({target:W2.part_id,set:{kind:V.kind,tool_name:V.tool_name,body:V.body,time_created:V.time}}).run()})})}class $Z extends D$.Service()("@qitqode/History.Backfill"){}var yV=f.effect($Z,G.gen(function*(){let $=yield*R$.Service;return $Z.of({init:G.fn("History.Backfill.init")(function*(){let Z=(yield*$.get()).history?.kinds??_8,Y=new Set(Z);yield*rq(Y).pipe(G.catchCause((K)=>G.sync(()=>F7.warn("backfill aborted",{cause:String(K)}))),G.forkDetach)})})}));class ZZ extends D$.Service()("@qitqode/History"){}var nq=50,aq=f.suspend(()=>f.mergeAll(TV,NV,yV).pipe(f.provide(R$.defaultLayer),f.provide(P$.defaultLayer))),TV=f.effect(ZZ,G.gen(function*(){let $=G.fn("History.search")(function*(Z){let Y=LV(Z.query);if(!Y)return{hits:[],incomplete:!1};let K=Math.min(Z.limit??10,nq),Q=[],V=[];if((Z.scope??"project")==="project")Q.push("history_fts.project_id = ?"),V.push(B$.project.id);if(Z.session_id)Q.push("history_fts.session_id = ?"),V.push(Z.session_id);if(Z.kind){let _=Array.isArray(Z.kind)?Z.kind:[Z.kind];Q.push(`history_fts.kind IN (${_.map(()=>"?").join(",")})`);for(let j of _)V.push(j)}if(Z.tool_name)Q.push("history_fts.tool_name = ?"),V.push(Z.tool_name);if(Z.time_after!==void 0)Q.push("history_fts.time_created >= ?"),V.push(Z.time_after);if(Z.time_before!==void 0)Q.push("history_fts.time_created <= ?"),V.push(Z.time_before);let W=s9({select:"history_fts.part_id, history_fts.session_id, history_fts.message_id, history_fts.project_id, history_fts.kind, history_fts.tool_name, history_fts.time_created",idx:"history_fts_idx",contentTable:"history_fts",contentRowid:"history_fts.rowid",conditions:Q,params:V,ftsQuery:Y,limit:K});return{hits:W.rows.map((_)=>({part_id:_.part_id,session_id:_.session_id,message_id:_.message_id,project_id:_.project_id,kind:_.kind,tool_name:_.tool_name,snippet:_.snippet,score:_.score,time_created:_.time_created})),incomplete:W.capped}}),J=G.fn("History.around")(function*(Z){let Y=Z.before??5,K=Z.after??5,Q=z$.use((q)=>q.select({id:e$.id,session_id:e$.session_id,time_created:e$.time_created}).from(e$).where(G$(e$.id,Z.message_id)).get());if(!Q)return{session_id:"",messages:[]};let V=z$.use((q)=>q.select().from(e$).where(_0(G$(e$.session_id,Q.session_id),f1`(${e$.time_created} < ${Q.time_created} OR (${e$.time_created} = ${Q.time_created} AND ${e$.id} <= ${Q.id}))`)).orderBy(O8(e$.time_created),O8(e$.id)).limit(Y+1).all()),X=z$.use((q)=>q.select().from(e$).where(_0(G$(e$.session_id,Q.session_id),f1`(${e$.time_created} > ${Q.time_created} OR (${e$.time_created} = ${Q.time_created} AND ${e$.id} > ${Q.id}))`)).orderBy(m1(e$.time_created),m1(e$.id)).limit(K).all()),W=[...V.reverse(),...X];if(W.length===0)return{session_id:Q.session_id,messages:[]};let _=z$.use((q)=>q.select().from($1).where(_0(G$($1.session_id,Q.session_id),f1`${$1.message_id} IN (${f1.join(W.map((U)=>f1`${U.id}`),f1`, `)})`)).orderBy(m1($1.message_id),m1($1.id)).all()),j=new Map;for(let q of _){let U=j.get(q.message_id)??[];U.push(q),j.set(q.message_id,U)}let H=W.map((q)=>{let U=q.data?.role==="user"?"user":"assistant",z=(j.get(q.id)??[]).map((M)=>{let I=M.data,C=I.type==="text"||I.type==="reasoning"?I.text??"":I.type==="tool"?`tool: ${I.tool??""}
7237
7237
  input: ${JSON.stringify(I.state?.input??{})}
7238
7238
  ${I.state?.error?`error: ${I.state.error}`:`output: ${JSON.stringify(I.state?.output??"")}`}`:`[${I.type}]`;return{part_id:M.id,type:I.type,role:U,tool_name:I.type==="tool"?I.tool??null:null,text:C}});return{message_id:q.id,matched:q.id===Z.message_id,time_created:q.time_created,parts:z}});return{session_id:Q.session_id,messages:H}});return ZZ.of({search:$,around:J})}));var j1={};o$(j1,{tailLines:()=>P7,layer:()=>hV,headLines:()=>D7,defaultLayer:()=>I7,Service:()=>Z1,MAX_LINES:()=>DJ,MAX_BYTES:()=>u1,GLOB:()=>YF,DIR:()=>ZF});import z7 from"path";var tq=F$.String.annotate({[KZ]:J1.schema("tool")}).pipe(F$.brand("ToolID")),kV=tq.pipe(YZ(($)=>({ascending:(J)=>$.make(J1.ascending("tool",J)),zod:J1.schema("tool").pipe(F.custom())})));import eq from"path";var v2=eq.join(f$.Path.data,"tool-output");var $F=O$.create({service:"truncation"}),JF=h2.days(7),DJ=2000,u1=51200,ZF=v2,YF=z7.join(v2,"*"),KF=/error|exception|failed|fatal|traceback|panic|exit code/i;function C7($,J){let Z=Buffer.from($,"utf-8");if(Z.length<=J)return $;let Y=Math.min(J,Z.length);while(Y>0&&(Z[Y]&192)===128)Y--;return Z.subarray(0,Y).toString("utf-8")}function M7($,J){let Z=Buffer.from($,"utf-8");if(Z.length<=J)return $;let Y=Math.max(0,Z.length-J);while(Y<Z.length&&(Z[Y]&192)===128)Y++;return Z.subarray(Y).toString("utf-8")}function D7($,J,Z){let Y=$.split(`
7239
7239
  `),K=[],Q=0;for(let V=0;V<Y.length&&K.length<J;V++){let X=Buffer.byteLength(Y[V],"utf-8")+(V>0?1:0);if(Q+X>Z){if(K.length===0)K.push(C7(Y[V],Z));break}K.push(Y[V]),Q+=X}return K.join(`
@@ -7261,7 +7261,7 @@ ${R}`:`...${C} ${P} truncated...
7261
7261
 
7262
7262
  ${R}
7263
7263
 
7264
- ${D}`,truncated:!0,outputPath:L}});return yield*bV(J(),(K)=>{return $F.error("truncation cleanup failed",{cause:n0.pretty(K)}),G.void}),Z1.of({cleanup:J,write:Z,output:Y})})),I7=hV.pipe(f.provide($$.defaultLayer),f.provide(g9.layer));var B1={};o$(B1,{normalizeQuestions:()=>w7,normalizeQuestion:()=>mV,normalizeOptionLabel:()=>S7,meaningfulOptions:()=>VF,layer:()=>lV,isFreeTextQuestion:()=>GF,isFillerOption:()=>VZ,defaultLayer:()=>XF,Tool:()=>L7,Service:()=>WZ,Request:()=>UZ,Reply:()=>dV,RejectedError:()=>XZ,Question:()=>B1,Prompt:()=>q8,Option:()=>QZ,Info:()=>R7,Event:()=>GZ,Answer:()=>N7});class PJ extends gV()("QuestionID",F$.String.annotate({[KZ]:J1.schema("question")})){static ascending($){return this.make(J1.ascending("question",$))}static zod=J1.schema("question")}class QZ extends F$.Class("QuestionOption")({label:F$.String.annotate({description:"Display text (1-5 words, concise). Must name a distinct, actionable choice. Never a filler such as 'Other', 'Provide details' or 'Type your own answer' \u2014 a free-text answer is always offered separately and filler options are stripped."}),description:F$.String.annotate({description:"What choosing this option means and what work it leads to"})}){static zod=U1(this)}var A7={question:F$.String.annotate({description:"Complete question"}),header:F$.String.annotate({description:"Very short label (max 30 chars)"}),options:F$.Array(QZ).annotate({description:"At least two mutually exclusive, decision-bearing choices. If you cannot offer two genuinely different choices, do not ask through this tool \u2014 ask for what you need as prose in your reply instead."}),multiple:F$.optional(F$.Boolean).annotate({description:"Allow selecting multiple choices"})};class q8 extends F$.Class("QuestionPrompt")(A7){static zod=U1(this)}var QF=[/^others?$/,/^something else$/,/^(an)?other (option|answer|choice)$/,/^(custom|free ?-?(text|form))( answer| response| input| option)?$/,/^(type|write|enter|input|fill)( in)? (your|my) own( answer| response| text| words)?$/,/^(type|write|enter) (an )?answer$/,/^(provide|give|share|add|supply|include)( me)?( the| more| additional| further| relevant)* ?(details?|context|info|information|specifics|goals?|requirements?)(,? (and |or )?(details?|context|info|information|specifics|goals?|requirements?))*( (here|below))?$/,/^(please )?(specify|elaborate|describe it|explain it|clarify)( (here|below|yourself))?$/,/^tell (me|us) more( here| below)?$/];function S7($){return $.toLowerCase().replace(/\s+/g," ").trim().replace(/^["'\u201C\u201D\u2018\u2019(\[]+/,"").replace(/["'\u201C\u201D\u2018\u2019)\]]+$/,"").replace(/[.!?\u2026:;,\-\u2013\u2014]+$/,"").trim()}function VZ($){let J=S7($.label??"");if(!J)return!0;return QF.some((Z)=>Z.test(J))}function fV($,J){let Z=new Set,Y=[];for(let K of $){let Q=S7(K.label);if(Z.has(Q)){J?.(K.label,"duplicate");continue}Z.add(Q),Y.push(K)}return Y}function VF($){return fV($).filter((J)=>!VZ(J))}function mV($,J){let Z=fV($.options??[],J);if(Z.filter((K)=>!VZ(K)).length>=2){if(Z.length===($.options?.length??0))return $;return{...$,options:Z}}for(let K of Z)J?.(K.label,VZ(K)?"filler":"collapsed");return{...$,options:[],custom:!0,multiple:!1}}function w7($,J){return $.map((Z)=>mV(Z,J))}function GF($){return($.options?.length??0)===0&&$.custom!==!1}var g2=O$.create({service:"question"});class R7 extends F$.Class("QuestionInfo")({...A7,custom:F$.optional(F$.Boolean).annotate({description:"Allow typing a custom answer (default: true)"}),key:F$.optional(F$.String).annotate({description:"i18n key for client-side translation (e.g. plan_exit). When set, clients may translate question/options text using this key as a namespace."}),params:F$.optional(F$.Record(F$.String,F$.String)).annotate({description:"Template parameters for i18n interpolation (e.g. { plan: '.qitqode/plans/...' })"})}){static zod=U1(this)}class L7 extends F$.Class("QuestionTool")({messageID:IJ,callID:F$.String}){static zod=U1(this)}class UZ extends F$.Class("QuestionRequest")({id:PJ,sessionID:F0,questions:F$.Array(R7).annotate({description:"Questions to ask"}),tool:F$.optional(L7)}){static zod=U1(this)}var N7=F$.Array(F$.String).annotate({identifier:"QuestionAnswer"}).pipe(YZ(($)=>({zod:U1($)})));class dV extends F$.Class("QuestionReply")({answers:F$.Array(N7).annotate({description:"User answers in order of questions (each answer is an array of selected labels)"})}){static zod=U1(this)}class pV extends F$.Class("QuestionReplied")({sessionID:F0,requestID:PJ,answers:F$.Array(N7)}){}class cV extends F$.Class("QuestionRejected")({sessionID:F0,requestID:PJ}){}var GZ={Asked:Z0.define("question.asked",UZ.zod),Replied:Z0.define("question.replied",U1(pV)),Rejected:Z0.define("question.rejected",U1(cV))};class XZ extends F$.TaggedErrorClass()("QuestionRejectedError",{}){get message(){return"The user dismissed this question"}}class WZ extends D$.Service()("@qitqode/Question"){}var lV=f.effect(WZ,G.gen(function*(){let $=yield*P$.Service,J=yield*i.make(G.fn("Question.state")(function*(){let _={pending:new Map,neverAsk:!1,declined:new Map};return yield*uV(_.pending,()=>new XZ),_})),Z=G.fn("Question.ask")(function*(_){let j=(yield*i.get(J)).pending,H=PJ.ascending();g2.info("asking",{id:H,questions:_.questions.length});let q=yield*B0.make(),U=w7(_.questions,(M,I)=>g2.debug("stripped question option",{id:H,label:M,reason:I})),z=F$.decodeUnknownSync(UZ)({id:H,sessionID:_.sessionID,questions:U,tool:_.tool});return j.set(H,{info:z,deferred:q}),yield*$.publish(GZ.Asked,z),yield*jZ.awaitDeferred(q,()=>{j.delete(H)})}),Y=G.fn("Question.reply")(function*(_){let j=(yield*i.get(J)).pending,H=j.get(_.requestID);if(!H){g2.warn("reply for unknown request",{requestID:_.requestID});return}j.delete(_.requestID),g2.info("replied",{requestID:_.requestID,answers:_.answers}),yield*$.publish(GZ.Replied,{sessionID:H.info.sessionID,requestID:H.info.id,answers:_.answers}),yield*B0.succeed(H.deferred,_.answers)}),K=G.fn("Question.reject")(function*(_){let j=yield*i.get(J),H=j.pending,q=H.get(_);if(!q){g2.warn("reject for unknown request",{requestID:_});return}H.delete(_),j.declined.set(q.info.sessionID,Date.now()),g2.info("rejected",{requestID:_}),yield*$.publish(GZ.Rejected,{sessionID:q.info.sessionID,requestID:q.info.id}),yield*B0.fail(q.deferred,new XZ)}),Q=G.fn("Question.list")(function*(){let _=(yield*i.get(J)).pending;return Array.from(_.values(),(j)=>j.info)}),V=G.fn("Question.declinedAt")(function*(_){return(yield*i.get(J)).declined.get(_)}),X=G.fn("Question.neverAsk")(function*(){return(yield*i.get(J)).neverAsk}),W=G.fn("Question.setNeverAsk")(function*(_){let j=yield*i.get(J);j.neverAsk=_,g2.info("never-ask",{enabled:_})});return WZ.of({ask:Z,reply:Y,reject:K,list:Q,declinedAt:V,neverAsk:X,setNeverAsk:W})})),XF=lV.pipe(f.provide(P$.layer));import WF from"crypto";var y7=O$.create({service:"bash-interactive"}),oV={Asked:Z0.define("bash.interactive.asked",F.object({id:F.string(),command:F.string(),cwd:F.string(),env:F.record(F.string(),F.string()).optional(),description:F.string()})),Replied:Z0.define("bash.interactive.replied",F.object({id:F.string(),output:F.string(),exitCode:F.number()}))};class rV extends Error{constructor($){super($);this.name="BashInteractiveError"}}class BZ extends D$.Service()("@qitqode/BashInteractive"){}var jF=f.effect(BZ,G.gen(function*(){let $=yield*P$.Service,J=yield*i.make(G.fn("BashInteractive.state")(function*(){let Q={pending:new Map};return yield*G.addFinalizer(()=>G.gen(function*(){for(let V of Q.pending.values())yield*B0.fail(V.deferred,new rV("Instance disposed"));Q.pending.clear()})),Q})),Z=G.fn("BashInteractive.request")(function*(Q){let V=(yield*i.get(J)).pending,X=WF.randomUUID();y7.info("requesting interactive",{id:X,command:Q.command});let W=yield*B0.make(),_={id:X,command:Q.command,cwd:Q.cwd,env:Q.env,description:Q.description};return V.set(X,{request:_,deferred:W}),yield*$.publish(oV.Asked,_),yield*jZ.awaitDeferred(W,()=>{V.delete(X)})}),Y=G.fn("BashInteractive.reply")(function*(Q){let V=(yield*i.get(J)).pending,X=V.get(Q.id);if(!X){y7.warn("reply for unknown request",{id:Q.id});return}V.delete(Q.id),y7.info("replied",{id:Q.id,exitCode:Q.exitCode}),yield*$.publish(oV.Replied,{id:X.request.id,output:Q.output,exitCode:Q.exitCode}),yield*B0.succeed(X.deferred,{output:Q.output,exitCode:Q.exitCode})}),K=G.fn("BashInteractive.list")(function*(){let Q=(yield*i.get(J)).pending;return Array.from(Q.values(),(V)=>V.request)});return BZ.of({request:Z,reply:Y,list:K})})),UF=jF.pipe(f.provide(P$.layer)),{runPromise:BF}=HZ(BZ,UF);function iV($){return BF((J)=>J.request($))}var nV=F.object({tool:F.string(),error:F.string()}),aV=F.object({questions:F.array(q8.zod).describe("Questions to ask")}),tV=F.object({command:F.string().describe("The command to execute"),timeout:F.number().describe("Optional timeout in milliseconds").optional(),workdir:F.string().describe("The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.").optional(),interactive:F.boolean().describe("Set to true when the command requires user interaction (password input, y/N confirmation, SSH key passphrase, etc). The terminal will be handed to the user for direct interaction.").optional(),description:F.string().describe(`Clear, concise description of what this command does in 5-10 words. Examples:
7264
+ ${D}`,truncated:!0,outputPath:L}});return yield*bV(J(),(K)=>{return $F.error("truncation cleanup failed",{cause:u0.pretty(K)}),G.void}),Z1.of({cleanup:J,write:Z,output:Y})})),I7=hV.pipe(f.provide($$.defaultLayer),f.provide(g9.layer));var B1={};o$(B1,{normalizeQuestions:()=>w7,normalizeQuestion:()=>mV,normalizeOptionLabel:()=>S7,meaningfulOptions:()=>VF,layer:()=>lV,isFreeTextQuestion:()=>GF,isFillerOption:()=>VZ,defaultLayer:()=>XF,Tool:()=>L7,Service:()=>WZ,Request:()=>UZ,Reply:()=>dV,RejectedError:()=>XZ,Question:()=>B1,Prompt:()=>q8,Option:()=>QZ,Info:()=>R7,Event:()=>GZ,Answer:()=>N7});class PJ extends gV()("QuestionID",F$.String.annotate({[KZ]:J1.schema("question")})){static ascending($){return this.make(J1.ascending("question",$))}static zod=J1.schema("question")}class QZ extends F$.Class("QuestionOption")({label:F$.String.annotate({description:"Display text (1-5 words, concise). Must name a distinct, actionable choice. Never a filler such as 'Other', 'Provide details' or 'Type your own answer' \u2014 a free-text answer is always offered separately and filler options are stripped."}),description:F$.String.annotate({description:"What choosing this option means and what work it leads to"})}){static zod=U1(this)}var A7={question:F$.String.annotate({description:"Complete question"}),header:F$.String.annotate({description:"Very short label (max 30 chars)"}),options:F$.Array(QZ).annotate({description:"At least two mutually exclusive, decision-bearing choices. If you cannot offer two genuinely different choices, do not ask through this tool \u2014 ask for what you need as prose in your reply instead."}),multiple:F$.optional(F$.Boolean).annotate({description:"Allow selecting multiple choices"})};class q8 extends F$.Class("QuestionPrompt")(A7){static zod=U1(this)}var QF=[/^others?$/,/^something else$/,/^(an)?other (option|answer|choice)$/,/^(custom|free ?-?(text|form))( answer| response| input| option)?$/,/^(type|write|enter|input|fill)( in)? (your|my) own( answer| response| text| words)?$/,/^(type|write|enter) (an )?answer$/,/^(provide|give|share|add|supply|include)( me)?( the| more| additional| further| relevant)* ?(details?|context|info|information|specifics|goals?|requirements?)(,? (and |or )?(details?|context|info|information|specifics|goals?|requirements?))*( (here|below))?$/,/^(please )?(specify|elaborate|describe it|explain it|clarify)( (here|below|yourself))?$/,/^tell (me|us) more( here| below)?$/];function S7($){return $.toLowerCase().replace(/\s+/g," ").trim().replace(/^["'\u201C\u201D\u2018\u2019(\[]+/,"").replace(/["'\u201C\u201D\u2018\u2019)\]]+$/,"").replace(/[.!?\u2026:;,\-\u2013\u2014]+$/,"").trim()}function VZ($){let J=S7($.label??"");if(!J)return!0;return QF.some((Z)=>Z.test(J))}function fV($,J){let Z=new Set,Y=[];for(let K of $){let Q=S7(K.label);if(Z.has(Q)){J?.(K.label,"duplicate");continue}Z.add(Q),Y.push(K)}return Y}function VF($){return fV($).filter((J)=>!VZ(J))}function mV($,J){let Z=fV($.options??[],J);if(Z.filter((K)=>!VZ(K)).length>=2){if(Z.length===($.options?.length??0))return $;return{...$,options:Z}}for(let K of Z)J?.(K.label,VZ(K)?"filler":"collapsed");return{...$,options:[],custom:!0,multiple:!1}}function w7($,J){return $.map((Z)=>mV(Z,J))}function GF($){return($.options?.length??0)===0&&$.custom!==!1}var g2=O$.create({service:"question"});class R7 extends F$.Class("QuestionInfo")({...A7,custom:F$.optional(F$.Boolean).annotate({description:"Allow typing a custom answer (default: true)"}),key:F$.optional(F$.String).annotate({description:"i18n key for client-side translation (e.g. plan_exit). When set, clients may translate question/options text using this key as a namespace."}),params:F$.optional(F$.Record(F$.String,F$.String)).annotate({description:"Template parameters for i18n interpolation (e.g. { plan: '.qitqode/plans/...' })"})}){static zod=U1(this)}class L7 extends F$.Class("QuestionTool")({messageID:IJ,callID:F$.String}){static zod=U1(this)}class UZ extends F$.Class("QuestionRequest")({id:PJ,sessionID:F0,questions:F$.Array(R7).annotate({description:"Questions to ask"}),tool:F$.optional(L7)}){static zod=U1(this)}var N7=F$.Array(F$.String).annotate({identifier:"QuestionAnswer"}).pipe(YZ(($)=>({zod:U1($)})));class dV extends F$.Class("QuestionReply")({answers:F$.Array(N7).annotate({description:"User answers in order of questions (each answer is an array of selected labels)"})}){static zod=U1(this)}class pV extends F$.Class("QuestionReplied")({sessionID:F0,requestID:PJ,answers:F$.Array(N7)}){}class cV extends F$.Class("QuestionRejected")({sessionID:F0,requestID:PJ}){}var GZ={Asked:Z0.define("question.asked",UZ.zod),Replied:Z0.define("question.replied",U1(pV)),Rejected:Z0.define("question.rejected",U1(cV))};class XZ extends F$.TaggedErrorClass()("QuestionRejectedError",{}){get message(){return"The user dismissed this question"}}class WZ extends D$.Service()("@qitqode/Question"){}var lV=f.effect(WZ,G.gen(function*(){let $=yield*P$.Service,J=yield*i.make(G.fn("Question.state")(function*(){let _={pending:new Map,neverAsk:!1,declined:new Map};return yield*uV(_.pending,()=>new XZ),_})),Z=G.fn("Question.ask")(function*(_){let j=(yield*i.get(J)).pending,H=PJ.ascending();g2.info("asking",{id:H,questions:_.questions.length});let q=yield*B0.make(),U=w7(_.questions,(M,I)=>g2.debug("stripped question option",{id:H,label:M,reason:I})),z=F$.decodeUnknownSync(UZ)({id:H,sessionID:_.sessionID,questions:U,tool:_.tool});return j.set(H,{info:z,deferred:q}),yield*$.publish(GZ.Asked,z),yield*jZ.awaitDeferred(q,()=>{j.delete(H)})}),Y=G.fn("Question.reply")(function*(_){let j=(yield*i.get(J)).pending,H=j.get(_.requestID);if(!H){g2.warn("reply for unknown request",{requestID:_.requestID});return}j.delete(_.requestID),g2.info("replied",{requestID:_.requestID,answers:_.answers}),yield*$.publish(GZ.Replied,{sessionID:H.info.sessionID,requestID:H.info.id,answers:_.answers}),yield*B0.succeed(H.deferred,_.answers)}),K=G.fn("Question.reject")(function*(_){let j=yield*i.get(J),H=j.pending,q=H.get(_);if(!q){g2.warn("reject for unknown request",{requestID:_});return}H.delete(_),j.declined.set(q.info.sessionID,Date.now()),g2.info("rejected",{requestID:_}),yield*$.publish(GZ.Rejected,{sessionID:q.info.sessionID,requestID:q.info.id}),yield*B0.fail(q.deferred,new XZ)}),Q=G.fn("Question.list")(function*(){let _=(yield*i.get(J)).pending;return Array.from(_.values(),(j)=>j.info)}),V=G.fn("Question.declinedAt")(function*(_){return(yield*i.get(J)).declined.get(_)}),X=G.fn("Question.neverAsk")(function*(){return(yield*i.get(J)).neverAsk}),W=G.fn("Question.setNeverAsk")(function*(_){let j=yield*i.get(J);j.neverAsk=_,g2.info("never-ask",{enabled:_})});return WZ.of({ask:Z,reply:Y,reject:K,list:Q,declinedAt:V,neverAsk:X,setNeverAsk:W})})),XF=lV.pipe(f.provide(P$.layer));import WF from"crypto";var y7=O$.create({service:"bash-interactive"}),oV={Asked:Z0.define("bash.interactive.asked",F.object({id:F.string(),command:F.string(),cwd:F.string(),env:F.record(F.string(),F.string()).optional(),description:F.string()})),Replied:Z0.define("bash.interactive.replied",F.object({id:F.string(),output:F.string(),exitCode:F.number()}))};class rV extends Error{constructor($){super($);this.name="BashInteractiveError"}}class BZ extends D$.Service()("@qitqode/BashInteractive"){}var jF=f.effect(BZ,G.gen(function*(){let $=yield*P$.Service,J=yield*i.make(G.fn("BashInteractive.state")(function*(){let Q={pending:new Map};return yield*G.addFinalizer(()=>G.gen(function*(){for(let V of Q.pending.values())yield*B0.fail(V.deferred,new rV("Instance disposed"));Q.pending.clear()})),Q})),Z=G.fn("BashInteractive.request")(function*(Q){let V=(yield*i.get(J)).pending,X=WF.randomUUID();y7.info("requesting interactive",{id:X,command:Q.command});let W=yield*B0.make(),_={id:X,command:Q.command,cwd:Q.cwd,env:Q.env,description:Q.description};return V.set(X,{request:_,deferred:W}),yield*$.publish(oV.Asked,_),yield*jZ.awaitDeferred(W,()=>{V.delete(X)})}),Y=G.fn("BashInteractive.reply")(function*(Q){let V=(yield*i.get(J)).pending,X=V.get(Q.id);if(!X){y7.warn("reply for unknown request",{id:Q.id});return}V.delete(Q.id),y7.info("replied",{id:Q.id,exitCode:Q.exitCode}),yield*$.publish(oV.Replied,{id:X.request.id,output:Q.output,exitCode:Q.exitCode}),yield*B0.succeed(X.deferred,{output:Q.output,exitCode:Q.exitCode})}),K=G.fn("BashInteractive.list")(function*(){let Q=(yield*i.get(J)).pending;return Array.from(Q.values(),(V)=>V.request)});return BZ.of({request:Z,reply:Y,list:K})})),UF=jF.pipe(f.provide(P$.layer)),{runPromise:BF}=HZ(BZ,UF);function iV($){return BF((J)=>J.request($))}var nV=F.object({tool:F.string(),error:F.string()}),aV=F.object({questions:F.array(q8.zod).describe("Questions to ask")}),tV=F.object({command:F.string().describe("The command to execute"),timeout:F.number().describe("Optional timeout in milliseconds").optional(),workdir:F.string().describe("The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.").optional(),interactive:F.boolean().describe("Set to true when the command requires user interaction (password input, y/N confirmation, SSH key passphrase, etc). The terminal will be handed to the user for direct interaction.").optional(),description:F.string().describe(`Clear, concise description of what this command does in 5-10 words. Examples:
7265
7265
  Input: ls
7266
7266
  Output: Lists files in current directory
7267
7267
 
@@ -7272,7 +7272,7 @@ Input: npm install
7272
7272
  Output: Installs package dependencies
7273
7273
 
7274
7274
  Input: mkdir foo
7275
- Output: Creates directory 'foo'`)}),eV=F.object({filePath:F.string().describe("The absolute path to the file or directory to read"),offset:F.coerce.number().int().min(1).describe("The line number to start reading from (1-indexed)").optional(),limit:F.coerce.number().int().min(1).describe("The maximum number of lines to read (defaults to 2000)").optional()}),$G=F.object({pattern:F.string().describe("The glob pattern to match files against"),path:F.string().optional().describe('The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.')}),JG=F.object({pattern:F.string().describe("The regex pattern to search for in file contents"),path:F.string().optional().describe("The directory to search in. Defaults to the current working directory."),include:F.string().optional().describe('File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")')}),HF=F.object({filePath:F.string().describe("The absolute path to the file to modify"),oldString:F.string().describe("The text to replace"),newString:F.string().describe("The text to replace it with (must be different from oldString)"),replaceAll:F.boolean().optional().describe("Replace all occurrences of oldString (default false)")}),ZG=HF,YG=F.object({content:F.string().describe("The content to write to the file"),filePath:F.string().describe("The absolute path to the file to write (must be absolute, not relative)")}),_F="(optional) Model for this subagent: a model group name (e.g. fast/economical/default/power) or a literal provider/model. Overrides the agent's configured model; defaults to the agent's model, else the parent's. If no model_groups are configured, the tier names resolve to their default model.";function KG($=F.string()){let J=F.string().min(1).describe("Actor session id to operate on. Distinct from the user-task IDs (T1, T2, ...) used by the `task` tool."),Z=F.number().int().positive().optional().describe("(optional) Milliseconds to wait before returning { status: 'timeout' }. Default 600000 (10 min)."),Y=F.string().min(1).describe("A short (3-5 words) description of the task."),K=F.string().min(1).describe("The task for the agent to perform."),Q=$.describe("The type of specialized agent to use for this task."),V=F.string().min(1).optional().describe(_F),X=F.string().min(1).optional().describe("(optional) The command that triggered this task."),W=F.string().min(1).optional().describe("(optional) If this subagent is doing work for a specific task in the `task` tool, pass that task's ID (e.g. T4, T2.1) here \u2014 only an ID the `task` tool returned this session. After completion, the actor.postStop hook validates that tasks/<task_id>/progress.md exists with the required sections. If the ID is malformed or names no existing task, the binding is silently dropped and the subagent's findings are NOT captured to that task. Leave omitted only for work that isn't tied to a task."),_=F.strictObject({action:F.literal("run").describe("Spawn a subagent and block until it completes; the result is returned inline as the tool response."),description:Y,prompt:K,subagent_type:Q,model:V,actor_id:F.string().min(1).optional().describe("(optional) If set, resume the specified prior actor session instead of creating a new one. Distinct from the user-task IDs (T1, T2, ...) used by the `task` tool."),timeout_ms:Z,command:X,context:F.enum(["none","state","full"]).optional().describe("(optional) Context inheritance. 'none' (default): child sees only prompt. 'full': child sees parent conversation (prefix cache sharing). 'state': child gets checkpoint summary."),task_id:W,output_schema:F.record(F.string(),F.any()).optional().describe("(optional) A JSON Schema. When set, the subagent is forced to return a single structured object matching this schema (via the StructuredOutput tool) instead of free text; the validated object is returned in <actor_result>.")}),j=F.strictObject({action:F.literal("spawn").describe("Spawn a subagent and return its actor_id immediately; result is delivered as a notification or via a separate `wait` call."),description:Y,prompt:K,subagent_type:Q,model:V,actor_id:F.string().min(1).optional().describe("(optional) If set, resume the specified prior actor session instead of creating a new one."),command:X,context:F.enum(["none","state","full"]).optional().describe("(optional) Context inheritance. Default 'none'."),task_id:W,output_schema:F.record(F.string(),F.any()).optional().describe("(optional) A JSON Schema. When set, the subagent is forced to return a single structured object matching this schema (via the StructuredOutput tool) instead of free text.")}),H=F.strictObject({action:F.literal("status"),actor_id:J}),q=F.strictObject({action:F.literal("wait"),actor_id:J,timeout_ms:Z}),U=F.strictObject({action:F.literal("cancel"),actor_id:J}),z=F.strictObject({action:F.literal("send"),to_session_id:F.string().min(1).optional().describe("(optional) Target session ID. Defaults to the current session \u2014 useful for sending to subagents in this session."),to_actor_id:F.string().min(1).describe("Target actor ID. Use 'main' to send to a session's main agent, or a subagent ID like 'explore-1'."),content:F.string().min(1).describe("Message content (plain text). Wrapped in <inbox> for the receiver."),type:F.string().optional().describe("(optional) Message type. Default 'text' is wrapped in <inbox>...</inbox>. 'actor_notification' is passed through verbatim (sender pre-renders).")});return F.strictObject({operation:F.discriminatedUnion("action",[_,j,H,q,U,z]).meta({type:"object"})})}var QG=F.object({url:F.string().describe("The URL to fetch content from"),format:F.enum(["text","markdown","html"]).default("markdown").describe("The format to return the content in (text, markdown, or html). Defaults to markdown."),timeout:F.number().min(1).describe("Optional timeout in seconds (min 1, max 120)").optional()}),VG=F.object({query:F.string().describe("Websearch query"),numResults:F.number().optional().describe("Number of search results to return (default: 8)"),timeout:F.number().min(1).describe("Optional timeout in seconds (min 1, max 120)").optional(),livecrawl:F.enum(["fallback","preferred"]).optional().describe("Live crawl mode - 'fallback': use live crawling as backup if cached content unavailable, 'preferred': prioritize live crawling (default: 'fallback')"),type:F.enum(["auto","fast","deep"]).optional().describe("Search type - 'auto': balanced search (default), 'fast': quick results, 'deep': comprehensive search"),contextMaxCharacters:F.number().optional().describe("Maximum characters for context string optimized for LLMs (default: 10000)")}),GG=F.object({query:F.string().describe("Search query to find relevant context for APIs, Libraries, and SDKs. For example, 'React useState hook examples', 'Python pandas dataframe filtering', 'Express.js middleware', 'Next js partial prerendering configuration'"),tokensNum:F.number().min(1000).max(50000).default(5000).describe("Number of tokens to return (1000-50000). Default is 5000 tokens. Adjust this value based on how much context you need - use lower values for focused queries and higher values for comprehensive documentation.")}),XG=F.object({name:F.string().describe("The name of the skill from available_skills")}),WG=F.object({patchText:F.string().describe("The full patch text that describes all changes to be made")}),jG=F.object({path:F.string().describe("The directory to switch to. Absolute or relative to current working directory. Use '~' to reset to project root.")}),OF=["goToDefinition","findReferences","hover","documentSymbol","workspaceSymbol","goToImplementation","prepareCallHierarchy","incomingCalls","outgoingCalls"],UG=F.object({operation:F.enum(OF).describe("The LSP operation to perform"),filePath:F.string().describe("The absolute or relative path to the file"),line:F.number().int().min(1).describe("The line number (1-based, as shown in editors)"),character:F.number().int().min(1).describe("The character offset (1-based, as shown in editors)")}),BG=F.object({}),HG=F.object({}),_G=F.object({operation:F.enum(["search"]).default("search").describe("Memory operation to perform"),query:F.string().describe("Search query (BM25 over markdown bodies)"),scope:F.enum(["global","projects","sessions","cc"]).optional().describe("Filter by memory scope"),scope_id:F.string().optional().describe("Filter by scope id (e.g., session id, task id, project id hash)"),type:F.string().optional().describe("Filter by memory type (pinned, snapshot, learning, progress, free, ...)"),limit:F.number().optional().describe("Max results (default 10)")}),qF=F.enum(["user_text","assistant_text","tool_input","tool_error","reasoning","tool_output"]),OG=F.object({operation:F.enum(["search","around"]).describe("search: FTS BM25; around: pull message context"),query:F.string().optional().describe("FTS query (BM25 over text/tool bodies). Required for operation=search."),scope:F.enum(["project","global"]).optional().describe("Default project."),session_id:F.string().optional(),kind:F.array(qF).optional(),tool_name:F.string().optional().describe("Filter to a specific tool (e.g. Bash, Read)"),time_after:F.number().optional().describe("Unix ms"),time_before:F.number().optional(),limit:F.number().optional().describe("Max 50, default 10"),message_id:F.string().optional().describe("Anchor message id. Required for operation=around."),before:F.number().optional().describe("Default 5"),after:F.number().optional().describe("Default 5")}),FF=F.enum(["open","in_progress","blocked","done","abandoned"]),zF=F.strictObject({action:F.literal("create"),summary:F.string().min(1).describe("Task summary for a single task."),parent_id:F.string().min(1).optional().describe("Parent task id for sub-tasks."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),CF=F.strictObject({action:F.literal("list"),status:FF.optional().describe("Filter by status."),include_terminal:F.boolean().optional().describe("Include done/abandoned tasks. Default false."),include_archived:F.boolean().optional().describe("Include archived tasks. Default false."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),MF=F.strictObject({action:F.literal("get"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),DF=F.strictObject({action:F.literal("start"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short note on starting."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),PF=F.strictObject({action:F.literal("block"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short reason for blocking."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),IF=F.strictObject({action:F.literal("unblock"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short reason for unblocking."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),AF=F.strictObject({action:F.literal("done"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short summary of what was completed."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),SF=F.strictObject({action:F.literal("abandon"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short reason for abandoning."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),wF=F.strictObject({action:F.literal("rename"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),summary:F.string().min(1).describe("New task summary."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),qG=F.strictObject({operation:F.discriminatedUnion("action",[zF,CF,MF,DF,PF,IF,AF,SF,wF]).meta({type:"object"})}),RF=F.strictObject({operation:F.literal("run"),name:F.string().min(1).optional().describe('(optional) Name of a built-in workflow to run (e.g. "deep-research"). Provide EITHER name OR script, not both.'),script:F.string().min(1).optional().describe("(optional) Inline JS workflow script; must begin with `export const meta = {...}`. Provide EITHER name OR script, not both."),args:F.any().optional().describe("(optional) JSON value exposed to the script as `args`."),workspace:F.string().optional().describe("(optional) Absolute dir the script's file primitives (readFile/writeFile/glob/exists) are jailed to. Defaults to the project worktree."),async:F.boolean().optional().describe("(optional) When true, return a run_id immediately and let the workflow run in the background; the result arrives later as an inbox notification. Default false: block until terminal and return the transcript inline (skill-like semantics, recommended for short workflows).")}),LF=F.strictObject({operation:F.literal("status"),run_id:F.string().min(1)}),NF=F.strictObject({operation:F.literal("wait"),run_id:F.string().min(1),timeout_ms:F.number().int().positive().optional()}),yF=F.strictObject({operation:F.literal("cancel"),run_id:F.string().min(1)}),TF=F.strictObject({operation:F.literal("resume"),run_id:F.string().min(1)}),FG=F.discriminatedUnion("operation",[RF,LF,NF,yF,TF]);import b3 from"os";import{createWriteStream as cA}from"fs";import{open as lA,stat as oA}from"fs/promises";class w0 extends Error{recoverable=!0;constructor($,J){super($,J);this.name="RecoverableError"}}function Wy($){if($ instanceof w0)return!0;return zG($)&&$.recoverable===!0}function _Z($,J){if(typeof $!=="string")return{value:$,decoded:!1,attempts:0};if($.trim()==="")return{value:$,decoded:!1,attempts:0};let Z=J?.maxDecodes,Y=Number.isFinite(Z)&&Z>=0?Z:2,K=Math.min(Y+1,3),Q=$,V=0;for(let X=0;X<K;X++){if(typeof Q!=="string")break;let W;try{W=JSON.parse(Q)}catch{return{value:$,decoded:!1,attempts:V}}if(V++,W!==null&&typeof W==="object")return{value:W,decoded:!0,attempts:V};if(typeof W==="string"){Q=W;continue}return{value:$,decoded:!1,attempts:V}}return{value:$,decoded:!1,attempts:V}}function CG($,J=500){let Z;try{Z=typeof $==="string"?$:JSON.stringify($)??String($)}catch{try{Z=String($)}catch{Z="<unrenderable>"}}let Y=J>0?J:0;if(Z.length<=Y)return Z;return`${Z.slice(0,Y)}\u2026 (${Z.length} chars total)`}var p0={};o$(p0,{layer:()=>BB,defaultLayer:()=>wA,Service:()=>A6,Info:()=>SA,Agent:()=>p0});var JB={};o$(JB,{renderWorkflowCatalog:()=>eU,layer:()=>$B,defaultLayer:()=>AA,Service:()=>P6});import kF from"path";function EF($){for(let J of E0.stream($,{agentID:"*"}))if(J.info.role==="user"&&J.info.model)return J.info.model;return}var MG=G.fn("runPlanSwitch")(function*($,J,Z){let Y=yield*$.session.get(J.sessionID),K=kF.relative(B$.worktree,Y1.plan(Y)),V=(yield*$.question.ask({sessionID:J.sessionID,questions:[{key:Z.key,params:{plan:K},question:Z.question(K),header:"Plan",options:Z.options}],tool:J.callID?{messageID:J.messageID,callID:J.callID}:void 0}))[0]?.[0];if(V==="No")return yield*new B1.RejectedError;if(V!=="Yes")return{title:"User provided feedback",output:`User chose not to switch yet and provided feedback: ${V}`,metadata:{switched:!1,feedback:V}};let X=EF(J.sessionID)??(yield*$.provider.defaultModel()),W={id:IJ.ascending(),sessionID:J.sessionID,role:"user",time:{created:Date.now()},agent:Z.agent,model:X};return yield*$.session.updateMessage(W),yield*$.session.updatePart({id:f2.ascending(),messageID:W.id,sessionID:J.sessionID,type:"text",text:Z.text(K),synthetic:!0}),{title:Z.title,output:Z.output,metadata:{switched:!0,feedback:""}}}),DG=H$("plan_enter",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("plan_enter"))??"",J=yield*Y1.Service,Z=yield*B1.Service,Y=yield*H1.Service;return{description:$,parameters:BG,execute:(K,Q)=>G.gen(function*(){if(Q.agent==="plan")return{title:"Already in plan mode",output:"You are already in plan mode. This tool is only effective outside of plan mode.",metadata:{switched:!1,feedback:""}};return yield*MG({session:J,question:Z,provider:Y},Q,{key:"plan_enter",question:()=>"Would you like to switch to plan mode for structured planning?",options:[{label:"Yes",description:"Switch to plan agent for read-only planning"},{label:"No",description:"Stay in current mode"}],agent:"plan",text:(V)=>`Switched to plan mode. Create a plan at ${V}`,title:"Switching to plan agent",output:"User approved switching to plan agent. Wait for further instructions."})}).pipe(G.orDie)}})),PG=H$("plan_exit",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("plan_exit"))??"",J=yield*Y1.Service,Z=yield*B1.Service,Y=yield*H1.Service;return{description:$,parameters:HG,execute:(K,Q)=>G.gen(function*(){if(Q.agent!=="plan")return{title:"Not in plan mode",output:"You are not in plan mode. This tool is only effective in plan mode.",metadata:{switched:!1,feedback:""}};return yield*MG({session:J,question:Z,provider:Y},Q,{key:"plan_exit",question:(V)=>`Plan at ${V} is complete. Would you like to switch to the build agent and start implementing?`,options:[{label:"Yes",description:"Switch to build agent and start implementing the plan"},{label:"No",description:"Stay with plan agent to continue refining the plan"}],agent:"build",text:(V)=>`The plan at ${V} has been approved, you can now edit files. Execute the plan`,title:"Switching to build agent",output:"User approved switching to build agent. Wait for further instructions."})}).pipe(G.orDie)}}));var xF=aV,bF=`
7275
+ Output: Creates directory 'foo'`)}),eV=F.object({filePath:F.string().describe("The absolute path to the file or directory to read"),offset:F.coerce.number().int().min(1).describe("The line number to start reading from (1-indexed)").optional(),limit:F.coerce.number().int().min(1).describe("The maximum number of lines to read (defaults to 2000)").optional()}),$G=F.object({pattern:F.string().describe("The glob pattern to match files against"),path:F.string().optional().describe('The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.')}),JG=F.object({pattern:F.string().describe("The regex pattern to search for in file contents"),path:F.string().optional().describe("The directory to search in. Defaults to the current working directory."),include:F.string().optional().describe('File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")')}),HF=F.object({filePath:F.string().describe("The absolute path to the file to modify"),oldString:F.string().describe("The text to replace"),newString:F.string().describe("The text to replace it with (must be different from oldString)"),replaceAll:F.boolean().optional().describe("Replace all occurrences of oldString (default false)")}),ZG=HF,YG=F.object({content:F.string().describe("The content to write to the file"),filePath:F.string().describe("The absolute path to the file to write (must be absolute, not relative)")}),_F="(optional) Model for this subagent: a model group name (e.g. fast/economical/default/power) or a literal provider/model. Overrides the agent's configured model; defaults to the agent's model, else the parent's. If no model_groups are configured, the tier names resolve to their default model.";function KG($=F.string()){let J=F.string().min(1).describe("Actor session id to operate on. Distinct from the user-task IDs (T1, T2, ...) used by the `task` tool."),Z=F.number().int().positive().optional().describe("(optional) Milliseconds to wait before returning { status: 'timeout' }. Default 600000 (10 min)."),Y=F.string().min(1).describe("A short (3-5 words) description of the task."),K=F.string().min(1).describe("The task for the agent to perform."),Q=$.describe("The type of specialized agent to use for this task."),V=F.string().min(1).optional().describe(_F),X=F.string().min(1).optional().describe("(optional) The command that triggered this task."),W=F.string().min(1).optional().describe("(optional) If this subagent is doing work for a specific task in the `task` tool, pass that task's ID (e.g. T4, T2.1) here \u2014 only an ID the `task` tool returned this session. After completion, the actor.postStop hook validates that tasks/<task_id>/progress.md exists with the required sections. If the ID is malformed or names no existing task, the binding is silently dropped and the subagent's findings are NOT captured to that task. Leave omitted only for work that isn't tied to a task."),_=F.strictObject({action:F.literal("run").describe("Spawn a subagent and block until it completes; the result is returned inline as the tool response."),description:Y,prompt:K,subagent_type:Q,model:V,actor_id:F.string().min(1).optional().describe("(optional) If set, resume the specified prior actor session instead of creating a new one. Distinct from the user-task IDs (T1, T2, ...) used by the `task` tool."),timeout_ms:Z,command:X,context:F.enum(["none","state","full"]).optional().describe("(optional) Context inheritance. 'none' (default): child sees only prompt. 'full': child sees parent conversation (prefix cache sharing). 'state': child gets checkpoint summary."),task_id:W,output_schema:F.record(F.string(),F.any()).optional().describe("(optional) A JSON Schema. When set, the subagent is forced to return a single structured object matching this schema (via the StructuredOutput tool) instead of free text; the validated object is returned in <actor_result>.")}),j=F.strictObject({action:F.literal("spawn").describe("Spawn a subagent and return its actor_id immediately; result is delivered as a notification or via a separate `wait` call."),description:Y,prompt:K,subagent_type:Q,model:V,actor_id:F.string().min(1).optional().describe("(optional) If set, resume the specified prior actor session instead of creating a new one."),command:X,context:F.enum(["none","state","full"]).optional().describe("(optional) Context inheritance. Default 'none'."),task_id:W,output_schema:F.record(F.string(),F.any()).optional().describe("(optional) A JSON Schema. When set, the subagent is forced to return a single structured object matching this schema (via the StructuredOutput tool) instead of free text.")}),H=F.strictObject({action:F.literal("status"),actor_id:J}),q=F.strictObject({action:F.literal("wait"),actor_id:J,timeout_ms:Z}),U=F.strictObject({action:F.literal("cancel"),actor_id:J}),z=F.strictObject({action:F.literal("send"),to_session_id:F.string().min(1).optional().describe("(optional) Target session ID. Defaults to the current session \u2014 useful for sending to subagents in this session."),to_actor_id:F.string().min(1).describe("Target actor ID. Use 'main' to send to a session's main agent, or a subagent ID like 'explore-1'."),content:F.string().min(1).describe("Message content (plain text). Wrapped in <inbox> for the receiver."),type:F.string().optional().describe("(optional) Message type. Default 'text' is wrapped in <inbox>...</inbox>. 'actor_notification' is passed through verbatim (sender pre-renders).")});return F.strictObject({operation:F.discriminatedUnion("action",[_,j,H,q,U,z]).meta({type:"object"})})}var QG=F.object({url:F.string().describe("The URL to fetch content from"),format:F.enum(["text","markdown","html"]).default("markdown").describe("The format to return the content in (text, markdown, or html). Defaults to markdown."),timeout:F.number().min(1).describe("Optional timeout in seconds (min 1, max 120)").optional()}),VG=F.object({query:F.string().describe("Websearch query"),numResults:F.number().optional().describe("Number of search results to return (default: 8)"),timeout:F.number().min(1).describe("Optional timeout in seconds (min 1, max 120)").optional(),livecrawl:F.enum(["fallback","preferred"]).optional().describe("Live crawl mode - 'fallback': use live crawling as backup if cached content unavailable, 'preferred': prioritize live crawling (default: 'fallback')"),type:F.enum(["auto","fast","deep"]).optional().describe("Search type - 'auto': balanced search (default), 'fast': quick results, 'deep': comprehensive search"),contextMaxCharacters:F.number().optional().describe("Maximum characters for context string optimized for LLMs (default: 10000)")}),GG=F.object({query:F.string().describe("Search query to find relevant context for APIs, Libraries, and SDKs. For example, 'React useState hook examples', 'Python pandas dataframe filtering', 'Express.js middleware', 'Next js partial prerendering configuration'"),tokensNum:F.number().min(1000).max(50000).default(5000).describe("Number of tokens to return (1000-50000). Default is 5000 tokens. Adjust this value based on how much context you need - use lower values for focused queries and higher values for comprehensive documentation.")}),XG=F.object({name:F.string().describe("The name of the skill from available_skills")}),WG=F.object({patchText:F.string().describe("The full patch text that describes all changes to be made")}),jG=F.object({path:F.string().describe("The directory to switch to. Absolute or relative to current working directory. Use '~' to reset to project root.")}),OF=["goToDefinition","findReferences","hover","documentSymbol","workspaceSymbol","goToImplementation","prepareCallHierarchy","incomingCalls","outgoingCalls"],UG=F.object({operation:F.enum(OF).describe("The LSP operation to perform"),filePath:F.string().describe("The absolute or relative path to the file"),line:F.number().int().min(1).describe("The line number (1-based, as shown in editors)"),character:F.number().int().min(1).describe("The character offset (1-based, as shown in editors)")}),BG=F.object({}),HG=F.object({}),_G=F.object({operation:F.enum(["search"]).default("search").describe("Memory operation to perform"),query:F.string().describe("Search query (BM25 over markdown bodies)"),scope:F.enum(["global","projects","sessions","cc"]).optional().describe("Filter by memory scope"),scope_id:F.string().optional().describe("Filter by scope id (e.g., session id, task id, project id hash)"),type:F.string().optional().describe("Filter by memory type (pinned, snapshot, learning, progress, free, ...)"),limit:F.number().optional().describe("Max results (default 10)")}),qF=F.enum(["user_text","assistant_text","tool_input","tool_error","reasoning","tool_output"]),OG=F.object({operation:F.enum(["search","around"]).describe("search: FTS BM25; around: pull message context"),query:F.string().optional().describe("FTS query (BM25 over text/tool bodies). Required for operation=search."),scope:F.enum(["project","global"]).optional().describe("Default project."),session_id:F.string().optional(),kind:F.array(qF).optional(),tool_name:F.string().optional().describe("Filter to a specific tool (e.g. Bash, Read)"),time_after:F.number().optional().describe("Unix ms"),time_before:F.number().optional(),limit:F.number().optional().describe("Max 50, default 10"),message_id:F.string().optional().describe("Anchor message id. Required for operation=around."),before:F.number().optional().describe("Default 5"),after:F.number().optional().describe("Default 5")}),FF=F.enum(["open","in_progress","blocked","done","abandoned"]),zF=F.strictObject({action:F.literal("create"),summary:F.string().min(1).describe("Task summary for a single task."),parent_id:F.string().min(1).optional().describe("Parent task id for sub-tasks."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),CF=F.strictObject({action:F.literal("list"),status:FF.optional().describe("Filter by status."),include_terminal:F.boolean().optional().describe("Include done/abandoned tasks. Default false."),include_archived:F.boolean().optional().describe("Include archived tasks. Default false."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),MF=F.strictObject({action:F.literal("get"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),DF=F.strictObject({action:F.literal("start"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short note on starting."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),PF=F.strictObject({action:F.literal("block"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short reason for blocking."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),IF=F.strictObject({action:F.literal("unblock"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short reason for unblocking."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),AF=F.strictObject({action:F.literal("done"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short summary of what was completed."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),SF=F.strictObject({action:F.literal("abandon"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),event_summary:F.string().min(1).optional().describe("Short reason for abandoning."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),wF=F.strictObject({action:F.literal("rename"),id:F.string().min(1).describe("Task id, e.g. T1 or T1.1."),summary:F.string().min(1).describe("New task summary."),session_id:F.string().min(1).optional().describe("Session id to act on. Defaults to current session.")}),qG=F.strictObject({operation:F.discriminatedUnion("action",[zF,CF,MF,DF,PF,IF,AF,SF,wF]).meta({type:"object"})}),RF=F.strictObject({operation:F.literal("run"),name:F.string().min(1).optional().describe('(optional) Name of a built-in workflow to run (e.g. "deep-research"). Provide EITHER name OR script, not both.'),script:F.string().min(1).optional().describe("(optional) Inline JS workflow script; must begin with `export const meta = {...}`. Provide EITHER name OR script, not both."),args:F.any().optional().describe("(optional) JSON value exposed to the script as `args`."),workspace:F.string().optional().describe("(optional) Absolute dir the script's file primitives (readFile/writeFile/glob/exists) are jailed to. Defaults to the project worktree."),async:F.boolean().optional().describe("(optional) When true, return a run_id immediately and let the workflow run in the background; the result arrives later as an inbox notification. Default false: block until terminal and return the transcript inline (skill-like semantics, recommended for short workflows).")}),LF=F.strictObject({operation:F.literal("status"),run_id:F.string().min(1)}),NF=F.strictObject({operation:F.literal("wait"),run_id:F.string().min(1),timeout_ms:F.number().int().positive().optional()}),yF=F.strictObject({operation:F.literal("cancel"),run_id:F.string().min(1)}),TF=F.strictObject({operation:F.literal("resume"),run_id:F.string().min(1)}),FG=F.discriminatedUnion("operation",[RF,LF,NF,yF,TF]);import b3 from"os";import{createWriteStream as cA}from"fs";import{open as lA,stat as oA}from"fs/promises";class R0 extends Error{recoverable=!0;constructor($,J){super($,J);this.name="RecoverableError"}}function Wy($){if($ instanceof R0)return!0;return zG($)&&$.recoverable===!0}function _Z($,J){if(typeof $!=="string")return{value:$,decoded:!1,attempts:0};if($.trim()==="")return{value:$,decoded:!1,attempts:0};let Z=J?.maxDecodes,Y=Number.isFinite(Z)&&Z>=0?Z:2,K=Math.min(Y+1,3),Q=$,V=0;for(let X=0;X<K;X++){if(typeof Q!=="string")break;let W;try{W=JSON.parse(Q)}catch{return{value:$,decoded:!1,attempts:V}}if(V++,W!==null&&typeof W==="object")return{value:W,decoded:!0,attempts:V};if(typeof W==="string"){Q=W;continue}return{value:$,decoded:!1,attempts:V}}return{value:$,decoded:!1,attempts:V}}function CG($,J=500){let Z;try{Z=typeof $==="string"?$:JSON.stringify($)??String($)}catch{try{Z=String($)}catch{Z="<unrenderable>"}}let Y=J>0?J:0;if(Z.length<=Y)return Z;return`${Z.slice(0,Y)}\u2026 (${Z.length} chars total)`}var c0={};o$(c0,{layer:()=>BB,defaultLayer:()=>wA,Service:()=>A6,Info:()=>SA,Agent:()=>c0});var JB={};o$(JB,{renderWorkflowCatalog:()=>eU,layer:()=>$B,defaultLayer:()=>AA,Service:()=>P6});import kF from"path";function EF($){for(let J of w0.stream($,{agentID:"*"}))if(J.info.role==="user"&&J.info.model)return J.info.model;return}var MG=G.fn("runPlanSwitch")(function*($,J,Z){let Y=yield*$.session.get(J.sessionID),K=kF.relative(B$.worktree,Y1.plan(Y)),V=(yield*$.question.ask({sessionID:J.sessionID,questions:[{key:Z.key,params:{plan:K},question:Z.question(K),header:"Plan",options:Z.options}],tool:J.callID?{messageID:J.messageID,callID:J.callID}:void 0}))[0]?.[0];if(V==="No")return yield*new B1.RejectedError;if(V!=="Yes")return{title:"User provided feedback",output:`User chose not to switch yet and provided feedback: ${V}`,metadata:{switched:!1,feedback:V}};let X=EF(J.sessionID)??(yield*$.provider.defaultModel()),W={id:IJ.ascending(),sessionID:J.sessionID,role:"user",time:{created:Date.now()},agent:Z.agent,model:X};return yield*$.session.updateMessage(W),yield*$.session.updatePart({id:f2.ascending(),messageID:W.id,sessionID:J.sessionID,type:"text",text:Z.text(K),synthetic:!0}),{title:Z.title,output:Z.output,metadata:{switched:!0,feedback:""}}}),DG=H$("plan_enter",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("plan_enter"))??"",J=yield*Y1.Service,Z=yield*B1.Service,Y=yield*H1.Service;return{description:$,parameters:BG,execute:(K,Q)=>G.gen(function*(){if(Q.agent==="plan")return{title:"Already in plan mode",output:"You are already in plan mode. This tool is only effective outside of plan mode.",metadata:{switched:!1,feedback:""}};return yield*MG({session:J,question:Z,provider:Y},Q,{key:"plan_enter",question:()=>"Would you like to switch to plan mode for structured planning?",options:[{label:"Yes",description:"Switch to plan agent for read-only planning"},{label:"No",description:"Stay in current mode"}],agent:"plan",text:(V)=>`Switched to plan mode. Create a plan at ${V}`,title:"Switching to plan agent",output:"User approved switching to plan agent. Wait for further instructions."})}).pipe(G.orDie)}})),PG=H$("plan_exit",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("plan_exit"))??"",J=yield*Y1.Service,Z=yield*B1.Service,Y=yield*H1.Service;return{description:$,parameters:HG,execute:(K,Q)=>G.gen(function*(){if(Q.agent!=="plan")return{title:"Not in plan mode",output:"You are not in plan mode. This tool is only effective in plan mode.",metadata:{switched:!1,feedback:""}};return yield*MG({session:J,question:Z,provider:Y},Q,{key:"plan_exit",question:(V)=>`Plan at ${V} is complete. Would you like to switch to the build agent and start implementing?`,options:[{label:"Yes",description:"Switch to build agent and start implementing the plan"},{label:"No",description:"Stay with plan agent to continue refining the plan"}],agent:"build",text:(V)=>`The plan at ${V} has been approved, you can now edit files. Execute the plan`,title:"Switching to build agent",output:"User approved switching to build agent. Wait for further instructions."})}).pipe(G.orDie)}}));var xF=aV,bF=`
7276
7276
 
7277
7277
  ## Client rules for this prompt
7278
7278
  - A free-text answer is ALWAYS offered alongside your options. Never add an option that only means "Type your own answer", "Provide details", "Other" or similar \u2014 the client strips those, and a list with one real entry is not a choice.
@@ -7336,7 +7336,7 @@ ${M}`;return{metadata:{diagnostics:U,diff:W,filediff:H},title:`${SJ.relative(B$.
7336
7336
  `),Z=J.filter((Q)=>(Q.startsWith("+")||Q.startsWith("-")||Q.startsWith(" "))&&!Q.startsWith("---")&&!Q.startsWith("+++"));if(Z.length===0)return $;let Y=1/0;for(let Q of Z){let V=Q.slice(1);if(V.trim().length>0){let X=V.match(/^(\s*)/);if(X)Y=Math.min(Y,X[1].length)}}if(Y===1/0||Y===0)return $;return J.map((Q)=>{if((Q.startsWith("+")||Q.startsWith("-")||Q.startsWith(" "))&&!Q.startsWith("---")&&!Q.startsWith("+++")){let V=Q[0],X=Q.slice(1);return V+X.slice(Y)}return Q}).join(`
7337
7337
  `)}function Qz($,J,Z,Y=!1){if(J===Z)throw Error("No changes to apply: oldString and newString are identical.");let K=!0;for(let Q of[nF,aF,tF,eF,$z,Jz,Yz,Kz,Zz])for(let V of Q($,J)){let X=$.indexOf(V);if(X===-1)continue;if(K=!1,Y)return $.replaceAll(V,Z);let W=$.lastIndexOf(V);if(X!==W)continue;return $.substring(0,X)+Z+$.substring(X+V.length)}if(K)throw Error("Could not find oldString in the file. It must match exactly, including whitespace, indentation, and line endings.");throw Error("Found multiple matches for oldString. Provide more surrounding context to make the match unique.")}import OZ from"path";var hG=H$("glob",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("glob"))??"",J=yield*h0.Service,Z=yield*$$.Service;return{description:$,parameters:$G,execute:(Y,K)=>G.gen(function*(){let Q=yield*i.context;yield*K.ask({permission:"glob",patterns:[Y.pattern],always:["*"],metadata:{pattern:Y.pattern,path:Y.path}});let V=Y.path??t$.get(K.sessionID);if(V=OZ.isAbsolute(V)?V:OZ.resolve(t$.get(K.sessionID),V),(yield*Z.stat(V).pipe(G.catch(()=>G.succeed(void 0))))?.type==="File")throw Error(`glob path must be a directory: ${V}`);yield*_1(K,V,{kind:"directory"});let W=100,_=!1,j=yield*J.files({cwd:V,glob:[Y.pattern],signal:K.abort}).pipe(vG((q)=>G.gen(function*(){let U=OZ.resolve(V,q),M=(yield*Z.stat(U).pipe(G.catch(()=>G.succeed(void 0))))?.mtime.pipe(p1.map((I)=>I.getTime()),p1.getOrElse(()=>0))??0;return{path:U,mtime:M}})),qZ(W+1),BJ,G.map((q)=>[...q]));if(j.length>W)_=!0,j.length=W;j.sort((q,U)=>U.mtime-q.mtime);let H=[];if(j.length===0)H.push("No files found");if(j.length>0){if(H.push(...j.map((q)=>q.path)),_)H.push(""),H.push(`(Results are truncated: showing first ${W} results. Consider using a more specific path or pattern.)`)}return{title:OZ.relative(Q.worktree,V),metadata:{count:j.length,truncated:_},output:H.join(`
7338
7338
  `)}}).pipe(G.orDie)}}));import wJ from"path";var gG=2000,fG=H$("grep",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("grep"))??"",J=yield*$$.Service,Z=yield*h0.Service;return{description:$,parameters:JG,execute:(Y,K)=>G.gen(function*(){let Q={title:Y.pattern,metadata:{matches:0,truncated:!1},output:"No files found"};if(!Y.pattern)throw Error("pattern is required");yield*K.ask({permission:"grep",patterns:[Y.pattern],always:["*"],metadata:{pattern:Y.pattern,path:Y.path,include:Y.include}});let V=t$.get(K.sessionID),X=wJ.isAbsolute(Y.path??V)?Y.path??V:wJ.join(V,Y.path??"."),W=$$.resolve(X),_=yield*J.stat(W).pipe(G.catch(()=>G.succeed(void 0))),j=_?.type==="Directory"?W:wJ.dirname(W),H=_?.type==="Directory"?void 0:[wJ.relative(j,W)];yield*_1(K,X,{kind:_?.type==="Directory"?"directory":"file"});let q=yield*Z.search({cwd:j,pattern:Y.pattern,glob:Y.include?[Y.include]:void 0,file:H,signal:K.abort});if(q.items.length===0)return Q;let U=q.items.map((N)=>({path:$$.resolve(wJ.isAbsolute(N.path.text)?N.path.text:wJ.join(j,N.path.text)),line:N.line_number,text:N.lines.text})),z=new Map((yield*G.forEach([...new Set(U.map((N)=>N.path))],G.fnUntraced(function*(N){let x=yield*J.stat(N).pipe(G.catch(()=>G.succeed(void 0)));if(!x||x.type==="Directory")return;return[N,x.mtime.pipe(p1.map((b)=>b.getTime()),p1.getOrElse(()=>0))??0]}),{concurrency:16})).filter((N)=>Boolean(N))),M=U.flatMap((N)=>{let x=z.get(N.path);if(x===void 0)return[];return[{...N,mtime:x}]});M.sort((N,x)=>x.mtime-N.mtime);let I=100,C=M.length>I,P=C?M.slice(0,I):M;if(P.length===0)return Q;let D=M.length,L=[`Found ${D} matches${C?` (showing first ${I})`:""}`],R="";for(let N of P){if(R!==N.path){if(R!=="")L.push("");R=N.path,L.push(`${N.path}:`)}let x=N.text.length>gG?N.text.substring(0,gG)+"...":N.text;L.push(` Line ${N.line}: ${x}`)}if(C)L.push(""),L.push(`(Results truncated: showing ${I} of ${D} matches (${D-I} hidden). Consider using a more specific path or pattern.)`);if(q.partial)L.push(""),L.push("(Some paths were inaccessible and skipped)");return{title:Y.pattern,metadata:{matches:D,truncated:C},output:L.join(`
7339
- `)}}).pipe(G.orDie)}}));var Vz=20480,mG=H$("history",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("history"))??"",J=yield*MJ.Service,Z=yield*Z1,Y=yield*p0.Service;return{description:$,parameters:OG,execute:(K,Q)=>G.gen(function*(){if(K.operation==="search"){if(!K.query)return{title:"History search: missing query",output:"operation=search requires a `query` argument.",metadata:{count:0,incomplete:!1}};let{hits:H,incomplete:q}=yield*J.search({query:K.query,scope:K.scope,session_id:K.session_id,kind:K.kind,tool_name:K.tool_name,time_after:K.time_after,time_before:K.time_before,limit:K.limit}),U=q?"NOTE: Results may be incomplete \u2014 the filters were too selective for the search's safety cap, so real matches may have been missed. Narrow the query (add rarer/more distinctive terms) or loosen the filters and retry.":"";if(H.length===0)return{title:"History search: 0 matches",output:[`0 matches for "${K.query}". Try memory search if you haven't, or broaden the query.`,...U?["",U]:[]].join(`
7339
+ `)}}).pipe(G.orDie)}}));var Vz=20480,mG=H$("history",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("history"))??"",J=yield*MJ.Service,Z=yield*Z1,Y=yield*c0.Service;return{description:$,parameters:OG,execute:(K,Q)=>G.gen(function*(){if(K.operation==="search"){if(!K.query)return{title:"History search: missing query",output:"operation=search requires a `query` argument.",metadata:{count:0,incomplete:!1}};let{hits:H,incomplete:q}=yield*J.search({query:K.query,scope:K.scope,session_id:K.session_id,kind:K.kind,tool_name:K.tool_name,time_after:K.time_after,time_before:K.time_before,limit:K.limit}),U=q?"NOTE: Results may be incomplete \u2014 the filters were too selective for the search's safety cap, so real matches may have been missed. Narrow the query (add rarer/more distinctive terms) or loosen the filters and retry.":"";if(H.length===0)return{title:"History search: 0 matches",output:[`0 matches for "${K.query}". Try memory search if you haven't, or broaden the query.`,...U?["",U]:[]].join(`
7340
7340
  `),metadata:{count:0,incomplete:q}};let z=[`Found ${H.length} match${H.length===1?"":"es"}:`,""];if(U)z.splice(1,0,U);for(let M of H){let I=M.tool_name?`${M.kind} \xB7 ${M.tool_name}`:M.kind;z.push(`### ${M.session_id} ${M.message_id} (${I})`),z.push(`Time: ${new Date(M.time_created).toISOString()}, Score: ${M.score.toFixed(3)}`),z.push(M.snippet),z.push("")}return{title:`History search: ${H.length} match${H.length===1?"":"es"}${q?" (may be incomplete)":""}`,output:z.join(`
7341
7341
  `),metadata:{count:H.length,incomplete:q}}}if(!K.message_id)return{title:"History around: missing message_id",output:"operation=around requires a `message_id` argument.",metadata:{count:0,incomplete:!1}};let V=yield*J.around({message_id:K.message_id,before:K.before,after:K.after});if(V.messages.length===0)return{title:"History around: anchor not found",output:`No message with id ${K.message_id}.`,metadata:{count:0,incomplete:!1}};let X=[`Session ${V.session_id}, ${V.messages.length} messages (anchor ${K.message_id}):`,""];for(let H of V.messages){let q=H.matched?">>>":"---";X.push(`${q} ${H.message_id} (${new Date(H.time_created).toISOString()})`);for(let U of H.parts){let z=U.tool_name?`${U.type} (${U.tool_name})`:U.type;X.push(` ${U.role} \xB7 ${z}:`),X.push(U.text.split(`
7342
7342
  `).map((M)=>` ${M}`).join(`
@@ -7388,12 +7388,12 @@ ${I.map((b)=>b.content).join(`
7388
7388
  `)K++;V+=2;continue}if(X===Q){Q=null,Z+=X,V++;continue}if(X===`
7389
7389
  `)K++;Z+=X,V++;continue}if(X==='"'||X==="'"){Q=X,Z+=X,V++;continue}if(X==="\\"&&V+1<$.length&&$[V+1]===`
7390
7390
  `){K++,V+=2;continue}if(X===`
7391
- `){J.push({line:Y,text:Z}),Z="",K++,Y=K,V++;continue}Z+=X,V++}if(Z.length>0)J.push({line:Y,text:Z});return J}function GX($,J,Z){let Y=$.length,K=J.length;if(Math.abs(Y-K)>Z)return Z+1;if(Y===0)return K;if(K===0)return Y;if(Y<K)return GX(J,$,Z);let Q=Array(K+1),V=Array(K+1);for(let X=0;X<=K;X++)Q[X]=X;for(let X=1;X<=Y;X++){V.fill(Z+1),V[0]=X;let W=Math.max(1,X-Z),_=Math.min(K,X+Z),j=Number.POSITIVE_INFINITY;for(let H=W;H<=_;H++){let q=$[X-1]===J[H-1]?0:1;V[H]=Math.min(Q[H]+1,V[H-1]+1,Q[H-1]+q),j=Math.min(j,V[H])}if(j>Z)return Z+1;[Q,V]=[V,Q]}return Q[K]}function PZ($,J){let Z;for(let Y of J){if(GX($,Y,2)>2)continue;if(Z!==void 0)return;Z=Y}return Z}function IZ($){if($==null||typeof $!=="object")return;let J=$;if(typeof J.operation==="string")try{let Z=JSON.parse(J.operation);if(Z&&typeof Z==="object"&&!Array.isArray(Z))J={operation:Z}}catch{}if(J.operation&&typeof J.operation==="object"&&!Array.isArray(J.operation))return{kind:"operation",operation:J.operation};return{kind:"bare",obj:J}}var c2={};o$(c2,{layer:()=>jX,defaultLayer:()=>dz,Service:()=>AZ,ActorWaiter:()=>c2});var gz=/^\s*\*\*Status\*\*:\s*(success|partial|failed|blocked)\b/im,fz=/\*\*Summary\*\*:\s*(.+)$/im;function XX($){if(!$)return{};let J=$.match(gz)?.[1]?.toLowerCase(),Z=$.match(fz)?.[1]?.trim();return{...J?{status:J}:{},...Z?{summary:Z}:{}}}var uz=600000;function b7($){return $.status==="idle"&&($.lifecycle==="ephemeral"||$.lastOutcome!==void 0&&$.lastOutcome!=="success")}class AZ extends D$.Service()("@qitqode/ActorWaiter"){}var jX=f.effect(AZ,G.gen(function*(){let $=yield*L1.Service,J=yield*P$.Service,Z=yield*Y1.Service,Y=(V,X)=>G.gen(function*(){let _=(yield*Z.messages({sessionID:V,agentID:X})).findLast((q)=>q.info.role==="assistant");if(!_)return{result:void 0,structured:void 0};let j=_.info.role==="assistant"?_.info.structured:void 0;if(j!==void 0)return{result:void 0,structured:j};return{result:_.parts.findLast((q)=>q.type==="text")?.text,structured:void 0}}),K=(V,X,W)=>G.gen(function*(){let _=W.status==="idle"&&W.lastOutcome==="success"?yield*Y(V,X):{result:void 0,structured:void 0},j=XX(_.result);return{status:W.status,actor_id:W.actorID,description:W.description,agent:W.agent,background:W.background,turnCount:W.turnCount,lastTurnTime:W.lastTurnTime,lastOutcome:W.lastOutcome,...W.lastError!==void 0?{error:W.lastError}:{},..._.result!==void 0?{result:_.result}:{},..._.structured!==void 0?{structured:_.structured}:{},...j.status?{reportedStatus:j.status}:{},...j.summary?{reportedSummary:j.summary}:{},time:W.time}}),Q=G.fn("ActorWaiter.wait")(function*(V){let X=yield*$.get(V.sessionID,V.actor_id);if(!X)return{status:"unknown",actor_id:V.actor_id};if(b7(X))return yield*K(V.sessionID,V.actor_id,X);let W=yield*B0.make(),_=V.timeout_ms??uz,j=yield*O1.make();return yield*G.acquireUseRelease(J.subscribeCallback(WX,(H)=>{if(H.properties.actorID!==V.actor_id)return;if(H.properties.sessionID!==V.sessionID)return;j.fork(G.gen(function*(){let q=yield*$.get(V.sessionID,V.actor_id);if(!q)return;if(!b7(q))return;let U=yield*K(V.sessionID,V.actor_id,q);B0.doneUnsafe(W,G.succeed(U))}).pipe(G.catchCause((q)=>G.logError(`waiter rehydrate failed: ${q}`))))}),()=>G.gen(function*(){let H=yield*$.get(V.sessionID,V.actor_id);if(H&&b7(H))return yield*K(V.sessionID,V.actor_id,H);let q=yield*B0.await(W).pipe(G.timeout(_),G.catchTag("TimeoutError",()=>G.succeed(null)));if(q===null)return{status:"timeout",actor_id:V.actor_id};return q}),(H)=>G.sync(()=>H()))});return AZ.of({wait:Q})})),dz=jX.pipe(f.provide(P$.defaultLayer),f.provide(L1.defaultLayer),f.provide(Y1.defaultLayer));var SZ={current:void 0};var K1={};o$(K1,{layer:()=>OX,defaultLayer:()=>iz,TaskRegistry:()=>K1,Service:()=>wZ});var L$=b2("task",{id:i$().notNull(),session_id:i$().$type().notNull().references(()=>V0.id,{onDelete:"cascade"}),parent_task_id:i$(),status:i$().$type().notNull(),summary:i$().notNull(),owner:i$(),created_at:t0().notNull(),last_event_at:t0().notNull(),ended_at:t0(),cleanup_after:t0()},($)=>[BX({columns:[$.session_id,$.id]}),e0("task_session_idx").on($.session_id),e0("task_parent_idx").on($.session_id,$.parent_task_id),e0("task_status_idx").on($.status)]),RJ=b2("task_event",{id:t0().primaryKey({autoIncrement:!0}),session_id:i$().$type().notNull().references(()=>V0.id,{onDelete:"cascade"}),task_id:i$().notNull(),at:t0().notNull(),kind:i$().notNull(),summary:i$()},($)=>[UX({columns:[$.session_id,$.task_id],foreignColumns:[L$.session_id,L$.id]}).onDelete("cascade"),e0("task_event_task_idx").on($.session_id,$.task_id,$.at)]);var C8=F.string().regex(/^T\d+(\.\d+)*$/,"Task ID must be Tn or Tn.m..."),pz=F.enum(["open","in_progress","blocked","done","abandoned"]),v7=F.object({id:C8,session_id:F0.zod,parent_task_id:C8.optional(),status:pz,summary:F.string(),owner:F.string().optional(),created_at:F.number(),last_event_at:F.number(),ended_at:F.number().optional(),cleanup_after:F.number().optional()}),h7=F.enum(["created","started","unstarted","blocked","unblocked","done","abandoned","renamed"]),Tk=F.object({id:F.number(),task_id:C8,at:F.number(),kind:h7,summary:F.string().optional()});var HX=Z0.define("task.created",F.object({sessionID:F0.zod,task:v7})),cz=h7.exclude(["created"]),_X=Z0.define("task.updated",F.object({sessionID:F0.zod,task:v7,kind:cz}));var lz=86400000,LJ=($)=>`Task ${$} not found. Use \`task list\` to see valid task IDs, or \`task create\` to add one.`;function g7($){return{id:$.id,session_id:$.session_id,parent_task_id:$.parent_task_id??void 0,status:$.status,summary:$.summary,owner:$.owner??void 0,created_at:$.created_at,last_event_at:$.last_event_at,ended_at:$.ended_at??void 0,cleanup_after:$.cleanup_after??void 0}}function oz($){return{id:$.id,task_id:$.task_id,at:$.at,kind:$.kind,summary:$.summary??void 0}}function rz($,J){let Z=$?`${$}.`:"T",Y=J.filter((Q)=>$?Q.startsWith(Z):/^T\d+$/.test(Q)).map((Q)=>{let V=Q.slice(Z.length);return/^\d+$/.test(V)?Number(V):0}),K=Y.length>0?Math.max(...Y)+1:1;return`${Z}${K}`}class wZ extends D$.Service()("@qitqode/TaskRegistry"){}var OX=f.effect(wZ,G.gen(function*(){let $=yield*P$.Service,J=yield*R$.Service,Z=G.fn("TaskRegistry.cleanupAfter")(function*(C){let P=yield*J.get(),D=P.checkpoint?.task_archive_days??P.checkpoint?.task_cleanup_days??7;return C+D*lz}),Y=(C,P,D,L,R)=>{z$.use((N)=>N.insert(RJ).values({session_id:C,task_id:P,at:R,kind:D,summary:L??null}).run())},K=(C,P)=>C.fork($.publish(HX,{sessionID:P.session_id,task:P})),Q=(C,P,D)=>C.fork($.publish(_X,{sessionID:P.session_id,task:P,kind:D})),V=G.fn("TaskRegistry.create")(function*(C){let P=yield*O1.make(),D=Date.now(),L=z$.use((b)=>b.select({id:L$.id}).from(L$).where(_0(G$(L$.session_id,C.session_id),C.parent_id?G$(L$.parent_task_id,C.parent_id):f7(L$.parent_task_id))).all()),R=rz(C.parent_id,L.map((b)=>b.id)),N={id:R,session_id:C.session_id,parent_task_id:C.parent_id??null,status:"open",summary:C.summary,owner:C.owner??null,created_at:D,last_event_at:D,ended_at:null,cleanup_after:null};z$.use((b)=>b.insert(L$).values(N).run()),Y(C.session_id,R,"created",void 0,D);let x=g7(N);return K(P,x),x}),X=G.fn("TaskRegistry.list")(function*(C){let P=Date.now(),D=[];if(C.session_id)D.push(G$(L$.session_id,C.session_id));if(C.status)D.push(G$(L$.status,C.status));if(C.owner)D.push(G$(L$.owner,C.owner));if(!C.include_terminal){let N=NJ(G$(L$.status,"open"),G$(L$.status,"in_progress"),G$(L$.status,"blocked"));if(N)D.push(N)}if(!C.include_archived){let N=NJ(f7(L$.cleanup_after),JZ(L$.cleanup_after,P));if(N)D.push(N)}let L=D.length>0?_0(...D):void 0;return z$.use((N)=>N.select().from(L$).where(L).orderBy(L$.created_at).all()).map(g7)}),W=G.fn("TaskRegistry.get")(function*(C){let P=z$.use((D)=>D.select().from(L$).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).get());return P?g7(P):void 0}),_=G.fn("TaskRegistry.events")(function*(C){return z$.use((D)=>D.select().from(RJ).where(_0(G$(RJ.session_id,C.session_id),G$(RJ.task_id,C.task_id))).orderBy(RJ.at).all()).map(oz)}),j=G.fn("TaskRegistry.block")(function*(C){let P=yield*O1.make(),D=Date.now();z$.use((R)=>R.update(L$).set({status:"blocked",last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"blocked",C.event_summary,D);let L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new w0(LJ(C.id)));return Q(P,L,"blocked"),L}),H=G.fn("TaskRegistry.unblock")(function*(C){let P=yield*O1.make(),D=Date.now();z$.use((R)=>R.update(L$).set({status:"open",last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"unblocked",C.event_summary,D);let L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new w0(LJ(C.id)));return Q(P,L,"unblocked"),L}),q=G.fn("TaskRegistry.start")(function*(C){let P=yield*O1.make(),D=Date.now(),L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new w0(LJ(C.id)));if(L.status==="done"||L.status==="abandoned")return yield*G.logWarning(`refusing to start terminal task ${C.id} (status=${L.status})`),L;let R=C.owner??L.owner;if(L.status==="in_progress"&&R===L.owner)return L;z$.use((x)=>x.update(L$).set({status:"in_progress",owner:R??null,last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"started",C.event_summary,D);let N=yield*W({session_id:C.session_id,id:C.id});if(!N)return yield*G.die(new w0(LJ(C.id)));return Q(P,N,"started"),N}),U=G.fn("TaskRegistry.finish")(function*(C){let P=yield*O1.make(),D=Date.now(),L=yield*Z(D);z$.use((N)=>N.update(L$).set({status:C.status,ended_at:D,cleanup_after:L,last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,C.status,C.event_summary,D);let R=yield*W({session_id:C.session_id,id:C.id});if(!R)return yield*G.die(new w0(LJ(C.id)));return Q(P,R,C.status),R}),z=G.fn("TaskRegistry.done")(function*(C){return yield*U({...C,status:"done"})}),M=G.fn("TaskRegistry.abandon")(function*(C){return yield*U({...C,status:"abandoned"})}),I=G.fn("TaskRegistry.rename")(function*(C){let P=yield*O1.make(),D=Date.now();z$.use((R)=>R.update(L$).set({summary:C.summary,last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"renamed",C.summary,D);let L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new w0(LJ(C.id)));return Q(P,L,"renamed"),L});return wZ.of({create:V,list:X,get:W,events:_,block:j,unblock:H,done:z,abandon:M,rename:I,start:q})})),iz=f.suspend(()=>OX.pipe(f.provide(P$.layer),f.provide(R$.defaultLayer)));var o2={};o$(o2,{renderRebuildContext:()=>DC,renderIndex:()=>MC,loadLatest:()=>zC,loadCheckpoints:()=>CC,layer:()=>dX,lastBoundary:()=>PC,isWriterRunning:()=>IC,hasCheckpoint:()=>FC,defaultLayer:()=>pX,composeWriterPromptForTest:()=>LZ,SessionCheckpoint:()=>o2,Service:()=>D8});import OC from"path";import qC from"fs/promises";import EX from"path";var qX={current:void 0};function RZ(){try{return B$.current?.project?.id}catch{return}}function sz($){if(!Array.isArray($.content))return[];let J=[];for(let Z of $.content)if(Z.type==="tool_result"&&typeof Z.tool_use_id==="string")J.push(Z.tool_use_id);return J}function FX($){if(!Array.isArray($.content))return[];let J=[];for(let Z of $.content)if(Z.type==="tool_use"&&typeof Z.id==="string")J.push(Z.id);return J}function zX($,J){if(J<=0||J>=$.length)return J;let Z=J,Y=[],K=new Set;for(let X=Z;X<$.length;X++){Y.push(...sz($[X]));for(let W of FX($[X]))K.add(W)}let Q=new Set(Y.filter((X)=>!K.has(X)));for(let X=Z-1;X>=0&&Q.size>0;X--){let W=$[X];if(W.role!=="assistant")continue;let _=!1;for(let j of FX(W))if(Q.delete(j))_=!0;if(_)Z=X}let V=$[Z]?.id;if(V)for(let X=Z-1;X>=0;X--)if($[X].id===V)Z=X;else break;return Z}function CX($,J){if(J>=$.length)return J;for(let Z=J;Z>=0;Z--){let Y=$[Z];if(Y.info.role!=="user")continue;if(!(Y.parts.length>0&&Y.parts.every((Q)=>Q.type==="tool_result")))return Z}return 0}import nz from"fs/promises";import az from"path";var tz=O$.create({service:"session.progress-reconcile"});function ez($){let J=$.match(/^---\n([\s\S]*?)\n---\n/);if(!J)return null;let Z=J[1].split(`
7391
+ `){J.push({line:Y,text:Z}),Z="",K++,Y=K,V++;continue}Z+=X,V++}if(Z.length>0)J.push({line:Y,text:Z});return J}function GX($,J,Z){let Y=$.length,K=J.length;if(Math.abs(Y-K)>Z)return Z+1;if(Y===0)return K;if(K===0)return Y;if(Y<K)return GX(J,$,Z);let Q=Array(K+1),V=Array(K+1);for(let X=0;X<=K;X++)Q[X]=X;for(let X=1;X<=Y;X++){V.fill(Z+1),V[0]=X;let W=Math.max(1,X-Z),_=Math.min(K,X+Z),j=Number.POSITIVE_INFINITY;for(let H=W;H<=_;H++){let q=$[X-1]===J[H-1]?0:1;V[H]=Math.min(Q[H]+1,V[H-1]+1,Q[H-1]+q),j=Math.min(j,V[H])}if(j>Z)return Z+1;[Q,V]=[V,Q]}return Q[K]}function PZ($,J){let Z;for(let Y of J){if(GX($,Y,2)>2)continue;if(Z!==void 0)return;Z=Y}return Z}function IZ($){if($==null||typeof $!=="object")return;let J=$;if(typeof J.operation==="string")try{let Z=JSON.parse(J.operation);if(Z&&typeof Z==="object"&&!Array.isArray(Z))J={operation:Z}}catch{}if(J.operation&&typeof J.operation==="object"&&!Array.isArray(J.operation))return{kind:"operation",operation:J.operation};return{kind:"bare",obj:J}}var c2={};o$(c2,{layer:()=>jX,defaultLayer:()=>dz,Service:()=>AZ,ActorWaiter:()=>c2});var gz=/^\s*\*\*Status\*\*:\s*(success|partial|failed|blocked)\b/im,fz=/\*\*Summary\*\*:\s*(.+)$/im;function XX($){if(!$)return{};let J=$.match(gz)?.[1]?.toLowerCase(),Z=$.match(fz)?.[1]?.trim();return{...J?{status:J}:{},...Z?{summary:Z}:{}}}var uz=600000;function b7($){return $.status==="idle"&&($.lifecycle==="ephemeral"||$.lastOutcome!==void 0&&$.lastOutcome!=="success")}class AZ extends D$.Service()("@qitqode/ActorWaiter"){}var jX=f.effect(AZ,G.gen(function*(){let $=yield*L1.Service,J=yield*P$.Service,Z=yield*Y1.Service,Y=(V,X)=>G.gen(function*(){let _=(yield*Z.messages({sessionID:V,agentID:X})).findLast((q)=>q.info.role==="assistant");if(!_)return{result:void 0,structured:void 0};let j=_.info.role==="assistant"?_.info.structured:void 0;if(j!==void 0)return{result:void 0,structured:j};return{result:_.parts.findLast((q)=>q.type==="text")?.text,structured:void 0}}),K=(V,X,W)=>G.gen(function*(){let _=W.status==="idle"&&W.lastOutcome==="success"?yield*Y(V,X):{result:void 0,structured:void 0},j=XX(_.result);return{status:W.status,actor_id:W.actorID,description:W.description,agent:W.agent,background:W.background,turnCount:W.turnCount,lastTurnTime:W.lastTurnTime,lastOutcome:W.lastOutcome,...W.lastError!==void 0?{error:W.lastError}:{},..._.result!==void 0?{result:_.result}:{},..._.structured!==void 0?{structured:_.structured}:{},...j.status?{reportedStatus:j.status}:{},...j.summary?{reportedSummary:j.summary}:{},time:W.time}}),Q=G.fn("ActorWaiter.wait")(function*(V){let X=yield*$.get(V.sessionID,V.actor_id);if(!X)return{status:"unknown",actor_id:V.actor_id};if(b7(X))return yield*K(V.sessionID,V.actor_id,X);let W=yield*B0.make(),_=V.timeout_ms??uz,j=yield*O1.make();return yield*G.acquireUseRelease(J.subscribeCallback(WX,(H)=>{if(H.properties.actorID!==V.actor_id)return;if(H.properties.sessionID!==V.sessionID)return;j.fork(G.gen(function*(){let q=yield*$.get(V.sessionID,V.actor_id);if(!q)return;if(!b7(q))return;let U=yield*K(V.sessionID,V.actor_id,q);B0.doneUnsafe(W,G.succeed(U))}).pipe(G.catchCause((q)=>G.logError(`waiter rehydrate failed: ${q}`))))}),()=>G.gen(function*(){let H=yield*$.get(V.sessionID,V.actor_id);if(H&&b7(H))return yield*K(V.sessionID,V.actor_id,H);let q=yield*B0.await(W).pipe(G.timeout(_),G.catchTag("TimeoutError",()=>G.succeed(null)));if(q===null)return{status:"timeout",actor_id:V.actor_id};return q}),(H)=>G.sync(()=>H()))});return AZ.of({wait:Q})})),dz=jX.pipe(f.provide(P$.defaultLayer),f.provide(L1.defaultLayer),f.provide(Y1.defaultLayer));var SZ={current:void 0};var K1={};o$(K1,{layer:()=>OX,defaultLayer:()=>iz,TaskRegistry:()=>K1,Service:()=>wZ});var L$=b2("task",{id:i$().notNull(),session_id:i$().$type().notNull().references(()=>V0.id,{onDelete:"cascade"}),parent_task_id:i$(),status:i$().$type().notNull(),summary:i$().notNull(),owner:i$(),created_at:t0().notNull(),last_event_at:t0().notNull(),ended_at:t0(),cleanup_after:t0()},($)=>[BX({columns:[$.session_id,$.id]}),e0("task_session_idx").on($.session_id),e0("task_parent_idx").on($.session_id,$.parent_task_id),e0("task_status_idx").on($.status)]),RJ=b2("task_event",{id:t0().primaryKey({autoIncrement:!0}),session_id:i$().$type().notNull().references(()=>V0.id,{onDelete:"cascade"}),task_id:i$().notNull(),at:t0().notNull(),kind:i$().notNull(),summary:i$()},($)=>[UX({columns:[$.session_id,$.task_id],foreignColumns:[L$.session_id,L$.id]}).onDelete("cascade"),e0("task_event_task_idx").on($.session_id,$.task_id,$.at)]);var C8=F.string().regex(/^T\d+(\.\d+)*$/,"Task ID must be Tn or Tn.m..."),pz=F.enum(["open","in_progress","blocked","done","abandoned"]),v7=F.object({id:C8,session_id:F0.zod,parent_task_id:C8.optional(),status:pz,summary:F.string(),owner:F.string().optional(),created_at:F.number(),last_event_at:F.number(),ended_at:F.number().optional(),cleanup_after:F.number().optional()}),h7=F.enum(["created","started","unstarted","blocked","unblocked","done","abandoned","renamed"]),Tk=F.object({id:F.number(),task_id:C8,at:F.number(),kind:h7,summary:F.string().optional()});var HX=Z0.define("task.created",F.object({sessionID:F0.zod,task:v7})),cz=h7.exclude(["created"]),_X=Z0.define("task.updated",F.object({sessionID:F0.zod,task:v7,kind:cz}));var lz=86400000,LJ=($)=>`Task ${$} not found. Use \`task list\` to see valid task IDs, or \`task create\` to add one.`;function g7($){return{id:$.id,session_id:$.session_id,parent_task_id:$.parent_task_id??void 0,status:$.status,summary:$.summary,owner:$.owner??void 0,created_at:$.created_at,last_event_at:$.last_event_at,ended_at:$.ended_at??void 0,cleanup_after:$.cleanup_after??void 0}}function oz($){return{id:$.id,task_id:$.task_id,at:$.at,kind:$.kind,summary:$.summary??void 0}}function rz($,J){let Z=$?`${$}.`:"T",Y=J.filter((Q)=>$?Q.startsWith(Z):/^T\d+$/.test(Q)).map((Q)=>{let V=Q.slice(Z.length);return/^\d+$/.test(V)?Number(V):0}),K=Y.length>0?Math.max(...Y)+1:1;return`${Z}${K}`}class wZ extends D$.Service()("@qitqode/TaskRegistry"){}var OX=f.effect(wZ,G.gen(function*(){let $=yield*P$.Service,J=yield*R$.Service,Z=G.fn("TaskRegistry.cleanupAfter")(function*(C){let P=yield*J.get(),D=P.checkpoint?.task_archive_days??P.checkpoint?.task_cleanup_days??7;return C+D*lz}),Y=(C,P,D,L,R)=>{z$.use((N)=>N.insert(RJ).values({session_id:C,task_id:P,at:R,kind:D,summary:L??null}).run())},K=(C,P)=>C.fork($.publish(HX,{sessionID:P.session_id,task:P})),Q=(C,P,D)=>C.fork($.publish(_X,{sessionID:P.session_id,task:P,kind:D})),V=G.fn("TaskRegistry.create")(function*(C){let P=yield*O1.make(),D=Date.now(),L=z$.use((b)=>b.select({id:L$.id}).from(L$).where(_0(G$(L$.session_id,C.session_id),C.parent_id?G$(L$.parent_task_id,C.parent_id):f7(L$.parent_task_id))).all()),R=rz(C.parent_id,L.map((b)=>b.id)),N={id:R,session_id:C.session_id,parent_task_id:C.parent_id??null,status:"open",summary:C.summary,owner:C.owner??null,created_at:D,last_event_at:D,ended_at:null,cleanup_after:null};z$.use((b)=>b.insert(L$).values(N).run()),Y(C.session_id,R,"created",void 0,D);let x=g7(N);return K(P,x),x}),X=G.fn("TaskRegistry.list")(function*(C){let P=Date.now(),D=[];if(C.session_id)D.push(G$(L$.session_id,C.session_id));if(C.status)D.push(G$(L$.status,C.status));if(C.owner)D.push(G$(L$.owner,C.owner));if(!C.include_terminal){let N=NJ(G$(L$.status,"open"),G$(L$.status,"in_progress"),G$(L$.status,"blocked"));if(N)D.push(N)}if(!C.include_archived){let N=NJ(f7(L$.cleanup_after),JZ(L$.cleanup_after,P));if(N)D.push(N)}let L=D.length>0?_0(...D):void 0;return z$.use((N)=>N.select().from(L$).where(L).orderBy(L$.created_at).all()).map(g7)}),W=G.fn("TaskRegistry.get")(function*(C){let P=z$.use((D)=>D.select().from(L$).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).get());return P?g7(P):void 0}),_=G.fn("TaskRegistry.events")(function*(C){return z$.use((D)=>D.select().from(RJ).where(_0(G$(RJ.session_id,C.session_id),G$(RJ.task_id,C.task_id))).orderBy(RJ.at).all()).map(oz)}),j=G.fn("TaskRegistry.block")(function*(C){let P=yield*O1.make(),D=Date.now();z$.use((R)=>R.update(L$).set({status:"blocked",last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"blocked",C.event_summary,D);let L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new R0(LJ(C.id)));return Q(P,L,"blocked"),L}),H=G.fn("TaskRegistry.unblock")(function*(C){let P=yield*O1.make(),D=Date.now();z$.use((R)=>R.update(L$).set({status:"open",last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"unblocked",C.event_summary,D);let L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new R0(LJ(C.id)));return Q(P,L,"unblocked"),L}),q=G.fn("TaskRegistry.start")(function*(C){let P=yield*O1.make(),D=Date.now(),L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new R0(LJ(C.id)));if(L.status==="done"||L.status==="abandoned")return yield*G.logWarning(`refusing to start terminal task ${C.id} (status=${L.status})`),L;let R=C.owner??L.owner;if(L.status==="in_progress"&&R===L.owner)return L;z$.use((x)=>x.update(L$).set({status:"in_progress",owner:R??null,last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"started",C.event_summary,D);let N=yield*W({session_id:C.session_id,id:C.id});if(!N)return yield*G.die(new R0(LJ(C.id)));return Q(P,N,"started"),N}),U=G.fn("TaskRegistry.finish")(function*(C){let P=yield*O1.make(),D=Date.now(),L=yield*Z(D);z$.use((N)=>N.update(L$).set({status:C.status,ended_at:D,cleanup_after:L,last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,C.status,C.event_summary,D);let R=yield*W({session_id:C.session_id,id:C.id});if(!R)return yield*G.die(new R0(LJ(C.id)));return Q(P,R,C.status),R}),z=G.fn("TaskRegistry.done")(function*(C){return yield*U({...C,status:"done"})}),M=G.fn("TaskRegistry.abandon")(function*(C){return yield*U({...C,status:"abandoned"})}),I=G.fn("TaskRegistry.rename")(function*(C){let P=yield*O1.make(),D=Date.now();z$.use((R)=>R.update(L$).set({summary:C.summary,last_event_at:D}).where(_0(G$(L$.session_id,C.session_id),G$(L$.id,C.id))).run()),Y(C.session_id,C.id,"renamed",C.summary,D);let L=yield*W({session_id:C.session_id,id:C.id});if(!L)return yield*G.die(new R0(LJ(C.id)));return Q(P,L,"renamed"),L});return wZ.of({create:V,list:X,get:W,events:_,block:j,unblock:H,done:z,abandon:M,rename:I,start:q})})),iz=f.suspend(()=>OX.pipe(f.provide(P$.layer),f.provide(R$.defaultLayer)));var o2={};o$(o2,{renderRebuildContext:()=>DC,renderIndex:()=>MC,loadLatest:()=>zC,loadCheckpoints:()=>CC,layer:()=>dX,lastBoundary:()=>PC,isWriterRunning:()=>IC,hasCheckpoint:()=>FC,defaultLayer:()=>pX,composeWriterPromptForTest:()=>LZ,SessionCheckpoint:()=>o2,Service:()=>D8});import OC from"path";import qC from"fs/promises";import EX from"path";var qX={current:void 0};function RZ(){try{return B$.current?.project?.id}catch{return}}function sz($){if(!Array.isArray($.content))return[];let J=[];for(let Z of $.content)if(Z.type==="tool_result"&&typeof Z.tool_use_id==="string")J.push(Z.tool_use_id);return J}function FX($){if(!Array.isArray($.content))return[];let J=[];for(let Z of $.content)if(Z.type==="tool_use"&&typeof Z.id==="string")J.push(Z.id);return J}function zX($,J){if(J<=0||J>=$.length)return J;let Z=J,Y=[],K=new Set;for(let X=Z;X<$.length;X++){Y.push(...sz($[X]));for(let W of FX($[X]))K.add(W)}let Q=new Set(Y.filter((X)=>!K.has(X)));for(let X=Z-1;X>=0&&Q.size>0;X--){let W=$[X];if(W.role!=="assistant")continue;let _=!1;for(let j of FX(W))if(Q.delete(j))_=!0;if(_)Z=X}let V=$[Z]?.id;if(V)for(let X=Z-1;X>=0;X--)if($[X].id===V)Z=X;else break;return Z}function CX($,J){if(J>=$.length)return J;for(let Z=J;Z>=0;Z--){let Y=$[Z];if(Y.info.role!=="user")continue;if(!(Y.parts.length>0&&Y.parts.every((Q)=>Q.type==="tool_result")))return Z}return 0}import nz from"fs/promises";import az from"path";var tz=O$.create({service:"session.progress-reconcile"});function ez($){let J=$.match(/^---\n([\s\S]*?)\n---\n/);if(!J)return null;let Z=J[1].split(`
7392
7392
  `).find((K)=>K.startsWith("written-at:"));if(!Z)return null;let Y=Number(Z.slice(11).trim());if(!Number.isFinite(Y))return null;return Y}function $C($){let J=new Map,Z=/(?<!`)\(progress:\s*tasks\/([^/]+)\/progress\.md,\s*last-reconciled-written-at:\s*(\d+)\)/g;for(let Y of $.matchAll(Z)){let K=Number(Y[2]);if(Number.isFinite(K))J.set(Y[1],K)}return J}async function JC($){let J=await Bun.file(Q1($)).text().catch(()=>""),Z=$C(J),Y=MX($),K;try{K=await nz.readdir(Y)}catch{return[]}let Q=[];for(let V of K){let X=az.join(Y,V,"progress.md"),W;try{W=await Bun.file(X).text()}catch{continue}let _=ez(W);if(_===null)continue;let j=Z.get(V);if(j===void 0)Q.push({taskId:V,writtenAt:_,status:"NEW"});else if(_>j)Q.push({taskId:V,writtenAt:_,status:"CHANGED",prior:j})}return Q}function ZC($){if($.length===0)return"";let J=["SUBAGENT PROGRESS to integrate (since last reconcile):"];for(let Z of $)if(Z.status==="NEW")J.push(` - ${Z.taskId} (NEW, written-at=${Z.writtenAt})`);else J.push(` - ${Z.taskId} (CHANGED, written-at=${Z.writtenAt}, prior=${Z.prior})`);return J.push(""),J.push("For each: Read tasks/<TID>/progress.md, integrate \xA74 (verbatim commands) verbatim into main \xA75 Current work; integrate \xA75 (outcome+discoveries) into main \xA75 or \xA77 as appropriate. Then update the corresponding \xA74 line in main checkpoint to:"),J.push(" (progress: tasks/<TID>/progress.md, last-reconciled-written-at: <written-at from above>)"),J.join(`
7393
7393
  `)}async function DX($){let J=await JC($).catch((Z)=>{return tz.warn("buildProgressDiff failed; reconcile skipped this turn",{err:Z,sessionID:$}),[]});return ZC(J)}var YC=1e4,PX=20000,KC=5,AX=new Set(["read","bash","grep","glob","webfetch","websearch","edit","write","multiedit","apply_patch","codesearch"]);function QC($){let J=0;for(let Z of $.parts)try{J+=D0.estimate(JSON.stringify(Z))}catch{J+=1000}return J}function IX($){return $.parts.some((J)=>J.type==="text"||J.type==="reasoning")}function SX($){if($.length===0)return"";let J=$.findLastIndex((V)=>V.info.role==="assistant"&&V.info.finish!==void 0);if(J<=0)return $[J>=0?J:0].info.id;let Z=$.map((V)=>QC(V)),Y=J-1,K=0,Q=0;for(let V=Y;V<$.length;V++)if(K+=Z[V],IX($[V]))Q+=1;if(K>=PX)return $[Y].info.id;while(Y>0&&K<PX&&(K<YC||Q<KC))if(Y-=1,K+=Z[Y],IX($[Y]))Q+=1;return $[Y].info.id}import m7 from"fs/promises";import u7 from"path";async function yX($){if(!await Bun.file($).exists())await m7.mkdir(u7.dirname($),{recursive:!0}),await Bun.write($,wX)}async function TX($){if(!await Bun.file($).exists())await m7.mkdir(u7.dirname($),{recursive:!0}),await Bun.write($,RX)}async function kX($){if(!await Bun.file($).exists())await m7.mkdir(u7.dirname($),{recursive:!0}),await Bun.write($,NX)}function VC($){let J=Object.entries($);if(J.length===0)throw Error("CHECKPOINT_SECTION_BUDGETS is empty \u2014 F43 substitution would produce an empty prompt block");let Z=3,Y=["Section budgets (~tokens):"];for(let K=0;K<J.length;K+=Z){let Q=J.slice(K,K+Z).map(([V,X])=>`${V}: ${X}`).join(" ");Y.push(` ${Q}`)}return Y.join(`
7394
7394
  `)}async function LZ($){let J=await e.resolvePrompt("agent/checkpoint-writer");if(!J)throw Error("checkpoint-writer prompt unavailable from backend (agent/checkpoint-writer)");return[yJ({source:"checkpoint",trust:"session-state",posture:"system",body:["You are now operating in checkpoint-writer mode. Ignore the general coding-assistant framing in the system prompt above. The read, write, edit, glob, grep, and task tools are available; do not invoke others.","","========================================================================","ABSOLUTE PATHS \u2014 USE THESE VERBATIM. NEVER COMPUTE, INFER, OR MODIFY.","========================================================================","",`CHECKPOINT_PATH = ${$.checkpointFile}`,`MEMORY_PATH = ${$.memoryFile}`,`TASK_MEM_DIR = ${$.taskMemDir}`,`NOTES_PATH = ${$.notesFile}`,"","When using the Write tool, the first arg MUST be one of these literal","absolute paths (or for task narrative, TASK_MEM_DIR + '/' + task_id +","'/progress.md' or '/notes.md'). Do NOT abbreviate. Do NOT change","parent directories. Do NOT insert paths from memory of similar projects.","If you find yourself typing '/data/checkpoints/' as a parent, STOP \u2014 that","is the legacy v2 layout and is wrong. The current parent for the","checkpoint file is the directory portion of CHECKPOINT_PATH above.","========================================================================","",$.progressDiff,"",J.replace("{{SECTION_BUDGETS}}",VC(LX))].join(`
7395
7395
  `)}),"","Write the next checkpoint for this session.","",$.rangeDesc,"","Use the `task` tool for ALL task state ops (create / start / progress / done / abandon / approve / rename / block / unblock / batch_create). Use the Write tool for the checkpoint, memory, and task narrative files at the CHECKPOINT_PATH / MEMORY_PATH / TASK_MEM_DIR locations declared above. After all writes and tool calls, stop immediately."].join(`
7396
- `)}import d7 from"fs/promises";var g0=O$.create({service:"session.checkpoint.writer"});function GC($,J,Z){return G.gen(function*(){let Y=yield*$.messages({sessionID:J,agentID:"*"}),K=0,Q=0,V=0,X=0;for(let H of Y){if(H.info.role!=="assistant")continue;if(H.info.agentID!==Z)continue;X+=1;let q=H.info.tokens;if(!q)continue;K+=(q.input??0)+(q.cache?.read??0)+(q.cache?.write??0),Q+=q.cache?.read??0,V+=q.cache?.write??0}let W=K-Q-V,_=Q+Math.max(W,0),j=_>0?Q/_:0;return{total_input_tokens:K,cache_read_tokens:Q,cache_write_tokens:V,cache_hit_rate:j,num_llm_calls:X}})}function gX($,J){let{session:Z,config:Y,actorRegistry:K,bus:Q,scope:V}=J,X=G.fn("SessionCheckpoint.tryStartCheckpointWriter")(function*(j){let H=$.get(j.sessionID);if(H){if(H.pending)g0.info("writer pending evicted (newer range arrived)",{sessionID:j.sessionID});else g0.info("writer already running, queueing",{sessionID:j.sessionID});return H.pending=j,"queued"}if(yield*K.isSystemSpawned(j.sessionID,"main"))return g0.info("tryStartCheckpointWriter skipping system-spawned session"),"skipped";let q=yield*Z.get(j.sessionID),U=yield*E0.filterCompactedEffect(j.sessionID,{contextFrom:q.contextFrom,contextWatermark:q.contextWatermark,agentID:"main"});if(U.length===0)return g0.info("no messages, skipping checkpoint",{sessionID:j.sessionID}),"skipped";let z=SX(U),M=U.findIndex((Y$)=>Y$.info.id===z),I=zX(U.map((Y$)=>({role:Y$.info.role,id:Y$.info.id,content:Y$.parts.flatMap((g)=>g.type==="tool"?[{type:"tool_use",id:g.callID},{type:"tool_result",tool_use_id:g.callID}]:[])})),Math.max(M,0)),C=U[I]?.info.id??z,P=RZ()??U2.global,D=NZ(j.sessionID),L=EX.join(f$.Path.data,"memory","projects",P),R=Q1(j.sessionID),N=M8(P),x=EX.join(D,"tasks"),b=TZ(j.sessionID);yield*G.promise(()=>d7.mkdir(D,{recursive:!0})),yield*G.promise(()=>d7.mkdir(x,{recursive:!0})),yield*G.promise(()=>d7.mkdir(L,{recursive:!0})),yield*G.promise(()=>yZ(P)),yield*G.promise(()=>yX(R)),yield*G.promise(()=>TX(N)),yield*G.promise(()=>kX(b));let v=yield*G.promise(()=>Bun.file(R).exists()),m=yield*G.promise(()=>Bun.file(N).exists()),A=v?[`Previous checkpoint: ${R}`,m?`Previous memory: ${N}`:"","Read BOTH the prior checkpoint (to dedupe Discovered/Dead-end titles AND to carry forward Live Resources, Execution-context frames, and Session-metadata fields that are still alive) AND the prior memory (project memory) before writing yours."].filter((Y$)=>Y$.length>0).join(`
7396
+ `)}import d7 from"fs/promises";var g0=O$.create({service:"session.checkpoint.writer"});function GC($,J,Z){return G.gen(function*(){let Y=yield*$.messages({sessionID:J,agentID:"*"}),K=0,Q=0,V=0,X=0;for(let H of Y){if(H.info.role!=="assistant")continue;if(H.info.agentID!==Z)continue;X+=1;let q=H.info.tokens;if(!q)continue;K+=(q.input??0)+(q.cache?.read??0)+(q.cache?.write??0),Q+=q.cache?.read??0,V+=q.cache?.write??0}let W=K-Q-V,_=Q+Math.max(W,0),j=_>0?Q/_:0;return{total_input_tokens:K,cache_read_tokens:Q,cache_write_tokens:V,cache_hit_rate:j,num_llm_calls:X}})}function gX($,J){let{session:Z,config:Y,actorRegistry:K,bus:Q,scope:V}=J,X=G.fn("SessionCheckpoint.tryStartCheckpointWriter")(function*(j){let H=$.get(j.sessionID);if(H){if(H.pending)g0.info("writer pending evicted (newer range arrived)",{sessionID:j.sessionID});else g0.info("writer already running, queueing",{sessionID:j.sessionID});return H.pending=j,"queued"}if(yield*K.isSystemSpawned(j.sessionID,"main"))return g0.info("tryStartCheckpointWriter skipping system-spawned session"),"skipped";let q=yield*Z.get(j.sessionID),U=yield*w0.filterCompactedEffect(j.sessionID,{contextFrom:q.contextFrom,contextWatermark:q.contextWatermark,agentID:"main"});if(U.length===0)return g0.info("no messages, skipping checkpoint",{sessionID:j.sessionID}),"skipped";let z=SX(U),M=U.findIndex((Y$)=>Y$.info.id===z),I=zX(U.map((Y$)=>({role:Y$.info.role,id:Y$.info.id,content:Y$.parts.flatMap((g)=>g.type==="tool"?[{type:"tool_use",id:g.callID},{type:"tool_result",tool_use_id:g.callID}]:[])})),Math.max(M,0)),C=U[I]?.info.id??z,P=RZ()??U2.global,D=NZ(j.sessionID),L=EX.join(f$.Path.data,"memory","projects",P),R=Q1(j.sessionID),N=M8(P),x=EX.join(D,"tasks"),b=TZ(j.sessionID);yield*G.promise(()=>d7.mkdir(D,{recursive:!0})),yield*G.promise(()=>d7.mkdir(x,{recursive:!0})),yield*G.promise(()=>d7.mkdir(L,{recursive:!0})),yield*G.promise(()=>yZ(P)),yield*G.promise(()=>yX(R)),yield*G.promise(()=>TX(N)),yield*G.promise(()=>kX(b));let v=yield*G.promise(()=>Bun.file(R).exists()),m=yield*G.promise(()=>Bun.file(N).exists()),A=v?[`Previous checkpoint: ${R}`,m?`Previous memory: ${N}`:"","Read BOTH the prior checkpoint (to dedupe Discovered/Dead-end titles AND to carry forward Live Resources, Execution-context frames, and Session-metadata fields that are still alive) AND the prior memory (project memory) before writing yours."].filter((Y$)=>Y$.length>0).join(`
7397
7397
  `):"This is the first checkpoint of this session. No prior checkpoint exists; MEMORY.md and the task narrative directory likely don't exist yet either.",u=yield*G.promise(()=>DX(j.sessionID)),r=yield*G.promise(()=>LZ({checkpointFile:R,memoryFile:N,taskMemDir:x,notesFile:b,rangeDesc:A,progressDiff:u})),S=SZ.current;if(!S)return g0.warn("tryStartCheckpointWriter skipping \u2014 Actor service unavailable",{sessionID:j.sessionID}),"skipped";let k=(yield*Y.get()).checkpoint?.fork??!1,s=(yield*G.sync(()=>z$.use((Y$)=>Y$.select({last:V0.last_checkpoint_message_id}).from(V0).where(G$(V0.id,j.sessionID)).get())).pipe(G.catch(()=>G.succeed(void 0))))?.last??void 0,J$=U.findIndex((Y$)=>Y$.info.id===C);if(J$<0)return g0.warn("tryStartCheckpointWriter: watermark message not found, skipping",{sessionID:j.sessionID,endMessageID:C}),"skipped";let Z$=s?U.findIndex((Y$)=>Y$.info.id===s):-1,W$=Z$>=0?Z$+1:0,y$=CX(U.map((Y$)=>({info:{role:Y$.info.role},parts:Y$.parts})),W$),Q$=k?[]:U.slice(y$,J$+1);if(!k&&Q$.length===0)return g0.warn("tryStartCheckpointWriter: empty delta under fork:false, skipping",{sessionID:j.sessionID,endMessageID:C,lastCheckpointMessageID:s}),"skipped";let y=qX.current;if(!y)g0.warn("tryStartCheckpointWriter: prefixCaptureRef not set, spawning without forkContext",{sessionID:j.sessionID});let n=yield*y?G.gen(function*(){let g=U[J$].info.agent;if(k){if(!g){g0.warn("tryStartCheckpointWriter: watermark has no agent, fork:true requires parent agent \u2014 falling back to no forkContext",{sessionID:j.sessionID,endMessageID:C});return}let C$=U.slice(0,J$+1),T$=yield*y({sessionID:j.sessionID,agentName:g,providerID:j.model.providerID,modelID:j.model.modelID,msgs:C$});return{system:T$.system,tools:T$.tools,inheritedMessages:T$.inheritedMessages,parentPermission:T$.parentPermission,watermarkMsgID:C,model:{providerID:j.model.providerID,modelID:j.model.modelID}}}let t=yield*y({sessionID:j.sessionID,agentName:"checkpoint-writer",providerID:j.model.providerID,modelID:j.model.modelID,msgs:Q$});return{system:t.system,tools:t.tools,inheritedMessages:t.inheritedMessages,parentPermission:t.parentPermission,watermarkMsgID:C,model:{providerID:j.model.providerID,modelID:j.model.modelID}}}):G.succeed(void 0),a=yield*Z.create({parentID:j.sessionID,title:`checkpoint-writer: ${A}`});g0.info("tryStartCheckpointWriter spawning",{sessionID:j.sessionID,childSessionID:a.id,mode:k?"fork":"no-fork",inheritedMessageCount:n?.inheritedMessages?.length??0,rangeDesc:A});let c$=yield*S.spawn({mode:"subagent",sessionID:a.id,parentSessionID:j.sessionID,agentType:"checkpoint-writer",description:`checkpoint writer for session ${j.sessionID} covering ${A}`,task:r,context:"full",tools:["read","write","edit","apply_patch","glob","grep","task"],model:{providerID:j.model.providerID,modelID:j.model.modelID},background:!0,forkContext:n}),l=c$.actorID;j.onStarted?.(c$.outcome);let d=yield*G.promise(()=>xX(j.sessionID));return bX(j.sessionID,l,{priorTitles:d,expectedRevisions:[]}),$.set(j.sessionID,{writing:c$.outcome}),yield*G.gen(function*(){let Y$=yield*B0.await(c$.outcome);yield*G.sync(()=>z$.use((C$)=>C$.update(V0).set({last_checkpoint_message_id:C}).where(G$(V0.id,j.sessionID)).run()));let g=$.get(j.sessionID)?.pending;$.delete(j.sessionID);let t=yield*GC(Z,j.sessionID,c$.actorID).pipe(G.catch(()=>G.succeed({total_input_tokens:0,cache_read_tokens:0,cache_write_tokens:0,cache_hit_rate:0,num_llm_calls:0})));if(yield*Q.publish(hX,{sessionID:j.sessionID,writerActorID:c$.actorID,status:Y$.status==="success"?"completed":"failed",...t}).pipe(G.ignore),g)g0.info("draining pending writer",{sessionID:j.sessionID}),yield*X(g).pipe(G.ignore)}).pipe(G.ensuring(G.sync(()=>vX(j.sessionID,l))),G.forkIn(V)),"started"}),W=G.fn("SessionCheckpoint.waitForWriter")(function*(j){let H=$.get(j);if(!H)return"no-writer";return(yield*B0.await(H.writing).pipe(G.timeout(300000),G.catch(()=>G.succeed({status:"failure",error:"timeout"})))).status==="success"?"success":"failure"}),_=G.fn("SessionCheckpoint.drainWriters")(function*(j){let H=j?.timeoutMs??120000,q=[...$.values()];if(q.length===0)return{drained:0,timedOut:0};g0.info("draining checkpoint writers before shutdown",{count:q.length,timeoutMs:H}),yield*G.all(q.map((M)=>B0.await(M.writing)),{concurrency:"unbounded"}).pipe(G.timeout(H),G.catch(()=>G.succeed(void 0)));let U=$.size,z=q.length-U;if(U>0)g0.warn("drain timed out, writers still pending",{drained:z,timedOut:U});else g0.info("drain complete",{drained:z});return{drained:z,timedOut:U}});return{tryStartCheckpointWriter:X,waitForWriter:W,drainWriters:_}}import p7 from"path";async function fX($,J){let Z=await Bun.file($).text().catch(()=>{return});if(Z===void 0)return;let Y=D0.estimate(Z);if(Y<=J)return{done:{text:Z,truncated:!1,totalTokens:Y}};return{fullText:Z,totalTokens:Y}}async function mX($,J){let Z=await fX($,J);if(Z===void 0)return;if("done"in Z)return Z.done;let{fullText:Y,totalTokens:K}=Z,Q=J/K,V=Y.slice(0,Math.floor(Y.length*Q*0.95)),X=V.lastIndexOf(`
7398
7398
  `),W=X>0?V.slice(0,X):V,_=W.split(`
7399
7399
  `).length+1,j=`
@@ -7417,14 +7417,14 @@ ${I.map((b)=>b.content).join(`
7417
7417
  `)})}function HC($){let J=$?`Consult this session's tasks/${$}/progress.md head section.`:"Consult the most recently active task's progress.md head section.";return yJ({source:"checkpoint",trust:"runtime-safety",body:["The previous assistant turn ended with a stop. Before stopping again,",J,"Compare the Task spec to the latest Progress entries. If the task is","incomplete, proceed to the next concrete step. Only stop when the spec","is genuinely satisfied or you need user input you cannot infer."].join(`
7418
7418
  `)})}function _C(){return yJ({source:"tool-result",trust:"runtime-safety",body:["Tool results above are real history from the autonomous loop. Process","them and continue to the next iteration. Do not pause to summarize."].join(`
7419
7419
  `)})}var EZ=O$.create({service:"session.checkpoint.renderer"});function uX($,J){let{session:Z,config:Y,memory:K,taskRegistry:Q,actorRegistry:V}=J,X=G.fn("SessionCheckpoint.renderIndex")(function*(j){let H=Q1(j);if(!(yield*G.promise(()=>Bun.file(H).exists())))return"No checkpoints yet for this session.";let z=(yield*G.promise(()=>Bun.file(H).text().catch(()=>""))).match(/^Topic:\s*(.+)$/m),M=z?z[1].trim():"(unknown)",I=NZ(j),C=[];return C.push("## Checkpoint"),C.push(""),C.push(`Directory: ${I}/`),C.push(""),C.push(`Current checkpoint (${M}): checkpoint.md [shown below]`),C.push(""),C.push(`Use read("${H}") to access the full checkpoint.`),C.join(`
7420
- `)}),W=G.fn("SessionCheckpoint.renderRebuildContext")(function*(j,H){if(H?.agentID&&H.agentID!=="main")return"";let q=$.get(j);if(q)EZ.info("rebuild waiting for in-flight writer",{sessionID:j}),yield*G.race(B0.await(q.writing).pipe(G.as("done")),G.sleep("60 seconds").pipe(G.tap(()=>G.sync(()=>EZ.warn("writer wait timeout \u2014 using on-disk checkpoint",{sessionID:j}))),G.as("timeout"))).pipe(G.catch(()=>G.succeed("error")));let z=(yield*Y.get()).checkpoint?.push_caps??{},M=RZ(),I=M??U2.global,C=yield*Q.list({session_id:j,include_terminal:!0}),D=(yield*G.promise(()=>kZ(Q1(j),z.checkpoint??11000)))?.text??"";yield*G.promise(()=>yZ(I));let R=(yield*G.promise(()=>kZ(M8(I),z.memory??1e4)))?.text??"",x=(yield*G.promise(()=>mX(TZ(j),z.notes??6000)))?.text??"",v=(yield*G.promise(()=>kZ(c7(),z.global??6000)))?.text??"",m=yield*V.listActive(),A=z.recent_user??16000,u=z.recent_user_per_msg??2000,r=[];if(A>0){let W$=E0.page({sessionID:j,agentID:"main",limit:200}).items.filter((Q$)=>Q$.info.role==="user"&&!Q$.parts.some((y)=>y.type==="tool"||y.type==="checkpoint"||y.type==="compaction")),y$=A;for(let Q$=W$.length-1;Q$>=0;Q$--){let y=UC(W$[Q$].parts);if(!y.trim())continue;let n=jC(y,u,W$[Q$].info.id),a=D0.estimate(n);if(y$-a<0)break;r.unshift(n),y$-=a}}if(C.length===0&&!D.trim()&&!R.trim()&&!v.trim()&&m.length===0&&r.length===0)return"";let S=[];if(S.push("The following blocks are auto-loaded from your session memory. They are already in your context \u2014 do not Read them as whole files. Use Grep for specific facts instead."),S.push(""),S.push("## Tasks ledger"),C.length===0)S.push("(none)");else{let W$=C.filter((n)=>!n.parent_task_id),y$=new Map;for(let n of C){if(!n.parent_task_id)continue;let a=y$.get(n.parent_task_id)??[];a.push(n),y$.set(n.parent_task_id,a)}let Q$=(n)=>({open:"\uD83D\uDD35",in_progress:"\uD83D\uDD04",blocked:"\uD83D\uDFE1",done:"\u2705",abandoned:"\u274C"})[n]??n,y=[];for(let n of W$){y.push(`- ${n.id} ${n.status} \u2014 ${n.summary}`);let a=y$.get(n.id)??[];if(a.length===0)continue;let c$=a.map((l)=>`${Q$(l.status)}${l.id}`).join(" / ");y.push(` Subtasks: ${c$}`)}S.push(WC(y.join(`
7420
+ `)}),W=G.fn("SessionCheckpoint.renderRebuildContext")(function*(j,H){if(H?.agentID&&H.agentID!=="main")return"";let q=$.get(j);if(q)EZ.info("rebuild waiting for in-flight writer",{sessionID:j}),yield*G.race(B0.await(q.writing).pipe(G.as("done")),G.sleep("60 seconds").pipe(G.tap(()=>G.sync(()=>EZ.warn("writer wait timeout \u2014 using on-disk checkpoint",{sessionID:j}))),G.as("timeout"))).pipe(G.catch(()=>G.succeed("error")));let z=(yield*Y.get()).checkpoint?.push_caps??{},M=RZ(),I=M??U2.global,C=yield*Q.list({session_id:j,include_terminal:!0}),D=(yield*G.promise(()=>kZ(Q1(j),z.checkpoint??11000)))?.text??"";yield*G.promise(()=>yZ(I));let R=(yield*G.promise(()=>kZ(M8(I),z.memory??1e4)))?.text??"",x=(yield*G.promise(()=>mX(TZ(j),z.notes??6000)))?.text??"",v=(yield*G.promise(()=>kZ(c7(),z.global??6000)))?.text??"",m=yield*V.listActive(),A=z.recent_user??16000,u=z.recent_user_per_msg??2000,r=[];if(A>0){let W$=w0.page({sessionID:j,agentID:"main",limit:200}).items.filter((Q$)=>Q$.info.role==="user"&&!Q$.parts.some((y)=>y.type==="tool"||y.type==="checkpoint"||y.type==="compaction")),y$=A;for(let Q$=W$.length-1;Q$>=0;Q$--){let y=UC(W$[Q$].parts);if(!y.trim())continue;let n=jC(y,u,W$[Q$].info.id),a=D0.estimate(n);if(y$-a<0)break;r.unshift(n),y$-=a}}if(C.length===0&&!D.trim()&&!R.trim()&&!v.trim()&&m.length===0&&r.length===0)return"";let S=[];if(S.push("The following blocks are auto-loaded from your session memory. They are already in your context \u2014 do not Read them as whole files. Use Grep for specific facts instead."),S.push(""),S.push("## Tasks ledger"),C.length===0)S.push("(none)");else{let W$=C.filter((n)=>!n.parent_task_id),y$=new Map;for(let n of C){if(!n.parent_task_id)continue;let a=y$.get(n.parent_task_id)??[];a.push(n),y$.set(n.parent_task_id,a)}let Q$=(n)=>({open:"\uD83D\uDD35",in_progress:"\uD83D\uDD04",blocked:"\uD83D\uDFE1",done:"\u2705",abandoned:"\u274C"})[n]??n,y=[];for(let n of W$){y.push(`- ${n.id} ${n.status} \u2014 ${n.summary}`);let a=y$.get(n.id)??[];if(a.length===0)continue;let c$=a.map((l)=>`${Q$(l.status)}${l.id}`).join(" / ");y.push(` Subtasks: ${c$}`)}S.push(WC(y.join(`
7421
7421
  `),z.tasks_ledger??2000))}if(S.push(""),D.trim())S.push("## Session checkpoint"),S.push(D.trim()),S.push("");if(m.length>0){S.push("## Active actors");let W$=z.actor_ledger??500;for(let y$ of m){let Q$=`- ${y$.actorID} \u2014 ${y$.status}, "${y$.description}" (agent=${y$.agent})`,y=D0.estimate(Q$);if(W$-y<0)break;S.push(Q$),W$-=y}S.push("")}if(r.length>0)S.push("## Recent user input (verbatim)"),S.push(...r),S.push("");if(R.trim())S.push("## Project memory"),S.push(R.trim()),S.push("");if(v.trim())S.push("## Global memory"),S.push(v.trim()),S.push("");if(x.trim())S.push("## Session notes"),S.push(x.trim()),S.push("");yield*K.reconcile().pipe(G.ignore);let T=new Set([M8(I),Q1(j),c7()].filter((W$)=>W$.length>0)),k=M&&M!==U2.global?NJ(G$(q0.scope,"global"),_0(G$(q0.scope,"sessions"),G$(q0.scope_id,j)),_0(G$(q0.scope,"projects"),G$(q0.scope_id,M))):NJ(G$(q0.scope,"global"),_0(G$(q0.scope,"sessions"),G$(q0.scope_id,j))),A$=yield*G.sync(()=>z$.use((W$)=>W$.select({path:q0.path}).from(q0).where(k).all())),s=yield*K.root(),J$=A$.map((W$)=>W$.path).filter((W$)=>!T.has(W$)&&!W$.includes(`${p7.sep}checkpoint${p7.sep}learning-`)).map((W$)=>W$.replace(s+p7.sep,""));if(J$.length>0){S.push("## Memory keys index");let W$=z.memory_titles??500;for(let y$ of J$){let Q$=D0.estimate(y$);if(W$-Q$<0)break;S.push(`- ${y$}`),W$-=Q$}S.push("")}S.push(""),S.push("This session is being continued from a previous conversation that hit a checkpoint. The session checkpoint and project memory above cover the earlier portion of the conversation."),S.push(""),S.push("Recent messages are preserved verbatim below \u2014 the assistant turn (and any tool results) you'll see is real history, not pseudo-content. Continue your task by responding to the most recent state."),S.push(""),S.push(`Resume directly. Do not acknowledge this memory dump, do not recap, do not preface with "I'll continue" or similar. Pick up the last task as if the break never happened.`);let Z$=H?.lastMessageInfo;if(Z$){let W$=(()=>{switch(Z$.role){case"assistant":if(Z$.finish==="tool-calls")return BC();return HC(void 0);case"tool":return _C();case"user":return""}})();if(W$)S.push(""),S.push(W$)}return S.join(`
7422
7422
  `)}),_=G.fn("SessionCheckpoint.insertRebuildBoundary")(function*(j){let H=yield*W(j.sessionID,{lastMessageInfo:j.lastMessageInfo,agentID:j.agentID}).pipe(G.catch(()=>G.succeed("")));if(!H)return!1;let q=yield*X(j.sessionID).pipe(G.catch(()=>G.succeed(""))),U=(j.boundaryCreatedAt??Date.now())+1,z=yield*Z.updateMessage({id:IJ.ascending(),role:"user",model:{providerID:j.model.providerID,modelID:j.model.modelID},sessionID:j.sessionID,agent:j.agent,time:{created:U}});if(yield*Z.updatePart({id:f2.ascending(),messageID:z.id,sessionID:j.sessionID,type:"checkpoint",checkpointDir:"",checkpointNumber:0,coveredUpTo:j.boundary}),q)yield*Z.updatePart({id:f2.ascending(),messageID:z.id,sessionID:j.sessionID,type:"text",synthetic:!0,text:q});yield*Z.updatePart({id:f2.ascending(),messageID:z.id,sessionID:j.sessionID,type:"text",synthetic:!0,text:H});let M=yield*V.renderForAgent(j.sessionID).pipe(G.catch(()=>G.succeed("")));if(M)yield*Z.updatePart({id:f2.ascending(),messageID:z.id,sessionID:j.sessionID,type:"text",synthetic:!0,text:M});let I=yield*Z.messages({sessionID:j.sessionID,agentID:"*"}),C=j.boundaryCreatedAt??I.find((D)=>D.info.id===j.boundary)?.info.time.created;if(C===void 0)return EZ.warn("microcompact skipped: no boundary timestamp available",{sessionID:j.sessionID,boundary:j.boundary}),!0;let P=0;for(let D of I){if(D.info.id===z.id)continue;if(D.info.time.created<=C)continue;for(let L of D.parts){if(L.type!=="tool")continue;if(!AX.has(L.tool))continue;if(L.state.status!=="completed")continue;if(L.state.time.compacted)continue;L.state.time.compacted=Date.now(),yield*Z.updatePart(L),P+=1}}if(P>0)EZ.info("rebuild microcompact",{sessionID:j.sessionID,cleared:P});return!0});return{renderIndex:X,renderRebuildContext:W,insertRebuildBoundary:_}}class D8 extends D$.Service()("@qitqode/SessionCheckpoint"){}var dX=f.effect(D8,G.gen(function*(){let $=yield*cX,J=yield*R$.Service,Z=yield*g1.Service,Y=yield*K1.Service,K=yield*L1.Service,Q=yield*P$.Service,V=yield*UJ.Scope,X=new Map,W=gX(X,{session:$,config:J,actorRegistry:K,bus:Q,scope:V}),_=uX(X,{session:$,config:J,memory:Z,taskRegistry:Y,actorRegistry:K}),{tryStartCheckpointWriter:j,waitForWriter:H,drainWriters:q}=W,{renderIndex:U,renderRebuildContext:z,insertRebuildBoundary:M}=_,I=G.fn("SessionCheckpoint.hasCheckpoint")(function*(N){return yield*G.promise(()=>Bun.file(Q1(N)).exists())}),C=G.fn("SessionCheckpoint.hasMemoryOrTasks")(function*(N){let x=yield*Z.root(),b=OC.join(x,"sessions",N);if((yield*G.promise(()=>qC.readdir(b).catch(()=>[]))).length>0)return!0;return(yield*Y.list({session_id:N,include_terminal:!0})).length>0}),P=G.fn("SessionCheckpoint.loadLatest")(function*(N){return(yield*G.promise(()=>Bun.file(Q1(N)).text().catch(()=>"")))||void 0}),D=G.fn("SessionCheckpoint.loadCheckpoints")(function*(N,x){let b=yield*G.promise(()=>Bun.file(Q1(N)).text().catch(()=>""));return b?[b]:[]}),L=G.fn("SessionCheckpoint.lastBoundary")(function*(N){return(yield*G.sync(()=>z$.use((b)=>b.select({last_checkpoint_message_id:V0.last_checkpoint_message_id}).from(V0).where(G$(V0.id,N)).get())))?.last_checkpoint_message_id}),R=G.fn("SessionCheckpoint.isWriterRunning")(function*(N){return X.has(N)});return D8.of({tryStartCheckpointWriter:j,waitForWriter:H,drainWriters:q,hasCheckpoint:I,hasMemoryOrTasks:C,loadLatest:P,loadCheckpoints:D,renderIndex:U,renderRebuildContext:z,lastBoundary:L,isWriterRunning:R,insertRebuildBoundary:M})})),pX=f.suspend(()=>dX.pipe(f.provide(lX),f.provide(P$.layer),f.provide(R$.defaultLayer),f.provide(g1.defaultLayer),f.provide(K1.defaultLayer),f.provide(L1.defaultLayer))),{runPromise:l2}=HZ(D8,pX);function FC($){return l2((J)=>J.hasCheckpoint($.sessionID))}function zC($){return l2((J)=>J.loadLatest($.sessionID))}function CC($){return l2((J)=>J.loadCheckpoints($.sessionID,$.count))}function MC($){return l2((J)=>J.renderIndex($.sessionID))}function DC($){return l2((J)=>J.renderRebuildContext($.sessionID,{lastMessageInfo:$.lastMessageInfo,agentID:$.agentID}))}function PC($){return l2((J)=>J.lastBoundary($.sessionID))}function IC($){return l2((J)=>J.isWriterRunning($.sessionID))}var Ax={current:void 0},oX={current:void 0};var AC="actor",rX=["run","spawn","status","wait","cancel","send"];function P8($,J,Z,Y){return G.fail({kind:"arity",line:Y,detail:`actor: ${$}: arity mismatch
7423
7423
  got: actor ${$} ${Z.join(" ")}
7424
7424
  expected: actor ${$} ${J}`})}function l7($,J,Z){let Y=[],K={};for(let Q=0;Q<$.length;Q++){let V=$[Q],X=J.find((_)=>V===`--${_}`);if(X){let _=$[Q+1];if(_===void 0)return G.fail({kind:"flag",line:Z,detail:`actor: --${X} requires a value`});K[X]=_,Q++;continue}let W=J.find((_)=>V.startsWith(`--${_}=`));if(W){let _=V.slice(`--${W}=`.length);if(_==="")return G.fail({kind:"flag",line:Z,detail:`actor: --${W} requires a value`});K[W]=_;continue}Y.push(V)}return G.succeed({flags:K,rest:Y})}var iX=G.fn("mapActorRunSpawn")(function*($,J,Z){let Y=$==="run",K=["model","task","actor",...Y?["timeout"]:[],"command","context","output-schema"],{flags:Q,rest:V}=yield*l7(J,K,Z);if(V.length!==3)return yield*P8($,`<subagent_type> "<description>" "<prompt>" [--model <ref>] [--task <TID>] [--actor <id>]${Y?" [--timeout <ms>]":""} [--command <cmd>] [--context none|state|full] [--output-schema <json>]`,V,Z);return{operation:{action:$,subagent_type:V[0],description:V[1],prompt:V[2],...Q.model?{model:Q.model}:{},...Q.task?{task_id:Q.task}:{},...Q.actor?{actor_id:Q.actor}:{},...Y&&Q.timeout?{timeout_ms:Number(Q.timeout)}:{},...Q.command?{command:Q.command}:{},...Q.context?{context:Q.context}:{},...Q["output-schema"]?{output_schema:JSON.parse(Q["output-schema"])}:{}}}}),SC=G.fn("mapActorVerb")(function*($,J,Z){switch($){case"run":return yield*iX("run",J,Z);case"spawn":return yield*iX("spawn",J,Z);case"status":if(J.length!==1)return yield*P8("status","<actor_id>",J,Z);return{operation:{action:"status",actor_id:J[0]}};case"wait":{let{flags:Y,rest:K}=yield*l7(J,["timeout"],Z);if(K.length!==1)return yield*P8("wait","<actor_id> [--timeout <ms>]",K,Z);return{operation:{action:"wait",actor_id:K[0],...Y.timeout?{timeout_ms:Number(Y.timeout)}:{}}}}case"cancel":if(J.length!==1)return yield*P8("cancel","<actor_id>",J,Z);return{operation:{action:"cancel",actor_id:J[0]}};case"send":{let{flags:Y,rest:K}=yield*l7(J,["session","type"],Z);if(K.length!==2)return yield*P8("send",'<to_actor_id> "<content>" [--session <id>] [--type <t>]',K,Z);return{operation:{action:"send",to_actor_id:K[0],content:K[1],...Y.session?{to_session_id:Y.session}:{},...Y.type?{type:Y.type}:{}}}}default:{let Y=PZ($??"",rX),K=`actor: unknown verb "${$??""}"
7425
7425
  available verbs: ${rX.join(", ")}`+(Y?`
7426
- did you mean: ${Y}?`:"");return yield*G.fail({kind:"unknown-verb",line:Z,detail:K})}}});function wC($){return G.gen(function*(){let J=yield*DZ($),Z=[];for(let Y of J){let[K,Q,...V]=Y.tokens;if(K!=="actor")return yield*G.fail({kind:"unknown-verb",line:Y.line,detail:`actor: every command must start with 'actor' (got '${K??""}')`});let X=yield*SC(Q,V,Y.line);Z.push(X)}return Z})}function RC($){if($.action==="spawn"||$.action==="run")return $.action;if($.background===!0||$.async===!0)return"spawn";return"run"}function LC($){let J=IZ($);if(!J)return;if(J.kind==="operation")return{operation:J.operation};let Z=J.obj,Y=Z.subagent_type,K=Z.description,Q=Z.prompt;if(typeof Y==="string"&&typeof K==="string"&&typeof Q==="string"){let V={action:RC(Z),subagent_type:Y,description:K,prompt:Q};if(typeof Z.model==="string")V.model=Z.model;if(typeof Z.task_id==="string")V.task_id=Z.task_id;if(typeof Z.actor_id==="string")V.actor_id=Z.actor_id;return{operation:V}}return}var o7=H$(AC,G.gen(function*(){let $=(yield*e.toolDescriptionEffect("actor"))??"",J=(yield*e.toolDescriptionEffect("actor.shell"))??"",Z=yield*p0.Service,Y=yield*R$.Service,K=yield*H1.Service,Q=yield*Y1.Service,V=yield*L1.Service,X=yield*o2.Service,W=yield*c2.Service,_=yield*K1.Service,j=()=>{let H=SZ.current;if(!H)return G.fail(Error("Actor service unavailable \u2014 Actor.defaultLayer must be running for the actor tool to spawn or cancel actors"));return G.succeed(H)};return G.fn("ActorTool.init")(function*(){let U=(yield*Z.list()).filter((C)=>C.mode==="subagent"&&!C.hidden).map((C)=>C.name);if(U.length===0)return yield*G.die(Error("No spawnable subagent types"));let z=F.enum(U),M=KG(z),I=G.fn("ActorTool.execute")(function*(C,P){let D=C.operation,L=yield*Y.get(),R=(Q$,y)=>{let n={status:"unknown",actor_id:y};return{title:`Actor ${Q$}: unknown`,output:JSON.stringify(n),metadata:{actor_id:y,status:"unknown"}}},N=G.fn("ActorTool.findActor")(function*(Q$){let y=yield*V.get(P.sessionID,Q$);if(y)return{entry:y,sessionID:P.sessionID};let n=F0.make(Q$),a=yield*V.get(n,Q$);if(a)return{entry:a,sessionID:n};return});if(D.action==="send"){let Q$=oX.current;if(!Q$)return yield*G.fail(Error("Inbox service unavailable \u2014 Inbox.layer must be running for the actor tool to send messages"));let y=D.to_session_id!==void 0?F0.make(D.to_session_id):P.sessionID,n=yield*Q$.send({receiverSessionID:y,receiverActorID:D.to_actor_id,senderSessionID:P.sessionID,senderActorID:P.agent??"main",content:D.content,...D.type!==void 0?{type:D.type}:{}}).pipe(G.catchTag("InboxReceiverNotFound",()=>G.succeed({inboxID:null,error:"receiver not found"})));if("error"in n)return{title:"Send failed: receiver not found",output:JSON.stringify(n),metadata:{receiver_actor_id:D.to_actor_id,receiver_session_id:y,error:n.error}};return{title:`Sent to ${D.to_actor_id}`,output:JSON.stringify({inboxID:n.inboxID}),metadata:{inboxID:n.inboxID,receiver_actor_id:D.to_actor_id,receiver_session_id:y}}}if(D.action==="status"){let Q$=yield*N(D.actor_id);if(!Q$)return R("status",D.actor_id);let y=Q$.entry,n={status:y.status,actor_id:y.actorID,description:y.description,agent:y.agent,background:y.background,turnCount:y.turnCount,lastTurnTime:y.lastTurnTime,...y.lastError!==void 0?{error:y.lastError}:{},time:y.time};return{title:`Actor status: ${y.status}`,output:JSON.stringify(n),metadata:{actor_id:y.actorID,status:y.status}}}if(D.action==="wait"){let Q$=yield*N(D.actor_id);if(!Q$)return R("wait",D.actor_id);let y=yield*W.wait({sessionID:Q$.sessionID,actor_id:D.actor_id,timeout_ms:D.timeout_ms});return{title:`Actor wait: ${y.status}${y.lastOutcome?"/"+y.lastOutcome:""}`,output:JSON.stringify(y),metadata:{actor_id:y.actor_id,status:y.status,...y.lastOutcome?{lastOutcome:y.lastOutcome}:{}}}}if(D.action==="cancel"){let Q$=yield*N(D.actor_id);if(!Q$)return R("cancel",D.actor_id);let y=Q$.entry;if(y.status==="idle"){let c$={status:y.status,actor_id:y.actorID,description:y.description,agent:y.agent,background:y.background};return{title:`Actor cancel: ${y.status}`,output:JSON.stringify(c$),metadata:{actor_id:y.actorID,status:y.status}}}yield*(yield*j()).cancel(Q$.sessionID,y.actorID,"graceful");let a={status:"cancelled",actor_id:y.actorID,description:y.description,agent:y.agent,background:y.background};return{title:"Actor cancel: cancelled",output:JSON.stringify(a),metadata:{actor_id:y.actorID,status:"cancelled"}}}if(!P.extra?.bypassAgentCheck)yield*P.ask({permission:"actor",patterns:[D.subagent_type],always:["*"],metadata:{description:D.description,subagent_type:D.subagent_type}});let x=yield*Z.get(D.subagent_type);if(!x)return yield*G.fail(new w0(`Unknown agent type "${D.subagent_type}". Valid subagent_type values are listed in the actor tool description \u2014 pass one of those.`));let b=D.prompt,v=D.action==="spawn";if(D.context==="state"){let Q$=yield*X.loadLatest(P.sessionID).pipe(G.catch(()=>G.succeed(void 0)));if(Q$)b=["<session-state>","Here is a summary of the parent session's progress:","",Q$,"</session-state>",""].join(`
7427
- `)+b}let m=yield*G.sync(()=>E0.get({sessionID:P.sessionID,messageID:P.messageID}));if(m.info.role!=="assistant")return yield*G.fail(Error("Not an assistant message"));let A=D.model??x.modelRef,u=A?yield*K.resolveModelRef(A,m.info.providerID).pipe(G.map((Q$)=>({modelID:Q$.id,providerID:Q$.providerID}))):x.model??{modelID:m.info.modelID,providerID:m.info.providerID},r=D.task_id,S="";if(D.task_id){if(!C8.safeParse(D.task_id).success)r=void 0,S=`note: task_id "${D.task_id}" is not a valid task ID (expected Tn or Tn.m); ran ad-hoc. Task IDs come from the \`task\` tool.`;else if(!(yield*_.get({session_id:P.sessionID,id:D.task_id})))r=void 0,S=`note: task_id "${D.task_id}" does not exist in this session; ran ad-hoc. Create it with the \`task\` tool first, or omit task_id.`}let T=yield*j(),k=yield*T.spawn({mode:"subagent",sessionID:P.sessionID,agentType:x.name,description:D.description,task:b,context:D.context??"none",tools:x.toolAllowlist?[...x.toolAllowlist]:"INHERIT",model:u,background:v,task_id:r,onReady:({actorID:Q$,sessionID:y})=>P.metadata({title:D.description,metadata:{sessionId:y,actorId:Q$,model:u}}),...D.output_schema?{format:{type:"json_schema",schema:D.output_schema,retryCount:2}}:{}});if(D.action==="spawn")return{title:D.description,metadata:{sessionId:k.sessionID,actorId:k.actorID,model:u},output:(S?S+`
7426
+ did you mean: ${Y}?`:"");return yield*G.fail({kind:"unknown-verb",line:Z,detail:K})}}});function wC($){return G.gen(function*(){let J=yield*DZ($),Z=[];for(let Y of J){let[K,Q,...V]=Y.tokens;if(K!=="actor")return yield*G.fail({kind:"unknown-verb",line:Y.line,detail:`actor: every command must start with 'actor' (got '${K??""}')`});let X=yield*SC(Q,V,Y.line);Z.push(X)}return Z})}function RC($){if($.action==="spawn"||$.action==="run")return $.action;if($.background===!0||$.async===!0)return"spawn";return"run"}function LC($){let J=IZ($);if(!J)return;if(J.kind==="operation")return{operation:J.operation};let Z=J.obj,Y=Z.subagent_type,K=Z.description,Q=Z.prompt;if(typeof Y==="string"&&typeof K==="string"&&typeof Q==="string"){let V={action:RC(Z),subagent_type:Y,description:K,prompt:Q};if(typeof Z.model==="string")V.model=Z.model;if(typeof Z.task_id==="string")V.task_id=Z.task_id;if(typeof Z.actor_id==="string")V.actor_id=Z.actor_id;return{operation:V}}return}var o7=H$(AC,G.gen(function*(){let $=(yield*e.toolDescriptionEffect("actor"))??"",J=(yield*e.toolDescriptionEffect("actor.shell"))??"",Z=yield*c0.Service,Y=yield*R$.Service,K=yield*H1.Service,Q=yield*Y1.Service,V=yield*L1.Service,X=yield*o2.Service,W=yield*c2.Service,_=yield*K1.Service,j=()=>{let H=SZ.current;if(!H)return G.fail(Error("Actor service unavailable \u2014 Actor.defaultLayer must be running for the actor tool to spawn or cancel actors"));return G.succeed(H)};return G.fn("ActorTool.init")(function*(){let U=(yield*Z.list()).filter((C)=>C.mode==="subagent"&&!C.hidden).map((C)=>C.name);if(U.length===0)return yield*G.die(Error("No spawnable subagent types"));let z=F.enum(U),M=KG(z),I=G.fn("ActorTool.execute")(function*(C,P){let D=C.operation,L=yield*Y.get(),R=(Q$,y)=>{let n={status:"unknown",actor_id:y};return{title:`Actor ${Q$}: unknown`,output:JSON.stringify(n),metadata:{actor_id:y,status:"unknown"}}},N=G.fn("ActorTool.findActor")(function*(Q$){let y=yield*V.get(P.sessionID,Q$);if(y)return{entry:y,sessionID:P.sessionID};let n=F0.make(Q$),a=yield*V.get(n,Q$);if(a)return{entry:a,sessionID:n};return});if(D.action==="send"){let Q$=oX.current;if(!Q$)return yield*G.fail(Error("Inbox service unavailable \u2014 Inbox.layer must be running for the actor tool to send messages"));let y=D.to_session_id!==void 0?F0.make(D.to_session_id):P.sessionID,n=yield*Q$.send({receiverSessionID:y,receiverActorID:D.to_actor_id,senderSessionID:P.sessionID,senderActorID:P.agent??"main",content:D.content,...D.type!==void 0?{type:D.type}:{}}).pipe(G.catchTag("InboxReceiverNotFound",()=>G.succeed({inboxID:null,error:"receiver not found"})));if("error"in n)return{title:"Send failed: receiver not found",output:JSON.stringify(n),metadata:{receiver_actor_id:D.to_actor_id,receiver_session_id:y,error:n.error}};return{title:`Sent to ${D.to_actor_id}`,output:JSON.stringify({inboxID:n.inboxID}),metadata:{inboxID:n.inboxID,receiver_actor_id:D.to_actor_id,receiver_session_id:y}}}if(D.action==="status"){let Q$=yield*N(D.actor_id);if(!Q$)return R("status",D.actor_id);let y=Q$.entry,n={status:y.status,actor_id:y.actorID,description:y.description,agent:y.agent,background:y.background,turnCount:y.turnCount,lastTurnTime:y.lastTurnTime,...y.lastError!==void 0?{error:y.lastError}:{},time:y.time};return{title:`Actor status: ${y.status}`,output:JSON.stringify(n),metadata:{actor_id:y.actorID,status:y.status}}}if(D.action==="wait"){let Q$=yield*N(D.actor_id);if(!Q$)return R("wait",D.actor_id);let y=yield*W.wait({sessionID:Q$.sessionID,actor_id:D.actor_id,timeout_ms:D.timeout_ms});return{title:`Actor wait: ${y.status}${y.lastOutcome?"/"+y.lastOutcome:""}`,output:JSON.stringify(y),metadata:{actor_id:y.actor_id,status:y.status,...y.lastOutcome?{lastOutcome:y.lastOutcome}:{}}}}if(D.action==="cancel"){let Q$=yield*N(D.actor_id);if(!Q$)return R("cancel",D.actor_id);let y=Q$.entry;if(y.status==="idle"){let c$={status:y.status,actor_id:y.actorID,description:y.description,agent:y.agent,background:y.background};return{title:`Actor cancel: ${y.status}`,output:JSON.stringify(c$),metadata:{actor_id:y.actorID,status:y.status}}}yield*(yield*j()).cancel(Q$.sessionID,y.actorID,"graceful");let a={status:"cancelled",actor_id:y.actorID,description:y.description,agent:y.agent,background:y.background};return{title:"Actor cancel: cancelled",output:JSON.stringify(a),metadata:{actor_id:y.actorID,status:"cancelled"}}}if(!P.extra?.bypassAgentCheck)yield*P.ask({permission:"actor",patterns:[D.subagent_type],always:["*"],metadata:{description:D.description,subagent_type:D.subagent_type}});let x=yield*Z.get(D.subagent_type);if(!x)return yield*G.fail(new R0(`Unknown agent type "${D.subagent_type}". Valid subagent_type values are listed in the actor tool description \u2014 pass one of those.`));let b=D.prompt,v=D.action==="spawn";if(D.context==="state"){let Q$=yield*X.loadLatest(P.sessionID).pipe(G.catch(()=>G.succeed(void 0)));if(Q$)b=["<session-state>","Here is a summary of the parent session's progress:","",Q$,"</session-state>",""].join(`
7427
+ `)+b}let m=yield*G.sync(()=>w0.get({sessionID:P.sessionID,messageID:P.messageID}));if(m.info.role!=="assistant")return yield*G.fail(Error("Not an assistant message"));let A=D.model??x.modelRef,u=A?yield*K.resolveModelRef(A,m.info.providerID).pipe(G.map((Q$)=>({modelID:Q$.id,providerID:Q$.providerID}))):x.model??{modelID:m.info.modelID,providerID:m.info.providerID},r=D.task_id,S="";if(D.task_id){if(!C8.safeParse(D.task_id).success)r=void 0,S=`note: task_id "${D.task_id}" is not a valid task ID (expected Tn or Tn.m); ran ad-hoc. Task IDs come from the \`task\` tool.`;else if(!(yield*_.get({session_id:P.sessionID,id:D.task_id})))r=void 0,S=`note: task_id "${D.task_id}" does not exist in this session; ran ad-hoc. Create it with the \`task\` tool first, or omit task_id.`}let T=yield*j(),k=yield*T.spawn({mode:"subagent",sessionID:P.sessionID,agentType:x.name,description:D.description,task:b,context:D.context??"none",tools:x.toolAllowlist?[...x.toolAllowlist]:"INHERIT",model:u,background:v,task_id:r,onReady:({actorID:Q$,sessionID:y})=>P.metadata({title:D.description,metadata:{sessionId:y,actorId:Q$,model:u}}),...D.output_schema?{format:{type:"json_schema",schema:D.output_schema,retryCount:2}}:{}});if(D.action==="spawn")return{title:D.description,metadata:{sessionId:k.sessionID,actorId:k.actorID,model:u},output:(S?S+`
7428
7428
  `:"")+`Background actor started. actor_id: ${k.actorID}
7429
7429
  The result will be delivered as a notification when complete.`};let A$=yield*O1.make(),s=()=>{A$.fork(T.cancel(k.sessionID,k.actorID,"graceful"))},J$=yield*G.acquireUseRelease(G.sync(()=>{P.abort.addEventListener("abort",s)}),()=>B0.await(k.outcome).pipe(G.timeout(D.timeout_ms??600000),G.catchTag("TimeoutError",()=>G.succeed({status:"timeout"}))),()=>G.sync(()=>{P.abort.removeEventListener("abort",s)}));if(J$.status==="failure")return yield*G.fail(Error(`Tool execution failed: ${J$.error??"unknown"}`));let Z$=J$.status==="success"?J$.structured!==void 0?JSON.stringify(J$.structured):J$.finalText??"(no output)":J$.status==="timeout"?"<timeout>task did not complete within timeout</timeout>":"<cancelled>task was cancelled</cancelled>",W$=J$.status==="success"?J$.reportedStatus??"unknown":J$.status,y$=J$.status==="success"&&J$.reportedSummary?` summary="${J$.reportedSummary.replace(/\s+/g," ").replace(/"/g,"'").trim()}"`:"";return{title:D.description,metadata:{sessionId:k.sessionID,actorId:k.actorID,model:u},output:[...S?[S,""]:[],`actor_id: ${k.actorID} (for resuming to continue this task if needed)`,"",`<actor_result status="${W$}"${y$}>`,Z$,"</actor_result>"].join(`
7430
7430
  `)}});return{description:$,parameters:M,execute:(C,P)=>I(C,P).pipe(G.orDie),shell:{description:J,parse:wC,recover:LC}}})}));var sX=["create","list","get","start","block","unblock","done","abandon","rename"],NC="task";function yC($){return G.gen(function*(){let J=yield*DZ($),Z=[];for(let Y of J){let[K,Q,...V]=Y.tokens;if(K!=="task")return yield*G.fail({kind:"unknown-verb",line:Y.line,detail:`task: every command must start with 'task' (got '${K??""}')`});let X=yield*kC(Q,V,Y.line);Z.push(X)}return Z})}function TC($){let J=IZ($);if(!J)return;if(J.kind==="operation")return{operation:J.operation};let Z=J.obj;if(typeof Z.summary==="string"){let Y={action:"create",summary:Z.summary};if(typeof Z.parent_id==="string")Y.parent_id=Z.parent_id;if(typeof Z.session_id==="string")Y.session_id=Z.session_id;return{operation:Y}}return}function c1($,J,Z){let Y=[],K={},Q={};for(let V=0;V<$.length;V++){let X=$[V],W=Z.find((H)=>X===`--${H}`);if(W){Q[W]=!0;continue}let _=J.find((H)=>X===`--${H}`);if(_){let H=$[V+1];if(H===void 0)return{flags:K,bools:Q,rest:Y,error:`--${_} requires a value`};K[_]=H,V++;continue}let j=J.find((H)=>X.startsWith(`--${H}=`));if(j){let H=X.slice(`--${j}=`.length);if(H==="")return{flags:K,bools:Q,rest:Y,error:`--${j} requires a value`};K[j]=H;continue}Y.push(X)}return{flags:K,bools:Q,rest:Y}}function l1($,J,Z){return G.fail({kind:"flag",line:Z,detail:`task: ${$}: ${J}`})}function kC($,J,Z){switch($){case"create":{let{flags:Y,rest:K,error:Q}=c1(J,["parent","session"],[]);if(Q)return l1("create",Q,Z);if(K.length!==1)return o1("create","<summary> [--parent <TID>] [--session <id>]",K,Z);return G.succeed({operation:{action:"create",summary:K[0],...Y.parent?{parent_id:Y.parent}:{},...Y.session?{session_id:Y.session}:{}}})}case"list":{let{flags:Y,bools:K,rest:Q,error:V}=c1(J,["session"],["include-terminal","include-archived"]);if(V)return l1("list",V,Z);if(Q.length>1)return o1("list","[<status>] [--include-terminal] [--include-archived] [--session <id>]",Q,Z);return G.succeed({operation:{action:"list",...Q.length===1?{status:Q[0]}:{},...K["include-terminal"]?{include_terminal:!0}:{},...K["include-archived"]?{include_archived:!0}:{},...Y.session?{session_id:Y.session}:{}}})}case"get":{let{flags:Y,rest:K,error:Q}=c1(J,["session"],[]);if(Q)return l1("get",Q,Z);if(K.length!==1)return o1("get","<id> [--session <id>]",K,Z);return G.succeed({operation:{action:"get",id:K[0],...Y.session?{session_id:Y.session}:{}}})}case"start":{let{flags:Y,rest:K,error:Q}=c1(J,["reason","session"],[]);if(Q)return l1("start",Q,Z);if(K.length!==1)return o1("start","<id> [--reason <note>] [--session <id>]",K,Z);return G.succeed({operation:{action:"start",id:K[0],...Y.reason?{event_summary:Y.reason}:{},...Y.session?{session_id:Y.session}:{}}})}case"block":{let{flags:Y,rest:K,error:Q}=c1(J,["session"],[]);if(Q)return l1("block",Q,Z);if(K.length!==2)return o1("block","<id> <reason> [--session <id>]",K,Z);return G.succeed({operation:{action:"block",id:K[0],event_summary:K[1],...Y.session?{session_id:Y.session}:{}}})}case"unblock":{let{flags:Y,rest:K,error:Q}=c1(J,["session"],[]);if(Q)return l1("unblock",Q,Z);if(K.length!==2)return o1("unblock","<id> <reason> [--session <id>]",K,Z);return G.succeed({operation:{action:"unblock",id:K[0],event_summary:K[1],...Y.session?{session_id:Y.session}:{}}})}case"done":{let{flags:Y,rest:K,error:Q}=c1(J,["session"],[]);if(Q)return l1("done",Q,Z);if(K.length!==2)return o1("done","<id> <summary> [--session <id>]",K,Z);return G.succeed({operation:{action:"done",id:K[0],event_summary:K[1],...Y.session?{session_id:Y.session}:{}}})}case"abandon":{let{flags:Y,rest:K,error:Q}=c1(J,["session"],[]);if(Q)return l1("abandon",Q,Z);if(K.length!==2)return o1("abandon","<id> <reason> [--session <id>]",K,Z);return G.succeed({operation:{action:"abandon",id:K[0],event_summary:K[1],...Y.session?{session_id:Y.session}:{}}})}case"rename":{let{flags:Y,rest:K,error:Q}=c1(J,["session"],[]);if(Q)return l1("rename",Q,Z);if(K.length!==2)return o1("rename","<id> <summary> [--session <id>]",K,Z);return G.succeed({operation:{action:"rename",id:K[0],summary:K[1],...Y.session?{session_id:Y.session}:{}}})}default:{let Y=PZ($??"",sX),K=`task: unknown verb "${$??""}"
@@ -7446,12 +7446,12 @@ run_id: ${j}`,metadata:{runID:j,status:"failed",transcript:M}};return{title:`wor
7446
7446
 
7447
7447
  `:"")+`Cancelled.
7448
7448
  run_id: ${j}`,metadata:{runID:j,status:"cancelled",transcript:M}}}if(K.operation==="status"){let X=yield*V.status({runID:K.run_id});return{title:`workflow ${X.status}`,output:JSON.stringify(X),metadata:{runID:K.run_id,status:X.status}}}if(K.operation==="wait"){let X=yield*V.wait({runID:K.run_id,timeoutMs:K.timeout_ms});return{title:`workflow ${X.status}`,output:JSON.stringify(X),metadata:{runID:K.run_id,status:X.status}}}if(K.operation==="cancel")return yield*V.cancel({runID:K.run_id}),{title:"workflow cancelled",output:`Cancelled ${K.run_id}`,metadata:{runID:K.run_id,status:"cancelled"}};if(K.operation==="resume"){let X=yield*V.resume({runID:K.run_id});return{title:X.resumed?"workflow resumed":"workflow not resumable",output:JSON.stringify(X),metadata:{runID:K.run_id}}}throw Error(`unhandled workflow operation: ${K.operation}`)});return{description:$,parameters:vC,execute:(K,Q)=>Y(K,Q).pipe(G.scoped,G.orDie)}}));function _I($){for(var J=1;J<arguments.length;J++){var Z=arguments[J];for(var Y in Z)if(Z.hasOwnProperty(Y))$[Y]=Z[Y]}return $}function _3($,J){return Array(J+1).join($)}function OI($){return $.replace(/^\n*/,"")}function qI($){var J=$.length;while(J>0&&$[J-1]===`
7449
- `)J--;return $.substring(0,J)}var FI=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function O3($){return q3($,FI)}var WU=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function jU($){return q3($,WU)}function zI($){return BU($,WU)}var UU=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function CI($){return q3($,UU)}function MI($){return BU($,UU)}function q3($,J){return J.indexOf($.nodeName)>=0}function BU($,J){return $.getElementsByTagName&&J.some(function(Z){return $.getElementsByTagName(Z).length})}var y0={};y0.paragraph={filter:"p",replacement:function($){return`
7449
+ `)J--;return $.substring(0,J)}var FI=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function O3($){return q3($,FI)}var WU=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function jU($){return q3($,WU)}function zI($){return BU($,WU)}var UU=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function CI($){return q3($,UU)}function MI($){return BU($,UU)}function q3($,J){return J.indexOf($.nodeName)>=0}function BU($,J){return $.getElementsByTagName&&J.some(function(Z){return $.getElementsByTagName(Z).length})}var T0={};T0.paragraph={filter:"p",replacement:function($){return`
7450
7450
 
7451
7451
  `+$+`
7452
7452
 
7453
- `}};y0.lineBreak={filter:"br",replacement:function($,J,Z){return Z.br+`
7454
- `}};y0.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function($,J,Z){var Y=Number(J.nodeName.charAt(1));if(Z.headingStyle==="setext"&&Y<3){var K=_3(Y===1?"=":"-",$.length);return`
7453
+ `}};T0.lineBreak={filter:"br",replacement:function($,J,Z){return Z.br+`
7454
+ `}};T0.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function($,J,Z){var Y=Number(J.nodeName.charAt(1));if(Z.headingStyle==="setext"&&Y<3){var K=_3(Y===1?"=":"-",$.length);return`
7455
7455
 
7456
7456
  `+$+`
7457
7457
  `+K+`
@@ -7460,40 +7460,40 @@ run_id: ${j}`,metadata:{runID:j,status:"cancelled",transcript:M}}}if(K.operation
7460
7460
 
7461
7461
  `+_3("#",Y)+" "+$+`
7462
7462
 
7463
- `}};y0.blockquote={filter:"blockquote",replacement:function($){return $=$.replace(/^\n+|\n+$/g,""),$=$.replace(/^/gm,"> "),`
7463
+ `}};T0.blockquote={filter:"blockquote",replacement:function($){return $=$.replace(/^\n+|\n+$/g,""),$=$.replace(/^/gm,"> "),`
7464
7464
 
7465
7465
  `+$+`
7466
7466
 
7467
- `}};y0.list={filter:["ul","ol"],replacement:function($,J){var Z=J.parentNode;if(Z.nodeName==="LI"&&Z.lastElementChild===J)return`
7467
+ `}};T0.list={filter:["ul","ol"],replacement:function($,J){var Z=J.parentNode;if(Z.nodeName==="LI"&&Z.lastElementChild===J)return`
7468
7468
  `+$;else return`
7469
7469
 
7470
7470
  `+$+`
7471
7471
 
7472
- `}};y0.listItem={filter:"li",replacement:function($,J,Z){$=$.replace(/^\n+/,"").replace(/\n+$/,`
7472
+ `}};T0.listItem={filter:"li",replacement:function($,J,Z){$=$.replace(/^\n+/,"").replace(/\n+$/,`
7473
7473
  `).replace(/\n/gm,`
7474
7474
  `);var Y=Z.bulletListMarker+" ",K=J.parentNode;if(K.nodeName==="OL"){var Q=K.getAttribute("start"),V=Array.prototype.indexOf.call(K.children,J);Y=(Q?Number(Q)+V:V+1)+". "}return Y+$+(J.nextSibling&&!/\n$/.test($)?`
7475
- `:"")}};y0.indentedCodeBlock={filter:function($,J){return J.codeBlockStyle==="indented"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,J,Z){return`
7475
+ `:"")}};T0.indentedCodeBlock={filter:function($,J){return J.codeBlockStyle==="indented"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,J,Z){return`
7476
7476
 
7477
7477
  `+J.firstChild.textContent.replace(/\n/g,`
7478
7478
  `)+`
7479
7479
 
7480
- `}};y0.fencedCodeBlock={filter:function($,J){return J.codeBlockStyle==="fenced"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,J,Z){var Y=J.firstChild.getAttribute("class")||"",K=(Y.match(/language-(\S+)/)||[null,""])[1],Q=J.firstChild.textContent,V=Z.fence.charAt(0),X=3,W=new RegExp("^"+V+"{3,}","gm"),_;while(_=W.exec(Q))if(_[0].length>=X)X=_[0].length+1;var j=_3(V,X);return`
7480
+ `}};T0.fencedCodeBlock={filter:function($,J){return J.codeBlockStyle==="fenced"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,J,Z){var Y=J.firstChild.getAttribute("class")||"",K=(Y.match(/language-(\S+)/)||[null,""])[1],Q=J.firstChild.textContent,V=Z.fence.charAt(0),X=3,W=new RegExp("^"+V+"{3,}","gm"),_;while(_=W.exec(Q))if(_[0].length>=X)X=_[0].length+1;var j=_3(V,X);return`
7481
7481
 
7482
7482
  `+j+K+`
7483
7483
  `+Q.replace(/\n$/,"")+`
7484
7484
  `+j+`
7485
7485
 
7486
- `}};y0.horizontalRule={filter:"hr",replacement:function($,J,Z){return`
7486
+ `}};T0.horizontalRule={filter:"hr",replacement:function($,J,Z){return`
7487
7487
 
7488
7488
  `+Z.hr+`
7489
7489
 
7490
- `}};y0.inlineLink={filter:function($,J){return J.linkStyle==="inlined"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,J){var Z=J.getAttribute("href");if(Z)Z=Z.replace(/([()])/g,"\\$1");var Y=_6(J.getAttribute("title"));if(Y)Y=' "'+Y.replace(/"/g,"\\\"")+'"';return"["+$+"]("+Z+Y+")"}};y0.referenceLink={filter:function($,J){return J.linkStyle==="referenced"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,J,Z){var Y=J.getAttribute("href"),K=_6(J.getAttribute("title"));if(K)K=' "'+K+'"';var Q,V;switch(Z.linkReferenceStyle){case"collapsed":Q="["+$+"][]",V="["+$+"]: "+Y+K;break;case"shortcut":Q="["+$+"]",V="["+$+"]: "+Y+K;break;default:var X=this.references.length+1;Q="["+$+"]["+X+"]",V="["+X+"]: "+Y+K}return this.references.push(V),Q},references:[],append:function($){var J="";if(this.references.length)J=`
7490
+ `}};T0.inlineLink={filter:function($,J){return J.linkStyle==="inlined"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,J){var Z=J.getAttribute("href");if(Z)Z=Z.replace(/([()])/g,"\\$1");var Y=_6(J.getAttribute("title"));if(Y)Y=' "'+Y.replace(/"/g,"\\\"")+'"';return"["+$+"]("+Z+Y+")"}};T0.referenceLink={filter:function($,J){return J.linkStyle==="referenced"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,J,Z){var Y=J.getAttribute("href"),K=_6(J.getAttribute("title"));if(K)K=' "'+K+'"';var Q,V;switch(Z.linkReferenceStyle){case"collapsed":Q="["+$+"][]",V="["+$+"]: "+Y+K;break;case"shortcut":Q="["+$+"]",V="["+$+"]: "+Y+K;break;default:var X=this.references.length+1;Q="["+$+"]["+X+"]",V="["+X+"]: "+Y+K}return this.references.push(V),Q},references:[],append:function($){var J="";if(this.references.length)J=`
7491
7491
 
7492
7492
  `+this.references.join(`
7493
7493
  `)+`
7494
7494
 
7495
- `,this.references=[];return J}};y0.emphasis={filter:["em","i"],replacement:function($,J,Z){if(!$.trim())return"";return Z.emDelimiter+$+Z.emDelimiter}};y0.strong={filter:["strong","b"],replacement:function($,J,Z){if(!$.trim())return"";return Z.strongDelimiter+$+Z.strongDelimiter}};y0.code={filter:function($){var J=$.previousSibling||$.nextSibling,Z=$.parentNode.nodeName==="PRE"&&!J;return $.nodeName==="CODE"&&!Z},replacement:function($){if(!$)return"";$=$.replace(/\r?\n|\r/g," ");var J=/^`|^ .*?[^ ].* $|`$/.test($)?" ":"",Z="`",Y=$.match(/`+/gm)||[];while(Y.indexOf(Z)!==-1)Z=Z+"`";return Z+J+$+J+Z}};y0.image={filter:"img",replacement:function($,J){var Z=_6(J.getAttribute("alt")),Y=J.getAttribute("src")||"",K=_6(J.getAttribute("title")),Q=K?' "'+K+'"':"";return Y?"!["+Z+"]("+Y+Q+")":""}};function _6($){return $?$.replace(/(\n+\s*)+/g,`
7496
- `):""}function HU($){this.options=$,this._keep=[],this._remove=[],this.blankRule={replacement:$.blankReplacement},this.keepReplacement=$.keepReplacement,this.defaultRule={replacement:$.defaultReplacement},this.array=[];for(var J in $.rules)this.array.push($.rules[J])}HU.prototype={add:function($,J){this.array.unshift(J)},keep:function($){this._keep.unshift({filter:$,replacement:this.keepReplacement})},remove:function($){this._remove.unshift({filter:$,replacement:function(){return""}})},forNode:function($){if($.isBlank)return this.blankRule;var J;if(J=U3(this.array,$,this.options))return J;if(J=U3(this._keep,$,this.options))return J;if(J=U3(this._remove,$,this.options))return J;return this.defaultRule},forEach:function($){for(var J=0;J<this.array.length;J++)$(this.array[J],J)}};function U3($,J,Z){for(var Y=0;Y<$.length;Y++){var K=$[Y];if(DI(K,J,Z))return K}return}function DI($,J,Z){var Y=$.filter;if(typeof Y==="string"){if(Y===J.nodeName.toLowerCase())return!0}else if(Array.isArray(Y)){if(Y.indexOf(J.nodeName.toLowerCase())>-1)return!0}else if(typeof Y==="function"){if(Y.call($,J,Z))return!0}else throw TypeError("`filter` needs to be a string, array, or function")}function PI($){var{element:J,isBlock:Z,isVoid:Y}=$,K=$.isPre||function(H){return H.nodeName==="PRE"};if(!J.firstChild||K(J))return;var Q=null,V=!1,X=null,W=GU(X,J,K);while(W!==J){if(W.nodeType===3||W.nodeType===4){var _=W.data.replace(/[ \r\n\t]+/g," ");if((!Q||/ $/.test(Q.data))&&!V&&_[0]===" ")_=_.substr(1);if(!_){W=B3(W);continue}W.data=_,Q=W}else if(W.nodeType===1){if(Z(W)||W.nodeName==="BR"){if(Q)Q.data=Q.data.replace(/ $/,"");Q=null,V=!1}else if(Y(W)||K(W))Q=null,V=!0;else if(Q)V=!1}else{W=B3(W);continue}var j=GU(X,W,K);X=W,W=j}if(Q){if(Q.data=Q.data.replace(/ $/,""),!Q.data)B3(Q)}}function B3($){var J=$.nextSibling||$.parentNode;return $.parentNode.removeChild($),J}function GU($,J,Z){if($&&$.parentNode===J||Z(J))return J.nextSibling||J.parentNode;return J.firstChild||J.nextSibling||J.parentNode}var _U=typeof window<"u"?window:{};function II(){var $=_U.DOMParser,J=!1;try{if(new $().parseFromString("","text/html"))J=!0}catch(Z){}return J}function AI(){var $=function(){};{var J=VU();$.prototype.parseFromString=function(Z){return J.createDocument(Z)}}return $}var SI=II()?_U.DOMParser:AI();function wI($,J){var Z;if(typeof $==="string"){var Y=RI().parseFromString('<x-turndown id="turndown-root">'+$+"</x-turndown>","text/html");Z=Y.getElementById("turndown-root")}else Z=$.cloneNode(!0);return PI({element:Z,isBlock:O3,isVoid:jU,isPre:J.preformattedCode?LI:null}),Z}var H3;function RI(){return H3=H3||new SI,H3}function LI($){return $.nodeName==="PRE"||$.nodeName==="CODE"}function NI($,J){return $.isBlock=O3($),$.isCode=$.nodeName==="CODE"||$.parentNode.isCode,$.isBlank=yI($),$.flankingWhitespace=TI($,J),$}function yI($){return!jU($)&&!CI($)&&/^\s*$/i.test($.textContent)&&!zI($)&&!MI($)}function TI($,J){if($.isBlock||J.preformattedCode&&$.isCode)return{leading:"",trailing:""};var Z=kI($.textContent);if(Z.leadingAscii&&XU("left",$,J))Z.leading=Z.leadingNonAscii;if(Z.trailingAscii&&XU("right",$,J))Z.trailing=Z.trailingNonAscii;return{leading:Z.leading,trailing:Z.trailing}}function kI($){var J=$.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:J[1],leadingAscii:J[2],leadingNonAscii:J[3],trailing:J[4],trailingNonAscii:J[5],trailingAscii:J[6]}}function XU($,J,Z){var Y,K,Q;if($==="left")Y=J.previousSibling,K=/ $/;else Y=J.nextSibling,K=/^ /;if(Y){if(Y.nodeType===3)Q=K.test(Y.nodeValue);else if(Z.preformattedCode&&Y.nodeName==="CODE")Q=!1;else if(Y.nodeType===1&&!O3(Y))Q=K.test(Y.textContent)}return Q}var EI=Array.prototype.reduce,xI=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function O6($){if(!(this instanceof O6))return new O6($);var J={rules:y0,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(Z,Y){return Y.isBlock?`
7495
+ `,this.references=[];return J}};T0.emphasis={filter:["em","i"],replacement:function($,J,Z){if(!$.trim())return"";return Z.emDelimiter+$+Z.emDelimiter}};T0.strong={filter:["strong","b"],replacement:function($,J,Z){if(!$.trim())return"";return Z.strongDelimiter+$+Z.strongDelimiter}};T0.code={filter:function($){var J=$.previousSibling||$.nextSibling,Z=$.parentNode.nodeName==="PRE"&&!J;return $.nodeName==="CODE"&&!Z},replacement:function($){if(!$)return"";$=$.replace(/\r?\n|\r/g," ");var J=/^`|^ .*?[^ ].* $|`$/.test($)?" ":"",Z="`",Y=$.match(/`+/gm)||[];while(Y.indexOf(Z)!==-1)Z=Z+"`";return Z+J+$+J+Z}};T0.image={filter:"img",replacement:function($,J){var Z=_6(J.getAttribute("alt")),Y=J.getAttribute("src")||"",K=_6(J.getAttribute("title")),Q=K?' "'+K+'"':"";return Y?"!["+Z+"]("+Y+Q+")":""}};function _6($){return $?$.replace(/(\n+\s*)+/g,`
7496
+ `):""}function HU($){this.options=$,this._keep=[],this._remove=[],this.blankRule={replacement:$.blankReplacement},this.keepReplacement=$.keepReplacement,this.defaultRule={replacement:$.defaultReplacement},this.array=[];for(var J in $.rules)this.array.push($.rules[J])}HU.prototype={add:function($,J){this.array.unshift(J)},keep:function($){this._keep.unshift({filter:$,replacement:this.keepReplacement})},remove:function($){this._remove.unshift({filter:$,replacement:function(){return""}})},forNode:function($){if($.isBlank)return this.blankRule;var J;if(J=U3(this.array,$,this.options))return J;if(J=U3(this._keep,$,this.options))return J;if(J=U3(this._remove,$,this.options))return J;return this.defaultRule},forEach:function($){for(var J=0;J<this.array.length;J++)$(this.array[J],J)}};function U3($,J,Z){for(var Y=0;Y<$.length;Y++){var K=$[Y];if(DI(K,J,Z))return K}return}function DI($,J,Z){var Y=$.filter;if(typeof Y==="string"){if(Y===J.nodeName.toLowerCase())return!0}else if(Array.isArray(Y)){if(Y.indexOf(J.nodeName.toLowerCase())>-1)return!0}else if(typeof Y==="function"){if(Y.call($,J,Z))return!0}else throw TypeError("`filter` needs to be a string, array, or function")}function PI($){var{element:J,isBlock:Z,isVoid:Y}=$,K=$.isPre||function(H){return H.nodeName==="PRE"};if(!J.firstChild||K(J))return;var Q=null,V=!1,X=null,W=GU(X,J,K);while(W!==J){if(W.nodeType===3||W.nodeType===4){var _=W.data.replace(/[ \r\n\t]+/g," ");if((!Q||/ $/.test(Q.data))&&!V&&_[0]===" ")_=_.substr(1);if(!_){W=B3(W);continue}W.data=_,Q=W}else if(W.nodeType===1){if(Z(W)||W.nodeName==="BR"){if(Q)Q.data=Q.data.replace(/ $/,"");Q=null,V=!1}else if(Y(W)||K(W))Q=null,V=!0;else if(Q)V=!1}else{W=B3(W);continue}var j=GU(X,W,K);X=W,W=j}if(Q){if(Q.data=Q.data.replace(/ $/,""),!Q.data)B3(Q)}}function B3($){var J=$.nextSibling||$.parentNode;return $.parentNode.removeChild($),J}function GU($,J,Z){if($&&$.parentNode===J||Z(J))return J.nextSibling||J.parentNode;return J.firstChild||J.nextSibling||J.parentNode}var _U=typeof window<"u"?window:{};function II(){var $=_U.DOMParser,J=!1;try{if(new $().parseFromString("","text/html"))J=!0}catch(Z){}return J}function AI(){var $=function(){};{var J=VU();$.prototype.parseFromString=function(Z){return J.createDocument(Z)}}return $}var SI=II()?_U.DOMParser:AI();function wI($,J){var Z;if(typeof $==="string"){var Y=RI().parseFromString('<x-turndown id="turndown-root">'+$+"</x-turndown>","text/html");Z=Y.getElementById("turndown-root")}else Z=$.cloneNode(!0);return PI({element:Z,isBlock:O3,isVoid:jU,isPre:J.preformattedCode?LI:null}),Z}var H3;function RI(){return H3=H3||new SI,H3}function LI($){return $.nodeName==="PRE"||$.nodeName==="CODE"}function NI($,J){return $.isBlock=O3($),$.isCode=$.nodeName==="CODE"||$.parentNode.isCode,$.isBlank=yI($),$.flankingWhitespace=TI($,J),$}function yI($){return!jU($)&&!CI($)&&/^\s*$/i.test($.textContent)&&!zI($)&&!MI($)}function TI($,J){if($.isBlock||J.preformattedCode&&$.isCode)return{leading:"",trailing:""};var Z=kI($.textContent);if(Z.leadingAscii&&XU("left",$,J))Z.leading=Z.leadingNonAscii;if(Z.trailingAscii&&XU("right",$,J))Z.trailing=Z.trailingNonAscii;return{leading:Z.leading,trailing:Z.trailing}}function kI($){var J=$.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:J[1],leadingAscii:J[2],leadingNonAscii:J[3],trailing:J[4],trailingNonAscii:J[5],trailingAscii:J[6]}}function XU($,J,Z){var Y,K,Q;if($==="left")Y=J.previousSibling,K=/ $/;else Y=J.nextSibling,K=/^ /;if(Y){if(Y.nodeType===3)Q=K.test(Y.nodeValue);else if(Z.preformattedCode&&Y.nodeName==="CODE")Q=!1;else if(Y.nodeType===1&&!O3(Y))Q=K.test(Y.textContent)}return Q}var EI=Array.prototype.reduce,xI=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function O6($){if(!(this instanceof O6))return new O6($);var J={rules:T0,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(Z,Y){return Y.isBlock?`
7497
7497
 
7498
7498
  `:""},keepReplacement:function(Z,Y){return Y.isBlock?`
7499
7499
 
@@ -7522,10 +7522,10 @@ ${C}`}return{title:n1.relative(B$.worktree,X),metadata:{diagnostics:H,filepath:X
7522
7522
  `)}var P3=H$("codesearch",G.gen(function*(){return{description:(yield*e.toolDescriptionEffect("codesearch"))??"",parameters:GG,execute:(J,Z)=>G.gen(function*(){yield*Z.ask({permission:"codesearch",patterns:[J.query],always:["*"],metadata:{query:J.query,tokensNum:J.tokensNum}});let Y=aI(J.tokensNum||5000);return{output:yield*G.promise(()=>e.resolveBraveSearch(J.query,{numResults:Y,timeoutMs:30000}).then(tI).catch(()=>"No code snippets or documentation found. Please try a different query, be more specific about the library or programming concept, or check the spelling of framework names.")),title:`Code search: ${J.query}`,metadata:{}}}).pipe(G.orDie)}}));var eI=F.object({filePath:F.string().describe("Path to the file to analyze"),fileContent:F.string().describe("Full content of the file"),focusAreas:F.array(F.string()).optional().describe('Optional list of focus areas to check, e.g. ["security", "performance", "correctness", "style"]. When omitted the analysis covers all areas.')}),I3=H$("analyze_code",G.gen(function*(){return{description:(yield*e.toolDescriptionEffect("analyze_code"))??"",parameters:eI,execute:(J,Z)=>G.gen(function*(){let Y=yield*G.promise(()=>e.resolveAnalyzeCodeForIssues({filePath:J.filePath,fileContent:J.fileContent,focusAreas:J.focusAreas})),K=Y.issues??[],Q;if(K.length===0)Q=Y.summary??"No issues found.";else{let V=K.map((X,W)=>{let _=X.line!=null?` (line ${X.line})`:"",j=X.severity?`[${X.severity}]`:"",H=X.category?` {${X.category}}`:"",q=X.suggestion?`
7523
7523
  Suggestion: ${X.suggestion}`:"";return`${W+1}. ${j}${H}${_} ${X.description}${q}`});if(Y.summary)V.unshift(Y.summary,"");Q=V.join(`
7524
7524
 
7525
- `)}return{title:`Code analysis: ${J.filePath}`,output:Q,metadata:{issueCount:K.length,issues:K,summary:Y.summary}}}).pipe(G.orDie)}}));var $A=F.object({filePath:F.string().describe("Path to the file"),fileContent:F.string().describe("Full content of the file"),functionName:F.string().optional().describe("When provided, generate documentation only for this specific function or method"),format:F.enum(["markdown","jsdoc","docstring"]).optional().describe("Output format: markdown (default), jsdoc, or docstring")}),A3=H$("generate_docs",G.gen(function*(){return{description:(yield*e.toolDescriptionEffect("generate_docs"))??"",parameters:$A,execute:(J,Z)=>G.gen(function*(){let Y=yield*G.promise(()=>e.resolveGenerateDocumentation({filePath:J.filePath,fileContent:J.fileContent,functionName:J.functionName,format:J.format})),K=Y.documentation??Y.content??"";return{title:`Documentation: ${J.functionName??J.filePath}`,output:K||"No documentation generated.",metadata:{}}}).pipe(G.orDie)}}));var JA=F.object({filePath:F.string().describe("Path to the file"),fileContent:F.string().describe("Full content of the file to annotate with inline comments")}),S3=H$("add_inline_comments",G.gen(function*(){return{description:(yield*e.toolDescriptionEffect("add_inline_comments"))??"",parameters:JA,execute:(J,Z)=>G.gen(function*(){let Y=yield*G.promise(()=>e.resolveGenerateInlineComments({filePath:J.filePath,fileContent:J.fileContent})),K=Y.annotatedCode??Y.code??Y.content??"",Q=K?d1(R1(J.filePath,J.filePath,J.fileContent,K)):void 0;return{title:`Inline comments: ${J.filePath}`,output:K||"No annotated code returned.",metadata:K?{originalContent:J.fileContent,diff:Q}:{}}}).pipe(G.orDie)}}));import w3 from"path";import{pathToFileURL as ZA}from"url";var LU=H$("lsp",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("lsp"))??"",J=yield*b0.Service,Z=yield*$$.Service;return{description:$,parameters:UG,execute:(Y,K)=>G.gen(function*(){let Q=w3.isAbsolute(Y.filePath)?Y.filePath:w3.join(B$.directory,Y.filePath);yield*_1(K,Q),yield*K.ask({permission:"lsp",patterns:["*"],always:["*"],metadata:{}});let V=ZA(Q).href,X={file:Q,line:Y.line-1,character:Y.character-1},W=w3.relative(B$.worktree,Q),_=`${Y.operation} ${W}:${Y.line}:${Y.character}`;if(!(yield*Z.existsSafe(Q)))throw Error(`File not found: ${Q}`);if(!(yield*J.hasClients(Q)))throw Error("No LSP server available for this file type.");yield*J.touchFile(Q,!0);let q=yield*(()=>{switch(Y.operation){case"goToDefinition":return J.definition(X);case"findReferences":return J.references(X);case"hover":return J.hover(X);case"documentSymbol":return J.documentSymbol(V);case"workspaceSymbol":return J.workspaceSymbol("");case"goToImplementation":return J.implementation(X);case"prepareCallHierarchy":return J.prepareCallHierarchy(X);case"incomingCalls":return J.incomingCalls(X);case"outgoingCalls":return J.outgoingCalls(X)}})();return{title:_,metadata:{result:q},output:q.length===0?`No results found for ${Y.operation}`:JSON.stringify(q,null,2)}})}}));import*as o0 from"path";import{rename as HA}from"fs/promises";var F2={};o$(F2,{parsePatch:()=>c8,maybeParseApplyPatchVerified:()=>BA,maybeParseApplyPatch:()=>EU,deriveNewContentsFromFileContents:()=>xU,deriveNewContentsFromChunks:()=>L3,applyPatch:()=>UA,applyHunksToFiles:()=>bU,PatchSchema:()=>YA,Patch:()=>F2,MaybeApplyPatchVerified:()=>kU,MaybeApplyPatch:()=>TU,ApplyPatchError:()=>yU});import*as a1 from"path";import*as l0 from"fs/promises";var q6=O$.create({service:"patch"}),YA=F.object({patchText:F.string().describe("The full patch text that describes all changes to be made")}),yU;((K)=>{K.ParseError="ParseError";K.IoError="IoError";K.ComputeReplacements="ComputeReplacements";K.ImplicitInvocation="ImplicitInvocation"})(yU||={});var TU;((K)=>{K.Body="Body";K.ShellParseError="ShellParseError";K.PatchParseError="PatchParseError";K.NotApplyPatch="NotApplyPatch"})(TU||={});var kU;((K)=>{K.Body="Body";K.ShellParseError="ShellParseError";K.CorrectnessError="CorrectnessError";K.NotApplyPatch="NotApplyPatch"})(kU||={});function KA($,J){let Z=$[J];if(Z.startsWith("*** Add File:")){let Y=Z.slice(13).trim();return Y?{filePath:Y,nextIdx:J+1}:null}if(Z.startsWith("*** Delete File:")){let Y=Z.slice(16).trim();return Y?{filePath:Y,nextIdx:J+1}:null}if(Z.startsWith("*** Update File:")){let Y=Z.slice(16).trim(),K,Q=J+1;if(Q<$.length&&$[Q].startsWith("*** Move to:"))K=$[Q].slice(12).trim(),Q++;return Y?{filePath:Y,movePath:K,nextIdx:Q}:null}return null}function QA($,J){let Z=[],Y=J;while(Y<$.length&&!$[Y].startsWith("***"))if($[Y].startsWith("@@")){let K=$[Y].substring(2).trim();Y++;let Q=[],V=[],X=!1;while(Y<$.length&&!$[Y].startsWith("@@")&&!$[Y].startsWith("***")){let W=$[Y];if(W==="*** End of File"){X=!0,Y++;break}if(W.startsWith(" ")){let _=W.substring(1);Q.push(_),V.push(_)}else if(W.startsWith("-"))Q.push(W.substring(1));else if(W.startsWith("+"))V.push(W.substring(1));Y++}Z.push({old_lines:Q,new_lines:V,change_context:K||void 0,is_end_of_file:X||void 0})}else Y++;return{chunks:Z,nextIdx:Y}}function VA($,J){let Z="",Y=J;while(Y<$.length&&!$[Y].startsWith("***")){if($[Y].startsWith("+"))Z+=$[Y].substring(1)+`
7525
+ `)}return{title:`Code analysis: ${J.filePath}`,output:Q,metadata:{issueCount:K.length,issues:K,summary:Y.summary}}}).pipe(G.orDie)}}));var $A=F.object({filePath:F.string().describe("Path to the file"),fileContent:F.string().describe("Full content of the file"),functionName:F.string().optional().describe("When provided, generate documentation only for this specific function or method"),format:F.enum(["markdown","jsdoc","docstring"]).optional().describe("Output format: markdown (default), jsdoc, or docstring")}),A3=H$("generate_docs",G.gen(function*(){return{description:(yield*e.toolDescriptionEffect("generate_docs"))??"",parameters:$A,execute:(J,Z)=>G.gen(function*(){let Y=yield*G.promise(()=>e.resolveGenerateDocumentation({filePath:J.filePath,fileContent:J.fileContent,functionName:J.functionName,format:J.format})),K=Y.documentation??Y.content??"";return{title:`Documentation: ${J.functionName??J.filePath}`,output:K||"No documentation generated.",metadata:{}}}).pipe(G.orDie)}}));var JA=F.object({filePath:F.string().describe("Path to the file"),fileContent:F.string().describe("Full content of the file to annotate with inline comments")}),S3=H$("add_inline_comments",G.gen(function*(){return{description:(yield*e.toolDescriptionEffect("add_inline_comments"))??"",parameters:JA,execute:(J,Z)=>G.gen(function*(){let Y=yield*G.promise(()=>e.resolveGenerateInlineComments({filePath:J.filePath,fileContent:J.fileContent})),K=Y.annotatedCode??Y.code??Y.content??"",Q=K?d1(R1(J.filePath,J.filePath,J.fileContent,K)):void 0;return{title:`Inline comments: ${J.filePath}`,output:K||"No annotated code returned.",metadata:K?{originalContent:J.fileContent,diff:Q}:{}}}).pipe(G.orDie)}}));import w3 from"path";import{pathToFileURL as ZA}from"url";var LU=H$("lsp",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("lsp"))??"",J=yield*b0.Service,Z=yield*$$.Service;return{description:$,parameters:UG,execute:(Y,K)=>G.gen(function*(){let Q=w3.isAbsolute(Y.filePath)?Y.filePath:w3.join(B$.directory,Y.filePath);yield*_1(K,Q),yield*K.ask({permission:"lsp",patterns:["*"],always:["*"],metadata:{}});let V=ZA(Q).href,X={file:Q,line:Y.line-1,character:Y.character-1},W=w3.relative(B$.worktree,Q),_=`${Y.operation} ${W}:${Y.line}:${Y.character}`;if(!(yield*Z.existsSafe(Q)))throw Error(`File not found: ${Q}`);if(!(yield*J.hasClients(Q)))throw Error("No LSP server available for this file type.");yield*J.touchFile(Q,!0);let q=yield*(()=>{switch(Y.operation){case"goToDefinition":return J.definition(X);case"findReferences":return J.references(X);case"hover":return J.hover(X);case"documentSymbol":return J.documentSymbol(V);case"workspaceSymbol":return J.workspaceSymbol("");case"goToImplementation":return J.implementation(X);case"prepareCallHierarchy":return J.prepareCallHierarchy(X);case"incomingCalls":return J.incomingCalls(X);case"outgoingCalls":return J.outgoingCalls(X)}})();return{title:_,metadata:{result:q},output:q.length===0?`No results found for ${Y.operation}`:JSON.stringify(q,null,2)}})}}));import*as r0 from"path";import{rename as HA}from"fs/promises";var F2={};o$(F2,{parsePatch:()=>c8,maybeParseApplyPatchVerified:()=>BA,maybeParseApplyPatch:()=>EU,deriveNewContentsFromFileContents:()=>xU,deriveNewContentsFromChunks:()=>L3,applyPatch:()=>UA,applyHunksToFiles:()=>bU,PatchSchema:()=>YA,Patch:()=>F2,MaybeApplyPatchVerified:()=>kU,MaybeApplyPatch:()=>TU,ApplyPatchError:()=>yU});import*as a1 from"path";import*as o0 from"fs/promises";var q6=O$.create({service:"patch"}),YA=F.object({patchText:F.string().describe("The full patch text that describes all changes to be made")}),yU;((K)=>{K.ParseError="ParseError";K.IoError="IoError";K.ComputeReplacements="ComputeReplacements";K.ImplicitInvocation="ImplicitInvocation"})(yU||={});var TU;((K)=>{K.Body="Body";K.ShellParseError="ShellParseError";K.PatchParseError="PatchParseError";K.NotApplyPatch="NotApplyPatch"})(TU||={});var kU;((K)=>{K.Body="Body";K.ShellParseError="ShellParseError";K.CorrectnessError="CorrectnessError";K.NotApplyPatch="NotApplyPatch"})(kU||={});function KA($,J){let Z=$[J];if(Z.startsWith("*** Add File:")){let Y=Z.slice(13).trim();return Y?{filePath:Y,nextIdx:J+1}:null}if(Z.startsWith("*** Delete File:")){let Y=Z.slice(16).trim();return Y?{filePath:Y,nextIdx:J+1}:null}if(Z.startsWith("*** Update File:")){let Y=Z.slice(16).trim(),K,Q=J+1;if(Q<$.length&&$[Q].startsWith("*** Move to:"))K=$[Q].slice(12).trim(),Q++;return Y?{filePath:Y,movePath:K,nextIdx:Q}:null}return null}function QA($,J){let Z=[],Y=J;while(Y<$.length&&!$[Y].startsWith("***"))if($[Y].startsWith("@@")){let K=$[Y].substring(2).trim();Y++;let Q=[],V=[],X=!1;while(Y<$.length&&!$[Y].startsWith("@@")&&!$[Y].startsWith("***")){let W=$[Y];if(W==="*** End of File"){X=!0,Y++;break}if(W.startsWith(" ")){let _=W.substring(1);Q.push(_),V.push(_)}else if(W.startsWith("-"))Q.push(W.substring(1));else if(W.startsWith("+"))V.push(W.substring(1));Y++}Z.push({old_lines:Q,new_lines:V,change_context:K||void 0,is_end_of_file:X||void 0})}else Y++;return{chunks:Z,nextIdx:Y}}function VA($,J){let Z="",Y=J;while(Y<$.length&&!$[Y].startsWith("***")){if($[Y].startsWith("+"))Z+=$[Y].substring(1)+`
7526
7526
  `;Y++}if(Z.endsWith(`
7527
7527
  `))Z=Z.slice(0,-1);return{content:Z,nextIdx:Y}}function GA($){let J=$.match(/^(?:cat\s+)?<<['"]?(\w+)['"]?\s*\n([\s\S]*?)\n\1\s*$/);if(J)return J[2];return $}function c8($){let Z=GA($.trim()).split(`
7528
- `),Y=[],K=0,Q="*** Begin Patch",V="*** End Patch",X=Z.findIndex((_)=>_.trim()===Q),W=Z.findIndex((_)=>_.trim()===V);if(X===-1||W===-1||X>=W)throw Error("Invalid patch format: missing Begin/End markers");K=X+1;while(K<W){let _=KA(Z,K);if(!_){K++;continue}if(Z[K].startsWith("*** Add File:")){let{content:j,nextIdx:H}=VA(Z,_.nextIdx);Y.push({type:"add",path:_.filePath,contents:j}),K=H}else if(Z[K].startsWith("*** Delete File:"))Y.push({type:"delete",path:_.filePath}),K=_.nextIdx;else if(Z[K].startsWith("*** Update File:")){let{chunks:j,nextIdx:H}=QA(Z,_.nextIdx);Y.push({type:"update",path:_.filePath,move_path:_.movePath,chunks:j}),K=H}else K++}return{hunks:Y}}function EU($){let J=["apply_patch","applypatch"];if($.length===2&&J.includes($[0]))try{let{hunks:Z}=c8($[1]);return{type:"Body",args:{patch:$[1],hunks:Z}}}catch(Z){return{type:"PatchParseError",error:Z}}if($.length===3&&$[0]==="bash"&&$[1]==="-lc"){let Y=$[2].match(/apply_patch\s*<<['"](\w+)['"]\s*\n([\s\S]*?)\n\1/);if(Y){let K=Y[2];try{let{hunks:Q}=c8(K);return{type:"Body",args:{patch:K,hunks:Q}}}catch(Q){return{type:"PatchParseError",error:Q}}}}return{type:"NotApplyPatch"}}async function L3($,J){let Z;try{Z=await l0.readFile($,"utf-8")}catch(Y){throw Error(`Failed to read file ${$}: ${Y}`,{cause:Y})}return xU(Z,$,J)}function xU($,J,Z){let Y=$.split(`
7528
+ `),Y=[],K=0,Q="*** Begin Patch",V="*** End Patch",X=Z.findIndex((_)=>_.trim()===Q),W=Z.findIndex((_)=>_.trim()===V);if(X===-1||W===-1||X>=W)throw Error("Invalid patch format: missing Begin/End markers");K=X+1;while(K<W){let _=KA(Z,K);if(!_){K++;continue}if(Z[K].startsWith("*** Add File:")){let{content:j,nextIdx:H}=VA(Z,_.nextIdx);Y.push({type:"add",path:_.filePath,contents:j}),K=H}else if(Z[K].startsWith("*** Delete File:"))Y.push({type:"delete",path:_.filePath}),K=_.nextIdx;else if(Z[K].startsWith("*** Update File:")){let{chunks:j,nextIdx:H}=QA(Z,_.nextIdx);Y.push({type:"update",path:_.filePath,move_path:_.movePath,chunks:j}),K=H}else K++}return{hunks:Y}}function EU($){let J=["apply_patch","applypatch"];if($.length===2&&J.includes($[0]))try{let{hunks:Z}=c8($[1]);return{type:"Body",args:{patch:$[1],hunks:Z}}}catch(Z){return{type:"PatchParseError",error:Z}}if($.length===3&&$[0]==="bash"&&$[1]==="-lc"){let Y=$[2].match(/apply_patch\s*<<['"](\w+)['"]\s*\n([\s\S]*?)\n\1/);if(Y){let K=Y[2];try{let{hunks:Q}=c8(K);return{type:"Body",args:{patch:K,hunks:Q}}}catch(Q){return{type:"PatchParseError",error:Q}}}}return{type:"NotApplyPatch"}}async function L3($,J){let Z;try{Z=await o0.readFile($,"utf-8")}catch(Y){throw Error(`Failed to read file ${$}: ${Y}`,{cause:Y})}return xU(Z,$,J)}function xU($,J,Z){let Y=$.split(`
7529
7529
  `);if(Y.length>0&&Y[Y.length-1]==="")Y.pop();let K=XA(Y,J,Z),Q=WA(Y,K);if(Q.length===0||Q[Q.length-1]!=="")Q.push("");let V=Q.join(`
7530
7530
  `);return{unified_diff:jA($,V),content:V}}function XA($,J,Z){let Y=[],K=0;for(let Q of Z){if(Q.change_context){let _=R3($,[Q.change_context],K);if(_===-1)throw Error(`Failed to find context '${Q.change_context}' in ${J}`);K=_+1}if(Q.old_lines.length===0){let _=$.length>0&&$[$.length-1]===""?$.length-1:$.length;Y.push([_,0,Q.new_lines]);continue}let{old_lines:V,new_lines:X}=Q,W=R3($,V,K,Q.is_end_of_file);if(W===-1&&V.length>0&&V[V.length-1]===""){if(V=V.slice(0,-1),X.length>0&&X[X.length-1]==="")X=X.slice(0,-1);W=R3($,V,K,Q.is_end_of_file)}if(W!==-1)Y.push([W,V.length,X]),K=W+V.length;else throw Error(`Failed to find expected lines in ${J}:
7531
7531
  ${Q.old_lines.join(`
@@ -7533,30 +7533,30 @@ ${Q.old_lines.join(`
7533
7533
  `),Y=J.split(`
7534
7534
  `),K=["@@ -1 +1 @@"],Q=Math.max(Z.length,Y.length),V=!1;for(let X=0;X<Q;X++){let W=Z[X]||"",_=Y[X]||"";if(W!==_){if(W)K.push(`-${W}`);if(_)K.push(`+${_}`);V=!0}else if(W)K.push(` ${W}`)}return V?K.join(`
7535
7535
  `)+`
7536
- `:""}async function bU($){if($.length===0)throw Error("No files were modified.");let J=[],Z=[],Y=[];for(let K of $)switch(K.type){case"add":let Q=a1.dirname(K.path);if(Q!=="."&&Q!=="/")await l0.mkdir(Q,{recursive:!0});await l0.writeFile(K.path,K.contents,"utf-8"),J.push(K.path),q6.info(`Added file: ${K.path}`);break;case"delete":await l0.unlink(K.path),Y.push(K.path),q6.info(`Deleted file: ${K.path}`);break;case"update":let V=await L3(K.path,K.chunks);if(K.move_path){let X=a1.dirname(K.move_path);if(X!=="."&&X!=="/")await l0.mkdir(X,{recursive:!0});await l0.writeFile(K.move_path,V.content,"utf-8"),await l0.unlink(K.path),Z.push(K.move_path),q6.info(`Moved file: ${K.path} -> ${K.move_path}`)}else await l0.writeFile(K.path,V.content,"utf-8"),Z.push(K.path),q6.info(`Updated file: ${K.path}`);break}return{added:J,modified:Z,deleted:Y}}async function UA($){let{hunks:J}=c8($);return bU(J)}async function BA($,J){if($.length===1)try{return c8($[0]),{type:"CorrectnessError",error:Error("ImplicitInvocation")}}catch{}let Z=EU($);switch(Z.type){case"Body":let{args:Y}=Z,K=Y.workdir?a1.resolve(J,Y.workdir):J,Q=new Map;for(let V of Y.hunks){let X=a1.resolve(K,V.type==="update"&&V.move_path?V.move_path:V.path);switch(V.type){case"add":Q.set(X,{type:"add",content:V.contents});break;case"delete":let W=a1.resolve(K,V.path);try{let j=await l0.readFile(W,"utf-8");Q.set(X,{type:"delete",content:j})}catch{return{type:"CorrectnessError",error:Error(`Failed to read file for deletion: ${W}`)}}break;case"update":let _=a1.resolve(K,V.path);try{let j=await L3(_,V.chunks);Q.set(X,{type:"update",unified_diff:j.unified_diff,move_path:V.move_path?a1.resolve(K,V.move_path):void 0,new_content:j.content})}catch(j){return{type:"CorrectnessError",error:j}}break}}return{type:"Body",action:{changes:Q,patch:Y.patch,cwd:K}};case"PatchParseError":return{type:"CorrectnessError",error:Z.error};case"NotApplyPatch":return{type:"NotApplyPatch"}}}var N3=H$("apply_patch",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("apply_patch"))??"",J=yield*b0.Service,Z=yield*$$.Service,Y=yield*W1.Service,K=yield*P$.Service,Q=G.fn("ApplyPatchTool.execute")(function*(V,X){if(!V.patchText)return yield*G.fail(Error("patchText is required"));let W;try{W=F2.parsePatch(V.patchText).hunks}catch(P){return yield*G.fail(Error(`apply_patch verification failed: ${P}`))}if(W.length===0){if(V.patchText.replace(/\r\n/g,`
7536
+ `:""}async function bU($){if($.length===0)throw Error("No files were modified.");let J=[],Z=[],Y=[];for(let K of $)switch(K.type){case"add":let Q=a1.dirname(K.path);if(Q!=="."&&Q!=="/")await o0.mkdir(Q,{recursive:!0});await o0.writeFile(K.path,K.contents,"utf-8"),J.push(K.path),q6.info(`Added file: ${K.path}`);break;case"delete":await o0.unlink(K.path),Y.push(K.path),q6.info(`Deleted file: ${K.path}`);break;case"update":let V=await L3(K.path,K.chunks);if(K.move_path){let X=a1.dirname(K.move_path);if(X!=="."&&X!=="/")await o0.mkdir(X,{recursive:!0});await o0.writeFile(K.move_path,V.content,"utf-8"),await o0.unlink(K.path),Z.push(K.move_path),q6.info(`Moved file: ${K.path} -> ${K.move_path}`)}else await o0.writeFile(K.path,V.content,"utf-8"),Z.push(K.path),q6.info(`Updated file: ${K.path}`);break}return{added:J,modified:Z,deleted:Y}}async function UA($){let{hunks:J}=c8($);return bU(J)}async function BA($,J){if($.length===1)try{return c8($[0]),{type:"CorrectnessError",error:Error("ImplicitInvocation")}}catch{}let Z=EU($);switch(Z.type){case"Body":let{args:Y}=Z,K=Y.workdir?a1.resolve(J,Y.workdir):J,Q=new Map;for(let V of Y.hunks){let X=a1.resolve(K,V.type==="update"&&V.move_path?V.move_path:V.path);switch(V.type){case"add":Q.set(X,{type:"add",content:V.contents});break;case"delete":let W=a1.resolve(K,V.path);try{let j=await o0.readFile(W,"utf-8");Q.set(X,{type:"delete",content:j})}catch{return{type:"CorrectnessError",error:Error(`Failed to read file for deletion: ${W}`)}}break;case"update":let _=a1.resolve(K,V.path);try{let j=await L3(_,V.chunks);Q.set(X,{type:"update",unified_diff:j.unified_diff,move_path:V.move_path?a1.resolve(K,V.move_path):void 0,new_content:j.content})}catch(j){return{type:"CorrectnessError",error:j}}break}}return{type:"Body",action:{changes:Q,patch:Y.patch,cwd:K}};case"PatchParseError":return{type:"CorrectnessError",error:Z.error};case"NotApplyPatch":return{type:"NotApplyPatch"}}}var N3=H$("apply_patch",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("apply_patch"))??"",J=yield*b0.Service,Z=yield*$$.Service,Y=yield*W1.Service,K=yield*P$.Service,Q=G.fn("ApplyPatchTool.execute")(function*(V,X){if(!V.patchText)return yield*G.fail(Error("patchText is required"));let W;try{W=F2.parsePatch(V.patchText).hunks}catch(P){return yield*G.fail(Error(`apply_patch verification failed: ${P}`))}if(W.length===0){if(V.patchText.replace(/\r\n/g,`
7537
7537
  `).replace(/\r/g,`
7538
7538
  `).trim()===`*** Begin Patch
7539
- *** End Patch`)return yield*G.fail(Error("patch rejected: empty patch"));return yield*G.fail(Error("apply_patch verification failed: no hunks found"))}let _=[],j="";for(let P of W){let D=o0.resolve(t$.get(X.sessionID),P.path);switch(yield*u2(X,D),P.type){case"add":{let L=_.some((u)=>u.type==="delete"&&u.filePath===D);if(!L&&_.some((u)=>u.type==="add"&&u.filePath===D||u.type==="move"&&u.movePath===D))return yield*G.fail(Error(`apply_patch verification failed: Add File target already staged in this patch: ${D}. Remove the duplicate hunk.`));if(L?void 0:yield*Z.stat(D).pipe(G.catch(()=>G.succeed(void 0))))return yield*G.fail(Error(`apply_patch verification failed: Add File target already exists: ${D}. Use an Update File hunk to modify it, or delete it first if you intend to replace it.`));let x="",b=P.contents.length===0||P.contents.endsWith(`
7539
+ *** End Patch`)return yield*G.fail(Error("patch rejected: empty patch"));return yield*G.fail(Error("apply_patch verification failed: no hunks found"))}let _=[],j="";for(let P of W){let D=r0.resolve(t$.get(X.sessionID),P.path);switch(yield*u2(X,D),P.type){case"add":{let L=_.some((u)=>u.type==="delete"&&u.filePath===D);if(!L&&_.some((u)=>u.type==="add"&&u.filePath===D||u.type==="move"&&u.movePath===D))return yield*G.fail(Error(`apply_patch verification failed: Add File target already staged in this patch: ${D}. Remove the duplicate hunk.`));if(L?void 0:yield*Z.stat(D).pipe(G.catch(()=>G.succeed(void 0))))return yield*G.fail(Error(`apply_patch verification failed: Add File target already exists: ${D}. Use an Update File hunk to modify it, or delete it first if you intend to replace it.`));let x="",b=P.contents.length===0||P.contents.endsWith(`
7540
7540
  `)?P.contents:`${P.contents}
7541
7541
  `,v=d1(R1(D,D,x,b)),m=0,A=0;for(let u of z8(x,b)){if(u.added)m+=u.count||0;if(u.removed)A+=u.count||0}_.push({filePath:D,oldContent:x,newContent:b,type:"add",diff:v,additions:m,deletions:A}),j+=v+`
7542
- `;break}case"update":{let L=yield*Z.stat(D).pipe(G.catch(()=>G.succeed(void 0)));if(!L||L.type==="Directory")return yield*G.fail(Error(`apply_patch verification failed: Failed to read file to update: ${D}`));let R=yield*Z.readFileString(D),N=R;try{N=F2.deriveNewContentsFromFileContents(R,D,P.chunks).content}catch(A){return yield*G.fail(Error(`apply_patch verification failed: ${A}`))}let x=d1(R1(D,D,R,N)),b=0,v=0;for(let A of z8(R,N)){if(A.added)b+=A.count||0;if(A.removed)v+=A.count||0}let m=P.move_path?o0.resolve(t$.get(X.sessionID),P.move_path):void 0;if(yield*u2(X,m),m&&m!==D){let A=_.some((S)=>S.type==="delete"&&S.filePath===m);if(!A&&_.some((S)=>S.type==="add"&&S.filePath===m||S.type==="move"&&S.movePath===m))return yield*G.fail(Error(`apply_patch verification failed: Move destination already staged in this patch: ${m}. Delete it first if you intend to replace it.`));if(A?void 0:yield*Z.stat(m).pipe(G.catch(()=>G.succeed(void 0))))return yield*G.fail(Error(`apply_patch verification failed: Move destination already exists: ${m}. Delete it first if you intend to replace it.`))}_.push({filePath:D,oldContent:R,newContent:N,type:P.move_path?"move":"update",movePath:m,diff:x,additions:b,deletions:v}),j+=x+`
7542
+ `;break}case"update":{let L=yield*Z.stat(D).pipe(G.catch(()=>G.succeed(void 0)));if(!L||L.type==="Directory")return yield*G.fail(Error(`apply_patch verification failed: Failed to read file to update: ${D}`));let R=yield*Z.readFileString(D),N=R;try{N=F2.deriveNewContentsFromFileContents(R,D,P.chunks).content}catch(A){return yield*G.fail(Error(`apply_patch verification failed: ${A}`))}let x=d1(R1(D,D,R,N)),b=0,v=0;for(let A of z8(R,N)){if(A.added)b+=A.count||0;if(A.removed)v+=A.count||0}let m=P.move_path?r0.resolve(t$.get(X.sessionID),P.move_path):void 0;if(yield*u2(X,m),m&&m!==D){let A=_.some((S)=>S.type==="delete"&&S.filePath===m);if(!A&&_.some((S)=>S.type==="add"&&S.filePath===m||S.type==="move"&&S.movePath===m))return yield*G.fail(Error(`apply_patch verification failed: Move destination already staged in this patch: ${m}. Delete it first if you intend to replace it.`));if(A?void 0:yield*Z.stat(m).pipe(G.catch(()=>G.succeed(void 0))))return yield*G.fail(Error(`apply_patch verification failed: Move destination already exists: ${m}. Delete it first if you intend to replace it.`))}_.push({filePath:D,oldContent:R,newContent:N,type:P.move_path?"move":"update",movePath:m,diff:x,additions:b,deletions:v}),j+=x+`
7543
7543
  `;break}case"delete":{let L=yield*Z.readFileString(D).pipe(G.catch((x)=>G.fail(Error(`apply_patch verification failed: ${x instanceof Error?x.message:String(x)}`)))),R=d1(R1(D,D,L,"")),N=L.split(`
7544
7544
  `).length;_.push({filePath:D,oldContent:L,newContent:"",type:"delete",diff:R,additions:0,deletions:N}),j+=R+`
7545
- `;break}}}let H=_.map((P)=>({filePath:P.filePath,relativePath:o0.relative(B$.worktree,P.movePath??P.filePath).replaceAll("\\","/"),type:P.type,patch:P.diff,additions:P.additions,deletions:P.deletions,movePath:P.movePath})),q=H.length===1?H[0].relativePath:`${H.length} files`,U=_.filter((P)=>!$$.contains(o0.join(f$.Path.data,"memory"),P.movePath??P.filePath));if(U.length>0){let P=U.map((D)=>o0.relative(B$.worktree,D.filePath).replaceAll("\\","/"));yield*X.ask({permission:"edit",patterns:P,always:["*"],metadata:{filepath:P.join(", "),diff:U.map((D)=>D.diff).join(`
7545
+ `;break}}}let H=_.map((P)=>({filePath:P.filePath,relativePath:r0.relative(B$.worktree,P.movePath??P.filePath).replaceAll("\\","/"),type:P.type,patch:P.diff,additions:P.additions,deletions:P.deletions,movePath:P.movePath})),q=H.length===1?H[0].relativePath:`${H.length} files`,U=_.filter((P)=>!$$.contains(r0.join(f$.Path.data,"memory"),P.movePath??P.filePath));if(U.length>0){let P=U.map((D)=>r0.relative(B$.worktree,D.filePath).replaceAll("\\","/"));yield*X.ask({permission:"edit",patterns:P,always:["*"],metadata:{filepath:P.join(", "),diff:U.map((D)=>D.diff).join(`
7546
7546
  `)+`
7547
- `,files:H.filter((D)=>!$$.contains(o0.join(f$.Path.data,"memory"),D.movePath??D.filePath))}})}let z=[];for(let P of _){let D=P.type==="delete"?void 0:P.movePath??P.filePath;switch(P.type){case"add":yield*Z.writeWithDirs(P.filePath,P.newContent),z.push({file:P.filePath,event:"add"});break;case"update":yield*Z.writeWithDirs(P.filePath,P.newContent),z.push({file:P.filePath,event:"change"});break;case"move":if(P.movePath){let{filePath:L,movePath:R}=P,N=!1;if(P.newContent===P.oldContent)N=yield*G.promise(async()=>{try{return await HA(L,R),!0}catch{return!1}});if(!N)yield*Z.writeWithDirs(R,P.newContent),yield*Z.remove(L).pipe(G.mapError((x)=>Error(`Move partially completed: '${R}' was written but '${L}' could not be removed: ${x}. Remove '${L}' manually to complete the move.`)));z.push({file:L,event:"unlink"}),z.push({file:R,event:"add"})}break;case"delete":yield*Z.remove(P.filePath),z.push({file:P.filePath,event:"unlink"});break}if(D)yield*Y.file(D),yield*K.publish(w2.Event.Edited,{file:D})}for(let P of z)yield*K.publish(k2.Event.Updated,P);for(let P of _){if(P.type==="delete")continue;let D=P.movePath??P.filePath;yield*J.touchFile(D,!0)}let M=yield*J.diagnostics(),C=`Success. Updated the following files:
7548
- ${_.map((P)=>{if(P.type==="add")return`A ${o0.relative(B$.worktree,P.filePath).replaceAll("\\","/")}`;if(P.type==="delete")return`D ${o0.relative(B$.worktree,P.filePath).replaceAll("\\","/")}`;let D=P.movePath??P.filePath;return`M ${o0.relative(B$.worktree,D).replaceAll("\\","/")}`}).join(`
7549
- `)}`;for(let P of _){if(P.type==="delete")continue;let D=P.movePath??P.filePath,L=b0.Diagnostic.report(D,M[$$.normalizePath(D)]??[]);if(!L)continue;let R=o0.relative(B$.worktree,D).replaceAll("\\","/");C+=`
7547
+ `,files:H.filter((D)=>!$$.contains(r0.join(f$.Path.data,"memory"),D.movePath??D.filePath))}})}let z=[];for(let P of _){let D=P.type==="delete"?void 0:P.movePath??P.filePath;switch(P.type){case"add":yield*Z.writeWithDirs(P.filePath,P.newContent),z.push({file:P.filePath,event:"add"});break;case"update":yield*Z.writeWithDirs(P.filePath,P.newContent),z.push({file:P.filePath,event:"change"});break;case"move":if(P.movePath){let{filePath:L,movePath:R}=P,N=!1;if(P.newContent===P.oldContent)N=yield*G.promise(async()=>{try{return await HA(L,R),!0}catch{return!1}});if(!N)yield*Z.writeWithDirs(R,P.newContent),yield*Z.remove(L).pipe(G.mapError((x)=>Error(`Move partially completed: '${R}' was written but '${L}' could not be removed: ${x}. Remove '${L}' manually to complete the move.`)));z.push({file:L,event:"unlink"}),z.push({file:R,event:"add"})}break;case"delete":yield*Z.remove(P.filePath),z.push({file:P.filePath,event:"unlink"});break}if(D)yield*Y.file(D),yield*K.publish(w2.Event.Edited,{file:D})}for(let P of z)yield*K.publish(k2.Event.Updated,P);for(let P of _){if(P.type==="delete")continue;let D=P.movePath??P.filePath;yield*J.touchFile(D,!0)}let M=yield*J.diagnostics(),C=`Success. Updated the following files:
7548
+ ${_.map((P)=>{if(P.type==="add")return`A ${r0.relative(B$.worktree,P.filePath).replaceAll("\\","/")}`;if(P.type==="delete")return`D ${r0.relative(B$.worktree,P.filePath).replaceAll("\\","/")}`;let D=P.movePath??P.filePath;return`M ${r0.relative(B$.worktree,D).replaceAll("\\","/")}`}).join(`
7549
+ `)}`;for(let P of _){if(P.type==="delete")continue;let D=P.movePath??P.filePath,L=b0.Diagnostic.report(D,M[$$.normalizePath(D)]??[]);if(!L)continue;let R=r0.relative(B$.worktree,D).replaceAll("\\","/");C+=`
7550
7550
 
7551
7551
  LSP errors detected in ${R}, please fix:
7552
7552
  ${L}`}return{title:q,metadata:{diff:j,files:H,diagnostics:M},output:C}});return{description:$,parameters:WG,execute:(V,X)=>Q(V,X).pipe(G.orDie)}}));import z6 from"path";var _A=["Switch the working directory for the current session (like cd in a terminal).","","Use this when the user asks to switch, change, or cd into a directory,","or when you need to work extensively within a subdirectory (e.g., a monorepo package).","","After calling this tool, all subsequent file operations (read, edit, write, glob, grep, bash)","will resolve relative paths from the new directory. Subagents inherit the changed directory.","","Pass an absolute path, or a relative path (resolved from the current working directory).",'Pass "~" to reset back to the project root.'].join(`
7553
- `),vU=H$("change_directory",G.gen(function*(){let $=yield*$$.Service,J=yield*P$.Service;return{description:_A,parameters:jG,execute:(Z,Y)=>G.gen(function*(){let K=yield*i.context,Q=t$.get(Y.sessionID);if(Z.path==="~"||Z.path==="")return t$.clear(Y.sessionID),yield*J.publish(t$.Event.Changed,{sessionID:Y.sessionID,cwd:K.directory}),{title:"reset",metadata:{from:Q,to:K.directory},output:`Working directory reset to project root: ${K.directory}`};let V=z6.isAbsolute(Z.path)?Z.path:z6.resolve(Q,Z.path),X=z6.normalize(V),W=yield*$.stat(X).pipe(G.catch(()=>G.succeed(void 0)));if(!W)throw Error(`Directory does not exist: ${X}`);if(W.type!=="Directory")throw Error(`Path is not a directory: ${X}`);return yield*_1(Y,X,{kind:"directory"}),t$.set(Y.sessionID,X),yield*J.publish(t$.Event.Changed,{sessionID:Y.sessionID,cwd:X}),{title:z6.relative(K.worktree,X)||".",metadata:{from:Q,to:X},output:`Working directory changed: ${Q} \u2192 ${X}`}})}}));import sU from"path";import{pathToFileURL as PA}from"url";var l8={};o$(l8,{layer:()=>fU,defaultLayer:()=>OA,Todo:()=>l8,Service:()=>C6,Info:()=>hU,Event:()=>gU});var hU=F.object({content:F.string().describe("Brief description of the task"),status:F.string().describe("Current status of the task: pending, in_progress, completed, cancelled")}).meta({ref:"Todo"}),gU={Updated:Z0.define("todo.updated",F.object({sessionID:F0.zod,todos:F.array(hU)}))};class C6 extends D$.Service()("@qitqode/SessionTodo"){}var fU=f.effect(C6,G.gen(function*(){let $=yield*P$.Service,J=G.fn("Todo.update")(function*(Y){yield*G.sync(()=>z$.transaction((K)=>{if(K.delete(JJ).where(G$(JJ.session_id,Y.sessionID)).run(),Y.todos.length===0)return;K.insert(JJ).values(Y.todos.map((Q,V)=>({session_id:Y.sessionID,content:Q.content,status:Q.status,position:V}))).run()})),yield*$.publish(gU.Updated,Y)}),Z=G.fn("Todo.get")(function*(Y){return(yield*G.sync(()=>z$.use((Q)=>Q.select().from(JJ).where(G$(JJ.session_id,Y)).orderBy(m1(JJ.position)).all()))).map((Q)=>({content:Q.content,status:Q.status}))});return C6.of({update:J,get:Z})})),OA=fU.pipe(f.provide(P$.layer));var o8={};o$(o8,{layer:()=>uU,defaultLayer:()=>FA,Team:()=>o8,Service:()=>M6});var mU=Z0.define("team.created",F.object({teamID:F.string(),creatorSessionID:F0.zod})),Hg=Z0.define("team.member.joined",F.object({teamID:F.string(),sessionID:F0.zod,agent:F.string(),role:F.string()}));import*as ZJ from"fs/promises";import y3 from"path";var T3=O$.create({service:"team"});class M6 extends D$.Service()("@qitqode/Team"){}var uU=f.effect(M6,G.gen(function*(){let $=yield*P$.Service,J=(j)=>G.gen(function*(){let H=yield*i.context;return y3.join(H.directory,".qitqode","teams",j)}),Z=(j)=>G.map(J(j),(H)=>y3.join(H,"members.json")),Y=(j)=>G.gen(function*(){let H=yield*Z(j);return yield*G.promise(async()=>{try{let q=await ZJ.readFile(H,"utf-8");return JSON.parse(q)}catch{return[]}})}),K=(j,H)=>G.gen(function*(){let q=yield*Z(j);yield*G.promise(()=>ZJ.writeFile(q,JSON.stringify(H,null,2)))}),Q=G.fn("Team.create")(function*(j,H){let q=yield*J(j);yield*G.promise(()=>ZJ.mkdir(q,{recursive:!0})),yield*G.promise(()=>ZJ.writeFile(y3.join(q,"members.json"),"[]")),T3.info("team created",{teamID:j}),yield*$.publish(mU,{teamID:j,creatorSessionID:H})}),V=G.fn("Team.addMember")(function*(j,H,q,U){let z=yield*Y(j);if(!z.find((I)=>I.sessionID===H))z.push({sessionID:H,agent:q,role:U,joinedAt:Date.now()}),yield*K(j,z),T3.info("team member added",{teamID:j,sessionID:H,agent:q,role:U})}),X=G.fn("Team.removeMember")(function*(j,H){let q=yield*Y(j),U=q.filter((z)=>z.sessionID!==H);if(U.length!==q.length)yield*K(j,U),T3.info("team member removed",{teamID:j,sessionID:H})}),W=G.fn("Team.getMembers")(function*(j){return yield*Y(j)}),_=G.fn("Team.teamDir")(function*(j){return yield*J(j)});return M6.of({create:Q,addMember:V,removeMember:X,getMembers:W,teamDir:_})})),FA=uU.pipe(f.provide(P$.defaultLayer));var dU=F.object({script:F.string().min(1).describe(["Multi-line shell-style script. Each non-blank line is one command; commands run sequentially and stop on first failure.",`Quoting: "..." preserves literal newlines and processes \\" \\\\ escapes; '...' is verbatim.`,"<<EOF heredoc bodies are fully verbatim (no escape, no $vars).","# starts a line comment to end-of-line (quoted # is literal).","Variables ($VAR, ${VAR}) are preserved as literal text \u2014 no expansion.","See the tool description for the verb table."].join(" ")).refine(($)=>$.trim().length>0,{message:"script must not be blank"})});function oU($){if(!$.shell)throw Error(`shellWrap called on tool '${$.id}' that has no shell field`);let J=$.shell;return{id:$.id,description:J.description,parameters:dU,execute:(Z,Y)=>G.gen(function*(){let K=_Z(Z),Q=dU.safeParse(K.value);if(!Q.success){let H=J.recover?.(K.value);if(H!==void 0){let z=pU(H),M=yield*G.exit($.execute(H,Y));if(M._tag==="Failure")return{title:`${$.id}: invalid arguments`,output:D6(lU($.id,cU(M.cause))),metadata:{commands:0,success:0}};return{title:`${$.id}: ${z}`,output:M.value.output,metadata:{...M.value.metadata,commands:1,success:1}}}let U="script"in(typeof K.value==="object"&&K.value?K.value:{})?MA($.id):lU($.id);return{title:`${$.id}: missing script`,output:D6(U),metadata:{commands:0,success:0}}}let V=yield*G.exit(J.parse(Q.data.script));if(V._tag==="Failure"){let H=n0.squash(V.cause),q=DA($.id,H);return{title:`${$.id}: parse error`,output:D6(q),metadata:{commands:0,success:0}}}let X=V.value;if(X.length===0)return{title:`${$.id}: empty script`,output:D6(`${$.id}: no commands found in script`),metadata:{commands:0,success:0}};let W=[],_={},j=0;for(let H=0;H<X.length;H++){let q=X[H],U=pU(q),z=yield*G.exit($.execute(q,Y));if(z._tag==="Failure"){if(W.push(CA(H+1,U,cU(z.cause))),H+1<X.length)W.push(`<not-executed>commands #${H+2}..#${X.length}</not-executed>`);return{title:`${$.id}: command #${H+1} failed`,output:W.join(`
7553
+ `),vU=H$("change_directory",G.gen(function*(){let $=yield*$$.Service,J=yield*P$.Service;return{description:_A,parameters:jG,execute:(Z,Y)=>G.gen(function*(){let K=yield*i.context,Q=t$.get(Y.sessionID);if(Z.path==="~"||Z.path==="")return t$.clear(Y.sessionID),yield*J.publish(t$.Event.Changed,{sessionID:Y.sessionID,cwd:K.directory}),{title:"reset",metadata:{from:Q,to:K.directory},output:`Working directory reset to project root: ${K.directory}`};let V=z6.isAbsolute(Z.path)?Z.path:z6.resolve(Q,Z.path),X=z6.normalize(V),W=yield*$.stat(X).pipe(G.catch(()=>G.succeed(void 0)));if(!W)throw Error(`Directory does not exist: ${X}`);if(W.type!=="Directory")throw Error(`Path is not a directory: ${X}`);return yield*_1(Y,X,{kind:"directory"}),t$.set(Y.sessionID,X),yield*J.publish(t$.Event.Changed,{sessionID:Y.sessionID,cwd:X}),{title:z6.relative(K.worktree,X)||".",metadata:{from:Q,to:X},output:`Working directory changed: ${Q} \u2192 ${X}`}})}}));import sU from"path";import{pathToFileURL as PA}from"url";var l8={};o$(l8,{layer:()=>fU,defaultLayer:()=>OA,Todo:()=>l8,Service:()=>C6,Info:()=>hU,Event:()=>gU});var hU=F.object({content:F.string().describe("Brief description of the task"),status:F.string().describe("Current status of the task: pending, in_progress, completed, cancelled")}).meta({ref:"Todo"}),gU={Updated:Z0.define("todo.updated",F.object({sessionID:F0.zod,todos:F.array(hU)}))};class C6 extends D$.Service()("@qitqode/SessionTodo"){}var fU=f.effect(C6,G.gen(function*(){let $=yield*P$.Service,J=G.fn("Todo.update")(function*(Y){yield*G.sync(()=>z$.transaction((K)=>{if(K.delete(JJ).where(G$(JJ.session_id,Y.sessionID)).run(),Y.todos.length===0)return;K.insert(JJ).values(Y.todos.map((Q,V)=>({session_id:Y.sessionID,content:Q.content,status:Q.status,position:V}))).run()})),yield*$.publish(gU.Updated,Y)}),Z=G.fn("Todo.get")(function*(Y){return(yield*G.sync(()=>z$.use((Q)=>Q.select().from(JJ).where(G$(JJ.session_id,Y)).orderBy(m1(JJ.position)).all()))).map((Q)=>({content:Q.content,status:Q.status}))});return C6.of({update:J,get:Z})})),OA=fU.pipe(f.provide(P$.layer));var o8={};o$(o8,{layer:()=>uU,defaultLayer:()=>FA,Team:()=>o8,Service:()=>M6});var mU=Z0.define("team.created",F.object({teamID:F.string(),creatorSessionID:F0.zod})),Hg=Z0.define("team.member.joined",F.object({teamID:F.string(),sessionID:F0.zod,agent:F.string(),role:F.string()}));import*as ZJ from"fs/promises";import y3 from"path";var T3=O$.create({service:"team"});class M6 extends D$.Service()("@qitqode/Team"){}var uU=f.effect(M6,G.gen(function*(){let $=yield*P$.Service,J=(j)=>G.gen(function*(){let H=yield*i.context;return y3.join(H.directory,".qitqode","teams",j)}),Z=(j)=>G.map(J(j),(H)=>y3.join(H,"members.json")),Y=(j)=>G.gen(function*(){let H=yield*Z(j);return yield*G.promise(async()=>{try{let q=await ZJ.readFile(H,"utf-8");return JSON.parse(q)}catch{return[]}})}),K=(j,H)=>G.gen(function*(){let q=yield*Z(j);yield*G.promise(()=>ZJ.writeFile(q,JSON.stringify(H,null,2)))}),Q=G.fn("Team.create")(function*(j,H){let q=yield*J(j);yield*G.promise(()=>ZJ.mkdir(q,{recursive:!0})),yield*G.promise(()=>ZJ.writeFile(y3.join(q,"members.json"),"[]")),T3.info("team created",{teamID:j}),yield*$.publish(mU,{teamID:j,creatorSessionID:H})}),V=G.fn("Team.addMember")(function*(j,H,q,U){let z=yield*Y(j);if(!z.find((I)=>I.sessionID===H))z.push({sessionID:H,agent:q,role:U,joinedAt:Date.now()}),yield*K(j,z),T3.info("team member added",{teamID:j,sessionID:H,agent:q,role:U})}),X=G.fn("Team.removeMember")(function*(j,H){let q=yield*Y(j),U=q.filter((z)=>z.sessionID!==H);if(U.length!==q.length)yield*K(j,U),T3.info("team member removed",{teamID:j,sessionID:H})}),W=G.fn("Team.getMembers")(function*(j){return yield*Y(j)}),_=G.fn("Team.teamDir")(function*(j){return yield*J(j)});return M6.of({create:Q,addMember:V,removeMember:X,getMembers:W,teamDir:_})})),FA=uU.pipe(f.provide(P$.defaultLayer));var dU=F.object({script:F.string().min(1).describe(["Multi-line shell-style script. Each non-blank line is one command; commands run sequentially and stop on first failure.",`Quoting: "..." preserves literal newlines and processes \\" \\\\ escapes; '...' is verbatim.`,"<<EOF heredoc bodies are fully verbatim (no escape, no $vars).","# starts a line comment to end-of-line (quoted # is literal).","Variables ($VAR, ${VAR}) are preserved as literal text \u2014 no expansion.","See the tool description for the verb table."].join(" ")).refine(($)=>$.trim().length>0,{message:"script must not be blank"})});function oU($){if(!$.shell)throw Error(`shellWrap called on tool '${$.id}' that has no shell field`);let J=$.shell;return{id:$.id,description:J.description,parameters:dU,execute:(Z,Y)=>G.gen(function*(){let K=_Z(Z),Q=dU.safeParse(K.value);if(!Q.success){let H=J.recover?.(K.value);if(H!==void 0){let z=pU(H),M=yield*G.exit($.execute(H,Y));if(M._tag==="Failure")return{title:`${$.id}: invalid arguments`,output:D6(lU($.id,cU(M.cause))),metadata:{commands:0,success:0}};return{title:`${$.id}: ${z}`,output:M.value.output,metadata:{...M.value.metadata,commands:1,success:1}}}let U="script"in(typeof K.value==="object"&&K.value?K.value:{})?MA($.id):lU($.id);return{title:`${$.id}: missing script`,output:D6(U),metadata:{commands:0,success:0}}}let V=yield*G.exit(J.parse(Q.data.script));if(V._tag==="Failure"){let H=u0.squash(V.cause),q=DA($.id,H);return{title:`${$.id}: parse error`,output:D6(q),metadata:{commands:0,success:0}}}let X=V.value;if(X.length===0)return{title:`${$.id}: empty script`,output:D6(`${$.id}: no commands found in script`),metadata:{commands:0,success:0}};let W=[],_={},j=0;for(let H=0;H<X.length;H++){let q=X[H],U=pU(q),z=yield*G.exit($.execute(q,Y));if(z._tag==="Failure"){if(W.push(CA(H+1,U,cU(z.cause))),H+1<X.length)W.push(`<not-executed>commands #${H+2}..#${X.length}</not-executed>`);return{title:`${$.id}: command #${H+1} failed`,output:W.join(`
7554
7554
  `),metadata:{commands:X.length,success:j}}}j++,_=z.value.metadata,W.push(zA(H+1,U,z.value.output))}return{title:`${$.id}: ${X.length} command(s)`,output:W.join(`
7555
7555
  `),metadata:{..._,commands:X.length,success:j}}})}}function zA($,J,Z){return`<command index="${$}" operation="${rU(J)}">
7556
7556
  ${Z}
7557
7557
  </command>`}function CA($,J,Z){return`<command index="${$}" operation="${rU(J)}" failed="true">
7558
7558
  ${Z}
7559
- </command>`}function pU($){let J=$?.operation;if(typeof J==="string")return J;if(J&&typeof J==="object"&&typeof J.action==="string")return J.action;return"?"}function rU($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function cU($){let J=n0.squash($);if(J instanceof Error)return J.message;return String(J)}function D6($){return`<command failed="true">
7559
+ </command>`}function pU($){let J=$?.operation;if(typeof J==="string")return J;if(J&&typeof J==="object"&&typeof J.action==="string")return J.action;return"?"}function rU($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function cU($){let J=u0.squash($);if(J instanceof Error)return J.message;return String(J)}function D6($){return`<command failed="true">
7560
7560
  ${$}
7561
7561
  </command>`}function MA($){return[`${$}: this tool takes a single \`script\` string (shell-style), not JSON fields.`,`Put the command in \`script\`, e.g.: ${$} <verb> ...`,"See the tool description for the verb list and examples."].join(`
7562
7562
  `)}function lU($,J){return[`${$}: could not run the call.`,'Pass the operation as JSON, e.g.: {"operation":{"action":"<verb>", ...}}',...J?[`detail: ${J}`]:[]].join(`
@@ -7566,11 +7566,11 @@ ${$}
7566
7566
  ${String(J)}`}function iU($,J){return $?.invocation_style_by_tool?.[J]??$?.invocation_style??"json"}var tU=O$.create({service:"tool.registry"});async function eU(){let $=await B2.list();if($.length===0)return"";return["","## Built-in workflows",'These named workflows are available via operation "run" with `name`. When a request matches one, invoke it instead of writing a script from scratch:',"",...$.map((Z)=>{let Y=Z.phases?.length?`
7567
7567
  Phases: `+Z.phases.map((Q)=>Q.title).join(" \u2192 "):"",K=Z.whenToUse?`
7568
7568
  When to use: ${Z.whenToUse}`:"";return`- ${Z.name}: ${Z.description}${K}${Y}`}),"",'Invoke a built-in: workflow({ operation: "run", name: "deep-research", args: "<the refined request>" })'].join(`
7569
- `)}var nU=new Set;function IA($){if(nU.has($))return;nU.add($),tU.warn(`tool '${$}' configured with invocation_style='shell' but has no shell field; falling back to JSON`)}class P6 extends D$.Service()("@qitqode/ToolRegistry"){}var $B=f.effect(P6,G.gen(function*(){let $=yield*R$.Service,J=yield*z2.Service,Z=yield*p0.Service,Y=yield*a0.Service,K=yield*Z1,Q=yield*AU,V=yield*o7,X=yield*iG,W=yield*AG,_=yield*LU,j=yield*PG,H=yield*DG,q=yield*IU,U=yield*D3,z=yield*aU,M=yield*P3,I=yield*I3,C=yield*A3,P=yield*S3,D=yield*hG,L=yield*C3,R=yield*T7,N=yield*fG,x=yield*N3,b=yield*vU,v=yield*M3,m=yield*mG,A=yield*uG,u=yield*nX,r=yield*s7,S=yield*p0.Service,T=yield*i.make(G.fn("ToolRegistry.state")(function*(y){let n=[];function a(t,C$){return{id:t,parameters:F.object(C$.args),description:C$.description,execute:(T$,M$)=>G.gen(function*(){let r$={...M$,ask:(M1)=>M$.ask(M1),directory:y.directory,worktree:y.worktree},K0=yield*G.promise(()=>C$.execute(T$,r$)),t1=typeof K0==="string"?K0:K0.output,a8=typeof K0==="string"?{}:K0.metadata??{},e1=yield*S.get(M$.agent),C1=yield*K.output(t1,{},e1);return{title:"",output:C1.truncated?C1.content:t1,metadata:{...a8,truncated:C1.truncated,...C1.truncated&&{outputPath:C1.outputPath}}}})}}let l=(yield*$.directories()).flatMap((t)=>y2.scanSync("{tool,tools}/*.{js,ts}",{cwd:t,absolute:!0,dot:!0,symlink:!0}));if(l.length)yield*$.waitForDependencies();for(let t of l){let C$=sU.basename(t,sU.extname(t)),T$=yield*G.promise(()=>import(`${PA(t).href}?v=${Date.now()}`));for(let[M$,r$]of Object.entries(T$))n.push(a(M$==="default"?C$:`${C$}_${M$}`,r$))}let d=yield*J.list();for(let t of d)for(let[C$,T$]of Object.entries(t.tool??{}))n.push(a(C$,T$));yield*$.get();let Y$=["app","cli","desktop"].includes(k$.QITQODE_CLIENT)||k$.QITQODE_ENABLE_QUESTION_TOOL,g=yield*G.all({invalid:n$(Q),bash:n$(z),read:n$(X),glob:n$(D),grep:n$(N),edit:n$(R),write:n$(L),actor:n$(V),fetch:n$(q),search:n$(U),code:n$(M),analyzecode:n$(I),generatedocs:n$(C),addinlinecomments:n$(P),skill:n$(v),patch:n$(x),changedir:n$(b),question:n$(W),lsp:n$(_),planexit:n$(j),planenter:n$(H),memory:n$(A),history:n$(m),task:n$(u),workflow:n$(r)});return{custom:n,builtin:[g.invalid,...Y$?[g.question]:[],g.bash,g.read,g.glob,g.grep,g.edit,g.write,g.actor,g.fetch,g.search,g.code,g.analyzecode,g.generatedocs,g.addinlinecomments,g.skill,g.patch,g.changedir,...k$.QITQODE_EXPERIMENTAL_LSP_TOOL?[g.lsp]:[],g.planexit,g.planenter,g.memory,g.history,g.task,...k$.QITQODE_EXPERIMENTAL_WORKFLOW_TOOL?[g.workflow]:[]],actor:g.actor,read:g.read}})),k=G.fn("ToolRegistry.all")(function*(){let y=yield*i.get(T),n=new Set(y.custom.map((c$)=>c$.id));return[...y.builtin.filter((c$)=>!n.has(c$.id)),...y.custom]}),A$=G.fn("ToolRegistry.ids")(function*(){return(yield*k()).map((y)=>y.id)}),s=G.fn("ToolRegistry.describeSkill")(function*(y){let n=yield*Y.available(y);if(n.length===0)return"No skills are currently available.";return["Load a specialized skill that provides domain-specific instructions and workflows.","","When you recognize that a task matches one of the available skills listed below, use this tool to load the full skill instructions.","","The skill will inject detailed instructions, workflows, and access to bundled resources (scripts, references, templates) into the conversation context.","",'Tool output includes a `<skill_content name="...">` block with the loaded content.',"","The following skills provide specialized sets of instructions for particular tasks","Invoke this tool to load a skill when a task matches one of the available skills listed below:","",a0.fmt(n,{verbose:!1})].join(`
7569
+ `)}var nU=new Set;function IA($){if(nU.has($))return;nU.add($),tU.warn(`tool '${$}' configured with invocation_style='shell' but has no shell field; falling back to JSON`)}class P6 extends D$.Service()("@qitqode/ToolRegistry"){}var $B=f.effect(P6,G.gen(function*(){let $=yield*R$.Service,J=yield*z2.Service,Z=yield*c0.Service,Y=yield*a0.Service,K=yield*Z1,Q=yield*AU,V=yield*o7,X=yield*iG,W=yield*AG,_=yield*LU,j=yield*PG,H=yield*DG,q=yield*IU,U=yield*D3,z=yield*aU,M=yield*P3,I=yield*I3,C=yield*A3,P=yield*S3,D=yield*hG,L=yield*C3,R=yield*T7,N=yield*fG,x=yield*N3,b=yield*vU,v=yield*M3,m=yield*mG,A=yield*uG,u=yield*nX,r=yield*s7,S=yield*c0.Service,T=yield*i.make(G.fn("ToolRegistry.state")(function*(y){let n=[];function a(t,C$){return{id:t,parameters:F.object(C$.args),description:C$.description,execute:(T$,M$)=>G.gen(function*(){let r$={...M$,ask:(M1)=>M$.ask(M1),directory:y.directory,worktree:y.worktree},K0=yield*G.promise(()=>C$.execute(T$,r$)),t1=typeof K0==="string"?K0:K0.output,a8=typeof K0==="string"?{}:K0.metadata??{},e1=yield*S.get(M$.agent),C1=yield*K.output(t1,{},e1);return{title:"",output:C1.truncated?C1.content:t1,metadata:{...a8,truncated:C1.truncated,...C1.truncated&&{outputPath:C1.outputPath}}}})}}let l=(yield*$.directories()).flatMap((t)=>y2.scanSync("{tool,tools}/*.{js,ts}",{cwd:t,absolute:!0,dot:!0,symlink:!0}));if(l.length)yield*$.waitForDependencies();for(let t of l){let C$=sU.basename(t,sU.extname(t)),T$=yield*G.promise(()=>import(`${PA(t).href}?v=${Date.now()}`));for(let[M$,r$]of Object.entries(T$))n.push(a(M$==="default"?C$:`${C$}_${M$}`,r$))}let d=yield*J.list();for(let t of d)for(let[C$,T$]of Object.entries(t.tool??{}))n.push(a(C$,T$));yield*$.get();let Y$=["app","cli","desktop"].includes(k$.QITQODE_CLIENT)||k$.QITQODE_ENABLE_QUESTION_TOOL,g=yield*G.all({invalid:n$(Q),bash:n$(z),read:n$(X),glob:n$(D),grep:n$(N),edit:n$(R),write:n$(L),actor:n$(V),fetch:n$(q),search:n$(U),code:n$(M),analyzecode:n$(I),generatedocs:n$(C),addinlinecomments:n$(P),skill:n$(v),patch:n$(x),changedir:n$(b),question:n$(W),lsp:n$(_),planexit:n$(j),planenter:n$(H),memory:n$(A),history:n$(m),task:n$(u),workflow:n$(r)});return{custom:n,builtin:[g.invalid,...Y$?[g.question]:[],g.bash,g.read,g.glob,g.grep,g.edit,g.write,g.actor,g.fetch,g.search,g.code,g.analyzecode,g.generatedocs,g.addinlinecomments,g.skill,g.patch,g.changedir,...k$.QITQODE_EXPERIMENTAL_LSP_TOOL?[g.lsp]:[],g.planexit,g.planenter,g.memory,g.history,g.task,...k$.QITQODE_EXPERIMENTAL_WORKFLOW_TOOL?[g.workflow]:[]],actor:g.actor,read:g.read}})),k=G.fn("ToolRegistry.all")(function*(){let y=yield*i.get(T),n=new Set(y.custom.map((c$)=>c$.id));return[...y.builtin.filter((c$)=>!n.has(c$.id)),...y.custom]}),A$=G.fn("ToolRegistry.ids")(function*(){return(yield*k()).map((y)=>y.id)}),s=G.fn("ToolRegistry.describeSkill")(function*(y){let n=yield*Y.available(y);if(n.length===0)return"No skills are currently available.";return["Load a specialized skill that provides domain-specific instructions and workflows.","","When you recognize that a task matches one of the available skills listed below, use this tool to load the full skill instructions.","","The skill will inject detailed instructions, workflows, and access to bundled resources (scripts, references, templates) into the conversation context.","",'Tool output includes a `<skill_content name="...">` block with the loaded content.',"","The following skills provide specialized sets of instructions for particular tasks","Invoke this tool to load a skill when a task matches one of the available skills listed below:","",a0.fmt(n,{verbose:!1})].join(`
7570
7570
  `)}),J$=G.fn("ToolRegistry.describeWorkflow")(function*(){return yield*G.promise(()=>eU())}),Z$=G.fn("ToolRegistry.describeTask")(function*(y){return["Available agent types and the tools they have access to:",(yield*Z.list()).filter((d)=>d.mode!=="primary"&&!d.hidden).filter((d)=>E$.evaluate("task",d.name,y.permission).action!=="deny").toSorted((d,Y$)=>d.name.localeCompare(Y$.name)).map((d)=>`- ${d.name}: ${d.description??"This subagent should only be called manually by the user."}`).join(`
7571
7571
  `)].join(`
7572
7572
  `)}),W$=G.fn("ToolRegistry.tools")(function*(y){let n=(yield*k()).filter((l)=>{if(l.id===P3.id||l.id===D3.id)return y.providerID==="qlex"||y.providerID===I6.opencode||k$.QITQODE_ENABLE_EXA;if(l.id===I3.id||l.id===A3.id||l.id===S3.id)return y.providerID==="qlex";let d=y.modelID.includes("gpt-")&&!y.modelID.includes("oss")&&!y.modelID.includes("gpt-4");if(l.id===N3.id)return d;if(l.id===T7.id||l.id===C3.id)return!d;return!0});if(y.agent.toolAllowlist){let l=new Set(y.agent.toolAllowlist);n=n.filter((d)=>d.id==="invalid"||l.has(d.id))}let a=yield*$.get(),c$=(l)=>iU(a.tool,l);return yield*G.forEach(n,G.fnUntraced(function*(l){let M$=[];try{const d=w9(M$,tU.time(l.id),0);let Y$={description:l.description,parameters:l.parameters};yield*J.trigger("tool.definition",{toolID:l.id},Y$);let g=c$(l.id);let t=g==="shell"&&l.shell!==void 0;if(g==="shell"&&!l.shell)IA(l.id);let C$=t?oU(l):l;let T$=t?l.shell.description:Y$.description;return{id:l.id,description:[T$,l.id===o7.id?yield*Z$(y.agent):void 0,l.id===M3.id?yield*s(y.agent):void 0,l.id===s7.id?yield*J$():void 0].filter(Boolean).join(`
7573
- `),parameters:t?C$.parameters:Y$.parameters,execute:C$.execute,formatValidationError:C$.formatValidationError}}catch(r$){var K0=r$,t1=1}finally{R9(M$,K0,t1)}}),{concurrency:25})}),y$=G.fn("ToolRegistry.named")(function*(){let y=yield*i.get(T);return{actor:y.actor,read:y.read}}),Q$=G.fn("ToolRegistry.reload")(function*(){yield*Y.reload(),yield*J.reloadFileHooks(),yield*i.invalidate(T)});return P6.of({ids:A$,all:k,named:y$,tools:W$,reload:Q$})})),AA=f.suspend(()=>$B.pipe(f.provide(R$.defaultLayer),f.provide(z2.defaultLayer),f.provide(B1.defaultLayer),f.provide(l8.defaultLayer),f.provide(a0.defaultLayer),f.provide(p0.defaultLayer),f.provide(Y1.defaultLayer),f.provide(H1.defaultLayer),f.provide(b0.defaultLayer),f.provide(d2.defaultLayer),f.provide($$.defaultLayer),f.provide(P$.layer),f.provide(X2.layer),f.provide(W1.defaultLayer),f.provide(XJ),f.provide(h0.defaultLayer),f.provide(I7),f.provide(f.mergeAll(L1.defaultLayer,c2.defaultLayer)),f.provide(o8.defaultLayer),f.provide(f.mergeAll(g1.defaultLayer,MJ.defaultLayer,o2.defaultLayer,K1.defaultLayer,r8.defaultLayer))));import C2 from"path";function YJ($){return $.pipe(G.catchDefect((J)=>J instanceof e.BackendAuthRejectedError?G.succeed(void 0):G.die(J)))}var SA=F.object({name:F.string(),description:F.string().optional(),mode:F.enum(["subagent","primary","all"]),native:F.boolean().optional(),hidden:F.boolean().optional(),topP:F.number().optional(),temperature:F.number().optional(),color:F.union([F.string(),F.object({light:F.string(),dark:F.string()})]).optional(),permission:E$.Ruleset.zod,model:F.object({modelID:GB.zod,providerID:I6.zod}).optional(),modelRef:F.string().optional(),variant:F.string().optional(),prompt:F.string().optional(),options:F.record(F.string(),F.any()),steps:F.number().int().positive().optional(),toolAllowlist:F.array(F.string()).optional(),posture:jB.optional()}).meta({ref:"Agent"});class A6 extends D$.Service()("@qitqode/Agent"){}var BB=f.effect(A6,G.gen(function*(){let $=yield*R$.Service,J=yield*r8.Service,Z=yield*z2.Service,Y=yield*a0.Service,K=yield*H1.Service,Q=yield*i.make(G.fn("Agent.state")(function*(V){let X=yield*G.all([YJ(G.promise(()=>e.resolveAgentPrompt("explore"))),YJ(G.promise(()=>e.resolveAgentPrompt("title"))),YJ(G.promise(()=>e.resolveAgentPrompt("summary"))),YJ(G.promise(()=>e.resolveAgentPrompt("compaction"))),YJ(G.promise(()=>e.resolveAgentPrompt("dream"))),YJ(G.promise(()=>e.resolveAgentPrompt("distill")))],{concurrency:"unbounded"}),W=X[0]??"",_=X[1]??"",j=X[2]??"",H=X[3]??"",q=X[4]??"",U=X[5]??"",z=yield*$.get(),M=yield*Y.dirs(),I=[j1.GLOB,...M.map((v)=>C2.join(v,"*"))],C=E$.fromConfig({"*":"allow",doom_loop:"ask",external_directory:{"*":"ask",...Object.fromEntries(I.map((v)=>[v,"allow"]))},question:"deny",read:{"*":"allow","*.env":"ask","*.env.*":"ask","*.env.example":"allow"}}),P=E$.fromConfig(z.permission??{}),D=E$.merge(C,E$.fromConfig({"*":"deny",read:"allow",write:"allow",edit:"allow",glob:"allow",grep:"allow",memory:"allow",bash:"allow",external_directory:{[C2.join(f$.Path.data,"memory")]:"allow",[C2.join(f$.Path.data,"memory","*")]:"allow"}}),P),L=["read","write","edit","glob","grep","memory","bash"],R={build:{name:"build",color:{dark:"#ff6a00",light:"#b84a00"},description:"Executes tools based on configured permissions.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow"}),P),mode:"primary",native:!0},...z.experimental?.maxMode?{max:{name:"max",color:{dark:"#ff8a00",light:"#c2410c"},description:"Max mode (experimental). Runs N parallel reasoning candidates each step and executes the best one. Same permissions as build.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow"}),P),mode:"primary",native:!0}}:{},plan:{name:"plan",color:{dark:"#1cc7bb",light:"#0f766e"},description:"Plan mode. Disallows all edit tools.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow",external_directory:{[C2.join(f$.Path.data,"plans","*")]:"allow"},edit:{"*":"deny",[C2.join(".qitqode","plans","*.md")]:"allow",[C2.relative(B$.worktree,C2.join(f$.Path.data,C2.join("plans","*.md")))]:"allow"}}),P),mode:"primary",native:!0},compose:{name:"compose",color:{dark:"#a84462",light:"#6d213c"},description:"Compose mode. Orchestrates workflows with built-in compose skills.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow"}),P),mode:"primary",native:!0},general:{name:"general",color:{dark:"#8a8f98",light:"#6f747d"},description:"General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.",permission:E$.merge(C,E$.fromConfig({change_directory:"deny"}),P),options:{},mode:"subagent",native:!0},explore:{name:"explore",color:{dark:"#ffb000",light:"#b45309"},permission:E$.merge(C,E$.fromConfig({"*":"deny",grep:"allow",glob:"allow",list:"allow",bash:"allow",webfetch:"allow",websearch:"allow",codesearch:"allow",read:"allow",external_directory:{"*":"ask",...Object.fromEntries(I.map((v)=>[v,"allow"]))}}),P),description:'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.',prompt:W,options:{},mode:"subagent",native:!0},title:{name:"title",mode:"subagent",options:{},native:!0,hidden:!0,temperature:0.5,permission:E$.merge(C,E$.fromConfig({"*":"deny"}),P),prompt:_,toolAllowlist:[]},summary:{name:"summary",mode:"subagent",options:{},native:!0,hidden:!0,permission:E$.merge(C,E$.fromConfig({"*":"deny"}),P),prompt:j,toolAllowlist:[]},compaction:{name:"compaction",mode:"subagent",options:{},native:!0,hidden:!0,permission:E$.merge(C,E$.fromConfig({"*":"deny"}),P),prompt:H,toolAllowlist:[]},"checkpoint-writer":{name:"checkpoint-writer",mode:"subagent",options:{},native:!0,hidden:!0,permission:E$.merge(C,P)},dream:{name:"dream",mode:"subagent",options:{},native:!0,hidden:!0,prompt:q,permission:D,toolAllowlist:L},distill:{name:"distill",mode:"subagent",options:{},native:!0,hidden:!0,prompt:U,permission:D,toolAllowlist:L}};for(let[v,m]of Object.entries(z.agent??{})){if(m.disable){delete R[v];continue}let A=R[v];if(!A)A=R[v]={name:v,mode:"all",permission:E$.merge(C,P),options:{},native:!1};if(m.model)if(m.model.includes("/"))A.model=H1.parseModel(m.model);else A.modelRef=m.model;A.variant=m.variant??A.variant,A.prompt=m.prompt??A.prompt,A.description=m.description??A.description,A.temperature=m.temperature??A.temperature,A.topP=m.top_p??A.topP,A.mode=m.mode??A.mode,A.color=m.color??A.color,A.hidden=m.hidden??A.hidden,A.name=m.name??A.name,A.steps=m.steps??A.steps,A.toolAllowlist=m.tool_allowlist??A.toolAllowlist,A.options=F9(A.options,m.options??{}),A.permission=E$.merge(A.permission,E$.fromConfig(m.permission??{}))}for(let v of Object.values(R))v.posture=UB(v);for(let v in R){if(R[v].permission.some((u)=>{if(u.permission!=="external_directory")return!1;if(u.action!=="deny")return!1;return u.pattern===j1.GLOB}))continue;R[v].permission=E$.merge(R[v].permission,E$.fromConfig({external_directory:{[j1.GLOB]:"allow"}}))}let N=G.fnUntraced(function*(v){return R[v]}),x=G.fnUntraced(function*(){let v=yield*$.get();return YB(R,KB(),QB([(m)=>v.default_agent!==void 0&&m.name===v.default_agent,"desc"],[(m)=>m.name==="plan","desc"],[(m)=>m.name==="build","desc"],[(m)=>m.name==="compose","desc"],[(m)=>m.name==="max","desc"],[(m)=>m.name,"asc"]))}),b=G.fnUntraced(function*(){let v=yield*$.get();if(v.default_agent){let u=R[v.default_agent];if(!u)throw Error(`default agent "${v.default_agent}" not found`);if(u.mode==="subagent")throw Error(`default agent "${v.default_agent}" is a subagent`);if(u.hidden===!0)throw Error(`default agent "${v.default_agent}" is hidden`);return u.name}let m=R.plan;if(m&&m.mode!=="subagent"&&m.hidden!==!0)return m.name;let A=Object.values(R).find((u)=>u.mode!=="subagent"&&u.hidden!==!0);if(!A)throw Error("no primary visible agent found");return A.name});return{get:N,list:x,defaultAgent:b}}));return A6.of({get:G.fn("Agent.get")(function*(V){return yield*i.useEffect(Q,(X)=>X.get(V))}),list:G.fn("Agent.list")(function*(){return yield*i.useEffect(Q,(V)=>V.list())}),defaultAgent:G.fn("Agent.defaultAgent")(function*(){return yield*i.useEffect(Q,(V)=>V.defaultAgent())}),generate:G.fn("Agent.generate")(function*(V){let X=yield*$.get(),W=V.model??(yield*K.defaultModel()),_=yield*K.getModel(W.providerID,W.modelID),j=yield*K.getLanguage(_),H=X.experimental?.openTelemetry?ZB(yield*G.serviceOption(VB)):void 0,q=[(yield*YJ(G.promise(()=>e.resolveAgentPrompt("generate"))))??""];yield*Z.trigger("experimental.chat.system.transform",{model:_},{system:q});let U=yield*i.useEffect(Q,(C)=>C.list()),z=yield*J.get(W.providerID).pipe(G.orDie),M=W.providerID==="openai"&&z?.type==="oauth",I={experimental_telemetry:{isEnabled:X.experimental?.openTelemetry,tracer:H,metadata:{userId:X.username??"unknown"}},temperature:0.3,messages:[...M?[]:q.map((C)=>({role:"system",content:C})),{role:"user",content:`Create an agent configuration based on this request:
7573
+ `),parameters:t?C$.parameters:Y$.parameters,execute:C$.execute,formatValidationError:C$.formatValidationError}}catch(r$){var K0=r$,t1=1}finally{R9(M$,K0,t1)}}),{concurrency:25})}),y$=G.fn("ToolRegistry.named")(function*(){let y=yield*i.get(T);return{actor:y.actor,read:y.read}}),Q$=G.fn("ToolRegistry.reload")(function*(){yield*Y.reload(),yield*J.reloadFileHooks(),yield*i.invalidate(T)});return P6.of({ids:A$,all:k,named:y$,tools:W$,reload:Q$})})),AA=f.suspend(()=>$B.pipe(f.provide(R$.defaultLayer),f.provide(z2.defaultLayer),f.provide(B1.defaultLayer),f.provide(l8.defaultLayer),f.provide(a0.defaultLayer),f.provide(c0.defaultLayer),f.provide(Y1.defaultLayer),f.provide(H1.defaultLayer),f.provide(b0.defaultLayer),f.provide(d2.defaultLayer),f.provide($$.defaultLayer),f.provide(P$.layer),f.provide(X2.layer),f.provide(W1.defaultLayer),f.provide(XJ),f.provide(h0.defaultLayer),f.provide(I7),f.provide(f.mergeAll(L1.defaultLayer,c2.defaultLayer)),f.provide(o8.defaultLayer),f.provide(f.mergeAll(g1.defaultLayer,MJ.defaultLayer,o2.defaultLayer,K1.defaultLayer,r8.defaultLayer))));import C2 from"path";function YJ($){return $.pipe(G.catchDefect((J)=>J instanceof e.BackendAuthRejectedError?G.succeed(void 0):G.die(J)))}var SA=F.object({name:F.string(),description:F.string().optional(),mode:F.enum(["subagent","primary","all"]),native:F.boolean().optional(),hidden:F.boolean().optional(),topP:F.number().optional(),temperature:F.number().optional(),color:F.union([F.string(),F.object({light:F.string(),dark:F.string()})]).optional(),permission:E$.Ruleset.zod,model:F.object({modelID:GB.zod,providerID:I6.zod}).optional(),modelRef:F.string().optional(),variant:F.string().optional(),prompt:F.string().optional(),options:F.record(F.string(),F.any()),steps:F.number().int().positive().optional(),toolAllowlist:F.array(F.string()).optional(),posture:jB.optional()}).meta({ref:"Agent"});class A6 extends D$.Service()("@qitqode/Agent"){}var BB=f.effect(A6,G.gen(function*(){let $=yield*R$.Service,J=yield*r8.Service,Z=yield*z2.Service,Y=yield*a0.Service,K=yield*H1.Service,Q=yield*i.make(G.fn("Agent.state")(function*(V){let X=yield*G.all([YJ(G.promise(()=>e.resolveAgentPrompt("explore"))),YJ(G.promise(()=>e.resolveAgentPrompt("title"))),YJ(G.promise(()=>e.resolveAgentPrompt("summary"))),YJ(G.promise(()=>e.resolveAgentPrompt("compaction"))),YJ(G.promise(()=>e.resolveAgentPrompt("dream"))),YJ(G.promise(()=>e.resolveAgentPrompt("distill")))],{concurrency:"unbounded"}),W=X[0]??"",_=X[1]??"",j=X[2]??"",H=X[3]??"",q=X[4]??"",U=X[5]??"",z=yield*$.get(),M=yield*Y.dirs(),I=[j1.GLOB,...M.map((v)=>C2.join(v,"*"))],C=E$.fromConfig({"*":"allow",doom_loop:"ask",external_directory:{"*":"ask",...Object.fromEntries(I.map((v)=>[v,"allow"]))},question:"deny",read:{"*":"allow","*.env":"ask","*.env.*":"ask","*.env.example":"allow"}}),P=E$.fromConfig(z.permission??{}),D=E$.merge(C,E$.fromConfig({"*":"deny",read:"allow",write:"allow",edit:"allow",glob:"allow",grep:"allow",memory:"allow",bash:"allow",external_directory:{[C2.join(f$.Path.data,"memory")]:"allow",[C2.join(f$.Path.data,"memory","*")]:"allow"}}),P),L=["read","write","edit","glob","grep","memory","bash"],R={build:{name:"build",color:{dark:"#ff6a00",light:"#b84a00"},description:"Executes tools based on configured permissions.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow"}),P),mode:"primary",native:!0},...z.experimental?.maxMode?{max:{name:"max",color:{dark:"#ff8a00",light:"#c2410c"},description:"Max mode (experimental). Runs N parallel reasoning candidates each step and executes the best one. Same permissions as build.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow"}),P),mode:"primary",native:!0}}:{},plan:{name:"plan",color:{dark:"#1cc7bb",light:"#0f766e"},description:"Plan mode. Disallows all edit tools.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow",external_directory:{[C2.join(f$.Path.data,"plans","*")]:"allow"},edit:{"*":"deny",[C2.join(".qitqode","plans","*.md")]:"allow",[C2.relative(B$.worktree,C2.join(f$.Path.data,C2.join("plans","*.md")))]:"allow"}}),P),mode:"primary",native:!0},compose:{name:"compose",color:{dark:"#a84462",light:"#6d213c"},description:"Compose mode. Orchestrates workflows with built-in compose skills.",options:{},permission:E$.merge(C,E$.fromConfig({question:"allow"}),P),mode:"primary",native:!0},general:{name:"general",color:{dark:"#8a8f98",light:"#6f747d"},description:"General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.",permission:E$.merge(C,E$.fromConfig({change_directory:"deny"}),P),options:{},mode:"subagent",native:!0},explore:{name:"explore",color:{dark:"#ffb000",light:"#b45309"},permission:E$.merge(C,E$.fromConfig({"*":"deny",grep:"allow",glob:"allow",list:"allow",bash:"allow",webfetch:"allow",websearch:"allow",codesearch:"allow",read:"allow",external_directory:{"*":"ask",...Object.fromEntries(I.map((v)=>[v,"allow"]))}}),P),description:'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.',prompt:W,options:{},mode:"subagent",native:!0},title:{name:"title",mode:"subagent",options:{},native:!0,hidden:!0,temperature:0.5,permission:E$.merge(C,E$.fromConfig({"*":"deny"}),P),prompt:_,toolAllowlist:[]},summary:{name:"summary",mode:"subagent",options:{},native:!0,hidden:!0,permission:E$.merge(C,E$.fromConfig({"*":"deny"}),P),prompt:j,toolAllowlist:[]},compaction:{name:"compaction",mode:"subagent",options:{},native:!0,hidden:!0,permission:E$.merge(C,E$.fromConfig({"*":"deny"}),P),prompt:H,toolAllowlist:[]},"checkpoint-writer":{name:"checkpoint-writer",mode:"subagent",options:{},native:!0,hidden:!0,permission:E$.merge(C,P)},dream:{name:"dream",mode:"subagent",options:{},native:!0,hidden:!0,prompt:q,permission:D,toolAllowlist:L},distill:{name:"distill",mode:"subagent",options:{},native:!0,hidden:!0,prompt:U,permission:D,toolAllowlist:L}};for(let[v,m]of Object.entries(z.agent??{})){if(m.disable){delete R[v];continue}let A=R[v];if(!A)A=R[v]={name:v,mode:"all",permission:E$.merge(C,P),options:{},native:!1};if(m.model)if(m.model.includes("/"))A.model=H1.parseModel(m.model);else A.modelRef=m.model;A.variant=m.variant??A.variant,A.prompt=m.prompt??A.prompt,A.description=m.description??A.description,A.temperature=m.temperature??A.temperature,A.topP=m.top_p??A.topP,A.mode=m.mode??A.mode,A.color=m.color??A.color,A.hidden=m.hidden??A.hidden,A.name=m.name??A.name,A.steps=m.steps??A.steps,A.toolAllowlist=m.tool_allowlist??A.toolAllowlist,A.options=F9(A.options,m.options??{}),A.permission=E$.merge(A.permission,E$.fromConfig(m.permission??{}))}for(let v of Object.values(R))v.posture=UB(v);for(let v in R){if(R[v].permission.some((u)=>{if(u.permission!=="external_directory")return!1;if(u.action!=="deny")return!1;return u.pattern===j1.GLOB}))continue;R[v].permission=E$.merge(R[v].permission,E$.fromConfig({external_directory:{[j1.GLOB]:"allow"}}))}let N=G.fnUntraced(function*(v){return R[v]}),x=G.fnUntraced(function*(){let v=yield*$.get();return YB(R,KB(),QB([(m)=>v.default_agent!==void 0&&m.name===v.default_agent,"desc"],[(m)=>m.name==="plan","desc"],[(m)=>m.name==="build","desc"],[(m)=>m.name==="compose","desc"],[(m)=>m.name==="max","desc"],[(m)=>m.name,"asc"]))}),b=G.fnUntraced(function*(){let v=yield*$.get();if(v.default_agent){let u=R[v.default_agent];if(!u)throw Error(`default agent "${v.default_agent}" not found`);if(u.mode==="subagent")throw Error(`default agent "${v.default_agent}" is a subagent`);if(u.hidden===!0)throw Error(`default agent "${v.default_agent}" is hidden`);return u.name}let m=R.plan;if(m&&m.mode!=="subagent"&&m.hidden!==!0)return m.name;let A=Object.values(R).find((u)=>u.mode!=="subagent"&&u.hidden!==!0);if(!A)throw Error("no primary visible agent found");return A.name});return{get:N,list:x,defaultAgent:b}}));return A6.of({get:G.fn("Agent.get")(function*(V){return yield*i.useEffect(Q,(X)=>X.get(V))}),list:G.fn("Agent.list")(function*(){return yield*i.useEffect(Q,(V)=>V.list())}),defaultAgent:G.fn("Agent.defaultAgent")(function*(){return yield*i.useEffect(Q,(V)=>V.defaultAgent())}),generate:G.fn("Agent.generate")(function*(V){let X=yield*$.get(),W=V.model??(yield*K.defaultModel()),_=yield*K.getModel(W.providerID,W.modelID),j=yield*K.getLanguage(_),H=X.experimental?.openTelemetry?ZB(yield*G.serviceOption(VB)):void 0,q=[(yield*YJ(G.promise(()=>e.resolveAgentPrompt("generate"))))??""];yield*Z.trigger("experimental.chat.system.transform",{model:_},{system:q});let U=yield*i.useEffect(Q,(C)=>C.list()),z=yield*J.get(W.providerID).pipe(G.orDie),M=W.providerID==="openai"&&z?.type==="oauth",I={experimental_telemetry:{isEnabled:X.experimental?.openTelemetry,tracer:H,metadata:{userId:X.username??"unknown"}},temperature:0.3,messages:[...M?[]:q.map((C)=>({role:"system",content:C})),{role:"user",content:`Create an agent configuration based on this request:
7574
7574
 
7575
7575
  > ${V.description.replace(/\n/g,`
7576
7576
  > `)}
@@ -7581,7 +7581,7 @@ IMPORTANT: The following identifiers already exist and must NOT be used: ${U.map
7581
7581
  ${F.prettifyError(J)}`;return`The ${$} tool was called with invalid arguments: ${J}.
7582
7582
  Please rewrite the input so it satisfies the expected schema.`}var LA=4;function i8($,J=0){if(J>LA)return{};if(!$||typeof $!=="object")return{};let Z=$;if(Z.const!==void 0)return Z.const;if(Array.isArray(Z.enum)&&Z.enum.length>0)return Z.enum[0];for(let K of["anyOf","oneOf","allOf"]){let Q=Z[K];if(Array.isArray(Q)&&Q.length>0)return i8(Q[0],J)}switch(Array.isArray(Z.type)?Z.type[0]:Z.type){case"object":{let K=Z.properties??{},Q=Array.isArray(Z.required)?Z.required:[],V=Q.length>0?Q:Object.keys(K).slice(0,3),X={};for(let W of V)X[W]=W in K?i8(K[W],J+1):null;return X}case"array":return Z.items?[i8(Z.items,J+1)]:[];case"string":return"...";case"number":case"integer":return 0;case"boolean":return!1;case"null":return null;default:return Z.properties?i8({...Z,type:"object"},J):{}}}function NA($,J,Z){if(!Z.issues.some((Q)=>Q.code==="invalid_type"&&Q.path.length===0&&Q.expected==="object"))return;let K="";try{K=`
7583
7583
  A well-formed call looks like: ${JSON.stringify(i8(F.toJSONSchema(J)))}`}catch{K=""}return[`Invalid arguments for the ${$} tool: the arguments arrived as a JSON string, but this tool expects a JSON object.`,`Do not stringify the arguments \u2014 send the object itself.${K}`].join(`
7584
- `)}function yA($,J,Z,Y){return()=>G.gen(function*(){let K=typeof J==="function"?{...yield*J()}:{...J},Q=K.execute;return K.execute=(V,X)=>{let W={"tool.name":$,"session.id":X.sessionID,"message.id":X.messageID,...X.callID?{"tool.call_id":X.callID}:{}};return _B.info("tool call started",{...W}),G.gen(function*(){let _=_Z(V);if(typeof V==="string")_B.debug("tool arguments arrived as a string",{...W,raw:CG(V),recovered:_.decoded,decodeAttempts:_.attempts});let j=_.value;yield*G.try({try:()=>K.parameters.parse(j),catch:(z)=>{if(z instanceof F.ZodError){let M=NA($,K.parameters,z);if(M)return new w0(M,{cause:z});if(K.formatValidationError)return new w0(K.formatValidationError(z),{cause:z})}return new w0(RA($,z),{cause:z})}});let H=yield*K.timeout?Q(j,X).pipe(G.timeoutOrElse({duration:h2.millis(K.timeout),orElse:()=>G.die(new w0(`The ${$} tool timed out after ${K.timeout} ms. If this operation is expected to take longer, retry with a larger timeout value.`))})):Q(j,X);if(H.metadata.truncated!==void 0)return H;let q=yield*Y.get(X.agent),U=yield*Z.output(H.output,{},q);return{...H,output:U.content,metadata:{...H.metadata,truncated:U.truncated,...U.truncated&&{outputPath:U.outputPath}}}}).pipe(G.orDie,G.withSpan("Tool.execute",{attributes:W}))},K})}function H$($,J){return Object.assign(G.gen(function*(){let Z=yield*J,Y=yield*Z1,K=yield*p0.Service;return{id:$,init:yA($,Z,Y,K)}}),{id:$})}function n$($){return G.gen(function*(){return{...yield*$.init(),id:$.id}})}import QJ from"path";import{fileURLToPath as CB}from"url";var KJ={};o$(KJ,{preferred:()=>uA,posix:()=>mA,name:()=>s8,login:()=>fA,killTree:()=>bA,gitbash:()=>k3,acceptable:()=>dA,Shell:()=>KJ});import S6 from"path";import{spawn as TA}from"child_process";import{setTimeout as OB}from"timers/promises";var qB=200,kA=new Set(["fish","nu"]),EA=new Set(["bash","dash","fish","ksh","sh","zsh"]),xA=new Set(["bash","dash","ksh","sh","zsh"]);async function bA($,J){let Z=$.pid;if(!Z||J?.exited?.())return;if(process.platform==="win32"){await new Promise((Y)=>{let K=TA("taskkill",["/pid",String(Z),"/f","/t"],{stdio:"ignore",windowsHide:!0});K.once("exit",()=>Y()),K.once("error",()=>Y())});return}try{if(process.kill(-Z,"SIGTERM"),await OB(qB),!J?.exited?.())process.kill(-Z,"SIGKILL")}catch(Y){if($.kill("SIGTERM"),await OB(qB),!J?.exited?.())$.kill("SIGKILL")}}function vA($){if(process.platform!=="win32")return $;let J=O0.windowsPath($);if(S6.win32.dirname(J)!=="."){if(J.startsWith("/")&&s8(J)==="bash")return k3()||J;return J}return x$(J)||J}function hA(){let $=x$("pwsh.exe");if($)return $;let J=x$("powershell.exe");if(J)return J}function FB($,J){if($&&(!J?.acceptable||!kA.has(s8($))))return vA($);if(process.platform==="win32"){let Z=hA();if(Z)return Z}return gA()}function k3(){if(process.platform!=="win32")return;if(k$.QITQODE_GIT_BASH_PATH)return k$.QITQODE_GIT_BASH_PATH;let $=x$("git");if(!$)return;let J=S6.join($,"..","..","bin","bash.exe");if(O0.stat(J)?.size)return J}function gA(){if(process.platform==="win32"){let J=k3();if(J)return J;return process.env.COMSPEC||"cmd.exe"}if(process.platform==="darwin")return"/bin/zsh";let $=x$("bash");if($)return $;return"/bin/sh"}function s8($){if(process.platform==="win32")return S6.win32.parse(O0.windowsPath($)).name.toLowerCase();return S6.basename($).toLowerCase()}function fA($){return EA.has(s8($))}function mA($){return xA.has(s8($))}var uA=T2(()=>FB(process.env.SHELL)),dA=T2(()=>FB(process.env.SHELL,{acceptable:!0}));var n8={};o$(n8,{prefixWith:()=>pA,BashArity:()=>n8});function pA($,J){return zB.bashPrefixWith($,J)}var MB=30000,rA=k$.QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS||120000,wB=new Set(["powershell","pwsh"]),RB=new Set(["cd","push-location","set-location"]),iA=new Set([...RB,"rm","cp","mv","mkdir","touch","chmod","chown","cat","get-content","set-content","add-content","copy-item","move-item","remove-item","new-item","rename-item"]),sA=new Set(["-destination","-literalpath","-path"]),nA=new Set(["-confirm","-debug","-force","-nonewline","-recurse","-verbose","-whatif"]),v3=O$.create({service:"bash-tool"}),E3=($)=>{if($.startsWith("file://"))return CB($);if($.startsWith("/")||/^[a-z]:/i.test($))return $;let J=new URL($,import.meta.url);return CB(J)};function aA($){let J=[];for(let Z=0;Z<$.childCount;Z++){let Y=$.child(Z);if(!Y)continue;if(Y.type==="command_elements"){for(let K=0;K<Y.childCount;K++){let Q=Y.child(K);if(!Q||Q.type==="command_argument_sep"||Q.type==="redirection")continue;J.push({type:Q.type,text:Q.text})}continue}if(Y.type!=="command_name"&&Y.type!=="command_name_expr"&&Y.type!=="word"&&Y.type!=="string"&&Y.type!=="raw_string"&&Y.type!=="concatenation")continue;J.push({type:Y.type,text:Y.text})}return J}function tA($){return($.parent?.type==="redirected_statement"?$.parent.text:$.text).trim()}function eA($){return $.descendantsOfType("command").filter((J)=>Boolean(J))}function LB($){if($.length<2)return $;let J=$[0],Z=$[$.length-1];if((J==='"'||J==="'")&&J===Z)return $.slice(1,-1);return $}function NB($){if($==="~")return b3.homedir();if($.startsWith("~/")||$.startsWith("~\\"))return QJ.join(b3.homedir(),$.slice(2));return $}function DB($){if(process.platform!=="win32")return process.env[$];let J=Object.keys(process.env).find((Z)=>Z.toLowerCase()===$.toLowerCase());return J?process.env[J]:void 0}function $S($,J,Z){let Y=$.toUpperCase();if(Y==="HOME")return b3.homedir();if(Y==="PWD")return J;if(Y==="PSHOME")return QJ.dirname(Z)}function JS($,J,Z){let Y=LB($).replace(/\$\{env:([^}]+)\}/gi,(K,Q)=>DB(Q)||"").replace(/\$env:([A-Za-z_][A-Za-z0-9_]*)/gi,(K,Q)=>DB(Q)||"").replace(/\$(HOME|PWD|PSHOME)(?=$|[\\/])/gi,(K,Q)=>$S(Q,J,Z)||"");return NB(Y)}function ZS($){let J=$.match(/^([A-Za-z]+)::(.*)$/);if(J){if(J[1].toLowerCase()!=="filesystem")return;return J[2]}let Z=$.match(/^([A-Za-z]+):(.*)$/);if(!Z)return $;if(Z[1].length===1)return $;return}function YS($,J){if($.startsWith("(")||$.startsWith("@("))return!0;if($.includes("$(")||$.includes("${")||$.includes("`"))return!0;if(J)return/\$(?!env:)/i.test($);return $.includes("$")}function KS($){let J=/[?*[]/.exec($);if(!J)return $;if(J.index===0)return;return $.slice(0,J.index)}function QS($,J){if(!J)return $.slice(1).filter((K)=>!K.text.startsWith("-")&&!($[0]?.text==="chmod"&&K.text.startsWith("+"))).map((K)=>K.text);let Z=[],Y=!1;for(let K of $.slice(1)){if(Y){Z.push(K.text),Y=!1;continue}if(K.type==="command_parameter"){let Q=K.text.toLowerCase();if(nA.has(Q))continue;Y=sA.has(Q);continue}Z.push(K.text)}return Z}function PB($){if($.length<=MB)return $;return`...
7584
+ `)}function yA($,J,Z,Y){return()=>G.gen(function*(){let K=typeof J==="function"?{...yield*J()}:{...J},Q=K.execute;return K.execute=(V,X)=>{let W={"tool.name":$,"session.id":X.sessionID,"message.id":X.messageID,...X.callID?{"tool.call_id":X.callID}:{}};return _B.info("tool call started",{...W}),G.gen(function*(){let _=_Z(V);if(typeof V==="string")_B.debug("tool arguments arrived as a string",{...W,raw:CG(V),recovered:_.decoded,decodeAttempts:_.attempts});let j=_.value;yield*G.try({try:()=>K.parameters.parse(j),catch:(z)=>{if(z instanceof F.ZodError){let M=NA($,K.parameters,z);if(M)return new R0(M,{cause:z});if(K.formatValidationError)return new R0(K.formatValidationError(z),{cause:z})}return new R0(RA($,z),{cause:z})}});let H=yield*K.timeout?Q(j,X).pipe(G.timeoutOrElse({duration:h2.millis(K.timeout),orElse:()=>G.die(new R0(`The ${$} tool timed out after ${K.timeout} ms. If this operation is expected to take longer, retry with a larger timeout value.`))})):Q(j,X);if(H.metadata.truncated!==void 0)return H;let q=yield*Y.get(X.agent),U=yield*Z.output(H.output,{},q);return{...H,output:U.content,metadata:{...H.metadata,truncated:U.truncated,...U.truncated&&{outputPath:U.outputPath}}}}).pipe(G.orDie,G.withSpan("Tool.execute",{attributes:W}))},K})}function H$($,J){return Object.assign(G.gen(function*(){let Z=yield*J,Y=yield*Z1,K=yield*c0.Service;return{id:$,init:yA($,Z,Y,K)}}),{id:$})}function n$($){return G.gen(function*(){return{...yield*$.init(),id:$.id}})}import QJ from"path";import{fileURLToPath as CB}from"url";var KJ={};o$(KJ,{preferred:()=>uA,posix:()=>mA,name:()=>s8,login:()=>fA,killTree:()=>bA,gitbash:()=>k3,acceptable:()=>dA,Shell:()=>KJ});import S6 from"path";import{spawn as TA}from"child_process";import{setTimeout as OB}from"timers/promises";var qB=200,kA=new Set(["fish","nu"]),EA=new Set(["bash","dash","fish","ksh","sh","zsh"]),xA=new Set(["bash","dash","ksh","sh","zsh"]);async function bA($,J){let Z=$.pid;if(!Z||J?.exited?.())return;if(process.platform==="win32"){await new Promise((Y)=>{let K=TA("taskkill",["/pid",String(Z),"/f","/t"],{stdio:"ignore",windowsHide:!0});K.once("exit",()=>Y()),K.once("error",()=>Y())});return}try{if(process.kill(-Z,"SIGTERM"),await OB(qB),!J?.exited?.())process.kill(-Z,"SIGKILL")}catch(Y){if($.kill("SIGTERM"),await OB(qB),!J?.exited?.())$.kill("SIGKILL")}}function vA($){if(process.platform!=="win32")return $;let J=O0.windowsPath($);if(S6.win32.dirname(J)!=="."){if(J.startsWith("/")&&s8(J)==="bash")return k3()||J;return J}return x$(J)||J}function hA(){let $=x$("pwsh.exe");if($)return $;let J=x$("powershell.exe");if(J)return J}function FB($,J){if($&&(!J?.acceptable||!kA.has(s8($))))return vA($);if(process.platform==="win32"){let Z=hA();if(Z)return Z}return gA()}function k3(){if(process.platform!=="win32")return;if(k$.QITQODE_GIT_BASH_PATH)return k$.QITQODE_GIT_BASH_PATH;let $=x$("git");if(!$)return;let J=S6.join($,"..","..","bin","bash.exe");if(O0.stat(J)?.size)return J}function gA(){if(process.platform==="win32"){let J=k3();if(J)return J;return process.env.COMSPEC||"cmd.exe"}if(process.platform==="darwin")return"/bin/zsh";let $=x$("bash");if($)return $;return"/bin/sh"}function s8($){if(process.platform==="win32")return S6.win32.parse(O0.windowsPath($)).name.toLowerCase();return S6.basename($).toLowerCase()}function fA($){return EA.has(s8($))}function mA($){return xA.has(s8($))}var uA=T2(()=>FB(process.env.SHELL)),dA=T2(()=>FB(process.env.SHELL,{acceptable:!0}));var n8={};o$(n8,{prefixWith:()=>pA,BashArity:()=>n8});function pA($,J){return zB.bashPrefixWith($,J)}var MB=30000,rA=k$.QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS||120000,wB=new Set(["powershell","pwsh"]),RB=new Set(["cd","push-location","set-location"]),iA=new Set([...RB,"rm","cp","mv","mkdir","touch","chmod","chown","cat","get-content","set-content","add-content","copy-item","move-item","remove-item","new-item","rename-item"]),sA=new Set(["-destination","-literalpath","-path"]),nA=new Set(["-confirm","-debug","-force","-nonewline","-recurse","-verbose","-whatif"]),v3=O$.create({service:"bash-tool"}),E3=($)=>{if($.startsWith("file://"))return CB($);if($.startsWith("/")||/^[a-z]:/i.test($))return $;let J=new URL($,import.meta.url);return CB(J)};function aA($){let J=[];for(let Z=0;Z<$.childCount;Z++){let Y=$.child(Z);if(!Y)continue;if(Y.type==="command_elements"){for(let K=0;K<Y.childCount;K++){let Q=Y.child(K);if(!Q||Q.type==="command_argument_sep"||Q.type==="redirection")continue;J.push({type:Q.type,text:Q.text})}continue}if(Y.type!=="command_name"&&Y.type!=="command_name_expr"&&Y.type!=="word"&&Y.type!=="string"&&Y.type!=="raw_string"&&Y.type!=="concatenation")continue;J.push({type:Y.type,text:Y.text})}return J}function tA($){return($.parent?.type==="redirected_statement"?$.parent.text:$.text).trim()}function eA($){return $.descendantsOfType("command").filter((J)=>Boolean(J))}function LB($){if($.length<2)return $;let J=$[0],Z=$[$.length-1];if((J==='"'||J==="'")&&J===Z)return $.slice(1,-1);return $}function NB($){if($==="~")return b3.homedir();if($.startsWith("~/")||$.startsWith("~\\"))return QJ.join(b3.homedir(),$.slice(2));return $}function DB($){if(process.platform!=="win32")return process.env[$];let J=Object.keys(process.env).find((Z)=>Z.toLowerCase()===$.toLowerCase());return J?process.env[J]:void 0}function $S($,J,Z){let Y=$.toUpperCase();if(Y==="HOME")return b3.homedir();if(Y==="PWD")return J;if(Y==="PSHOME")return QJ.dirname(Z)}function JS($,J,Z){let Y=LB($).replace(/\$\{env:([^}]+)\}/gi,(K,Q)=>DB(Q)||"").replace(/\$env:([A-Za-z_][A-Za-z0-9_]*)/gi,(K,Q)=>DB(Q)||"").replace(/\$(HOME|PWD|PSHOME)(?=$|[\\/])/gi,(K,Q)=>$S(Q,J,Z)||"");return NB(Y)}function ZS($){let J=$.match(/^([A-Za-z]+)::(.*)$/);if(J){if(J[1].toLowerCase()!=="filesystem")return;return J[2]}let Z=$.match(/^([A-Za-z]+):(.*)$/);if(!Z)return $;if(Z[1].length===1)return $;return}function YS($,J){if($.startsWith("(")||$.startsWith("@("))return!0;if($.includes("$(")||$.includes("${")||$.includes("`"))return!0;if(J)return/\$(?!env:)/i.test($);return $.includes("$")}function KS($){let J=/[?*[]/.exec($);if(!J)return $;if(J.index===0)return;return $.slice(0,J.index)}function QS($,J){if(!J)return $.slice(1).filter((K)=>!K.text.startsWith("-")&&!($[0]?.text==="chmod"&&K.text.startsWith("+"))).map((K)=>K.text);let Z=[],Y=!1;for(let K of $.slice(1)){if(Y){Z.push(K.text),Y=!1;continue}if(K.type==="command_parameter"){let Q=K.text.toLowerCase();if(nA.has(Q))continue;Y=sA.has(Q);continue}Z.push(K.text)}return Z}function PB($){if($.length<=MB)return $;return`...
7585
7585
 
7586
7586
  `+$.slice(-MB)}var VS=/error|exception|failed|fatal|traceback|panic|exit code/i,IB=Math.floor(u1*0.7),AB=Math.floor(DJ*0.7),GS=G.fn("BashTool.parse")(function*($,J){let Z=yield*G.promise(()=>jS().then((Y)=>(J?Y.ps:Y.bash).parse($)).catch((Y)=>{return v3.warn("tree-sitter parse of command failed",{error:String(Y)}),null}));if(!Z)throw Error("Failed to parse command");return Z.rootNode}),XS=G.fn("BashTool.ask")(function*($,J){if(J.dirs.size>0){let Z=Array.from(J.dirs).map((Y)=>{if(process.platform==="win32")return $$.normalizePathPattern(QJ.join(Y,"*"));return QJ.join(Y,"*")});yield*$.ask({permission:"external_directory",patterns:Z,always:Z,metadata:{}})}if(J.patterns.size===0)return;yield*$.ask({permission:"bash",patterns:Array.from(J.patterns),always:Array.from(J.always),metadata:{}})});function WS($,J,Z,Y,K){if(process.platform==="win32"&&wB.has(J))return S1.make($,["-NoLogo","-NoProfile","-NonInteractive","-Command",Z],{cwd:Y,env:K,stdin:"ignore",detached:!1});return S1.make(Z,[],{shell:$,cwd:Y,env:K,stdin:"ignore",detached:process.platform!=="win32"})}var jS=T2(async()=>{let{Parser:$}=await import("./chunk-fwr2qgqb.js"),{default:J}=await import("./chunk-g204pt98.js",{with:{type:"wasm"}}),Z=E3(J);await $.init({locateFile(){return Z}});let{default:Y}=await import("./chunk-r78kfhvz.js",{with:{type:"wasm"}}),{default:K}=await import("./chunk-m31d2n6h.js",{with:{type:"wasm"}}),Q=E3(Y),V=E3(K),[X,W]=await Promise.all([x3.load(Q),x3.load(V)]),_=new $;_.setLanguage(X);let j=new $;return j.setLanguage(W),{bash:_,ps:j}}),aU=H$("bash",G.gen(function*(){let $=(yield*e.toolDescriptionEffect("bash"))??"",J=yield*M9,Z=yield*$$.Service,Y=yield*Z1,K=yield*z2.Service,Q=G.fn("BashTool.cygpath")(function*(H,q){let z=(yield*J.lines(S1.make(H,["-lc",'cygpath -w -- "$1"',"_",q])).pipe(G.catch(()=>G.succeed([]))))[0]?.trim();if(!z)return;return $$.normalizePath(z)}),V=G.fn("BashTool.resolvePath")(function*(H,q,U){if(process.platform==="win32"){if(KJ.posix(U)&&H.startsWith("/")&&$$.windowsPath(H)===H){let z=yield*Q(U,H);if(z)return z}return $$.normalizePath(QJ.resolve(q,$$.windowsPath(H)))}return QJ.resolve(q,H)}),X=G.fn("BashTool.argPath")(function*(H,q,U,z){let M=U?JS(H,q,z):NB(LB(H)),I=M&&KS(M);if(!I||YS(I,U))return;let C=U?ZS(I):I;if(!C)return;return yield*V(C,q,z)}),W=G.fn("BashTool.collect")(function*(H,q,U,z){let M={dirs:new Set,patterns:new Set,always:new Set},I=yield*G.promise(()=>e.resolveBashArity());for(let C of eA(H)){let P=aA(C),D=P.map((R)=>R.text),L=U?D[0]?.toLowerCase():D[0];if(L&&iA.has(L))for(let R of QS(P,U)){let N=yield*X(R,q,U,z);if(v3.info("resolved path",{arg:R,resolved:N}),!N||B$.containsPath(N))continue;let x=(yield*Z.isDir(N))?N:QJ.dirname(N);M.dirs.add(x)}if(D.length&&(!L||!RB.has(L)))M.patterns.add(tA(C)),M.always.add(n8.prefixWith(I,D).join(" ")+" *")}return M}),_=G.fn("BashTool.shellEnv")(function*(H,q){let U=yield*K.trigger("shell.env",{cwd:q,sessionID:H.sessionID,callID:H.callID},{env:{}});return{...SB(),...U.env}}),j=G.fn("BashTool.run")(function*(H,q){let U=u1,z=DJ,M=U*2,I="",C="",P=[],D=0,L="",R,N=!1,x=!1,b=!1;yield*q.metadata({metadata:{output:"",description:H.description}});let v=yield*G.scoped(G.gen(function*(){let S=yield*J.spawn(WS(H.shell,H.name,H.command,H.cwd,H.env));yield*G.forkScoped(l$.runForEach(l$.decodeText(S.all),(s)=>{let J$=Buffer.byteLength(s,"utf-8");P.push({text:s,size:J$}),D+=J$;while(D>M&&P.length>1){let Z$=P.shift();if(!Z$)break;D-=Z$.size,N=!0}if(C=PB(C+s),L)R?.write(s);else if(I+=s,Buffer.byteLength(I,"utf-8")>U)return Y.write(I).pipe(G.andThen((Z$)=>G.sync(()=>{L=Z$,N=!0,R=cA(Z$,{flags:"a"}),I=""})),G.andThen(q.metadata({metadata:{output:C,description:H.description}})));return q.metadata({metadata:{output:C,description:H.description}})}));let T=G.callback((s)=>{if(q.abort.aborted)return s(G.void);let J$=()=>s(G.void);if(q.abort.addEventListener("abort",J$,{once:!0}),q.abort.aborted)J$();return G.sync(()=>q.abort.removeEventListener("abort",J$))}),k=G.sleep(`${H.timeout+100} millis`),A$=yield*G.raceAll([S.exitCode.pipe(G.map((s)=>({kind:"exit",code:s}))),T.pipe(G.map(()=>({kind:"abort",code:null}))),k.pipe(G.map(()=>({kind:"timeout",code:null})))]);if(A$.kind==="abort")b=!0,yield*S.kill({forceKillAfter:"3 seconds"}).pipe(G.orDie);if(A$.kind==="timeout")x=!0,yield*S.kill({forceKillAfter:"3 seconds"}).pipe(G.orDie);return A$.kind==="exit"?A$.code:null})).pipe(G.orDie),m=[];if(x)m.push(`bash tool terminated command after exceeding timeout ${H.timeout} ms. If this command is expected to take longer and is not waiting for interactive input, retry with a larger timeout value in milliseconds.`);if(b)m.push("User aborted the command");let A=P.map((S)=>S.text).join(""),u=P7(A,z,U);if(u.cut)N=!0;if(!L&&u.cut)L=yield*Y.write(A);let r=u.text;if(!r)r="(no output)";if(N&&L){let S=u.text.length>2048?u.text.slice(-2048):u.text;if(VS.test(S)){let k=yield*G.promise(async()=>{try{let A$=await oA(L),s=IB*2,J$=await lA(L,"r");try{let Z$=Math.min(Number(A$.size),s),W$=Buffer.alloc(Z$);await J$.read(W$,0,Z$,0);let y$=W$.toString("utf-8"),Q$=1;for(let n=0;n<y$.length;n++)if(y$.charCodeAt(n)===10)Q$++;let y=Q$<=AB+z;return{text:y$,overlaps:y}}finally{await J$.close()}}catch{return}});if(k){let A$=k.text;if(!k.overlaps){let s=D7(A$,AB,IB);r=`...output truncated (head+tail shown due to errors)...
7587
7587
 
@@ -7608,5 +7608,5 @@ Full output saved to: ${L}
7608
7608
  <bash_metadata>
7609
7609
  `+m.join(`
7610
7610
  `)+`
7611
- </bash_metadata>`;if(R){let S=R;yield*G.promise(()=>new Promise((T)=>{S.end(()=>T()),S.on("error",()=>T())}))}return{title:H.description,metadata:{output:C||PB(r),exit:v,description:H.description,truncated:N,...N&&L?{outputPath:L}:{}},output:r}});return()=>G.sync(()=>{let H=KJ.acceptable(),q=KJ.name(H),U=q==="powershell"?"If the commands depend on each other and must run sequentially, avoid '&&' in this shell because Windows PowerShell 5.1 does not support it. Use PowerShell conditionals such as `cmd1; if ($?) { cmd2 }` when later commands must depend on earlier success.":"If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.";return v3.info("bash tool using shell",{shell:H}),{description:$.replaceAll("${directory}",B$.directory).replaceAll("${os}",process.platform).replaceAll("${shell}",q).replaceAll("${chaining}",U).replaceAll("${maxLines}",String(DJ)).replaceAll("${maxBytes}",String(u1)),parameters:tV,execute:(z,M)=>G.gen(function*(){let I=t$.get(M.sessionID),C=z.workdir?yield*V(z.workdir,I,H):I;if(z.timeout!==void 0&&z.timeout<0)throw Error(`Invalid timeout value: ${z.timeout}. Timeout must be a positive number.`);let P=z.timeout??rA,D=wB.has(q),L=yield*GS(z.command,D),R=yield*W(L,C,D,H);if(!B$.containsPath(C))R.dirs.add(C);if(yield*XS(M,R),z.interactive){let N=yield*_(M,C);yield*M.metadata({metadata:{output:"(waiting for user interaction...)",description:z.description}});let x=yield*G.tryPromise(()=>iV({command:z.command,cwd:C,env:N,description:z.description})).pipe(G.orDie);return{title:z.description,metadata:{output:x.output||"(interactive command completed)",exit:x.exitCode,description:z.description,truncated:!1},output:x.output||`(interactive command completed with exit code ${x.exitCode})`}}return yield*j({shell:H,name:q,command:z.command,cwd:C,env:yield*_(M,C),timeout:P,description:z.description},M)})}})}));var m3={};o$(m3,{retryable:()=>cB,policy:()=>AS,persistentRetryDelay:()=>IS,isRetryableTransientError:()=>dB,delay:()=>pB,SessionRetry:()=>m3,RETRY_MAX_DELAY_NO_HEADERS:()=>FS,RETRY_MAX_DELAY:()=>zS,RETRY_INITIAL_DELAY:()=>OS,RETRY_BACKOFF_FACTOR:()=>qS,PERSISTENT_RETRY_MAX_DELAY:()=>DS,PERSISTENT_RETRY_MAX_ATTEMPTS:()=>PS,PERSISTENT_RETRY_INITIAL_DELAY:()=>CS,PERSISTENT_RETRY_BACKOFF_FACTOR:()=>MS,GO_UPSELL_MESSAGE:()=>uB});var yB=2000,TB=2,kB=30000,EB=2147483647,US=new Set(["ECONNRESET","EPIPE","ETIMEDOUT"]);var BS=new Set([429,500,502,503,504,529]);function xB($){if(!($ instanceof Error))return!1;let J=$.status??$.statusCode??$.response?.status;if(typeof J==="number"&&BS.has(J))return!0;let Z=$.code;if(typeof Z==="string"&&US.has(Z))return!0;if($.message==="SSE read timed out")return!0;if(HS($))return!0;return!1}function HS($){let J=$;return J.retryable===!0&&typeof J.category==="string"&&J.category.length>0}function oJ($){return Math.min($,2147483647)}function bB($,J){if(J){if(typeof J.retryAfterMs==="number"&&!Number.isNaN(J.retryAfterMs))return oJ(J.retryAfterMs);let Z=J.data?.responseHeaders;if(Z){let Y=Z["retry-after-ms"];if(Y){let Q=Number.parseFloat(Y);if(!Number.isNaN(Q))return oJ(Q)}let K=Z["retry-after"];if(K){let Q=Number.parseFloat(K);if(!Number.isNaN(Q))return oJ(Math.ceil(Q*1000));let V=Date.parse(K)-Date.now();if(!Number.isNaN(V)&&V>0)return oJ(Math.ceil(V))}return oJ(2000*Math.pow(2,$-1))}}return oJ(Math.min(2000*Math.pow(2,$-1),30000))}var h3=500,g3=2,f3=300000,vB=10;function hB($){return Math.min(h3*g3**($-1),f3)}var uB="Free usage exceeded, subscribe to Go https://opencode.ai/go",OS=yB,qS=TB,FS=kB,zS=EB,dB=xB,pB=bB,CS=h3,MS=g3,DS=f3,PS=vB,IS=hB;function cB($){if(E0.ContextOverflowError.isInstance($))return;if(dB($))return $.message||"Transient network error";if(E0.APIError.isInstance($)){let K=$.data.statusCode;if($.data.category==="output_budget_exhausted"||$.data.category==="empty_output")return;if($.data.category==="stream_truncated"&&$.data.isRetryable)return $.data.message;if(!$.data.isRetryable&&!(K!==void 0&&K>=500))return;if($.data.responseBody?.includes("FreeUsageLimitError"))return uB;return $.data.message.includes("Overloaded")?"Provider is overloaded":$.data.message}let J=$.data?.message;if(typeof J==="string"){let K=J.toLowerCase();if(K.includes("rate increased too quickly")||K.includes("rate limit")||K.includes("too many requests"))return J}let Z=mB(()=>{try{if(typeof $.data?.message==="string")return JSON.parse($.data.message);return JSON.parse($.data.message)}catch{return}});if(!Z||typeof Z!=="object")return;let Y=typeof Z.code==="string"?Z.code:"";if(Z.type==="error"&&Z.error?.type==="too_many_requests")return"Too Many Requests";if(Y.includes("exhausted")||Y.includes("unavailable"))return"Provider is overloaded";if(Z.type==="error"&&typeof Z.error?.code==="string"&&Z.error.code.includes("rate_limit"))return"Rate Limited";return}function AS($){return fB.fromStepWithMetadata(G.succeed((J)=>{let Z=$.parse(J.input),Y=cB(Z);if(!Y)return n0.done(J.attempt);return G.gen(function*(){let K=J.input,Q=typeof K?.retryAfterMs==="number"?K.retryAfterMs:void 0,V=pB(J.attempt,E0.APIError.isInstance(Z)?Z:Q!==void 0?{retryAfterMs:Q}:void 0),X=yield*gB.currentTimeMillis;return yield*$.set({attempt:J.attempt,message:Y,next:X+V}),[J.attempt,h2.millis(V)]})}))}var um=Z0.define("tui.instructions.loaded",F.object({files:F.array(F.string()).describe("Display labels of loaded instruction files: worktree-relative path, ~-path, or absolute")}));
7612
- export{W1 as Yg,h0 as Zg,w2 as _g,k2 as $g,FJ as ah,MR as bh,a0 as ch,g1 as dh,e9 as eh,$Z as fh,MJ as gh,um as hh,j1 as ih,PJ as jh,Wy as kh,GF as lh,B1 as mh,KJ as nh,BZ as oh,UF as ph,d1 as qh,d2 as rh,QX as sh,XX as th,c2 as uh,SZ as vh,v7 as wh,K1 as xh,qX as yh,RZ as zh,o2 as Ah,Ax as Bh,oX as Ch,o7 as Dh,aX as Eh,l8 as Fh,o8 as Gh,iU as Hh,JB as Ih,p0 as Jh,dB as Kh,CS as Lh,MS as Mh,DS as Nh,PS as Oh,IS as Ph,m3 as Qh};
7611
+ </bash_metadata>`;if(R){let S=R;yield*G.promise(()=>new Promise((T)=>{S.end(()=>T()),S.on("error",()=>T())}))}return{title:H.description,metadata:{output:C||PB(r),exit:v,description:H.description,truncated:N,...N&&L?{outputPath:L}:{}},output:r}});return()=>G.sync(()=>{let H=KJ.acceptable(),q=KJ.name(H),U=q==="powershell"?"If the commands depend on each other and must run sequentially, avoid '&&' in this shell because Windows PowerShell 5.1 does not support it. Use PowerShell conditionals such as `cmd1; if ($?) { cmd2 }` when later commands must depend on earlier success.":"If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.";return v3.info("bash tool using shell",{shell:H}),{description:$.replaceAll("${directory}",B$.directory).replaceAll("${os}",process.platform).replaceAll("${shell}",q).replaceAll("${chaining}",U).replaceAll("${maxLines}",String(DJ)).replaceAll("${maxBytes}",String(u1)),parameters:tV,execute:(z,M)=>G.gen(function*(){let I=t$.get(M.sessionID),C=z.workdir?yield*V(z.workdir,I,H):I;if(z.timeout!==void 0&&z.timeout<0)throw Error(`Invalid timeout value: ${z.timeout}. Timeout must be a positive number.`);let P=z.timeout??rA,D=wB.has(q),L=yield*GS(z.command,D),R=yield*W(L,C,D,H);if(!B$.containsPath(C))R.dirs.add(C);if(yield*XS(M,R),z.interactive){let N=yield*_(M,C);yield*M.metadata({metadata:{output:"(waiting for user interaction...)",description:z.description}});let x=yield*G.tryPromise(()=>iV({command:z.command,cwd:C,env:N,description:z.description})).pipe(G.orDie);return{title:z.description,metadata:{output:x.output||"(interactive command completed)",exit:x.exitCode,description:z.description,truncated:!1},output:x.output||`(interactive command completed with exit code ${x.exitCode})`}}return yield*j({shell:H,name:q,command:z.command,cwd:C,env:yield*_(M,C),timeout:P,description:z.description},M)})}})}));var m3={};o$(m3,{retryable:()=>cB,policy:()=>AS,persistentRetryDelay:()=>IS,isRetryableTransientError:()=>dB,delay:()=>pB,SessionRetry:()=>m3,RETRY_MAX_DELAY_NO_HEADERS:()=>FS,RETRY_MAX_DELAY:()=>zS,RETRY_INITIAL_DELAY:()=>OS,RETRY_BACKOFF_FACTOR:()=>qS,PERSISTENT_RETRY_MAX_DELAY:()=>DS,PERSISTENT_RETRY_MAX_ATTEMPTS:()=>PS,PERSISTENT_RETRY_INITIAL_DELAY:()=>CS,PERSISTENT_RETRY_BACKOFF_FACTOR:()=>MS,GO_UPSELL_MESSAGE:()=>uB});var yB=2000,TB=2,kB=30000,EB=2147483647,US=new Set(["ECONNRESET","EPIPE","ETIMEDOUT"]);var BS=new Set([429,500,502,503,504,529]);function xB($){if(!($ instanceof Error))return!1;let J=$.status??$.statusCode??$.response?.status;if(typeof J==="number"&&BS.has(J))return!0;let Z=$.code;if(typeof Z==="string"&&US.has(Z))return!0;if($.message==="SSE read timed out")return!0;if(HS($))return!0;return!1}function HS($){let J=$;return J.retryable===!0&&typeof J.category==="string"&&J.category.length>0}function oJ($){return Math.min($,2147483647)}function bB($,J){if(J){if(typeof J.retryAfterMs==="number"&&!Number.isNaN(J.retryAfterMs))return oJ(J.retryAfterMs);let Z=J.data?.responseHeaders;if(Z){let Y=Z["retry-after-ms"];if(Y){let Q=Number.parseFloat(Y);if(!Number.isNaN(Q))return oJ(Q)}let K=Z["retry-after"];if(K){let Q=Number.parseFloat(K);if(!Number.isNaN(Q))return oJ(Math.ceil(Q*1000));let V=Date.parse(K)-Date.now();if(!Number.isNaN(V)&&V>0)return oJ(Math.ceil(V))}return oJ(2000*Math.pow(2,$-1))}}return oJ(Math.min(2000*Math.pow(2,$-1),30000))}var h3=500,g3=2,f3=300000,vB=10;function hB($){return Math.min(h3*g3**($-1),f3)}var uB="Free usage exceeded, subscribe to Go https://opencode.ai/go",OS=yB,qS=TB,FS=kB,zS=EB,dB=xB,pB=bB,CS=h3,MS=g3,DS=f3,PS=vB,IS=hB;function cB($){if(w0.ContextOverflowError.isInstance($))return;if(dB($))return $.message||"Transient network error";if(w0.APIError.isInstance($)){let K=$.data.statusCode;if($.data.category==="output_budget_exhausted"||$.data.category==="empty_output")return;if($.data.category==="stream_failed"&&$.data.isRetryable)return $.data.message;if($.data.category==="stream_truncated"&&$.data.isRetryable)return $.data.message;if(!$.data.isRetryable&&!(K!==void 0&&K>=500))return;if($.data.responseBody?.includes("FreeUsageLimitError"))return uB;return $.data.message.includes("Overloaded")?"Provider is overloaded":$.data.message}let J=$.data?.message;if(typeof J==="string"){let K=J.toLowerCase();if(K.includes("rate increased too quickly")||K.includes("rate limit")||K.includes("too many requests"))return J}let Z=mB(()=>{try{if(typeof $.data?.message==="string")return JSON.parse($.data.message);return JSON.parse($.data.message)}catch{return}});if(!Z||typeof Z!=="object")return;let Y=typeof Z.code==="string"?Z.code:"";if(Z.type==="error"&&Z.error?.type==="too_many_requests")return"Too Many Requests";if(Y.includes("exhausted")||Y.includes("unavailable"))return"Provider is overloaded";if(Z.type==="error"&&typeof Z.error?.code==="string"&&Z.error.code.includes("rate_limit"))return"Rate Limited";return}function AS($){let J=0;return fB.fromStepWithMetadata(G.succeed((Z)=>{let Y=$.parse(Z.input),K=cB(Y);if(!K)return u0.done(Z.attempt);if(w0.APIError.isInstance(Y)&&Y.data.category==="stream_failed"){if(J>=2)return u0.done(Z.attempt);J+=1}return G.gen(function*(){let Q=Z.input,V=typeof Q?.retryAfterMs==="number"?Q.retryAfterMs:void 0,X=pB(Z.attempt,w0.APIError.isInstance(Y)?Y:V!==void 0?{retryAfterMs:V}:void 0),W=yield*gB.currentTimeMillis;return yield*$.set({attempt:Z.attempt,message:K,next:W+X}),[Z.attempt,h2.millis(X)]})}))}var um=Z0.define("tui.instructions.loaded",F.object({files:F.array(F.string()).describe("Display labels of loaded instruction files: worktree-relative path, ~-path, or absolute")}));
7612
+ export{W1 as Yg,h0 as Zg,w2 as _g,k2 as $g,FJ as ah,MR as bh,a0 as ch,g1 as dh,e9 as eh,$Z as fh,MJ as gh,um as hh,j1 as ih,PJ as jh,Wy as kh,GF as lh,B1 as mh,KJ as nh,BZ as oh,UF as ph,d1 as qh,d2 as rh,QX as sh,XX as th,c2 as uh,SZ as vh,v7 as wh,K1 as xh,qX as yh,RZ as zh,o2 as Ah,Ax as Bh,oX as Ch,o7 as Dh,aX as Eh,l8 as Fh,o8 as Gh,iU as Hh,JB as Ih,c0 as Jh,dB as Kh,CS as Lh,MS as Mh,DS as Nh,PS as Oh,IS as Ph,m3 as Qh};