@shumai-one/shumai 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-93jcw0pn.js → chunk-08dr94gp.js} +1 -1
- package/bin/{chunk-a1mtpcrd.js → chunk-08mxv0sm.js} +2 -2
- package/bin/{chunk-jjgwrvdb.js → chunk-0t4z17qr.js} +1 -1
- package/bin/{chunk-cmcsxkh1.js → chunk-1d22tysv.js} +2 -2
- package/bin/{chunk-9zy0a8kt.js → chunk-1dawjfk8.js} +2 -2
- package/bin/{chunk-q11m2cp3.js → chunk-1nh6xgek.js} +1 -1
- package/bin/chunk-20y3wte3.js +2 -0
- package/bin/{chunk-4tt3jvm1.js → chunk-2ynx0den.js} +1 -1
- package/bin/{chunk-yaydmgcg.js → chunk-31a3k77j.js} +1 -1
- package/bin/{chunk-8rkp0fc5.js → chunk-31mjcykb.js} +2 -2
- package/bin/{chunk-1yqar2gz.js → chunk-3jdef7n4.js} +1 -1
- package/bin/{chunk-h1hj60fr.js → chunk-3rcc5s99.js} +2 -2
- package/bin/{chunk-sa4gc1f5.js → chunk-3t7mjvdv.js} +2 -2
- package/bin/{chunk-36wf2dq0.js → chunk-4ahve1nf.js} +1 -1
- package/bin/chunk-4hdnrwh1.js +1 -0
- package/bin/{chunk-652x28v2.js → chunk-4hdx2tv0.js} +1 -1
- package/bin/chunk-4htdb0xp.js +1 -0
- package/bin/chunk-4p7xpfey.js +2 -0
- package/bin/chunk-5f81c951.js +1 -0
- package/bin/{chunk-bnpw72vt.js → chunk-5vqan9c4.js} +2 -2
- package/bin/{chunk-e66j69wz.js → chunk-5zntjzxw.js} +1 -1
- package/bin/{chunk-jmh934ca.js → chunk-6a2eb3b5.js} +1 -1
- package/bin/{chunk-5x1ppya9.js → chunk-6t3gdd7e.js} +2 -2
- package/bin/chunk-7d5kep8c.js +2 -0
- package/bin/{chunk-a06432s3.js → chunk-7eycsyk6.js} +1 -1
- package/bin/{chunk-0p333kh7.js → chunk-7jjc175m.js} +3 -3
- package/bin/chunk-7kzqkp5z.js +1 -0
- package/bin/chunk-7sh6409h.js +1 -0
- package/bin/{chunk-zct68gc7.js → chunk-7y8dng8t.js} +2 -2
- package/bin/chunk-8e5zvy88.js +307 -0
- package/bin/{chunk-nmzvxgd6.js → chunk-8m6zg15c.js} +2 -2
- package/bin/{chunk-wv8xk7n7.js → chunk-8qyke29r.js} +1 -1
- package/bin/{chunk-jxxq76at.js → chunk-90et6bwm.js} +1 -1
- package/bin/chunk-9c7fxjej.js +2 -0
- package/bin/{chunk-449feg7g.js → chunk-9p2d0mk1.js} +1 -1
- package/bin/{chunk-c003q4v6.js → chunk-a10tf0d8.js} +1 -1
- package/bin/{chunk-9h3c60vw.js → chunk-a76c5r3c.js} +2 -2
- package/bin/{chunk-3g54qkv5.js → chunk-amsb41z5.js} +1 -1
- package/bin/{chunk-28egv700.js → chunk-arpna31w.js} +1 -1
- package/bin/{chunk-k0s6gfg6.js → chunk-b10meywb.js} +1 -1
- package/bin/chunk-b1e3tec3.js +62 -0
- package/bin/chunk-bdjhb77e.js +2 -0
- package/bin/chunk-beay9amy.js +1 -0
- package/bin/{chunk-cspp4n1d.js → chunk-c3fvs0bv.js} +2 -2
- package/bin/{chunk-ab45988z.js → chunk-c5my1b3k.js} +1 -1
- package/bin/{chunk-jh6pw37a.js → chunk-d3s00sn0.js} +1 -1
- package/bin/{chunk-9bvwwj5y.js → chunk-dhekxndw.js} +1 -1
- package/bin/{chunk-pzehf31g.js → chunk-dwaj1yn4.js} +1 -1
- package/bin/{chunk-rybbss5f.js → chunk-dwswqq3g.js} +1 -1
- package/bin/{chunk-5jhrqbk2.js → chunk-ejfmxjw6.js} +2 -2
- package/bin/{chunk-mzre12bp.js → chunk-er1rb6yj.js} +1 -1
- package/bin/chunk-etces6ff.js +2 -0
- package/bin/{chunk-r8vrfefa.js → chunk-etqpzc9e.js} +1 -1
- package/bin/{chunk-pna93n17.js → chunk-f8cn9m28.js} +1 -1
- package/bin/{chunk-fvf7j1qj.js → chunk-fdpjw17x.js} +1 -1
- package/bin/{chunk-agd2jevj.js → chunk-g2dk56e7.js} +1 -1
- package/bin/{chunk-fr3dg9aj.js → chunk-gn8snrnk.js} +1 -1
- package/bin/chunk-gqh4ttjh.js +3 -0
- package/bin/{chunk-szs8dy1s.js → chunk-gvn079hy.js} +2 -2
- package/bin/{chunk-qwxt1cha.js → chunk-h2wsm7h3.js} +2 -2
- package/bin/{chunk-cwebycwv.js → chunk-hfp4hpca.js} +2 -2
- package/bin/{chunk-yvgs4kmv.js → chunk-hrzm70wg.js} +1 -1
- package/bin/{chunk-fwcm78s9.js → chunk-hz31j0hk.js} +2 -2
- package/bin/{chunk-d3cqp0tb.js → chunk-j0p1peav.js} +2 -2
- package/bin/{chunk-aa2tkqg0.js → chunk-jm6bxtzt.js} +1 -1
- package/bin/{chunk-y132jbf0.js → chunk-jstc7pka.js} +1 -1
- package/bin/{chunk-8g1s0pq1.js → chunk-k0a35mg9.js} +1 -1
- package/bin/{chunk-e0kw3bst.js → chunk-k20bhxed.js} +1 -1
- package/bin/{chunk-he4h8e9e.js → chunk-k9w6mk9d.js} +2 -2
- package/bin/chunk-kgb16ggd.css +1 -0
- package/bin/{chunk-qjf561n2.js → chunk-m4py21f3.js} +1 -1
- package/bin/{chunk-jtwvd0te.js → chunk-mahxw48e.js} +2 -2
- package/bin/{chunk-f4x2dxe5.js → chunk-mcxsk75h.js} +3 -3
- package/bin/chunk-mm1j72a8.js +7 -0
- package/bin/{chunk-zy2sqtt9.js → chunk-na2nympm.js} +1 -1
- package/bin/chunk-nr89225z.js +2 -0
- package/bin/chunk-nrf5r23d.js +1 -0
- package/bin/{chunk-ddag2ezv.js → chunk-nt9tfjx6.js} +2 -2
- package/bin/chunk-nzy3pjjm.js +15 -0
- package/bin/{chunk-pvx55h1v.js → chunk-p396vw9h.js} +1 -1
- package/bin/{chunk-wwsvnz4v.js → chunk-p9xfyqh1.js} +2 -2
- package/bin/{chunk-phc9efjf.js → chunk-ph3e1bpp.js} +2 -2
- package/bin/{chunk-w3m9g3e9.js → chunk-pj0fgb2x.js} +1 -1
- package/bin/{chunk-9fefn2st.js → chunk-pp072ksj.js} +1 -1
- package/bin/{chunk-qt9efp9y.js → chunk-q5cdjzbv.js} +1 -1
- package/bin/{chunk-nd6psyzq.js → chunk-qc6dmzn0.js} +2 -2
- package/bin/{chunk-fytbcgak.js → chunk-qmtvy2j4.js} +2 -2
- package/bin/chunk-qn96vbke.js +2 -0
- package/bin/{chunk-bf5a4yc8.js → chunk-qvgc9e08.js} +1 -1
- package/bin/{chunk-mw0rc5m7.js → chunk-rrxjvewm.js} +1 -1
- package/bin/{chunk-nxhzchen.js → chunk-s05f0v9t.js} +1 -1
- package/bin/chunk-s5rfya1p.js +1 -0
- package/bin/{chunk-gc7b9j22.js → chunk-s7qpj715.js} +1 -1
- package/bin/chunk-scsy69bp.js +1 -0
- package/bin/{chunk-vjxgv3r6.js → chunk-sf6fwvrs.js} +1 -1
- package/bin/{chunk-h3y7szbm.js → chunk-ss45w8ks.js} +2 -2
- package/bin/{chunk-4gbs9swm.js → chunk-t2txvzkp.js} +1 -1
- package/bin/{chunk-e56nza63.js → chunk-td54rdfj.js} +1 -1
- package/bin/{chunk-6wa075zh.js → chunk-tsncwscz.js} +1 -1
- package/bin/{chunk-evzxjqr3.js → chunk-v2kfr8fx.js} +2 -2
- package/bin/chunk-vb9m47z9.js +1 -0
- package/bin/{chunk-t0detvbj.js → chunk-ve7v8wtv.js} +2 -2
- package/bin/{chunk-cm25nm9t.js → chunk-vf066xwh.js} +1 -1
- package/bin/{chunk-d5fapvnp.js → chunk-vgb8bzcg.js} +2 -2
- package/bin/{chunk-wcfpdfgy.js → chunk-vnfmh5ke.js} +2 -2
- package/bin/{chunk-hdqvbds8.js → chunk-vy24ncn2.js} +1 -1
- package/bin/{chunk-2xmsa8wv.js → chunk-w3a50kz8.js} +1 -1
- package/bin/{chunk-bjfwz2m7.js → chunk-w9w5301f.js} +2 -2
- package/bin/{chunk-1zpw2mbj.js → chunk-wap08p4j.js} +2 -2
- package/bin/{chunk-hktggc90.js → chunk-wny0qagx.js} +1 -1
- package/bin/{chunk-dk45f6mp.js → chunk-wqhk76de.js} +2 -2
- package/bin/{chunk-en4m76fw.js → chunk-wr5byz6r.js} +1 -1
- package/bin/{chunk-ky3dx324.js → chunk-wrz9e73c.js} +2 -2
- package/bin/{chunk-6f1twjf6.js → chunk-ws07a9kv.js} +1 -1
- package/bin/{chunk-9q32g9jd.js → chunk-x5dcgk62.js} +1 -1
- package/bin/{chunk-sprpjp4t.js → chunk-xawwxdq9.js} +2 -2
- package/bin/chunk-xwmsxg5x.js +1 -0
- package/bin/{chunk-736tcjve.js → chunk-y2nw8rbx.js} +2 -2
- package/bin/{chunk-48ebezek.js → chunk-y9ttm07y.js} +1 -1
- package/bin/chunk-yahb7wan.js +2 -0
- package/bin/{chunk-swa43tzr.js → chunk-z0ej44ak.js} +3 -3
- package/bin/chunk-zemgtnk0.js +1 -0
- package/bin/{chunk-a6dvjjce.js → chunk-zg0vm233.js} +1 -1
- package/bin/chunk-zhd2mkbr.js +1 -0
- package/bin/{chunk-cfamv4b2.js → chunk-zs9b0f3z.js} +2 -2
- package/bin/{chunk-8sr8ff6a.js → chunk-zxpef55w.js} +3 -3
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +254 -224
- package/package.json +7 -7
- package/prisma/migrations/20260729073910_change_agent_session_asset_on_delete_to_set_null/migration.sql +5 -0
- package/prisma/migrations/20260729114346_asset_size_byte_bigint/migration.sql +2 -0
- package/prisma/migrations/20260729114659_ai_usage_tokens_bigint/migration.sql +5 -0
- package/prisma/schema.prisma +6 -6
- package/bin/chunk-1wz0dge4.js +0 -3
- package/bin/chunk-2m2saan7.js +0 -2
- package/bin/chunk-2p0rg6xs.js +0 -1
- package/bin/chunk-3ge0s4k2.js +0 -1
- package/bin/chunk-6ks4277t.js +0 -2
- package/bin/chunk-80d6p55n.js +0 -1
- package/bin/chunk-8a9k4qj6.js +0 -2
- package/bin/chunk-8gkm2ysh.js +0 -1
- package/bin/chunk-8nvybmyv.js +0 -2
- package/bin/chunk-9jd3d3f3.js +0 -320
- package/bin/chunk-9nwjhams.js +0 -1
- package/bin/chunk-a2njf6av.js +0 -1
- package/bin/chunk-af3nys0r.js +0 -1
- package/bin/chunk-cx1ebj9k.js +0 -1
- package/bin/chunk-d1p9qz3y.js +0 -7
- package/bin/chunk-ea0fh29m.js +0 -2
- package/bin/chunk-epsctccj.js +0 -1
- package/bin/chunk-jyr3g5m4.js +0 -1
- package/bin/chunk-n0cn0xfg.js +0 -1
- package/bin/chunk-q0dhm16d.js +0 -62
- package/bin/chunk-qs5k9j8s.js +0 -1
- package/bin/chunk-t0fq8b99.js +0 -2
- package/bin/chunk-tm6z4hkd.css +0 -1
- package/bin/chunk-vdn3jymh.js +0 -2
- package/bin/chunk-z5p39kpk.js +0 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{fa as R0}from"./chunk-bdjhb77e.js";import{sg as k5}from"./chunk-yahb7wan.js";import{Pg as V0}from"./chunk-wap08p4j.js";import{Mh as _0,gh as q0,hh as Y0,ih as b,ik as H5,jh as l,jk as N0,kk as L0,lk as M0,nh as U0,nk as B0,ok as F0,vj as KZ}from"./chunk-b1e3tec3.js";import{Xk as P6,Yk as K6,Zk as YZ}from"./chunk-ws07a9kv.js";var AZ=K6((f1,RZ)=>{var LZ=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,m0=/\n/g,v0=/^\s*/,p0=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u0=/^:\s*/,l0=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f0=/^[;\s]*/,i0=/^\s+|\s+$/g,r0=`
|
|
2
|
+
`,MZ="/",BZ="*",b5="",a0="comment",d0="declaration";function c0(Z,K){if(typeof Z!=="string")throw TypeError("First argument must be a string");if(!Z)return[];K=K||{};var Q=1,J=1;function X(M){var B=M.match(m0);if(B)Q+=B.length;var j=M.lastIndexOf(r0);J=~j?M.length-j:J+M.length}function H(){var M={line:Q,column:J};return function(B){return B.position=new W(M),D(),B}}function W(M){this.start=M,this.end={line:Q,column:J},this.source=K.source}W.prototype.content=Z;function G(M){var B=Error(K.source+":"+Q+":"+J+": "+M);if(B.reason=M,B.filename=K.source,B.line=Q,B.column=J,B.source=Z,K.silent);else throw B}function Y(M){var B=M.exec(Z);if(!B)return;var j=B[0];return X(j),Z=Z.slice(j.length),B}function D(){Y(v0)}function q(M){var B;M=M||[];while(B=_())if(B!==!1)M.push(B);return M}function _(){var M=H();if(MZ!=Z.charAt(0)||BZ!=Z.charAt(1))return;var B=2;while(b5!=Z.charAt(B)&&(BZ!=Z.charAt(B)||MZ!=Z.charAt(B+1)))++B;if(B+=2,b5===Z.charAt(B-1))return G("End of comment missing");var j=Z.slice(2,B-2);return J+=2,X(j),Z=Z.slice(B),J+=2,M({type:a0,comment:j})}function V(){var M=H(),B=Y(p0);if(!B)return;if(_(),!Y(u0))return G("property missing ':'");var j=Y(l0),R=M({type:d0,property:FZ(B[0].replace(LZ,b5)),value:j?FZ(j[0].replace(LZ,b5)):b5});return Y(f0),R}function $(){var M=[];q(M);var B;while(B=V())if(B!==!1)M.push(B),q(M);return M}return D(),$()}function FZ(Z){return Z?Z.replace(i0,b5):b5}RZ.exports=c0});var zZ=K6((Q6)=>{var s0=Q6&&Q6.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(Q6,"__esModule",{value:!0});Q6.default=o0;var n0=s0(AZ());function o0(Z,K){let Q=null;if(!Z||typeof Z!=="string")return Q;let J=(0,n0.default)(Z),X=typeof K==="function";return J.forEach((H)=>{if(H.type!=="declaration")return;let{property:W,value:G}=H;if(X)K(W,G,H);else if(G)Q=Q||{},Q[W]=G}),Q}});var OZ=K6((jZ)=>{Object.defineProperty(jZ,"__esModule",{value:!0});jZ.camelCase=void 0;var t0=/^--[a-zA-Z0-9_-]+$/,e0=/-([a-z])/g,ZK=/^[^-]+$/,KK=/^-(webkit|moz|ms|o|khtml)-/,QK=/^-(ms)-/,JK=function(Z){return!Z||ZK.test(Z)||t0.test(Z)},XK=function(Z,K){return K.toUpperCase()},TZ=function(Z,K){return"".concat(K,"-")},HK=function(Z,K){if(K===void 0)K={};if(JK(Z))return Z;if(Z=Z.toLowerCase(),K.reactCompat)Z=Z.replace(QK,TZ);else Z=Z.replace(KK,TZ);return Z.replace(e0,XK)};jZ.camelCase=HK});var PZ=K6((U7,wZ)=>{var WK=U7&&U7.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}},GK=WK(zZ()),qK=OZ();function D7(Z,K){var Q={};if(!Z||typeof Z!=="string")return Q;return(0,GK.default)(Z,function(J,X){if(J&&X)Q[(0,qK.camelCase)(J,K)]=X}),Q}D7.default=D7;wZ.exports=D7});var t4=K6((gH,o4)=>{var o6=Object.prototype.hasOwnProperty,n4=Object.prototype.toString,i4=Object.defineProperty,r4=Object.getOwnPropertyDescriptor,a4=function(K){if(typeof Array.isArray==="function")return Array.isArray(K);return n4.call(K)==="[object Array]"},d4=function(K){if(!K||n4.call(K)!=="[object Object]")return!1;var Q=o6.call(K,"constructor"),J=K.constructor&&K.constructor.prototype&&o6.call(K.constructor.prototype,"isPrototypeOf");if(K.constructor&&!Q&&!J)return!1;var X;for(X in K);return typeof X>"u"||o6.call(K,X)},c4=function(K,Q){if(i4&&Q.name==="__proto__")i4(K,Q.name,{enumerable:!0,configurable:!0,value:Q.newValue,writable:!0});else K[Q.name]=Q.newValue},s4=function(K,Q){if(Q==="__proto__"){if(!o6.call(K,Q))return;else if(r4)return r4(K,Q).value}return K[Q]};o4.exports=function Z(){var K,Q,J,X,H,W,G=arguments[0],Y=1,D=arguments.length,q=!1;if(typeof G==="boolean")q=G,G=arguments[1]||{},Y=2;if(G==null||typeof G!=="object"&&typeof G!=="function")G={};for(;Y<D;++Y)if(K=arguments[Y],K!=null){for(Q in K)if(J=s4(G,Q),X=s4(K,Q),G!==X){if(q&&X&&(d4(X)||(H=a4(X)))){if(H)H=!1,W=J&&a4(J)?J:[];else W=J&&d4(J)?J:{};c4(G,{name:Q,newValue:Z(q,W,X)})}else if(typeof X<"u")c4(G,{name:Q,newValue:X})}}return G}});function Q5(){}function A6(){}function GZ(Z,K){let Q=K||{};return(Z[Z.length-1]===""?[...Z,""]:Z).join((Q.padRight?" ":"")+","+(Q.padLeft===!1?"":" ")).trim()}var I0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S0={};function z6(Z,K){return((K||S0).jsx?E0:I0).test(Z)}var b0=/[ \t\n\f\r]/g;function Q7(Z){return typeof Z==="object"?Z.type==="text"?qZ(Z.value):!1:qZ(Z)}function qZ(Z){return Z.replace(b0,"")===""}class T5{constructor(Z,K,Q){if(this.normal=K,this.property=Z,Q)this.space=Q}}T5.prototype.normal={};T5.prototype.property={};T5.prototype.space=void 0;function J7(Z,K){let Q={},J={};for(let X of Z)Object.assign(Q,X.property),Object.assign(J,X.normal);return new T5(Q,J,K)}function e5(Z){return Z.toLowerCase()}class e{constructor(Z,K){this.attribute=K,this.property=Z}}e.prototype.attribute="";e.prototype.booleanish=!1;e.prototype.boolean=!1;e.prototype.commaOrSpaceSeparated=!1;e.prototype.commaSeparated=!1;e.prototype.defined=!1;e.prototype.mustUseProperty=!1;e.prototype.number=!1;e.prototype.overloadedBoolean=!1;e.prototype.property="";e.prototype.spaceSeparated=!1;e.prototype.space=void 0;var Z6={};YZ(Z6,{spaceSeparated:()=>x,overloadedBoolean:()=>T6,number:()=>A,commaSeparated:()=>A5,commaOrSpaceSeparated:()=>X5,booleanish:()=>a,boolean:()=>P});var g0=0,P=S5(),a=S5(),T6=S5(),A=S5(),x=S5(),A5=S5(),X5=S5();function S5(){return 2**++g0}var X7=Object.keys(Z6);class p5 extends e{constructor(Z,K,Q,J){let X=-1;super(Z,K);if($Z(this,"space",J),typeof Q==="number")while(++X<X7.length){let H=X7[X];$Z(this,X7[X],(Q&Z6[H])===Z6[H])}}}p5.prototype.defined=!0;function $Z(Z,K,Q){if(Q)Z[K]=Q}function Y5(Z){let K={},Q={};for(let[J,X]of Object.entries(Z.properties)){let H=new p5(J,Z.transform(Z.attributes||{},J),X,Z.space);if(Z.mustUseProperty&&Z.mustUseProperty.includes(J))H.mustUseProperty=!0;K[J]=H,Q[e5(J)]=J,Q[e5(H.attribute)]=J}return new T5(K,Q,Z.space)}var H7=Y5({properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:x,ariaCurrent:null,ariaDescribedBy:x,ariaDetails:null,ariaDisabled:a,ariaDropEffect:x,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:x,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:x,ariaLevel:A,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:x,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:x,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:a,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(Z,K){return K==="role"?K:"aria-"+K.slice(4).toLowerCase()}});function j6(Z,K){return K in Z?Z[K]:K}function C6(Z,K){return j6(Z,K.toLowerCase())}var DZ=Y5({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:A5,acceptCharset:x,accessKey:x,action:null,allow:null,allowFullScreen:P,allowPaymentRequest:P,allowUserMedia:P,alpha:P,alt:null,as:null,async:P,autoCapitalize:null,autoComplete:x,autoFocus:P,autoPlay:P,blocking:x,capture:null,charSet:null,checked:P,cite:null,className:x,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:a,controls:P,controlsList:x,coords:A|A5,crossOrigin:null,data:null,dateTime:null,decoding:null,default:P,defer:P,dir:null,dirName:null,disabled:P,download:T6,draggable:a,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:P,formTarget:null,headers:x,height:A,hidden:T6,high:A,href:null,hrefLang:null,htmlFor:x,httpEquiv:x,id:null,imageSizes:null,imageSrcSet:null,inert:P,inputMode:null,integrity:null,is:null,isMap:P,itemId:null,itemProp:x,itemRef:x,itemScope:P,itemType:x,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:P,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:P,muted:P,name:null,nonce:null,noModule:P,noValidate:P,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:P,optimum:A,pattern:null,ping:x,placeholder:null,playsInline:P,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:P,referrerPolicy:null,rel:x,required:P,reversed:P,rows:A,rowSpan:A,sandbox:x,scope:null,scoped:P,seamless:P,selected:P,shadowRootClonable:P,shadowRootCustomElementRegistry:P,shadowRootDelegatesFocus:P,shadowRootMode:null,shadowRootSerializable:P,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:a,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:P,useMap:null,value:a,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:x,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:P,declare:P,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:P,noHref:P,noShade:P,noWrap:P,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:a,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:P,disablePictureInPicture:P,disableRemotePlayback:P,exportParts:A5,part:x,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:C6});var UZ=Y5({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:X5,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:x,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:P,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:A5,g2:A5,glyphName:A5,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:X5,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:x,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X5,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X5,rev:X5,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X5,requiredFeatures:X5,requiredFonts:X5,requiredFormats:X5,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:X5,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X5,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X5,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:j6});var W7=Y5({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(Z,K){return"xlink:"+K.slice(5).toLowerCase()}});var G7=Y5({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:C6});var q7=Y5({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(Z,K){return"xml:"+K.slice(3).toLowerCase()}});var Y7={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var y0=/[A-Z]/g,_Z=/-[a-z]/g,h0=/^data[-\w.:]+$/i;function $7(Z,K){let Q=e5(K),J=K,X=e;if(Q in Z.normal)return Z.property[Z.normal[Q]];if(Q.length>4&&Q.slice(0,4)==="data"&&h0.test(K)){if(K.charAt(4)==="-"){let H=K.slice(5).replace(_Z,k0);J="data"+H.charAt(0).toUpperCase()+H.slice(1)}else{let H=K.slice(4);if(!_Z.test(H)){let W=H.replace(y0,x0);if(W.charAt(0)!=="-")W="-"+W;K="data"+W}}X=p5}return new X(J,K)}function x0(Z){return"-"+Z.toLowerCase()}function k0(Z){return Z.charAt(1).toUpperCase()}var VZ=J7([H7,DZ,W7,G7,q7],"html"),O6=J7([H7,UZ,W7,G7,q7],"svg");function NZ(Z){return Z.join(" ").trim()}var bZ=P6(PZ(),1);var w6=IZ("end"),u5=IZ("start");function IZ(Z){return K;function K(Q){let J=Q&&Q.position&&Q.position[Z]||{};if(typeof J.line==="number"&&J.line>0&&typeof J.column==="number"&&J.column>0)return{line:J.line,column:J.column,offset:typeof J.offset==="number"&&J.offset>-1?J.offset:void 0}}}function _7(Z){let K=u5(Z),Q=w6(Z);if(K&&Q)return{start:K,end:Q}}function j5(Z){if(!Z||typeof Z!=="object")return"";if("position"in Z||"type"in Z)return EZ(Z.position);if("start"in Z||"end"in Z)return EZ(Z);if("line"in Z||"column"in Z)return V7(Z);return""}function V7(Z){return SZ(Z&&Z.line)+":"+SZ(Z&&Z.column)}function EZ(Z){return V7(Z&&Z.start)+"-"+V7(Z&&Z.end)}function SZ(Z){return Z&&typeof Z==="number"?Z:1}class s extends Error{constructor(Z,K,Q){super();if(typeof K==="string")Q=K,K=void 0;let J="",X={},H=!1;if(K)if("line"in K&&"column"in K)X={place:K};else if("start"in K&&"end"in K)X={place:K};else if("type"in K)X={ancestors:[K],place:K.position};else X={...K};if(typeof Z==="string")J=Z;else if(!X.cause&&Z)H=!0,J=Z.message,X.cause=Z;if(!X.ruleId&&!X.source&&typeof Q==="string"){let G=Q.indexOf(":");if(G===-1)X.ruleId=Q;else X.source=Q.slice(0,G),X.ruleId=Q.slice(G+1)}if(!X.place&&X.ancestors&&X.ancestors){let G=X.ancestors[X.ancestors.length-1];if(G)X.place=G.position}let W=X.place&&"start"in X.place?X.place.start:X.place;this.ancestors=X.ancestors||void 0,this.cause=X.cause||void 0,this.column=W?W.column:void 0,this.fatal=void 0,this.file="",this.message=J,this.line=W?W.line:void 0,this.name=j5(X.place)||"1:1",this.place=X.place||void 0,this.reason=this.message,this.ruleId=X.ruleId||void 0,this.source=X.source||void 0,this.stack=H&&X.cause&&typeof X.cause.stack==="string"?X.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}s.prototype.file="";s.prototype.name="";s.prototype.reason="";s.prototype.message="";s.prototype.stack="";s.prototype.column=void 0;s.prototype.line=void 0;s.prototype.ancestors=void 0;s.prototype.cause=void 0;s.prototype.fatal=void 0;s.prototype.place=void 0;s.prototype.ruleId=void 0;s.prototype.source=void 0;var N7={}.hasOwnProperty,YK=new Map,$K=/[A-Z]/g,DK=new Set(["table","tbody","thead","tfoot","tr"]),UK=new Set(["td","th"]),gZ="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function L7(Z,K){if(!K||K.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let Q=K.filePath||void 0,J;if(K.development){if(typeof K.jsxDEV!=="function")throw TypeError("Expected `jsxDEV` in options when `development: true`");J=RK(Q,K.jsxDEV)}else{if(typeof K.jsx!=="function")throw TypeError("Expected `jsx` in production options");if(typeof K.jsxs!=="function")throw TypeError("Expected `jsxs` in production options");J=FK(Q,K.jsx,K.jsxs)}let X={Fragment:K.Fragment,ancestors:[],components:K.components||{},create:J,elementAttributeNameCase:K.elementAttributeNameCase||"react",evaluater:K.createEvaluater?K.createEvaluater():void 0,filePath:Q,ignoreInvalidStyle:K.ignoreInvalidStyle||!1,passKeys:K.passKeys!==!1,passNode:K.passNode||!1,schema:K.space==="svg"?O6:VZ,stylePropertyNameCase:K.stylePropertyNameCase||"dom",tableCellAlignToStyle:K.tableCellAlignToStyle!==!1},H=yZ(X,Z,void 0);if(H&&typeof H!=="string")return H;return X.create(Z,X.Fragment,{children:H||void 0},void 0)}function yZ(Z,K,Q){if(K.type==="element")return _K(Z,K,Q);if(K.type==="mdxFlowExpression"||K.type==="mdxTextExpression")return VK(Z,K);if(K.type==="mdxJsxFlowElement"||K.type==="mdxJsxTextElement")return LK(Z,K,Q);if(K.type==="mdxjsEsm")return NK(Z,K);if(K.type==="root")return MK(Z,K,Q);if(K.type==="text")return BK(Z,K)}function _K(Z,K,Q){let J=Z.schema,X=J;if(K.tagName.toLowerCase()==="svg"&&J.space==="html")X=O6,Z.schema=X;Z.ancestors.push(K);let H=xZ(Z,K.tagName,!1),W=AK(Z,K),G=B7(Z,K);if(DK.has(K.tagName))G=G.filter(function(Y){return typeof Y==="string"?!Q7(Y):!0});return hZ(Z,W,H,K),M7(W,G),Z.ancestors.pop(),Z.schema=J,Z.create(K,H,W,Q)}function VK(Z,K){if(K.data&&K.data.estree&&Z.evaluater){let J=K.data.estree.body[0];return Q5(J.type==="ExpressionStatement"),Z.evaluater.evaluateExpression(J.expression)}J6(Z,K.position)}function NK(Z,K){if(K.data&&K.data.estree&&Z.evaluater)return Z.evaluater.evaluateProgram(K.data.estree);J6(Z,K.position)}function LK(Z,K,Q){let J=Z.schema,X=J;if(K.name==="svg"&&J.space==="html")X=O6,Z.schema=X;Z.ancestors.push(K);let H=K.name===null?Z.Fragment:xZ(Z,K.name,!0),W=zK(Z,K),G=B7(Z,K);return hZ(Z,W,H,K),M7(W,G),Z.ancestors.pop(),Z.schema=J,Z.create(K,H,W,Q)}function MK(Z,K,Q){let J={};return M7(J,B7(Z,K)),Z.create(K,Z.Fragment,J,Q)}function BK(Z,K){return K.value}function hZ(Z,K,Q,J){if(typeof Q!=="string"&&Q!==Z.Fragment&&Z.passNode)K.node=J}function M7(Z,K){if(K.length>0){let Q=K.length>1?K:K[0];if(Q)Z.children=Q}}function FK(Z,K,Q){return J;function J(X,H,W,G){let D=Array.isArray(W.children)?Q:K;return G?D(H,W,G):D(H,W)}}function RK(Z,K){return Q;function Q(J,X,H,W){let G=Array.isArray(H.children),Y=u5(J);return K(X,H,W,G,{columnNumber:Y?Y.column-1:void 0,fileName:Z,lineNumber:Y?Y.line:void 0},void 0)}}function AK(Z,K){let Q={},J,X;for(X in K.properties)if(X!=="children"&&N7.call(K.properties,X)){let H=TK(Z,X,K.properties[X]);if(H){let[W,G]=H;if(Z.tableCellAlignToStyle&&W==="align"&&typeof G==="string"&&UK.has(K.tagName))J=G;else Q[W]=G}}if(J){let H=Q.style||(Q.style={});H[Z.stylePropertyNameCase==="css"?"text-align":"textAlign"]=J}return Q}function zK(Z,K){let Q={};for(let J of K.attributes)if(J.type==="mdxJsxExpressionAttribute")if(J.data&&J.data.estree&&Z.evaluater){let H=J.data.estree.body[0];Q5(H.type==="ExpressionStatement");let W=H.expression;Q5(W.type==="ObjectExpression");let G=W.properties[0];Q5(G.type==="SpreadElement"),Object.assign(Q,Z.evaluater.evaluateExpression(G.argument))}else J6(Z,K.position);else{let X=J.name,H;if(J.value&&typeof J.value==="object")if(J.value.data&&J.value.data.estree&&Z.evaluater){let G=J.value.data.estree.body[0];Q5(G.type==="ExpressionStatement"),H=Z.evaluater.evaluateExpression(G.expression)}else J6(Z,K.position);else H=J.value===null?!0:J.value;Q[X]=H}return Q}function B7(Z,K){let Q=[],J=-1,X=Z.passKeys?new Map:YK;while(++J<K.children.length){let H=K.children[J],W;if(Z.passKeys){let Y=H.type==="element"?H.tagName:H.type==="mdxJsxFlowElement"||H.type==="mdxJsxTextElement"?H.name:void 0;if(Y){let D=X.get(Y)||0;W=Y+"-"+D,X.set(Y,D+1)}}let G=yZ(Z,H,W);if(G!==void 0)Q.push(G)}return Q}function TK(Z,K,Q){let J=$7(Z.schema,K);if(Q===null||Q===void 0||typeof Q==="number"&&Number.isNaN(Q))return;if(Array.isArray(Q))Q=J.commaSeparated?GZ(Q):NZ(Q);if(J.property==="style"){let X=typeof Q==="object"?Q:jK(Z,String(Q));if(Z.stylePropertyNameCase==="css")X=CK(X);return["style",X]}return[Z.elementAttributeNameCase==="react"&&J.space?Y7[J.property]||J.property:J.attribute,Q]}function jK(Z,K){try{return bZ.default(K,{reactCompat:!0})}catch(Q){if(Z.ignoreInvalidStyle)return{};let J=Q,X=new s("Cannot parse `style` attribute",{ancestors:Z.ancestors,cause:J,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw X.file=Z.filePath||void 0,X.url=gZ+"#cannot-parse-style-attribute",X}}function xZ(Z,K,Q){let J;if(!Q)J={type:"Literal",value:K};else if(K.includes(".")){let X=K.split("."),H=-1,W;while(++H<X.length){let G=z6(X[H])?{type:"Identifier",name:X[H]}:{type:"Literal",value:X[H]};W=W?{type:"MemberExpression",object:W,property:G,computed:Boolean(H&&G.type==="Literal"),optional:!1}:G}Q5(W,"always a result"),J=W}else J=z6(K)&&!/^[a-z]/.test(K)?{type:"Identifier",name:K}:{type:"Literal",value:K};if(J.type==="Literal"){let X=J.value;return N7.call(Z.components,X)?Z.components[X]:X}if(Z.evaluater)return Z.evaluater.evaluateExpression(J);J6(Z)}function J6(Z,K){let Q=new s("Cannot handle MDX estrees without `createEvaluater`",{ancestors:Z.ancestors,place:K,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw Q.file=Z.filePath||void 0,Q.url=gZ+"#cannot-handle-mdx-estrees-without-createevaluater",Q}function CK(Z){let K={},Q;for(Q in Z)if(N7.call(Z,Q))K[OK(Q)]=Z[Q];return K}function OK(Z){let K=Z.replace($K,wK);if(K.slice(0,3)==="ms-")K="-"+K;return K}function wK(Z){return"-"+Z.toLowerCase()}var X6={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var $0=P6(q0(),1);var PK={};function F7(Z,K){let Q=K||PK,J=typeof Q.includeImageAlt==="boolean"?Q.includeImageAlt:!0,X=typeof Q.includeHtml==="boolean"?Q.includeHtml:!0;return mZ(Z,J,X)}function mZ(Z,K,Q){if(IK(Z)){if("value"in Z)return Z.type==="html"&&!Q?"":Z.value;if(K&&"alt"in Z&&Z.alt)return Z.alt;if("children"in Z)return kZ(Z.children,K,Q)}if(Array.isArray(Z))return kZ(Z,K,Q);return""}function kZ(Z,K,Q){let J=[],X=-1;while(++X<Z.length)J[X]=mZ(Z[X],K,Q);return J.join("")}function IK(Z){return Boolean(Z&&typeof Z==="object")}var vZ=document.createElement("i");function l5(Z){let K="&"+Z+";";vZ.innerHTML=K;let Q=vZ.textContent;if(Q.charCodeAt(Q.length-1)===59&&Z!=="semi")return!1;return Q===K?!1:Q}function Z5(Z,K,Q,J){let X=Z.length,H=0,W;if(K<0)K=-K>X?0:X+K;else K=K>X?X:K;if(Q=Q>0?Q:0,J.length<1e4)W=Array.from(J),W.unshift(K,Q),Z.splice(...W);else{if(Q)Z.splice(K,Q);while(H<J.length)W=J.slice(H,H+1e4),W.unshift(K,0),Z.splice(...W),H+=1e4,K+=1e4}}function J5(Z,K){if(Z.length>0)return Z5(Z,Z.length,0,K),Z;return K}var pZ={}.hasOwnProperty;function uZ(Z){let K={},Q=-1;while(++Q<Z.length)EK(K,Z[Q]);return K}function EK(Z,K){let Q;for(Q in K){let X=(pZ.call(Z,Q)?Z[Q]:void 0)||(Z[Q]={}),H=K[Q],W;if(H)for(W in H){if(!pZ.call(X,W))X[W]=[];let G=H[W];SK(X[W],Array.isArray(G)?G:G?[G]:[])}}}function SK(Z,K){let Q=-1,J=[];while(++Q<K.length)(K[Q].add==="after"?Z:J).push(K[Q]);Z5(Z,0,0,J)}function I6(Z,K){let Q=Number.parseInt(Z,K);if(Q<9||Q===11||Q>13&&Q<32||Q>126&&Q<160||Q>55295&&Q<57344||Q>64975&&Q<65008||(Q&65535)===65535||(Q&65535)===65534||Q>1114111)return"�";return String.fromCodePoint(Q)}function z5(Z){return Z.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var G5=C5(/[A-Za-z]/),o=C5(/[\dA-Za-z]/),lZ=C5(/[#-'*+\--9=?A-Z^-~]/);function H6(Z){return Z!==null&&(Z<32||Z===127)}var W6=C5(/\d/),fZ=C5(/[\dA-Fa-f]/),iZ=C5(/[!-/:-@[-`{-~]/);function T(Z){return Z!==null&&Z<-2}function d(Z){return Z!==null&&(Z<0||Z===32)}function I(Z){return Z===-2||Z===-1||Z===32}var rZ=C5(/\p{P}|\p{S}/u),aZ=C5(/\s/);function C5(Z){return K;function K(Q){return Q!==null&&Q>-1&&Z.test(String.fromCharCode(Q))}}function $5(Z){let K=[],Q=-1,J=0,X=0;while(++Q<Z.length){let H=Z.charCodeAt(Q),W="";if(H===37&&o(Z.charCodeAt(Q+1))&&o(Z.charCodeAt(Q+2)))X=2;else if(H<128){if(!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(H)))W=String.fromCharCode(H)}else if(H>55295&&H<57344){let G=Z.charCodeAt(Q+1);if(H<56320&&G>56319&&G<57344)W=String.fromCharCode(H,G),X=1;else W="�"}else W=String.fromCharCode(H);if(W)K.push(Z.slice(J,Q),encodeURIComponent(W)),J=Q+X+1,W="";if(X)Q+=X,X=0}return K.join("")+Z.slice(J)}function S(Z,K,Q,J){let X=J?J-1:Number.POSITIVE_INFINITY,H=0;return W;function W(Y){if(I(Y))return Z.enter(Q),G(Y);return K(Y)}function G(Y){if(I(Y)&&H++<X)return Z.consume(Y),G;return Z.exit(Q),K(Y)}}var dZ={tokenize:bK};function bK(Z){let K=Z.attempt(this.parser.constructs.contentInitial,J,X),Q;return K;function J(G){if(G===null){Z.consume(G);return}return Z.enter("lineEnding"),Z.consume(G),Z.exit("lineEnding"),S(Z,K,"linePrefix")}function X(G){return Z.enter("paragraph"),H(G)}function H(G){let Y=Z.enter("chunkText",{contentType:"text",previous:Q});if(Q)Q.next=Y;return Q=Y,W(G)}function W(G){if(G===null){Z.exit("chunkText"),Z.exit("paragraph"),Z.consume(G);return}if(T(G))return Z.consume(G),Z.exit("chunkText"),H;return Z.consume(G),W}}var sZ={tokenize:gK},cZ={tokenize:yK};function gK(Z){let K=this,Q=[],J=0,X,H,W;return G;function G(C){if(J<Q.length){let v=Q[J];return K.containerState=v[1],Z.attempt(v[0].continuation,Y,D)(C)}return D(C)}function Y(C){if(J++,K.containerState._closeFlow){if(K.containerState._closeFlow=void 0,X)w();let v=K.events.length,k=v,F;while(k--)if(K.events[k][0]==="exit"&&K.events[k][1].type==="chunkFlow"){F=K.events[k][1].end;break}R(J);let f=v;while(f<K.events.length)K.events[f][1].end={...F},f++;return Z5(K.events,k+1,0,K.events.slice(v)),K.events.length=f,D(C)}return G(C)}function D(C){if(J===Q.length){if(!X)return V(C);if(X.currentConstruct&&X.currentConstruct.concrete)return M(C);K.interrupt=Boolean(X.currentConstruct&&!X._gfmTableDynamicInterruptHack)}return K.containerState={},Z.check(cZ,q,_)(C)}function q(C){if(X)w();return R(J),V(C)}function _(C){return K.parser.lazy[K.now().line]=J!==Q.length,W=K.now().offset,M(C)}function V(C){return K.containerState={},Z.attempt(cZ,$,M)(C)}function $(C){return J++,Q.push([K.currentConstruct,K.containerState]),V(C)}function M(C){if(C===null){if(X)w();R(0),Z.consume(C);return}return X=X||K.parser.flow(K.now()),Z.enter("chunkFlow",{_tokenizer:X,contentType:"flow",previous:H}),B(C)}function B(C){if(C===null){j(Z.exit("chunkFlow"),!0),R(0),Z.consume(C);return}if(T(C))return Z.consume(C),j(Z.exit("chunkFlow")),J=0,K.interrupt=void 0,G;return Z.consume(C),B}function j(C,v){let k=K.sliceStream(C);if(v)k.push(null);if(C.previous=H,H)H.next=C;if(H=C,X.defineSkip(C.start),X.write(k),K.parser.lazy[C.start.line]){let F=X.events.length;while(F--)if(X.events[F][1].start.offset<W&&(!X.events[F][1].end||X.events[F][1].end.offset>W))return;let f=K.events.length,c=f,m,i;while(c--)if(K.events[c][0]==="exit"&&K.events[c][1].type==="chunkFlow"){if(m){i=K.events[c][1].end;break}m=!0}R(J),F=f;while(F<K.events.length)K.events[F][1].end={...i},F++;Z5(K.events,c+1,0,K.events.slice(f)),K.events.length=F}}function R(C){let v=Q.length;while(v-- >C){let k=Q[v];K.containerState=k[1],k[0].exit.call(K,Z)}Q.length=C}function w(){X.write([null]),H=void 0,X=void 0,K.containerState._closeFlow=void 0}}function yK(Z,K,Q){return S(Z,Z.attempt(this.parser.constructs.document,K,Q),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function R7(Z){if(Z===null||d(Z)||aZ(Z))return 1;if(rZ(Z))return 2}function f5(Z,K,Q){let J=[],X=-1;while(++X<Z.length){let H=Z[X].resolveAll;if(H&&!J.includes(H))K=H(K,Q),J.push(H)}return K}var G6={name:"attention",resolveAll:hK,tokenize:xK};function hK(Z,K){let Q=-1,J,X,H,W,G,Y,D,q;while(++Q<Z.length)if(Z[Q][0]==="enter"&&Z[Q][1].type==="attentionSequence"&&Z[Q][1]._close){J=Q;while(J--)if(Z[J][0]==="exit"&&Z[J][1].type==="attentionSequence"&&Z[J][1]._open&&K.sliceSerialize(Z[J][1]).charCodeAt(0)===K.sliceSerialize(Z[Q][1]).charCodeAt(0)){if((Z[J][1]._close||Z[Q][1]._open)&&(Z[Q][1].end.offset-Z[Q][1].start.offset)%3&&!((Z[J][1].end.offset-Z[J][1].start.offset+Z[Q][1].end.offset-Z[Q][1].start.offset)%3))continue;Y=Z[J][1].end.offset-Z[J][1].start.offset>1&&Z[Q][1].end.offset-Z[Q][1].start.offset>1?2:1;let _={...Z[J][1].end},V={...Z[Q][1].start};if(nZ(_,-Y),nZ(V,Y),W={type:Y>1?"strongSequence":"emphasisSequence",start:_,end:{...Z[J][1].end}},G={type:Y>1?"strongSequence":"emphasisSequence",start:{...Z[Q][1].start},end:V},H={type:Y>1?"strongText":"emphasisText",start:{...Z[J][1].end},end:{...Z[Q][1].start}},X={type:Y>1?"strong":"emphasis",start:{...W.start},end:{...G.end}},Z[J][1].end={...W.start},Z[Q][1].start={...G.end},D=[],Z[J][1].end.offset-Z[J][1].start.offset)D=J5(D,[["enter",Z[J][1],K],["exit",Z[J][1],K]]);if(D=J5(D,[["enter",X,K],["enter",W,K],["exit",W,K],["enter",H,K]]),D=J5(D,f5(K.parser.constructs.insideSpan.null,Z.slice(J+1,Q),K)),D=J5(D,[["exit",H,K],["enter",G,K],["exit",G,K],["exit",X,K]]),Z[Q][1].end.offset-Z[Q][1].start.offset)q=2,D=J5(D,[["enter",Z[Q][1],K],["exit",Z[Q][1],K]]);else q=0;Z5(Z,J-1,Q-J+3,D),Q=J+D.length-q-2;break}}Q=-1;while(++Q<Z.length)if(Z[Q][1].type==="attentionSequence")Z[Q][1].type="data";return Z}function xK(Z,K){let Q=this.parser.constructs.attentionMarkers.null,J=this.previous,X=R7(J),H;return W;function W(Y){return H=Y,Z.enter("attentionSequence"),G(Y)}function G(Y){if(Y===H)return Z.consume(Y),G;let D=Z.exit("attentionSequence"),q=R7(Y),_=!q||q===2&&X||Q.includes(Y),V=!X||X===2&&q||Q.includes(J);return D._open=Boolean(H===42?_:_&&(X||!V)),D._close=Boolean(H===42?V:V&&(q||!_)),K(Y)}}function nZ(Z,K){Z.column+=K,Z.offset+=K,Z._bufferIndex+=K}var A7={name:"autolink",tokenize:kK};function kK(Z,K,Q){let J=0;return X;function X($){return Z.enter("autolink"),Z.enter("autolinkMarker"),Z.consume($),Z.exit("autolinkMarker"),Z.enter("autolinkProtocol"),H}function H($){if(G5($))return Z.consume($),W;if($===64)return Q($);return D($)}function W($){if($===43||$===45||$===46||o($))return J=1,G($);return D($)}function G($){if($===58)return Z.consume($),J=0,Y;if(($===43||$===45||$===46||o($))&&J++<32)return Z.consume($),G;return J=0,D($)}function Y($){if($===62)return Z.exit("autolinkProtocol"),Z.enter("autolinkMarker"),Z.consume($),Z.exit("autolinkMarker"),Z.exit("autolink"),K;if($===null||$===32||$===60||H6($))return Q($);return Z.consume($),Y}function D($){if($===64)return Z.consume($),q;if(lZ($))return Z.consume($),D;return Q($)}function q($){return o($)?_($):Q($)}function _($){if($===46)return Z.consume($),J=0,q;if($===62)return Z.exit("autolinkProtocol").type="autolinkEmail",Z.enter("autolinkMarker"),Z.consume($),Z.exit("autolinkMarker"),Z.exit("autolink"),K;return V($)}function V($){if(($===45||o($))&&J++<63){let M=$===45?V:_;return Z.consume($),M}return Q($)}}var O5={partial:!0,tokenize:mK};function mK(Z,K,Q){return J;function J(H){return I(H)?S(Z,X,"linePrefix")(H):X(H)}function X(H){return H===null||T(H)?K(H):Q(H)}}var E6={continuation:{tokenize:pK},exit:uK,name:"blockQuote",tokenize:vK};function vK(Z,K,Q){let J=this;return X;function X(W){if(W===62){let G=J.containerState;if(!G.open)Z.enter("blockQuote",{_container:!0}),G.open=!0;return Z.enter("blockQuotePrefix"),Z.enter("blockQuoteMarker"),Z.consume(W),Z.exit("blockQuoteMarker"),H}return Q(W)}function H(W){if(I(W))return Z.enter("blockQuotePrefixWhitespace"),Z.consume(W),Z.exit("blockQuotePrefixWhitespace"),Z.exit("blockQuotePrefix"),K;return Z.exit("blockQuotePrefix"),K(W)}}function pK(Z,K,Q){let J=this;return X;function X(W){if(I(W))return S(Z,H,"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W);return H(W)}function H(W){return Z.attempt(E6,K,Q)(W)}}function uK(Z){Z.exit("blockQuote")}var S6={name:"characterEscape",tokenize:lK};function lK(Z,K,Q){return J;function J(H){return Z.enter("characterEscape"),Z.enter("escapeMarker"),Z.consume(H),Z.exit("escapeMarker"),X}function X(H){if(iZ(H))return Z.enter("characterEscapeValue"),Z.consume(H),Z.exit("characterEscapeValue"),Z.exit("characterEscape"),K;return Q(H)}}var b6={name:"characterReference",tokenize:fK};function fK(Z,K,Q){let J=this,X=0,H,W;return G;function G(_){return Z.enter("characterReference"),Z.enter("characterReferenceMarker"),Z.consume(_),Z.exit("characterReferenceMarker"),Y}function Y(_){if(_===35)return Z.enter("characterReferenceMarkerNumeric"),Z.consume(_),Z.exit("characterReferenceMarkerNumeric"),D;return Z.enter("characterReferenceValue"),H=31,W=o,q(_)}function D(_){if(_===88||_===120)return Z.enter("characterReferenceMarkerHexadecimal"),Z.consume(_),Z.exit("characterReferenceMarkerHexadecimal"),Z.enter("characterReferenceValue"),H=6,W=fZ,q;return Z.enter("characterReferenceValue"),H=7,W=W6,q(_)}function q(_){if(_===59&&X){let V=Z.exit("characterReferenceValue");if(W===o&&!l5(J.sliceSerialize(V)))return Q(_);return Z.enter("characterReferenceMarker"),Z.consume(_),Z.exit("characterReferenceMarker"),Z.exit("characterReference"),K}if(W(_)&&X++<H)return Z.consume(_),q;return Q(_)}}var oZ={partial:!0,tokenize:rK},g6={concrete:!0,name:"codeFenced",tokenize:iK};function iK(Z,K,Q){let J=this,X={partial:!0,tokenize:k},H=0,W=0,G;return Y;function Y(F){return D(F)}function D(F){let f=J.events[J.events.length-1];return H=f&&f[1].type==="linePrefix"?f[2].sliceSerialize(f[1],!0).length:0,G=F,Z.enter("codeFenced"),Z.enter("codeFencedFence"),Z.enter("codeFencedFenceSequence"),q(F)}function q(F){if(F===G)return W++,Z.consume(F),q;if(W<3)return Q(F);return Z.exit("codeFencedFenceSequence"),I(F)?S(Z,_,"whitespace")(F):_(F)}function _(F){if(F===null||T(F))return Z.exit("codeFencedFence"),J.interrupt?K(F):Z.check(oZ,B,v)(F);return Z.enter("codeFencedFenceInfo"),Z.enter("chunkString",{contentType:"string"}),V(F)}function V(F){if(F===null||T(F))return Z.exit("chunkString"),Z.exit("codeFencedFenceInfo"),_(F);if(I(F))return Z.exit("chunkString"),Z.exit("codeFencedFenceInfo"),S(Z,$,"whitespace")(F);if(F===96&&F===G)return Q(F);return Z.consume(F),V}function $(F){if(F===null||T(F))return _(F);return Z.enter("codeFencedFenceMeta"),Z.enter("chunkString",{contentType:"string"}),M(F)}function M(F){if(F===null||T(F))return Z.exit("chunkString"),Z.exit("codeFencedFenceMeta"),_(F);if(F===96&&F===G)return Q(F);return Z.consume(F),M}function B(F){return Z.attempt(X,v,j)(F)}function j(F){return Z.enter("lineEnding"),Z.consume(F),Z.exit("lineEnding"),R}function R(F){return H>0&&I(F)?S(Z,w,"linePrefix",H+1)(F):w(F)}function w(F){if(F===null||T(F))return Z.check(oZ,B,v)(F);return Z.enter("codeFlowValue"),C(F)}function C(F){if(F===null||T(F))return Z.exit("codeFlowValue"),w(F);return Z.consume(F),C}function v(F){return Z.exit("codeFenced"),K(F)}function k(F,f,c){let m=0;return i;function i(g){return F.enter("lineEnding"),F.consume(g),F.exit("lineEnding"),q5}function q5(g){return F.enter("codeFencedFence"),I(g)?S(F,p,"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):p(g)}function p(g){if(g===G)return F.enter("codeFencedFenceSequence"),O(g);return c(g)}function O(g){if(g===G)return m++,F.consume(g),O;if(m>=W)return F.exit("codeFencedFenceSequence"),I(g)?S(F,y,"whitespace")(g):y(g);return c(g)}function y(g){if(g===null||T(g))return F.exit("codeFencedFence"),f(g);return c(g)}}}function rK(Z,K,Q){let J=this;return X;function X(W){if(W===null)return Q(W);return Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),H}function H(W){return J.parser.lazy[J.now().line]?Q(W):K(W)}}var q6={name:"codeIndented",tokenize:dK},aK={partial:!0,tokenize:cK};function dK(Z,K,Q){let J=this;return X;function X(D){return Z.enter("codeIndented"),S(Z,H,"linePrefix",5)(D)}function H(D){let q=J.events[J.events.length-1];return q&&q[1].type==="linePrefix"&&q[2].sliceSerialize(q[1],!0).length>=4?W(D):Q(D)}function W(D){if(D===null)return Y(D);if(T(D))return Z.attempt(aK,W,Y)(D);return Z.enter("codeFlowValue"),G(D)}function G(D){if(D===null||T(D))return Z.exit("codeFlowValue"),W(D);return Z.consume(D),G}function Y(D){return Z.exit("codeIndented"),K(D)}}function cK(Z,K,Q){let J=this;return X;function X(W){if(J.parser.lazy[J.now().line])return Q(W);if(T(W))return Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),X;return S(Z,H,"linePrefix",5)(W)}function H(W){let G=J.events[J.events.length-1];return G&&G[1].type==="linePrefix"&&G[2].sliceSerialize(G[1],!0).length>=4?K(W):T(W)?X(W):Q(W)}}var z7={name:"codeText",previous:nK,resolve:sK,tokenize:oK};function sK(Z){let K=Z.length-4,Q=3,J,X;if((Z[Q][1].type==="lineEnding"||Z[Q][1].type==="space")&&(Z[K][1].type==="lineEnding"||Z[K][1].type==="space")){J=Q;while(++J<K)if(Z[J][1].type==="codeTextData"){Z[Q][1].type="codeTextPadding",Z[K][1].type="codeTextPadding",Q+=2,K-=2;break}}J=Q-1,K++;while(++J<=K)if(X===void 0){if(J!==K&&Z[J][1].type!=="lineEnding")X=J}else if(J===K||Z[J][1].type==="lineEnding"){if(Z[X][1].type="codeTextData",J!==X+2)Z[X][1].end=Z[J-1][1].end,Z.splice(X+2,J-X-2),K-=J-X-2,J=X+2;X=void 0}return Z}function nK(Z){return Z!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oK(Z,K,Q){let J=this,X=0,H,W;return G;function G(V){return Z.enter("codeText"),Z.enter("codeTextSequence"),Y(V)}function Y(V){if(V===96)return Z.consume(V),X++,Y;return Z.exit("codeTextSequence"),D(V)}function D(V){if(V===null)return Q(V);if(V===32)return Z.enter("space"),Z.consume(V),Z.exit("space"),D;if(V===96)return W=Z.enter("codeTextSequence"),H=0,_(V);if(T(V))return Z.enter("lineEnding"),Z.consume(V),Z.exit("lineEnding"),D;return Z.enter("codeTextData"),q(V)}function q(V){if(V===null||V===32||V===96||T(V))return Z.exit("codeTextData"),D(V);return Z.consume(V),q}function _(V){if(V===96)return Z.consume(V),H++,_;if(H===X)return Z.exit("codeTextSequence"),Z.exit("codeText"),K(V);return W.type="codeTextData",q(V)}}class T7{constructor(Z){this.left=Z?[...Z]:[],this.right=[]}get(Z){if(Z<0||Z>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+Z+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if(Z<this.left.length)return this.left[Z];return this.right[this.right.length-Z+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(Z,K){let Q=K===null||K===void 0?Number.POSITIVE_INFINITY:K;if(Q<this.left.length)return this.left.slice(Z,Q);if(Z>this.left.length)return this.right.slice(this.right.length-Q+this.left.length,this.right.length-Z+this.left.length).reverse();return this.left.slice(Z).concat(this.right.slice(this.right.length-Q+this.left.length).reverse())}splice(Z,K,Q){let J=K||0;this.setCursor(Math.trunc(Z));let X=this.right.splice(this.right.length-J,Number.POSITIVE_INFINITY);if(Q)Y6(this.left,Q);return X.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(Z){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(Z)}pushMany(Z){this.setCursor(Number.POSITIVE_INFINITY),Y6(this.left,Z)}unshift(Z){this.setCursor(0),this.right.push(Z)}unshiftMany(Z){this.setCursor(0),Y6(this.right,Z.reverse())}setCursor(Z){if(Z===this.left.length||Z>this.left.length&&this.right.length===0||Z<0&&this.left.length===0)return;if(Z<this.left.length){let K=this.left.splice(Z,Number.POSITIVE_INFINITY);Y6(this.right,K.reverse())}else{let K=this.right.splice(this.left.length+this.right.length-Z,Number.POSITIVE_INFINITY);Y6(this.left,K.reverse())}}}function Y6(Z,K){let Q=0;if(K.length<1e4)Z.push(...K);else while(Q<K.length)Z.push(...K.slice(Q,Q+1e4)),Q+=1e4}function y6(Z){let K={},Q=-1,J,X,H,W,G,Y,D,q=new T7(Z);while(++Q<q.length){while(Q in K)Q=K[Q];if(J=q.get(Q),Q&&J[1].type==="chunkFlow"&&q.get(Q-1)[1].type==="listItemPrefix"){if(Y=J[1]._tokenizer.events,H=0,H<Y.length&&Y[H][1].type==="lineEndingBlank")H+=2;if(H<Y.length&&Y[H][1].type==="content")while(++H<Y.length){if(Y[H][1].type==="content")break;if(Y[H][1].type==="chunkText")Y[H][1]._isInFirstContentOfListItem=!0,H++}}if(J[0]==="enter"){if(J[1].contentType)Object.assign(K,tK(q,Q)),Q=K[Q],D=!0}else if(J[1]._container){H=Q,X=void 0;while(H--)if(W=q.get(H),W[1].type==="lineEnding"||W[1].type==="lineEndingBlank"){if(W[0]==="enter"){if(X)q.get(X)[1].type="lineEndingBlank";W[1].type="lineEnding",X=H}}else if(W[1].type==="linePrefix"||W[1].type==="listItemIndent");else break;if(X)J[1].end={...q.get(X)[1].start},G=q.slice(X,Q),G.unshift(J),q.splice(X,Q-X+1,G)}}return Z5(Z,0,Number.POSITIVE_INFINITY,q.slice(0)),!D}function tK(Z,K){let Q=Z.get(K)[1],J=Z.get(K)[2],X=K-1,H=[],W=Q._tokenizer;if(!W){if(W=J.parser[Q.contentType](Q.start),Q._contentTypeTextTrailing)W._contentTypeTextTrailing=!0}let G=W.events,Y=[],D={},q,_,V=-1,$=Q,M=0,B=0,j=[B];while($){while(Z.get(++X)[1]!==$);if(H.push(X),!$._tokenizer){if(q=J.sliceStream($),!$.next)q.push(null);if(_)W.defineSkip($.start);if($._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=!0;if(W.write(q),$._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=void 0}_=$,$=$.next}$=Q;while(++V<G.length)if(G[V][0]==="exit"&&G[V-1][0]==="enter"&&G[V][1].type===G[V-1][1].type&&G[V][1].start.line!==G[V][1].end.line)B=V+1,j.push(B),$._tokenizer=void 0,$.previous=void 0,$=$.next;if(W.events=[],$)$._tokenizer=void 0,$.previous=void 0;else j.pop();V=j.length;while(V--){let R=G.slice(j[V],j[V+1]),w=H.pop();Y.push([w,w+R.length-1]),Z.splice(w,2,R)}Y.reverse(),V=-1;while(++V<Y.length)D[M+Y[V][0]]=M+Y[V][1],M+=Y[V][1]-Y[V][0]-1;return D}var j7={resolve:Z2,tokenize:K2},eK={partial:!0,tokenize:Q2};function Z2(Z){return y6(Z),Z}function K2(Z,K){let Q;return J;function J(G){return Z.enter("content"),Q=Z.enter("chunkContent",{contentType:"content"}),X(G)}function X(G){if(G===null)return H(G);if(T(G))return Z.check(eK,W,H)(G);return Z.consume(G),X}function H(G){return Z.exit("chunkContent"),Z.exit("content"),K(G)}function W(G){return Z.consume(G),Z.exit("chunkContent"),Q.next=Z.enter("chunkContent",{contentType:"content",previous:Q}),Q=Q.next,X}}function Q2(Z,K,Q){let J=this;return X;function X(W){return Z.exit("chunkContent"),Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),S(Z,H,"linePrefix")}function H(W){if(W===null||T(W))return Q(W);let G=J.events[J.events.length-1];if(!J.parser.constructs.disable.null.includes("codeIndented")&&G&&G[1].type==="linePrefix"&&G[2].sliceSerialize(G[1],!0).length>=4)return K(W);return Z.interrupt(J.parser.constructs.flow,Q,K)(W)}}function h6(Z,K,Q,J,X,H,W,G,Y){let D=Y||Number.POSITIVE_INFINITY,q=0;return _;function _(R){if(R===60)return Z.enter(J),Z.enter(X),Z.enter(H),Z.consume(R),Z.exit(H),V;if(R===null||R===32||R===41||H6(R))return Q(R);return Z.enter(J),Z.enter(W),Z.enter(G),Z.enter("chunkString",{contentType:"string"}),B(R)}function V(R){if(R===62)return Z.enter(H),Z.consume(R),Z.exit(H),Z.exit(X),Z.exit(J),K;return Z.enter(G),Z.enter("chunkString",{contentType:"string"}),$(R)}function $(R){if(R===62)return Z.exit("chunkString"),Z.exit(G),V(R);if(R===null||R===60||T(R))return Q(R);return Z.consume(R),R===92?M:$}function M(R){if(R===60||R===62||R===92)return Z.consume(R),$;return $(R)}function B(R){if(!q&&(R===null||R===41||d(R)))return Z.exit("chunkString"),Z.exit(G),Z.exit(W),Z.exit(J),K(R);if(q<D&&R===40)return Z.consume(R),q++,B;if(R===41)return Z.consume(R),q--,B;if(R===null||R===32||R===40||H6(R))return Q(R);return Z.consume(R),R===92?j:B}function j(R){if(R===40||R===41||R===92)return Z.consume(R),B;return B(R)}}function x6(Z,K,Q,J,X,H){let W=this,G=0,Y;return D;function D($){return Z.enter(J),Z.enter(X),Z.consume($),Z.exit(X),Z.enter(H),q}function q($){if(G>999||$===null||$===91||$===93&&!Y||$===94&&!G&&"_hiddenFootnoteSupport"in W.parser.constructs)return Q($);if($===93)return Z.exit(H),Z.enter(X),Z.consume($),Z.exit(X),Z.exit(J),K;if(T($))return Z.enter("lineEnding"),Z.consume($),Z.exit("lineEnding"),q;return Z.enter("chunkString",{contentType:"string"}),_($)}function _($){if($===null||$===91||$===93||T($)||G++>999)return Z.exit("chunkString"),q($);if(Z.consume($),!Y)Y=!I($);return $===92?V:_}function V($){if($===91||$===92||$===93)return Z.consume($),G++,_;return _($)}}function k6(Z,K,Q,J,X,H){let W;return G;function G(V){if(V===34||V===39||V===40)return Z.enter(J),Z.enter(X),Z.consume(V),Z.exit(X),W=V===40?41:V,Y;return Q(V)}function Y(V){if(V===W)return Z.enter(X),Z.consume(V),Z.exit(X),Z.exit(J),K;return Z.enter(H),D(V)}function D(V){if(V===W)return Z.exit(H),Y(W);if(V===null)return Q(V);if(T(V))return Z.enter("lineEnding"),Z.consume(V),Z.exit("lineEnding"),S(Z,D,"linePrefix");return Z.enter("chunkString",{contentType:"string"}),q(V)}function q(V){if(V===W||V===null||T(V))return Z.exit("chunkString"),D(V);return Z.consume(V),V===92?_:q}function _(V){if(V===W||V===92)return Z.consume(V),q;return q(V)}}function g5(Z,K){let Q;return J;function J(X){if(T(X))return Z.enter("lineEnding"),Z.consume(X),Z.exit("lineEnding"),Q=!0,J;if(I(X))return S(Z,J,Q?"linePrefix":"lineSuffix")(X);return K(X)}}var C7={name:"definition",tokenize:X2},J2={partial:!0,tokenize:H2};function X2(Z,K,Q){let J=this,X;return H;function H($){return Z.enter("definition"),W($)}function W($){return x6.call(J,Z,G,Q,"definitionLabel","definitionLabelMarker","definitionLabelString")($)}function G($){if(X=z5(J.sliceSerialize(J.events[J.events.length-1][1]).slice(1,-1)),$===58)return Z.enter("definitionMarker"),Z.consume($),Z.exit("definitionMarker"),Y;return Q($)}function Y($){return d($)?g5(Z,D)($):D($)}function D($){return h6(Z,q,Q,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")($)}function q($){return Z.attempt(J2,_,_)($)}function _($){return I($)?S(Z,V,"whitespace")($):V($)}function V($){if($===null||T($))return Z.exit("definition"),J.parser.defined.push(X),K($);return Q($)}}function H2(Z,K,Q){return J;function J(G){return d(G)?g5(Z,X)(G):Q(G)}function X(G){return k6(Z,H,Q,"definitionTitle","definitionTitleMarker","definitionTitleString")(G)}function H(G){return I(G)?S(Z,W,"whitespace")(G):W(G)}function W(G){return G===null||T(G)?K(G):Q(G)}}var O7={name:"hardBreakEscape",tokenize:W2};function W2(Z,K,Q){return J;function J(H){return Z.enter("hardBreakEscape"),Z.consume(H),X}function X(H){if(T(H))return Z.exit("hardBreakEscape"),K(H);return Q(H)}}var w7={name:"headingAtx",resolve:G2,tokenize:q2};function G2(Z,K){let Q=Z.length-2,J=3,X,H;if(Z[J][1].type==="whitespace")J+=2;if(Q-2>J&&Z[Q][1].type==="whitespace")Q-=2;if(Z[Q][1].type==="atxHeadingSequence"&&(J===Q-1||Q-4>J&&Z[Q-2][1].type==="whitespace"))Q-=J+1===Q?2:4;if(Q>J)X={type:"atxHeadingText",start:Z[J][1].start,end:Z[Q][1].end},H={type:"chunkText",start:Z[J][1].start,end:Z[Q][1].end,contentType:"text"},Z5(Z,J,Q-J+1,[["enter",X,K],["enter",H,K],["exit",H,K],["exit",X,K]]);return Z}function q2(Z,K,Q){let J=0;return X;function X(q){return Z.enter("atxHeading"),H(q)}function H(q){return Z.enter("atxHeadingSequence"),W(q)}function W(q){if(q===35&&J++<6)return Z.consume(q),W;if(q===null||d(q))return Z.exit("atxHeadingSequence"),G(q);return Q(q)}function G(q){if(q===35)return Z.enter("atxHeadingSequence"),Y(q);if(q===null||T(q))return Z.exit("atxHeading"),K(q);if(I(q))return S(Z,G,"whitespace")(q);return Z.enter("atxHeadingText"),D(q)}function Y(q){if(q===35)return Z.consume(q),Y;return Z.exit("atxHeadingSequence"),G(q)}function D(q){if(q===null||q===35||d(q))return Z.exit("atxHeadingText"),G(q);return Z.consume(q),D}}var tZ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],P7=["pre","script","style","textarea"];var I7={concrete:!0,name:"htmlFlow",resolveTo:D2,tokenize:U2},Y2={partial:!0,tokenize:V2},$2={partial:!0,tokenize:_2};function D2(Z){let K=Z.length;while(K--)if(Z[K][0]==="enter"&&Z[K][1].type==="htmlFlow")break;if(K>1&&Z[K-2][1].type==="linePrefix")Z[K][1].start=Z[K-2][1].start,Z[K+1][1].start=Z[K-2][1].start,Z.splice(K-2,2);return Z}function U2(Z,K,Q){let J=this,X,H,W,G,Y;return D;function D(N){return q(N)}function q(N){return Z.enter("htmlFlow"),Z.enter("htmlFlowData"),Z.consume(N),_}function _(N){if(N===33)return Z.consume(N),V;if(N===47)return Z.consume(N),H=!0,B;if(N===63)return Z.consume(N),X=3,J.interrupt?K:U;if(G5(N))return Z.consume(N),W=String.fromCharCode(N),j;return Q(N)}function V(N){if(N===45)return Z.consume(N),X=2,$;if(N===91)return Z.consume(N),X=5,G=0,M;if(G5(N))return Z.consume(N),X=4,J.interrupt?K:U;return Q(N)}function $(N){if(N===45)return Z.consume(N),J.interrupt?K:U;return Q(N)}function M(N){if(N==="CDATA[".charCodeAt(G++)){if(Z.consume(N),G===6)return J.interrupt?K:p;return M}return Q(N)}function B(N){if(G5(N))return Z.consume(N),W=String.fromCharCode(N),j;return Q(N)}function j(N){if(N===null||N===47||N===62||d(N)){let U5=N===47,P5=W.toLowerCase();if(!U5&&!H&&P7.includes(P5))return X=1,J.interrupt?K(N):p(N);if(tZ.includes(W.toLowerCase())){if(X=6,U5)return Z.consume(N),R;return J.interrupt?K(N):p(N)}return X=7,J.interrupt&&!J.parser.lazy[J.now().line]?Q(N):H?w(N):C(N)}if(N===45||o(N))return Z.consume(N),W+=String.fromCharCode(N),j;return Q(N)}function R(N){if(N===62)return Z.consume(N),J.interrupt?K:p;return Q(N)}function w(N){if(I(N))return Z.consume(N),w;return i(N)}function C(N){if(N===47)return Z.consume(N),i;if(N===58||N===95||G5(N))return Z.consume(N),v;if(I(N))return Z.consume(N),C;return i(N)}function v(N){if(N===45||N===46||N===58||N===95||o(N))return Z.consume(N),v;return k(N)}function k(N){if(N===61)return Z.consume(N),F;if(I(N))return Z.consume(N),k;return C(N)}function F(N){if(N===null||N===60||N===61||N===62||N===96)return Q(N);if(N===34||N===39)return Z.consume(N),Y=N,f;if(I(N))return Z.consume(N),F;return c(N)}function f(N){if(N===Y)return Z.consume(N),Y=null,m;if(N===null||T(N))return Q(N);return Z.consume(N),f}function c(N){if(N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||d(N))return k(N);return Z.consume(N),c}function m(N){if(N===47||N===62||I(N))return C(N);return Q(N)}function i(N){if(N===62)return Z.consume(N),q5;return Q(N)}function q5(N){if(N===null||T(N))return p(N);if(I(N))return Z.consume(N),q5;return Q(N)}function p(N){if(N===45&&X===2)return Z.consume(N),r;if(N===60&&X===1)return Z.consume(N),n;if(N===62&&X===4)return Z.consume(N),L5;if(N===63&&X===3)return Z.consume(N),U;if(N===93&&X===5)return Z.consume(N),N5;if(T(N)&&(X===6||X===7))return Z.exit("htmlFlowData"),Z.check(Y2,M5,O)(N);if(N===null||T(N))return Z.exit("htmlFlowData"),O(N);return Z.consume(N),p}function O(N){return Z.check($2,y,M5)(N)}function y(N){return Z.enter("lineEnding"),Z.consume(N),Z.exit("lineEnding"),g}function g(N){if(N===null||T(N))return O(N);return Z.enter("htmlFlowData"),p(N)}function r(N){if(N===45)return Z.consume(N),U;return p(N)}function n(N){if(N===47)return Z.consume(N),W="",D5;return p(N)}function D5(N){if(N===62){let U5=W.toLowerCase();if(P7.includes(U5))return Z.consume(N),L5;return p(N)}if(G5(N)&&W.length<8)return Z.consume(N),W+=String.fromCharCode(N),D5;return p(N)}function N5(N){if(N===93)return Z.consume(N),U;return p(N)}function U(N){if(N===62)return Z.consume(N),L5;if(N===45&&X===2)return Z.consume(N),U;return p(N)}function L5(N){if(N===null||T(N))return Z.exit("htmlFlowData"),M5(N);return Z.consume(N),L5}function M5(N){return Z.exit("htmlFlow"),K(N)}}function _2(Z,K,Q){let J=this;return X;function X(W){if(T(W))return Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),H;return Q(W)}function H(W){return J.parser.lazy[J.now().line]?Q(W):K(W)}}function V2(Z,K,Q){return J;function J(X){return Z.enter("lineEnding"),Z.consume(X),Z.exit("lineEnding"),Z.attempt(O5,K,Q)}}var E7={name:"htmlText",tokenize:N2};function N2(Z,K,Q){let J=this,X,H,W;return G;function G(U){return Z.enter("htmlText"),Z.enter("htmlTextData"),Z.consume(U),Y}function Y(U){if(U===33)return Z.consume(U),D;if(U===47)return Z.consume(U),k;if(U===63)return Z.consume(U),C;if(G5(U))return Z.consume(U),c;return Q(U)}function D(U){if(U===45)return Z.consume(U),q;if(U===91)return Z.consume(U),H=0,M;if(G5(U))return Z.consume(U),w;return Q(U)}function q(U){if(U===45)return Z.consume(U),$;return Q(U)}function _(U){if(U===null)return Q(U);if(U===45)return Z.consume(U),V;if(T(U))return W=_,n(U);return Z.consume(U),_}function V(U){if(U===45)return Z.consume(U),$;return _(U)}function $(U){return U===62?r(U):U===45?V(U):_(U)}function M(U){if(U==="CDATA[".charCodeAt(H++))return Z.consume(U),H===6?B:M;return Q(U)}function B(U){if(U===null)return Q(U);if(U===93)return Z.consume(U),j;if(T(U))return W=B,n(U);return Z.consume(U),B}function j(U){if(U===93)return Z.consume(U),R;return B(U)}function R(U){if(U===62)return r(U);if(U===93)return Z.consume(U),R;return B(U)}function w(U){if(U===null||U===62)return r(U);if(T(U))return W=w,n(U);return Z.consume(U),w}function C(U){if(U===null)return Q(U);if(U===63)return Z.consume(U),v;if(T(U))return W=C,n(U);return Z.consume(U),C}function v(U){return U===62?r(U):C(U)}function k(U){if(G5(U))return Z.consume(U),F;return Q(U)}function F(U){if(U===45||o(U))return Z.consume(U),F;return f(U)}function f(U){if(T(U))return W=f,n(U);if(I(U))return Z.consume(U),f;return r(U)}function c(U){if(U===45||o(U))return Z.consume(U),c;if(U===47||U===62||d(U))return m(U);return Q(U)}function m(U){if(U===47)return Z.consume(U),r;if(U===58||U===95||G5(U))return Z.consume(U),i;if(T(U))return W=m,n(U);if(I(U))return Z.consume(U),m;return r(U)}function i(U){if(U===45||U===46||U===58||U===95||o(U))return Z.consume(U),i;return q5(U)}function q5(U){if(U===61)return Z.consume(U),p;if(T(U))return W=q5,n(U);if(I(U))return Z.consume(U),q5;return m(U)}function p(U){if(U===null||U===60||U===61||U===62||U===96)return Q(U);if(U===34||U===39)return Z.consume(U),X=U,O;if(T(U))return W=p,n(U);if(I(U))return Z.consume(U),p;return Z.consume(U),y}function O(U){if(U===X)return Z.consume(U),X=void 0,g;if(U===null)return Q(U);if(T(U))return W=O,n(U);return Z.consume(U),O}function y(U){if(U===null||U===34||U===39||U===60||U===61||U===96)return Q(U);if(U===47||U===62||d(U))return m(U);return Z.consume(U),y}function g(U){if(U===47||U===62||d(U))return m(U);return Q(U)}function r(U){if(U===62)return Z.consume(U),Z.exit("htmlTextData"),Z.exit("htmlText"),K;return Q(U)}function n(U){return Z.exit("htmlTextData"),Z.enter("lineEnding"),Z.consume(U),Z.exit("lineEnding"),D5}function D5(U){return I(U)?S(Z,N5,"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):N5(U)}function N5(U){return Z.enter("htmlTextData"),W(U)}}var y5={name:"labelEnd",resolveAll:F2,resolveTo:R2,tokenize:A2},L2={tokenize:z2},M2={tokenize:T2},B2={tokenize:j2};function F2(Z){let K=-1,Q=[];while(++K<Z.length){let J=Z[K][1];if(Q.push(Z[K]),J.type==="labelImage"||J.type==="labelLink"||J.type==="labelEnd"){let X=J.type==="labelImage"?4:2;J.type="data",K+=X}}if(Z.length!==Q.length)Z5(Z,0,Z.length,Q);return Z}function R2(Z,K){let Q=Z.length,J=0,X,H,W,G;while(Q--)if(X=Z[Q][1],H){if(X.type==="link"||X.type==="labelLink"&&X._inactive)break;if(Z[Q][0]==="enter"&&X.type==="labelLink")X._inactive=!0}else if(W){if(Z[Q][0]==="enter"&&(X.type==="labelImage"||X.type==="labelLink")&&!X._balanced){if(H=Q,X.type!=="labelLink"){J=2;break}}}else if(X.type==="labelEnd")W=Q;let Y={type:Z[H][1].type==="labelLink"?"link":"image",start:{...Z[H][1].start},end:{...Z[Z.length-1][1].end}},D={type:"label",start:{...Z[H][1].start},end:{...Z[W][1].end}},q={type:"labelText",start:{...Z[H+J+2][1].end},end:{...Z[W-2][1].start}};return G=[["enter",Y,K],["enter",D,K]],G=J5(G,Z.slice(H+1,H+J+3)),G=J5(G,[["enter",q,K]]),G=J5(G,f5(K.parser.constructs.insideSpan.null,Z.slice(H+J+4,W-3),K)),G=J5(G,[["exit",q,K],Z[W-2],Z[W-1],["exit",D,K]]),G=J5(G,Z.slice(W+1)),G=J5(G,[["exit",Y,K]]),Z5(Z,H,Z.length,G),Z}function A2(Z,K,Q){let J=this,X=J.events.length,H,W;while(X--)if((J.events[X][1].type==="labelImage"||J.events[X][1].type==="labelLink")&&!J.events[X][1]._balanced){H=J.events[X][1];break}return G;function G(V){if(!H)return Q(V);if(H._inactive)return _(V);return W=J.parser.defined.includes(z5(J.sliceSerialize({start:H.end,end:J.now()}))),Z.enter("labelEnd"),Z.enter("labelMarker"),Z.consume(V),Z.exit("labelMarker"),Z.exit("labelEnd"),Y}function Y(V){if(V===40)return Z.attempt(L2,q,W?q:_)(V);if(V===91)return Z.attempt(M2,q,W?D:_)(V);return W?q(V):_(V)}function D(V){return Z.attempt(B2,q,_)(V)}function q(V){return K(V)}function _(V){return H._balanced=!0,Q(V)}}function z2(Z,K,Q){return J;function J(_){return Z.enter("resource"),Z.enter("resourceMarker"),Z.consume(_),Z.exit("resourceMarker"),X}function X(_){return d(_)?g5(Z,H)(_):H(_)}function H(_){if(_===41)return q(_);return h6(Z,W,G,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(_)}function W(_){return d(_)?g5(Z,Y)(_):q(_)}function G(_){return Q(_)}function Y(_){if(_===34||_===39||_===40)return k6(Z,D,Q,"resourceTitle","resourceTitleMarker","resourceTitleString")(_);return q(_)}function D(_){return d(_)?g5(Z,q)(_):q(_)}function q(_){if(_===41)return Z.enter("resourceMarker"),Z.consume(_),Z.exit("resourceMarker"),Z.exit("resource"),K;return Q(_)}}function T2(Z,K,Q){let J=this;return X;function X(G){return x6.call(J,Z,H,W,"reference","referenceMarker","referenceString")(G)}function H(G){return J.parser.defined.includes(z5(J.sliceSerialize(J.events[J.events.length-1][1]).slice(1,-1)))?K(G):Q(G)}function W(G){return Q(G)}}function j2(Z,K,Q){return J;function J(H){return Z.enter("reference"),Z.enter("referenceMarker"),Z.consume(H),Z.exit("referenceMarker"),X}function X(H){if(H===93)return Z.enter("referenceMarker"),Z.consume(H),Z.exit("referenceMarker"),Z.exit("reference"),K;return Q(H)}}var S7={name:"labelStartImage",resolveAll:y5.resolveAll,tokenize:C2};function C2(Z,K,Q){let J=this;return X;function X(G){return Z.enter("labelImage"),Z.enter("labelImageMarker"),Z.consume(G),Z.exit("labelImageMarker"),H}function H(G){if(G===91)return Z.enter("labelMarker"),Z.consume(G),Z.exit("labelMarker"),Z.exit("labelImage"),W;return Q(G)}function W(G){return G===94&&"_hiddenFootnoteSupport"in J.parser.constructs?Q(G):K(G)}}var b7={name:"labelStartLink",resolveAll:y5.resolveAll,tokenize:O2};function O2(Z,K,Q){let J=this;return X;function X(W){return Z.enter("labelLink"),Z.enter("labelMarker"),Z.consume(W),Z.exit("labelMarker"),Z.exit("labelLink"),H}function H(W){return W===94&&"_hiddenFootnoteSupport"in J.parser.constructs?Q(W):K(W)}}var $6={name:"lineEnding",tokenize:w2};function w2(Z,K){return Q;function Q(J){return Z.enter("lineEnding"),Z.consume(J),Z.exit("lineEnding"),S(Z,K,"linePrefix")}}var h5={name:"thematicBreak",tokenize:P2};function P2(Z,K,Q){let J=0,X;return H;function H(D){return Z.enter("thematicBreak"),W(D)}function W(D){return X=D,G(D)}function G(D){if(D===X)return Z.enter("thematicBreakSequence"),Y(D);if(J>=3&&(D===null||T(D)))return Z.exit("thematicBreak"),K(D);return Q(D)}function Y(D){if(D===X)return Z.consume(D),J++,Y;return Z.exit("thematicBreakSequence"),I(D)?S(Z,G,"whitespace")(D):G(D)}}var K5={continuation:{tokenize:b2},exit:y2,name:"list",tokenize:S2},I2={partial:!0,tokenize:h2},E2={partial:!0,tokenize:g2};function S2(Z,K,Q){let J=this,X=J.events[J.events.length-1],H=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,W=0;return G;function G($){let M=J.containerState.type||($===42||$===43||$===45?"listUnordered":"listOrdered");if(M==="listUnordered"?!J.containerState.marker||$===J.containerState.marker:W6($)){if(!J.containerState.type)J.containerState.type=M,Z.enter(M,{_container:!0});if(M==="listUnordered")return Z.enter("listItemPrefix"),$===42||$===45?Z.check(h5,Q,D)($):D($);if(!J.interrupt||$===49)return Z.enter("listItemPrefix"),Z.enter("listItemValue"),Y($)}return Q($)}function Y($){if(W6($)&&++W<10)return Z.consume($),Y;if((!J.interrupt||W<2)&&(J.containerState.marker?$===J.containerState.marker:$===41||$===46))return Z.exit("listItemValue"),D($);return Q($)}function D($){return Z.enter("listItemMarker"),Z.consume($),Z.exit("listItemMarker"),J.containerState.marker=J.containerState.marker||$,Z.check(O5,J.interrupt?Q:q,Z.attempt(I2,V,_))}function q($){return J.containerState.initialBlankLine=!0,H++,V($)}function _($){if(I($))return Z.enter("listItemPrefixWhitespace"),Z.consume($),Z.exit("listItemPrefixWhitespace"),V;return Q($)}function V($){return J.containerState.size=H+J.sliceSerialize(Z.exit("listItemPrefix"),!0).length,K($)}}function b2(Z,K,Q){let J=this;return J.containerState._closeFlow=void 0,Z.check(O5,X,H);function X(G){return J.containerState.furtherBlankLines=J.containerState.furtherBlankLines||J.containerState.initialBlankLine,S(Z,K,"listItemIndent",J.containerState.size+1)(G)}function H(G){if(J.containerState.furtherBlankLines||!I(G))return J.containerState.furtherBlankLines=void 0,J.containerState.initialBlankLine=void 0,W(G);return J.containerState.furtherBlankLines=void 0,J.containerState.initialBlankLine=void 0,Z.attempt(E2,K,W)(G)}function W(G){return J.containerState._closeFlow=!0,J.interrupt=void 0,S(Z,Z.attempt(K5,K,Q),"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G)}}function g2(Z,K,Q){let J=this;return S(Z,X,"listItemIndent",J.containerState.size+1);function X(H){let W=J.events[J.events.length-1];return W&&W[1].type==="listItemIndent"&&W[2].sliceSerialize(W[1],!0).length===J.containerState.size?K(H):Q(H)}}function y2(Z){Z.exit(this.containerState.type)}function h2(Z,K,Q){let J=this;return S(Z,X,"listItemPrefixWhitespace",J.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function X(H){let W=J.events[J.events.length-1];return!I(H)&&W&&W[1].type==="listItemPrefixWhitespace"?K(H):Q(H)}}var m6={name:"setextUnderline",resolveTo:x2,tokenize:k2};function x2(Z,K){let Q=Z.length,J,X,H;while(Q--)if(Z[Q][0]==="enter"){if(Z[Q][1].type==="content"){J=Q;break}if(Z[Q][1].type==="paragraph")X=Q}else{if(Z[Q][1].type==="content")Z.splice(Q,1);if(!H&&Z[Q][1].type==="definition")H=Q}let W={type:"setextHeading",start:{...Z[J][1].start},end:{...Z[Z.length-1][1].end}};if(Z[X][1].type="setextHeadingText",H)Z.splice(X,0,["enter",W,K]),Z.splice(H+1,0,["exit",Z[J][1],K]),Z[J][1].end={...Z[H][1].end};else Z[J][1]=W;return Z.push(["exit",W,K]),Z}function k2(Z,K,Q){let J=this,X;return H;function H(D){let q=J.events.length,_;while(q--)if(J.events[q][1].type!=="lineEnding"&&J.events[q][1].type!=="linePrefix"&&J.events[q][1].type!=="content"){_=J.events[q][1].type==="paragraph";break}if(!J.parser.lazy[J.now().line]&&(J.interrupt||_))return Z.enter("setextHeadingLine"),X=D,W(D);return Q(D)}function W(D){return Z.enter("setextHeadingLineSequence"),G(D)}function G(D){if(D===X)return Z.consume(D),G;return Z.exit("setextHeadingLineSequence"),I(D)?S(Z,Y,"lineSuffix")(D):Y(D)}function Y(D){if(D===null||T(D))return Z.exit("setextHeadingLine"),K(D);return Q(D)}}var eZ={tokenize:m2};function m2(Z){let K=this,Q=Z.attempt(O5,J,Z.attempt(this.parser.constructs.flowInitial,X,S(Z,Z.attempt(this.parser.constructs.flow,X,Z.attempt(j7,X)),"linePrefix")));return Q;function J(H){if(H===null){Z.consume(H);return}return Z.enter("lineEndingBlank"),Z.consume(H),Z.exit("lineEndingBlank"),K.currentConstruct=void 0,Q}function X(H){if(H===null){Z.consume(H);return}return Z.enter("lineEnding"),Z.consume(H),Z.exit("lineEnding"),K.currentConstruct=void 0,Q}}var Z4={resolveAll:X4()},K4=J4("string"),Q4=J4("text");function J4(Z){return{resolveAll:X4(Z==="text"?v2:void 0),tokenize:K};function K(Q){let J=this,X=this.parser.constructs[Z],H=Q.attempt(X,W,G);return W;function W(q){return D(q)?H(q):G(q)}function G(q){if(q===null){Q.consume(q);return}return Q.enter("data"),Q.consume(q),Y}function Y(q){if(D(q))return Q.exit("data"),H(q);return Q.consume(q),Y}function D(q){if(q===null)return!0;let _=X[q],V=-1;if(_)while(++V<_.length){let $=_[V];if(!$.previous||$.previous.call(J,J.previous))return!0}return!1}}}function X4(Z){return K;function K(Q,J){let X=-1,H;while(++X<=Q.length)if(H===void 0){if(Q[X]&&Q[X][1].type==="data")H=X,X++}else if(!Q[X]||Q[X][1].type!=="data"){if(X!==H+2)Q[H][1].end=Q[X-1][1].end,Q.splice(H+2,X-H-2),X=H+2;H=void 0}return Z?Z(Q,J):Q}}function v2(Z,K){let Q=0;while(++Q<=Z.length)if((Q===Z.length||Z[Q][1].type==="lineEnding")&&Z[Q-1][1].type==="data"){let J=Z[Q-1][1],X=K.sliceStream(J),H=X.length,W=-1,G=0,Y;while(H--){let D=X[H];if(typeof D==="string"){W=D.length;while(D.charCodeAt(W-1)===32)G++,W--;if(W)break;W=-1}else if(D===-2)Y=!0,G++;else if(D===-1);else{H++;break}}if(K._contentTypeTextTrailing&&Q===Z.length)G=0;if(G){let D={type:Q===Z.length||Y||G<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:H?W:J.start._bufferIndex+W,_index:J.start._index+H,line:J.end.line,column:J.end.column-G,offset:J.end.offset-G},end:{...J.end}};if(J.end={...D.start},J.start.offset===J.end.offset)Object.assign(J,D);else Z.splice(Q,0,["enter",D,K],["exit",D,K]),Q+=2}Q++}return Z}var g7={};YZ(g7,{text:()=>r2,string:()=>i2,insideSpan:()=>a2,flowInitial:()=>l2,flow:()=>f2,document:()=>p2,disable:()=>c2,contentInitial:()=>u2,attentionMarkers:()=>d2});var p2={[42]:K5,[43]:K5,[45]:K5,[48]:K5,[49]:K5,[50]:K5,[51]:K5,[52]:K5,[53]:K5,[54]:K5,[55]:K5,[56]:K5,[57]:K5,[62]:E6},u2={[91]:C7},l2={[-2]:q6,[-1]:q6,[32]:q6},f2={[35]:w7,[42]:h5,[45]:[m6,h5],[60]:I7,[61]:m6,[95]:h5,[96]:g6,[126]:g6},i2={[38]:b6,[92]:S6},r2={[-5]:$6,[-4]:$6,[-3]:$6,[33]:S7,[38]:b6,[42]:G6,[60]:[A7,E7],[91]:b7,[92]:[O7,S6],[93]:y5,[95]:G6,[96]:z7},a2={null:[G6,Z4]},d2={null:[42,95]},c2={null:[]};function H4(Z,K,Q){let J={_bufferIndex:-1,_index:0,line:Q&&Q.line||1,column:Q&&Q.column||1,offset:Q&&Q.offset||0},X={},H=[],W=[],G=[],Y=!0,D={attempt:m(f),check:m(c),consume:v,enter:k,exit:F,interrupt:m(c,{interrupt:!0})},q={code:null,containerState:{},defineSkip:R,events:[],now:j,parser:Z,previous:null,sliceSerialize:M,sliceStream:B,write:$},_=K.tokenize.call(q,D),V;if(K.resolveAll)H.push(K);return q;function $(O){if(W=J5(W,O),w(),W[W.length-1]!==null)return[];return i(K,0),q.events=f5(H,q.events,q),q.events}function M(O,y){return n2(B(O),y)}function B(O){return s2(W,O)}function j(){let{_bufferIndex:O,_index:y,line:g,column:r,offset:n}=J;return{_bufferIndex:O,_index:y,line:g,column:r,offset:n}}function R(O){X[O.line]=O.column,p()}function w(){let O;while(J._index<W.length){let y=W[J._index];if(typeof y==="string"){if(O=J._index,J._bufferIndex<0)J._bufferIndex=0;while(J._index===O&&J._bufferIndex<y.length)C(y.charCodeAt(J._bufferIndex))}else C(y)}}function C(O){Y=void 0,V=O,_=_(O)}function v(O){if(T(O))J.line++,J.column=1,J.offset+=O===-3?2:1,p();else if(O!==-1)J.column++,J.offset++;if(J._bufferIndex<0)J._index++;else if(J._bufferIndex++,J._bufferIndex===W[J._index].length)J._bufferIndex=-1,J._index++;q.previous=O,Y=!0}function k(O,y){let g=y||{};return g.type=O,g.start=j(),q.events.push(["enter",g,q]),G.push(g),g}function F(O){let y=G.pop();return y.end=j(),q.events.push(["exit",y,q]),y}function f(O,y){i(O,y.from)}function c(O,y){y.restore()}function m(O,y){return g;function g(r,n,D5){let N5,U,L5,M5;return Array.isArray(r)?U5(r):("tokenize"in r)?U5([r]):N(r);function N(t){return n5;function n5(B5){let I5=B5!==null&&t[B5],m5=B5!==null&&t.null,K7=[...Array.isArray(I5)?I5:I5?[I5]:[],...Array.isArray(m5)?m5:m5?[m5]:[]];return U5(K7)(B5)}}function U5(t){if(N5=t,U=0,t.length===0)return D5;return P5(t[U])}function P5(t){return n5;function n5(B5){if(M5=q5(),L5=t,!t.partial)q.currentConstruct=t;if(t.name&&q.parser.constructs.disable.null.includes(t.name))return R6(B5);return t.tokenize.call(y?Object.assign(Object.create(q),y):q,D,Z7,R6)(B5)}}function Z7(t){return Y=!0,O(L5,M5),n}function R6(t){if(Y=!0,M5.restore(),++U<N5.length)return P5(N5[U]);return D5}}}function i(O,y){if(O.resolveAll&&!H.includes(O))H.push(O);if(O.resolve)Z5(q.events,y,q.events.length-y,O.resolve(q.events.slice(y),q));if(O.resolveTo)q.events=O.resolveTo(q.events,q)}function q5(){let O=j(),y=q.previous,g=q.currentConstruct,r=q.events.length,n=Array.from(G);return{from:r,restore:D5};function D5(){J=O,q.previous=y,q.currentConstruct=g,q.events.length=r,G=n,p()}}function p(){if(J.line in X&&J.column<2)J.column=X[J.line],J.offset+=X[J.line]-1}}function s2(Z,K){let Q=K.start._index,J=K.start._bufferIndex,X=K.end._index,H=K.end._bufferIndex,W;if(Q===X)W=[Z[Q].slice(J,H)];else{if(W=Z.slice(Q,X),J>-1){let G=W[0];if(typeof G==="string")W[0]=G.slice(J);else W.shift()}if(H>0)W.push(Z[X].slice(0,H))}return W}function n2(Z,K){let Q=-1,J=[],X;while(++Q<Z.length){let H=Z[Q],W;if(typeof H==="string")W=H;else switch(H){case-5:{W="\r";break}case-4:{W=`
|
|
3
|
+
`;break}case-3:{W=`\r
|
|
4
|
+
`;break}case-2:{W=K?" ":"\t";break}case-1:{if(!K&&X)continue;W=" ";break}default:W=String.fromCharCode(H)}X=H===-2,J.push(W)}return J.join("")}function y7(Z){let J={constructs:uZ([g7,...(Z||{}).extensions||[]]),content:X(dZ),defined:[],document:X(sZ),flow:X(eZ),lazy:{},string:X(K4),text:X(Q4)};return J;function X(H){return W;function W(G){return H4(J,H,G)}}}function h7(Z){while(!y6(Z));return Z}var W4=/[\0\t\n\r]/g;function x7(){let Z=1,K="",Q=!0,J;return X;function X(H,W,G){let Y=[],D,q,_,V,$;if(H=K+(typeof H==="string"?H.toString():new TextDecoder(W||void 0).decode(H)),_=0,K="",Q){if(H.charCodeAt(0)===65279)_++;Q=void 0}while(_<H.length){if(W4.lastIndex=_,D=W4.exec(H),V=D&&D.index!==void 0?D.index:H.length,$=H.charCodeAt(V),!D){K=H.slice(_);break}if($===10&&_===V&&J)Y.push(-3),J=void 0;else{if(J)Y.push(-5),J=void 0;if(_<V)Y.push(H.slice(_,V)),Z+=V-_;switch($){case 0:{Y.push(65533),Z++;break}case 9:{q=Math.ceil(Z/4)*4,Y.push(-2);while(Z++<q)Y.push(-1);break}case 10:{Y.push(-4),Z=1;break}default:J=!0,Z=1}}_=V+1}if(G){if(J)Y.push(-5);if(K)Y.push(K);Y.push(null)}return Y}}var o2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function G4(Z){return Z.replace(o2,t2)}function t2(Z,K,Q){if(K)return K;if(Q.charCodeAt(0)===35){let X=Q.charCodeAt(1),H=X===120||X===88;return I6(Q.slice(H?2:1),H?16:10)}return l5(Q)||Z}var Y4={}.hasOwnProperty;function k7(Z,K,Q){if(K&&typeof K==="object")Q=K,K=void 0;return e2(Q)(h7(y7(Q).document().write(x7()(Z,K,!0))))}function e2(Z){let K={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:H(HZ),autolinkProtocol:m,autolinkEmail:m,atxHeading:H(QZ),blockQuote:H(B5),characterEscape:m,characterReference:m,codeFenced:H(I5),codeFencedFenceInfo:W,codeFencedFenceMeta:W,codeIndented:H(I5,W),codeText:H(m5,W),codeTextData:m,data:m,codeFlowValue:m,definition:H(K7),definitionDestinationString:W,definitionLabelString:W,definitionTitleString:W,emphasis:H(z0),hardBreakEscape:H(JZ),hardBreakTrailing:H(JZ),htmlFlow:H(XZ,W),htmlFlowData:m,htmlText:H(XZ,W),htmlTextData:m,image:H(T0),label:W,link:H(HZ),listItem:H(j0),listItemValue:V,listOrdered:H(WZ,_),listUnordered:H(WZ),paragraph:H(C0),reference:N,referenceString:W,resourceDestinationString:W,resourceTitleString:W,setextHeading:H(QZ),strong:H(O0),thematicBreak:H(P0)},exit:{atxHeading:Y(),atxHeadingSequence:k,autolink:Y(),autolinkEmail:n5,autolinkProtocol:t,blockQuote:Y(),characterEscapeValue:i,characterReferenceMarkerHexadecimal:P5,characterReferenceMarkerNumeric:P5,characterReferenceValue:Z7,characterReference:R6,codeFenced:Y(j),codeFencedFence:B,codeFencedFenceInfo:$,codeFencedFenceMeta:M,codeFlowValue:i,codeIndented:Y(R),codeText:Y(g),codeTextData:i,data:i,definition:Y(),definitionDestinationString:v,definitionLabelString:w,definitionTitleString:C,emphasis:Y(),hardBreakEscape:Y(p),hardBreakTrailing:Y(p),htmlFlow:Y(O),htmlFlowData:i,htmlText:Y(y),htmlTextData:i,image:Y(n),label:N5,labelText:D5,lineEnding:q5,link:Y(r),listItem:Y(),listOrdered:Y(),listUnordered:Y(),paragraph:Y(),referenceString:U5,resourceDestinationString:U,resourceTitleString:L5,resource:M5,setextHeading:Y(c),setextHeadingLineSequence:f,setextHeadingText:F,strong:Y(),thematicBreak:Y()}};$4(K,(Z||{}).mdastExtensions||[]);let Q={};return J;function J(L){let z={type:"root",children:[]},E={stack:[z],tokenStack:[],config:K,enter:G,exit:D,buffer:W,resume:q,data:Q},h=[],u=-1;while(++u<L.length)if(L[u][1].type==="listOrdered"||L[u][1].type==="listUnordered")if(L[u][0]==="enter")h.push(u);else{let _5=h.pop();u=X(L,_5,u)}u=-1;while(++u<L.length){let _5=K[L[u][0]];if(Y4.call(_5,L[u][1].type))_5[L[u][1].type].call(Object.assign({sliceSerialize:L[u][2].sliceSerialize},E),L[u][1])}if(E.tokenStack.length>0){let _5=E.tokenStack[E.tokenStack.length-1];(_5[1]||q4).call(E,void 0,_5[0])}z.position={start:w5(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:w5(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},u=-1;while(++u<K.transforms.length)z=K.transforms[u](z)||z;return z}function X(L,z,E){let h=z-1,u=-1,_5=!1,E5,F5,o5,t5;while(++h<=E){let W5=L[h];switch(W5[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(W5[0]==="enter")u++;else u--;t5=void 0;break}case"lineEndingBlank":{if(W5[0]==="enter"){if(E5&&!t5&&!u&&!o5)o5=h;t5=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:t5=void 0}if(!u&&W5[0]==="enter"&&W5[1].type==="listItemPrefix"||u===-1&&W5[0]==="exit"&&(W5[1].type==="listUnordered"||W5[1].type==="listOrdered")){if(E5){let v5=h;F5=void 0;while(v5--){let R5=L[v5];if(R5[1].type==="lineEnding"||R5[1].type==="lineEndingBlank"){if(R5[0]==="exit")continue;if(F5)L[F5][1].type="lineEndingBlank",_5=!0;R5[1].type="lineEnding",F5=v5}else if(R5[1].type==="linePrefix"||R5[1].type==="blockQuotePrefix"||R5[1].type==="blockQuotePrefixWhitespace"||R5[1].type==="blockQuoteMarker"||R5[1].type==="listItemIndent");else break}if(o5&&(!F5||o5<F5))E5._spread=!0;E5.end=Object.assign({},F5?L[F5][1].start:W5[1].end),L.splice(F5||h,0,["exit",E5,W5[2]]),h++,E++}if(W5[1].type==="listItemPrefix"){let v5={type:"listItem",_spread:!1,start:Object.assign({},W5[1].start),end:void 0};E5=v5,L.splice(h,0,["enter",v5,W5[2]]),h++,E++,o5=void 0,t5=!0}}}return L[z][1]._spread=_5,E}function H(L,z){return E;function E(h){if(G.call(this,L(h),h),z)z.call(this,h)}}function W(){this.stack.push({type:"fragment",children:[]})}function G(L,z,E){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([z,E||void 0]),L.position={start:w5(z.start),end:void 0}}function Y(L){return z;function z(E){if(L)L.call(this,E);D.call(this,E)}}function D(L,z){let E=this.stack.pop(),h=this.tokenStack.pop();if(!h)throw Error("Cannot close `"+L.type+"` ("+j5({start:L.start,end:L.end})+"): it’s not open");else if(h[0].type!==L.type)if(z)z.call(this,L,h[0]);else(h[1]||q4).call(this,L,h[0]);E.position.end=w5(L.end)}function q(){return F7(this.stack.pop())}function _(){this.data.expectingFirstListItemValue=!0}function V(L){if(this.data.expectingFirstListItemValue){let z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function $(){let L=this.resume(),z=this.stack[this.stack.length-1];z.lang=L}function M(){let L=this.resume(),z=this.stack[this.stack.length-1];z.meta=L}function B(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function j(){let L=this.resume(),z=this.stack[this.stack.length-1];z.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function R(){let L=this.resume(),z=this.stack[this.stack.length-1];z.value=L.replace(/(\r?\n|\r)$/g,"")}function w(L){let z=this.resume(),E=this.stack[this.stack.length-1];E.label=z,E.identifier=z5(this.sliceSerialize(L)).toLowerCase()}function C(){let L=this.resume(),z=this.stack[this.stack.length-1];z.title=L}function v(){let L=this.resume(),z=this.stack[this.stack.length-1];z.url=L}function k(L){let z=this.stack[this.stack.length-1];if(!z.depth){let E=this.sliceSerialize(L).length;z.depth=E}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function f(L){let z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function c(){this.data.setextHeadingSlurpLineEnding=void 0}function m(L){let E=this.stack[this.stack.length-1].children,h=E[E.length-1];if(!h||h.type!=="text")h=w0(),h.position={start:w5(L.start),end:void 0},E.push(h);this.stack.push(h)}function i(L){let z=this.stack.pop();z.value+=this.sliceSerialize(L),z.position.end=w5(L.end)}function q5(L){let z=this.stack[this.stack.length-1];if(this.data.atHardBreak){let E=z.children[z.children.length-1];E.position.end=w5(L.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&K.canContainEols.includes(z.type))m.call(this,L),i.call(this,L)}function p(){this.data.atHardBreak=!0}function O(){let L=this.resume(),z=this.stack[this.stack.length-1];z.value=L}function y(){let L=this.resume(),z=this.stack[this.stack.length-1];z.value=L}function g(){let L=this.resume(),z=this.stack[this.stack.length-1];z.value=L}function r(){let L=this.stack[this.stack.length-1];if(this.data.inReference){let z=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=z,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function n(){let L=this.stack[this.stack.length-1];if(this.data.inReference){let z=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=z,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function D5(L){let z=this.sliceSerialize(L),E=this.stack[this.stack.length-2];E.label=G4(z),E.identifier=z5(z).toLowerCase()}function N5(){let L=this.stack[this.stack.length-1],z=this.resume(),E=this.stack[this.stack.length-1];if(this.data.inReference=!0,E.type==="link"){let h=L.children;E.children=h}else E.alt=z}function U(){let L=this.resume(),z=this.stack[this.stack.length-1];z.url=L}function L5(){let L=this.resume(),z=this.stack[this.stack.length-1];z.title=L}function M5(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function U5(L){let z=this.resume(),E=this.stack[this.stack.length-1];E.label=z,E.identifier=z5(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function P5(L){this.data.characterReferenceType=L.type}function Z7(L){let z=this.sliceSerialize(L),E=this.data.characterReferenceType,h;if(E)h=I6(z,E==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else h=l5(z);let u=this.stack[this.stack.length-1];u.value+=h}function R6(L){let z=this.stack.pop();z.position.end=w5(L.end)}function t(L){i.call(this,L);let z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(L)}function n5(L){i.call(this,L);let z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(L)}function B5(){return{type:"blockquote",children:[]}}function I5(){return{type:"code",lang:null,meta:null,value:""}}function m5(){return{type:"inlineCode",value:""}}function K7(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function z0(){return{type:"emphasis",children:[]}}function QZ(){return{type:"heading",depth:0,children:[]}}function JZ(){return{type:"break"}}function XZ(){return{type:"html",value:""}}function T0(){return{type:"image",title:null,url:"",alt:null}}function HZ(){return{type:"link",title:null,url:"",children:[]}}function WZ(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function j0(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function C0(){return{type:"paragraph",children:[]}}function O0(){return{type:"strong",children:[]}}function w0(){return{type:"text",value:""}}function P0(){return{type:"thematicBreak"}}}function w5(Z){return{line:Z.line,column:Z.column,offset:Z.offset}}function $4(Z,K){let Q=-1;while(++Q<K.length){let J=K[Q];if(Array.isArray(J))$4(Z,J);else Z9(Z,J)}}function Z9(Z,K){let Q;for(Q in K)if(Y4.call(K,Q))switch(Q){case"canContainEols":{let J=K[Q];if(J)Z[Q].push(...J);break}case"transforms":{let J=K[Q];if(J)Z[Q].push(...J);break}case"enter":case"exit":{let J=K[Q];if(J)Object.assign(Z[Q],J);break}}}function q4(Z,K){if(Z)throw Error("Cannot close `"+Z.type+"` ("+j5({start:Z.start,end:Z.end})+"): a different token (`"+K.type+"`, "+j5({start:K.start,end:K.end})+") is open");else throw Error("Cannot close document, a token (`"+K.type+"`, "+j5({start:K.start,end:K.end})+") is still open")}function v6(Z){let K=this;K.parser=Q;function Q(J){return k7(J,{...K.data("settings"),...Z,extensions:K.data("micromarkExtensions")||[],mdastExtensions:K.data("fromMarkdownExtensions")||[]})}}var p6=-1,i5=0,x5=1,r5=2,D6=3,U6=4,_6=5,V6=6,u6=7,l6=8;var K9=typeof self==="object"?self:globalThis,D4=(Z,K)=>{switch(Z){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw TypeError("unable to deserialize "+Z)}return new K9[Z](K)},Q9=(Z,K)=>{let Q=(X,H)=>{return Z.set(H,X),X},J=(X)=>{if(Z.has(X))return Z.get(X);let[H,W]=K[X];switch(H){case i5:case p6:return Q(W,X);case x5:{let G=Q([],X);for(let Y of W)G.push(J(Y));return G}case r5:{let G=Q({},X);for(let[Y,D]of W)G[J(Y)]=J(D);return G}case D6:return Q(new Date(W),X);case U6:{let{source:G,flags:Y}=W;return Q(new RegExp(G,Y),X)}case _6:{let G=Q(new Map,X);for(let[Y,D]of W)G.set(J(Y),J(D));return G}case V6:{let G=Q(new Set,X);for(let Y of W)G.add(J(Y));return G}case u6:{let{name:G,message:Y}=W;return Q(D4(G,Y),X)}case l6:return Q(BigInt(W),X);case"BigInt":return Q(Object(BigInt(W)),X);case"ArrayBuffer":return Q(new Uint8Array(W).buffer,W);case"DataView":{let{buffer:G}=new Uint8Array(W);return Q(new DataView(G),W)}}return Q(D4(H,W),X)};return J},m7=(Z)=>Q9(new Map,Z)(0);var a5="",{toString:J9}={},{keys:X9}=Object,N6=(Z)=>{let K=typeof Z;if(K!=="object"||!Z)return[i5,K];let Q=J9.call(Z).slice(8,-1);switch(Q){case"Array":return[x5,a5];case"Object":return[r5,a5];case"Date":return[D6,a5];case"RegExp":return[U6,a5];case"Map":return[_6,a5];case"Set":return[V6,a5];case"DataView":return[x5,Q]}if(Q.includes("Array"))return[x5,Q];if(Q.includes("Error"))return[u6,Q];return[r5,Q]},f6=([Z,K])=>Z===i5&&(K==="function"||K==="symbol"),H9=(Z,K,Q,J)=>{let X=(W,G)=>{let Y=J.push(W)-1;return Q.set(G,Y),Y},H=(W)=>{if(Q.has(W))return Q.get(W);let[G,Y]=N6(W);switch(G){case i5:{let q=W;switch(Y){case"bigint":G=l6,q=W.toString();break;case"function":case"symbol":if(Z)throw TypeError("unable to serialize "+Y);q=null;break;case"undefined":return X([p6],W)}return X([G,q],W)}case x5:{if(Y){let V=W;if(Y==="DataView")V=new Uint8Array(W.buffer);else if(Y==="ArrayBuffer")V=new Uint8Array(W);return X([Y,[...V]],W)}let q=[],_=X([G,q],W);for(let V of W)q.push(H(V));return _}case r5:{if(Y)switch(Y){case"BigInt":return X([Y,W.toString()],W);case"Boolean":case"Number":case"String":return X([Y,W.valueOf()],W)}if(K&&"toJSON"in W)return H(W.toJSON());let q=[],_=X([G,q],W);for(let V of X9(W))if(Z||!f6(N6(W[V])))q.push([H(V),H(W[V])]);return _}case D6:return X([G,W.toISOString()],W);case U6:{let{source:q,flags:_}=W;return X([G,{source:q,flags:_}],W)}case _6:{let q=[],_=X([G,q],W);for(let[V,$]of W)if(Z||!(f6(N6(V))||f6(N6($))))q.push([H(V),H($)]);return _}case V6:{let q=[],_=X([G,q],W);for(let V of W)if(Z||!f6(N6(V)))q.push(H(V));return _}}let{message:D}=W;return X([G,{name:Y,message:D}],W)};return H},v7=(Z,{json:K,lossy:Q}={})=>{let J=[];return H9(!(K||Q),!!K,new Map,J)(Z),J};var d5=typeof structuredClone==="function"?(Z,K)=>K&&(("json"in K)||("lossy"in K))?m7(v7(Z,K)):structuredClone(Z):(Z,K)=>m7(v7(Z,K));function W9(Z,K){let Q=[{type:"text",value:"↩"}];if(K>1)Q.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(K)}]});return Q}function G9(Z,K){return"Back to reference "+(Z+1)+(K>1?"-"+K:"")}function U4(Z){let K=typeof Z.options.clobberPrefix==="string"?Z.options.clobberPrefix:"user-content-",Q=Z.options.footnoteBackContent||W9,J=Z.options.footnoteBackLabel||G9,X=Z.options.footnoteLabel||"Footnotes",H=Z.options.footnoteLabelTagName||"h2",W=Z.options.footnoteLabelProperties||{className:["sr-only"]},G=[],Y=-1;while(++Y<Z.footnoteOrder.length){let D=Z.footnoteById.get(Z.footnoteOrder[Y]);if(!D)continue;let q=Z.all(D),_=String(D.identifier).toUpperCase(),V=$5(_.toLowerCase()),$=0,M=[],B=Z.footnoteCounts.get(_);while(B!==void 0&&++$<=B){if(M.length>0)M.push({type:"text",value:" "});let w=typeof Q==="string"?Q:Q(Y,$);if(typeof w==="string")w={type:"text",value:w};M.push({type:"element",tagName:"a",properties:{href:"#"+K+"fnref-"+V+($>1?"-"+$:""),dataFootnoteBackref:"",ariaLabel:typeof J==="string"?J:J(Y,$),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}let j=q[q.length-1];if(j&&j.type==="element"&&j.tagName==="p"){let w=j.children[j.children.length-1];if(w&&w.type==="text")w.value+=" ";else j.children.push({type:"text",value:" "});j.children.push(...M)}else q.push(...M);let R={type:"element",tagName:"li",properties:{id:K+"fn-"+V},children:Z.wrap(q,!0)};Z.patch(D,R),G.push(R)}if(G.length===0)return;return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:H,properties:{...d5(W),id:"footnote-label"},children:[{type:"text",value:X}]},{type:"text",value:`
|
|
5
|
+
`},{type:"element",tagName:"ol",properties:{},children:Z.wrap(G,!0)},{type:"text",value:`
|
|
6
|
+
`}]}}var i6=function(Z){if(Z===null||Z===void 0)return D9;if(typeof Z==="function")return r6(Z);if(typeof Z==="object")return Array.isArray(Z)?q9(Z):Y9(Z);if(typeof Z==="string")return $9(Z);throw Error("Expected function, string, or object as test")};function q9(Z){let K=[],Q=-1;while(++Q<Z.length)K[Q]=i6(Z[Q]);return r6(J);function J(...X){let H=-1;while(++H<K.length)if(K[H].apply(this,X))return!0;return!1}}function Y9(Z){let K=Z;return r6(Q);function Q(J){let X=J,H;for(H in Z)if(X[H]!==K[H])return!1;return!0}}function $9(Z){return r6(K);function K(Q){return Q&&Q.type===Z}}function r6(Z){return K;function K(Q,J,X){return Boolean(U9(Q)&&Z.call(this,Q,typeof J==="number"?J:void 0,X||void 0))}}function D9(){return!0}function U9(Z){return Z!==null&&typeof Z==="object"&&"type"in Z}function _4(Z){return Z}var V4=[],p7=!0,a6=!1,u7="skip";function l7(Z,K,Q,J){let X;if(typeof K==="function"&&typeof Q!=="function")J=Q,Q=K;else X=K;let H=i6(X),W=J?-1:1;G(Z,void 0,[])();function G(Y,D,q){let _=Y&&typeof Y==="object"?Y:{};if(typeof _.type==="string"){let $=typeof _.tagName==="string"?_.tagName:typeof _.name==="string"?_.name:void 0;Object.defineProperty(V,"name",{value:"node ("+_4(Y.type+($?"<"+$+">":""))+")"})}return V;function V(){let $=V4,M,B,j;if(!K||H(Y,D,q[q.length-1]||void 0)){if($=_9(Q(Y,q)),$[0]===a6)return $}if("children"in Y&&Y.children){let R=Y;if(R.children&&$[0]!==u7){B=(J?R.children.length:-1)+W,j=q.concat(R);while(B>-1&&B<R.children.length){let w=R.children[B];if(M=G(w,B,j)(),M[0]===a6)return M;B=typeof M[1]==="number"?M[1]:B+W}}}return $}}}function _9(Z){if(Array.isArray(Z))return Z;if(typeof Z==="number")return[p7,Z];return Z===null||Z===void 0?V4:[Z]}function L6(Z,K,Q,J){let X,H,W;if(typeof K==="function"&&typeof Q!=="function")H=void 0,W=K,X=Q;else H=K,W=Q,X=J;l7(Z,H,G,X);function G(Y,D){let q=D[D.length-1],_=q?q.children.indexOf(Y):void 0;return W(Y,_,q)}}function N4(Z,K){let Q={type:"element",tagName:"blockquote",properties:{},children:Z.wrap(Z.all(K),!0)};return Z.patch(K,Q),Z.applyData(K,Q)}function L4(Z,K){let Q={type:"element",tagName:"br",properties:{},children:[]};return Z.patch(K,Q),[Z.applyData(K,Q),{type:"text",value:`
|
|
7
|
+
`}]}function M4(Z,K){let Q=K.value?K.value+`
|
|
8
|
+
`:"",J={},X=K.lang?K.lang.split(/\s+/):[];if(X.length>0)J.className=["language-"+X[0]];let H={type:"element",tagName:"code",properties:J,children:[{type:"text",value:Q}]};if(K.meta)H.data={meta:K.meta};return Z.patch(K,H),H=Z.applyData(K,H),H={type:"element",tagName:"pre",properties:{},children:[H]},Z.patch(K,H),H}function B4(Z,K){let Q={type:"element",tagName:"del",properties:{},children:Z.all(K)};return Z.patch(K,Q),Z.applyData(K,Q)}function F4(Z,K){let Q={type:"element",tagName:"em",properties:{},children:Z.all(K)};return Z.patch(K,Q),Z.applyData(K,Q)}function R4(Z,K){let Q=typeof Z.options.clobberPrefix==="string"?Z.options.clobberPrefix:"user-content-",J=String(K.identifier).toUpperCase(),X=$5(J.toLowerCase()),H=Z.footnoteOrder.indexOf(J),W,G=Z.footnoteCounts.get(J);if(G===void 0)G=0,Z.footnoteOrder.push(J),W=Z.footnoteOrder.length;else W=H+1;G+=1,Z.footnoteCounts.set(J,G);let Y={type:"element",tagName:"a",properties:{href:"#"+Q+"fn-"+X,id:Q+"fnref-"+X+(G>1?"-"+G:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(W)}]};Z.patch(K,Y);let D={type:"element",tagName:"sup",properties:{},children:[Y]};return Z.patch(K,D),Z.applyData(K,D)}function A4(Z,K){let Q={type:"element",tagName:"h"+K.depth,properties:{},children:Z.all(K)};return Z.patch(K,Q),Z.applyData(K,Q)}function z4(Z,K){if(Z.options.allowDangerousHtml){let Q={type:"raw",value:K.value};return Z.patch(K,Q),Z.applyData(K,Q)}return}function d6(Z,K){let Q=K.referenceType,J="]";if(Q==="collapsed")J+="[]";else if(Q==="full")J+="["+(K.label||K.identifier)+"]";if(K.type==="imageReference")return[{type:"text",value:"!["+K.alt+J}];let X=Z.all(K),H=X[0];if(H&&H.type==="text")H.value="["+H.value;else X.unshift({type:"text",value:"["});let W=X[X.length-1];if(W&&W.type==="text")W.value+=J;else X.push({type:"text",value:J});return X}function T4(Z,K){let Q=String(K.identifier).toUpperCase(),J=Z.definitionById.get(Q);if(!J)return d6(Z,K);let X={src:$5(J.url||""),alt:K.alt};if(J.title!==null&&J.title!==void 0)X.title=J.title;let H={type:"element",tagName:"img",properties:X,children:[]};return Z.patch(K,H),Z.applyData(K,H)}function j4(Z,K){let Q={src:$5(K.url)};if(K.alt!==null&&K.alt!==void 0)Q.alt=K.alt;if(K.title!==null&&K.title!==void 0)Q.title=K.title;let J={type:"element",tagName:"img",properties:Q,children:[]};return Z.patch(K,J),Z.applyData(K,J)}function C4(Z,K){let Q={type:"text",value:K.value.replace(/\r?\n|\r/g," ")};Z.patch(K,Q);let J={type:"element",tagName:"code",properties:{},children:[Q]};return Z.patch(K,J),Z.applyData(K,J)}function O4(Z,K){let Q=String(K.identifier).toUpperCase(),J=Z.definitionById.get(Q);if(!J)return d6(Z,K);let X={href:$5(J.url||"")};if(J.title!==null&&J.title!==void 0)X.title=J.title;let H={type:"element",tagName:"a",properties:X,children:Z.all(K)};return Z.patch(K,H),Z.applyData(K,H)}function w4(Z,K){let Q={href:$5(K.url)};if(K.title!==null&&K.title!==void 0)Q.title=K.title;let J={type:"element",tagName:"a",properties:Q,children:Z.all(K)};return Z.patch(K,J),Z.applyData(K,J)}function P4(Z,K,Q){let J=Z.all(K),X=Q?V9(Q):I4(K),H={},W=[];if(typeof K.checked==="boolean"){let q=J[0],_;if(q&&q.type==="element"&&q.tagName==="p")_=q;else _={type:"element",tagName:"p",properties:{},children:[]},J.unshift(_);if(_.children.length>0)_.children.unshift({type:"text",value:" "});_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:K.checked,disabled:!0},children:[]}),H.className=["task-list-item"]}let G=-1;while(++G<J.length){let q=J[G];if(X||G!==0||q.type!=="element"||q.tagName!=="p")W.push({type:"text",value:`
|
|
9
|
+
`});if(q.type==="element"&&q.tagName==="p"&&!X)W.push(...q.children);else W.push(q)}let Y=J[J.length-1];if(Y&&(X||Y.type!=="element"||Y.tagName!=="p"))W.push({type:"text",value:`
|
|
10
|
+
`});let D={type:"element",tagName:"li",properties:H,children:W};return Z.patch(K,D),Z.applyData(K,D)}function V9(Z){let K=!1;if(Z.type==="list"){K=Z.spread||!1;let Q=Z.children,J=-1;while(!K&&++J<Q.length)K=I4(Q[J])}return K}function I4(Z){let K=Z.spread;return K===null||K===void 0?Z.children.length>1:K}function E4(Z,K){let Q={},J=Z.all(K),X=-1;if(typeof K.start==="number"&&K.start!==1)Q.start=K.start;while(++X<J.length){let W=J[X];if(W.type==="element"&&W.tagName==="li"&&W.properties&&Array.isArray(W.properties.className)&&W.properties.className.includes("task-list-item")){Q.className=["contains-task-list"];break}}let H={type:"element",tagName:K.ordered?"ol":"ul",properties:Q,children:Z.wrap(J,!0)};return Z.patch(K,H),Z.applyData(K,H)}function S4(Z,K){let Q={type:"element",tagName:"p",properties:{},children:Z.all(K)};return Z.patch(K,Q),Z.applyData(K,Q)}function b4(Z,K){let Q={type:"root",children:Z.wrap(Z.all(K))};return Z.patch(K,Q),Z.applyData(K,Q)}function g4(Z,K){let Q={type:"element",tagName:"strong",properties:{},children:Z.all(K)};return Z.patch(K,Q),Z.applyData(K,Q)}function y4(Z,K){let Q=Z.all(K),J=Q.shift(),X=[];if(J){let W={type:"element",tagName:"thead",properties:{},children:Z.wrap([J],!0)};Z.patch(K.children[0],W),X.push(W)}if(Q.length>0){let W={type:"element",tagName:"tbody",properties:{},children:Z.wrap(Q,!0)},G=u5(K.children[1]),Y=w6(K.children[K.children.length-1]);if(G&&Y)W.position={start:G,end:Y};X.push(W)}let H={type:"element",tagName:"table",properties:{},children:Z.wrap(X,!0)};return Z.patch(K,H),Z.applyData(K,H)}function h4(Z,K,Q){let J=Q?Q.children:void 0,H=(J?J.indexOf(K):1)===0?"th":"td",W=Q&&Q.type==="table"?Q.align:void 0,G=W?W.length:K.children.length,Y=-1,D=[];while(++Y<G){let _=K.children[Y],V={},$=W?W[Y]:void 0;if($)V.align=$;let M={type:"element",tagName:H,properties:V,children:[]};if(_)M.children=Z.all(_),Z.patch(_,M),M=Z.applyData(_,M);D.push(M)}let q={type:"element",tagName:"tr",properties:{},children:Z.wrap(D,!0)};return Z.patch(K,q),Z.applyData(K,q)}function x4(Z,K){let Q={type:"element",tagName:"td",properties:{},children:Z.all(K)};return Z.patch(K,Q),Z.applyData(K,Q)}function m4(Z){let K=String(Z),Q=/\r?\n|\r/g,J=Q.exec(K),X=0,H=[];while(J)H.push(k4(K.slice(X,J.index),X>0,!0),J[0]),X=J.index+J[0].length,J=Q.exec(K);return H.push(k4(K.slice(X),X>0,!1)),H.join("")}function k4(Z,K,Q){let J=0,X=Z.length;if(K){let H=Z.codePointAt(J);while(H===9||H===32)J++,H=Z.codePointAt(J)}if(Q){let H=Z.codePointAt(X-1);while(H===9||H===32)X--,H=Z.codePointAt(X-1)}return X>J?Z.slice(J,X):""}function v4(Z,K){let Q={type:"text",value:m4(String(K.value))};return Z.patch(K,Q),Z.applyData(K,Q)}function p4(Z,K){let Q={type:"element",tagName:"hr",properties:{},children:[]};return Z.patch(K,Q),Z.applyData(K,Q)}var u4={blockquote:N4,break:L4,code:M4,delete:B4,emphasis:F4,footnoteReference:R4,heading:A4,html:z4,imageReference:T4,image:j4,inlineCode:C4,linkReference:O4,link:w4,listItem:P4,list:E4,paragraph:S4,root:b4,strong:g4,table:y4,tableCell:x4,tableRow:h4,text:v4,thematicBreak:p4,toml:c6,yaml:c6,definition:c6,footnoteDefinition:c6};function c6(){return}var f7={}.hasOwnProperty,N9={};function f4(Z,K){let Q=K||N9,J=new Map,X=new Map,H=new Map,W={...u4,...Q.handlers},G={all:D,applyData:M9,definitionById:J,footnoteById:X,footnoteCounts:H,footnoteOrder:[],handlers:W,one:Y,options:Q,patch:L9,wrap:F9};return L6(Z,function(q){if(q.type==="definition"||q.type==="footnoteDefinition"){let _=q.type==="definition"?J:X,V=String(q.identifier).toUpperCase();if(!_.has(V))_.set(V,q)}}),G;function Y(q,_){let V=q.type,$=G.handlers[V];if(f7.call(G.handlers,V)&&$)return $(G,q,_);if(G.options.passThrough&&G.options.passThrough.includes(V)){if("children"in q){let{children:B,...j}=q,R=d5(j);return R.children=G.all(q),R}return d5(q)}return(G.options.unknownHandler||B9)(G,q,_)}function D(q){let _=[];if("children"in q){let V=q.children,$=-1;while(++$<V.length){let M=G.one(V[$],q);if(M){if($&&V[$-1].type==="break"){if(!Array.isArray(M)&&M.type==="text")M.value=l4(M.value);if(!Array.isArray(M)&&M.type==="element"){let B=M.children[0];if(B&&B.type==="text")B.value=l4(B.value)}}if(Array.isArray(M))_.push(...M);else _.push(M)}}}return _}}function L9(Z,K){if(Z.position)K.position=_7(Z)}function M9(Z,K){let Q=K;if(Z&&Z.data){let J=Z.data.hName,X=Z.data.hChildren,H=Z.data.hProperties;if(typeof J==="string")if(Q.type==="element")Q.tagName=J;else{let W="children"in Q?Q.children:[Q];Q={type:"element",tagName:J,properties:{},children:W}}if(Q.type==="element"&&H)Object.assign(Q.properties,d5(H));if("children"in Q&&Q.children&&X!==null&&X!==void 0)Q.children=X}return Q}function B9(Z,K){let Q=K.data||{},J="value"in K&&!(f7.call(Q,"hProperties")||f7.call(Q,"hChildren"))?{type:"text",value:K.value}:{type:"element",tagName:"div",properties:{},children:Z.all(K)};return Z.patch(K,J),Z.applyData(K,J)}function F9(Z,K){let Q=[],J=-1;if(K)Q.push({type:"text",value:`
|
|
11
|
+
`});while(++J<Z.length){if(J)Q.push({type:"text",value:`
|
|
12
|
+
`});Q.push(Z[J])}if(K&&Z.length>0)Q.push({type:"text",value:`
|
|
13
|
+
`});return Q}function l4(Z){let K=0,Q=Z.charCodeAt(K);while(Q===9||Q===32)K++,Q=Z.charCodeAt(K);return Z.slice(K)}function s6(Z,K){let Q=f4(Z,K),J=Q.one(Z,void 0),X=U4(Q),H=Array.isArray(J)?{type:"root",children:J}:J||{type:"root",children:[]};if(X)Q5("children"in H),H.children.push({type:"text",value:`
|
|
14
|
+
`},X);return H}function n6(Z,K){if(Z&&"run"in Z)return async function(Q,J){let X=s6(Q,{file:J,...K});await Z.run(X,J)};return function(Q,J){return s6(Q,{file:J,...Z||K})}}function i7(Z){if(Z)throw Z}var e6=P6(t4(),1);function M6(Z){if(typeof Z!=="object"||Z===null)return!1;let K=Object.getPrototypeOf(Z);return(K===null||K===Object.prototype||Object.getPrototypeOf(K)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}function r7(){let Z=[],K={run:Q,use:J};return K;function Q(...X){let H=-1,W=X.pop();if(typeof W!=="function")throw TypeError("Expected function as last argument, not "+W);G(null,...X);function G(Y,...D){let q=Z[++H],_=-1;if(Y){W(Y);return}while(++_<X.length)if(D[_]===null||D[_]===void 0)D[_]=X[_];if(X=D,q)e4(q,G)(...D);else W(null,...D)}}function J(X){if(typeof X!=="function")throw TypeError("Expected `middelware` to be a function, not "+X);return Z.push(X),K}}function e4(Z,K){let Q;return J;function J(...W){let G=Z.length>W.length,Y;if(G)W.push(X);try{Y=Z.apply(this,W)}catch(D){let q=D;if(G&&Q)throw q;return X(q)}if(!G)if(Y&&Y.then&&typeof Y.then==="function")Y.then(H,X);else if(Y instanceof Error)X(Y);else H(Y)}function X(W,...G){if(!Q)Q=!0,K(W,...G)}function H(W){X(null,W)}}var V5={basename:R9,dirname:A9,extname:z9,join:T9,sep:"/"};function R9(Z,K){if(K!==void 0&&typeof K!=="string")throw TypeError('"ext" argument must be a string');B6(Z);let Q=0,J=-1,X=Z.length,H;if(K===void 0||K.length===0||K.length>Z.length){while(X--)if(Z.codePointAt(X)===47){if(H){Q=X+1;break}}else if(J<0)H=!0,J=X+1;return J<0?"":Z.slice(Q,J)}if(K===Z)return"";let W=-1,G=K.length-1;while(X--)if(Z.codePointAt(X)===47){if(H){Q=X+1;break}}else{if(W<0)H=!0,W=X+1;if(G>-1)if(Z.codePointAt(X)===K.codePointAt(G--)){if(G<0)J=X}else G=-1,J=W}if(Q===J)J=W;else if(J<0)J=Z.length;return Z.slice(Q,J)}function A9(Z){if(B6(Z),Z.length===0)return".";let K=-1,Q=Z.length,J;while(--Q)if(Z.codePointAt(Q)===47){if(J){K=Q;break}}else if(!J)J=!0;return K<0?Z.codePointAt(0)===47?"/":".":K===1&&Z.codePointAt(0)===47?"//":Z.slice(0,K)}function z9(Z){B6(Z);let K=Z.length,Q=-1,J=0,X=-1,H=0,W;while(K--){let G=Z.codePointAt(K);if(G===47){if(W){J=K+1;break}continue}if(Q<0)W=!0,Q=K+1;if(G===46){if(X<0)X=K;else if(H!==1)H=1}else if(X>-1)H=-1}if(X<0||Q<0||H===0||H===1&&X===Q-1&&X===J+1)return"";return Z.slice(X,Q)}function T9(...Z){let K=-1,Q;while(++K<Z.length)if(B6(Z[K]),Z[K])Q=Q===void 0?Z[K]:Q+"/"+Z[K];return Q===void 0?".":j9(Q)}function j9(Z){B6(Z);let K=Z.codePointAt(0)===47,Q=C9(Z,!K);if(Q.length===0&&!K)Q=".";if(Q.length>0&&Z.codePointAt(Z.length-1)===47)Q+="/";return K?"/"+Q:Q}function C9(Z,K){let Q="",J=0,X=-1,H=0,W=-1,G,Y;while(++W<=Z.length){if(W<Z.length)G=Z.codePointAt(W);else if(G===47)break;else G=47;if(G===47){if(X===W-1||H===1);else if(X!==W-1&&H===2){if(Q.length<2||J!==2||Q.codePointAt(Q.length-1)!==46||Q.codePointAt(Q.length-2)!==46){if(Q.length>2){if(Y=Q.lastIndexOf("/"),Y!==Q.length-1){if(Y<0)Q="",J=0;else Q=Q.slice(0,Y),J=Q.length-1-Q.lastIndexOf("/");X=W,H=0;continue}}else if(Q.length>0){Q="",J=0,X=W,H=0;continue}}if(K)Q=Q.length>0?Q+"/..":"..",J=2}else{if(Q.length>0)Q+="/"+Z.slice(X+1,W);else Q=Z.slice(X+1,W);J=W-X-1}X=W,H=0}else if(G===46&&H>-1)H++;else H=-1}return Q}function B6(Z){if(typeof Z!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(Z))}var Z0={cwd:O9};function O9(){return"/"}function c5(Z){return Boolean(Z!==null&&typeof Z==="object"&&"href"in Z&&Z.href&&"protocol"in Z&&Z.protocol&&Z.auth===void 0)}function K0(Z){if(typeof Z==="string")Z=new URL(Z);else if(!c5(Z)){let K=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+Z+"`");throw K.code="ERR_INVALID_ARG_TYPE",K}if(Z.protocol!=="file:"){let K=TypeError("The URL must be of scheme file");throw K.code="ERR_INVALID_URL_SCHEME",K}return w9(Z)}function w9(Z){if(Z.hostname!==""){let J=TypeError('File URL host must be "localhost" or empty on darwin');throw J.code="ERR_INVALID_FILE_URL_HOST",J}let K=Z.pathname,Q=-1;while(++Q<K.length)if(K.codePointAt(Q)===37&&K.codePointAt(Q+1)===50){let J=K.codePointAt(Q+2);if(J===70||J===102){let X=TypeError("File URL path must not include encoded / characters");throw X.code="ERR_INVALID_FILE_URL_PATH",X}}return decodeURIComponent(K)}var a7=["history","path","basename","stem","extname","dirname"];class s5{constructor(Z){let K;if(!Z)K={};else if(c5(Z))K={path:Z};else if(typeof Z==="string"||P9(Z))K={value:Z};else K=Z;this.cwd="cwd"in K?"":Z0.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let Q=-1;while(++Q<a7.length){let X=a7[Q];if(X in K&&K[X]!==void 0&&K[X]!==null)this[X]=X==="history"?[...K[X]]:K[X]}let J;for(J in K)if(!a7.includes(J))this[J]=K[J]}get basename(){return typeof this.path==="string"?V5.basename(this.path):void 0}set basename(Z){c7(Z,"basename"),d7(Z,"basename"),this.path=V5.join(this.dirname||"",Z)}get dirname(){return typeof this.path==="string"?V5.dirname(this.path):void 0}set dirname(Z){Q0(this.basename,"dirname"),this.path=V5.join(Z||"",this.basename)}get extname(){return typeof this.path==="string"?V5.extname(this.path):void 0}set extname(Z){if(d7(Z,"extname"),Q0(this.dirname,"extname"),Z){if(Z.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(Z.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=V5.join(this.dirname,this.stem+(Z||""))}get path(){return this.history[this.history.length-1]}set path(Z){if(c5(Z))Z=K0(Z);if(c7(Z,"path"),this.path!==Z)this.history.push(Z)}get stem(){return typeof this.path==="string"?V5.basename(this.path,this.extname):void 0}set stem(Z){c7(Z,"stem"),d7(Z,"stem"),this.path=V5.join(this.dirname||"",Z+(this.extname||""))}fail(Z,K,Q){let J=this.message(Z,K,Q);throw J.fatal=!0,J}info(Z,K,Q){let J=this.message(Z,K,Q);return J.fatal=void 0,J}message(Z,K,Q){let J=new s(Z,K,Q);if(this.path)J.name=this.path+":"+J.name,J.file=this.path;return J.fatal=!1,this.messages.push(J),J}toString(Z){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder(Z||void 0).decode(this.value)}}function d7(Z,K){if(Z&&Z.includes(V5.sep))throw Error("`"+K+"` cannot be a path: did not expect `"+V5.sep+"`")}function c7(Z,K){if(!Z)throw Error("`"+K+"` cannot be empty")}function Q0(Z,K){if(!Z)throw Error("Setting `"+K+"` requires `path` to be set too")}function P9(Z){return Boolean(Z&&typeof Z==="object"&&"byteLength"in Z&&"byteOffset"in Z)}var J0=function(Z){let J=this.constructor.prototype,X=J[Z],H=function(){return X.apply(H,arguments)};return Object.setPrototypeOf(H,J),H};var I9={}.hasOwnProperty;class t7 extends J0{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=r7()}copy(){let Z=new t7,K=-1;while(++K<this.attachers.length){let Q=this.attachers[K];Z.use(...Q)}return Z.data(e6.default(!0,{},this.namespace)),Z}data(Z,K){if(typeof Z==="string"){if(arguments.length===2)return o7("data",this.frozen),this.namespace[Z]=K,this;return I9.call(this.namespace,Z)&&this.namespace[Z]||void 0}if(Z)return o7("data",this.frozen),this.namespace=Z,this;return this.namespace}freeze(){if(this.frozen)return this;let Z=this;while(++this.freezeIndex<this.attachers.length){let[K,...Q]=this.attachers[this.freezeIndex];if(Q[0]===!1)continue;if(Q[0]===!0)Q[0]=void 0;let J=K.call(Z,...Q);if(typeof J==="function")this.transformers.use(J)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(Z){this.freeze();let K=t6(Z),Q=this.parser||this.Parser;return s7("parse",Q),Q(String(K),K)}process(Z,K){let Q=this;return this.freeze(),s7("process",this.parser||this.Parser),n7("process",this.compiler||this.Compiler),K?J(void 0,K):new Promise(J);function J(X,H){let W=t6(Z),G=Q.parse(W);Q.run(G,W,function(D,q,_){if(D||!q||!_)return Y(D);let V=q,$=Q.stringify(V,_);if(S9($))_.value=$;else _.result=$;Y(D,_)});function Y(D,q){if(D||!q)H(D);else if(X)X(q);else Q5(K,"`done` is defined if `resolve` is not"),K(void 0,q)}}}processSync(Z){let K=!1,Q;return this.freeze(),s7("processSync",this.parser||this.Parser),n7("processSync",this.compiler||this.Compiler),this.process(Z,J),H0("processSync","process",K),Q5(Q,"we either bailed on an error or have a tree"),Q;function J(X,H){K=!0,i7(X),Q=H}}run(Z,K,Q){X0(Z),this.freeze();let J=this.transformers;if(!Q&&typeof K==="function")Q=K,K=void 0;return Q?X(void 0,Q):new Promise(X);function X(H,W){Q5(typeof K!=="function","`file` can’t be a `done` anymore, we checked");let G=t6(K);J.run(Z,G,Y);function Y(D,q,_){let V=q||Z;if(D)W(D);else if(H)H(V);else Q5(Q,"`done` is defined if `resolve` is not"),Q(void 0,V,_)}}}runSync(Z,K){let Q=!1,J;return this.run(Z,K,X),H0("runSync","run",Q),Q5(J,"we either bailed on an error or have a tree"),J;function X(H,W){i7(H),J=W,Q=!0}}stringify(Z,K){this.freeze();let Q=t6(K),J=this.compiler||this.Compiler;return n7("stringify",J),X0(Z),J(Z,Q)}use(Z,...K){let Q=this.attachers,J=this.namespace;if(o7("use",this.frozen),Z===null||Z===void 0);else if(typeof Z==="function")G(Z,K);else if(typeof Z==="object")if(Array.isArray(Z))W(Z);else H(Z);else throw TypeError("Expected usable value, not `"+Z+"`");return this;function X(Y){if(typeof Y==="function")G(Y,[]);else if(typeof Y==="object")if(Array.isArray(Y)){let[D,...q]=Y;G(D,q)}else H(Y);else throw TypeError("Expected usable value, not `"+Y+"`")}function H(Y){if(!("plugins"in Y)&&!("settings"in Y))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(W(Y.plugins),Y.settings)J.settings=e6.default(!0,J.settings,Y.settings)}function W(Y){let D=-1;if(Y===null||Y===void 0);else if(Array.isArray(Y))while(++D<Y.length){let q=Y[D];X(q)}else throw TypeError("Expected a list of plugins, not `"+Y+"`")}function G(Y,D){let q=-1,_=-1;while(++q<Q.length)if(Q[q][0]===Y){_=q;break}if(_===-1)Q.push([Y,...D]);else if(D.length>0){let[V,...$]=D,M=Q[_][1];if(M6(M)&&M6(V))V=e6.default(!0,M,V);Q[_]=[Y,V,...$]}}}}var e7=new t7().freeze();function s7(Z,K){if(typeof K!=="function")throw TypeError("Cannot `"+Z+"` without `parser`")}function n7(Z,K){if(typeof K!=="function")throw TypeError("Cannot `"+Z+"` without `compiler`")}function o7(Z,K){if(K)throw Error("Cannot call `"+Z+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function X0(Z){if(!M6(Z)||typeof Z.type!=="string")throw TypeError("Expected node, got `"+Z+"`")}function H0(Z,K,Q){if(!Q)throw Error("`"+Z+"` finished async. Use `"+K+"` instead")}function t6(Z){return E9(Z)?Z:new s5(Z)}function E9(Z){return Boolean(Z&&typeof Z==="object"&&"message"in Z&&"messages"in Z)}function S9(Z){return typeof Z==="string"||b9(Z)}function b9(Z){return Boolean(Z&&typeof Z==="object"&&"byteLength"in Z&&"byteOffset"in Z)}var g9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",W0=[],G0={allowDangerousHtml:!0},y9=/^(https?|ircs?|mailto|xmpp)$/i,h9=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function F6(Z){let K=x9(Z),Q=k9(Z);return m9(K.runSync(K.parse(Q),Q),Z)}function x9(Z){let K=Z.rehypePlugins||W0,Q=Z.remarkPlugins||W0,J=Z.remarkRehypeOptions?{...Z.remarkRehypeOptions,...G0}:G0;return e7().use(v6).use(Q).use(n6,J).use(K)}function k9(Z){let K=Z.children||"",Q=new s5;if(typeof K==="string")Q.value=K;else A6("Unexpected value `"+K+"` for `children` prop, expected `string`");return Q}function m9(Z,K){let{allowedElements:Q,allowElement:J,components:X,disallowedElements:H,skipHtml:W,unwrapDisallowed:G}=K,Y=K.urlTransform||D0;for(let q of h9)if(Object.hasOwn(K,q.from))A6("Unexpected `"+q.from+"` prop, "+(q.to?"use `"+q.to+"` instead":"remove it")+" (see <"+g9+"#"+q.id+"> for more info)");if(Q&&H)A6("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");return L6(Z,D),L7(Z,{Fragment:Y0,components:X,ignoreInvalidStyle:!0,jsx:b,jsxs:l,passKeys:!0,passNode:!0});function D(q,_,V){if(q.type==="raw"&&V&&typeof _==="number"){if(W)V.children.splice(_,1);else V.children[_]={type:"text",value:q.value};return _}if(q.type==="element"){let $;for($ in X6)if(Object.hasOwn(X6,$)&&Object.hasOwn(q.properties,$)){let M=q.properties[$],B=X6[$];if(B===null||B.includes(q.tagName))q.properties[$]=Y(String(M||""),$,q)}}if(q.type==="element"){let $=Q?!Q.includes(q.tagName):H?H.includes(q.tagName):!1;if(!$&&J&&typeof _==="number")$=!J(q,_,V);if($&&V&&typeof _==="number"){if(G&&q.children)V.children.splice(_,1,...q.children);else V.children.splice(_,1);return _}}}}function D0(Z){let K=Z.indexOf(":"),Q=Z.indexOf("?"),J=Z.indexOf("#"),X=Z.indexOf("/");if(K===-1||X!==-1&&K>X||Q!==-1&&K>Q||J!==-1&&K>J||y9.test(Z.slice(0,K)))return Z;return""}var A0=P6(q0(),1);var ZZ=(Z)=>{return Z.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")};function EW({sessionId:Z,open:K,onOpenChange:Q}){let{data:J,isLoading:X}=U0({queryKey:["agent-sessions",Z,"entries"],queryFn:async()=>{if(!Z)return[];let H=await _0.api["agent-sessions"][":sessionId"].entries.$get({param:{sessionId:Z}});if(!H.ok)throw Error("Failed to fetch session logs");return await H.json()},enabled:K&&!!Z});return b(N0,{open:K,onOpenChange:Q,children:l(L0,{className:"sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl",children:[l(M0,{className:"pb-4 border-b border-foreground/15",children:[l(B0,{className:"flex items-center gap-2 text-xl font-bold",children:[b(KZ,{className:"w-5 h-5 text-violet-500"}),H5.agent_session_logs()]}),b(F0,{children:H5.agent_logs_description()})]}),b("div",{className:"flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text",children:X?l("div",{className:"space-y-4",children:[l("div",{className:"flex gap-4",children:[b(k5,{className:"h-5 w-5 rounded-full shrink-0"}),l("div",{className:"flex-1 space-y-2",children:[b(k5,{className:"h-4 w-1/4"}),b(k5,{className:"h-20 w-full"})]})]}),l("div",{className:"flex gap-4",children:[b(k5,{className:"h-5 w-5 rounded-full shrink-0"}),l("div",{className:"flex-1 space-y-2",children:[b(k5,{className:"h-4 w-1/4"}),b(k5,{className:"h-12 w-full"})]})]})]}):J&&J.length>0?b("div",{className:"flex flex-col",children:J.map((H)=>{let W=H.entry,G=W?.timestamp||H.timestamp,Y="";if(typeof G==="string"||typeof G==="number"){let D=new Date(G);if(!isNaN(D.getTime()))Y=V0(D.toISOString())}if(W&&typeof W==="object"){if(W.type==="message"&&W.message){let D=W.message,q="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",_=String(D.role||"");if(D.role==="user")q="bg-slate-100 text-slate-800 dark:bg-slate-900/30 dark:text-slate-300",_=H5.role_user();else if(D.role==="assistant")q="bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",_=H5.role_agent();else if(D.role==="toolResult")q=D.isError?"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300",_=H5.tool_result_with_name({name:String(D.toolName||H5.unknown())});else if(D.role==="thought")q="bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",_=H5.role_thinking();let V=(M)=>{let B=M;if(typeof M==="string")try{B=JSON.parse(M)}catch{}if(B&&typeof B==="object"&&!Array.isArray(B))return b("div",{className:"mt-1 space-y-1.5 pt-3",children:Object.entries(B).map(([R,w])=>{let C=w&&typeof w==="object"?JSON.stringify(w,null,2):String(w);return l("div",{className:"text-xs leading-relaxed break-words",children:[l("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:[R,":"]})," ",b("span",{className:"text-foreground/90 font-mono whitespace-pre-wrap",children:C})]},R)})});return b("div",{className:"text-xs font-mono whitespace-pre-wrap",children:String(M)})},$=()=>{let M=D.content;if(!M)return null;if(typeof M==="string"){if(!M.trim())return null;return b("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:b(F6,{children:ZZ(M)})})}if(Array.isArray(M)){let B=[];if(M.forEach((j,R)=>{if(!j)return;if(typeof j==="string"){if(!j.trim())return;B.push(b("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:b(F6,{children:ZZ(j)})},`str-${R}`));return}if(typeof j==="object"){let w=j,C=w.type;if(C==="text"){let k=w.text;if(typeof k!=="string"||!k.trim())return;B.push(b("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:b(F6,{children:ZZ(k)})},`txt-${R}`));return}if(C==="toolCall"){let k=String(w.name||w.toolName||H5.unknown()),F=w.arguments||w.args;B.push(l("div",{className:"text-xs space-y-2 py-1",children:[l("div",{className:"font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5",children:[H5.calling_tool()," ",b("span",{className:"font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]",children:k})]}),!!F&&l("div",{className:"space-y-1 pt-3",children:[b("div",{className:"text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider",children:H5.tool_arguments()}),V(F)]})]},`tool-${R}`));return}if(C==="image"){B.push(b("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:H5.image_object()},`img-${R}`));return}let v=JSON.stringify(j,null,2);if(v==="{}")return;B.push(b("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:v},`other-${R}`))}}),B.length===0)return null;return b("div",{className:"space-y-3 w-full",children:B.map((j,R)=>l(A0.default.Fragment,{children:[R>0&&b(R0,{className:"my-3 opacity-50"}),j]},R))})}return null};return l("div",{className:"relative pl-6 pb-6 last:pb-0",children:[b("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),b("div",{className:`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${D.role==="user"?"bg-slate-500":D.role==="assistant"?"bg-violet-500":D.role==="toolResult"?D.isError?"bg-red-500":"bg-emerald-500":"bg-amber-500"}`}),l("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[l("div",{className:"flex items-center justify-between gap-2",children:[l("div",{className:"flex items-center gap-2 flex-wrap",children:[b("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${q}`,children:_}),l("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",H.id]})]}),b("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:Y})]}),$()]})]},H.id)}}return l("div",{className:"relative pl-6 pb-6 last:pb-0",children:[b("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),b("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400"}),l("div",{className:"bg-muted/30 p-3 rounded-lg border border-foreground/5",children:[l("div",{className:"flex items-center justify-between gap-2 mb-1.5 flex-wrap",children:[l("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",H.id]}),b("div",{className:"text-[10px] text-muted-foreground/60",children:Y})]}),b("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words",children:JSON.stringify(H.entry,null,2)})]})]},H.id)})}):l("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[b(KZ,{className:"w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse"}),b("p",{className:"text-sm font-medium",children:H5.no_logs_found()}),b("p",{className:"text-xs text-muted-foreground/60 mt-1",children:H5.session_no_entries_yet()})]})})]})})}
|
|
15
|
+
export{F6 as s,EW as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{$b as K}from"./chunk-ss45w8ks.js";import{nc as C,oc as T}from"./chunk-gn8snrnk.js";import{oe as U,pe as V}from"./chunk-a10tf0d8.js";import{Ze as j}from"./chunk-w9w5301f.js";import{df as $}from"./chunk-wny0qagx.js";import"./chunk-hz31j0hk.js";import"./chunk-ws07a9kv.js";class W extends Error{code;diagnosticDetails;constructor(z,q,F){super(z);this.name="PiMessagesResponseError",this.code=q,this.diagnosticDetails=F}}function Y(z){return typeof z==="object"&&z!==null&&!Array.isArray(z)}function D(z){try{let q=JSON.parse(z);return Y(q)&&Y(q.error)?q:void 0}catch{return}}function h(z){return z.length>8192?`${z.slice(0,8192)}\u2026`:z}function J(z,q,F){let k=typeof F?.error?.message==="string"?F.error.message:void 0,G=typeof F?.error?.code==="string"?F.error.code:void 0,H=k??q,I=G?` (${G})`:"";return`${z.status} ${z.statusText}: ${H}${I}`}function w(z,q,F,k){let G=D(k),H=typeof G?.error?.code==="string"?G.error.code:void 0;return new W(J(F,k,G),H,{version:1,provider:z.provider,model:z.id,url:q.toString(),status:F.status,statusText:F.statusText,error:G?.error,body:G?void 0:h(k),timestampMs:Date.now()})}function A(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}function Z(z,q){if(!q)return;V(z,{type:"pi_messages_rewrite",timestamp:Date.now(),details:{...q}})}function S(z){let q={role:"assistant",content:[],api:z.api,provider:z.provider,model:z.id,usage:A(),stopReason:"stop",timestamp:Date.now()},F=new Map;return(k)=>{switch(k.type){case"done":return Object.assign(q,{stopReason:k.reason,usage:k.usage,responseId:k.responseId}),Z(q,k.rewrite),{type:"done",reason:k.reason,message:q};case"error":return Object.assign(q,{stopReason:k.reason,usage:k.usage,errorMessage:k.errorMessage,responseId:k.responseId}),Z(q,k.rewrite),{type:"error",reason:k.reason,error:q};case"start":break;case"text_start":q.content[k.contentIndex]={type:"text",text:""};break;case"text_delta":q.content[k.contentIndex].text+=k.delta;break;case"text_end":Object.assign(q.content[k.contentIndex],{text:k.content,textSignature:k.contentSignature});break;case"thinking_start":q.content[k.contentIndex]={type:"thinking",thinking:""};break;case"thinking_delta":q.content[k.contentIndex].thinking+=k.delta;break;case"thinking_end":Object.assign(q.content[k.contentIndex],{thinking:k.content,thinkingSignature:k.contentSignature,redacted:k.redacted});break;case"toolcall_start":q.content[k.contentIndex]={type:"toolCall",id:k.id,name:k.toolName,arguments:{}},F.set(k.contentIndex,"");break;case"toolcall_delta":{let G=`${F.get(k.contentIndex)??""}${k.delta}`;F.set(k.contentIndex,G),q.content[k.contentIndex].arguments=j(G);break}case"toolcall_end":return Object.assign(q.content[k.contentIndex],k.toolCall),F.delete(k.contentIndex),{type:"toolcall_end",contentIndex:k.contentIndex,toolCall:q.content[k.contentIndex],partial:q}}return{...k,partial:q}}}async function*P(z){let q=new TextDecoder,F=z.getReader(),k="";try{while(!0){let{done:G,value:H}=await F.read();k+=G?q.decode():q.decode(H,{stream:!0}),k=k.replace(/\r\n/g,`
|
|
3
3
|
`);let I=k.indexOf(`
|
|
4
4
|
|
|
5
5
|
`);while(I!==-1){let N=_(k.slice(0,I));if(N)yield N;k=k.slice(I+2),I=k.indexOf(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Sa as BK,Ua as gJ}from"./chunk-8rkp0fc5.js";import{Wa as ZJ}from"./chunk-cwebycwv.js";import{$a as ZK,ab as _K,bb as $K,cb as GK,db as zK,eb as QK,fb as HK,gb as UK}from"./chunk-2m2saan7.js";import{pg as $J}from"./chunk-z5p39kpk.js";import{Rg as N,Sg as QJ,Ug as HJ,Vg as UJ,Wg as w,_g as KK,dh as WK,eh as XK,fh as TJ,gh as RJ,hh as SJ,ih as fJ,jh as hJ,kh as YK}from"./chunk-8a9k4qj6.js";import{Ah as dJ,Bh as h,Bi as XJ,Ch as GJ,Ci as YJ,Dj as uJ,Ei as tJ,Ki as DJ,Qi as eJ,Rh as z,Th as U,Xi as kJ,ai as zJ,bi as p,fi as nJ,hi as aJ,hk as O,nh as NK,nk as W,oh as iJ,ph as J,pj as wJ,qh as X,qi as rJ,rh as lJ,vj as JK,wh as v,xh as _J,xi as oJ,zi as sJ}from"./chunk-q0dhm16d.js";import{Wk as vK}from"./chunk-6f1twjf6.js";var _=vK(NK(),1);function cK({teamId:B,projectId:Z,projectName:$,rootFolderId:P,dragState:b,onSelect:M,selectedFolderId:A,hideCollections:m,hideShares:C,ancestorFolders:D}){let q=GJ(),Q=lJ(),{canEdit:V}=WK(Z),j=dJ({from:"/projects/$projectId/recently-deleted",shouldThrow:!1}),[L,r]=_.useState(!0),[T,BJ]=_.useState(!0),[u,bJ]=_.useState(!0),{data:c,fetchNextPage:i,hasNextPage:g,isFetchingNextPage:R}=_J({queryKey:["shares",Z],queryFn:async({pageParam:K})=>{let Y=await U.api.projects[":projectId"].shares.$get({param:{projectId:Z},query:{first:"20",after:K}});if(!Y.ok)throw Error(W.failed_fetch_share_links());return await Y.json()},initialPageParam:"",getNextPageParam:(K)=>K.pageInfo?.cursor||void 0,enabled:!!Z}),{data:l,fetchNextPage:o,hasNextPage:d,isFetchingNextPage:n}=_J({queryKey:["collections",Z],queryFn:async({pageParam:K})=>{let Y=await U.api.projects[":projectId"].collections.$get({param:{projectId:Z},query:{first:"20",after:K}});if(!Y.ok)throw Error(W.failed_fetch_collections());return await Y.json()},initialPageParam:"",getNextPageParam:(K)=>K.pageInfo?.cursor||void 0,enabled:!!Z}),{ref:qJ,inView:s}=$J(),{ref:VJ,inView:t}=$J();_.useEffect(()=>{if(s&&d&&!n)o()},[s,d,n,o]),_.useEffect(()=>{if(t&&g&&!R)i()},[t,g,R,i]);let AJ=_.useMemo(()=>l?.pages.flatMap((K)=>K.data)||[],[l]),OJ=_.useMemo(()=>c?.pages.flatMap((K)=>K.data)||[],[c]),{mutate:PJ}=v({mutationFn:async()=>{let K=await U.api.projects[":projectId"].collections.$post({param:{projectId:Z},json:{name:W.untitled_collection(),filter:{sourceFolderId:P,searchFilter:{conditions:[],recursively:!0}}}});if(!K.ok)throw Error(W.failed_create_collection());return await K.json()},onSuccess:(K)=>{Q.invalidateQueries({queryKey:["collections",Z]}),z.success(W.collection_created()),q({to:"/projects/$projectId/collections/$collectionId",params:{projectId:Z,collectionId:K.id}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:MJ}=v({mutationFn:async()=>{let K=await U.api.projects[":projectId"].shares.$post({param:{projectId:Z},json:{name:new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}});if(!K.ok)throw Error(W.failed_create_share_link());return await K.json()},onSuccess:(K)=>{Q.invalidateQueries({queryKey:["shares",Z]}),z.success(W.share_link_created()),q({to:"/projects/$projectId/shares/$shareId",params:{projectId:Z,shareId:K.id}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),e=h({from:"/projects/$projectId/collections/$collectionId",shouldThrow:!1}),LJ=h({from:"/projects/$projectId/shares/$shareId",shouldThrow:!1}),G=h({from:"/projects/$projectId/folders/$folderId",shouldThrow:!1}),[y,yJ]=_.useState(null),[F,EJ]=_.useState("collection"),[E,JJ]=_.useState(""),[qK,k]=_.useState(!1),[vJ,NJ]=_.useState(null),[S,CJ]=_.useState("collection"),[VK,f]=_.useState(!1),{mutate:IJ}=v({mutationFn:async({id:K,name:Y})=>{let H=await U.api.folders[":folderId"].$put({param:{folderId:K},json:{name:Y}});if(!H.ok)throw Error(W.failed_rename_folder());return await H.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["search",B]}),Q.invalidateQueries({queryKey:["folders"]}),z.success(W.folder_renamed()),k(!1)},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:AK}=v({mutationFn:async(K)=>{if(!(await U.api.folders.$delete({json:{ids:[K]}})).ok)throw Error(W.failed_delete_folder());return K},onSuccess:(K)=>{if(Q.invalidateQueries({queryKey:["search",B]}),Q.invalidateQueries({queryKey:["folders"]}),z.success(W.folder_deleted()),f(!1),G?.folderId===K)q({to:"/projects/$projectId",params:{projectId:Z}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),[OK,a]=_.useState(!1),[KJ,xJ]=_.useState(!1),[FJ,pJ]=_.useState([]),PK=async(K)=>{a(!0),xJ(!0),pJ([]);try{let Y=await U.api.files["download-links"].$post({json:{ids:[K]}});if(!Y.ok)throw Error(W.failed_to_prepare_download_links());let H=await Y.json();pJ(H.files)}catch(Y){z.error(W.failed_to_prepare_download_links()),a(!1),console.error(Y)}finally{xJ(!1)}},MK=()=>{let K=[...FJ];if(a(!1),K.length===0)return;z.info(W.starting_download_files({count:K.length}),{duration:5000});let Y=(WJ)=>new Promise((I)=>setTimeout(I,WJ));(async()=>{for(let I=0;I<K.length;I+=5){let EK=K.slice(I,I+5);for(let cJ of EK){let x=document.createElement("a");x.href=cJ.url,x.download=cJ.name,x.target="_blank",document.body.appendChild(x),x.click(),x.remove()}await Y(1000)}})().catch((WJ)=>{console.error("Background downloads failed:",WJ),z.error(W.some_downloads_failed())})},{mutate:mJ}=v({mutationFn:async({id:K,name:Y})=>{let H=await U.api.collections[":collectionId"].$patch({param:{collectionId:K},json:{name:Y}});if(!H.ok)throw Error(W.failed_rename_collection());return await H.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["collections",Z]}),z.success(W.collection_renamed()),k(!1)},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:LK}=v({mutationFn:async(K)=>{let Y=await U.api.collections[":collectionId"].$delete({param:{collectionId:K}});if(!Y.ok)throw Error(W.failed_delete_collection());return await Y.json()},onSuccess:(K,Y)=>{if(Q.invalidateQueries({queryKey:["collections",Z]}),z.success(W.collection_deleted()),f(!1),e?.collectionId===Y)q({to:"/projects/$projectId",params:{projectId:Z}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:jJ}=v({mutationFn:async({id:K,name:Y})=>{let H=await U.api.shares[":shareId"].$put({param:{shareId:K},json:{name:Y}});if(!H.ok)throw Error(W.failed_rename_share_link());return await H.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["shares",Z]}),z.success(W.share_link_renamed()),k(!1)},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:yK}=v({mutationFn:async(K)=>{if(!(await U.api.shares[":shareId"].$delete({param:{shareId:K}})).ok)throw Error(W.failed_delete_share_link());return K},onSuccess:(K)=>{if(Q.invalidateQueries({queryKey:["shares",Z]}),z.success(W.share_link_deleted()),f(!1),LJ?.shareId===K)q({to:"/projects/$projectId",params:{projectId:Z}})},onError:(K)=>{z.error(`Error: ${K.message}`)}});return X("div",{className:"flex flex-col h-full overflow-hidden p-3 gap-4 bg-background",children:[X("div",{className:O("flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4",L?"flex-1 min-h-[50%] h-full":"flex-none h-[44px] max-h-[44px]"),children:[J("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:X("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>r(!L),children:[J("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:W.folder_tree_assets()}),L?J(XJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):J(YJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]})}),J(ZJ,{className:O("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",L?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:X("div",{className:"space-y-0.5 pr-3",children:[J(bK,{teamId:B,projectId:Z,folder:{id:P,name:$,type:"folder",sizeByte:0,fileCount:0,status:"processed",createdAt:"",updatedAt:""},level:0,isRoot:!0,dragState:b,onSelect:M,selectedFolderId:A,canEdit:V,onRenameTrigger:(K,Y)=>{yJ(K),EJ("folder"),JJ(Y),k(!0)},onDeleteTrigger:(K)=>{NJ(K),CJ("folder"),f(!0)},onDownloadTrigger:(K)=>{PK(K)},ancestorFolders:D},P),V&&X("div",{className:O("group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",j&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>q({to:"/projects/$projectId/recently-deleted",params:{projectId:Z}}),children:[J("div",{className:"flex h-4 w-4 items-center justify-center",children:J(uJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:W.recently_deleted()})]})]})})]}),!m&&X("div",{className:O("flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4",T?"flex-1 min-h-0 h-full":"flex-none h-[44px] max-h-[44px]"),children:[X("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:[X("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>BJ(!T),children:[J("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:W.collections()}),T?J(XJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):J(YJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}),V&&J("button",{onClick:()=>PJ(),className:"text-muted-foreground hover:text-foreground flex-none",children:J(wJ,{className:"h-3.5 w-3.5"})})]}),J(ZJ,{className:O("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",T?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:X("div",{className:"space-y-0.5 pr-3",children:[X("div",{className:"group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>q({to:"/projects/$projectId/collections",params:{projectId:Z}}),children:[J("div",{className:"flex h-4 w-4 items-center justify-center",children:J(kJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:W.all_collections_count({count:l?.pages[0]?.pageInfo?.total||0})})]}),AJ.map((K)=>{let Y=e?.collectionId===K.id;return X("div",{className:O("group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",Y&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>q({to:"/projects/$projectId/collections/$collectionId",params:{projectId:Z,collectionId:K.id}}),children:[X("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[J("div",{className:"flex h-4 w-4 items-center justify-center shrink-0",children:J(rJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"truncate text-sidebar-foreground flex-1",children:K.name})]}),V&&J("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(H)=>H.stopPropagation(),children:X(QJ,{modal:!1,children:[J(HJ,{asChild:!0,children:J(N,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:J(zJ,{className:"h-3.5 w-3.5"})})}),X(UJ,{align:"end",className:"w-32",children:[J(w,{onClick:()=>{yJ(K.id),EJ("collection"),JJ(K.name),k(!0)},children:W.rename()}),J(w,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{NJ(K.id),CJ("collection"),f(!0)},children:W.delete()})]})]})})]},K.id)}),J("div",{ref:qJ,className:"h-1"}),n&&J("div",{className:"flex justify-center p-2",children:J(p,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})})]}),!C&&X("div",{className:O("flex flex-col overflow-hidden transition-all duration-300 ease-in-out",u?"flex-1 min-h-0 h-full":"flex-none h-[44px] max-h-[44px]"),children:[X("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:[X("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>bJ(!u),children:[J("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:W.share_links()}),u?J(XJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):J(YJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}),V&&J("div",{className:"flex items-center gap-1 flex-none",children:J("button",{onClick:()=>MJ(),className:"text-muted-foreground hover:text-foreground",children:J(wJ,{className:"h-3.5 w-3.5"})})})]}),J(ZJ,{className:O("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",u?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:X("div",{className:"space-y-0.5 pr-3",children:[X("div",{className:"group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>q({to:"/projects/$projectId/shares",params:{projectId:Z}}),children:[J("div",{className:"flex h-4 w-4 items-center justify-center",children:J(kJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:W.all_share_links_count({count:c?.pages[0]?.pageInfo?.total||0})})]}),OJ.map((K)=>J(CK,{link:K,projectId:Z,dragState:b,canEdit:V,onRenameTrigger:(Y,H)=>{yJ(Y),EJ("share"),JJ(H),k(!0)},onDeleteTrigger:(Y)=>{NJ(Y),CJ("share"),f(!0)}},K.id)),J("div",{ref:VJ,className:"h-1"}),R&&J("div",{className:"flex justify-center p-2",children:J(p,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})})]}),J(TJ,{open:qK,onOpenChange:k,children:X(RJ,{onClick:(K)=>K.stopPropagation(),children:[J(SJ,{children:J(hJ,{children:F==="collection"?W.rename_collection():F==="share"?W.rename_share_link():W.rename_folder()})}),J("div",{className:"py-4",children:J(XK,{value:E,onChange:(K)=>JJ(K.target.value),placeholder:W.enter_new_name(),onKeyDown:(K)=>{if(K.key==="Enter"&&E.trim()){if(F==="collection")mJ({id:y,name:E});else if(F==="share")jJ({id:y,name:E});else if(F==="folder")IJ({id:y,name:E})}}})}),X(fJ,{children:[J(N,{variant:"ghost",onClick:()=>k(!1),children:W.cancel()}),J(N,{disabled:!E.trim(),onClick:()=>{if(F==="collection")mJ({id:y,name:E});else if(F==="share")jJ({id:y,name:E});else if(F==="folder")IJ({id:y,name:E})},children:W.rename()})]})]})}),J(ZK,{open:VK,onOpenChange:f,children:X(_K,{onClick:(K)=>K.stopPropagation(),children:[X($K,{children:[J(zK,{children:S==="collection"?W.delete_collection_confirm():S==="share"?W.delete_share_link_confirm():W.delete_folder_confirm()}),J(QK,{children:W.delete_confirm_description({type:S==="collection"?W.collection():S==="share"?W.share_link():W.folder().toLowerCase()})})]}),X(GK,{children:[J(UK,{children:W.cancel()}),J(HK,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{if(S==="collection")LK(vJ);else if(S==="share")yK(vJ);else if(S==="folder")AK(vJ)},children:W.delete()})]})]})}),J(TJ,{open:OK,onOpenChange:a,children:X(RJ,{className:"sm:max-w-md",children:[X(SJ,{children:[J(hJ,{children:KJ?W.preparing_download():W.confirm_download()}),J(YK,{children:KJ?W.resolving_files_wait():W.folder_files_download_description()})]}),KJ?X("div",{className:"space-y-4 py-6 flex flex-col items-center justify-center",children:[J(p,{className:"h-8 w-8 animate-spin text-primary"}),J("span",{className:"text-sm font-medium text-muted-foreground mt-2",children:W.preparing_download_links()})]}):X("div",{className:"space-y-4 py-2",children:[J("div",{className:"text-sm text-muted-foreground",children:W.download_includes_files({count:FJ.length})}),X("div",{className:"flex items-start gap-3 p-3 text-sm rounded-lg bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-900/30",children:[J(aJ,{className:"h-5 w-5 shrink-0 mt-0.5"}),X("div",{children:[J("p",{className:"font-semibold",children:W.no_folder_structure()}),J("p",{className:"mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90",children:W.folder_structure_warning()})]})]})]}),J(fJ,{children:!KJ?X(iJ,{children:[J(N,{variant:"outline",onClick:()=>a(!1),children:W.cancel()}),X(N,{onClick:MK,className:"gap-2",disabled:FJ.length===0,children:[J(DJ,{className:"h-4 w-4"}),W.start_download()]})]}):J(N,{disabled:!0,variant:"outline",children:W.cancel()})})]})})]})}function CK({link:B,projectId:Z,dragState:$,canEdit:P,onRenameTrigger:b,onDeleteTrigger:M}){let A=GJ(),C=h({from:"/projects/$projectId/shares/$shareId",shouldThrow:!1})?.shareId===B.id,{ref:D,isDropTarget:q}=gJ({id:`share:${B.id}`,data:{type:"share-link",id:B.id}}),Q=!!$?.isActive;return X("div",{ref:D,className:O("group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",C&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium",q&&Q&&"bg-sidebar-accent ring-2 ring-primary ring-inset"),onClick:()=>A({to:"/projects/$projectId/shares/$shareId",params:{projectId:Z,shareId:B.id}}),children:[X("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[J("div",{className:"flex h-4 w-4 items-center justify-center shrink-0",children:J(JK,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"truncate text-sidebar-foreground flex-1",children:B.name})]}),P&&J("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(V)=>V.stopPropagation(),children:X(QJ,{modal:!1,children:[J(HJ,{asChild:!0,children:J(N,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:J(zJ,{className:"h-3.5 w-3.5"})})}),X(UJ,{align:"end",className:"w-32",children:[J(w,{onClick:()=>{b(B.id,B.name)},children:W.rename()}),J(w,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{M(B.id)},children:W.delete()})]})]})})]})}function bK({teamId:B,projectId:Z,folder:$,level:P,isRoot:b,dragState:M,onSelect:A,selectedFolderId:m,canEdit:C,onRenameTrigger:D,onDeleteTrigger:q,onDownloadTrigger:Q,ancestorFolders:V}){let j=_.useMemo(()=>{return V?.some((G)=>G.id===$.id)??!1},[V,$.id]),[L,r]=_.useState(b||j);_.useEffect(()=>{if(j)r(!0)},[j]);let T=GJ(),BJ=h({from:"/projects/$projectId/folders/$folderId",select:(G)=>({folderId:G.folderId}),shouldThrow:!1}),u=h({from:"/projects/$projectId/",shouldThrow:!1}),bJ=b?!!u:BJ?.folderId===$.id,{data:c,fetchNextPage:i,hasNextPage:g,isFetchingNextPage:R,isLoading:l}=_J({queryKey:["folders",$.id,"children",{assetType:"folder"}],queryFn:async({pageParam:G})=>{let y=await U.api.folders[":folderId"].children.$get({param:{folderId:$.id},query:{assetType:"folder",after:G,first:"20"}});if(!y.ok)throw Error(W.failed_to_fetch_folder_children());return await y.json()},initialPageParam:"",getNextPageParam:(G)=>{return G.pageInfo?.cursor||void 0},enabled:L||!!b}),{ref:o,inView:d}=$J();_.useEffect(()=>{if(d&&g&&!R)i()},[d,g,R,i]);let n=c?.pages.flatMap((G)=>G.data??[])??[],qJ=(G)=>{G.stopPropagation(),r(!L)},s=()=>{if(A){A($);return}if(b)T({to:"/projects/$projectId",params:{projectId:Z}});else T({to:"/projects/$projectId/folders/$folderId",params:{projectId:Z,folderId:$.id}})},{ref:VJ,isDragging:t}=BK({id:`tree:${$.id}`,data:{type:"folder",item:$},disabled:!!b||!!A||!C}),{ref:AJ,isDropTarget:OJ}=gJ({id:`tree:${$.id}`,data:{type:"folder",item:$},disabled:M?.draggedIds.has($.id)||!!A||!C}),PJ=(G)=>{VJ(G),AJ(G)},MJ=_.useMemo(()=>{if(A)return!1;if(!M?.isActive)return!1;if(M.draggedIds.has($.id))return!1;return!0},[M,$.id,A]),e=OJ&&MJ,LJ=m===$.id;return X("div",{children:[X("div",{ref:PJ,className:O("group flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",(bJ||LJ)&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium",t&&"opacity-50",e&&"bg-sidebar-accent ring-2 ring-primary ring-inset"),style:{...b?{}:{paddingLeft:`${P*12+8}px`}},onClick:s,children:[!b&&J("button",{onClick:qJ,className:"flex h-4 w-4 items-center justify-center shrink-0",children:L?J(oJ,{className:"h-3 w-3"}):J(sJ,{className:"h-3 w-3"})}),b?J(tJ,{className:"h-4 w-4 text-sidebar-primary shrink-0"}):J(eJ,{className:"h-4 w-4 text-sidebar-primary shrink-0"}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:$.name}),C&&!b&&J("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(G)=>G.stopPropagation(),children:X(QJ,{modal:!1,children:[J(HJ,{asChild:!0,children:J(N,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:J(zJ,{className:"h-3.5 w-3.5"})})}),X(UJ,{align:"end",className:"w-32",children:[X(w,{onClick:()=>{D($.id,$.name)},children:[J(nJ,{className:"mr-2 h-4 w-4"}),W.rename()]}),X(w,{onClick:()=>{Q($.id)},children:[J(DJ,{className:"mr-2 h-4 w-4"}),W.download()]}),J(KK,{}),X(w,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{q($.id)},children:[J(uJ,{className:"mr-2 h-4 w-4"}),W.delete()]})]})]})})]}),L&&X("div",{children:[l&&J("div",{className:"flex items-center justify-center p-2",style:{paddingLeft:`${(P+1)*12+8}px`},children:J(p,{className:"h-4 w-4 animate-spin"})}),n.map((G)=>J(bK,{teamId:B,projectId:Z,folder:G,level:P+1,dragState:M,onSelect:A,selectedFolderId:m,canEdit:C,onRenameTrigger:D,onDeleteTrigger:q,onDownloadTrigger:Q,ancestorFolders:V},G.id)),g&&J("div",{ref:o,className:"flex items-center justify-center p-2",style:{paddingLeft:`${(P+1)*12+8}px`},children:R&&J(p,{className:"h-4 w-4 animate-spin"})})]})]})}
|
|
2
|
-
export{cK as
|
|
1
|
+
import{Ta as BK,Va as gJ}from"./chunk-31mjcykb.js";import{Xa as ZJ}from"./chunk-hfp4hpca.js";import{ab as ZK,bb as _K,cb as $K,db as GK,eb as zK,fb as QK,gb as HK,hb as UK}from"./chunk-20y3wte3.js";import{rg as $J}from"./chunk-yahb7wan.js";import{Rg as QJ,Tg as HJ,Ug as UJ,Vg as w,Zg as KK,ch as WK,dh as XK}from"./chunk-nr89225z.js";import{Di as DJ,Ji as eJ,Kh as z,Mh as U,Qi as kJ,Vh as zJ,Wh as p,_h as nJ,ai as aJ,ak as O,ck as N,gh as NK,hh as iJ,ih as J,ik as W,jh as X,ji as rJ,jj as wJ,jk as TJ,kh as lJ,kk as RJ,lk as SJ,mk as fJ,nk as hJ,ok as YK,ph as v,pj as JK,qh as _J,qi as oJ,si as sJ,th as dJ,uh as h,ui as XJ,vh as GJ,vi as YJ,xi as tJ,xj as uJ}from"./chunk-b1e3tec3.js";import{Xk as vK}from"./chunk-ws07a9kv.js";var _=vK(NK(),1);function cK({teamId:B,projectId:Z,projectName:$,rootFolderId:P,dragState:b,onSelect:M,selectedFolderId:A,hideCollections:m,hideShares:C,ancestorFolders:D}){let q=GJ(),Q=lJ(),{canEdit:V}=WK(Z),j=dJ({from:"/projects/$projectId/recently-deleted",shouldThrow:!1}),[L,r]=_.useState(!0),[T,BJ]=_.useState(!0),[u,bJ]=_.useState(!0),{data:c,fetchNextPage:i,hasNextPage:g,isFetchingNextPage:R}=_J({queryKey:["shares",Z],queryFn:async({pageParam:K})=>{let Y=await U.api.projects[":projectId"].shares.$get({param:{projectId:Z},query:{first:"20",after:K}});if(!Y.ok)throw Error(W.failed_fetch_share_links());return await Y.json()},initialPageParam:"",getNextPageParam:(K)=>K.pageInfo?.cursor||void 0,enabled:!!Z}),{data:l,fetchNextPage:o,hasNextPage:d,isFetchingNextPage:n}=_J({queryKey:["collections",Z],queryFn:async({pageParam:K})=>{let Y=await U.api.projects[":projectId"].collections.$get({param:{projectId:Z},query:{first:"20",after:K}});if(!Y.ok)throw Error(W.failed_fetch_collections());return await Y.json()},initialPageParam:"",getNextPageParam:(K)=>K.pageInfo?.cursor||void 0,enabled:!!Z}),{ref:qJ,inView:s}=$J(),{ref:VJ,inView:t}=$J();_.useEffect(()=>{if(s&&d&&!n)o()},[s,d,n,o]),_.useEffect(()=>{if(t&&g&&!R)i()},[t,g,R,i]);let AJ=_.useMemo(()=>l?.pages.flatMap((K)=>K.data)||[],[l]),OJ=_.useMemo(()=>c?.pages.flatMap((K)=>K.data)||[],[c]),{mutate:PJ}=v({mutationFn:async()=>{let K=await U.api.projects[":projectId"].collections.$post({param:{projectId:Z},json:{name:W.untitled_collection(),filter:{sourceFolderId:P,searchFilter:{conditions:[],recursively:!0}}}});if(!K.ok)throw Error(W.failed_create_collection());return await K.json()},onSuccess:(K)=>{Q.invalidateQueries({queryKey:["collections",Z]}),z.success(W.collection_created()),q({to:"/projects/$projectId/collections/$collectionId",params:{projectId:Z,collectionId:K.id}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:MJ}=v({mutationFn:async()=>{let K=await U.api.projects[":projectId"].shares.$post({param:{projectId:Z},json:{name:new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}});if(!K.ok)throw Error(W.failed_create_share_link());return await K.json()},onSuccess:(K)=>{Q.invalidateQueries({queryKey:["shares",Z]}),z.success(W.share_link_created()),q({to:"/projects/$projectId/shares/$shareId",params:{projectId:Z,shareId:K.id}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),e=h({from:"/projects/$projectId/collections/$collectionId",shouldThrow:!1}),LJ=h({from:"/projects/$projectId/shares/$shareId",shouldThrow:!1}),G=h({from:"/projects/$projectId/folders/$folderId",shouldThrow:!1}),[y,yJ]=_.useState(null),[F,EJ]=_.useState("collection"),[E,JJ]=_.useState(""),[qK,k]=_.useState(!1),[vJ,NJ]=_.useState(null),[S,CJ]=_.useState("collection"),[VK,f]=_.useState(!1),{mutate:IJ}=v({mutationFn:async({id:K,name:Y})=>{let H=await U.api.folders[":folderId"].$put({param:{folderId:K},json:{name:Y}});if(!H.ok)throw Error(W.failed_rename_folder());return await H.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["search",B]}),Q.invalidateQueries({queryKey:["folders"]}),z.success(W.folder_renamed()),k(!1)},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:AK}=v({mutationFn:async(K)=>{if(!(await U.api.folders.$delete({json:{ids:[K]}})).ok)throw Error(W.failed_delete_folder());return K},onSuccess:(K)=>{if(Q.invalidateQueries({queryKey:["search",B]}),Q.invalidateQueries({queryKey:["folders"]}),z.success(W.folder_deleted()),f(!1),G?.folderId===K)q({to:"/projects/$projectId",params:{projectId:Z}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),[OK,a]=_.useState(!1),[KJ,xJ]=_.useState(!1),[FJ,pJ]=_.useState([]),PK=async(K)=>{a(!0),xJ(!0),pJ([]);try{let Y=await U.api.files["download-links"].$post({json:{ids:[K]}});if(!Y.ok)throw Error(W.failed_to_prepare_download_links());let H=await Y.json();pJ(H.files)}catch(Y){z.error(W.failed_to_prepare_download_links()),a(!1),console.error(Y)}finally{xJ(!1)}},MK=()=>{let K=[...FJ];if(a(!1),K.length===0)return;z.info(W.starting_download_files({count:K.length}),{duration:5000});let Y=(WJ)=>new Promise((I)=>setTimeout(I,WJ));(async()=>{for(let I=0;I<K.length;I+=5){let EK=K.slice(I,I+5);for(let cJ of EK){let x=document.createElement("a");x.href=cJ.url,x.download=cJ.name,x.target="_blank",document.body.appendChild(x),x.click(),x.remove()}await Y(1000)}})().catch((WJ)=>{console.error("Background downloads failed:",WJ),z.error(W.some_downloads_failed())})},{mutate:mJ}=v({mutationFn:async({id:K,name:Y})=>{let H=await U.api.collections[":collectionId"].$patch({param:{collectionId:K},json:{name:Y}});if(!H.ok)throw Error(W.failed_rename_collection());return await H.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["collections",Z]}),z.success(W.collection_renamed()),k(!1)},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:LK}=v({mutationFn:async(K)=>{let Y=await U.api.collections[":collectionId"].$delete({param:{collectionId:K}});if(!Y.ok)throw Error(W.failed_delete_collection());return await Y.json()},onSuccess:(K,Y)=>{if(Q.invalidateQueries({queryKey:["collections",Z]}),z.success(W.collection_deleted()),f(!1),e?.collectionId===Y)q({to:"/projects/$projectId",params:{projectId:Z}})},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:jJ}=v({mutationFn:async({id:K,name:Y})=>{let H=await U.api.shares[":shareId"].$put({param:{shareId:K},json:{name:Y}});if(!H.ok)throw Error(W.failed_rename_share_link());return await H.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["shares",Z]}),z.success(W.share_link_renamed()),k(!1)},onError:(K)=>{z.error(`Error: ${K.message}`)}}),{mutate:yK}=v({mutationFn:async(K)=>{if(!(await U.api.shares[":shareId"].$delete({param:{shareId:K}})).ok)throw Error(W.failed_delete_share_link());return K},onSuccess:(K)=>{if(Q.invalidateQueries({queryKey:["shares",Z]}),z.success(W.share_link_deleted()),f(!1),LJ?.shareId===K)q({to:"/projects/$projectId",params:{projectId:Z}})},onError:(K)=>{z.error(`Error: ${K.message}`)}});return X("div",{className:"flex flex-col h-full overflow-hidden p-3 gap-4 bg-background",children:[X("div",{className:O("flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4",L?"flex-1 min-h-[50%] h-full":"flex-none h-[44px] max-h-[44px]"),children:[J("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:X("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>r(!L),children:[J("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:W.folder_tree_assets()}),L?J(XJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):J(YJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]})}),J(ZJ,{className:O("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",L?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:X("div",{className:"space-y-0.5 pr-3",children:[J(bK,{teamId:B,projectId:Z,folder:{id:P,name:$,type:"folder",sizeByte:0,fileCount:0,status:"processed",createdAt:"",updatedAt:""},level:0,isRoot:!0,dragState:b,onSelect:M,selectedFolderId:A,canEdit:V,onRenameTrigger:(K,Y)=>{yJ(K),EJ("folder"),JJ(Y),k(!0)},onDeleteTrigger:(K)=>{NJ(K),CJ("folder"),f(!0)},onDownloadTrigger:(K)=>{PK(K)},ancestorFolders:D},P),V&&X("div",{className:O("group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",j&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>q({to:"/projects/$projectId/recently-deleted",params:{projectId:Z}}),children:[J("div",{className:"flex h-4 w-4 items-center justify-center",children:J(uJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:W.recently_deleted()})]})]})})]}),!m&&X("div",{className:O("flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4",T?"flex-1 min-h-0 h-full":"flex-none h-[44px] max-h-[44px]"),children:[X("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:[X("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>BJ(!T),children:[J("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:W.collections()}),T?J(XJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):J(YJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}),V&&J("button",{onClick:()=>PJ(),className:"text-muted-foreground hover:text-foreground flex-none",children:J(wJ,{className:"h-3.5 w-3.5"})})]}),J(ZJ,{className:O("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",T?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:X("div",{className:"space-y-0.5 pr-3",children:[X("div",{className:"group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>q({to:"/projects/$projectId/collections",params:{projectId:Z}}),children:[J("div",{className:"flex h-4 w-4 items-center justify-center",children:J(kJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:W.all_collections_count({count:l?.pages[0]?.pageInfo?.total||0})})]}),AJ.map((K)=>{let Y=e?.collectionId===K.id;return X("div",{className:O("group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",Y&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>q({to:"/projects/$projectId/collections/$collectionId",params:{projectId:Z,collectionId:K.id}}),children:[X("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[J("div",{className:"flex h-4 w-4 items-center justify-center shrink-0",children:J(rJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"truncate text-sidebar-foreground flex-1",children:K.name})]}),V&&J("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(H)=>H.stopPropagation(),children:X(QJ,{modal:!1,children:[J(HJ,{asChild:!0,children:J(N,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:J(zJ,{className:"h-3.5 w-3.5"})})}),X(UJ,{align:"end",className:"w-32",children:[J(w,{onClick:()=>{yJ(K.id),EJ("collection"),JJ(K.name),k(!0)},children:W.rename()}),J(w,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{NJ(K.id),CJ("collection"),f(!0)},children:W.delete()})]})]})})]},K.id)}),J("div",{ref:qJ,className:"h-1"}),n&&J("div",{className:"flex justify-center p-2",children:J(p,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})})]}),!C&&X("div",{className:O("flex flex-col overflow-hidden transition-all duration-300 ease-in-out",u?"flex-1 min-h-0 h-full":"flex-none h-[44px] max-h-[44px]"),children:[X("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:[X("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>bJ(!u),children:[J("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:W.share_links()}),u?J(XJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):J(YJ,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}),V&&J("div",{className:"flex items-center gap-1 flex-none",children:J("button",{onClick:()=>MJ(),className:"text-muted-foreground hover:text-foreground",children:J(wJ,{className:"h-3.5 w-3.5"})})})]}),J(ZJ,{className:O("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",u?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:X("div",{className:"space-y-0.5 pr-3",children:[X("div",{className:"group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>q({to:"/projects/$projectId/shares",params:{projectId:Z}}),children:[J("div",{className:"flex h-4 w-4 items-center justify-center",children:J(kJ,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:W.all_share_links_count({count:c?.pages[0]?.pageInfo?.total||0})})]}),OJ.map((K)=>J(CK,{link:K,projectId:Z,dragState:b,canEdit:V,onRenameTrigger:(Y,H)=>{yJ(Y),EJ("share"),JJ(H),k(!0)},onDeleteTrigger:(Y)=>{NJ(Y),CJ("share"),f(!0)}},K.id)),J("div",{ref:VJ,className:"h-1"}),R&&J("div",{className:"flex justify-center p-2",children:J(p,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})})]}),J(TJ,{open:qK,onOpenChange:k,children:X(RJ,{onClick:(K)=>K.stopPropagation(),children:[J(SJ,{children:J(hJ,{children:F==="collection"?W.rename_collection():F==="share"?W.rename_share_link():W.rename_folder()})}),J("div",{className:"py-4",children:J(XK,{value:E,onChange:(K)=>JJ(K.target.value),placeholder:W.enter_new_name(),onKeyDown:(K)=>{if(K.key==="Enter"&&E.trim()){if(F==="collection")mJ({id:y,name:E});else if(F==="share")jJ({id:y,name:E});else if(F==="folder")IJ({id:y,name:E})}}})}),X(fJ,{children:[J(N,{variant:"ghost",onClick:()=>k(!1),children:W.cancel()}),J(N,{disabled:!E.trim(),onClick:()=>{if(F==="collection")mJ({id:y,name:E});else if(F==="share")jJ({id:y,name:E});else if(F==="folder")IJ({id:y,name:E})},children:W.rename()})]})]})}),J(ZK,{open:VK,onOpenChange:f,children:X(_K,{onClick:(K)=>K.stopPropagation(),children:[X($K,{children:[J(zK,{children:S==="collection"?W.delete_collection_confirm():S==="share"?W.delete_share_link_confirm():W.delete_folder_confirm()}),J(QK,{children:W.delete_confirm_description({type:S==="collection"?W.collection():S==="share"?W.share_link():W.folder().toLowerCase()})})]}),X(GK,{children:[J(UK,{children:W.cancel()}),J(HK,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{if(S==="collection")LK(vJ);else if(S==="share")yK(vJ);else if(S==="folder")AK(vJ)},children:W.delete()})]})]})}),J(TJ,{open:OK,onOpenChange:a,children:X(RJ,{className:"sm:max-w-md",children:[X(SJ,{children:[J(hJ,{children:KJ?W.preparing_download():W.confirm_download()}),J(YK,{children:KJ?W.resolving_files_wait():W.folder_files_download_description()})]}),KJ?X("div",{className:"space-y-4 py-6 flex flex-col items-center justify-center",children:[J(p,{className:"h-8 w-8 animate-spin text-primary"}),J("span",{className:"text-sm font-medium text-muted-foreground mt-2",children:W.preparing_download_links()})]}):X("div",{className:"space-y-4 py-2",children:[J("div",{className:"text-sm text-muted-foreground",children:W.download_includes_files({count:FJ.length})}),X("div",{className:"flex items-start gap-3 p-3 text-sm rounded-lg bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-900/30",children:[J(aJ,{className:"h-5 w-5 shrink-0 mt-0.5"}),X("div",{children:[J("p",{className:"font-semibold",children:W.no_folder_structure()}),J("p",{className:"mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90",children:W.folder_structure_warning()})]})]})]}),J(fJ,{children:!KJ?X(iJ,{children:[J(N,{variant:"outline",onClick:()=>a(!1),children:W.cancel()}),X(N,{onClick:MK,className:"gap-2",disabled:FJ.length===0,children:[J(DJ,{className:"h-4 w-4"}),W.start_download()]})]}):J(N,{disabled:!0,variant:"outline",children:W.cancel()})})]})})]})}function CK({link:B,projectId:Z,dragState:$,canEdit:P,onRenameTrigger:b,onDeleteTrigger:M}){let A=GJ(),C=h({from:"/projects/$projectId/shares/$shareId",shouldThrow:!1})?.shareId===B.id,{ref:D,isDropTarget:q}=gJ({id:`share:${B.id}`,data:{type:"share-link",id:B.id}}),Q=!!$?.isActive;return X("div",{ref:D,className:O("group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",C&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium",q&&Q&&"bg-sidebar-accent ring-2 ring-primary ring-inset"),onClick:()=>A({to:"/projects/$projectId/shares/$shareId",params:{projectId:Z,shareId:B.id}}),children:[X("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[J("div",{className:"flex h-4 w-4 items-center justify-center shrink-0",children:J(JK,{className:"h-4 w-4 text-sidebar-primary"})}),J("span",{className:"truncate text-sidebar-foreground flex-1",children:B.name})]}),P&&J("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(V)=>V.stopPropagation(),children:X(QJ,{modal:!1,children:[J(HJ,{asChild:!0,children:J(N,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:J(zJ,{className:"h-3.5 w-3.5"})})}),X(UJ,{align:"end",className:"w-32",children:[J(w,{onClick:()=>{b(B.id,B.name)},children:W.rename()}),J(w,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{M(B.id)},children:W.delete()})]})]})})]})}function bK({teamId:B,projectId:Z,folder:$,level:P,isRoot:b,dragState:M,onSelect:A,selectedFolderId:m,canEdit:C,onRenameTrigger:D,onDeleteTrigger:q,onDownloadTrigger:Q,ancestorFolders:V}){let j=_.useMemo(()=>{return V?.some((G)=>G.id===$.id)??!1},[V,$.id]),[L,r]=_.useState(b||j);_.useEffect(()=>{if(j)r(!0)},[j]);let T=GJ(),BJ=h({from:"/projects/$projectId/folders/$folderId",select:(G)=>({folderId:G.folderId}),shouldThrow:!1}),u=h({from:"/projects/$projectId/",shouldThrow:!1}),bJ=b?!!u:BJ?.folderId===$.id,{data:c,fetchNextPage:i,hasNextPage:g,isFetchingNextPage:R,isLoading:l}=_J({queryKey:["folders",$.id,"children",{assetType:"folder"}],queryFn:async({pageParam:G})=>{let y=await U.api.folders[":folderId"].children.$get({param:{folderId:$.id},query:{assetType:"folder",after:G,first:"20"}});if(!y.ok)throw Error(W.failed_to_fetch_folder_children());return await y.json()},initialPageParam:"",getNextPageParam:(G)=>{return G.pageInfo?.cursor||void 0},enabled:L||!!b}),{ref:o,inView:d}=$J();_.useEffect(()=>{if(d&&g&&!R)i()},[d,g,R,i]);let n=c?.pages.flatMap((G)=>G.data??[])??[],qJ=(G)=>{G.stopPropagation(),r(!L)},s=()=>{if(A){A($);return}if(b)T({to:"/projects/$projectId",params:{projectId:Z}});else T({to:"/projects/$projectId/folders/$folderId",params:{projectId:Z,folderId:$.id}})},{ref:VJ,isDragging:t}=BK({id:`tree:${$.id}`,data:{type:"folder",item:$},disabled:!!b||!!A||!C}),{ref:AJ,isDropTarget:OJ}=gJ({id:`tree:${$.id}`,data:{type:"folder",item:$},disabled:M?.draggedIds.has($.id)||!!A||!C}),PJ=(G)=>{VJ(G),AJ(G)},MJ=_.useMemo(()=>{if(A)return!1;if(!M?.isActive)return!1;if(M.draggedIds.has($.id))return!1;return!0},[M,$.id,A]),e=OJ&&MJ,LJ=m===$.id;return X("div",{children:[X("div",{ref:PJ,className:O("group flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",(bJ||LJ)&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium",t&&"opacity-50",e&&"bg-sidebar-accent ring-2 ring-primary ring-inset"),style:{...b?{}:{paddingLeft:`${P*12+8}px`}},onClick:s,children:[!b&&J("button",{onClick:qJ,className:"flex h-4 w-4 items-center justify-center shrink-0",children:L?J(oJ,{className:"h-3 w-3"}):J(sJ,{className:"h-3 w-3"})}),b?J(tJ,{className:"h-4 w-4 text-sidebar-primary shrink-0"}):J(eJ,{className:"h-4 w-4 text-sidebar-primary shrink-0"}),J("span",{className:"flex-1 truncate text-sidebar-foreground",children:$.name}),C&&!b&&J("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(G)=>G.stopPropagation(),children:X(QJ,{modal:!1,children:[J(HJ,{asChild:!0,children:J(N,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:J(zJ,{className:"h-3.5 w-3.5"})})}),X(UJ,{align:"end",className:"w-32",children:[X(w,{onClick:()=>{D($.id,$.name)},children:[J(nJ,{className:"mr-2 h-4 w-4"}),W.rename()]}),X(w,{onClick:()=>{Q($.id)},children:[J(DJ,{className:"mr-2 h-4 w-4"}),W.download()]}),J(KK,{}),X(w,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{q($.id)},children:[J(uJ,{className:"mr-2 h-4 w-4"}),W.delete()]})]})]})})]}),L&&X("div",{children:[l&&J("div",{className:"flex items-center justify-center p-2",style:{paddingLeft:`${(P+1)*12+8}px`},children:J(p,{className:"h-4 w-4 animate-spin"})}),n.map((G)=>J(bK,{teamId:B,projectId:Z,folder:G,level:P+1,dragState:M,onSelect:A,selectedFolderId:m,canEdit:C,onRenameTrigger:D,onDeleteTrigger:q,onDownloadTrigger:Q,ancestorFolders:V},G.id)),g&&J("div",{ref:o,className:"flex items-center justify-center p-2",style:{paddingLeft:`${(P+1)*12+8}px`},children:R&&J(p,{className:"h-4 w-4 animate-spin"})})]})]})}
|
|
2
|
+
export{cK as ga};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{Bf as A}from"./chunk-ve7v8wtv.js";import{Mh as z,ih as v,zh as w}from"./chunk-b1e3tec3.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/recently-deleted")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as jf,H as kf};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Tb as S}from"./chunk-s05f0v9t.js";import{Ub as h,Vb as x}from"./chunk-hrzm70wg.js";import{$b as T}from"./chunk-ss45w8ks.js";import{ic as g,jc as v,kc as b,lc as k}from"./chunk-6a2eb3b5.js";import{mc as E}from"./chunk-amsb41z5.js";import{nc as C}from"./chunk-gn8snrnk.js";import{Ye as f,Ze as y}from"./chunk-w9w5301f.js";import{bf as O}from"./chunk-k9w6mk9d.js";import{df as I}from"./chunk-wny0qagx.js";import{tk as L}from"./chunk-jm6bxtzt.js";import"./chunk-hz31j0hk.js";import"./chunk-ws07a9kv.js";function u(Q,_){if(Q)return Q;if(T("PI_CACHE_RETENTION",_)==="long")return"long";return"short"}function m(Q,_,Z){let $=u(_,Z);if($==="none")return{retention:$};let X=$==="long"&&K(Q).supportsLongCacheRetention?"1h":void 0;return{retention:$,cacheControl:{type:"ephemeral",...X&&{ttl:X}}}}var r="2.1.75",i=["Read","Write","Edit","Bash","Grep","Glob","AskUserQuestion","EnterPlanMode","ExitPlanMode","KillShell","NotebookEdit","Skill","Task","TaskOutput","TodoWrite","WebFetch","WebSearch"],l=new Map(i.map((Q)=>[Q.toLowerCase(),Q])),H=(Q)=>l.get(Q.toLowerCase())??Q,a=(Q,_)=>{if(_&&_.length>0){let Z=Q.toLowerCase(),$=_.find((X)=>X.name.toLowerCase()===Z);if($)return $.name}return Q};function n(Q){if(!Q.some((X)=>X.type==="image"))return E(Q.map((X)=>X.text).join(`
|
|
3
3
|
`));let Z=Q.map((X)=>{if(X.type==="text")return{type:"text",text:E(X.text)};return{type:"image",source:{type:"base64",media_type:X.mimeType,data:X.data}}});if(!Z.some((X)=>X.type==="text"))Z.unshift({type:"text",text:"(see attached image)"});return Z}var s="fine-grained-tool-streaming-2025-05-14",t="interleaved-thinking-2025-05-14";function K(Q){return{supportsEagerToolInputStreaming:Q.compat?.supportsEagerToolInputStreaming??!0,supportsLongCacheRetention:Q.compat?.supportsLongCacheRetention??!0,sendSessionAffinityHeaders:Q.compat?.sendSessionAffinityHeaders??!1,supportsCacheControlOnTools:Q.compat?.supportsCacheControlOnTools??!0,supportsTemperature:Q.compat?.supportsTemperature??!0,allowEmptySignature:Q.compat?.allowEmptySignature??!1,supportsToolReferences:Q.compat?.supportsToolReferences??o(Q)}}function o(Q){if(Q.provider!=="anthropic"||Q.id.includes("haiku"))return!1;let _=Q.id.match(/^claude-(?:opus|sonnet|fable)-(\d+)(?:-(\d+))?(?:-|$)/);if(!_)return!1;let Z=Number(_[1]),$=_[2]&&_[2].length<8?Number(_[2]):0;return Z>4||Z===4&&$>=5}function B(...Q){let _={};for(let Z of Q)if(Z)Object.assign(_,Z);return _}function z(Q,_){if(!Q)return!1;let Z=_.toLowerCase();for(let[$,X]of Object.entries(Q))if($.toLowerCase()===Z&&X!==null&&X.trim().length>0)return!0;return!1}function c(Q,_,Z){if(_)return;if(z(Z,"authorization")||z(Z,"x-api-key")||z(Z,"cf-aig-authorization"))return;throw Error(`No API key for provider: ${Q}`)}var e=new Set(["message_start","message_delta","message_stop","content_block_start","content_block_delta","content_block_stop"]);function p(Q){if(!Q.event&&Q.data.length===0)return null;let _={event:Q.event,data:Q.data.join(`
|
|
4
4
|
`),raw:[...Q.raw]};return Q.event=null,Q.data=[],Q.raw=[],_}function R(Q,_){if(Q==="")return p(_);if(_.raw.push(Q),Q.startsWith(":"))return null;let Z=Q.indexOf(":"),$=Z===-1?Q:Q.slice(0,Z),X=Z===-1?"":Q.slice(Z+1);if(X.startsWith(" "))X=X.slice(1);if($==="event")_.event=X;else if($==="data")_.data.push(X);return null}function QQ(Q){let _=Q.indexOf("\r"),Z=Q.indexOf(`
|
|
5
5
|
`);if(_===-1)return Z;if(Z===-1)return _;return Math.min(_,Z)}function F(Q){let _=QQ(Q);if(_===-1)return null;let Z=_+1;if(Q[_]==="\r"&&Q[Z]===`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{pk as V,qk as k,rk as _,sk as E}from"./chunk-y9ttm07y.js";import{uk as b,vk as f,wk as A}from"./chunk-wqhk76de.js";import"./chunk-dhekxndw.js";import{yk as L}from"./chunk-etqpzc9e.js";import{zk as N}from"./chunk-k20bhxed.js";import"./chunk-c3fvs0bv.js";import"./chunk-hz31j0hk.js";import{Ek as B}from"./chunk-90et6bwm.js";import{Qk as M}from"./chunk-5zntjzxw.js";import{Uk as D,Vk as U}from"./chunk-vf066xwh.js";import"./chunk-qvgc9e08.js";import"./chunk-ws07a9kv.js";var y=new Set(["openai","openai-codex","opencode"]);function H(w){if(w)return w;if(typeof process<"u"&&process.env.PI_CACHE_RETENTION==="long")return"long";return"short"}function S(w){return{sendSessionIdHeader:w.compat?.sendSessionIdHeader??!0,supportsLongCacheRetention:w.compat?.supportsLongCacheRetention??!0}}function T(w,F){return F==="long"&&w.supportsLongCacheRetention?"24h":void 0}function C(w){if(w instanceof Error){let F=w.status,z=typeof F==="number"?F:void 0;if(z!==void 0)return`OpenAI API error (${z}): ${w.message}`;return w.message}try{return JSON.stringify(w)}catch{return String(w)}}var I=(w,F,z)=>{let G=new U;return(async()=>{let Q={role:"assistant",content:[],api:w.api,provider:w.provider,model:w.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let W=z?.apiKey;if(!W)throw Error(`No API key for provider: ${w.provider}`);let X=H(z?.cacheRetention)==="none"?void 0:z?.sessionId,Z=v(w,F,W,z?.headers,X),Y=x(w,F,z),$=await z?.onPayload?.(Y,w);if($!==void 0)Y=$;let j={...z?.signal?{signal:z.signal}:{},...z?.timeoutMs!==void 0?{timeout:z.timeoutMs}:{},maxRetries:z?.maxRetries??0},{data:K,response:q}=await Z.responses.create(Y,j).withResponse();if(await z?.onResponse?.({status:q.status,headers:B(q.headers)},w),G.push({type:"start",partial:Q}),await A(K,Q,G,w,{serviceTier:z?.serviceTier,applyServiceTierPricing:(P,O)=>h(P,O,w)}),z?.signal?.aborted)throw Error("Request was aborted");if(Q.stopReason==="aborted"||Q.stopReason==="error")throw Error("An unknown error occurred");G.push({type:"done",reason:Q.stopReason,message:Q}),G.end()}catch(W){for(let J of Q.content)delete J.index,delete J.partialJson;Q.stopReason=z?.signal?.aborted?"aborted":"error",Q.errorMessage=C(W),G.push({type:"error",reason:Q.stopReason,error:Q}),G.end()}})(),G},i=(w,F,z)=>{let G=z?.apiKey;if(!G)throw Error(`No API key for provider: ${w.provider}`);let Q=M(w,z,G),W=z?.reasoning?D(w,z.reasoning):void 0;return I(w,F,{...Q,reasoningEffort:W==="off"?void 0:W})};function v(w,F,z,G,Q){let W=S(w),J={...w.headers};if(w.provider==="github-copilot"){let Z=_(F.messages),Y=E({messages:F.messages,hasImages:Z});Object.assign(J,Y)}if(Q){if(W.sendSessionIdHeader)J.session_id=Q;J["x-client-request-id"]=Q}if(G)Object.assign(J,G);let X=w.provider==="cloudflare-ai-gateway"?{...J,Authorization:J.Authorization??null,"cf-aig-authorization":`Bearer ${z}`}:J;return new N({apiKey:z,baseURL:V(w.provider)?k(w):w.baseUrl,dangerouslyAllowBrowser:!0,defaultHeaders:X})}function x(w,F,z){let G=b(w,F,y),Q=H(z?.cacheRetention),W=S(w),J={model:w.id,input:G,stream:!0,prompt_cache_key:Q==="none"?void 0:L(z?.sessionId),prompt_cache_retention:T(W,Q),store:!1};if(z?.maxTokens)J.max_output_tokens=z?.maxTokens;if(z?.temperature!==void 0)J.temperature=z?.temperature;if(z?.serviceTier!==void 0)J.service_tier=z.serviceTier;if(F.tools&&F.tools.length>0)J.tools=f(F.tools);if(w.reasoning){if(z?.reasoningEffort||z?.reasoningSummary){let X=z?.reasoningEffort?w.thinkingLevelMap?.[z.reasoningEffort]??z.reasoningEffort:"medium";J.reasoning={effort:X,summary:z?.reasoningSummary||"auto"},J.include=["reasoning.encrypted_content"]}else if(w.provider!=="github-copilot"&&w.thinkingLevelMap?.off!==null)J.reasoning={effort:w.thinkingLevelMap?.off??"none"}}return J}function R(w,F){switch(F){case"flex":return 0.5;case"priority":return w.id==="gpt-5.5"?2.5:2;default:return 1}}function h(w,F,z){let G=R(z,F);if(G===1)return;w.cost.input*=G,w.cost.output*=G,w.cost.cacheRead*=G,w.cost.cacheWrite*=G,w.cost.total=w.cost.input+w.cost.output+w.cost.cacheRead+w.cost.cacheWrite}export{i as streamSimpleOpenAIResponses,I as streamOpenAIResponses};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var q=new Set;function F(b){return q.add(b),()=>{q.delete(b)}}function A(b){if(b instanceof Error)return b.message||b.name;if(typeof b==="string")return b;return String(b)}function B(b){if(!(b instanceof Error))return{name:"ThrownValue",message:A(b)};let k=b.code;return{name:b.name||void 0,message:b.message||b.name,stack:b.stack,code:typeof k==="string"||typeof k==="number"?k:void 0}}function H(b,k,z){return{type:b,timestamp:Date.now(),error:B(k),details:z}}function J(b,k){b.diagnostics=[...b.diagnostics??[],k]}
|
|
3
|
-
export{F as
|
|
3
|
+
export{F as Ue,A as Ve,H as We,J as Xe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{J as
|
|
1
|
+
import{Fh as F,Mh as B}from"./chunk-b1e3tec3.js";var J=F((w,D)=>({metadata:{},isLoading:!1,error:null,fetchMetadata:async(A)=>{w({isLoading:!0,error:null});try{let h=await B.api.teams[":teamId"]["user-metadata"].$get({param:{teamId:A}});if(!h.ok)throw Error("failed to fetch user metadata");let C=(await h.json()).reduce((j,E)=>{return j[E.key]=E.value,j},{});w({metadata:C,isLoading:!1})}catch(h){w({error:h instanceof Error?h.message:String(h),isLoading:!1})}},setMetadata:async(A,h,q)=>{let C=D().metadata;w((j)=>({metadata:{...j.metadata,[h]:q}}));try{if(!(await B.api.teams[":teamId"]["user-metadata"][":key"].$put({param:{teamId:A,key:h},json:{value:q}})).ok)throw Error("failed to update user metadata")}catch(j){w({metadata:C}),console.error(j)}},getMetadata:(A,h)=>{let q=D().metadata[A];return q!==void 0?q:h}}));
|
|
2
|
+
export{J as Af};
|