@devframes/plugin-git 0.6.0-beta.3 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/dist/client/404/index.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/__next.__PAGE__.txt +2 -2
  5. package/dist/client/__next._full.txt +3 -3
  6. package/dist/client/__next._head.txt +1 -1
  7. package/dist/client/__next._index.txt +2 -2
  8. package/dist/client/__next._tree.txt +2 -2
  9. package/dist/client/_next/static/chunks/0ycrewukqk_3y.js +201 -0
  10. package/dist/client/_next/static/chunks/12_17ty6e_o81.css +8 -0
  11. package/dist/client/_not-found/__next._full.txt +2 -2
  12. package/dist/client/_not-found/__next._head.txt +1 -1
  13. package/dist/client/_not-found/__next._index.txt +2 -2
  14. package/dist/client/_not-found/__next._not-found.__PAGE__.txt +1 -1
  15. package/dist/client/_not-found/__next._not-found.txt +1 -1
  16. package/dist/client/_not-found/__next._tree.txt +2 -2
  17. package/dist/client/_not-found/index.html +1 -1
  18. package/dist/client/_not-found/index.txt +2 -2
  19. package/dist/client/index.html +1 -1
  20. package/dist/client/index.txt +3 -3
  21. package/dist/index.d.mts +2 -0
  22. package/dist/index.mjs +1 -1
  23. package/dist/{src-D9eCaevD.mjs → src-cYgivntx.mjs} +42 -5
  24. package/package.json +4 -2
  25. package/dist/client/_next/static/chunks/1d96lhco1n2ew.css +0 -8
  26. package/dist/client/_next/static/chunks/1ve9y75k_w2tp.js +0 -201
  27. /package/dist/client/_next/static/{a8E2_Z1GAb00WAmxuTvEO → RcUTde_N3FeDyW_FJTNQg}/_buildManifest.js +0 -0
  28. /package/dist/client/_next/static/{a8E2_Z1GAb00WAmxuTvEO → RcUTde_N3FeDyW_FJTNQg}/_clientMiddlewareManifest.js +0 -0
  29. /package/dist/client/_next/static/{a8E2_Z1GAb00WAmxuTvEO → RcUTde_N3FeDyW_FJTNQg}/_ssgManifest.js +0 -0
@@ -0,0 +1,201 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82747,(e,t,n)=>{var i={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return(n+i)*3/4-i},t.toByteArray=function(e){var t,n,o=l(e),a=o[0],s=o[1],d=new r((a+s)*3/4-s),u=0,c=s>0?a-4:a;for(n=0;n<c;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],d[u++]=t>>16&255,d[u++]=t>>8&255,d[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,d[u++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,d[u++]=t>>8&255,d[u++]=255&t),d},t.fromByteArray=function(e){for(var t,i=e.length,r=i%3,o=[],a=0,s=i-r;a<s;a+=16383)o.push(function(e,t,i){for(var r,o=[],a=t;a<i;a+=3)r=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===r?o.push(n[(t=e[i-1])>>2]+n[t<<4&63]+"=="):2===r&&o.push(n[(t=(e[i-2]<<8)+e[i-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),o.join("")};for(var n=[],i=[],r="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)n[a]=o[a],i[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var i=n===t?0:4-n%4;return[n,i]}i[45]=62,i[95]=63},72:function(e,t,n){"use strict";var i=n(675),r=n(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e){var i=e,r=t;if(("string"!=typeof r||""===r)&&(r="utf8"),!s.isEncoding(r))throw TypeError("Unknown encoding: "+r);var o=0|f(i,r),l=a(o),d=l.write(i,r);return d!==o&&(l=l.slice(0,d)),l}if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return function(e,t,n){var i;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),s.prototype),i}(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return s.from(u,t,n);var p=function(e){if(s.isBuffer(e)){var t=0|h(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(p)return p;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return d(e),a(e<0?0:0|h(e))}function c(e){for(var t=e.length<0?0:0|h(e.length),n=a(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return(d(e),e<=0)?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)};function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(r)return i?-1:A(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r,o,a,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=T[e[o]];return r}(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return function(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}(this,t,n);case"latin1":case"binary":return function(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}(this,t,n);case"base64":return r=this,o=t,a=n,0===o&&a===r.length?i.fromByteArray(r):i.fromByteArray(r.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}(this,t,n);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function m(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function g(e,t,n,i,r){var o;if(0===e.length)return -1;if("string"==typeof n?(i=n,n=0):n>0x7fffffff?n=0x7fffffff:n<-0x80000000&&(n=-0x80000000),(o=n*=1)!=o&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length)if(r)return -1;else n=e.length-1;else if(n<0)if(!r)return -1;else n=0;if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,r);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(r)return Uint8Array.prototype.indexOf.call(e,t,n);else return Uint8Array.prototype.lastIndexOf.call(e,t,n);return b(e,[t],n,i,r)}throw TypeError("val must be string, number or Buffer")}function b(e,t,n,i,r){var o,a=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,n/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var u=-1;for(o=n;o<s;o++)if(d(e,o)===d(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else -1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var c=!0,h=0;h<l;h++)if(d(e,o+h)!==d(t,h)){c=!1;break}if(c)return o}return -1}s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(N(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:+(i<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;var n,i=s.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var o=e[n];if(N(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(i,r),r+=o.length}return i},s.byteLength=f,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,n,i,r){if(N(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var o=r-i,a=n-t,l=Math.min(o,a),d=this.slice(i,r),u=e.slice(t,n),c=0;c<l;++c)if(d[c]!==u[c]){o=d[c],a=u[c];break}return o<a?-1:+(a<o)},s.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)};function v(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,a,s,l,d=e[r],u=null,c=d>239?4:d>223?3:d>191?2:1;if(r+c<=n)switch(c){case 1:d<128&&(u=d);break;case 2:(192&(o=e[r+1]))==128&&(l=(31&d)<<6|63&o)>127&&(u=l);break;case 3:o=e[r+1],a=e[r+2],(192&o)==128&&(192&a)==128&&(l=(15&d)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[r+1],a=e[r+2],s=e[r+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(l=(15&d)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=c}var h=i,f=h.length;if(f<=4096)return String.fromCharCode.apply(String,h);for(var p="",m=0;m<f;)p+=String.fromCharCode.apply(String,h.slice(m,m+=4096));return p}function y(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function w(e,t,n,i,r,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw RangeError('"value" argument is out of bounds');if(n+i>e.length)throw RangeError("Index out of range")}function x(e,t,n,i,r,o){if(n+i>e.length||n<0)throw RangeError("Index out of range")}function k(e,t,n,i,o){return t*=1,n>>>=0,o||x(e,t,n,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,n,i,23,4),n+4}function S(e,t,n,i,o){return t*=1,n>>>=0,o||x(e,t,n,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,n,i,52,8),n+8}s.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var r,o,a,s,l,d,u,c,h=this.length-t;if((void 0===n||n>h)&&(n=h),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var f=!1;;)switch(i){case"hex":return function(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;i>o/2&&(i=o/2);for(var a=0;a<i;++a){var s,l=parseInt(t.substr(2*a,2),16);if((s=l)!=s)break;e[n+a]=l}return a}(this,e,t,n);case"utf8":case"utf-8":return r=t,o=n,_(A(e,this.length-r),this,r,o);case"ascii":return a=t,s=n,_(E(e),this,a,s);case"latin1":case"binary":return function(e,t,n,i){return _(E(t),e,n,i)}(this,e,t,n);case"base64":return l=t,d=n,_(L(e),this,l,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,c=n,_(function(e,t){for(var n,i,r=[],o=0;o<e.length&&!((t-=2)<0);++o)i=(n=e.charCodeAt(o))>>8,r.push(n%256),r.push(i);return r}(e,this.length-u),this,u,c);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var i=this.subarray(e,t);return Object.setPrototypeOf(i,s.prototype),i},s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},s.prototype.readUInt8=function(e,t){return e>>>=0,t||y(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||y(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||y(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||y(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||y(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||y(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?0xffff0000|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||y(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?0xffff0000|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||y(e,4,this.length),r.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||y(e,4,this.length),r.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||y(e,8,this.length),r.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||y(e,8,this.length),r.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,i){if(e*=1,t>>>=0,n>>>=0,!i){var r=Math.pow(2,8*n)-1;w(this,e,t,n,r,0)}var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,i){if(e*=1,t>>>=0,n>>>=0,!i){var r=Math.pow(2,8*n)-1;w(this,e,t,n,r,0)}var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,i){if(e*=1,t>>>=0,!i){var r=Math.pow(2,8*n-1);w(this,e,t,n,r-1,-r)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,i){if(e*=1,t>>>=0,!i){var r=Math.pow(2,8*n-1);w(this,e,t,n,r-1,-r)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return S(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return S(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,i){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r=i-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,i);else if(this===e&&n<t&&t<i)for(var o=r-1;o>=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,i),t);return r},s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);if(1===e.length){var r,o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(r=t;r<n;++r)this[r]=e;else{var a=s.isBuffer(e)?e:s.from(e,i),l=a.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<n-t;++r)this[r+t]=a[r%l]}return this};var C=/[^+/0-9A-Za-z-_]/g;function A(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],a=0;a<i;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!r){if(n>56319||a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function E(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function L(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length)&&!(r>=e.length);++r)t[r+n]=e[r];return r}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var T=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var i=16*n,r=0;r<16;++r)t[i+r]=e[n]+e[r];return t}()},783:function(e,t){t.read=function(e,t,n,i,r){var o,a,s=8*r-i-1,l=(1<<s)-1,d=l>>1,u=-7,c=n?r-1:0,h=n?-1:1,f=e[t+c];for(c+=h,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+c],c+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=256*a+e[t+c],c+=h,u-=8);if(0===o)o=1-d;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=d}return(f?-1:1)*a*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var a,s,l,d=8*o-r-1,u=(1<<d)-1,c=u>>1,h=5960464477539062e-23*(23===r),f=i?0:o-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=h/l:t+=h*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(t*l-1)*Math.pow(2,r),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;e[n+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,d+=r;d>0;e[n+f]=255&a,f+=p,a/=256,d-=8);e[n+f-p]|=128*m}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}},a=!0;try{i[e](n,n.exports,o),a=!1}finally{a&&delete r[e]}return n.exports}o.ab="/ROOT/node_modules/.pnpm/next@16.2.10_@playwright+test@1.61.1_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/next/dist/compiled/buffer/",t.exports=o(72)},4135,(e,t,n)=>{e.e,function(e){let t=Symbol("newer"),n=Symbol("older");class i{constructor(e,t){"number"!=typeof e&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let i,o=this.limit||Number.MAX_VALUE;this._keymap.clear();let a=e[Symbol.iterator]();for(let e=a.next();!e.done;e=a.next()){let a=new r(e.value[0],e.value[1]);if(this._keymap.set(a.key,a),i?(i[t]=a,a[n]=i):this.oldest=a,i=a,0==o--)throw Error("overflow")}this.newest=i,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,i){var o=this._keymap.get(e);return o?(o.value=i,this._markEntryAsUsed(o)):(this._keymap.set(e,o=new r(e,i)),this.newest?(this.newest[t]=o,o[n]=this.newest):this.oldest=o,this.newest=o,++this.size,this.size>this.limit&&this.shift()),this}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var i=this._keymap.get(e);return i?(this._keymap.delete(i.key),i[t]&&i[n]?(i[n][t]=i[t],i[t][n]=i[n]):i[t]?(i[t][n]=void 0,this.oldest=i[t]):i[n]?(i[n][t]=void 0,this.newest=i[n]):this.oldest=this.newest=void 0,this.size--,i.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new a(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new o(this.oldest)}forEach(e,n){"object"!=typeof n&&(n=this);let i=this.oldest;for(;i;)e.call(n,i.value,i.key,this),i=i[t]}toJSON(){for(var e=Array(this.size),n=0,i=this.oldest;i;)e[n++]={key:i.key,value:i.value},i=i[t];return e}toString(){for(var e="",n=this.oldest;n;)e+=String(n.key)+":"+n.value,(n=n[t])&&(e+=" < ");return e}}function r(e,i){this.key=e,this.value=i,this[t]=void 0,this[n]=void 0}function o(e){this.entry=e}function a(e){this.entry=e}function s(e){this.entry=e}e.LRUMap=i,o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}},a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}},s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}}(n)},53567,e=>{"use strict";let t,n,i,r,o,a,s,l,d,u;var c,h,f,p,m=e.i(46369),g=e.i(19594);function b(...e){return e.filter(Boolean).join(" ")}var v=e.i(85053);let y="__connection.json",w="devframe_otp",x=function(){class e{#e=new Map;compare(e,t){let n=typeof e,i=typeof t;return"string"===n&&"string"===i?e.localeCompare(t):"number"===n&&"number"===i?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(null===e)return"null";switch(typeof e){case"string":return t?e:`'${e}'`;case"bigint":return`${e}n`;case"object":return this.$object(e);case"function":return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if("[object Object]"!==t)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,i=n===Object||void 0===n?"":n.name;if(""!==i&&globalThis[i]===n)return this.serializeBuiltInType(i,e);if("function"==typeof e.toJSON){let t=e.toJSON();return i+(null!==t&&"object"==typeof t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(i,Object.entries(e))}serializeBuiltInType(e,t){let n=this["$"+e];if(n)return n.call(this,t);if("function"==typeof t?.entries)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),i=`${e}{`;for(let e=0;e<n.length;e++){let[t,r]=n[e];i+=`${this.serialize(t,!0)}:${this.serialize(r)}`,e<n.length-1&&(i+=",")}return i+"}"}$object(e){let t=this.#e.get(e);return void 0===t&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return"[native code] }"===t.slice(-15)?`${e.name||""}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,"")}`}$Array(e){let t="[";for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=",");return t+"]"}$Date(e){try{return`Date(${e.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(",")}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries("Map",e.entries())}}for(let t of["Error","RegExp","URL"])e.prototype["$"+t]=function(e){return`${t}(${e})`};for(let t of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+t]=function(e){return`${t}[${e.join(",")}]`};for(let t of["BigInt64Array","BigUint64Array"])e.prototype["$"+t]=function(e){return`${t}[${e.join("n,")}${e.length>0?"n":""}]`};return e}(),k=[0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19],S=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e],C=[];class A{_data=new E;_hash=new E([...k]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=8*this._nDataBytes,n=8*this._data.sigBytes;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/0x100000000),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=4*this._data.words.length,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],d=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)C[n]=0|e[t+n];else{let e=C[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,i=C[n-2],r=(i<<15|i>>>17)^(i<<13|i>>>19)^i>>>10;C[n]=t+C[n-7]+r+C[n-16]}let c=s&l^~s&d,h=i&r^i&o^r&o,f=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),p=u+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+c+S[n]+C[n],m=f+h;u=d,d=l,l=s,s=a+p|0,a=o,o=r,r=i,i=p+m|0}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+d|0,n[7]=n[7]+u|0}_append(e){"string"==typeof e&&(e=E.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64,i=16*(n=e?Math.ceil(n):Math.max((0|n)-this._minBufferSize,0)),r=Math.min(4*i,this._data.sigBytes);if(i){for(let e=0;e<i;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,i),this._data.sigBytes-=r}return new E(t,r)}}class E{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=void 0===t?4*e.length:t}static fromUtf8(e){let t=unescape(encodeURIComponent(e)),n=t.length,i=[];for(let e=0;e<n;e++)i[e>>>2]|=(255&t.charCodeAt(e))<<24-e%4*8;return new E(i,n)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=(this.words[t>>>2]>>>24-t%4*8&255)<<16|(this.words[t+1>>>2]>>>24-(t+1)%4*8&255)<<8|this.words[t+2>>>2]>>>24-(t+2)%4*8&255;for(let i=0;i<4&&8*t+6*i<8*this.sigBytes;i++)e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(n>>>6*(3-i)&63))}return e.join("")}concat(e){if(this.words[this.sigBytes>>>2]&=0xffffffff<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}}function L(e){var t;return t="string"==typeof e?`'${e}'`:new x().serialize(e),new A().finalize(t).toBase64()}class _{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>L(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}}function N(e,...t){return"function"==typeof e?e(...t):e}let T=Error.captureStackTrace;var R=class e extends Error{name="Diagnostic";docs;fix;sources;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,T?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function M(e,t){let n=`\x1b[${e}m`,i=`\x1b[${t}m`;return(e,...t)=>{if(Array.isArray(e)&&"raw"in e){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=String(t[n]));return`${n}${r}${i}`}return`${n}${String(e)}${i}`}}let P={blue:M(34,39),cyan:M(36,39),gray:M(90,39),green:M(32,39),red:M(31,39),yellow:M(33,39),bold:M(1,22),dim:M(2,22),reset:M(0,0),underline:M(4,24)},I=e=>{let t=`${P.bold(P.red(`[${e.name}]`))} ${e.message}`,n=[];return(e.fix&&n.push(`${P.dim("fix:")} ${e.fix}`),e.sources?.length&&n.push(`${P.dim("sources:")} ${e.sources.join(", ")}`),e.docs&&n.push(`${P.dim("see:")} ${P.cyan(e.docs)}`),0===n.length)?t:[t,...n.map((e,t)=>`${P.dim(t<n.length-1?"├▶":"╰▶")} ${e}`)].join("\n")},D=function(e){let t=e.reporters??[],n={},{docsBase:i}=e;for(let r of Object.keys(e.codes)){let o=e.codes[r],a=!1===o.docs?void 0:o.docs||("string"==typeof i?`${i}/${r.toLowerCase()}`:i?.(r)),s=(e={},n={})=>{let i=new R({why:N(o.why,e),fix:N(o.fix,e),docs:a,cause:e.cause,sources:e.sources},s);for(let e of(i.name=r,t))e(i,n);return i};n[r]=s}return n}({docsBase:"https://devfra.me/errors",reporters:[function(e,{method:t="warn"}={}){console[t](I(e))}],codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,fix:"Set `jsonSerializable: true` if the payload is JSON-safe, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."}}});async function $(e,t){if(!e.setup)return{};if("object"==typeof t&&null!==t){e.__cache??=new WeakMap;let n=e.__cache,i=n.get(t);return i||((i=Promise.resolve(e.setup(t))).catch(()=>{n.get(t)===i&&n.delete(t)}),n.set(t,i)),await i}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function O(e,t){if(e.handler)return e.handler;let n=await $(e,t);if(!n.handler)throw D.DF0024({name:e.name});return n.handler}class j{context;definitions;functions;_onChanged;constructor(e){this.context=e,this.definitions=new Map,this._onChanged=[];const t=this.definitions,n=this;this.functions=new Proxy({},{get(e,i){let r=t.get(i);if(r)return O(r,n.context)},has:(e,n)=>t.has(n),getOwnPropertyDescriptor:(e,n)=>({value:t.get(n)?.handler,configurable:!0,enumerable:!0}),ownKeys:()=>Array.from(t.keys())})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw D.DF0021({name:e.name});z(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw D.DF0022({name:e.name});z(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);-1!==t&&this._onChanged.splice(t,1)}}async getHandler(e){return await O(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw D.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}}function z(e){if(e.agent&&!0!==e.jsonSerializable)throw D.DF0019({name:e.name})}function B(){let e={};function t(n,...i){let r=e[n]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...i)}}function n(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}return{_listeners:e,emit:t,emitOnce:function(n,...i){t(n,...i),delete e[n]},on:n,once:function(e,t){let i=n(e,(...e)=>(i(),t(...e)));return i}}}let H=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,U=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,F=/^([/\\]\s*){2,}[^/\\]/,G=/\/$|\/\?|\/#/,W=/^\.?\//;function q(e,t){var n;if(!(n=t)||"/"===n||function(e,t={}){return("boolean"==typeof t&&(t={acceptRelative:t}),t.strict)?H.test(e):U.test(e)||!!t.acceptRelative&&F.test(e)}(e))return e;let i=function(e=""){return(!function(e=""){return e.endsWith("/")}(e)?e:e.slice(0,-1))||"/"}(t);if(e.startsWith(i)){let t=e[i.length];if(!t||"/"===t||"?"===t)return e}return function(e,...t){let n=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(n){let t=e.replace(W,"");n=function(e=""){return e.endsWith("/")?e:e+"/"}(n)+t}else n=e;return n}(i,e)}async function V(e,t={}){let n=function(e=w){let t=function(e=w){try{return new URLSearchParams(globalThis.location?.search).get(e)||void 0}catch{return}}(e);return t&&function(e){try{let t=new URL(globalThis.location.href);if(!t.searchParams.has(e))return;t.searchParams.delete(e),globalThis.history?.replaceState(globalThis.history.state,"",t.href)}catch{}}(e),t}(t.param??w);return!!n&&(!!e.isTrusted||e.requestTrustWithCode(n))}Symbol.for("ufo:protocolRelative");var X=Symbol.for("immer-nothing"),K=Symbol.for("immer-draftable"),Y=Symbol.for("immer-state");function J(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Q=Object,Z=Q.getPrototypeOf,ee="constructor",et="prototype",en="configurable",ei="enumerable",er="writable",eo="value",ea=e=>!!e&&!!e[Y];function es(e){return!!e&&(eu(e)||eg(e)||!!e[K]||!!e[ee]?.[K]||eb(e)||ev(e))}var el=Q[et][ee].toString(),ed=new WeakMap;function eu(e){if(!e||!ey(e))return!1;let t=Z(e);if(null===t||t===Q[et])return!0;let n=Q.hasOwnProperty.call(t,ee)&&t[ee];if(n===Object)return!0;if(!ew(n))return!1;let i=ed.get(n);return void 0===i&&(i=Function.toString.call(n),ed.set(n,i)),i===el}function ec(e,t,n=!0){0===eh(e)?(n?Reflect.ownKeys(e):Q.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function eh(e){let t=e[Y];return t?t.type_:eg(e)?1:eb(e)?2:3*!!ev(e)}var ef=(e,t,n=eh(e))=>2===n?e.has(t):Q[et].hasOwnProperty.call(e,t),ep=(e,t,n=eh(e))=>2===n?e.get(t):e[t],em=(e,t,n,i=eh(e))=>{2===i?e.set(t,n):3===i?e.add(n):e[t]=n},eg=Array.isArray,eb=e=>e instanceof Map,ev=e=>e instanceof Set,ey=e=>"object"==typeof e,ew=e=>"function"==typeof e,ex=e=>e.modified_?e.copy_:e.base_;function ek(e,t){if(eb(e))return new Map(e);if(ev(e))return new Set(e);if(eg(e))return Array[et].slice.call(e);let n=eu(e);if(!0!==t&&("class_only"!==t||n)){let t=Z(e);if(null!==t&&n)return{...e};let i=Q.create(t);return Q.assign(i,e)}{let t=Q.getOwnPropertyDescriptors(e);delete t[Y];let n=Reflect.ownKeys(t);for(let i=0;i<n.length;i++){let r=n[i],o=t[r];!1===o[er]&&(o[er]=!0,o[en]=!0),(o.get||o.set)&&(t[r]={[en]:!0,[er]:!0,[ei]:o[ei],[eo]:e[r]})}return Q.create(Z(e),t)}}function eS(e,t=!1){return eA(e)||ea(e)||!es(e)||(eh(e)>1&&Q.defineProperties(e,{set:eC,add:eC,clear:eC,delete:eC}),Q.freeze(e),t&&ec(e,(e,t)=>{eS(t,!0)},!1)),e}var eC={[eo]:function(){J(2)}};function eA(e){return!(null!==e&&ey(e))||Q.isFrozen(e)}var eE="MapSet",eL="Patches",e_="ArrayMethods",eN={};function eT(e){let t=eN[e];return t||J(0,e),t}var eR=e=>!!eN[e];function eM(e,t){t&&(e.patchPlugin_=eT(eL),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eP(e){eI(e),e.drafts_.forEach(e$),e.drafts_=null}function eI(e){e===p&&(p=e.parent_)}var eD=e=>p={drafts_:[],parent_:p,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:eR(eE)?eT(eE):void 0,arrayMethodsPlugin_:eR(e_)?eT(e_):void 0};function e$(e){let t=e[Y];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function eO(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(void 0!==e&&e!==n){n[Y].modified_&&(eP(t),J(4)),es(e)&&(e=ej(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Y].base_,e,t)}else e=ej(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&eS(t,n)}(t,e,!0),eP(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==X?e:void 0}function ej(e,t){if(eA(t))return t;let n=t[Y];if(!n)return eG(t,e.handledSet_,e);if(!eB(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);eF(n,e)}return n.copy_}function ez(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var eB=(e,t)=>e.scope_===t,eH=[];function eU(e,t,n,i){let r=e.copy_||e.base_,o=e.type_;if(void 0!==i&&ep(r,i,o)===t)return void em(r,i,n,o);if(!e.draftLocations_){let t=e.draftLocations_=new Map;ec(r,(e,n)=>{if(ea(n)){let i=t.get(n)||[];i.push(e),t.set(n,i)}})}for(let i of e.draftLocations_.get(t)??eH)em(r,i,n,o)}function eF(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let i=n.getPath(e);i&&n.generatePatches_(e,i,t)}ez(e)}}function eG(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ea(e)||t.has(e)||!es(e)||eA(e)||(t.add(e),ec(e,(i,r)=>{if(ea(r)){let t=r[Y];eB(t,n)&&(em(e,i,ex(t),e.type_),ez(t))}else es(r)&&eG(r,t,n)})),e}var eW={get(e,t){let n;if(t===Y)return e;if("constructor"===t||"__proto__"===t)return new Proxy((e.copy_||e.base_)[t]||{},{get:(e,t)=>"__proto__"===t||"prototype"===t?Object.freeze(Object.create(null)):Reflect.get(e,t),set:()=>!0,apply:(e,t,n)=>Reflect.apply(e,t,n)});let i=e.scope_.arrayMethodsPlugin_,r=1===e.type_&&"string"==typeof t;if(r&&i?.isArrayOperationMethod(t))return i.createMethodInterceptor(e,t);let o=e.copy_||e.base_;if(!ef(o,t,e.type_)){var a;let n;return a=e,(n=eX(o,t))?eo in n?n[eo]:n.get?.call(a.draft_):void 0}let s=o[t];if(e.finalized_||!es(s)||r&&e.operationMethod&&i?.isMutatingArrayMethod(e.operationMethod)&&Number.isInteger(n=+t)&&String(n)===t)return s;if(s===eV(e.base_,t)){eY(e);let n=1===e.type_?+t:t,i=eJ(e.scope_,s,e,n);return e.copy_[n]=i}return s},has:(e,t)=>"constructor"!==t&&"__proto__"!==t&&"prototype"!==t&&t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,n){if("constructor"===t||"__proto__"===t||"prototype"===t)return!0;let i=eX(e.copy_||e.base_,t);if(i?.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){let i=eV(e.copy_||e.base_,t),r=i?.[Y];if(r&&r.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if((n===i?0!==n||1/n==1/i:n!=n&&i!=i)&&(void 0!==n||ef(e.base_,t,e.type_)))return!0;eY(e),eK(e)}return!!(e.copy_[t]===n&&(void 0!==n||ef(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=n,e.assigned_.set(t,!0),!function(e,t,n){let{scope_:i}=e;if(ea(n)){let r=n[Y];eB(r,i)&&r.callbacks_.push(function(){eY(e),eU(e,n,ex(r),t)})}else es(n)&&e.callbacks_.push(function(){let r=e.copy_||e.base_;3===e.type_?r.has(n)&&eG(n,i.handledSet_,i):ep(r,t,e.type_)===n&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&eG(ep(e.copy_,t,e.type_),i.handledSet_,i)})}(e,t,n),!0)},deleteProperty:(e,t)=>(eY(e),void 0!==eV(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),eK(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let n=e.copy_||e.base_,i=Reflect.getOwnPropertyDescriptor(n,t);return i?{[er]:!0,[en]:1!==e.type_||"length"!==t,[ei]:i[ei],[eo]:n[t]}:i},defineProperty(){J(11)},getPrototypeOf:e=>Z(e.base_),setPrototypeOf(){J(12)}},eq={};for(let e in eW){let t=eW[e];eq[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function eV(e,t){let n=e[Y];return(n?n.copy_||n.base_:e)[t]}function eX(e,t){if(!(t in e))return;let n=Z(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Z(n)}}function eK(e){!e.modified_&&(e.modified_=!0,e.parent_&&eK(e.parent_))}function eY(e){e.copy_||(e.assigned_=new Map,e.copy_=ek(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function eJ(e,t,n,i){let[r,o]=eb(t)?eT(eE).proxyMap_(t,n):ev(t)?eT(eE).proxySet_(t,n):function(e,t){let n=eg(e),i={type_:+!!n,scope_:t?t.scope_:p,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},r=i,o=eW;n&&(r=[i],o=eq);let{revoke:a,proxy:s}=Proxy.revocable(r,o);return i.draft_=s,i.revoke_=a,[s,i]}(t,n);if((n?.scope_??p).drafts_.push(r),o.callbacks_=n?.callbacks_??[],o.key_=i,n&&void 0!==i)n.callbacks_.push(function(e){if(!o||!eB(o,e))return;e.mapSetPlugin_?.fixSetContents(o);let t=ex(o);eU(n,o.draft_??o,t,i),eF(o,e)});else o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)});return r}eq.deleteProperty=function(e,t){return eq.set.call(this,e,t,void 0)},eq.set=function(e,t,n){return eW.set.call(this,e[0],t,n,e[0])};var eQ=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{let i;if(ew(e)&&!ew(t)){let n=t;t=e;let i=this;return function(e=n,...r){return i.produce(e,e=>t.call(this,e,...r))}}if(ew(t)||J(6),void 0===n||ew(n)||J(7),es(e)){let r=eD(this),o=eJ(r,e,void 0),a=!0;try{i=t(o),a=!1}finally{a?eP(r):eI(r)}return eM(r,n),eO(i,r)}if(e&&ey(e))J(1,e);else{if(void 0===(i=t(e))&&(i=e),i===X&&(i=void 0),this.autoFreeze_&&eS(i,!0),n){let t=[],r=[];eT(eL).generateReplacementPatches_(e,i,{patches_:t,inversePatches_:r}),n(t,r)}return i}},this.produceWithPatches=(e,t)=>{let n,i;return ew(e)?(t,...n)=>this.produceWithPatches(t,t=>e(t,...n)):[this.produce(e,t,(e,t)=>{n=e,i=t}),n,i]},(e=>"boolean"==typeof e)(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),(e=>"boolean"==typeof e)(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),(e=>"boolean"==typeof e)(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;es(e)||J(8),ea(e)&&(ea(t=e)||J(10,t),e=function e(t){let n;if(!es(t)||eA(t))return t;let i=t[Y],r=!0;if(i){if(!i.modified_)return i.base_;i.finalized_=!0,n=ek(t,i.scope_.immer_.useStrictShallowCopy_),r=i.scope_.immer_.shouldUseStrictIteration()}else n=ek(t,!0);return ec(n,(t,i)=>{em(n,t,e(i))},r),i&&(i.finalized_=!1),n}(t));let n=eD(this),i=eJ(n,e,void 0);return i[Y].isManual_=!0,eI(n),i}finishDraft(e,t){let n=e&&e[Y];n&&n.isManual_||J(9);let{scope_:i}=n;return eM(i,t),eO(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));let i=eT(eL).applyPatches_;return ea(e)?i(e,t):this.produce(e,e=>i(e,t))}},eZ=eQ.produce,e0=eQ.produceWithPatches.bind(eQ),e1=eQ.applyPatches.bind(eQ);function e2(e=21){let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}function e8(e,t){if(e.add(t),e.size>1e3){let t=e.values().next().value;void 0!==t&&e.delete(t)}}let e5="object"==typeof self?self:globalThis;function e6(e){var t;let n,i;return(t=new Map,n=(e,n)=>(t.set(n,e),e),i=r=>{if(t.has(r))return t.get(r);let[o,a]=e[r];switch(o){case 0:case -1:return n(a,r);case 1:{let e=n([],r);for(let t of a)e.push(i(t));return e}case 2:{let e=n({},r);for(let[t,n]of a)e[i(t)]=i(n);return e}case 3:return n(new Date(a),r);case 4:{let{source:e,flags:t}=a;return n(new RegExp(e,t),r)}case 5:{let e=n(new Map,r);for(let[t,n]of a)e.set(i(t),i(n));return e}case 6:{let e=n(new Set,r);for(let t of a)e.add(i(t));return e}case 7:{let{name:e,message:t}=a;return n(new e5[e](t),r)}case 8:return n(BigInt(a),r);case"BigInt":return n(Object(BigInt(a)),r);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new e5[o](a),r)})(0)}let{toString:e3}={},{keys:e4}=Object;function e7(e){let t=typeof e;if("object"!==t||!e)return[0,t];let n=e3.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]}function e9([e,t]){return 0===e&&("function"===t||"symbol"===t)}let{parse:te,stringify:tt}=JSON,tn={json:!0,lossy:!0};function ti(e){if(e.error)throw function e(t){var n;let i=t.cause instanceof Error?t.cause:"object"==typeof(n=t.cause)&&null!==n&&"string"==typeof n.message&&"string"==typeof n.name?e(t.cause):t.cause,r=void 0!==i?Error(t.message,{cause:i}):Error(t.message);for(let e of(r.name=t.name,Object.keys(t)))"name"!==e&&"message"!==e&&"cause"!==e&&(r[e]=t[e]);return r}(e.error);return e.output}function tr(e){return e.some(e=>null!=e)}async function to(e){let t=function(e,t){let n=new Map,i=new Map;function r(e,t){var n=null!==e&&"object"==typeof e&&"serialization"in e&&"data"in e?e.data:e;return"structured-clone"===t&&Array.isArray(n)?e6(n):n}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>r(t,e.serialization)));let i=await n.get(e.path);return"object"==typeof i&&null!==i&&("output"in i||"error"in i)?ti(i):i}async function a(e,n){return i.has(e)||i.set(e,t(e).then(e=>r(e,n))),await i.get(e)}async function s(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let i=e[t];if("object"==typeof i&&null!==i&&"static"===i.type&&"string"==typeof i.path){if(tr(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(i)}if("object"==typeof i&&null!==i&&"query"===i.type&&"object"==typeof i.records&&null!==i.records){let e=L(n),r=i.records[e];if(r)return ti(await a(r,i.serialization));if(i.fallback)return ti(await a(i.fallback,i.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!tr(n))return i;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await s(e,t),callOptional:async(t,n)=>{if(t in e)return await s(t,n)},callEvent:async(e,t)=>{}}}(await e.fetchJsonFromBases("__rpc-dump/index.json"),e.fetchJsonFromBases);return{isTrusted:!0,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1))}}class ta extends Error{name="StreamClosedError"}function ts(e,t){return`${e}\x1f${t}`}let tl=Math.random.bind(Math),td=e=>e,{clearTimeout:tu,setTimeout:tc}=globalThis;function th(e,t,n,i){var r,o;let a=(r=n,o=i,Array.isArray(r)?`[${o}]`:""===o?"<root>":o);return D.DF0020({name:e||"<anonymous>",type:t,path:a})}function tf(){}let tp=new Map,tm="model",tg="name",tb="type",tv="vendor",ty="version",tw="architecture",tx="console",tk="mobile",tS="tablet",tC="smarttv",tA="wearable",tE="embedded",tL="Amazon",t_="Apple",tN="ASUS",tT="BlackBerry",tR="Browser",tM="Chrome",tP="Firefox",tI="Google",tD="Huawei",t$="Microsoft",tO="Motorola",tj="Opera",tz="Samsung",tB="Sharp",tH="Sony",tU="Xiaomi",tF="Zebra",tG="Facebook",tW="Chromium OS",tq="Mac OS";function tV(e){let t={};for(let n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function tX(e){return e.toLowerCase()}function tK(e,t){return"string"==typeof e&&tX(t).includes(tX(e))}function tY(e,t){let n=e.replace(/^\s+/,"");return void 0===t?n:n.substring(0,t)}function tJ(e,t,n){let i=n??{};for(let n=0;n<t.length;n+=2){let r=t[n],o=t[n+1];for(let t=0;t<r.length;t++){let n=r[t];if(!n)break;let a=n.exec(e);if(a){for(let e=0;e<o.length;e++){let t=a[e+1],n=o[e];if(Array.isArray(n)){let e=n[0],r=n.length;if(2===r){let r=n[1];"function"==typeof r?i[e]=r(t,void 0,i):i[e]=r}else if(3===r){let r=n[1],o=n[2];"function"!=typeof r||"exec"in r||"test"in r?i[e]=t?t.replace(r,o):void 0:i[e]=t?r(t,o,i):void 0}else 4===r&&(i[e]=t?n[3](t.replace(n[1],n[2]),void 0,i):void 0)}else i[n]=t||void 0}return i}}}return i}function tQ(e,t){for(let n in t){let i=t[n];if(Array.isArray(i)&&i.length>0){for(let t=0;t<i.length;t++)if(tK(i[t],e))return"?"===n?void 0:n}else if(tK(i,e))return"?"===n?void 0:n}return e}let tZ={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},t0={browser:[[/\b(?:crmo|crios)\/([\w.]+)/i],[ty,[tg,"Chrome"]],[/edg(?:e|ios|a)?\/([\w.]+)/i],[ty,[tg,"Edge"]],[/(opera mini)\/([-\w.]+)/i,/(opera [mobileta]{3,6})\b.+version\/([-\w.]+)/i,/(opera)(?:.+version\/|[/ ]+)([\w.]+)/i],[tg,ty],[/opios[/ ]+([\w.]+)/i],[ty,[tg,`${tj} Mini`]],[/\bop(?:rg)?x\/([\w.]+)/i],[ty,[tg,`${tj} GX`]],[/\bopr\/([\w.]+)/i],[ty,[tg,tj]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[/ ]?([\w.]+)/i],[ty,[tg,"Baidu"]],[/(kindle)\/([\w.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[/ ]?([\w.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[/ ]?([\w.]*)/i,/(?:ms|\()(ie) ([\w.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w.]+)/i,/(heytap|ovi)browser\/([\d.]+)/i,/(weibo)__([\d.]+)/i],[tg,ty],[/\bddg\/([\w.]+)/i],[ty,[tg,"DuckDuckGo"]],[/(?:\buc? ?browser|juc.+ucweb)[/ ]?([\w.]+)/i],[ty,[tg,`UC${tR}`]],[/microm.+\bqbcore\/([\w.]+)/i,/\bqbcore\/([\w.]+).+microm/i,/micromessenger\/([\w.]+)/i],[ty,[tg,"WeChat"]],[/konqueror\/([\w.]+)/i],[ty,[tg,"Konqueror"]],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i],[ty,[tg,"IE"]],[/ya(?:search)?browser\/([\w.]+)/i],[ty,[tg,"Yandex"]],[/slbrowser\/([\w.]+)/i],[ty,[tg,`Smart Lenovo ${tR}`]],[/(avast|avg)\/([\w.]+)/i],[[tg,/(.+)/,`$1 Secure ${tR}`],ty],[/\bfocus\/([\w.]+)/i],[ty,[tg,`${tP} Focus`]],[/\bopt\/([\w.]+)/i],[ty,[tg,`${tj} Touch`]],[/coc_coc\w+\/([\w.]+)/i],[ty,[tg,"Coc Coc"]],[/dolfin\/([\w.]+)/i],[ty,[tg,"Dolphin"]],[/coast\/([\w.]+)/i],[ty,[tg,`${tj} Coast`]],[/miuibrowser\/([\w.]+)/i],[ty,[tg,`MIUI ${tR}`]],[/fxios\/([-\w.]+)/i],[ty,[tg,tP]],[/\bqihu|(qi?ho{0,2}|360)browser/i],[[tg,`360 ${tR}`]],[/(oculus|sailfish|huawei|vivo)browser\/([\w.]+)/i],[[tg,/(.+)/,`$1 ${tR}`],ty],[/samsungbrowser\/([\w.]+)/i],[ty,[tg,`${tz} Internet`]],[/(comodo_dragon)\/([\w.]+)/i],[[tg,/_/g," "],ty],[/metasr[/ ]?([\d.]+)/i],[ty,[tg,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d.]+)/i],[[tg,"Sogou Mobile"],ty],[/(electron)\/([\w.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w.]+))/i,/m?(qqbrowser|2345Explorer)[/ ]?([\w.]+)/i],[tg,ty],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[tg],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w.]+);)/i],[[tg,tG],ty],[/(Klarna)\/([\w.]+)/i,/(kakao(?:talk|story))[/ ]([\w.]+)/i,/(naver)\(.*?(\d+\.[\w.]+).*\)/i,/safari (line)\/([\w.]+)/i,/\b(line)\/([\w.]+)\/iab/i,/(alipay)client\/([\w.]+)/i,/(twitter)(?:and| f.+e\/([\w.]+))/i,/(chromium|instagram|snapchat)[/ ]([-\w.]+)/i],[tg,ty],[/\bgsa\/([\w.]+) .*safari\//i],[ty,[tg,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w.]+)/i],[ty,[tg,"TikTok"]],[/headlesschrome(?:\/([\w.]+)| )/i],[ty,[tg,`${tM} Headless`]],[/ wv\).+(chrome)\/([\w.]+)/i],[[tg,`${tM} WebView`],ty],[/droid.+ version\/([\w.]+)\b.+(?:mobile safari|safari)/i],[ty,[tg,`Android ${tR}`]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w.]+)/i],[tg,ty],[/version\/([\w.,]+) .*mobile\/\w+ (safari)/i],[ty,[tg,"Mobile Safari"]],[/version\/([\w(.|,)]+) .*(mobile ?safari|safari)/i],[ty,tg],[/webkit.+?(mobile ?safari|safari)(\/[\w.]+)/i],[tg,[ty,tQ,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w.]+)/i],[tg,ty],[/(navigator|netscape\d?)\/([-\w.]+)/i],[[tg,"Netscape"],ty],[/mobile vr; rv:([\w.]+)\).+firefox/i],[ty,[tg,`${tP} Reality`]],[/ekiohf.+(flow)\/([\w.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[/ ]?([\w.+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w.]+)$/i,/(firefox)\/([\w.]+)/i,/(mozilla)\/([\w.]+) .+rv:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[. ]?browser)[-/ ]?v?([\w.]+)/i,/(links) \(([\w.]+)/i,/panasonic;(viera)/i],[tg,ty],[/(cobalt)\/([\w.]+)/i],[tg,[ty,/master.|lts./,""]]],cpu:[[/(amd|x(?:(?:86|64)[-_])?|wow|win)64[;)]/i],[[tw,"amd64"]],[/(ia32(?=;))/i],[[tw,tX]],[/((?:i[346]|x)86)[;)]/i],[[tw,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[tw,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[tw,"armhf"]],[/windows (ce|mobile); ppc;/i],[[tw,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[tw,/ower/,"",tX]],[/(sun4\w)[;)]/i],[[tw,"sparc"]],[/(avr32|ia64(?=;)|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[tw,tX]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[tm,[tv,tz],[tb,tS]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?\d+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[tm,[tv,tz],[tb,tk]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[tm,[tv,t_],[tb,tk]],[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[tm,[tv,t_],[tb,tS]],[/(macintosh);/i],[tm,[tv,t_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[tm,[tv,tB],[tb,tk]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[tm,[tv,tD],[tb,tS]],[/(?:huawei|honor)([-\w ]+)[;)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][0-359c][adn]?)\b(?!.+d\/s)/i],[tm,[tv,tD],[tb,tk]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?[\w ]+)(?: bui|\))/i,/oid[^)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?\d?\w?[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[tm,/_/g," "],[tv,tU],[tb,tk]],[/oid[^)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?pad[\w ]+)(?: bui|\))/i],[[tm,/_/g," "],[tv,tU],[tb,tS]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[tm,[tv,"OPPO"],[tb,tk]],[/\b(opd2\d{3}a?) bui/i],[tm,[tv,"OPPO"],[tb,tS]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[tm,[tv,"Vivo"],[tb,tk]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[tm,[tv,"Realme"],[tb,tk]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w() ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[tm,[tv,tO],[tb,tk]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[tm,[tv,tO],[tb,tS]],[/((?=lg)?[vl]k-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[tm,[tv,"LG"],[tb,tS]],[/(lm(?:-?f100[nv]?|-[\w.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?(\w+) bui/i],[tm,[tv,"LG"],[tb,tk]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab[\w ]+|yt[-\w]{6}|tb[-\w]{6})/i],[tm,[tv,"Lenovo"],[tb,tS]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w.]*)/i],[[tm,/_/g," "],[tv,"Nokia"],[tb,tk]],[/(pixel c)\b/i],[tm,[tv,tI],[tb,tS]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[tm,[tv,tI],[tb,tk]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]?\d\.))/i],[tm,[tv,tH],[tb,tk]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[tm,"Xperia Tablet"],[tv,tH],[tb,tS]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[tm,[tv,"OnePlus"],[tb,tk]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[tm,[tv,tL],[tb,tS]],[/((?:sd|kf)[0349hijor-uw]+)( bui|\)).+silk\//i],[[tm,/(.+)/g,"Fire Phone $1"],[tv,tL],[tb,tk]],[/(playbook);[-\w),; ]+(rim)/i],[tm,tv,[tb,tS]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[tm,[tv,tT],[tb,tk]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[tm,[tv,tN],[tb,tS]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[tm,[tv,tN],[tb,tk]],[/(nexus 9)/i],[tm,[tv,"HTC"],[tb,tS]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!;|\.)|sony(?!-bra))[-_ ]?([-\w]*)/i],[tv,[tm,/_/g," "],[tb,tk]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[tm,[tv,"Acer"],[tb,tS]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[tm,[tv,"Meizu"],[tb,tk]],[/; ((?:power )?armor[\w ]{0,8})(?: bui|\))/i],[tm,[tv,"Ulefone"],[tb,tk]],[/(blackberry|benq|palm(?=-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[tv,tm,[tb,tk]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[tv,tm,[tb,tS]],[/(surface duo)/i],[tm,[tv,t$],[tb,tS]],[/droid [\d.]+; (fp\du?)(?: b|\))/i],[tm,[tv,"Fairphone"],[tb,tk]],[/(u304aa)/i],[tm,[tv,"AT&T"],[tb,tk]],[/\bsie-(\w*)/i],[tm,[tv,"Siemens"],[tb,tk]],[/\b(rct\w+) b/i],[tm,[tv,"RCA"],[tb,tS]],[/\b(venue[\d ]{2,7}) b/i],[tm,[tv,"Dell"],[tb,tS]],[/\b(q(?:mv|ta)\w+) b/i],[tm,[tv,"Verizon"],[tb,tS]],[/\b(?:barnes[& ]+noble |bn[rt])([\w+ ]*) b/i],[tm,[tv,"Barnes & Noble"],[tb,tS]],[/\b(tm\d{3}\w+) b/i],[tm,[tv,"NuVision"],[tb,tS]],[/\b(k88) b/i],[tm,[tv,"ZTE"],[tb,tS]],[/\b(nx\d{3}j) b/i],[tm,[tv,"ZTE"],[tb,tk]],[/\b(gen\d{3}) b.+49h/i],[tm,[tv,"Swiss"],[tb,tk]],[/\b(zur\d{3}) b/i],[tm,[tv,"Swiss"],[tb,tS]],[/\b((zeki)?tb.*\b) b/i],[tm,[tv,"Zeki"],[tb,tS]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[tv,"Dragon Touch"],tm,[tb,tS]],[/\b(ns-?\w{0,9}) b/i],[tm,[tv,"Insignia"],[tb,tS]],[/\b((nxa|next)-?\w{0,9}) b/i],[tm,[tv,"NextBook"],[tb,tS]],[/\b(xtreme_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[tv,"Voice"],tm,[tb,tk]],[/\b(lvtel-)?(v1[12]) b/i],[[tv,"LvTel"],tm,[tb,tk]],[/\b(ph-1) /i],[tm,[tv,"Essential"],[tb,tk]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[tm,[tv,"Envizen"],[tb,tS]],[/\b(trio[-\w. ]+) b/i],[tm,[tv,"MachSpeed"],[tb,tS]],[/\btu_(1491) b/i],[tm,[tv,"Rotor"],[tb,tS]],[/(shield[\w ]+) b/i],[tm,[tv,"Nvidia"],[tb,tS]],[/(sprint) (\w+)/i],[tv,tm,[tb,tk]],[/(kin\.[onetw]{3})/i],[[tm,/\./g," "],[tv,t$],[tb,tk]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[tm,[tv,tF],[tb,tS]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[tm,[tv,tF],[tb,tk]],[/smart-tv.+(samsung)/i],[tv,[tb,tC]],[/hbbtv.+maple;(\d+)/i],[[tm,/^/,"SmartTV"],[tv,tz],[tb,tC]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[tv,"LG"],[tb,tC]],[/(apple) ?tv/i],[tv,[tm,`${t_} TV`],[tb,tC]],[/crkey/i],[[tm,`${tM}cast`],[tv,tI],[tb,tC]],[/droid.+aft(\w+)( bui|\))/i],[tm,[tv,tL],[tb,tC]],[/\(dtv[);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[tm,[tv,tB],[tb,tC]],[/(bravia[\w ]+)( bui|\))/i],[tm,[tv,tH],[tb,tC]],[/(mitv-\w{5}) bui/i],[tm,[tv,tU],[tb,tC]],[/Hbbtv.*(technisat) (.*);/i],[tv,tm,[tb,tC]],[/\b(roku)[\dx]*[)/]((?:dvp-)?[\d.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w+ ]*; *(\w[^;]*);([^;]*)/i],[[tv,tY],[tm,tY],[tb,tC]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[tb,tC]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[tv,tm,[tb,tx]],[/droid.+; (shield) bui/i],[tm,[tv,"Nvidia"],[tb,tx]],[/(playstation [345portablevi]+)/i],[tm,[tv,tH],[tb,tx]],[/\b(xbox(?: one)?(?!; xbox))[); ]/i],[tm,[tv,t$],[tb,tx]],[/((pebble))app/i],[tv,tm,[tb,tA]],[/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i],[tm,[tv,t_],[tb,tA]],[/droid.+; (glass) \d/i],[tm,[tv,tI],[tb,tA]],[/droid.+; (wt63?0{2,3})\)/i],[tm,[tv,tF],[tb,tA]],[/(quest( \d| pro)?)/i],[tm,[tv,tG],[tb,tA]],[/(tesla)(?: qtcarbrowser|\/[-\w.]+)/i],[tv,[tb,tE]],[/(aeobc)\b/i],[tm,[tv,tL],[tb,tE]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[tm,[tb,tk]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[tm,[tb,tS]],[/\b((tablet|tab)[;/]|focus\/\d(?!.+mobile))/i],[[tb,tS]],[/(phone|mobile(?:[;/]| [ \w/.]*safari)|pda(?=.+windows ce))/i],[[tb,tk]],[/(android[-\w. ]{0,9});.+buil/i],[tm,[tv,"Generic"]]],engine:[[/windows.+ edge\/([\w.]+)/i],[ty,[tg,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i],[ty,[tg,"Blink"]],[/(presto)\/([\w.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w.]+)/i,/ekioh(flow)\/([\w.]+)/i,/(khtml|tasman|links)[/ ]\(?([\w.]+)/i,/(icab)[/ ]([23]\.[\d.]+)/i,/\b(libweb)/i],[tg,ty],[/rv:([\w.]{1,9})\b.+(gecko)/i],[ty,tg]],os:[[/microsoft (windows) (vista|xp)/i],[tg,ty],[/(windows (?:phone(?: os)?|mobile))[/ ]?([.\w ]*)/i],[tg,[ty,tQ,tZ]],[/windows nt 6\.2; (arm)/i,/windows[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i,/(?:win(?=[39n])|win 9x )([nt\d.]+)/i],[[ty,tQ,tZ],[tg,"Windows"]],[/ip[honead]{2,4}\b(?:.*os (\w+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[/ ])([\d.]+)/i,/cfnetwork\/.+darwin/i],[[ty,/_/g,"."],[tg,"iOS"]],[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[tg,tq],[ty,/_/g,"."]],[/droid ([\w.]+)\b.+(android[- ]x86|harmonyos)/i],[ty,tg],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-/ ]?([\w.]*)/i,/(blackberry)\w*\/([\w.]*)/i,/(tizen|kaios)[/ ]([\w.]+)/i,/\((series40);/i],[tg,ty],[/\(bb(10);/i],[ty,[tg,tT]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-/ ]?([\w.]*)/i],[ty,[tg,"Symbian"]],[/mozilla\/[\d.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w.]+)/i],[ty,[tg,`${tP} OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w.]+)/i],[ty,[tg,"webOS"]],[/watch(?: ?os[,/]|\d,\d\/)([\d.]+)/i],[ty,[tg,"watchOS"]],[/crkey\/([\d.]+)/i],[ty,[tg,`${tM}cast`]],[/(cros) \w+(?:\)| ([\w.]+)\b)/i],[[tg,tW],ty],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w.]*)/i,/(mint)[/() ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-/ ]?(?!chrom|package)([-\w.]*)/i,/(hurd|linux) ?([\w.]*)/i,/(gnu) ?([\w.]*)/i,/\b([-e-hrntopcs]{0,5}bsd|dragonfly)[/ ]?(?!amd|[ix346]{1,2}86)([\w.]*)/i,/(haiku) (\w+)/i],[tg,ty],[/(sunos) ?([\w.]*)/i],[[tg,"Solaris"],ty],[/((?:open)?solaris)[-/ ]?([\w.]*)/i,/(aix) ((\d)(?=[.) ])[\w.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w.]*)/i],[tg,ty]]};function t1(e){return"object"==typeof e&&null!==e}function t2(){if("u">typeof window&&window.navigator)return window.navigator}function t8(e){return e.length>500?tY(e,500):e}function t5(e){return e.includes(":")}function t6(e,t){return t5(t)?t:`${e}:${t}`}function t3(e,t,n){let i,r=`devframe:settings:${n}:${t}`;function o(){return i||(i=e.sharedState.get(r,{initialValue:{}})),i}return{get:async e=>(await o()).value()[e],async set(e,t){(await o()).mutate(n=>{n[e]=t})},async delete(e){(await o()).mutate(t=>{delete t[e]})},all:async()=>(await o()).value(),onChange:async e=>(await o()).on("updated",t=>e(t))}}Object.freeze(tV([tg,ty,"major"])),Object.freeze(tV([tw])),Object.freeze(tV([tm,tv,tb,tx,tk,tC,tS,tA,tE])),Object.freeze(tV([tg,ty])),Object.freeze(tV([tg,ty]));let t4="__DEVFRAME_CONNECTION_META__",t7="__DEVFRAME_CONNECTION_AUTH_TOKEN__";function t9(e){try{localStorage.setItem(t7,e)}catch{}globalThis[t7]=e}async function ne(e={}){let t,n,i,{baseURL:r="./",rpcOptions:o={},cacheOptions:a=!1}=e,s=B(),l=Array.isArray(r)?r:[r],d=e.connectionMeta||function(){for(let e of[()=>window?.[t4],()=>globalThis?.[t4],()=>parent.window?.[t4]])try{let t=e();if(t)return t}catch{}}(),u=l[0]??"./";if(!d){let e=[];for(let t of l)try{d=await fetch(q(y,t)).then(e=>e.json()),u=t,globalThis[t4]=d;break}catch(t){e.push(t)}if(!d)throw Error(`Failed to get connection meta from ${l.join(", ")}`,{cause:e})}let c=new _({functions:[],..."object"==typeof e.cacheOptions?e.cacheOptions:{}}),h={rpc:void 0},f=function(e){for(let t of[()=>e,()=>localStorage.getItem(t7)??void 0,()=>window?.[t7],()=>globalThis?.[t7],()=>parent.window?.[t7]])try{let e=t();if(e)return e}catch{}}(e.authToken);f&&t9(f);let p=new j(h);async function m(e){let t=[u,...l.filter(e=>e!==u)].filter(e=>null!=e),n=[];for(let i of t)try{return await fetch(q(e,i)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${i}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(", ")}`,{cause:n})}let g="static"===d.backend?await to({fetchJsonFromBases:m}):function(e){let t,n,{authToken:i,connectionMeta:r,metaBaseUrl:o,events:a,clientRpc:s,rpcOptions:l={},wsOptions:d={}}=e,u=!1,c={promise:new Promise((e,i)=>{t=e,n=i}),resolve:t,reject:n},h=function(e,t,n){let i="https:"===n.protocol?"wss:":"ws:",r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&"object"==typeof e){if(null!=e.host||null!=e.port){let t=e.host??`${n.hostname}:${e.port}`,r=new URL(e.path??"/",`${i}//${t}`);return r.protocol=i,r.href}let t=new URL(e.path??"",r);return t.protocol=i,t.href}if("number"==typeof e)return`${i}//${n.hostname}:${e}`;let o=e??"";if(/^wss?:\/\//i.test(o))return o;if(/^https?:\/\//i.test(o)){var a;let e;return a=/^https/i.test(o)?"wss://":"ws://",((e=o.match(U))||(e=o.match(/^\/{2,}/)),e)?a+o.slice(e[0].length):a+o}let s=new URL(o,r);return s.protocol=i,s.href}(r.websocket,o??"./",location),f=new Map;for(let e of r.jsonSerializableMethods??[])f.set(e,{jsonSerializable:!0});let p=function(e,t){let{channel:n,rpcOptions:i={}}=t;return function(e,t){let n,i,{post:r,on:o,off:a=()=>{},eventNames:s=[],serialize:l=td,deserialize:d=td,resolver:u,bind:c="rpc",timeout:h=6e4,proxify:f=!0}=t,p=!1,m=new Map;async function g(e,o,a,s){let d,u,c;if(p)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let f={m:e,a:o,t:"q"};s&&(f.o=!0);let g=async e=>r(l(e));if(a)return void await g(f);if(n)try{await n}finally{n=void 0}let{promise:b,resolve:v,reject:y}={promise:new Promise((e,t)=>{u=e,c=t}),resolve:u,reject:c},w=function(e=21){let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*tl()|0];return t}();async function x(n=f){return h>=0&&"object"==typeof(d=tc(()=>{try{if(t.onTimeoutError?.call(i,e,o)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){y(e)}m.delete(w)},h))&&(d=d.unref?.()),m.set(w,{resolve:v,reject:y,timeoutId:d,method:e}),await g(n),b}f.i=w;try{t.onRequest?await t.onRequest.call(i,f,x,v):await x()}catch(e){if(t.onGeneralError?.call(i,e)!==!0)throw e;return}finally{tu(d),m.delete(w)}return b}let b={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:function(e){let t=Array.from(m.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return m.clear(),t},get $closed(){return p},get $meta(){return t.meta},$close:function(e){p=!0,m.forEach(({reject:t,method:n})=>{let i=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=i,t(e);t(i)}),m.clear(),a(v)},$functions:e};async function v(n,...o){let a;try{a=d(n)}catch(e){if(t.onGeneralError?.call(i,e)!==!0)throw e;return}if("q"===a.t){let n,s,{m:d,a:h,o:f}=a,p=await (u?u.call(i,d,e[d]):e[d]);if(f&&(p||=()=>void 0),p)try{n=await p.apply("rpc"===c?i:e,h)}catch(e){s=e}else s=Error(`[birpc] function "${d}" not found`);if(a.i){if(s&&t.onFunctionError&&!0===t.onFunctionError.call(i,s,d,h))return;if(!s)try{await r(l({t:"s",i:a.i,r:n}),...o);return}catch(e){if(s=e,t.onGeneralError?.call(i,e,d,h)!==!0)throw e}try{await r(l({t:"s",i:a.i,e:s}),...o)}catch(e){if(t.onGeneralError?.call(i,e,d,h)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,i=m.get(e);i&&(tu(i.timeoutId),n?i.reject(n):i.resolve(t)),m.delete(e)}}return i=f?new Proxy({},{get(t,n){if(Object.prototype.hasOwnProperty.call(b,n))return b[n];if("then"===n&&!s.includes("then")&&!("then"in e))return;let i=(...e)=>g(n,e,!0);if(s.includes(n))return i.asEvent=i,i;let r=(...e)=>g(n,e,!1);return r.asEvent=i,r}}):b,n=o(v),i}(e,{...n,timeout:-1,...i,proxify:!1})}(s.functions,{channel:function(e){let t=e.url;e.authToken&&(t=`${t}?devframe_auth_token=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:i=tf,onError:r=tf,onDisconnected:o=tf,definitions:a=tp}=e;n.addEventListener("open",e=>{i(e)}),n.addEventListener("error",e=>{r(e instanceof Error?e:Error(e.type))}),n.addEventListener("close",e=>{o(e)});let s=new Map;return{on:e=>{n.addEventListener("message",t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)return void n.send(e);if(n.readyState===WebSocket.CONNECTING){let i=()=>{t(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>t();function t(){n.removeEventListener("open",i),n.removeEventListener("close",r)}n.addEventListener("open",i),n.addEventListener("close",r);return}r(Error("Devframe WebSocket is not open; message dropped"))},serialize:e=>{let t;return("q"===e.t?t=e.m:(t=s.get(e.i),s.delete(e.i)),!("s"===e.t&&"e"in e)&&t&&a.get(t)?.jsonSerializable===!0)?function(e,t=""){return JSON.stringify(e,function(e,n){let i=null!=this?this[e]:n;if(void 0===i){if(Array.isArray(this))throw th(t,"undefined",this,e);return n}if(null===i)return n;if("bigint"==typeof i)throw th(t,"BigInt",this,e);if("object"==typeof i){if(i instanceof Map)throw th(t,"Map",this,e);if(i instanceof Set)throw th(t,"Set",this,e);if(i instanceof Date)throw th(t,"Date",this,e);if(Array.isArray(i))return n;let r=Object.getPrototypeOf(i);if(null!==r&&r!==Object.prototype)throw th(t,i.constructor?.name??"class instance",this,e)}return n})}(e,t??""):`s:${tt(function(e,t={}){var n,i,r;let o,a,s=[];return(n=!(t.json||t.lossy),i=!!t.json,r=new Map,o=(e,t)=>{let n=s.push(e)-1;return r.set(t,n),n},a=e=>{if(r.has(e))return r.get(e);let[t,s]=e7(e);switch(t){case 0:{let i=e;switch(s){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(n)throw TypeError(`unable to serialize ${s}`);i=null;break;case"undefined":return o([-1],e)}return o([t,i],e)}case 1:{if(s){let t=e;return"DataView"===s?t=new Uint8Array(e.buffer):"ArrayBuffer"===s&&(t=new Uint8Array(e)),o([s,[...t]],e)}let n=[],i=o([t,n],e);for(let t of e)n.push(a(t));return i}case 2:{if(s)switch(s){case"BigInt":return o([s,e.toString()],e);case"Boolean":case"Number":case"String":return o([s,e.valueOf()],e)}if(i&&"toJSON"in e)return a(e.toJSON());let r=[],l=o([t,r],e);for(let t of e4(e))(n||!e9(e7(e[t])))&&r.push([a(t),a(e[t])]);return l}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:i}=e;return o([t,{source:n,flags:i}],e)}case 5:{let i=[],r=o([t,i],e);for(let[t,r]of e)(n||!(e9(e7(t))||e9(e7(r))))&&i.push([a(t),a(r)]);return r}case 6:{let i=[],r=o([t,i],e);for(let t of e)(n||!e9(e7(t)))&&i.push(a(t));return r}}let{message:l}=e;return o([t,{name:s,message:l}],e)})(e),s}(e,tn))}`},deserialize:e=>{let t=e.startsWith("s:")?e6(te(e.slice(2))):JSON.parse(e);return"q"===t.t&&t.i&&t.m&&s.set(t.i,t.m),t}}}({url:h,authToken:i,definitions:f,...d}),rpcOptions:l});s.register({name:"devframe:auth:revoked",type:"event",handler:()=>{u=!1,a.emit("rpc:is-trusted:updated",!1)}});let m=i;function g(){var e;let t,n,i,r,o,a,s,l=(e=navigator.userAgent,s=()=>t||=function(e,t){if(!t&&!t1(e)){if("string"==typeof e)return{ua:t8(e),isSelfNavigator:!1,navigator:void 0,userAgentData:void 0,regexMap:t0};let t=t2(),n=t8(t&&t.userAgent?t.userAgent:"");return{ua:n,isSelfNavigator:!!(t&&t.userAgent===n),navigator:t,userAgentData:t?.userAgentData,regexMap:t0}}let n=t2(),i=t1(e)?void 0:e,r=t1(e)?e:t,o=t8(i||(n&&n.userAgent?n.userAgent:"")),a=n?.userAgentData;return{ua:o,isSelfNavigator:!!(n&&n.userAgent===o),navigator:n,userAgentData:a,regexMap:r?function(e,t={}){let n={};for(let i of Object.keys(e)){let r=t[i];r&&r.length%2==0?n[i]=[...r,...e[i]]:n[i]=e[i]}return n}(t0,r):t0}}(e,void 0),{get ua(){return s().ua},get browser(){var d,u;let e;return n||=(d=s(),e={name:void 0,version:void 0,major:void 0},tJ(d.ua,d.regexMap.browser,e),e.major="string"==typeof(u=e.version)?u.replace(/[^\d.]/g,"").split(".")[0]:void 0,d.isSelfNavigator&&d.navigator?.brave&&"function"==typeof d.navigator.brave.isBrave&&(e.name="Brave"),e)},get engine(){var c;let e;return i||=(c=s(),e={name:void 0,version:void 0},tJ(c.ua,c.regexMap.engine,e),e)},get os(){var h;let e;return r||=(h=s(),e={name:void 0,version:void 0},tJ(h.ua,h.regexMap.os,e),h.isSelfNavigator&&!e.name&&h.userAgentData?.platform&&"Unknown"!==h.userAgentData.platform&&(e.name=h.userAgentData.platform.replace(/chrome os/i,tW).replace(/macos/i,tq)),e)},get device(){var f;let e;return o||=(f=s(),e={vendor:void 0,model:void 0,type:void 0},tJ(f.ua,f.regexMap.device,e),f.isSelfNavigator&&!e.type&&f.userAgentData?.mobile&&(e.type=tk),f.isSelfNavigator&&"Macintosh"===e.model&&f.navigator&&void 0!==f.navigator.standalone&&f.navigator.maxTouchPoints&&f.navigator.maxTouchPoints>2&&(e.model="iPad",e.type=tS),e)},get cpu(){var p;let e;return a||=(p=s(),e={architecture:void 0},tJ(p.ua,p.regexMap.cpu,e),e)}});return[l.browser.name,l.browser.version,"|",l.os.name,l.os.version,l.device.type].filter(e=>e).join(" ")}async function b(e){m=e;let t=await p.$call("anonymous:devframe:auth",{authToken:e,ua:g(),origin:location.origin});return(u=t.isTrusted)&&c.resolve(!0),a.emit("rpc:is-trusted:updated",u),t.isTrusted}return{get isTrusted(){return u},requestTrust:async function(){return!!u||b(m??"")},requestTrustWithToken:b,requestTrustWithCode:async function(e){let t=await p.$call("anonymous:devframe:auth:exchange",{code:e,ua:g(),origin:location.origin}),n=t?.authToken??null;return n&&(m=n,u=!0,c.resolve(!0),a.emit("rpc:is-trusted:updated",!0)),n},ensureTrusted:async function(e=6e4){if(u&&c.resolve(!0),e<=0)return c.promise;let t=()=>{};return await Promise.race([c.promise.then(t),new Promise((n,i)=>{let r=setTimeout(()=>{i(Error("[devframe] Timeout waiting for rpc to be trusted"))},e);t=()=>clearTimeout(r)})]),u},call:(...e)=>p.$call(...e),callEvent:(...e)=>p.$callEvent(...e),callOptional:(...e)=>p.$callOptional(...e)}}({authToken:f,connectionMeta:d,metaBaseUrl:function(){let e=q(y,u);try{return new URL(e,globalThis.location?.href).href}catch{return e}}(),events:s,clientRpc:p,rpcOptions:{...o,async onRequest(e,t,n){if(await o.onRequest?.call(this,e,t,n),a&&c?.validate(e.m)){if(c.has(e.m,e.a))return n(c.cached(e.m,e.a));let i=await t(e);c.apply(e,i)}else await t(e)}},wsOptions:e.wsOptions});try{t=new BroadcastChannel("devframe-auth")}catch{}let b={events:s,get isTrusted(){return g.isTrusted},connectionMeta:d,ensureTrusted:g.ensureTrusted,requestTrust:g.requestTrust,requestTrustWithToken:async e=>(t9(e),g.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let n=await g.requestTrustWithCode(e);if(!n)return!1;t9(n);try{t?.postMessage({type:"auth-update",authToken:n})}catch{}return!0},call:g.call,callEvent:g.callEvent,callOptional:g.callOptional,client:p,sharedState:void 0,streaming:void 0,cacheManager:c,scope:void 0};b.sharedState=function(e){let t=new Map,n=new Map,i=new Set,r="static"===e.connectionMeta.backend;function o(e,t){let i=n.get(e);return!i||"object"!=typeof i||Array.isArray(i)||"object"!=typeof t||Array.isArray(t)?t:{...i,...t}}function a(t,n){let i=[];return i.push(n.on("updated",(n,i,o)=>{r||(i?e.callEvent("devframe:rpc:server-state:patch",t,i,o):e.callEvent("devframe:rpc:server-state:set",t,n,o))})),()=>{for(let e of i)e()}}return e.client.register({name:"devframe:rpc:client-state:updated",type:"event",handler:(e,n,i)=>{let r=t.get(e);!r||r.syncIds.has(i)||r.mutate(()=>o(e,n),i)}}),e.client.register({name:"devframe:rpc:client-state:patch",type:"event",handler:(e,n,i)=>{let r=t.get(e);!r||r.syncIds.has(i)||r.patch(n,i)}}),{keys:()=>Array.from(t.keys()),onKeyAdded:e=>(i.add(e),()=>{i.delete(e)}),get:async(s,l)=>{if(l?.initialValue!==void 0&&n.set(s,l.initialValue),t.has(s))return t.get(s);let d=function(e){let{enablePatches:t=!1}=e,n=B(),i=e.initialValue,r=new Set;return{on:n.on,value:()=>i,patch:(e,t=e2())=>{r.has(t)||(!function(){let e="replace",t="remove";function n(e){if(!es(e))return e;if(eg(e))return e.map(n);if(eb(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,n(t)]));if(ev(e))return new Set(Array.from(e).map(n));let t=Object.create(Z(e));for(let i in e)t[i]=n(e[i]);return ef(e,K)&&(t[K]=e[K]),t}function i(e){return ea(e)?n(e):e}eN[eL]||(eN[eL]={applyPatches_:function(i,r){return r.forEach(r=>{let{path:o,op:a}=r,s=i;for(let e=0;e<o.length-1;e++){let t=eh(s),n=o[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||n===ee)&&J(19),ew(s)&&n===et&&J(19),ey(s=ep(s,n))||J(18,o.join("/"))}let l=eh(s),d=n(r.value),u=o[o.length-1];switch(a){case e:switch(l){case 2:return s.set(u,d);case 3:J(16);default:return s[u]=d}case"add":switch(l){case 1:return"-"===u?s.push(d):s.splice(u,0,d);case 2:return s.set(u,d);case 3:return s.add(d);default:return s[u]=d}case t:switch(l){case 1:return s.splice(u,1);case 2:return s.delete(u);case 3:return s.delete(r.value);default:return delete s[u]}default:J(17,a)}}),i},generatePatches_:function(n,r,o){if(n.scope_.processedForPatches_.has(n))return;n.scope_.processedForPatches_.add(n);let{patches_:a,inversePatches_:s}=o;switch(n.type_){case 0:case 2:return function(n,r,o,a){let{base_:s,copy_:l,type_:d}=n;ec(n.assigned_,(n,u)=>{let c=ep(s,n,d),h=ep(l,n,d),f=u?ef(s,n)?e:"add":t;if(c===h&&f===e)return;let p=r.concat(n);o.push(f===t?{op:f,path:p}:{op:f,path:p,value:i(h)}),a.push("add"===f?{op:t,path:p}:f===t?{op:"add",path:p,value:i(c)}:{op:e,path:p,value:i(c)})})}(n,r,a,s);case 1:return function(n,r,o,a){let{base_:s,assigned_:l}=n,d=n.copy_;d.length<s.length&&([s,d]=[d,s],[o,a]=[a,o]);let u=!0===n.allIndicesReassigned_;for(let t=0;t<s.length;t++){let n=d[t],c=s[t];if((u||l?.get(t.toString()))&&n!==c){let s=n?.[Y];if(s&&s.modified_)continue;let l=r.concat([t]);o.push({op:e,path:l,value:i(n)}),a.push({op:e,path:l,value:i(c)})}}for(let e=s.length;e<d.length;e++){let t=r.concat([e]);o.push({op:"add",path:t,value:i(d[e])})}for(let e=d.length-1;s.length<=e;--e){let n=r.concat([e]);a.push({op:t,path:n})}}(n,r,a,s);case 3:return function(e,n,i,r){let{base_:o,copy_:a}=e,s=0;o.forEach(e=>{if(!a.has(e)){let o=n.concat([s]);i.push({op:t,path:o,value:e}),r.unshift({op:"add",path:o,value:e})}s++}),s=0,a.forEach(e=>{if(!o.has(e)){let o=n.concat([s]);i.push({op:"add",path:o,value:e}),r.unshift({op:t,path:o,value:e})}s++})}(n,r,a,s)}},generateReplacementPatches_:function(t,n,i){let{patches_:r,inversePatches_:o}=i;r.push({op:e,path:[],value:n===X?void 0:n}),o.push({op:e,path:[],value:t})},getPath:function e(t,n=[]){if(void 0!==t.key_){var i;let e,r=t.parent_.copy_??t.parent_.base_,o=ey(i=ep(r,t.key_))?i?.[Y]:null,a=ep(r,t.key_);if(void 0===a||a!==t.draft_&&a!==t.base_&&a!==t.copy_||null!=o&&o.base_!==t.base_)return null;let s=3===t.parent_.type_;if(e=s?Array.from(t.parent_.drafts_.keys()).indexOf(t.key_):t.key_,!(s&&r.size>e||ef(r,e)))return null;n.push(e)}if(t.parent_)return e(t.parent_,n);n.reverse();try{var r=t.copy_,o=n;let e=r;for(let t=0;t<o.length-1;t++)if(!ey(e=ep(e,o[t]))||null===e)throw Error(`Cannot resolve path at '${o.join("/")}'`)}catch(e){return null}return n}})}(),i=e1(i,e),e8(r,t),n.emit("updated",i,void 0,t))},mutate:(e,o=e2())=>{if(!r.has(o))if(e8(r,o),t){let[t,r]=e0(i,e);i=t,n.emit("updated",i,r,o)}else i=eZ(i,e),n.emit("updated",i,void 0,o)},syncIds:r}}({initialValue:l?.initialValue,enablePatches:!1});async function u(){if(r||e.callEvent("devframe:rpc:server-state:subscribe",s),l?.initialValue!==void 0){for(let e of(t.set(s,d),i))e(s);return e.call("devframe:rpc:server-state:get",s).then(e=>{void 0!==e&&d.mutate(()=>o(s,e))}).catch(e=>{console.error("Error getting server state",e)}),a(s,d),d}{let n=await e.call("devframe:rpc:server-state:get",s);for(let e of(d.mutate(()=>o(s,n)),t.set(s,d),i))e(s);return a(s,d),d}}return new Promise(t=>{if(e.isTrusted)u().then(t);else{t(d);let n=!1;e.events.on("rpc:is-trusted:updated",e=>{e&&!n&&(n=!0,u())})}})}}}(b),n=new Map,i=new Map,b.client.register({name:"devframe:streaming:chunk",type:"event",handler(e,t,i,r){let o=n.get(ts(e,t));o?._push(i,r)}}),b.client.register({name:"devframe:streaming:end",type:"event",handler(e,t,i){let r=ts(e,t),o=n.get(r);o&&(o._end(i),n.delete(r))}}),b.client.register({name:"devframe:streaming:upload-cancel",type:"event",handler(e,t){let n=ts(e,t),r=i.get(n);r&&(r.abort("server cancelled upload"),i.delete(n))}}),b.events.on("rpc:is-trusted:updated",e=>{if(e)for(let[e,t]of n){if(t.cancelled||t.done)continue;let n=e.indexOf("\x1f");if(n<0)continue;let i=e.slice(0,n),r=e.slice(n+1);b.callEvent("devframe:streaming:subscribe",i,r,{afterSeq:t.lastSeenSeq})}}),b.streaming={subscribe:function(e,t,i={}){let r=ts(e,t),o=n.get(r);if(o)return o;let a=function(e={}){let t,n,i,r,o=e.id??e2(),a=Math.max(1,e.highWaterMark??256),s=[],l=0,d=!1,u=!1;function c(){if(n){if(s.length>0){let e=s.shift(),t=n;n=void 0,t.resolve({value:e,done:!1});return}if(d){let e=n;if(n=void 0,t){let n=Error(t.message);n.name=t.name,e.reject(n)}else e.resolve({value:void 0,done:!0})}}}function h(){if(i){for(;s.length>0;){let e=s.shift();try{i.enqueue(e)}catch{break}}if(d&&i){try{if(t){let e=Error(t.message);e.name=t.name,i.error(e)}else i.close()}catch{}i=void 0}}}function f(e){!d&&(d=!0,t=e,c(),r&&h())}function p(){u||d||(u=!0,e.onCancel?.(),f(void 0))}return{id:o,get cancelled(){return u},get done(){return d},get lastSeenSeq(){return l},get readable(){return r||(r=new ReadableStream({start(e){i=e,h()},cancel(){p()}}))},cancel:p,_push:function(t,n){if(!d&&!u&&!(t<=l)){if(l=t,s.push(n),s.length>a){let t=s.length-a;s.splice(0,t),e.onOverflow?.(t)}c(),r&&h()}},_end:f,[Symbol.asyncIterator]:()=>({next(){if(s.length>0)return Promise.resolve({value:s.shift(),done:!1});if(d){if(t){let e=Error(t.message);return e.name=t.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{n={resolve:e,reject:t}})},return:()=>(p(),Promise.resolve({value:void 0,done:!0}))})}}({id:t,highWaterMark:i.highWaterMark,onOverflow(n){console.warn(`[devframe] DF0029: Stream "${e}#${t}" dropped ${n} chunk(s) after exceeding the client high-water mark.`)},onCancel(){b.callEvent("devframe:streaming:cancel",e,t),n.delete(r)}});if(n.set(r,a),b.isTrusted)b.callEvent("devframe:streaming:subscribe",e,t,{afterSeq:0});else{let i=b.events.on("rpc:is-trusted:updated",o=>{o&&(i(),!n.has(r)||a.cancelled||a.done||b.callEvent("devframe:streaming:subscribe",e,t,{afterSeq:a.lastSeenSeq}))})}return a},upload:function(e,t){let n=ts(e,t),r=i.get(n);if(r)return r;let o=function(e={}){let t=e.id??e2(),n=Math.max(0,e.replayWindow??0),i=B(),r=new AbortController,o=[],a=!1,s=0;function l(e){if(a)throw new ta(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(o.push({seq:s,chunk:e}),o.length>n&&o.splice(0,o.length-n)),i.emit("chunk",s,e)}function d(e){if(a)return;a=!0;let t=function(e){if(e instanceof Error)return{name:e.name||"Error",message:e.message};if("string"==typeof e)return{name:"Error",message:e};try{return{name:"Error",message:JSON.stringify(e)}}catch{return{name:"Error",message:String(e)}}}(e);r.abort(e),i.emit("end",t)}function u(){a||(a=!0,r.signal.aborted||r.abort("stream closed"),i.emit("end",void 0))}let c=new WritableStream({write(e){l(e)},close(){u()},abort(e){d(e)}});return{id:t,signal:r.signal,get closed(){return a},get lastSeq(){return s},write:l,error:d,close:u,abort:function(e){!a&&(r.signal.aborted||r.abort(e??"aborted"))},writable:c,events:i,buffer:o}}({id:t});return o.events.on("chunk",(n,i)=>{b.callEvent("devframe:streaming:upload-chunk",e,t,n,i)}),o.events.on("end",r=>{b.callEvent("devframe:streaming:upload-end",e,t,r),i.delete(n)}),i.set(n,o),o}};let v=new Map;b.scope=e=>{if(!e)return b;let t=v.get(e);!t&&(t={namespace:e,base:b,rpc:{namespace:e,register(t){if(t5(t.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${e}" received an already-namespaced function name "${t.name}". Pass a bare name without a ":" separator.`);b.client.register({...t,name:`${e}:${t.name}`})},call:(t,...n)=>b.call(t6(e,t),...n),callEvent:(t,...n)=>b.callEvent(t6(e,t),...n),callOptional:(t,...n)=>b.callOptional(t6(e,t),...n),sharedState:(t,n)=>b.sharedState.get(t6(e,t),n),streaming:{subscribe:(t,n,i)=>b.streaming.subscribe(t6(e,t),n,i),upload:(t,n)=>b.streaming.upload(t6(e,t),n)}},settings:{global:t3(b,e,"global"),project:t3(b,e,"project")},scope:b.scope},v.set(e,t));return t},h.rpc=b,g.requestTrust();let x=e.otpParam??w;return x&&V(b,{param:x}),t&&(t.onmessage=e=>{e.data?.type==="auth-update"&&e.data.authToken&&b.requestTrustWithToken(e.data.authToken)}),b}let nt=(0,g.createContext)({rpc:null,error:null});function nn(){return(0,g.use)(nt)}function ni({children:e}){let[t,n]=(0,g.useState)({rpc:null,error:null});return(0,g.useEffect)(()=>{let e=!1,t=v.default.env.NEXT_PUBLIC_DEVFRAME_WS,i=t?/^\d+$/.test(t)?{port:Number(t),path:"__devframe_ws"}:t:void 0;return ne(i?{connectionMeta:{backend:"websocket",websocket:i}}:void 0).then(t=>{e||n({rpc:t,error:null})},t=>{e||n({rpc:null,error:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},[]),(0,m.jsx)(nt,{value:t,children:e})}function nr(e){let{rpc:t}=nn(),[n,i]=(0,g.useState)(null),[r,o]=(0,g.useState)(!1),[a,s]=(0,g.useState)(null),l=(0,g.useCallback)(async()=>{if(t){o(!0),s(null);try{i(await e(t))}catch(e){s(e instanceof Error?e.message:String(e))}finally{o(!1)}}},[t,e]);return(0,g.useEffect)(()=>{l()},[l]),{data:n,loading:r,error:a,refresh:l,setData:i}}function no(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function na(...e){return g.useCallback(function(...e){return t=>{let n=!1,i=e.map(e=>{let i=no(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():no(e[t],null)}}}}(...e),e)}function ns(e){let t=g.forwardRef((t,n)=>{var i;let r,o,{children:a,...s}=t,l=null,d=!1,u=[];nh(a)&&"function"==typeof nm&&(a=nm(a._payload)),g.Children.forEach(a,e=>{var t;if(t=e,g.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===nd){d=!0;let t="child"in e.props?e.props.child:e.props.children;nh(t)&&"function"==typeof nm&&(t=nm(t._payload)),l=nu(e,t),u.push(l?.props?.children)}else u.push(e)}),l?l=g.cloneElement(l,void 0,u):!d&&1===g.Children.count(a)&&g.isValidElement(a)&&(l=a);let c=l?(i=l,(o=(r=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?i.ref:(o=(r=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,h=na(n,c);if(!l){if(a||0===a)throw Error(d?np(e):nf(e));return a}let f=function(e,t){let n={...t};for(let i in t){let r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...e)=>{let t=o(...e);return r(...e),t}:r&&(n[i]=r):"style"===i?n[i]={...r,...o}:"className"===i&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}(s,l.props??{});return l.type!==g.Fragment&&(f.ref=n?h:c),g.cloneElement(l,f)});return t.displayName=`${e}.Slot`,t}var nl=ns("Slot"),nd=Symbol.for("radix.slottable"),nu=(e,t)=>{if("child"in e.props){let t=e.props.child;return g.isValidElement(t)?g.cloneElement(t,void 0,e.props.children(t.props.children)):null}return g.isValidElement(t)?t:null},nc=Symbol.for("react.lazy");function nh(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===nc&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var nf=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,np=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,nm=g[" use ".trim().toString()];let ng=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),nb=[],nv=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let i=e[t],r=n.nextPart.get(i);if(r){let n=nv(e,t+1,r);if(n)return n}let o=n.validators;if(null===o)return;let a=0===t?e.join("-"):e.slice(t).join("-"),s=o.length;for(let e=0;e<s;e++){let t=o[e];if(t.validator(a))return t.classGroupId}},ny=(e,t)=>{let n=ng();for(let i in e)nw(e[i],n,i,t);return n},nw=(e,t,n,i)=>{let r=e.length;for(let o=0;o<r;o++)nx(e[o],t,n,i)},nx=(e,t,n,i)=>{"string"==typeof e?nk(e,t,n):"function"==typeof e?nS(e,t,n,i):nC(e,t,n,i)},nk=(e,t,n)=>{(""===e?t:nA(t,e)).classGroupId=n},nS=(e,t,n,i)=>{nE(e)?nw(e(i),t,n,i):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e}))},nC=(e,t,n,i)=>{let r=Object.entries(e),o=r.length;for(let e=0;e<o;e++){let[o,a]=r[e];nw(a,nA(t,o),n,i)}},nA=(e,t)=>{let n=e,i=t.split("-"),r=i.length;for(let e=0;e<r;e++){let t=i[e],r=n.nextPart.get(t);r||(r=ng(),n.nextPart.set(t,r)),n=r}return n},nE=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,nL=[],n_=(e,t,n,i,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:r}),nN=/\s+/,nT=e=>{let t;if("string"==typeof e)return e;let n="";for(let i=0;i<e.length;i++)e[i]&&(t=nT(e[i]))&&(n&&(n+=" "),n+=t);return n},nR=[],nM=e=>{let t=t=>t[e]||nR;return t.isThemeGetter=!0,t},nP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,n$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nH=e=>nD.test(e),nU=e=>!!e&&!Number.isNaN(Number(e)),nF=e=>!!e&&Number.isInteger(Number(e)),nG=e=>e.endsWith("%")&&nU(e.slice(0,-1)),nW=e=>n$.test(e),nq=()=>!0,nV=e=>nO.test(e)&&!nj.test(e),nX=()=>!1,nK=e=>nz.test(e),nY=e=>nB.test(e),nJ=e=>!n0(e)&&!n7(e),nQ=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),nZ=e=>is(e,ic,nX),n0=e=>nP.test(e),n1=e=>is(e,ih,nV),n2=e=>is(e,ip,nU),n8=e=>is(e,ig,nq),n5=e=>is(e,im,nX),n6=e=>is(e,id,nX),n3=e=>is(e,iu,nY),n4=e=>is(e,ib,nK),n7=e=>nI.test(e),n9=e=>il(e,ih),ie=e=>il(e,im),it=e=>il(e,id),ii=e=>il(e,ic),ir=e=>il(e,iu),io=e=>il(e,ib,!0),ia=e=>il(e,ig,!0),is=(e,t,n)=>{let i=nP.exec(e);return!!i&&(i[1]?t(i[1]):n(i[2]))},il=(e,t,n=!1)=>{let i=nI.exec(e);return!!i&&(i[1]?t(i[1]):n)},id=e=>"position"===e||"percentage"===e,iu=e=>"image"===e||"url"===e,ic=e=>"length"===e||"size"===e||"bg-size"===e,ih=e=>"length"===e,ip=e=>"number"===e,im=e=>"family-name"===e,ig=e=>"number"===e||"weight"===e,ib=e=>"shadow"===e,iv=((e,...t)=>{let n,i,r,o,a=e=>{let t=i(e);if(t)return t;let o=((e,t)=>{let{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:a}=t,s=[],l=e.trim().split(nN),d="";for(let e=l.length-1;e>=0;e-=1){let t,u=l[e],{isExternal:c,modifiers:h,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(u);if(c){d=u+(d.length>0?" "+d:d);continue}let g=!!m;if(g){let e=(t=i(p.substring(0,m)))&&a[t]?i(p):void 0;e&&e!==t&&(t=e,g=!1)}else t=i(p);if(!t){if(!g||!(t=i(p))){d=u+(d.length>0?" "+d:d);continue}g=!1}let b=0===h.length?"":1===h.length?h[0]:o(h).join(":"),v=f?b+"!":b,y=v+t;if(s.indexOf(y)>-1)continue;s.push(y);let w=r(t,g);for(let e=0;e<w.length;++e){let t=w[e];s.push(v+t)}d=u+(d.length>0?" "+d:d)}return d})(e,n);return r(e,o),o};return o=s=>{var l;let d;return i=(n={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null),r=(r,o)=>{n[r]=o,++t>e&&(t=0,i=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=i[e])?(r(e,t),t):void 0},set(e,t){e in n?n[e]=t:r(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:n}=e,i=e=>{let t,n=[],i=0,r=0,o=0,a=e.length;for(let s=0;s<a;s++){let a=e[s];if(0===i&&0===r){if(":"===a){n.push(e.slice(o,s)),o=s+1;continue}if("/"===a){t=s;continue}}"["===a?i++:"]"===a?i--:"("===a?r++:")"===a&&r--}let s=0===n.length?e:e.slice(o),l=s,d=!1;return s.endsWith("!")?(l=s.slice(0,-1),d=!0):s.startsWith("!")&&(l=s.slice(1),d=!0),n_(n,d,l,t&&t>o?t-o:void 0)};if(t){let e=t+":",n=i;i=t=>t.startsWith(e)?n(t.slice(e.length)):n_(nL,!1,t,void 0,!0)}if(n){let e=i;i=t=>n({className:t,parseClassName:e})}return i})(l),sortModifiers:(d=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{d.set(e,1e6+t)}),e=>{let t=[],n=[];for(let i=0;i<e.length;i++){let r=e[i],o="["===r[0],a=d.has(r);o||a?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(r)):n.push(r)}return n.length>0&&(n.sort(),t.push(...n)),t}),postfixLookupClassGroupIds:(e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t})(l),...(e=>{let t=(e=>{let{theme:t,classGroups:n}=e;return ny(n,t)})(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var n;let t,i,r;return -1===(n=e).slice(1,-1).indexOf(":")?void 0:(i=(t=n.slice(1,-1)).indexOf(":"),(r=t.slice(0,i))?"arbitrary.."+r:void 0)}let i=e.split("-"),r=+(""===i[0]&&i.length>1);return nv(i,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=i[e],r=n[e];if(t){if(r){let e=Array(r.length+t.length);for(let t=0;t<r.length;t++)e[t]=r[t];for(let n=0;n<t.length;n++)e[r.length+n]=t[n];return e}return t}return r||nb}return n[e]||nb}}})(l)}).cache.get,r=n.cache.set,o=a,a(s)},(...e)=>o(((...e)=>{let t,n,i=0,r="";for(;i<e.length;)(t=e[i++])&&(n=nT(t))&&(r&&(r+=" "),r+=n);return r})(...e))})(()=>{let e=nM("color"),t=nM("font"),n=nM("text"),i=nM("font-weight"),r=nM("tracking"),o=nM("leading"),a=nM("breakpoint"),s=nM("container"),l=nM("spacing"),d=nM("radius"),u=nM("shadow"),c=nM("inset-shadow"),h=nM("text-shadow"),f=nM("drop-shadow"),p=nM("blur"),m=nM("perspective"),g=nM("aspect"),b=nM("ease"),v=nM("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...w(),n7,n0],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[n7,n0,l],A=()=>[nH,"full","auto",...C()],E=()=>[nF,"none","subgrid",n7,n0],L=()=>["auto",{span:["full",nF,n7,n0]},nF,n7,n0],_=()=>[nF,"auto",n7,n0],N=()=>["auto","min","max","fr",n7,n0],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...C()],P=()=>[nH,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],I=()=>[nH,"screen","full","dvw","lvw","svw","min","max","fit",...C()],D=()=>[nH,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],$=()=>[e,n7,n0],O=()=>[...w(),it,n6,{position:[n7,n0]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",ii,nZ,{size:[n7,n0]}],B=()=>[nG,n9,n1],H=()=>["","none","full",d,n7,n0],U=()=>["",nU,n9,n1],F=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[nU,nG,it,n6],q=()=>["","none",p,n7,n0],V=()=>["none",nU,n7,n0],X=()=>["none",nU,n7,n0],K=()=>[nU,n7,n0],Y=()=>[nH,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nW],breakpoint:[nW],color:[nq],container:[nW],"drop-shadow":[nW],ease:["in","out","in-out"],font:[nJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nW],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nW],shadow:[nW],spacing:["px",nU],text:[nW],"text-shadow":[nW],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nH,n0,n7,g]}],container:["container"],"container-type":[{"@container":["","normal","size",n7,n0]}],"container-named":[nQ],columns:[{columns:[nU,n0,n7,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[nF,"auto",n7,n0]}],basis:[{basis:[nH,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nU,nH,"auto","initial","none",n0]}],grow:[{grow:["",nU,n7,n0]}],shrink:[{shrink:["",nU,n7,n0]}],order:[{order:[nF,"first","last","none",n7,n0]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...D()]}],"min-block-size":[{"min-block":["auto",...D()]}],"max-block-size":[{"max-block":["none",...D()]}],w:[{w:[s,"screen",...P()]}],"min-w":[{"min-w":[s,"screen","none",...P()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,n9,n1]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ia,n8]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",nG,n0]}],"font-family":[{font:[ie,n5,t]}],"font-features":[{"font-features":[n0]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,n7,n0]}],"line-clamp":[{"line-clamp":[nU,"none",n7,n2]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",n7,n0]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",n7,n0]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[nU,"from-font","auto",n7,n1]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[nU,"auto",n7,n0]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[nF,n7,n0]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",n7,n0]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",n7,n0]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nF,n7,n0],radial:["",n7,n0],conic:[nF,n7,n0]},ir,n3]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-bs":[{"border-bs":U()}],"border-w-be":[{"border-be":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nU,n7,n0]}],"outline-w":[{outline:["",nU,n9,n1]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",u,io,n4]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",c,io,n4]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[nU,n1]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",h,io,n4]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[nU,n7,n0]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[nU]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[n7,n0]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[nU]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",n7,n0]}],filter:[{filter:["","none",n7,n0]}],blur:[{blur:q()}],brightness:[{brightness:[nU,n7,n0]}],contrast:[{contrast:[nU,n7,n0]}],"drop-shadow":[{"drop-shadow":["","none",f,io,n4]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",nU,n7,n0]}],"hue-rotate":[{"hue-rotate":[nU,n7,n0]}],invert:[{invert:["",nU,n7,n0]}],saturate:[{saturate:[nU,n7,n0]}],sepia:[{sepia:["",nU,n7,n0]}],"backdrop-filter":[{"backdrop-filter":["","none",n7,n0]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[nU,n7,n0]}],"backdrop-contrast":[{"backdrop-contrast":[nU,n7,n0]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nU,n7,n0]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nU,n7,n0]}],"backdrop-invert":[{"backdrop-invert":["",nU,n7,n0]}],"backdrop-opacity":[{"backdrop-opacity":[nU,n7,n0]}],"backdrop-saturate":[{"backdrop-saturate":[nU,n7,n0]}],"backdrop-sepia":[{"backdrop-sepia":["",nU,n7,n0]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",n7,n0]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nU,"initial",n7,n0]}],ease:[{ease:["linear","initial",b,n7,n0]}],delay:[{delay:[nU,n7,n0]}],animate:[{animate:["none",v,n7,n0]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,n7,n0]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[n7,n0,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],zoom:[{zoom:[nF,n7,n0]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",n7,n0]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",n7,n0]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[nU,n9,n1,n2]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function iy(...e){return iv(function(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}(e))&&(i&&(i+=" "),i+=t);return i}(e))}function iw({className:e,variant:t="secondary",asChild:n=!1,...i}){return(0,m.jsx)(n?nl:"span",{"data-slot":"badge",className:iy(function({variant:e="secondary",class:t}={}){return b({primary:"badge-active",secondary:"badge-muted",success:"badge badge-color-green",warning:"badge badge-color-amber",destructive:"badge badge-color-red",outline:"badge border border-base"}[e],t)}({variant:t}),e),...i})}function ix({className:e,variant:t="primary",size:n="md",asChild:i=!1,...r}){return(0,m.jsx)(i?nl:"button",{"data-slot":"button",className:iy(function({variant:e="primary",size:t="md",class:n}={}){return b({primary:"btn-primary",secondary:"btn-action",outline:"btn-action",ghost:"inline-flex items-center justify-center gap-1.5 rounded px2 py1 op75 hover:op100 hover:bg-active transition disabled:pointer-events-none disabled:op30!",destructive:"btn-action text-error border-error/30!",link:"inline-flex items-center gap-1.5 color-active hover:underline underline-offset-2"}[e],"sm"===t?"primary"===e?"text-sm px-2.5! py-1!":"text-sm":"lg"===t?"text-base px-4! py-2!":"",n)}({variant:t,size:n}),e),...r})}function ik({className:e,variant:t="outline",size:n="md",asChild:i=!1,...r}){return(0,m.jsx)(i?nl:"button",{"data-slot":"icon-button",className:iy(function({variant:e="outline",size:t="md",class:n}={}){return b("ghost"===e?"btn-icon":"btn-icon-square","sm"===t?"w-7! h-7! text-sm":"",n)}({variant:t,size:n}),e),...r})}let iS=[{match:/package\.json$/,icon:"i-catppuccin:npm"},{match:/(?:^|\/)tsconfig(?:\.\w+)?\.json$/,icon:"i-catppuccin:typescript-config"},{match:/\.(?:test|spec)\.[cm]?[jt]sx?$/,icon:"i-catppuccin:typescript-test"},{match:/\.vue$/,icon:"i-catppuccin:vue"},{match:/\.svelte$/,icon:"i-catppuccin:svelte"},{match:/\.tsx$/,icon:"i-catppuccin:typescript-react"},{match:/\.jsx$/,icon:"i-catppuccin:javascript-react"},{match:/\.d\.[cm]?ts$/,icon:"i-catppuccin:typescript-def"},{match:/\.[cm]?ts$/,icon:"i-catppuccin:typescript"},{match:/\.[cm]?js$/,icon:"i-catppuccin:javascript"},{match:/\.json5?$/,icon:"i-catppuccin:json"},{match:/\.ya?ml$/,icon:"i-catppuccin:yaml"},{match:/\.toml$/,icon:"i-catppuccin:toml"},{match:/\.mdx?$/,icon:"i-catppuccin:markdown"},{match:/\.html?$/,icon:"i-catppuccin:html"},{match:/\.(?:css|postcss)$/,icon:"i-catppuccin:css"},{match:/\.s[ac]ss$/,icon:"i-catppuccin:sass"},{match:/\.less$/,icon:"i-catppuccin:less"},{match:/\.svg$/,icon:"i-catppuccin:svg"},{match:/\.(?:png|jpe?g|gif|webp|avif|ico)$/,icon:"i-catppuccin:image"},{match:/\.(?:woff2?|ttf|otf|eot)$/,icon:"i-catppuccin:font"},{match:/\.wasm$/,icon:"i-catppuccin:webassembly"},{match:/\.(?:sh|bash|zsh|fish)$/,icon:"i-catppuccin:bash"},{match:/\.py$/,icon:"i-catppuccin:python"},{match:/\.rs$/,icon:"i-catppuccin:rust"},{match:/\.go$/,icon:"i-catppuccin:go"},{match:/\.(?:xlsx?|csv)$/,icon:"i-catppuccin:table"},{match:/(?:^|\/)\.gitignore$/,icon:"i-catppuccin:git"},{match:/(?:^|\/)LICENSE(?:\.\w+)?$/,icon:"i-catppuccin:license"}];function iC({name:e,className:t,...n}){return(0,m.jsx)("span",{"aria-hidden":!0,className:iy(e,"inline-block shrink-0",t),...n})}function iA({path:e,className:t,...n}){return(0,m.jsx)(iC,{name:function(e){let t=e.replace(/[?#].*$/,"");for(let e of iS)if(e.match.test(t))return e.icon;return"i-catppuccin:file"}(e),className:iy("size-4",t),...n})}var iE=e.i(54737),iL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=ns(`Primitive.${t}`),i=g.forwardRef((e,i)=>{let{asChild:r,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(r?n:t,{...o,ref:i})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),i_=globalThis?.document?g.useLayoutEffect:()=>{},iN=e=>{var t;let n,i,{present:r,children:o}=e,a=function(e){var t,n;let[i,r]=g.useState(),o=g.useRef(null),a=g.useRef(e),s=g.useRef("none"),l=g.useRef(void 0),[d,u]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},g.useReducer((e,t)=>n[e][t]??e,t));return g.useEffect(()=>{"mounted"===d?(s.current=l.current??iR(o.current),l.current=void 0):s.current="none"},[d]),i_(()=>{let t=o.current,n=a.current;if(n!==e){let i=s.current,r=iR(t);e?(l.current=r,u("MOUNT")):"none"===r||t?.display==="none"?u("UNMOUNT"):n&&i!==r?u("ANIMATION_OUT"):u("UNMOUNT"),a.current=e}},[e,u]),i_(()=>{if(i){let e,t=i.ownerDocument.defaultView??window,n=n=>{let r=iR(o.current).includes(CSS.escape(n.animationName));if(n.target===i&&r&&(u("ANIMATION_END"),!a.current)){let n=i.style.animationFillMode;i.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=n)})}},r=e=>{e.target===i&&(s.current=iR(o.current))};return i.addEventListener("animationstart",r),i.addEventListener("animationcancel",n),i.addEventListener("animationend",n),()=>{t.clearTimeout(e),i.removeEventListener("animationstart",r),i.removeEventListener("animationcancel",n),i.removeEventListener("animationend",n)}}u("ANIMATION_END")},[i,u]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(e=>{if(e){let t=getComputedStyle(e);o.current=t,l.current=iR(t)}else o.current=null;r(e)},[])}}(r),s="function"==typeof o?o({present:a.isPresent}):g.Children.only(o),l=function(...e){let t=g.useRef(e);return t.current=e,g.useCallback(e=>{let n=t.current,i=!1,r=n.map(t=>{let n=iT(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e<r.length;e++){let t=r[e];"function"==typeof t?t():iT(n[e],null)}}},[])}(a.ref,(t=s,(i=(n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.ref:(i=(n=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof o||a.isPresent?g.cloneElement(s,{ref:l}):null};function iT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function iR(e){return e?.animationName||"none"}function iM(e){let t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...e)=>t.current?.(...e),[])}iN.displayName="Presence";var iP=g.createContext(void 0);function iI(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),!1===n||!i||!i.defaultPrevented)return t?.(i)}}"u">typeof window&&window.document&&window.document.createElement;var iD="ScrollArea",[i$,iO]=function(e,t=[]){let n=[],i=()=>{let t=n.map(e=>g.createContext(e));return function(n){let i=n?.[e]||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return i.scopeName=e,[function(t,i){let r=g.createContext(i);r.displayName=t+"Context";let o=n.length;n=[...n,i];let a=t=>{let{scope:n,children:i,...a}=t,s=n?.[e]?.[o]||r,l=g.useMemo(()=>a,Object.values(a));return(0,m.jsx)(s.Provider,{value:l,children:i})};return a.displayName=t+"Provider",[a,function(n,a,s={}){let{optional:l=!1}=s,d=a?.[e]?.[o]||r,u=g.useContext(d);if(u)return u;if(void 0!==i)return i;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:i})=>{let r=n(e)[`__scope${i}`];return{...t,...r}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(i,...t)]}(iD),[ij,iz]=i$(iD),iB=g.forwardRef((e,t)=>{let n,{__scopeScrollArea:i,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[l,d]=g.useState(null),[u,c]=g.useState(null),[h,f]=g.useState(null),[p,b]=g.useState(null),[v,y]=g.useState(null),[w,x]=g.useState(0),[k,S]=g.useState(0),[C,A]=g.useState(!1),[E,L]=g.useState(!1),_=na(t,d),N=(n=g.useContext(iP),o||n||"ltr");return(0,m.jsx)(ij,{scope:i,type:r,dir:N,scrollHideDelay:a,scrollArea:l,viewport:u,onViewportChange:c,content:h,onContentChange:f,scrollbarX:p,onScrollbarXChange:b,scrollbarXEnabled:C,onScrollbarXEnabledChange:A,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:L,onCornerWidthChange:x,onCornerHeightChange:S,children:(0,m.jsx)(iL.div,{dir:N,...s,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});iB.displayName=iD;var iH="ScrollAreaViewport",iU=g.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:i,nonce:r,...o}=e,a=iz(iH,n),s=na(t,g.useRef(null),a.onViewportChange);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iF,{nonce:r}),(0,m.jsx)(iL.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,m.jsx)("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});iU.displayName=iH;var iF=g.memo(({nonce:e})=>(0,m.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),iG="ScrollAreaScrollbar",iW=g.forwardRef((e,t)=>{let{forceMount:n,...i}=e,r=iz(iG,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=r,s="horizontal"===e.orientation;return g.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),"hover"===r.type?(0,m.jsx)(iq,{...i,ref:t,forceMount:n}):"scroll"===r.type?(0,m.jsx)(iV,{...i,ref:t,forceMount:n}):"auto"===r.type?(0,m.jsx)(iX,{...i,ref:t,forceMount:n}):"always"===r.type?(0,m.jsx)(iK,{...i,ref:t,"data-state":"visible"}):null});iW.displayName=iG;var iq=g.forwardRef((e,t)=>{let{forceMount:n,...i}=e,r=iz(iG,e.__scopeScrollArea),[o,a]=g.useState(!1);return g.useEffect(()=>{let e=r.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",i),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",i)}}},[r.scrollArea,r.scrollHideDelay]),(0,m.jsx)(iN,{present:n||o,children:(0,m.jsx)(iX,{"data-state":o?"visible":"hidden",...i,ref:t})})}),iV=g.forwardRef((e,t)=>{var n;let{forceMount:i,...r}=e,o=iz(iG,e.__scopeScrollArea),a="horizontal"===e.orientation,s=ri(()=>d("SCROLL_END"),100),[l,d]=(n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},g.useReducer((e,t)=>n[e][t]??e,"hidden"));return g.useEffect(()=>{if("idle"===l){let e=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[l,o.scrollHideDelay,d]),g.useEffect(()=>{let e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t],i=()=>{let i=e[t];n!==i&&(d("SCROLL"),s()),n=i};return e.addEventListener("scroll",i),()=>e.removeEventListener("scroll",i)}},[o.viewport,a,d,s]),(0,m.jsx)(iN,{present:i||"hidden"!==l,children:(0,m.jsx)(iK,{"data-state":"hidden"===l?"hidden":"visible",...r,ref:t,onPointerEnter:iI(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:iI(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),iX=g.forwardRef((e,t)=>{let n=iz(iG,e.__scopeScrollArea),{forceMount:i,...r}=e,[o,a]=g.useState(!1),s="horizontal"===e.orientation,l=ri(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?e:t)}},10);return rr(n.viewport,l),rr(n.content,l),(0,m.jsx)(iN,{present:i||o,children:(0,m.jsx)(iK,{"data-state":o?"visible":"hidden",...r,ref:t})})}),iK=g.forwardRef((e,t)=>{let{orientation:n="vertical",...i}=e,r=iz(iG,e.__scopeScrollArea),o=g.useRef(null),a=g.useRef(0),[s,l]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=i7(s.viewport,s.content),u={...i,sizes:s,onSizesChange:l,hasThumb:!!(d>0&&d<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function c(e,t){return function(e,t,n,i="ltr"){let r=i9(n),o=t||r/2,a=n.scrollbar.paddingStart+o,s=n.scrollbar.size-n.scrollbar.paddingEnd-(r-o),l=n.content-n.viewport;return rt([a,s],"ltr"===i?[0,l]:[-1*l,0])(e)}(e,a.current,s,t)}return"horizontal"===n?(0,m.jsx)(iY,{...u,ref:t,onThumbPositionChange:()=>{if(r.viewport&&o.current){let e=re(r.viewport.scrollLeft,s,r.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{r.viewport&&(r.viewport.scrollLeft=e)},onDragScroll:e=>{r.viewport&&(r.viewport.scrollLeft=c(e,r.dir))}}):"vertical"===n?(0,m.jsx)(iJ,{...u,ref:t,onThumbPositionChange:()=>{if(r.viewport&&o.current){let e=re(r.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{r.viewport&&(r.viewport.scrollTop=e)},onDragScroll:e=>{r.viewport&&(r.viewport.scrollTop=c(e))}}):null}),iY=g.forwardRef((e,t)=>{let{sizes:n,onSizesChange:i,...r}=e,o=iz(iG,e.__scopeScrollArea),[a,s]=g.useState(),l=g.useRef(null),d=na(t,l,o.onScrollbarXChange);return g.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,m.jsx)(i0,{"data-orientation":"horizontal",...r,ref:d,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":i9(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){var i,r;let a=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(a),i=a,r=n,i>0&&i<r&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&i({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:i4(a.paddingLeft),paddingEnd:i4(a.paddingRight)}})}})}),iJ=g.forwardRef((e,t)=>{let{sizes:n,onSizesChange:i,...r}=e,o=iz(iG,e.__scopeScrollArea),[a,s]=g.useState(),l=g.useRef(null),d=na(t,l,o.onScrollbarYChange);return g.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,m.jsx)(i0,{"data-orientation":"vertical",...r,ref:d,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":i9(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){var i,r;let a=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(a),i=a,r=n,i>0&&i<r&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&i({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:i4(a.paddingTop),paddingEnd:i4(a.paddingBottom)}})}})}),[iQ,iZ]=i$(iG),i0=g.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:i,hasThumb:r,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:u,onResize:c,...h}=e,f=iz(iG,n),[p,b]=g.useState(null),v=na(t,b),y=g.useRef(null),w=g.useRef(""),x=f.viewport,k=i.content-i.viewport,S=iM(u),C=iM(l),A=ri(c,10);function E(e){y.current&&d({x:e.clientX-y.current.left,y:e.clientY-y.current.top})}return g.useEffect(()=>{let e=e=>{let t=e.target;p?.contains(t)&&S(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,p,k,S]),g.useEffect(C,[i,C]),rr(p,A),rr(f.content,A),(0,m.jsx)(iQ,{scope:n,scrollbar:p,hasThumb:r,onThumbChange:iM(o),onThumbPointerUp:iM(a),onThumbPositionChange:C,onThumbPointerDown:iM(s),children:(0,m.jsx)(iL.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:iI(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),y.current=p.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),E(e))}),onPointerMove:iI(e.onPointerMove,E),onPointerUp:iI(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=w.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null})})})}),i1="ScrollAreaThumb",i2=g.forwardRef((e,t)=>{let{forceMount:n,...i}=e,r=iZ(i1,e.__scopeScrollArea);return(0,m.jsx)(iN,{present:n||r.hasThumb,children:(0,m.jsx)(i8,{ref:t,...i})})}),i8=g.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:i,...r}=e,o=iz(i1,n),a=iZ(i1,n),{onThumbPositionChange:s}=a,l=na(t,a.onThumbChange),d=g.useRef(void 0),u=ri(()=>{d.current&&(d.current(),d.current=void 0)},100);return g.useEffect(()=>{let e=o.viewport;if(e){let t=()=>{u(),d.current||(d.current=rn(e,s),s())};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[o.viewport,u,s]),(0,m.jsx)(iL.div,{"data-state":a.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:iI(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,i=e.clientY-t.top;a.onThumbPointerDown({x:n,y:i})}),onPointerUp:iI(e.onPointerUp,a.onThumbPointerUp)})});i2.displayName=i1;var i5="ScrollAreaCorner",i6=g.forwardRef((e,t)=>{let n=iz(i5,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&i?(0,m.jsx)(i3,{...e,ref:t}):null});i6.displayName=i5;var i3=g.forwardRef((e,t)=>{let{__scopeScrollArea:n,...i}=e,r=iz(i5,n),[o,a]=g.useState(0),[s,l]=g.useState(0),d=!!(o&&s),{onCornerWidthChange:u,onCornerHeightChange:c}=r;return rr(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),l(e)}),rr(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),g.useEffect(()=>()=>{u(0),c(0)},[u,c]),d?(0,m.jsx)(iL.div,{...i,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===r.dir?0:void 0,left:"rtl"===r.dir?0:void 0,bottom:0,...e.style}}):null});function i4(e){return e?parseInt(e,10):0}function i7(e,t){let n=e/t;return isNaN(n)?0:n}function i9(e){let t=i7(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-n)*t,18)}function re(e,t,n="ltr"){let i=i9(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-r,a=t.content-t.viewport,s=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,a]:[-1*a,0]);return rt([0,a],[0,o-i])(s)}function rt(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}var rn=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return!function r(){let o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,i=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(i)};function ri(e,t){let n=iM(e),i=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(i.current),[]),g.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function rr(e,t){let n=iM(t);i_(()=>{let t=0;if(e){let i=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(t),i.unobserve(e)}}},[e,n])}function ro({className:e,children:t,...n}){return(0,m.jsxs)(iB,{"data-slot":"scroll-area",className:iy("relative",e),...n,children:[(0,m.jsx)(iU,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-primary-500/40 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,m.jsx)(ra,{}),(0,m.jsx)(i6,{})]})}function ra({className:e,orientation:t="vertical",...n}){return(0,m.jsx)(iW,{"data-slot":"scroll-area-scrollbar",orientation:t,className:iy("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:(0,m.jsx)(i2,{"data-slot":"scroll-area-thumb",className:"bg-[#8882] relative flex-1 rounded-full"})})}function rs({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"skeleton",className:iy("bg-active animate-pulse rounded-md",e),...t})}let rl={modified:"M",added:"A",deleted:"D",renamed:"R",copied:"C","type-changed":"T",unmerged:"U",unknown:"?"},rd={added:"text-success",deleted:"text-error",modified:"text-warning",renamed:"color-active",copied:"color-active","type-changed":"text-warning",unmerged:"text-error",unknown:"color-muted"};function ru({code:e,className:t}){return(0,m.jsx)("span",{className:iy("w-3.5 shrink-0 text-center font-mono text-xs font-semibold",rd[e],t),title:e,"aria-label":e,children:rl[e]})}let rc="diffs-container";(()=>{try{return!1}catch{return!1}})();let rh=/(?=^From [a-f0-9]+ .+$)/m,rf=/(?=^diff --git)/gm,rp=/^(---|\+\+\+)\s+([^\t\r\n]+)/,rm=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,rg=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,rb=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,rv="header-prefix",ry="header-metadata",rw="header-custom",rx={dark:"pierre-dark",light:"pierre-light"},rk="--diffs-scrollbar-gutter-measured",rS={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...rS,hunkLineCount:1});let rC=Object.freeze({fromStart:0,fromEnd:0}),rA={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},rE={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function rL(e){return e.replace(/\n$|\r\n$/,"")}let r_=new TextEncoder,rN=new TextDecoder("utf-8",{ignoreBOM:!0}),rT=/[\uD800-\uDFFF]/,rR=new Uint8Array(1024);function rM(){1024!==rR.length&&(rR=new Uint8Array(1024))}function rP(e){if(0===e.length)return e;if(rT.test(e))return JSON.parse(JSON.stringify(e));let t=3*e.length;rR.length<t&&(rR=new Uint8Array(t));let{written:n}=r_.encodeInto(e,rR);return rN.decode(rR.subarray(0,n))}function rI(e,{cacheKey:t,isGitDiff:n=rf.test(e),oldFile:i,newFile:r,throwOnError:o=!1}={}){let a,s=0,l=rU(e,"@@ "),d=null==i||null==r,u=0,c=0;for(let e of l){let l,f,p=r$(e),m=p[0];if(null==m){if(o)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",e);continue}let g=rB(m),b=0,v=0;if(null==g||null==a){if(null!=a){if(o)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",e);continue}for(let e of(1===(a={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:d,additionLines:d||null==i||null==r?[]:rD(r.contents),deletionLines:d||null==i||null==r?[]:rD(i.contents),cacheKey:rG(t)}).additionLines.length&&r?.contents===""&&(a.additionLines.length=0),1===a.deletionLines.length&&i?.contents===""&&(a.deletionLines.length=0),p)){if(e.startsWith("diff --git")){let t=e.trim().match(rg),n=t?.[1]??t?.[2],i=t?.[3]??t?.[4];if(null==n||null==i){if(o)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",e);continue}a.name=rP(i.trim()),n!==i&&(a.prevName=rP(n.trim()));continue}let t=e.startsWith("---")||e.startsWith("+++")?e.match(n?rm:rp):null;if(null!=t){let[,e,n]=t;if("---"===e&&"/dev/null"!==n){let e=rP(n.trim());a.prevName=e,a.name=e}else"+++"===e&&"/dev/null"!==n&&(a.name=rP(n.trim()))}else if(n){if(e.startsWith("new mode ")&&(a.mode=rP(e.slice(8).trim())),e.startsWith("old mode ")&&(a.prevMode=rP(e.slice(8).trim())),e.startsWith("new file mode")&&(a.type="new",a.mode=rP(e.slice(13).trim())),e.startsWith("deleted file mode")&&(a.type="deleted",a.mode=rP(e.slice(17).trim())),e.startsWith("similarity index")&&(e.startsWith("similarity index 100%")?a.type="rename-pure":a.type="rename-changed"),e.startsWith("index ")){let[,t,n,i]=e.trim().match(rb)??[];null!=t&&(a.prevObjectId=rP(t)),null!=n&&(a.newObjectId=rP(n)),null!=i&&(a.mode=rP(i))}e.startsWith("rename from ")&&(a.prevName=rP(e.slice(12).trim())),e.startsWith("rename to ")&&(a.name=rP(e.slice(10).trim()))}}continue}for(;p.length>0&&("\n"===p[p.length-1]||"\r"===p[p.length-1]||"\r\n"===p[p.length-1]||""===p[p.length-1]);)p.pop();let{additionStart:y,deletionStart:w}=g;u=d?u:w-1,c=d?c:y-1;let x={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:g.additionCount,additionStart:y,additionLines:b,deletionCount:g.deletionCount,deletionStart:w,deletionLines:v,deletionLineIndex:u,additionLineIndex:c,hunkContent:[],hunkContext:rG(g.hunkContext),hunkSpecs:rP(m),noEOFCRAdditions:!1,noEOFCRDeletions:!1},k=0,S=0;for(let e=1;e<p.length;e++){var h;let t=p[e];if(k>=x.additionCount&&S>=x.deletionCount&&!t.startsWith("\\")){if(o&&function(e){let t=e[0];return"+"===t||"-"===t||" "===t}(t)&&!function(e){if(!e.startsWith("--"))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(" "!==n&&" "!==n&&"\n"!==n&&"\r"!==n)return!1}return!0}(t))throw Error("parsePatchContent: hunk has more lines than expected");break}let n=t[0];if("+"!==n&&"-"!==n&&" "!==n&&"\\"!==n){if(o)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error("processFile: invalid rawLine:",t);continue}let i=" "===(h=n)?"context":"\\"===h?"metadata":"+"===h?"addition":"deletion";if("addition"===i){if(o&&k>=x.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");let e=rW(t);(null==l||"change"!==l.type)&&(l=rq("change",u,c),x.hunkContent.push(l)),c++,k++,d&&a.additionLines.push(e),l.additions++,b++,f="addition"}else if("deletion"===i){if(o&&S>=x.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");let e=rW(t);(null==l||"change"!==l.type)&&(l=rq("change",u,c),x.hunkContent.push(l)),u++,S++,d&&a.deletionLines.push(e),l.deletions++,v++,f="deletion"}else if("context"===i){if(o&&(S>=x.deletionCount||k>=x.additionCount))throw Error("parsePatchContent: hunk has too many context lines");let e=rW(t);(null==l||"context"!==l.type)&&(l=rq("context",u,c),x.hunkContent.push(l)),c++,u++,k++,S++,d&&(a.deletionLines.push(e),a.additionLines.push(e)),l.lines++,f="context"}else if("metadata"===i&&null!=l){if("context"===l.type?(x.noEOFCRAdditions=!0,x.noEOFCRDeletions=!0):"deletion"===f?x.noEOFCRDeletions=!0:"addition"===f&&(x.noEOFCRAdditions=!0),d&&("addition"===f||"context"===f)){let e=a.additionLines.length-1;e>=0&&(a.additionLines[e]=rL(a.additionLines[e]))}if(d&&("deletion"===f||"context"===f)){let e=a.deletionLines.length-1;e>=0&&(a.deletionLines[e]=rL(a.deletionLines[e]))}}}if(o&&(k!==x.additionCount||S!==x.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");for(let e of(x.additionLines=b,x.deletionLines=v,x.collapsedBefore=Math.max(x.additionStart-1-s,0),a.hunks.push(x),s=x.additionStart+x.additionCount-1,x.hunkContent))"context"===e.type?(x.splitLineCount+=e.lines,x.unifiedLineCount+=e.lines):(x.splitLineCount+=Math.max(e.additions,e.deletions),x.unifiedLineCount+=e.deletions+e.additions);x.splitLineStart=a.splitLineCount+x.collapsedBefore,x.unifiedLineStart=a.unifiedLineCount+x.collapsedBefore,a.splitLineCount+=x.collapsedBefore+x.splitLineCount,a.unifiedLineCount+=x.collapsedBefore+x.unifiedLineCount}if(null!=a){if(o&&d&&!n&&0===a.hunks.length)throw Error("parsePatchContent: unified file has no hunks");if(a.hunks.length>0&&!d&&a.additionLines.length>0&&a.deletionLines.length>0){let e=a.hunks[a.hunks.length-1],t=e.additionStart+e.additionCount-1,n=Math.max(a.additionLines.length-t,0);a.splitLineCount+=n,a.unifiedLineCount+=n}return n||(null!=a.prevName&&a.name!==a.prevName?a.hunks.length>0?a.type="rename-changed":a.type="rename-pure":(null==i||""===i.contents)&&null!=r&&""!==r.contents?a.type="new":null!=i&&""!==i.contents&&(null==r||""===r.contents)&&(a.type="deleted")),"rename-pure"!==a.type&&"rename-changed"!==a.type&&(a.prevName=void 0),a}}function rD(e){let t=r$(e);for(let e=0;e<t.length;e++)t[e]=rP(t[e]);return t}function r$(e){if(0===e.length)return[""];let t=[],n=0;for(;;){let i=e.indexOf("\n",n);if(-1===i)break;t.push(e.slice(n,i+1)),n=i+1}return n<e.length&&t.push(e.slice(n)),t}function rO(e,t){let n=rz(e,t);return rj(e,t,"---")&&rj(e,n,"+++")}function rj(e,t,n){if(!e.startsWith(n,t))return!1;let i=e[t+n.length];if(" "!==i&&" "!==i)return!1;for(let i=t+n.length+1;i<e.length;i++){let t=e[i];if("\n"===t||"\r"===t)break;if(" "!==t&&" "!==t)return!0}return!1}function rz(e,t){let n=e.indexOf("\n",t);return -1===n?e.length:n+1}function rB(e){var t;let n;if(!e.startsWith("@@ -"))return;let i=4,r=rH(e,4);if(null==r)return;let o=r.value;i=r.endIndex;let a=1;if(","===e[i]){let t=rH(e,i+1);if(null==t)return;a=t.value,i=t.endIndex}if(" "!==e[i]||"+"!==e[i+1])return;let s=rH(e,i+=2);if(null==s)return;let l=s.value;i=s.endIndex;let d=1;if(","===e[i]){let t=rH(e,i+1);if(null==t)return;d=t.value,i=t.endIndex}if(" "!==e[i]||"@"!==e[i+1]||"@"!==e[i+2])return;let u=i+3;return" "===e[u]&&(n=(t=e.slice(u+1)).endsWith("\r\n")?t.slice(0,-2):t.endsWith("\n")?t.slice(0,-1):t),{additionCount:d,additionStart:l,deletionCount:a,deletionStart:o,hunkContext:n}}function rH(e,t){let n=t,i=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;i=10*i+t}if(n!==t)return{value:i,endIndex:n}}function rU(e,t){if(0===e.length)return[""];let n=`
2
+ ${t}`,i=e.startsWith(t)?0:rF(e,n,0);if(-1===i)return[e];let r=[];i>0&&r.push(e.slice(0,i));let o=i;for(;;){let t=rF(e,n,o+1);if(-1===t)break;r.push(e.slice(o,t)),o=t}return r.push(e.slice(o)),r}function rF(e,t,n){let i=e.indexOf(t,n);return -1===i?-1:i+1}function rG(e){return null==e?e:rP(e)}function rW(e){let t=e.slice(1);return rP(""===t?"\n":t)}function rq(e,t,n){return"change"===e?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}function rV(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}let rX={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},rK={display:"contents"};function rY(){return null}function rJ(e,t,n){if(e===t||null==e||null==t)return e===t;let i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(let n of r)if(o.delete(n),!i.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(o))if(!i.has(e))return!1;return!0}function rQ(e,t){return null==e||null==t||"string"==typeof e||"string"==typeof t?e===t:e.dark===t.dark&&e.light===t.light}function rZ(e,t){let n=e?.theme??rx,i=t?.theme??rx,r=r0(e),o=r0(t);return rQ(n,i)&&rJ(e,t,["theme","parseDiffOptions"])&&rJ(r,o)}function r0(e){if(null!=e&&"parseDiffOptions"in e)return e.parseDiffOptions}function r1(e){if("u">typeof HTMLStyleElement&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return"string"==typeof t&&"style"===t.toLowerCase()}function r2(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function r8(e){return{type:"text",value:e}}function r5({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function r6({name:e,width:t=16,height:n=16,properties:i}){return r5({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[r5({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function r3(e){return r5({tagName:"div",properties:{"data-gutter":""},children:e})}function r4(e,t,n){return r5({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":"annotation"===t?void 0:e,style:"annotation"===t?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}let r7=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class r9{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function oe(e,t){let n={},i={};for(let t of e)Object.assign(n,t.property),Object.assign(i,t.normal);return new r9(n,i,t)}function ot(e){return e.toLowerCase()}r9.prototype.normal={},r9.prototype.property={},r9.prototype.space=void 0;class on{constructor(e,t){this.attribute=t,this.property=e}}on.prototype.attribute="",on.prototype.booleanish=!1,on.prototype.boolean=!1,on.prototype.commaOrSpaceSeparated=!1,on.prototype.commaSeparated=!1,on.prototype.defined=!1,on.prototype.mustUseProperty=!1,on.prototype.number=!1,on.prototype.overloadedBoolean=!1,on.prototype.property="",on.prototype.spaceSeparated=!1,on.prototype.space=void 0;let oi=0,or=oc(),oo=oc(),oa=oc(),os=oc(),ol=oc(),od=oc(),ou=oc();function oc(){return 2**++oi}e.s(["boolean",0,or,"booleanish",0,oo,"commaOrSpaceSeparated",0,ou,"commaSeparated",0,od,"number",0,os,"overloadedBoolean",0,oa,"spaceSeparated",0,ol],83954);var oh=e.i(83954);let of=Object.keys(oh);class op extends on{constructor(e,t,n,i){let r=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",i),"number"==typeof n)for(;++r<of.length;){const e=of[r];!function(e,t,n){n&&(e[t]=n)}(this,of[r],(n&oh[e])===oh[e])}}}function om(e){let t={},n={};for(let[i,r]of Object.entries(e.properties)){let o=new op(i,e.transform(e.attributes||{},i),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,n[ot(i)]=i,n[ot(o.attribute)]=i}return new r9(t,n,e.space)}op.prototype.defined=!0;let og=om({properties:{ariaActiveDescendant:null,ariaAtomic:oo,ariaAutoComplete:null,ariaBusy:oo,ariaChecked:oo,ariaColCount:os,ariaColIndex:os,ariaColSpan:os,ariaControls:ol,ariaCurrent:null,ariaDescribedBy:ol,ariaDetails:null,ariaDisabled:oo,ariaDropEffect:ol,ariaErrorMessage:null,ariaExpanded:oo,ariaFlowTo:ol,ariaGrabbed:oo,ariaHasPopup:null,ariaHidden:oo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ol,ariaLevel:os,ariaLive:null,ariaModal:oo,ariaMultiLine:oo,ariaMultiSelectable:oo,ariaOrientation:null,ariaOwns:ol,ariaPlaceholder:null,ariaPosInSet:os,ariaPressed:oo,ariaReadOnly:oo,ariaRelevant:null,ariaRequired:oo,ariaRoleDescription:ol,ariaRowCount:os,ariaRowIndex:os,ariaRowSpan:os,ariaSelected:oo,ariaSetSize:os,ariaSort:null,ariaValueMax:os,ariaValueMin:os,ariaValueNow:os,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function ob(e,t){return t in e?e[t]:t}function ov(e,t){return ob(e,t.toLowerCase())}let oy=om({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:od,acceptCharset:ol,accessKey:ol,action:null,allow:null,allowFullScreen:or,allowPaymentRequest:or,allowUserMedia:or,alt:null,as:null,async:or,autoCapitalize:null,autoComplete:ol,autoFocus:or,autoPlay:or,blocking:ol,capture:null,charSet:null,checked:or,cite:null,className:ol,cols:os,colSpan:null,content:null,contentEditable:oo,controls:or,controlsList:ol,coords:os|od,crossOrigin:null,data:null,dateTime:null,decoding:null,default:or,defer:or,dir:null,dirName:null,disabled:or,download:oa,draggable:oo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:or,formTarget:null,headers:ol,height:os,hidden:oa,high:os,href:null,hrefLang:null,htmlFor:ol,httpEquiv:ol,id:null,imageSizes:null,imageSrcSet:null,inert:or,inputMode:null,integrity:null,is:null,isMap:or,itemId:null,itemProp:ol,itemRef:ol,itemScope:or,itemType:ol,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:or,low:os,manifest:null,max:null,maxLength:os,media:null,method:null,min:null,minLength:os,multiple:or,muted:or,name:null,nonce:null,noModule:or,noValidate:or,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:or,optimum:os,pattern:null,ping:ol,placeholder:null,playsInline:or,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:or,referrerPolicy:null,rel:ol,required:or,reversed:or,rows:os,rowSpan:os,sandbox:ol,scope:null,scoped:or,seamless:or,selected:or,shadowRootClonable:or,shadowRootDelegatesFocus:or,shadowRootMode:null,shape:null,size:os,sizes:null,slot:null,span:os,spellCheck:oo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:os,step:null,style:null,tabIndex:os,target:null,title:null,translate:null,type:null,typeMustMatch:or,useMap:null,value:oo,width:os,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ol,axis:null,background:null,bgColor:null,border:os,borderColor:null,bottomMargin:os,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:or,declare:or,event:null,face:null,frame:null,frameBorder:null,hSpace:os,leftMargin:os,link:null,longDesc:null,lowSrc:null,marginHeight:os,marginWidth:os,noResize:or,noHref:or,noShade:or,noWrap:or,object:null,profile:null,prompt:null,rev:null,rightMargin:os,rules:null,scheme:null,scrolling:oo,standby:null,summary:null,text:null,topMargin:os,valueType:null,version:null,vAlign:null,vLink:null,vSpace:os,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:or,disableRemotePlayback:or,prefix:null,property:null,results:os,security:null,unselectable:null},space:"html",transform:ov}),ow=om({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",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:ou,accentHeight:os,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:os,amplitude:os,arabicForm:null,ascent:os,attributeName:null,attributeType:null,azimuth:os,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:os,by:null,calcMode:null,capHeight:os,className:ol,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:os,diffuseConstant:os,direction:null,display:null,dur:null,divisor:os,dominantBaseline:null,download:or,dx:null,dy:null,edgeMode:null,editable:null,elevation:os,enableBackground:null,end:null,event:null,exponent:os,externalResourcesRequired:null,fill:null,fillOpacity:os,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:od,g2:od,glyphName:od,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:os,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:os,horizOriginX:os,horizOriginY:os,id:null,ideographic:os,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:os,k:os,k1:os,k2:os,k3:os,k4:os,kernelMatrix:ou,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:os,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:os,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:os,overlineThickness:os,paintOrder:null,panose1:null,path:null,pathLength:os,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ol,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:os,pointsAtY:os,pointsAtZ:os,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ou,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ou,rev:ou,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ou,requiredFeatures:ou,requiredFonts:ou,requiredFormats:ou,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:os,specularExponent:os,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:os,strikethroughThickness:os,string:null,stroke:null,strokeDashArray:ou,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:os,strokeOpacity:os,strokeWidth:null,style:null,surfaceScale:os,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ou,tabIndex:os,tableValues:null,target:null,targetX:os,targetY:os,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ou,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:os,underlineThickness:os,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:os,values:null,vAlphabetic:os,vMathematical:os,vectorEffect:null,vHanging:os,vIdeographic:os,version:null,vertAdvY:os,vertOriginX:os,vertOriginY:os,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:os,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ob}),ox=om({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),ok=om({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ov}),oS=om({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),oC=oe([og,oy,ox,ok,oS],"html"),oA=oe([og,ow,ox,ok,oS],"svg"),oE={}.hasOwnProperty,oL=/["&'<>`]/g,o_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oN=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,oT=/[|\\{}()[\]^$+*?.]/g,oR=new WeakMap,oM=/[\dA-Fa-f]/,oP=/\d/,oI=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],oD={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},o$=["cent","copy","divide","gt","lt","not","para","times"],oO={}.hasOwnProperty,oj={};for(t in oD)oO.call(oD,t)&&(oj[oD[t]]=t);let oz=/[^\dA-Za-z]/;function oB(e,t,n){var i,r;let o,a,s=(i=n.omitOptionalSemicolons,o="&#x"+e.toString(16).toUpperCase(),i&&t&&!oM.test(String.fromCharCode(t))?o:o+";");if((n.useNamedReferences||n.useShortestReferences)&&(a=function(e,t,n,i){let r=String.fromCharCode(e);if(oO.call(oj,r)){let e=oj[r],o="&"+e;return n&&oI.includes(e)&&!o$.includes(e)&&(!i||t&&61!==t&&oz.test(String.fromCharCode(t)))?o:o+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){let i,o=(r=n.omitOptionalSemicolons,i="&#"+String(e),r&&t&&!oP.test(String.fromCharCode(t))?i:i+";");o.length<s.length&&(s=o)}return a&&(!n.useShortestReferences||a.length<s.length)?a:s}function oH(e,t){let n;var i,r=e,o=Object.assign({format:oB},t);if(r=r.replace(o.subset?(i=o.subset,(n=oR.get(i))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(oT,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(i),oR.set(i,n)),n):oL,a),o.subset||o.escapeOnly)return r;return r.replace(o_,function(e,t,n){return o.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),o)}).replace(oN,a);function a(e,t,n){return o.format(e.charCodeAt(0),n.charCodeAt(t+1),o)}}let oU=/^>|^->|<!--|-->|--!>|<!-$/g,oF=[">"],oG=["<",">"];function oW(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let i=0,r=n.indexOf(t);for(;-1!==r;)i++,r=n.indexOf(t,r+t.length);return i}let oq=/[A-Z]/g,oV=/-[a-z]/g,oX=/^data[-\w.:]+$/i;function oK(e){return"-"+e.toLowerCase()}function oY(e){return e.charAt(1).toUpperCase()}let oJ=/[ \t\n\f\r]/g;function oQ(e){return"object"==typeof e?"text"===e.type&&oZ(e.value):oZ(e)}function oZ(e){return""===e.replace(oJ,"")}let o0=o8(1),o1=o8(-1),o2=[];function o8(e){return function(t,n,i){let r=t?t.children:o2,o=(n||0)+e,a=r[o];if(!i)for(;a&&oQ(a);)o+=e,a=r[o];return a}}let o5={}.hasOwnProperty;function o6(e){return function(t,n,i){return o5.call(e,t.tagName)&&e[t.tagName](t,n,i)}}let o3=o6({body:function(e,t,n){let i=o0(n,t);return!i||"comment"!==i.type},caption:o4,colgroup:o4,dd:function(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName)},dt:function(e,t,n){let i=o0(n,t);return!!(i&&"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName))},head:o4,html:function(e,t,n){let i=o0(n,t);return!i||"comment"!==i.type},li:function(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&"li"===i.tagName},optgroup:function(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&"optgroup"===i.tagName},option:function(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&("option"===i.tagName||"optgroup"===i.tagName)},p:function(e,t,n){let i=o0(n,t);return i?"element"===i.type&&("address"===i.tagName||"article"===i.tagName||"aside"===i.tagName||"blockquote"===i.tagName||"details"===i.tagName||"div"===i.tagName||"dl"===i.tagName||"fieldset"===i.tagName||"figcaption"===i.tagName||"figure"===i.tagName||"footer"===i.tagName||"form"===i.tagName||"h1"===i.tagName||"h2"===i.tagName||"h3"===i.tagName||"h4"===i.tagName||"h5"===i.tagName||"h6"===i.tagName||"header"===i.tagName||"hgroup"===i.tagName||"hr"===i.tagName||"main"===i.tagName||"menu"===i.tagName||"nav"===i.tagName||"ol"===i.tagName||"p"===i.tagName||"pre"===i.tagName||"section"===i.tagName||"table"===i.tagName||"ul"===i.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:o7,rt:o7,tbody:function(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName)},td:o9,tfoot:function(e,t,n){return!o0(n,t)},th:o9,thead:function(e,t,n){let i=o0(n,t);return!!(i&&"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName))},tr:function(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&"tr"===i.tagName}});function o4(e,t,n){let i=o0(n,t,!0);return!i||"comment"!==i.type&&!("text"===i.type&&oQ(i.value.charAt(0)))}function o7(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&("rp"===i.tagName||"rt"===i.tagName)}function o9(e,t,n){let i=o0(n,t);return!i||"element"===i.type&&("td"===i.tagName||"th"===i.tagName)}let ae=o6({body:function(e){let t=o0(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&oQ(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let i=o1(n,t),r=o0(e,-1,!0);return!(n&&i&&"element"===i.type&&"colgroup"===i.tagName&&o3(i,n.children.indexOf(i),n))&&!!(r&&"element"===r.type&&"col"===r.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=o0(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let i=o1(n,t),r=o0(e,-1);return!(n&&i&&"element"===i.type&&("thead"===i.tagName||"tbody"===i.tagName)&&o3(i,n.children.indexOf(i),n))&&!!(r&&"element"===r.type&&"tr"===r.tagName)}}),at={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},an=["<","&"];function ai(e,t,n,i){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:oH(e.value,Object.assign({},i.settings.characterReferences,{subset:an}))}let ar=function(e,t){let n=t||{};function i(t,...n){let r=i.invalid,o=i.handlers;if(t&&oE.call(t,e)){let n=String(t[e]);r=oE.call(o,n)?o[n]:i.unknown}if(r)return r.call(this,t,...n)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,i){return i.settings.bogusComments?"<?"+oH(e.value,Object.assign({},i.settings.characterReferences,{subset:oF}))+">":"<!--"+e.value.replace(oU,function(e){return oH(e,Object.assign({},i.settings.characterReferences,{subset:oG}))})+"-->"},doctype:function(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,i){let r,o=i.schema,a="svg"!==o.space&&i.settings.omitOptionalTags,s="svg"===o.space?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===o.space&&"svg"===e.tagName&&(i.schema=oA);let d=function(e,t){let n,i=[],r=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let r=function(e,t,n){let i,r=function(e,t){let n=ot(t),i=t,r=on;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&oX.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(oV,oY);i="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!oV.test(e)){let n=e.replace(oq,oK);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}r=op}return new r(i,t)}(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,a=+!e.settings.allowDangerousCharacters,s=e.quote;if(r.overloadedBoolean&&(n===r.attribute||""===n)?n=!0:(r.boolean||r.overloadedBoolean)&&("string"!=typeof n||n===r.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=oH(r.attribute,Object.assign({},e.settings.characterReferences,{subset:at.name[o][a]}));return!0===n||(n=Array.isArray(n)?(r.commaSeparated?function(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}:function(e){return e.join(" ").trim()})(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(i=oH(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:at.unquoted[o][a]}))),i!==n&&(e.settings.quoteSmart&&oW(n,s)>oW(n,e.alternative)&&(s=e.alternative),i=s+oH(n,Object.assign({},e.settings.characterReferences,{subset:("'"===s?at.single:at.double)[o][a],attribute:!0}))+s),l+(i?"="+i:i))}(e,n,t[n]);r&&i.push(r)}}for(;++r<i.length;){let t=e.settings.tightAttributes?i[r].charAt(i[r].length-1):void 0;r!==i.length-1&&'"'!==t&&"'"!==t&&(i[r]+=" ")}return i.join("")}(i,e.properties),u=i.all("html"===o.space&&"template"===e.tagName?e.content:e);return i.schema=o,u&&(s=!1),!d&&a&&ae(e,t,n)||(l.push("<",e.tagName,d?" "+d:""),s&&("svg"===o.space||i.settings.closeSelfClosing)&&(r=d.charAt(d.length-1),(!i.settings.tightSelfClosing||"/"===r||r&&'"'!==r&&"'"!==r)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),s||a&&o3(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,i){return i.settings.allowDangerousHtml?e.value:ai(e,t,n,i)},root:function(e,t,n,i){return i.all(e)},text:ai}}),ao={},aa={},as=[];function al(e,t){let n=t||ao,i=n.quote||'"';if('"'!==i&&"'"!==i)throw Error("Invalid quote `"+i+"`, expected `'` or `\"`");return({one:ad,all:au,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||r7,characterReferences:n.characterReferences||aa,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?oA:oC,quote:i,alternative:'"'===i?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function ad(e,t,n){return ar(e,t,n,this)}function au(e){let t=[],n=e&&e.children||as,i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}var ac=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),null!=this.queuedSelectionRender&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):null!=this.gutterUtilityContainer&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,"gutterSelecting"===this.pointerSession.mode&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return null===this.renderedSelectionRange}setSelection(e,t){let n=!(e===this.selectedRange||r2(e??void 0,this.selectedRange??void 0));(this.isSelectionDirty()||n)&&(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(null!=e){if("diff"===this.mode&&"diff-line"===e.type)return{lineNumber:e.lineNumber,side:e.annotationSide};if("file"===this.mode&&"line"===e.type)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;null==t&&null==n&&null==i&&null==o&&null==r||null!=this.options.onGutterUtilityClick&&ax(e.composedPath())||(ak(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if("mouse"!==e.pointerType)return;let{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:a=!1}=this.options;("disabled"!==t||a||null!=n||null!=i||null!=r||null!=o)&&(ak(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;(ak(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),null==this.hoveredLine&&null==this.hoveredToken)?ak(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token"):(null!=this.hoveredToken&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),null!=this.hoveredLine&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility())};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,i=t.composedPath();ak(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});let r=this.resolvePointerTarget(i);ak(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);let{onLineClick:o,onLineNumberClick:a,onLineEnter:s,onLineLeave:l,onTokenClick:d,onTokenEnter:u,onTokenLeave:c,onHunkExpand:h,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{let e=am(r)&&this.hoveredLine?.lineElement===r.lineElement;!(ap(r)&&this.hoveredToken?.tokenElement===r.tokenElement)&&(null!=this.hoveredToken&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ap(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),u?.(this.hoveredToken,t))),e||(null!=this.hoveredLine&&(l?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),am(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{var p,m;if(null==r)break;if("kind"in(p=r)&&"merge-conflict-action"===p.kind&&null!=f){f(r);break}if("type"in(m=r)&&"line-info"===m.type&&null!=h){h(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?1/0:void 0);break}if(!am(r))break;ap(r)&&null!=d&&d(this.toTokenEventBaseProps(r),t);let e=this.toEventBaseProps(r);null!=a&&r.numberColumn?a({...e,event:t}):null!=o&&o({...e,event:t})}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:a,onTokenClick:s,onTokenEnter:l,onTokenLeave:d,onHunkExpand:u,onMergeConflictActionClick:c,enableGutterUtility:h=!1,enableLineSelection:f=!1,onGutterUtilityClick:p}=this.options,m=null!=p,g="disabled"!==n||null!=i||null!=r||null!=o||null!=a||null!=s||null!=l||null!=d||null!=u||null!=c||h||f||m;if(g&&!this.hasPointerListeners){let n;e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,ak(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(n=[],("both"===t||"click"===t)&&(null!=i&&n.push("onLineClick"),null!=r&&n.push("onLineNumberClick"),null!=u&&n.push("expandable hunk separators"),null!=c&&n.push("merge conflict actions")),n)),ak(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),ak(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")}else!g&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);let b="selecting"===this.pointerSession.mode||"pendingSingleLineUnselect"===this.pointerSession.mode,v="gutterSelecting"===this.pointerSession.mode;(!f&&b||!m&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(null==this.pre)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=null!=e,r=null!=t||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if("mouse"===e.pointerType&&0!==e.button||null==this.pre||"idle"!==this.pointerSession.mode)return;let t=e.composedPath();ax(t)&&null!=this.options.onGutterUtilityClick?this.startGutterSelectionFromPointerDown(e):("mouse"!==e.pointerType&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(null==n)return;let{pre:i}=this;if(null==i)return;let{lineNumber:r,eventSide:o,lineIndex:a}=n;if(e.shiftKey&&null!=this.selectedRange){let t=this.getIndexesFromSelection(this.selectedRange,"split"===i.getAttribute("data-diff-type"));if(null==t)return;let n=t.start<=t.end?a>=t.start:a<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){let t={lineNumber:r,side:o};this.selectionAnchor=t,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}!0===this.options.controlledSelection?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(null==n)return;let i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;null!=r&&null!=o&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(null==n)return;this.pointerSession.current=n,!0===t&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(null==t||null==this.selectionAnchor)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{var n;if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(null==t||null==this.selectionAnchor)return;let i={lineNumber:t.lineNumber,side:t.eventSide};if(n=this.pointerSession.pending,n.lineNumber===i.lineNumber&&n.side===i.side)return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let i=this.resolveSelectionPoint(e,{source:"coordinates-first"});null!=i&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){null!=this.hoveredLine&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t="disabled"}=this.options;null!=this.hoveredLine&&this.clearHoveredLine(),this.hoveredLine=e,"disabled"!==t&&(("both"===t||"line"===t)&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),("both"===t||"number"===t)&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){null!=this.hoveredToken&&(this.hoveredToken=void 0)}setHoveredToken(e){null!=this.hoveredToken&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(null==this.gutterUtilityContainer&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)null!=this.gutterUtilityButton&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),null==this.gutterUtilitySlot&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,null==this.gutterUtilityButton){let e=document.createElement("div");e.innerHTML=al(r5({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[r6({name:"diffs-icon-plus",properties:{"data-icon":""}})]}));let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);af(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(null!=this.hoveredLine)return void this.showUtilityOnLine(this.hoveredLine);this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(null==e)return!1;let t=this.targetForSelectionPoint(e.bottom);return null==t?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){null!=this.gutterUtilityContainer&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return null==e?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(null!=i&&null!=r)return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(null!=t)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(null==this.pre)return;let t=this.getLineIndex(e.lineNumber,e.side);if(null==t)return;let n="diff"===this.mode?`${t[0]},${t[1]}`:`${t[0]}`;for(let t of this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`)){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(ab(t));if(af(n)&&("diff"!==this.mode||null==e.side||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){"pendingSingleLineUnselect"===this.pointerSession.mode&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(af(n)&&(!t||n.numberColumn)&&null!=n.splitLineIndex)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:"diff"===this.mode?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return null!=n?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(af(t))return{lineNumber:t.lineNumber,side:"diff"===this.mode?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return null!=n?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){let n=!1!==t.excludeUtility;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{let t=this.pathFromCoordinates(e,n);if(void 0!==t)return t??void 0;return this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(void 0!==n)return null===n?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&ax(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=ab(e);if(t&&ax(n))return;let i=function(e){let t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;let n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;let i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}(e);return null!=i?ab(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){let t=function(e){if(null==e)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(null==t)return;let n=Number.parseInt(t[2],10);if(Number.isFinite(n)&&!(n<=0))return{lineNumber:n,side:t[1]}}(function(e){let t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){let t=e.getAttribute("name")??void 0;return null!=t&&t.startsWith("annotation-")?t:void 0}}(e));if(null==t)return;let n=this.targetForSelectionPoint(t);return null!=n?ab(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=av(t)?t:av(document)?document:void 0;if(null!=n)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return null!=n?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return void 0!==this.proposedSelectedRange?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let i,r=this.getCurrentSelectionRange();if(null==e)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}!r2(r??void 0,i??void 0)&&(!0===this.options.controlledSelection?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(null==this.pre)return;let n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return null!=n&&null!=i?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(null!=this.queuedSelectionRender&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),null==this.pre||this.renderedSelectionRange===this.selectedRange)return;for(let e of this.pre.querySelectorAll("[data-selected-line]"))e.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,null==this.selectedRange)return;let{children:e}=this.pre;if(0===e.length)return;if(e.length>2)throw console.error(e),Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");let t="split"===this.pre.getAttribute("data-diff-type"),n=this.getIndexesFromSelection(this.selectedRange,t);if(null==n)throw console.error({rowRange:n,selectedRange:this.selectedRange}),Error("InteractionManager.renderSelection: No valid rowRange");let i=n.start===n.end,r=Math.min(n.start,n.end),o=Math.max(n.start,n.end);for(let n of e){let[e,a]=n.children,s=a.children.length;if(s!==e.children.length)throw Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let n=0;n<s;n++){let s=a.children[n],l=e.children[n];if(!(s instanceof HTMLElement)||!(l instanceof HTMLElement))continue;let d=this.parseLineIndex(s,t);if((d??0)>o)break;if(null==d||d<r)continue;let u=i?"single":d===r?"first":d===o?"last":"";s.setAttribute("data-selected-line",u),l.setAttribute("data-selected-line",u),l.nextSibling instanceof HTMLElement&&s.nextSibling instanceof HTMLElement&&(s.nextSibling.hasAttribute("data-line-annotation")||s.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(i?(u="last",s.setAttribute("data-selected-line","first")):d===r?u="":d===o&&s.setAttribute("data-selected-line",""),s.nextSibling.setAttribute("data-selected-line",u),l.nextSibling.setAttribute("data-selected-line",u))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return"file"===this.mode?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return"file"===this.mode?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...null!=n?{side:n}:{},...n!==i&&null!=i?{endSide:i}:{}}}resolvePointerTarget(e){let t,n,i,r,o,a,s,l,d,u,c=!1;for(let f of e){if(!(f instanceof HTMLElement))continue;if(null==u&&f.hasAttribute("data-merge-conflict-action")){var h;let e=f.getAttribute("data-merge-conflict-action")??void 0,t=f.getAttribute("data-merge-conflict-conflict-index")??void 0,n=null!=t?Number.parseInt(t,10):NaN;("current"===(h=e)||"incoming"===h||"both"===h)&&Number.isFinite(n)&&(u={kind:"merge-conflict-action",resolution:e,conflictIndex:n})}if(null==a&&f.hasAttribute("data-char")){a=f;let e=f.getAttribute("data-char");if(null!=e){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??"",n=t+e.length;(""!==e.trim()||!0===this.options.enableTokenInteractionsOnWhitespace)&&(s={tokenElement:a,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=null==o?f.getAttribute("data-column-number")??void 0:void 0;if(null!=e){o=f,d=Number.parseInt(e,10),c=!0,t=aw(f),r=f.getAttribute("data-line-index")??void 0;continue}let p=null==i?f.getAttribute("data-line")??void 0:void 0;if(null!=p){i=f,d=Number.parseInt(p,10),t=aw(f),r=f.getAttribute("data-line-index")??void 0;continue}if(null==l&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){l={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}let m=null!=l?f.getAttribute("data-expand-index")??void 0:void 0;if(null!=l&&null!=m){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(null==n&&f.hasAttribute("data-code")){n=f;break}}if(null!=u)return u;if(l?.hunkIndex!=null)return{type:"line-info",hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=null!=r?ag(n,`[data-line][data-line-index="${r}"]`):void 0,o??=null!=r?ag(n,`[data-column-number][data-line-index="${r}"]`):void 0,null==n||null==i||null==o||null==t||null==d||Number.isNaN(d))return;let f=this.parseLineIndex(i,this.isSplitDiff());return null!=s?"file"===this.mode?{kind:"token",lineType:t,lineElement:i,lineNumber:d,numberColumn:c,numberElement:o,side:void 0,splitLineIndex:f,...s}:{kind:"token",lineType:t,lineElement:i,lineNumber:d,numberColumn:c,numberElement:o,side:ay(t,n),splitLineIndex:f,...s}:"file"===this.mode?{kind:"line",lineType:t,lineElement:i,lineNumber:d,numberColumn:c,numberElement:o,side:void 0,splitLineIndex:f}:{kind:"line",lineType:t,lineElement:i,lineNumber:d,numberColumn:c,numberElement:o,side:ay(t,n),splitLineIndex:f}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){let n=(e.getAttribute("data-line-index")??"").split(",").map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));return t&&2===n.length?n[1]:t?void 0:n[0]}};function ah({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:a,onLineNumberClick:s,onTokenClick:l,onTokenEnter:d,onTokenLeave:u,renderGutterUtility:c,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:p,onLineSelected:m,onLineSelectionStart:g,onLineSelectionChange:b,onLineSelectionEnd:v},y,w,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:function({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(null!=n&&null!=t)throw Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:null!=c,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:a,onLineNumberClick:s,onTokenClick:l,onTokenEnter:d,onTokenLeave:u,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:p,onLineSelected:m,onLineSelectionStart:g,onLineSelectionChange:b,onLineSelectionEnd:v,getLineIndex:w}}function af(e){return null!=e&&"kind"in e&&"line"===e.kind}function ap(e){return null!=e&&"kind"in e&&"token"===e.kind}function am(e){return af(e)||ap(e)}function ag(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function ab(e){let t=[],n=e;for(;null!=n;)t.push(n),n=n.parentNode;return t}function av(e){return null!=e&&"function"==typeof e.elementFromPoint}function ay(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function aw(e){let t=e.getAttribute("data-line-type");if(null!=t)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function ax(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||"gutter-utility-slot"===t.getAttribute("slot")||"gutter-utility-slot"===t.getAttribute("name")))return!0;return!1}function ak(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if("click"!==t)return;break;case"move":if("move"!==t)return}console.log(...n)}var aS=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let i of t){let t=e.managersByElement.get(i.target);if(null==t)continue;let r=n.get(t);null==r?n.set(t,[i]):r.push(i)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,t){let n=new Set,i=0,r=new Map(this.observedNodes);for(let t of(this.observedNodes.clear(),e.children)){if(2===i)break;let e=(()=>{if(t instanceof HTMLElement&&"CODE"===t.tagName)return t})();if(null==e)continue;i++;let n=r.get(e);if(null!=n&&"code"!==n.type)throw Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let o=e.firstElementChild;o instanceof HTMLElement||(o=null),null!=n?(this.observedNodes.set(e,n),r.delete(e),n.numberElement!==o?(null!=n.numberElement&&(this.unobserve(n.numberElement),r.delete(n.numberElement)),null!=o&&(this.observe(o),r.delete(o),this.observedNodes.set(o,n)),n.numberElement=o,n.numberWidth=0):null!=n.numberElement?(r.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):n.numberWidth=0):(n={type:"code",codeElement:e,numberElement:o,codeWidth:"auto",numberWidth:0},this.observedNodes.set(e,n),this.observe(e),null!=o&&(this.observedNodes.set(o,n),this.observe(o)))}if(i>1&&!t){let t=e.querySelectorAll('[data-line-annotation*=","]'),i=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(t)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:t,element:e});continue}let n=i.get(t);null==n&&(n=[],i.set(t,n)),n.push(e)}for(let[e,t]of i){if(2!==t.length){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",e,t);continue}let[i,o]=t,a=i.firstElementChild,s=o.firstElementChild;if(!(i instanceof HTMLElement)||!(o instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let l=r.get(a);if(null!=l){this.observedNodes.set(a,l),this.observedNodes.set(s,l),r.delete(a),r.delete(s);continue}let d=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;l={type:"annotations",column1:{container:i,child:a,childHeight:d},column2:{container:o,child:s,childHeight:u},currentHeight:"auto"},n.add({child1:a,child2:s,item:l,newHeight:Math.max(d,u)})}for(let e of n)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);n.clear()}for(let[e,t]of r){var o,a;this.unobserve(e),"code"===t.type?(o=t).codeElement.isConnected&&(o.codeElement.style.removeProperty("--diffs-column-content-width"),o.codeElement.style.removeProperty("--diffs-column-number-width"),o.codeElement.style.removeProperty("--diffs-column-width")):((a=t).column1.container.isConnected&&a.column1.container.style.removeProperty("--diffs-annotation-min-height"),a.column2.container.isConnected&&a.column2.container.style.removeProperty("--diffs-annotation-min-height"))}r.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,i=n.get(t);if(i!==this){if(null!=i&&i!==this)throw Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:i}=e,r=n.get(t);if(null!=r){if(r!==this)throw Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),null!=i&&0===n.size&&(i.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let i of e){let{target:e,borderBoxSize:r,contentBoxSize:o}=i;if(!(e instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",i);continue}let a=this.observedNodes.get(e);if(null==a){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",i);continue}if("annotations"===a.type){let t=e===a.column1.child?a.column1:e===a.column2.child?a.column2:void 0;if(null==t){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:e});continue}t.childHeight=r[0].blockSize,n.add(a)}else if("code"===a.type){let n=t.get(a)??{},i=o[0].inlineSize;e===a.codeElement?n.codeInlineSize=i:e===a.numberElement&&(n.numberInlineSize=i),t.set(a,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=null!=n.codeInlineSize?function(e){let t=Math.max(Math.floor(e),0);return 0===t?"auto":t}(n.codeInlineSize):t.codeWidth,i=null!=n.numberInlineSize?Math.max(Math.ceil(n.numberInlineSize),0):t.numberWidth,r=e!==t.codeWidth,o=i!==t.numberWidth;if((r||o)&&(t.codeWidth=e,t.numberWidth=i,r&&t.codeElement.style.setProperty("--diffs-column-width",`${"number"==typeof e?`${e}px`:"auto"}`),o&&t.codeElement.style.setProperty("--diffs-column-number-width",`${0===i?"auto":`${i}px`}`),r||o&&"auto"!==e)){let n="number"==typeof e?Math.max(e-i,0):0;t.codeElement.style.setProperty("--diffs-column-content-width",`${n>0?`${n}px`:"auto"}`)}}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};function aC(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function aA(e,t){return null==e||null==t?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}let aE=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
3
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
4
+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
5
+ </symbol>
6
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
7
+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
8
+ </symbol>
9
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
10
+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
11
+ </symbol>
12
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
13
+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
14
+ </symbol>
15
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
16
+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
17
+ </symbol>
18
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
19
+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
20
+ </symbol>
21
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
22
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
23
+ </symbol>
24
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
25
+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
26
+ </symbol>
27
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
28
+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
29
+ </symbol>
30
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
31
+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
32
+ </symbol>
33
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
34
+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
35
+ </symbol>
36
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
37
+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
38
+ </symbol>
39
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
40
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
41
+ </symbol>
42
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
43
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
44
+ </symbol>
45
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
46
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
47
+ </symbol>
48
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
49
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
50
+ </symbol>
51
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
52
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
53
+ </symbol>
54
+ </svg>`,aL={};function a_(e){if(null!=n)return n;let t=e.host;if("u">typeof HTMLElement&&t instanceof HTMLElement&&!t.isConnected)return;let i=document.createElement("div");i.setAttribute("data-code",""),i.setAttribute("data-diffs-scrollbar-measure","true");let r=document.createElement("div");return r.style.position="relative",r.style.width="200%",r.style.height="200%",i.appendChild(r),e.appendChild(i),n=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),n}function aN(e){return`${rk}: ${null==e?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}let aT="@layer base, theme, rendered, unsafe;",aR=RegExp(`${rk.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*:\\s*[^;]+;`);function aM({code:e,pre:t,columnType:n,rowSpan:i,containerSize:r=!1}={}){return null==e&&((e=document.createElement("code")).setAttribute("data-code",""),null!=n&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),null!=i?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),r?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}if("u">typeof HTMLElement&&null==customElements.get("diffs-container")){let e;class t extends HTMLElement{constructor(){if(super(),null!=this.shadowRoot)return;const t=this.attachShadow({mode:"open"});null==e&&(e=new CSSStyleSheet).replaceSync('@layer base {\n :host {\n --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",\n "Courier New", monospace;\n --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",\n "Noto Sans", "Liberation Sans", Arial, sans-serif;\n --diffs-mixer: light-dark(#000, #fff);\n --diffs-gap-fallback: 8px;\n --diffs-scrollbar-gutter-fallback: 6px;\n --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));\n --diffs-added-light: #0dbe4e;\n --diffs-added-dark: #5ecc71;\n --diffs-modified-light: #009fff;\n --diffs-modified-dark: #69b1ff;\n --diffs-deleted-light: #ff2e3f;\n --diffs-deleted-dark: #ff6762;\n color-scheme: light dark;\n font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n font-size: var(--diffs-font-size, 13px);\n line-height: var(--diffs-line-height, 20px);\n font-feature-settings: var(--diffs-font-features);\n --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));\n --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));\n --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));\n --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));\n --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));\n --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));\n --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));\n --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));\n --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));\n --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));\n --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));\n --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));\n --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));\n --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));\n --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));\n --diffs-selection-base: var(--diffs-modified-base);\n --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));\n background-color: var(--diffs-bg);\n color: var(--diffs-fg);\n display: block;\n }\n\n pre, code, [data-error-wrapper] {\n isolation: isolate;\n font-family: var(--diffs-font-family, var(--diffs-font-fallback));\n outline: none;\n margin: 0;\n padding: 0;\n display: block;\n }\n\n pre, code {\n background-color: var(--diffs-bg);\n }\n\n code {\n contain: content;\n }\n\n *, :before, :after {\n box-sizing: border-box;\n }\n\n [data-icon-sprite] {\n display: none;\n }\n\n [data-diffs-header], [data-separator] {\n font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n }\n\n [data-diffs-header][data-sticky] {\n z-index: 1;\n background-color: var(--diffs-bg);\n position: sticky;\n top: 0;\n }\n\n [data-file-info] {\n color: var(--fg);\n background-color: color-mix(in lab, var(--bg) 98%, var(--fg));\n border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));\n padding: 10px;\n font-weight: 700;\n }\n\n [data-diff], [data-file] {\n --diffs-grid-number-column-width: minmax(min-content, max-content);\n --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;\n\n &[data-dehydrated] {\n --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);\n }\n\n &:hover [data-code]::-webkit-scrollbar-thumb {\n background-color: var(--diffs-bg-context);\n }\n }\n\n @supports (-webkit-touch-callout: none) {\n :host {\n --diffs-scrollbar-gutter-fallback: 0px;\n }\n }\n\n [data-line] span {\n color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));\n background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));\n font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));\n font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));\n text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));\n }\n\n [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {\n --diffs-computed-decoration-bg: var(--diffs-bg);\n --diffs-computed-diff-line-bg: var(--diffs-bg);\n --diffs-computed-selected-line-bg: var(--diffs-bg);\n color: var(--diffs-fg);\n background-color: var(--diffs-line-bg, var(--diffs-bg));\n\n @media (pointer: fine) {\n &:where([data-hovered]) {\n --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,\n var(--diffs-computed-selected-line-bg) 97%,\n var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,\n var(--diffs-computed-selected-line-bg) 91%,\n var(--diffs-bg-hover-override, var(--diffs-mixer))));\n --diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);\n }\n }\n }\n\n [data-line], [data-no-newline] {\n &[data-decoration-bg] {\n --mix-deco-light: 92%;\n --mix-deco-dark: 85%;\n\n &[data-decoration-bg-depth="2"] {\n --mix-deco-light: 88%;\n --mix-deco-dark: 80%;\n }\n\n &[data-decoration-bg-depth="3"] {\n --mix-deco-light: 85%;\n --mix-deco-dark: 78%;\n }\n\n @media (pointer: fine) {\n &[data-hovered]:not([data-selected-line]) {\n --mix-deco-light: 85%;\n --mix-deco-dark: 85%;\n }\n\n &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {\n --mix-deco-light: 83%;\n --mix-deco-dark: 83%;\n }\n\n &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {\n --mix-deco-light: 81%;\n --mix-deco-dark: 81%;\n }\n }\n\n --diffs-computed-decoration-bg: light-dark(color-mix(in lab,\n var(--diffs-bg) var(--mix-deco-light),\n var(--diffs-decoration-bg)), color-mix(in lab,\n var(--diffs-bg) var(--mix-deco-dark),\n var(--diffs-decoration-bg)));\n --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);\n --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);\n --diffs-line-bg: var(--diffs-computed-decoration-bg);\n }\n }\n\n [data-line-annotation], [data-gutter-buffer="annotation"] {\n --diffs-annotation-bg: var(--diffs-bg-context);\n --diffs-computed-decoration-bg: var(--diffs-annotation-bg);\n --diffs-computed-diff-line-bg: var(--diffs-annotation-bg);\n --diffs-computed-selected-line-bg: var(--diffs-annotation-bg);\n --diffs-line-bg: var(--diffs-annotation-bg);\n }\n\n [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {\n --diffs-computed-decoration-bg: var(--diffs-bg-context);\n --diffs-computed-diff-line-bg: var(--diffs-bg-context);\n --diffs-computed-selected-line-bg: var(--diffs-bg-context);\n --diffs-line-bg: var(--diffs-bg-context);\n }\n\n [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {\n --diffs-computed-decoration-bg: light-dark(color-mix(in lab,\n var(--diffs-bg) 78%,\n var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,\n var(--diffs-bg) 68%,\n var(--conflict-bg-current-header-override, var(--diffs-addition-base))));\n --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);\n --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);\n --diffs-line-bg: var(--diffs-computed-decoration-bg);\n }\n\n [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {\n --diffs-computed-decoration-bg: light-dark(color-mix(in lab,\n var(--diffs-bg) 78%,\n var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,\n var(--diffs-bg) 68%,\n var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));\n --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);\n --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);\n --diffs-line-bg: var(--diffs-computed-decoration-bg);\n }\n\n [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {\n --diffs-computed-decoration-bg: var(--diffs-bg);\n --diffs-computed-diff-line-bg: var(--diffs-bg);\n --diffs-computed-selected-line-bg: var(--diffs-bg);\n --diffs-line-bg: var(--diffs-bg);\n }\n\n :where([data-background]) {\n & [data-gutter-buffer], & [data-column-number] {\n --mix-light: 91%;\n --mix-dark: 85%;\n }\n\n & [data-line], & [data-no-newline] {\n --mix-light: 88%;\n --mix-dark: 80%;\n }\n\n & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {\n --diffs-diff-line-mix-target: var(--diffs-bg);\n\n &[data-line-type="change-deletion"] {\n --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));\n\n @media (pointer: fine) {\n &[data-hovered] {\n --mix-light: 80%;\n --mix-dark: 75%;\n }\n }\n\n &:where([data-gutter-buffer], [data-column-number]) {\n color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));\n --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));\n }\n\n --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-light),\n var(--diffs-diff-line-mix-target)), color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-dark),\n var(--diffs-diff-line-mix-target)));\n --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);\n --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);\n }\n\n &[data-line-type="change-addition"] {\n --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));\n\n @media (pointer: fine) {\n &[data-hovered] {\n --mix-light: 80%;\n --mix-dark: 70%;\n }\n }\n\n &:where([data-gutter-buffer], [data-column-number]) {\n color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));\n --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));\n }\n\n --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-light),\n var(--diffs-diff-line-mix-target)), color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-dark),\n var(--diffs-diff-line-mix-target)));\n --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);\n --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);\n }\n\n &[data-merge-conflict="current"] {\n --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));\n\n &:where([data-gutter-buffer], [data-column-number]) {\n color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));\n --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));\n }\n\n @media (pointer: fine) {\n &[data-hovered] {\n --mix-light: 80%;\n --mix-dark: 70%;\n }\n }\n\n --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-light),\n var(--diffs-diff-line-mix-target)), color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-dark),\n var(--diffs-diff-line-mix-target)));\n --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);\n --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);\n }\n\n &[data-merge-conflict="incoming"] {\n --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));\n\n &:where([data-gutter-buffer], [data-column-number]) {\n color: var(--diffs-modified-base);\n --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));\n }\n\n @media (pointer: fine) {\n &[data-hovered] {\n --mix-light: 80%;\n --mix-dark: 70%;\n }\n }\n\n --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-light),\n var(--diffs-diff-line-mix-target)), color-mix(in lab,\n var(--diffs-computed-decoration-bg) var(--mix-dark),\n var(--diffs-diff-line-mix-target)));\n --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);\n --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);\n }\n }\n }\n\n [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {\n --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));\n\n &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {\n --mix-selection-light: 82%;\n --mix-selection-dark: 75%;\n\n @media (pointer: fine) {\n &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {\n --mix-selection-light: 75%;\n --mix-selection-dark: 70%;\n }\n }\n }\n\n &:where([data-gutter-buffer], [data-column-number])[data-selected-line] {\n --mix-selection-light: 75%;\n --mix-selection-dark: 60%;\n --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));\n\n @media (pointer: fine) {\n &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {\n --mix-selection-light: 70%;\n --mix-selection-dark: 55%;\n }\n }\n }\n\n &[data-selected-line] {\n --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,\n var(--diffs-computed-diff-line-bg) var(--mix-selection-light),\n var(--diffs-selection-mix-target)), color-mix(in lab,\n var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),\n var(--diffs-selection-mix-target)));\n --diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);\n }\n }\n\n [data-gutter-buffer], [data-column-number] {\n &[data-selected-line] {\n color: var(--diffs-selection-number-fg);\n }\n }\n\n [data-no-newline] {\n user-select: none;\n\n & span {\n opacity: .6;\n }\n }\n\n [data-diff-type="split"][data-overflow="scroll"] {\n grid-template-columns: 1fr 1fr;\n display: grid;\n\n & [data-additions] {\n border-left: 1px solid var(--diffs-bg);\n }\n\n & [data-deletions] {\n border-right: 1px solid var(--diffs-bg);\n }\n }\n\n [data-code] {\n grid-auto-flow: dense;\n grid-template-columns: var(--diffs-code-grid);\n overflow: var(--diffs-overflow-override, scroll) clip;\n overscroll-behavior-x: none;\n tab-size: var(--diffs-tab-size, 2);\n padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));\n padding-bottom: max(0px,\n calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -\n var(--diffs-scrollbar-gutter)));\n scrollbar-gutter: stable;\n align-self: flex-start;\n display: grid;\n }\n\n [data-diffs-scrollbar-measure] {\n opacity: 0;\n pointer-events: none;\n scrollbar-gutter: auto;\n grid-template-columns: none;\n width: 100px;\n height: 100px;\n padding: 0;\n position: absolute;\n top: -200px;\n left: -200px;\n }\n\n [data-container-size] {\n container-type: inline-size;\n }\n\n [data-code]::-webkit-scrollbar {\n width: 0;\n height: var(--diffs-scrollbar-gutter);\n }\n\n [data-code]::-webkit-scrollbar-track {\n background: none;\n }\n\n [data-code]::-webkit-scrollbar-thumb {\n background-color: #0000;\n background-clip: content-box;\n border: 1px solid #0000;\n border-radius: 3px;\n }\n\n [data-code]::-webkit-scrollbar-corner {\n background-color: #0000;\n }\n\n @supports ((-moz-appearance: none)) {\n [data-code] {\n scrollbar-width: thin;\n scrollbar-color: var(--diffs-bg-context) transparent;\n padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));\n }\n }\n\n [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {\n & [data-code], &[data-overflow="wrap"] {\n padding-top: 0;\n }\n }\n\n [data-gutter] {\n grid-template-rows: subgrid;\n grid-template-columns: subgrid;\n z-index: 3;\n background-color: var(--diffs-bg);\n grid-column: 1;\n display: grid;\n position: relative;\n\n & [data-gutter-buffer], & [data-column-number] {\n border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));\n }\n }\n\n [data-content] {\n grid-template-rows: subgrid;\n grid-template-columns: subgrid;\n background-color: var(--diffs-bg);\n grid-column: 2;\n min-width: 0;\n display: grid;\n }\n\n [data-diff-type="split"][data-overflow="wrap"] {\n grid-auto-flow: dense;\n grid-template-columns: repeat(2, var(--diffs-code-grid));\n padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));\n display: grid;\n\n & [data-deletions] {\n display: contents;\n\n & [data-gutter] {\n grid-column: 1;\n }\n\n & [data-content] {\n border-right: 1px solid var(--diffs-bg);\n grid-column: 2;\n }\n }\n\n & [data-additions] {\n display: contents;\n\n & [data-gutter] {\n border-left: 1px solid var(--diffs-bg);\n grid-column: 3;\n }\n\n & [data-content] {\n grid-column: 4;\n }\n }\n }\n\n [data-overflow="scroll"] [data-gutter] {\n position: sticky;\n left: 0;\n }\n\n [data-interactive-lines] [data-line] {\n cursor: pointer;\n }\n\n [data-interactive-line-numbers] [data-column-number] {\n cursor: pointer;\n touch-action: none;\n }\n\n [data-content-buffer], [data-gutter-buffer] {\n user-select: none;\n min-height: 1lh;\n position: relative;\n }\n\n [data-gutter-buffer] {\n padding-left: 2ch;\n padding-right: 1ch;\n\n &:before {\n content: "";\n min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));\n display: block;\n }\n }\n\n [data-gutter-buffer="annotation"] {\n --diffs-annotation-bg: var(--diffs-bg-context-gutter);\n min-height: 0;\n }\n\n [data-gutter-buffer="buffer"] {\n --diffs-line-bg: var(--diffs-bg-context-gutter);\n }\n\n [data-content-buffer] {\n background-position: 5px 0;\n background-size: 8px 8px;\n background-origin: border-box;\n background-image: repeating-linear-gradient(-45deg,\n transparent,\n transparent calc(3px * 1.414),\n var(--diffs-bg-buffer) calc(3px * 1.414),\n var(--diffs-bg-buffer) calc(4px * 1.414));\n grid-column: 1;\n }\n\n [data-separator] {\n box-sizing: content-box;\n background-color: var(--diffs-bg);\n }\n\n [data-separator="simple"] {\n min-height: 4px;\n }\n\n [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {\n background-color: var(--diffs-bg-separator);\n }\n\n [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {\n height: 32px;\n position: relative;\n }\n\n [data-separator-wrapper] {\n user-select: none;\n fill: currentColor;\n background-color: var(--diffs-bg);\n align-items: center;\n height: 100%;\n display: flex;\n position: absolute;\n inset-inline: 0;\n }\n\n [data-content] [data-separator-wrapper] {\n display: none;\n }\n\n [data-separator="metadata"] [data-separator-wrapper] {\n background-color: var(--diffs-bg-separator);\n height: 100%;\n color: var(--diffs-fg-number);\n white-space: nowrap;\n text-overflow: ellipsis;\n min-width: min-content;\n padding-inline: 1ch;\n inset-inline: 100% auto;\n overflow: hidden;\n }\n\n [data-separator="line-info"] {\n margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));\n\n & [data-separator-wrapper] {\n min-width: 16px;\n }\n }\n\n [data-separator="line-info-basic"], [data-separator="metadata"] {\n margin-block: 0;\n }\n\n [data-separator="line-info"][data-separator-first] {\n margin-top: 0;\n }\n\n [data-separator="line-info"][data-separator-last] {\n margin-bottom: 0;\n }\n\n [data-expand-index] [data-separator-wrapper] {\n grid-template-columns: 32px auto;\n display: grid;\n }\n\n [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {\n grid-template-columns: 32px 32px auto;\n }\n\n [data-expand-button], [data-separator-content] {\n background-color: var(--diffs-bg-separator);\n flex: none;\n align-items: center;\n display: flex;\n }\n\n [data-expand-index] [data-separator-content]:hover {\n cursor: pointer;\n text-decoration: underline;\n }\n\n [data-expand-button] {\n cursor: pointer;\n min-width: 32px;\n color: var(--diffs-fg-number);\n border-right: 2px solid var(--diffs-bg);\n flex-shrink: 0;\n justify-content: center;\n align-self: stretch;\n\n &:hover {\n color: var(--diffs-fg);\n }\n\n &[data-expand-all-button] {\n display: none;\n }\n }\n\n [data-expand-down] [data-icon] {\n transform: scaleY(-1);\n }\n\n [data-separator-content] {\n height: 100%;\n color: var(--diffs-fg-number);\n flex: auto;\n justify-content: flex-start;\n padding: 0 1ch;\n overflow: hidden;\n }\n\n [data-separator="line-info"], [data-separator="line-info-basic"] {\n & [data-separator-content] {\n user-select: none;\n height: 100%;\n overflow: clip;\n }\n }\n\n [data-unmodified-lines] {\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 0 auto;\n min-width: 0;\n display: block;\n overflow: hidden;\n }\n\n @supports (width: 1cqi) {\n [data-unified] {\n & [data-separator="line-info"] [data-separator-wrapper] {\n padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n width: 100cqi;\n\n & [data-separator-content] {\n border-radius: 6px;\n }\n }\n\n & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n }\n\n [data-gutter] {\n & [data-separator="line-info"] [data-separator-wrapper] {\n padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n }\n\n & [data-separator="line-info"] [data-separator-content] {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n & [data-separator="line-info"][data-expand-index] [data-separator-content] {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n }\n\n [data-additions] {\n & [data-content] [data-separator="line-info"] {\n background-color: var(--diffs-bg);\n\n & [data-separator-wrapper] {\n display: none;\n }\n }\n\n & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {\n background-color: var(--diffs-bg-separator);\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n height: 100%;\n display: block;\n\n & [data-separator-content], & [data-expand-button] {\n display: none;\n }\n }\n }\n\n [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {\n width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));\n }\n\n [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {\n background-color: var(--diffs-bg-separator);\n height: 100%;\n margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n display: block;\n\n & [data-separator-content], & [data-expand-button] {\n display: none;\n }\n }\n\n [data-separator="line-info"] [data-separator-wrapper] {\n & [data-expand-both], & [data-expand-down], & [data-expand-up] {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n }\n\n @media (pointer: fine) {\n [data-separator="line-info"] [data-separator-wrapper] {\n &[data-separator-multi-button] {\n & [data-expand-up] {\n border-top-left-radius: 6px;\n border-bottom-left-radius: unset;\n }\n\n & [data-expand-down] {\n border-bottom-left-radius: 6px;\n border-top-left-radius: unset;\n }\n }\n }\n }\n }\n\n @media (pointer: coarse) {\n [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {\n grid-template-columns: 34px 34px auto;\n\n & [data-separator-content] {\n grid-column: unset;\n grid-row: unset;\n }\n }\n\n @supports (width: 1cqi) {\n [data-separator="line-info"] [data-separator-wrapper] {\n & [data-expand-both], & [data-expand-down], & [data-expand-up] {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &[data-separator-multi-button] {\n & [data-expand-up] {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n & [data-expand-down] {\n border-bottom-left-radius: unset;\n border-top-left-radius: unset;\n }\n }\n }\n }\n }\n\n @media (pointer: fine) {\n [data-separator-wrapper][data-separator-multi-button] {\n grid-template-rows: 50% 50%;\n display: grid;\n\n & [data-separator-content] {\n grid-area: 1 / 2 / -1;\n min-width: min-content;\n }\n\n & [data-expand-button] {\n grid-column: 1;\n }\n }\n\n [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {\n grid-template-columns: 34px auto;\n }\n\n [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {\n grid-template-columns: 100% auto;\n }\n\n [data-separator="line-info"], [data-separator="line-info-basic"] {\n & [data-separator-multi-button] {\n & [data-expand-up] {\n border-bottom: 1px solid var(--diffs-bg);\n border-right: 2px solid var(--diffs-bg);\n }\n\n & [data-expand-down] {\n border-top: 1px solid var(--diffs-bg);\n border-right: 2px solid var(--diffs-bg);\n }\n }\n }\n }\n\n [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {\n display: none;\n }\n\n [data-line-annotation] {\n min-height: var(--diffs-annotation-min-height, 0);\n z-index: 2;\n }\n\n [data-merge-conflict-actions] {\n z-index: 2;\n }\n\n [data-separator="custom"] {\n grid-template-columns: subgrid;\n display: grid;\n }\n\n [data-line], [data-column-number], [data-no-newline] {\n padding-inline: 1ch;\n position: relative;\n }\n\n [data-indicators="classic"] [data-line] {\n padding-inline-start: 2ch;\n }\n\n [data-indicators="classic"] {\n & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {\n &[data-no-newline], &[data-line] {\n &:before {\n user-select: none;\n width: 1ch;\n height: 1lh;\n display: inline-block;\n position: absolute;\n top: 0;\n left: 0;\n }\n }\n }\n\n & [data-line-type="change-addition"] {\n &[data-line], &[data-no-newline] {\n &:before {\n content: "+";\n color: var(--diffs-addition-base);\n }\n }\n }\n\n & [data-line-type="change-deletion"] {\n &[data-line], &[data-no-newline] {\n &:before {\n content: "-";\n color: var(--diffs-deletion-base);\n }\n }\n }\n }\n\n [data-indicators="bars"] {\n & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {\n &[data-column-number] {\n &:before {\n content: "";\n user-select: none;\n contain: strict;\n width: 4px;\n height: 100%;\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n }\n }\n }\n\n & [data-line-type="change-deletion"] {\n &[data-column-number] {\n &:before {\n background-image: linear-gradient(0deg,\n var(--diffs-bg-deletion) 50%,\n var(--diffs-deletion-base) 50%);\n background-repeat: repeat;\n background-size: 2px 2px;\n background-size: calc(1lh / round(1lh / 2px))\n calc(1lh / round(1lh / 2px));\n }\n }\n }\n\n & [data-line-type="change-addition"] {\n &[data-column-number] {\n &:before {\n background-color: var(--diffs-addition-base);\n }\n }\n }\n }\n\n [data-overflow="wrap"] {\n & [data-line], & [data-annotation-content] {\n white-space: pre-wrap;\n word-break: break-word;\n }\n }\n\n [data-overflow="scroll"] [data-line] {\n white-space: pre;\n min-height: 1lh;\n }\n\n [data-column-number] {\n box-sizing: content-box;\n text-align: right;\n user-select: none;\n color: var(--diffs-fg-number);\n padding-left: 2ch;\n }\n\n [data-line-number-content] {\n min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));\n z-index: 1;\n display: inline-block;\n position: relative;\n }\n\n [data-disable-line-numbers] {\n & [data-gutter-buffer], & [data-column-number] {\n min-width: 4px;\n padding: 0;\n\n &:before {\n min-width: 0;\n }\n }\n\n & [data-line-number-content] {\n display: none;\n }\n\n & [data-gutter-utility-slot] {\n right: unset;\n justify-content: flex-start;\n left: 0;\n }\n\n &[data-indicators="bars"] [data-gutter-utility-slot] {\n left: 6px;\n }\n }\n\n [data-file][data-disable-line-numbers] {\n & [data-gutter-buffer], & [data-column-number] {\n border-right: 0;\n min-width: 0;\n }\n }\n\n [data-diff-span] {\n box-decoration-break: clone;\n border-radius: 3px;\n }\n\n [data-line-type="change-addition"] [data-diff-span] {\n background-color: var(--diffs-bg-addition-emphasis);\n }\n\n [data-line-type="change-deletion"] [data-diff-span] {\n background-color: var(--diffs-bg-deletion-emphasis);\n }\n\n [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {\n color: var(--diffs-fg);\n padding-left: 1ch;\n }\n\n [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {\n align-items: center;\n display: flex;\n\n &:after {\n color: var(--diffs-fg-conflict-marker);\n font-size: .75rem;\n font-style: normal;\n line-height: 1.25rem;\n font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n padding-left: 1ch;\n }\n }\n\n [data-merge-conflict="marker-start"]:after {\n content: "(Current Change)";\n }\n\n [data-merge-conflict="marker-end"]:after {\n content: "(Incoming Change)";\n }\n\n [data-merge-conflict-actions-content] {\n min-height: 1.75rem;\n font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n color: var(--diffs-fg);\n align-items: center;\n gap: .25rem;\n padding-inline: .5rem;\n font-size: .75rem;\n line-height: 1.2;\n display: flex;\n }\n\n [data-merge-conflict-action] {\n appearance: none;\n color: var(--diffs-fg-number);\n font: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n padding: 0;\n font-style: normal;\n }\n\n [data-merge-conflict-action]:hover {\n color: var(--diffs-fg);\n }\n\n [data-merge-conflict-action="current"]:hover {\n color: var(--diffs-addition-base);\n }\n\n [data-merge-conflict-action="incoming"]:hover {\n color: var(--diffs-modified-base);\n }\n\n [data-merge-conflict-action-separator] {\n color: var(--diffs-fg-number);\n opacity: .6;\n user-select: none;\n }\n\n [data-diffs-header="default"] {\n background-color: var(--diffs-bg);\n justify-content: space-between;\n align-items: center;\n gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));\n z-index: 2;\n flex-direction: row;\n padding-inline: 16px;\n display: flex;\n position: relative;\n top: 0;\n }\n\n [data-header-content] {\n align-items: center;\n gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n white-space: nowrap;\n flex-direction: row;\n min-width: 0;\n display: flex;\n }\n\n [data-header-content] [data-prev-name], [data-header-content] [data-title] {\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n min-width: 0;\n overflow: hidden;\n }\n\n [data-prev-name] {\n opacity: .7;\n }\n\n [data-rename-icon] {\n fill: currentColor;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n [data-diffs-header="default"] [data-metadata] {\n white-space: nowrap;\n align-items: center;\n gap: 1ch;\n display: flex;\n }\n\n [data-diffs-header="default"] [data-additions-count] {\n font-family: var(--diffs-font-family, var(--diffs-font-fallback));\n color: var(--diffs-addition-base);\n }\n\n [data-diffs-header="default"] [data-deletions-count] {\n font-family: var(--diffs-font-family, var(--diffs-font-fallback));\n color: var(--diffs-deletion-base);\n }\n\n [data-change-icon] {\n fill: currentColor;\n flex-shrink: 0;\n }\n\n [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {\n color: var(--diffs-modified-base);\n }\n\n [data-change-icon="new"] {\n color: var(--diffs-addition-base);\n }\n\n [data-change-icon="deleted"] {\n color: var(--diffs-deletion-base);\n }\n\n [data-change-icon="file"] {\n opacity: .6;\n }\n\n [data-annotation-content] {\n z-index: 2;\n isolation: isolate;\n align-self: flex-start;\n min-width: 0;\n display: flow-root;\n position: relative;\n }\n\n [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {\n width: var(--diffs-column-content-width, auto);\n left: var(--diffs-column-number-width, 0);\n position: sticky;\n }\n\n [data-annotation-slot] {\n text-wrap-mode: wrap;\n word-break: normal;\n white-space-collapse: collapse;\n }\n\n [data-gutter-utility-slot] {\n touch-action: none;\n justify-content: flex-end;\n display: flex;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n }\n\n [data-utility-button] {\n appearance: none;\n cursor: pointer;\n width: 1lh;\n height: 1lh;\n font-size: var(--diffs-font-size, 13px);\n line-height: var(--diffs-line-height, 20px);\n background-color: var(--diffs-modified-base);\n color: var(--diffs-bg);\n fill: currentColor;\n z-index: 4;\n touch-action: none;\n border: none;\n border-radius: 4px;\n justify-content: center;\n align-items: center;\n margin-right: calc(-1lh + 1ch);\n padding: 0;\n display: flex;\n position: relative;\n\n &:before {\n content: "";\n display: block;\n position: absolute;\n inset: 0 0 0 -4px;\n }\n }\n\n [data-decoration-bar-stack] {\n pointer-events: none;\n isolation: isolate;\n z-index: 1;\n background-color: var(--diffs-decoration-bar-color, transparent);\n box-sizing: content-box;\n border-left: 2px solid var(--diffs-bg);\n border-right: 2px solid var(--diffs-bg);\n width: 6px;\n position: absolute;\n top: 0;\n bottom: 0;\n right: -2px;\n\n [data-decoration-bar-depth="1"] & {\n background-color: color-mix(in lab,\n var(--diffs-bg) 20%,\n var(--diffs-decoration-bar-color, transparent));\n }\n\n [data-decoration-bar-depth="2"] & {\n background-color: color-mix(in lab,\n var(--diffs-bg) 45%,\n var(--diffs-decoration-bar-color, transparent));\n }\n\n [data-decoration-bar-depth="3"] & {\n background-color: color-mix(in lab,\n var(--diffs-bg) 65%,\n var(--diffs-decoration-bar-color, transparent));\n }\n\n [data-decoration-bar-start] & {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n }\n\n [data-decoration-bar-end] & {\n z-index: 3;\n border-bottom-right-radius: 5px;\n border-bottom-left-radius: 5px;\n }\n }\n\n [data-placeholder] {\n contain: strict;\n }\n\n [data-error-wrapper] {\n padding: var(--diffs-gap-block, var(--diffs-gap-fallback))\n var(--diffs-gap-inline, var(--diffs-gap-fallback));\n scrollbar-width: none;\n max-height: 400px;\n overflow: auto;\n\n & [data-error-message] {\n color: var(--diffs-deletion-base);\n font-size: 18px;\n font-weight: bold;\n }\n\n & [data-error-stack] {\n color: var(--diffs-fg-number);\n }\n }\n}\n\n@layer theme, rendered, unsafe;\n'),t.adoptedStyleSheets=[e]}connectedCallback(){a_(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(rc,t)}class aP{diff(e,t,n={}){let i;"function"==typeof n?(i=n,n={}):"callback"in n&&(i=n.callback);let r=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(r,n)),s=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,s,n,i)}diffWithOptionsObj(e,t,n,i){var r;let o=e=>(e=this.postProcess(e,n),i)?void setTimeout(function(){i(e)},0):e,a=t.length,s=e.length,l=1,d=a+s;null!=n.maxEditLength&&(d=Math.min(d,n.maxEditLength));let u=null!=(r=n.timeout)?r:1/0,c=Date.now()+u,h=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(h[0],t,e,0,n);if(h[0].oldPos+1>=s&&f+1>=a)return o(this.buildValues(h[0].lastComponent,t,e));let p=-1/0,m=1/0,g=()=>{for(let i=Math.max(p,-l);i<=Math.min(m,l);i+=2){let r,l=h[i-1],d=h[i+1];l&&(h[i-1]=void 0);let u=!1;if(d){let e=d.oldPos-i;u=d&&0<=e&&e<a}let c=l&&l.oldPos+1<s;if(!u&&!c){h[i]=void 0;continue}if(r=!c||u&&l.oldPos<d.oldPos?this.addToPath(d,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),f=this.extractCommon(r,t,e,i,n),r.oldPos+1>=s&&f+1>=a)return o(this.buildValues(r.lastComponent,t,e))||!0;h[i]=r,r.oldPos+1>=s&&(m=Math.min(m,i-1)),f+1>=a&&(p=Math.max(p,i+1))}l++};if(i)!function e(){setTimeout(function(){if(l>d||Date.now()>c)return i(void 0);g()||e()},0)}();else for(;l<=d&&Date.now()<=c;){let e=g();if(e)return e}}addToPath(e,t,n,i,r){let o=e.lastComponent;return o&&!r.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+i,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,i,r){let o=t.length,a=n.length,s=e.oldPos,l=s-i,d=0;for(;l+1<o&&s+1<a&&this.equals(n[s+1],t[l+1],r);)l++,s++,d++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return d&&!r.oneChangePerToken&&(e.lastComponent={count:d,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let i,r=[];for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let o=r.length,a=0,s=0,l=0;for(;a<o;a++){let e=r[a];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let i=t.slice(s,s+e.count);i=i.map(function(e,t){let i=n[l+t];return i.length>e.length?i:e}),e.value=this.join(i)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return r}}let aI=new class extends aP{constructor(){super(...arguments),this.tokenize=aD}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes("\n")||(e=e.trim()),n.newlineIsToken&&t.includes("\n")||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith("\n")&&(e=e.slice(0,-1)),t.endsWith("\n")&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function aD(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));let n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let e=0;e<i.length;e++){let r=i[e];e%2&&!t.newlineIsToken?n[n.length-1]+=r:n.push(r)}return n}function a$(e){if(!function(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||'"'===e[t]||"\\"===e[t])return!0;return!1}(e))return e;let t='"',n=new TextEncoder().encode(e),i=0;for(;i<n.length;){let e=n[i];7===e?t+="\\a":8===e?t+="\\b":9===e?t+="\\t":10===e?t+="\\n":11===e?t+="\\v":12===e?t+="\\f":13===e?t+="\\r":34===e?t+='\\"':92===e?t+="\\\\":e>=32&&e<=126?t+=String.fromCharCode(e):t+="\\"+e.toString(8).padStart(3,"0"),i++}return t+'"'}let aO={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function aj(e,t,n,i,r,o,a){var s;let l;void 0===(l=a?"function"==typeof a?{callback:a}:a:{}).context&&(l.context=4);let d=l.context;if(l.newlineIsToken)throw Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(!l.callback)return u(aI.diff(n,i,l));{let{callback:e}=l;s=Object.assign(Object.assign({},l),{callback:t=>{e(u(t))}}),aI.diff(n,i,s)}function u(n){if(!n)return;function i(e){return e.map(function(e){return" "+e})}n.push({value:"",lines:[]});let a=[],s=0,l=0,u=[],c=1,h=1;for(let e=0;e<n.length;e++){let t=n[e],r=t.lines||function(e){let t=e.endsWith("\n"),n=e.split("\n").map(e=>e+"\n");return t?n.pop():n.push(n.pop().slice(0,-1)),n}(t.value);if(t.lines=r,t.added||t.removed){if(!s){let t=n[e-1];s=c,l=h,t&&(s-=(u=d>0?i(t.lines.slice(-d)):[]).length,l-=u.length)}for(let e of r)u.push((t.added?"+":"-")+e);t.added?h+=r.length:c+=r.length}else{if(s)if(r.length<=2*d&&e<n.length-2)for(let e of i(r))u.push(e);else{let e=Math.min(r.length,d);for(let t of i(r.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:c-s+e,newStart:l,newLines:h-l+e,lines:u};a.push(t),s=0,l=0,u=[]}c+=r.length,h+=r.length}}for(let e of a)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith("\n")?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,"\"),t++);return{oldFileName:e,newFileName:t,oldHeader:r,newHeader:o,hunks:a}}}function az(e,t){var n,i,r,o,a,s;if(t||(t=aO),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(e=>az(e,t)).join("\n")}let l=[];if(e.isGit){if(t=aO,!e.oldFileName)throw Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw Error("newFileName must be specified for Git patches");let d=e.oldFileName,u=e.newFileName;e.isCreate&&"/dev/null"===d?d=u.replace(/^b\//,"a/"):e.isDelete&&"/dev/null"===u&&(u=d.replace(/^a\//,"b/")),l.push("diff --git "+a$(d)+" "+a$(u)),e.isDelete&&l.push("deleted file mode "+(null!=(n=e.oldMode)?n:"100644")),e.isCreate&&l.push("new file mode "+(null!=(i=e.newMode)?i:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(l.push("old mode "+e.oldMode),l.push("new mode "+e.newMode)),e.isRename&&(l.push("rename from "+a$((null!=(r=e.oldFileName)?r:"").replace(/^a\//,""))),l.push("rename to "+a$((null!=(o=e.newFileName)?o:"").replace(/^b\//,"")))),e.isCopy&&(l.push("copy from "+a$((null!=(a=e.oldFileName)?a:"").replace(/^a\//,""))),l.push("copy to "+a$((null!=(s=e.newFileName)?s:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&void 0!==e.oldFileName&&l.push("Index: "+e.oldFileName),t.includeUnderline&&l.push("===================================================================");let d=e.hunks.length>0;t.includeFileHeaders&&void 0!==e.oldFileName&&void 0!==e.newFileName&&(!e.isGit||d)&&(l.push("--- "+a$(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),l.push("+++ "+a$(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t],i=0===n.oldLines?n.oldStart-1:n.oldStart,r=0===n.newLines?n.newStart-1:n.newStart;for(let e of(l.push("@@ -"+i+","+n.oldLines+" +"+r+","+n.newLines+" @@"),n.lines))l.push(e)}return l.join("\n")+"\n"}function aB(e,t,n,i=!1){let r=function(e,t){try{return rI(e,t)}finally{rM()}}(function(e,t,n,i,r,o,a){if("function"==typeof a&&(a={callback:a}),null==a?void 0:a.callback){let{callback:s}=a;aj(e,t,n,i,r,o,Object.assign(Object.assign({},a),{callback:e=>{e?s(az(e,a.headerOptions)):s(void 0)}}))}else{let s=aj(e,t,n,i,r,o,a);if(!s)return;return az(s,null==a?void 0:a.headerOptions)}}(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(null!=e.cacheKey&&null!=t.cacheKey)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:i});if(null==r)throw Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return null!=t.lang&&(r.lang=t.lang),r}var aH=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(null==t||null==n)for(let i of e.children??[])i instanceof HTMLElement&&("deletions"in i.dataset?t=i:"additions"in i.dataset&&(n=i));null==n||null==t?this.cleanUp():(this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0)}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};let aU=new Map,aF={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function aG(e){if(aU.has(e))return aU.get(e)??"text";if(null!=aF[e])return aF[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(null!=t){if(aU.has(t[1]))return aU.get(t[1])??"text";if(null!=aF[t[1]])return aF[t[1]]??"text"}let n=e.match(/\.([^.]+)$/)?.[1]??"";return aU.has(n)?aU.get(n)??"text":aF[n]??"text"}function aW(e){let t=e.lang??aG(e.name),n=e.lang??(null!=e.prevName?aG(e.prevName):"text");return"text"===t&&"text"===n}function aq(e){let t=e[0];return null!=t&&t.length>0?t:void 0}function aV(e){return 0===e.startingLine&&e.totalLines>0}let aX=new Map,aK=new Map,aY=new Map,aJ=new Set;function aQ(e){for(let t of Array.isArray(e)?e:[e])if("text"!==t&&"ansi"!==t&&!aJ.has(t))return!1;return!0}function aZ(e,t){for(let n of e=Array.isArray(e)?e:[e]){if(aJ.has(n.name))continue;let e=aX.get(n.name);null==e&&(e=n,aX.set(n.name,e)),aJ.add(e.name),t.loadLanguageSync(e.data)}}function a0(){return"u">typeof WorkerGlobalScope&&"u">typeof self&&self instanceof WorkerGlobalScope}let a1=[{id:"abap",name:"ABAP",import:()=>e.A(61420)},{id:"actionscript-3",name:"ActionScript",import:()=>e.A(6262)},{id:"ada",name:"Ada",import:()=>e.A(44322)},{id:"angular-html",name:"Angular HTML",import:()=>e.A(64225)},{id:"angular-ts",name:"Angular TypeScript",import:()=>e.A(39975)},{id:"apache",name:"Apache Conf",import:()=>e.A(72320)},{id:"apex",name:"Apex",import:()=>e.A(68462)},{id:"apl",name:"APL",import:()=>e.A(47665)},{id:"applescript",name:"AppleScript",import:()=>e.A(79086)},{id:"ara",name:"Ara",import:()=>e.A(6200)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>e.A(16773)},{id:"asm",name:"Assembly",import:()=>e.A(21842)},{id:"astro",name:"Astro",import:()=>e.A(87789)},{id:"awk",name:"AWK",import:()=>e.A(20985)},{id:"ballerina",name:"Ballerina",import:()=>e.A(69963)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>e.A(84021)},{id:"beancount",name:"Beancount",import:()=>e.A(33963)},{id:"berry",name:"Berry",aliases:["be"],import:()=>e.A(66469)},{id:"bibtex",name:"BibTeX",import:()=>e.A(29994)},{id:"bicep",name:"Bicep",import:()=>e.A(48815)},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>e.A(78598)},{id:"blade",name:"Blade",import:()=>e.A(34449)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>e.A(6203)},{id:"c",name:"C",import:()=>e.A(64026)},{id:"c3",name:"C3",import:()=>e.A(83941)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>e.A(42182)},{id:"cairo",name:"Cairo",import:()=>e.A(93577)},{id:"clarity",name:"Clarity",import:()=>e.A(6296)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>e.A(73095)},{id:"cmake",name:"CMake",import:()=>e.A(69367)},{id:"cobol",name:"COBOL",import:()=>e.A(69228)},{id:"codeowners",name:"CODEOWNERS",import:()=>e.A(68782)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>e.A(12745)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>e.A(51582)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>e.A(39472)},{id:"coq",name:"Coq",import:()=>e.A(12684)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>e.A(57390)},{id:"crystal",name:"Crystal",import:()=>e.A(81463)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>e.A(26694)},{id:"css",name:"CSS",import:()=>e.A(52377)},{id:"csv",name:"CSV",import:()=>e.A(60900)},{id:"cue",name:"CUE",import:()=>e.A(97847)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>e.A(68607)},{id:"d",name:"D",import:()=>e.A(78233)},{id:"dart",name:"Dart",import:()=>e.A(71374)},{id:"dax",name:"DAX",import:()=>e.A(28172)},{id:"desktop",name:"Desktop",import:()=>e.A(27667)},{id:"diff",name:"Diff",import:()=>e.A(27780)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>e.A(52196)},{id:"dotenv",name:"dotEnv",import:()=>e.A(93152)},{id:"dream-maker",name:"Dream Maker",import:()=>e.A(68864)},{id:"edge",name:"Edge",import:()=>e.A(61702)},{id:"elixir",name:"Elixir",import:()=>e.A(99810)},{id:"elm",name:"Elm",import:()=>e.A(16375)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>e.A(79289)},{id:"erb",name:"ERB",import:()=>e.A(15795)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>e.A(73265)},{id:"fennel",name:"Fennel",import:()=>e.A(12784)},{id:"fish",name:"Fish",import:()=>e.A(19634)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>e.A(66928)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>e.A(49520)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>e.A(57150)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>e.A(82243)},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>e.A(85822)},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>e.A(78668)},{id:"gdshader",name:"GDShader",import:()=>e.A(878)},{id:"genie",name:"Genie",import:()=>e.A(68155)},{id:"gherkin",name:"Gherkin",import:()=>e.A(9887)},{id:"git-commit",name:"Git Commit Message",import:()=>e.A(44376)},{id:"git-rebase",name:"Git Rebase Message",import:()=>e.A(19057)},{id:"gleam",name:"Gleam",import:()=>e.A(9831)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>e.A(14448)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>e.A(535)},{id:"glsl",name:"GLSL",import:()=>e.A(55978)},{id:"gn",name:"GN",import:()=>e.A(40004)},{id:"gnuplot",name:"Gnuplot",import:()=>e.A(90403)},{id:"go",name:"Go",import:()=>e.A(63101)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>e.A(9909)},{id:"groovy",name:"Groovy",import:()=>e.A(26344)},{id:"hack",name:"Hack",import:()=>e.A(72262)},{id:"haml",name:"Ruby Haml",import:()=>e.A(46678)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>e.A(13071)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>e.A(19538)},{id:"haxe",name:"Haxe",import:()=>e.A(20292)},{id:"hcl",name:"HashiCorp HCL",import:()=>e.A(43456)},{id:"hjson",name:"Hjson",import:()=>e.A(18090)},{id:"hlsl",name:"HLSL",import:()=>e.A(57814)},{id:"html",name:"HTML",import:()=>e.A(25835)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>e.A(68382)},{id:"http",name:"HTTP",import:()=>e.A(84320)},{id:"hurl",name:"Hurl",import:()=>e.A(12371)},{id:"hxml",name:"HXML",import:()=>e.A(74213)},{id:"hy",name:"Hy",import:()=>e.A(99332)},{id:"imba",name:"Imba",import:()=>e.A(45985)},{id:"ini",name:"INI",aliases:["properties"],import:()=>e.A(31263)},{id:"java",name:"Java",import:()=>e.A(42936)},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>e.A(19796)},{id:"jinja",name:"Jinja",import:()=>e.A(66241)},{id:"jison",name:"Jison",import:()=>e.A(56447)},{id:"json",name:"JSON",import:()=>e.A(35638)},{id:"json5",name:"JSON5",import:()=>e.A(89330)},{id:"jsonc",name:"JSON with Comments",import:()=>e.A(53068)},{id:"jsonl",name:"JSON Lines",import:()=>e.A(23619)},{id:"jsonnet",name:"Jsonnet",import:()=>e.A(26807)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>e.A(59115)},{id:"jsx",name:"JSX",import:()=>e.A(65970)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>e.A(56654)},{id:"just",name:"Just",import:()=>e.A(62413)},{id:"kdl",name:"KDL",import:()=>e.A(46277)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>e.A(16681)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>e.A(16447)},{id:"latex",name:"LaTeX",import:()=>e.A(91191)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>e.A(80784)},{id:"less",name:"Less",import:()=>e.A(4131)},{id:"liquid",name:"Liquid",import:()=>e.A(4827)},{id:"llvm",name:"LLVM IR",import:()=>e.A(64542)},{id:"log",name:"Log file",import:()=>e.A(51807)},{id:"logo",name:"Logo",import:()=>e.A(43058)},{id:"lua",name:"Lua",import:()=>e.A(66143)},{id:"luau",name:"Luau",import:()=>e.A(63588)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>e.A(98121)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>e.A(59960)},{id:"marko",name:"Marko",import:()=>e.A(1429)},{id:"matlab",name:"MATLAB",import:()=>e.A(50902)},{id:"mdc",name:"MDC",import:()=>e.A(92722)},{id:"mdx",name:"MDX",import:()=>e.A(15259)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>e.A(19120)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>e.A(20279)},{id:"mojo",name:"Mojo",import:()=>e.A(56102)},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>e.A(21492)},{id:"move",name:"Move",import:()=>e.A(16703)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>e.A(5732)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>e.A(71303)},{id:"nextflow-groovy",name:"Nextflow Groovy",import:()=>e.A(65966)},{id:"nginx",name:"Nginx",import:()=>e.A(26156)},{id:"nim",name:"Nim",import:()=>e.A(30063)},{id:"nix",name:"Nix",import:()=>e.A(49040)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>e.A(62626)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>e.A(96991)},{id:"objective-cpp",name:"Objective-C++",import:()=>e.A(30751)},{id:"ocaml",name:"OCaml",import:()=>e.A(60109)},{id:"odin",name:"Odin",import:()=>e.A(41409)},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>e.A(47008)},{id:"pascal",name:"Pascal",import:()=>e.A(46)},{id:"perl",name:"Perl",import:()=>e.A(63034)},{id:"php",name:"PHP",import:()=>e.A(8614)},{id:"pkl",name:"Pkl",import:()=>e.A(46199)},{id:"plsql",name:"PL/SQL",import:()=>e.A(40127)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>e.A(7567)},{id:"polar",name:"Polar",import:()=>e.A(43151)},{id:"postcss",name:"PostCSS",import:()=>e.A(8156)},{id:"powerquery",name:"PowerQuery",import:()=>e.A(93127)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>e.A(26309)},{id:"prisma",name:"Prisma",import:()=>e.A(82692)},{id:"prolog",name:"Prolog",import:()=>e.A(87548)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>e.A(45300)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>e.A(43454)},{id:"puppet",name:"Puppet",import:()=>e.A(38783)},{id:"purescript",name:"PureScript",import:()=>e.A(8208)},{id:"python",name:"Python",aliases:["py"],import:()=>e.A(13432)},{id:"qml",name:"QML",import:()=>e.A(40752)},{id:"qmldir",name:"QML Directory",import:()=>e.A(33515)},{id:"qss",name:"Qt Style Sheets",import:()=>e.A(72773)},{id:"r",name:"R",import:()=>e.A(47634)},{id:"racket",name:"Racket",import:()=>e.A(14483)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>e.A(83828)},{id:"razor",name:"ASP.NET Razor",import:()=>e.A(77483)},{id:"reg",name:"Windows Registry Script",import:()=>e.A(95464)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>e.A(99747)},{id:"rel",name:"Rel",import:()=>e.A(14781)},{id:"riscv",name:"RISC-V",import:()=>e.A(72595)},{id:"ron",name:"RON",import:()=>e.A(35130)},{id:"rosmsg",name:"ROS Interface",import:()=>e.A(62607)},{id:"rst",name:"reStructuredText",import:()=>e.A(79287)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>e.A(94877)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>e.A(38691)},{id:"sas",name:"SAS",import:()=>e.A(90226)},{id:"sass",name:"Sass",import:()=>e.A(6115)},{id:"scala",name:"Scala",import:()=>e.A(37755)},{id:"scheme",name:"Scheme",import:()=>e.A(24147)},{id:"scss",name:"SCSS",import:()=>e.A(83808)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>e.A(99013)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>e.A(84171)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>e.A(55628)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>e.A(76033)},{id:"smalltalk",name:"Smalltalk",import:()=>e.A(49389)},{id:"solidity",name:"Solidity",import:()=>e.A(18430)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>e.A(36211)},{id:"sparql",name:"SPARQL",import:()=>e.A(2237)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>e.A(94130)},{id:"sql",name:"SQL",import:()=>e.A(11243)},{id:"ssh-config",name:"SSH Config",import:()=>e.A(47123)},{id:"stata",name:"Stata",import:()=>e.A(73999)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>e.A(23160)},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>e.A(44793)},{id:"svelte",name:"Svelte",import:()=>e.A(25822)},{id:"swift",name:"Swift",import:()=>e.A(24931)},{id:"system-verilog",name:"SystemVerilog",import:()=>e.A(17011)},{id:"systemd",name:"Systemd Units",import:()=>e.A(72493)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>e.A(7211)},{id:"tasl",name:"Tasl",import:()=>e.A(60111)},{id:"tcl",name:"Tcl",import:()=>e.A(9649)},{id:"templ",name:"Templ",import:()=>e.A(53559)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>e.A(17658)},{id:"tex",name:"TeX",import:()=>e.A(78096)},{id:"toml",name:"TOML",import:()=>e.A(24559)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>e.A(8073)},{id:"tsv",name:"TSV",import:()=>e.A(53501)},{id:"tsx",name:"TSX",import:()=>e.A(60148)},{id:"turtle",name:"Turtle",import:()=>e.A(4174)},{id:"twig",name:"Twig",import:()=>e.A(78939)},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>e.A(91323)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>e.A(51941)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>e.A(71342)},{id:"v",name:"V",import:()=>e.A(69288)},{id:"vala",name:"Vala",import:()=>e.A(12590)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>e.A(83762)},{id:"verilog",name:"Verilog",import:()=>e.A(61622)},{id:"vhdl",name:"VHDL",import:()=>e.A(88665)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>e.A(87953)},{id:"vue",name:"Vue",import:()=>e.A(66122)},{id:"vue-html",name:"Vue HTML",import:()=>e.A(26326)},{id:"vue-vine",name:"Vue Vine",import:()=>e.A(82534)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>e.A(1359)},{id:"wasm",name:"WebAssembly",import:()=>e.A(23509)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>e.A(90551)},{id:"wgsl",name:"WGSL",import:()=>e.A(45999)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>e.A(84258)},{id:"wit",name:"WebAssembly Interface Types",import:()=>e.A(72203)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>e.A(40617)},{id:"xml",name:"XML",import:()=>e.A(9255)},{id:"xsl",name:"XSL",import:()=>e.A(73366)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>e.A(61150)},{id:"zenscript",name:"ZenScript",import:()=>e.A(21004)},{id:"zig",name:"Zig",import:()=>e.A(83740)}],a2=Object.fromEntries(a1.map(e=>[e.id,e.import])),a8=Object.fromEntries(a1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),a5={...a2,...a8};async function a6(e){if(a0())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=aK.get(e);if(null!=t)return t;try{let t=aY.get(e);if(null==t&&Object.prototype.hasOwnProperty.call(a5,e)&&(t=a5[e]),null==t)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return aX.has(e)||aX.set(e,n),n});return aK.set(e,n),await n}finally{aK.delete(e)}}function a3(e){return aX.get(e)??a6(e)}function a4(e){return null!==e&&"object"==typeof e&&"default"in e?e.default:e}var a7=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},a9=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},se=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};let st=function(){let e=new Map,t=new Map,n=new Map,i=0;function r(r){let o=t.get(r);if(void 0!==o)return Promise.resolve(o);let a=n.get(r);if(void 0!==a)return a;let s=e.get(r);if(void 0===s)return Promise.reject(new a9(r));let l=i,d=s().then(e=>{let o=a4(e);return l===i&&t.set(r,o),n.get(r)===d&&n.delete(r),o}).catch(e=>{throw n.get(r)===d&&n.delete(r),e});return n.set(r,d),d}function o(e,n){t.set(e,n)}return{clearResolvedThemes:function(){i++,t.clear(),n.clear()},getResolvedOrResolveTheme:function(e){let n=t.get(e);return void 0!==n?n:r(e)},getResolvedTheme:function(e){return t.get(e)},getResolvedThemes:function(e){let n=[];for(let i of e){let e=t.get(i);if(void 0===e)throw new se(i);n.push(e)}return n},hasRegisteredTheme:function(t){return e.has(t)},hasResolvedTheme:function(e){return t.has(e)},hasResolvedThemes:function(e){for(let n of e)if(!t.has(n))return!1;return!0},registerTheme:function(t,n){if(e.has(t))throw new a7(t);e.set(t,n)},registerThemeIfAbsent:function(t,n){return!e.has(t)&&(e.set(t,n),!0)},resolveTheme:r,resolveThemes:function(e){return Promise.all(e.map(e=>r(e)))},seedResolvedTheme:o,seedResolvedThemes:function(e){for(let[t,n]of e)o(t,n)}}}(),sn=new Set;function si(e,t){for(let n of e=Array.isArray(e)?e:[e]){let e;if("string"==typeof n){if(null==(e=st.getResolvedTheme(n)))throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,null==st.getResolvedTheme(n)&&st.seedResolvedTheme(n,e);sn.has(n)||(sn.add(n),t.loadThemeSync(e))}}function sr(e){var t,n,i;let r=[],o=new Set;for(let a of so(n=t=e.themes)||"string"==typeof(i=n).name&&"function"==typeof i.load?[t]:t)for(let e of so(a)?a.getThemes():[a]){if(o.has(e.name))throw Error(`Theme collection already contains theme "${e.name}"`);o.add(e.name),r.push(e)}let a=Object.freeze([...r]),s=Object.freeze(a.filter(e=>"light"===e.colorScheme)),l=Object.freeze(a.filter(e=>"dark"===e.colorScheme)),d=new Map(a.map(e=>[e.name,e])),u=Object.freeze(a.map(e=>e.name)),c=Object.freeze(s.map(e=>e.name)),h=Object.freeze(l.map(e=>e.name));function f(e){if(null==e)return a;let{colorScheme:t,collection:n}=e;return null==n?"light"===t?s:"dark"===t?l:a:a.filter(e=>e.collection===n&&(null==t||e.colorScheme===t))}return{getTheme:e=>d.get(e),getThemes:e=>f(e),getThemeNames:e=>e?.collection==null?e?.colorScheme==="light"?c:e?.colorScheme==="dark"?h:u:f(e).map(e=>e.name),hasTheme:e=>d.has(e),orderBy:e=>sr({themes:a.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let i=e(t.descriptor,n.descriptor);return 0!==i?i:t.index-n.index}).map(e=>e.descriptor)}),pick(e){let t=[],n=new Set;for(let i of e){if(n.has(i))throw Error(`Theme collection pick already includes theme "${i}"`);n.add(i);let e=d.get(i);if(null==e)throw Error(`Theme collection does not contain theme "${i}"`);t.push(e)}return sr({themes:t})},registerInto(e){for(let t of a)e.registerThemeIfAbsent(t.name,t.load)}}}function so(e){return"function"==typeof e.getThemes}var sa=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function ss(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var sl=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,sd=class{static hasCaptures(e){return null!==e&&(sl.lastIndex=0,sl.test(e))}static replaceCaptures(e,t,n){return e.replace(sl,(e,i,r,o)=>{let a=n[parseInt(i||r,10)];if(!a)return e;{let e=t.substring(a.start,a.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function su(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let i=0;i<n;i++){var r,o;let n=(r=e[i],r<(o=t[i])?-1:+(r>o));if(0!==n)return n}return 0}return n-i}function sc(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function sh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var sf=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},sp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let e=0,r=t.length;e<r;e++){let r,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;r=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else r=Array.isArray(o.scope)?o.scope:[""];let a=-1;if("string"==typeof o.settings.fontStyle){a=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":a|=1;break;case"bold":a|=2;break;case"underline":a|=4;break;case"strikethrough":a|=8}}let s=null;"string"==typeof o.settings.foreground&&sc(o.settings.foreground)&&(s=o.settings.foreground);let l=null;"string"==typeof o.settings.background&&sc(o.settings.background)&&(l=o.settings.background);for(let t=0,o=r.length;t<o;t++){let o=r[t].trim().split(" "),d=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1)).reverse(),n[i++]=new sb(d,u,e,a,s,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,i;let r=(n=e.scope,n<(i=t.scope)?-1:+(n>i));return 0!==r||0!==(r=su(e.parentScopes,t.parentScopes))?r:e.index-t.index});let n=0,i="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(i=t.foreground),null!==t.background&&(r=t.background)}let o=new sy(t),a=new sg(n,o.getId(i),o.getId(r)),s=new sk(new sx(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,o.getId(n.foreground),o.getId(n.background))}return new sp(o,a,s)}(e,t)}_cachedMatchRoot=new sf(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let r=0;r<t.length;r++){var n,i;let o=t[r],a=!1;if(">"===o){if(r===t.length-1)return!1;o=t[++r],a=!0}for(;e&&(n=e.scopeName,!((i=o)===n||n.startsWith(i)&&"."===n[i.length]));){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new sg(n.fontStyle,n.foreground,n.background):null}},sm=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let i of n)t=new e(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new e(n,t[i]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},sg=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},sb=class{constructor(e,t,n,i,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=r,this.background=o}},sv=((c=sv||{})[c.NotSet=-1]="NotSet",c[c.None=0]="None",c[c.Italic=1]="Italic",c[c.Bold=2]="Bold",c[c.Underline=4]="Underline",c[c.Strikethrough=8]="Strikethrough",c),sy=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},sw=Object.freeze([]),sx=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,i,r){this.scopeDepth=e,this.parentScopes=t||sw,this.fontStyle=n,this.foreground=i,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==i&&(this.background=i)}},sk=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[i]&&i++,!(n>=e.parentScopes.length)&&!(i>=t.parentScopes.length);){let r=t.parentScopes[i].length-e.parentScopes[n].length;if(0!==r)return r;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,i=t.indexOf(".");if(-1===i?(e=t,n=""):(e=t.substring(0,i),n=t.substring(i+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,i,r,o,a){let s,l,d;if(""===n)return void this._doInsertHere(t,i,r,o,a);let u=n.indexOf(".");-1===u?(s=n,l=""):(s=n.substring(0,u),l=n.substring(u+1)),this._children.hasOwnProperty(s)?d=this._children[s]:(d=new e(this._mainRule.clone(),sx.cloneArr(this._rulesWithParentScopes)),this._children[s]=d),d.insert(t+1,l,i,r,o,a)}_doInsertHere(e,t,n,i,r){if(null===t)return void this._mainRule.acceptOverwrite(e,n,i,r);for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let a=this._rulesWithParentScopes[o];if(0===su(a.parentScopes,t))return void a.acceptOverwrite(e,n,i,r)}-1===n&&(n=this._mainRule.fontStyle),0===i&&(i=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new sx(e,t,n,i,r))}},sS=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),i=e.getTokenType(t),r=e.getFontStyle(t);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,i,r,o,a,s){let l=e.getLanguageId(t),d=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),c=e.getFontStyle(t),h=e.getForeground(t),f=e.getBackground(t);return 0!==n&&(l=n),8!==i&&(d=i),null!==r&&(u=+!!r),-1!==o&&(c=o),0!==a&&(h=a),0!==s&&(f=s),(l|d<<8|u<<10|c<<11|h<<15|f<<24)>>>0}};function sC(e,t){var n;let i,r,o=[],a=(n=e,r=(i=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!r)return null;let e=r[0];return r=i.exec(n),e}}),s=a.next();for(;null!==s;){let e=0;if(2===s.length&&":"===s.charAt(1)){switch(s.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=a.next()}let t=d();if(o.push({matcher:t,priority:e}),","!==s)break;s=a.next()}return o;function l(){if("-"===s){s=a.next();let e=l();return t=>!!e&&!e(t)}if("("===s){s=a.next();let e=function(){let e=[],t=d();for(;t&&(e.push(t),"|"===s||","===s);){do s=a.next();while("|"===s||","===s)t=d()}return t=>e.some(e=>e(t))}();return")"===s&&(s=a.next()),e}if(sA(s)){let e=[];do e.push(s),s=a.next();while(sA(s))return n=>t(e,n)}return null}function d(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function sA(e){return!!e&&!!e.match(/[\w\.:]+/)}var sE=((h=sE||{})[h.None=0]="None",h[h.NotBeginString=1]="NotBeginString",h[h.NotEndString=2]="NotEndString",h[h.NotBeginPosition=4]="NotBeginPosition",h[h.DebugCall=8]="DebugCall",h);function sL(e){"function"==typeof e.dispose&&e.dispose()}var s_=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},sN=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},sT=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},sR=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new s_(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new sT;for(let n of e)!function(e,t,n,i){let r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof s_?sP({baseGrammar:o,selfGrammar:r},i):sM(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},i);let a=n.injections(e.scopeName);if(a)for(let e of a)i.add(new s_(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof s_){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function sM(e,t,n){t.repository&&t.repository[e]&&sI([t.repository[e]],t,n)}function sP(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&sI(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&sI(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function sI(e,t,n){for(let i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);let e=i.repository?ss({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&sI(i.patterns,{...t,repository:e},n);let r=i.include;if(!r)continue;let o=sB(r);switch(o.kind){case 0:sP({...t,selfGrammar:t.baseGrammar},n);break;case 1:sP(t,n);break;case 2:sM(o.ruleName,{...t,repository:e},n);break;case 3:case 4:let a=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){let i={baseGrammar:t.baseGrammar,selfGrammar:a,repository:e};4===o.kind?sM(o.ruleName,i,n):sP(i,n)}else 4===o.kind?n.add(new sN(o.scopeName,o.ruleName)):n.add(new s_(o.scopeName))}}}var sD=class{kind=0},s$=class{kind=1},sO=class{constructor(e){this.ruleName=e}kind=2},sj=class{constructor(e){this.scopeName=e}kind=3},sz=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function sB(e){if("$base"===e)return new sD;if("$self"===e)return new s$;let t=e.indexOf("#");return -1===t?new sj(e):0===t?new sO(e.substring(1)):new sz(e.substring(0,t),e.substring(t+1))}var sH=/\\(\d+)/,sU=/\\(\d+)/g;Symbol("RuleId");var sF=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=sd.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=sd.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?sd.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?sd.replaceCaptures(this._contentName,e,t):this._contentName}},sG=class extends sF{retokenizeCapturedWithRuleId;constructor(e,t,n,i,r){super(e,t,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,i){throw Error("Not supported!")}},sW=class extends sF{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,null),this._match=new sY(i,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sJ,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sq=class extends sF{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,i),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sJ,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sV=class extends sF{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r,o,a,s,l,d){super(e,t,n,i),this._begin=new sY(r,this.id),this.beginCaptures=o,this._end=new sY(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new sJ,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},sX=class extends sF{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i),this._begin=new sY(r,this.id),this.beginCaptures=o,this.whileCaptures=s,this._while=new sY(a,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new sJ,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sJ,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},sK=class e{static createCaptureRule(e,t,n,i,r){return e.registerRule(e=>new sG(t,e,n,i,r))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new sW(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,i));if(void 0===t.begin){t.repository&&(i=ss({},i,t.repository));let r=t.patterns;return void 0===r&&t.include&&(r=[{include:t.include}]),new sq(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(r,n,i))}return t.while?new sX(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,i),e._compilePatterns(t.patterns,n,i)):new sV(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,e._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let r=[];if(t){let o=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)r[e]=null;for(let o in t){if("$vscodeTextmateLocation"===o)continue;let a=parseInt(o,10),s=0;t[o].patterns&&(s=e.getCompiledRuleId(t[o],n,i)),r[a]=e.createCaptureRule(n,t[o].$vscodeTextmateLocation,t[o].name,t[o].contentName,s)}}return r}static _compilePatterns(t,n,i){let r=[];if(t)for(let o=0,a=t.length;o<a;o++){let a=t[o],s=-1;if(a.include){let t=sB(a.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(i[a.include],n,i);break;case 2:let r=i[t.ruleName];r&&(s=e.getCompiledRuleId(r,n,i));break;case 3:case 4:let o=t.scopeName,l=4===t.kind?t.ruleName:null,d=n.getExternalGrammar(o,i);if(d)if(l){let t=d.repository[l];t&&(s=e.getCompiledRuleId(t,n,d.repository))}else s=e.getCompiledRuleId(d.repository.$self,n,d.repository)}}else s=e.getCompiledRuleId(a,n,i);if(-1!==s){let e=n.getRule(s),t=!1;if((e instanceof sq||e instanceof sV||e instanceof sX)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(s)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},sY=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,i=[],r=!1;for(let o=0;o<t;o++)if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(i.push(e.substring(n,o)),i.push("$(?!\\n)(?<!\\n)"),n=o+2):("A"===t||"G"===t)&&(r=!0),o++}this.hasAnchor=r,0===n?this.source=e:(i.push(e.substring(n,t)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=sH.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return sU.lastIndex=0,this.source.replace(sU,(e,t)=>sh(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,i;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let r=[],o=[],a=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,o[e]=n,a[e]=n,s[e]=n,"\\"===n&&e+1<t&&("A"===(i=this.source.charAt(e+1))?(r[e+1]="￿",o[e+1]="￿",a[e+1]="A",s[e+1]="A"):"G"===i?(r[e+1]="￿",o[e+1]="G",a[e+1]="￿",s[e+1]="G"):(r[e+1]=i,o[e+1]=i,a[e+1]=i,s[e+1]=i),e++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:a.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},sJ=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new sQ(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new sQ(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},sQ=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},sZ=class{constructor(e,t){this.languageId=e,this.tokenType=t}},s0=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new sZ(e,8),this._embeddedLanguagesMatcher=new s1(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new sZ(0,0);_getBasicScopeAttributes=new sf(e=>new sZ(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},s1=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>sh(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==v.default&&v.default.env.VSCODE_TEXTMATE_DEBUG;var s2=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function s8(e,t,n,i,r,o,a,s){let l=t.content.length,d=!1,u=-1;if(a){let a=function(e,t,n,i,r,o){let a=r.beginRuleCapturedEOL?0:-1,s=[];for(let t=r;t;t=t.pop()){let n=t.getRule(e);n instanceof sX&&s.push({rule:n,stack:t})}for(let f=s.pop();f;f=s.pop()){var l,d,u,c,h;let{ruleScanner:s,findOptions:p}=(l=f.rule,d=e,u=f.stack.endRule,c=n,h=i===a,{ruleScanner:l.compileWhileAG(d,u,c,h),findOptions:0}),m=s.findNextMatchSync(t,i,p);if(m){if(-2!==m.ruleId){r=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(f.stack,m.captureIndices[0].start),s6(e,t,n,f.stack,o,f.rule.whileCaptures,m.captureIndices),o.produce(f.stack,m.captureIndices[0].end),a=m.captureIndices[0].end,m.captureIndices[0].end>i&&(i=m.captureIndices[0].end,n=!1))}else{r=f.stack.pop();break}}return{stack:r,linePos:i,anchorPosition:a,isFirstLine:n}}(e,t,n,i,r,o);r=a.stack,i=a.linePos,n=a.isFirstLine,u=a.anchorPosition}let c=Date.now();for(;!d;){if(0!==s&&Date.now()-c>s)return new s2(r,!0);!function(){let a=function(e,t,n,i,r,o){let a=function(e,t,n,i,r,o){let{ruleScanner:a,findOptions:s}=s5(r.getRule(e),e,r.endRule,n,i===o),l=a.findNextMatchSync(t,i,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,i,r,o),s=e.getInjections();if(0===s.length)return a;let l=function(e,t,n,i,r,o,a){let s,l=Number.MAX_VALUE,d=null,u=0,c=o.contentNameScopesList.getScopeNames();for(let o=0,h=e.length;o<h;o++){let h=e[o];if(!h.matcher(c))continue;let{ruleScanner:f,findOptions:p}=s5(t.getRule(h.ruleId),t,null,i,r===a),m=f.findNextMatchSync(n,r,p);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,d=m.captureIndices,s=m.ruleId,u=h.priority,l===r))break}return d?{priorityMatch:-1===u,captureIndices:d,matchedRuleId:s}:null}(s,e,t,n,i,r,o);if(!l)return a;if(!a)return l;let d=a.captureIndices[0].start,u=l.captureIndices[0].start;return u<d||l.priorityMatch&&u===d?l:a}(e,t,n,i,r,u);if(!a){o.produce(r,l),d=!0;return}let s=a.captureIndices,c=a.matchedRuleId,h=!!s&&s.length>0&&s[0].end>i;if(-1===c){let a=r.getRule(e);o.produce(r,s[0].start),r=r.withContentNameScopesList(r.nameScopesList),s6(e,t,n,r,o,a.endCaptures,s),o.produce(r,s[0].end);let c=r;if(r=r.parent,u=c.getAnchorPos(),!h&&c.getEnterPos()===i){r=c,o.produce(r,l),d=!0;return}}else{let a=e.getRule(c);o.produce(r,s[0].start);let f=r,p=a.getName(t.content,s),m=r.contentNameScopesList.pushAttributed(p,e);if(r=r.push(c,i,u,s[0].end===l,null,m,m),a instanceof sV){s6(e,t,n,r,o,a.beginCaptures,s),o.produce(r,s[0].end),u=s[0].end;let i=a.getContentName(t.content,s),c=m.pushAttributed(i,e);if(r=r.withContentNameScopesList(c),a.endHasBackReferences&&(r=r.withEndRule(a.getEndWithResolvedBackReferences(t.content,s))),!h&&f.hasSameRuleAs(r)){r=r.pop(),o.produce(r,l),d=!0;return}}else if(a instanceof sX){s6(e,t,n,r,o,a.beginCaptures,s),o.produce(r,s[0].end),u=s[0].end;let i=a.getContentName(t.content,s),c=m.pushAttributed(i,e);if(r=r.withContentNameScopesList(c),a.whileHasBackReferences&&(r=r.withEndRule(a.getWhileWithResolvedBackReferences(t.content,s))),!h&&f.hasSameRuleAs(r)){r=r.pop(),o.produce(r,l),d=!0;return}}else if(s6(e,t,n,r,o,a.captures,s),o.produce(r,s[0].end),r=r.pop(),!h){r=r.safePop(),o.produce(r,l),d=!0;return}}s[0].end>i&&(i=s[0].end,n=!1)}()}return new s2(r,!1)}function s5(e,t,n,i,r){return{ruleScanner:e.compileAG(t,n,i,r),findOptions:0}}function s6(e,t,n,i,r,o,a){if(0===o.length)return;let s=t.content,l=Math.min(o.length,a.length),d=[],u=a[0].end;for(let t=0;t<l;t++){let l=o[t];if(null===l)continue;let c=a[t];if(0===c.length)continue;if(c.start>u)break;for(;d.length>0&&d[d.length-1].endPos<=c.start;)r.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?r.produceFromScopes(d[d.length-1].scopes,c.start):r.produce(i,c.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,a),o=i.contentNameScopesList.pushAttributed(t,e),d=l.getContentName(s,a),u=o.pushAttributed(d,e),h=i.push(l.retokenizeCapturedWithRuleId,c.start,-1,!1,null,o,u),f=e.createOnigString(s.substring(0,c.end));s8(e,f,n&&0===c.start,c.start,h,r,!1,0),sL(f);continue}let h=l.getName(s,a);if(null!==h){let t=(d.length>0?d[d.length-1].scopes:i.contentNameScopesList).pushAttributed(h,e);d.push(new s3(t,c.end))}}for(;d.length>0;)r.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}var s3=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function s4(e,t,n,i,r){let o=sC(t,s7),a=sK.getCompiledRuleId(n,i,r.repository);for(let n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:a,grammar:r,priority:n.priority})}function s7(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let i=n;i<t.length;i++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[i],e))return n=i+1,!0;return!1})}var s9=class{constructor(e,t,n,i,r,o,a,s){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=s,this._basicScopeAttributesProvider=new s0(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=le(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r))for(const t of sC(e,s7))this._tokenTypeMatchers.push({matcher:t.matcher,type:r[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let i=n.injections;if(i)for(let t in i)s4(e,t,i[t],this,n);let r=this._grammarRepository.injections(t);r&&r.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&s4(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=le(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){let i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){let r;if(-1===this._rootId&&(this._rootId=sK.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ln.NULL)r=!1,t.reset();else{let e;r=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),i=this.themeProvider.getDefaults(),o=sS.set(0,n.languageId,n.tokenType,null,i.fontStyle,i.foregroundId,i.backgroundId),a=this.getRule(this._rootId).getName(null,null);e=a?lt.createRootAndLookUpScopeName(a,o,this):lt.createRoot("unknown",o),t=new ln(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let o=this.createOnigString(e),a=o.content.length,s=new lr(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=s8(this,o,r,0,t,s,!0,i);return sL(o),{lineLength:a,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function le(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let i=0,r=t.length;i<r;i++)n[i]=e(t[i]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let i in t)n[i]=e(t[i]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var lt=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let i=t,r=t?.scopePath??null;for(let t of n)i=new e(i,r=sm.push(r,t.scopeNames),t.encodedTokenAttributes);return i}static createRoot(t,n){return new e(null,new sm(null,t),n)}static createRootAndLookUpScopeName(t,n,i){let r=i.getMetadataForScope(t),o=new sm(null,t),a=i.themeProvider.themeMatch(o),s=e.mergeAttributes(n,r,a);return new e(null,o,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let i=-1,r=0,o=0;return null!==n&&(i=n.fontStyle,r=n.foregroundId,o=n.backgroundId),sS.set(e,t.languageId,t.tokenType,null,i,r,o)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let i=t.split(/ /g),r=this;for(let t of i)r=e._pushAttributed(r,t,n);return r}static _pushAttributed(t,n,i){let r=i.getMetadataForScope(n),o=t.scopePath.push(n),a=i.themeProvider.themeMatch(o),s=e.mergeAttributes(t.tokenAttributes,r,a);return new e(t,o,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ln=class e{constructor(e,t,n,i,r,o,a,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&lt.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,r,o,a,s){return new e(this,t,n,i,r,o,a,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let i=lt.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,lt.fromExtension(i,n.contentNameScopesList))}},li=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):sC(e,s7).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>sC(e,s7).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},lr=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=sS.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(t))}if(i&&(n=sS.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},lo=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,i,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,new s9(e,o,t,n,i,r,this,this._onigLib))}return this._grammars.get(e)}},la=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new lo(sp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(sp.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new li(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,i,r){let o=new sR(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,i,r)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,t=0,n=null,i=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,i,r)}},ls=ln.NULL;function ll(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},i="string"==typeof e?e:e.name;for(let[e,r]of Object.entries(t?.colorReplacements||{}))"string"==typeof r?n[e]=r:e===i&&Object.assign(n,r);return n}function ld(e,t){return e&&t?.[e?.toLowerCase()]||e}async function lu(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function lc(e){return!e||["plaintext","txt","text","plain"].includes(e)}function lh(e){return"ansi"===e||lc(e)}function lf(e){return"none"===e}let lp=/(\r?\n)/g;function lm(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(lp),i=0,r=[];for(let e=0;e<n.length;e+=2){let o=t?n[e]+(n[e+1]||""):n[e];r.push([o,i]),i+=n[e].length,i+=n[e+1]?.length||0}return r}let lg="__shiki_resolved";function lb(e){if(e?.[lg])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:i}=t;if(!n||!i){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(i=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=i,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0,o=new Map;function a(e){if(o.has(e))return o.get(e);r+=1;let n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?a(e):(o.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),i=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!i)return e;let r={...e,settings:{...e.settings}};if(n){let n=a(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,r.settings.foreground=n}if(i){let n=a(e.settings.background);t.colorReplacements[n]=e.settings.background,r.settings.background=n}return r}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=a(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,lg,{enumerable:!1,writable:!1,value:!0}),t}async function lv(e){return[...new Set((await Promise.all(e.filter(e=>!lh(e)).map(async e=>await lu(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function ly(e){return(await Promise.all(e.map(async e=>lf(e)?null:lb(await lu(e))))).filter(e=>!!e)}function lw(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new sa(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var lx=class extends la{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,i={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=i,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=lb(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=sp.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=lw(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>!!t&&(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new sa(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},lk=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let i=t.slice(0,e).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let lS=0;async function lC(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,i]=await Promise.all([ly(e.themes||[]),lv(e.langs||[]),e.engine]);return function(e){let t;lS+=1,!1!==e.warnings&&lS>=10&&lS%10==0&&console.warn(`[Shiki] ${lS} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new sa("`engine` option is required for synchronous mode");let i=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(lb),o=new lx(new lk(e.engine,i),r,i,e.langAlias);function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};d();let t=o.getTheme(e);if(!t)throw new sa(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){d(),o.loadLanguages(e.flat(1))}function l(...e){for(let t of(d(),e.flat(1)))o.loadTheme(t)}function d(){if(n)throw new sa("Shiki instance has been disposed")}function u(){n||(n=!0,o.dispose(),lS-=1)}return{setTheme:function(e){d();let n=a(e);return t!==e&&(o.setTheme(n),t=e),{theme:n,colorMap:o.getColorMap()}},getTheme:a,getLanguage:function(e){d();let t=o.getGrammar("string"==typeof e?e:e.name);if(!t)throw new sa(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return d(),o.getLoadedThemes()},getLoadedLanguages:function(){return d(),o.getLoadedLanguages()},resolveLangAlias:function(t){return lw(t,e.langAlias)},loadLanguage:async function(...e){return s(await lv(e))},loadLanguageSync:s,loadTheme:async function(...e){return d(),l(await ly(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}({...e,themes:t,langs:n,engine:i})}let lA=new WeakMap;function lE(e,t){lA.set(e,t)}function lL(e){return lA.get(e)}var l_=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries((Array.isArray(n)?n:[n]).map(e=>[e,ls])),t)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,i]=e;this.lang=n,this._stacks={[i]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,i;return t=this._stacks[e],n=[],i=new Set,!function e(t){if(i.has(t))return;i.add(t);let r=t?.nameScopesList?.scopeName;r&&n.push(r),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};let lN=/,/,lT=/ /;function lR(e,t,n={}){var i,r;let o,a,{theme:s=e.getLoadedThemes()[0]}=n;if(lc(e.resolveLangAlias(n.lang||"text"))||lf(s))return lm(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:l,colorMap:d}=e.setTheme(s),u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new sa(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(l.name))throw new sa(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${l.name}"`)}return a=new l_((o=lM(t,i=u,r=l,d,n)).stateStack,i.name,r.name),lE(o.tokens,a),o.tokens}function lM(e,t,n,i,r){let o=ll(n,r),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:s=500,includeExplanation:l=!1}=r,d=lm(e),u=r.grammarState?function(e,t){if(!(e instanceof l_))throw new sa("Invalid grammar state");return e.getInternalStack(t)}(r.grammarState,n.name)??ls:null!=r.grammarContextCode?lM(r.grammarContextCode,t,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:ls,c=[],h=[];for(let e=0,r=d.length;e<r;e++){let r,f,[p,m]=d[e];if(""===p){c=[],h.push([]);continue}if(a>0&&p.length>=a){c=[],h.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}l&&"tokenType"!==l&&(r=t.tokenizeLine(p,u,s).tokens,f=0);let g=t.tokenizeLine2(p,u,s),b=g.tokens.length/2;for(let e=0;e<b;e++){let t=g.tokens[2*e],a=e+1<b?g.tokens[2*e+2]:p.length;if(t===a)continue;let s=g.tokens[2*e+1],d=ld(i[sS.getForeground(s)],o),u=sS.getFontStyle(s),h={content:p.substring(t,a),offset:m+t,color:d,fontStyle:u};if("tokenType"===l)h.type=sS.getTokenType(s);else if(l){let e=[];if("scopeName"!==l)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(lN).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(lT))})}h.explanation=[];let i=0;for(;t+i<a;){let t=r[f],n=p.substring(t.startIndex,t.endIndex);i+=n.length,h.explanation.push({content:n,scopes:"scopeName"===l?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let i=0,r=t.length;i<r;i++){let r=t[i];n[i]={scopeName:r,themeMatches:function(e,t,n){let i=[];for(let{selectors:r,settings:o}of e)for(let e of r)if(function(e,t,n){if(!lP(e.at(-1),t))return!1;let i=e.length-2,r=n.length-1;for(;i>=0&&r>=0;)lP(e[i],n[r])&&(i-=1),r-=1;return -1===i}(e,t,n)){i.push(o);break}return i}(e,r,t.slice(0,i))}}return n}(e,t.scopes)}),f+=1}}c.push(h)}h.push(c),c=[],u=g.ruleStack}return{tokens:h,stateStack:u}}function lP(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function lI(e,t,n,i=lR){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),o=r.map(r=>{let o=i(e,t,{...n,theme:r.theme});return{tokens:o,state:lL(o),theme:"string"==typeof r.theme?r.theme:r.theme.name}}),a=function(...e){let t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){let r=e.map(e=>e[i]),o=t.map(()=>[]);t.forEach((e,t)=>e.push(o[t]));let a=r.map(()=>0),s=r.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(o[t].push(n),a[t]+=1,s[t]=r[t][a[t]]):(o[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...o.map(e=>e.tokens)),s=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:l,...d}=e[t][i];o.variants[r[n].color]=d}),o})),l=o[0].state?new l_(Object.fromEntries(o.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),o[0].state.lang):void 0;return l&&lE(s,l),s}function lD({name:e,load:t,colorScheme:n,collection:i,displayName:r}){var o;return{name:e,colorScheme:n,collection:i,displayName:r,load:(o=t,async()=>lb(a4(await o())))}}let l$=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],lO=new Set(l$),lj={andromeeda:()=>e.A(86242),"aurora-x":()=>e.A(10838),"ayu-dark":()=>e.A(33572),"ayu-light":()=>e.A(2119),"ayu-mirage":()=>e.A(15102),"catppuccin-frappe":()=>e.A(22365),"catppuccin-latte":()=>e.A(82807),"catppuccin-macchiato":()=>e.A(67213),"catppuccin-mocha":()=>e.A(19355),"dark-plus":()=>e.A(7667),dracula:()=>e.A(50180),"dracula-soft":()=>e.A(87642),"everforest-dark":()=>e.A(47631),"everforest-light":()=>e.A(61886),"github-dark":()=>e.A(28267),"github-dark-default":()=>e.A(98718),"github-dark-dimmed":()=>e.A(63167),"github-dark-high-contrast":()=>e.A(33885),"github-light":()=>e.A(90349),"github-light-default":()=>e.A(72808),"github-light-high-contrast":()=>e.A(55630),"gruvbox-dark-hard":()=>e.A(95488),"gruvbox-dark-medium":()=>e.A(41220),"gruvbox-dark-soft":()=>e.A(50869),"gruvbox-light-hard":()=>e.A(27029),"gruvbox-light-medium":()=>e.A(723),"gruvbox-light-soft":()=>e.A(42129),horizon:()=>e.A(89256),"horizon-bright":()=>e.A(75241),houston:()=>e.A(69885),"kanagawa-dragon":()=>e.A(69308),"kanagawa-lotus":()=>e.A(96442),"kanagawa-wave":()=>e.A(74416),laserwave:()=>e.A(98187),"light-plus":()=>e.A(94309),"material-theme":()=>e.A(24272),"material-theme-darker":()=>e.A(22669),"material-theme-lighter":()=>e.A(66451),"material-theme-ocean":()=>e.A(91154),"material-theme-palenight":()=>e.A(40673),"min-dark":()=>e.A(1774),"min-light":()=>e.A(71597),monokai:()=>e.A(91021),"night-owl":()=>e.A(35799),"night-owl-light":()=>e.A(51916),nord:()=>e.A(8143),"one-dark-pro":()=>e.A(68485),"one-light":()=>e.A(27890),plastic:()=>e.A(66111),poimandres:()=>e.A(3814),red:()=>e.A(1266),"rose-pine":()=>e.A(79531),"rose-pine-dawn":()=>e.A(20101),"rose-pine-moon":()=>e.A(5906),"slack-dark":()=>e.A(25753),"slack-ochin":()=>e.A(60595),"snazzy-light":()=>e.A(76643),"solarized-dark":()=>e.A(34167),"solarized-light":()=>e.A(85880),"synthwave-84":()=>e.A(7546),"tokyo-night":()=>e.A(49660),vesper:()=>e.A(75386),"vitesse-black":()=>e.A(18452),"vitesse-dark":()=>e.A(48828),"vitesse-light":()=>e.A(97306)};function lz(e){return lD({name:e,collection:"shiki",colorScheme:lO.has(e)?"light":"dark",load:lj[e]})}let lB=sr({themes:Object.freeze([...l$.map(e=>lz(e)),...["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"].map(e=>lz(e))])});function lH(e){if(a0())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(st.hasRegisteredTheme(e))return;let t=lB.getTheme(e);if(null!=t)return void st.registerThemeIfAbsent(t.name,t.load);throw Error(`No valid theme loader registered for "${e}"`)}function lU(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function lF(e){lH(e);let t=await st.resolveTheme(e);return lU(e,t),t}var lG=Object.defineProperty,lW=Object.getOwnPropertyDescriptor,lq=Object.getOwnPropertyNames,lV=Object.prototype.hasOwnProperty,lX=(e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,o=lq(t),a=0,s=o.length;a<s;a++)r=o[a],lV.call(e,r)||r===n||lG(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=lW(t,r))||i.enumerable});return e},lK=e.i(82747),lY=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function lJ(){return"u">typeof performance?performance.now():Date.now()}let lQ=(e,t)=>e+(t-e%t)%t;async function lZ(e){let t,n,i={};function r(e){n=e,i.HEAPU8=new Uint8Array(e),i.HEAPU32=new Uint32Array(e)}let o="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(e,t){return e?function(e,t,n=1024){let i=t+n,r=t;for(;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&o)return o.decode(e.subarray(t,r));let a="";for(;t<r;){let n=e[t++];if(!(128&n)){a+=String.fromCharCode(n);continue}let i=63&e[t++];if((224&n)==192){a+=String.fromCharCode((31&n)<<6|i);continue}let r=63&e[t++];if((n=(240&n)==224?(15&n)<<12|i<<6|r:(7&n)<<18|i<<12|r<<6|63&e[t++])<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return a}(i.HEAPU8,e,t):""}let s={emscripten_get_now:lJ,emscripten_memcpy_big:function(e,t,n){i.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let o=i.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let i=1;i<=4;i*=2){let a=o*(1+.2/i);if(a=Math.min(a,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}(Math.min(0x80000000,lQ(Math.max(e,a),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:s,wasi_snapshot_preview1:s});r((t=n.memory).buffer),Object.assign(i,n),i.UTF8ToString=a}return await l(),i}var l0=Object.defineProperty,l1=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?l0(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};let l2=null;class l8{constructor(e){l1(this,"utf16Length"),l1(this,"utf8Length"),l1(this,"utf16Value"),l1(this,"utf8Value"),l1(this,"utf16OffsetToUtf8"),l1(this,"utf8OffsetToUtf16");const t=e.length,n=l8._utf8ByteLength(e),i=n!==t,r=i?new Uint32Array(t+1):null;i&&(r[t]=n);const o=i?new Uint32Array(n+1):null;i&&(o[n]=t);const a=new Uint8Array(n);let s=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let d=l,u=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(d=(l-55296<<10)+65536|t-56320,u=!0)}i&&(r[n]=s,u&&(r[n+1]=s),d<=127?o[s+0]=n:d<=2047?(o[s+0]=n,o[s+1]=n):d<=65535?(o[s+0]=n,o[s+1]=n,o[s+2]=n):(o[s+0]=n,o[s+1]=n,o[s+2]=n,o[s+3]=n)),d<=127?a[s++]=d:(d<=2047?a[s++]=192|(1984&d)>>>6:(d<=65535?a[s++]=224|(61440&d)>>>12:(a[s++]=240|(1835008&d)>>>18,a[s++]=128|(258048&d)>>>12),a[s++]=128|(4032&d)>>>6),a[s++]=128|(63&d)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,i=e.length;n<i;n++){let r=e.charCodeAt(n),o=r,a=!1;if(r>=55296&&r<=56319&&n+1<i){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(o=(r-55296<<10)+65536|t-56320,a=!0)}o<=127?t+=1:o<=2047?t+=2:o<=65535?t+=3:t+=4,a&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let l5=class e{constructor(t){if(l1(this,"id",++e.LAST_ID),l1(this,"_onigBinding"),l1(this,"content"),l1(this,"utf16Length"),l1(this,"utf8Length"),l1(this,"utf16OffsetToUtf8"),l1(this,"utf8OffsetToUtf16"),l1(this,"ptr"),!l2)throw new lY("Must invoke loadWasm first.");this._onigBinding=l2,this.content=t;const n=new l8(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=l2.omalloc(1e4)),e._sharedPtrInUse=!0,l2.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(l2)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};l1(l5,"LAST_ID",0),l1(l5,"_sharedPtr",0),l1(l5,"_sharedPtrInUse",!1);class l6{constructor(e){if(l1(this,"_onigBinding"),l1(this,"_ptr"),!l2)throw new lY("Must invoke loadWasm first.");const t=[],n=[];for(let i=0,r=e.length;i<r;i++){const r=new l8(e[i]);t[i]=r.createString(l2),n[i]=r.utf8Length}const i=l2.omalloc(4*e.length);l2.HEAPU32.set(t,i/4);const r=l2.omalloc(4*e.length);l2.HEAPU32.set(n,r/4);const o=l2.createOnigScanner(i,r,e.length);for(let n=0,i=e.length;n<i;n++)l2.ofree(t[n]);l2.ofree(r),l2.ofree(i),0===o&&function(e){throw new lY(e.UTF8ToString(e.getLastOnigError()))}(l2),this._onigBinding=l2,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let i=0;if("number"==typeof n&&(i=n),"string"==typeof e){e=new l5(e);let n=this._findNextMatchSync(e,t,!1,i);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,i)}_findNextMatchSync(e,t,n,i){let r=this._onigBinding,o=r.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),i);if(0===o)return null;let a=r.HEAPU32,s=o/4,l=a[s++],d=a[s++],u=[];for(let t=0;t<d;t++){let n=e.convertUtf8OffsetToUtf16(a[s++]),i=e.convertUtf8OffsetToUtf16(a[s++]);u[t]={start:n,end:i,length:i-n}}return{index:l,captureIndices:u}}}function l3(e){return i||(i=async function(){l2=await lZ(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var i,r,o,a;if(void 0!==n.data&&(n=n.data),i=n,"u">typeof Response&&i instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (o=n,e=>WebAssembly.instantiateStreaming(o,e))(t):await (a=n,async e=>{let t=await a.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(r=n,"u">typeof ArrayBuffer&&(r instanceof ArrayBuffer||ArrayBuffer.isView(r))||void 0!==lK.Buffer&&lK.Buffer.isBuffer?.(r)||"u">typeof SharedArrayBuffer&&r instanceof SharedArrayBuffer||"u">typeof Uint32Array&&r instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await l4(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await l4(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function l4(e){return t=>WebAssembly.instantiate(e,t)}async function l7(e){return e&&await l3(e),{createScanner:e=>new l6(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new l5(e)}}e.s(["createOnigurumaEngine",0,l7,"getDefaultWasmLoader",0,function(){return r},"loadWasm",0,l3,"setDefaultWasmLoader",0,function(e){r=e}],417);var l9=e.i(417),de=((e,t)=>{let n={};for(var i in e)lG(n,i,{get:e[i],enumerable:!0});return t||lG(n,Symbol.toStringTag,{value:"Module"}),n})({});lX(de,l9,"default"),s&&lX(s,l9,"default");let dt=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>e.A(86242)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>e.A(10838)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>e.A(33572)},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>e.A(2119)},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>e.A(15102)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>e.A(22365)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>e.A(82807)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>e.A(67213)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>e.A(19355)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>e.A(7667)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>e.A(50180)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>e.A(87642)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>e.A(47631)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>e.A(61886)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>e.A(28267)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>e.A(98718)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>e.A(63167)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>e.A(33885)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>e.A(90349)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>e.A(72808)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>e.A(55630)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>e.A(95488)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>e.A(41220)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>e.A(50869)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>e.A(27029)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>e.A(723)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>e.A(42129)},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>e.A(89256)},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>e.A(75241)},{id:"houston",displayName:"Houston",type:"dark",import:()=>e.A(69885)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>e.A(69308)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>e.A(96442)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>e.A(74416)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>e.A(98187)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>e.A(94309)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>e.A(24272)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>e.A(22669)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>e.A(66451)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>e.A(91154)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>e.A(40673)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>e.A(1774)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>e.A(71597)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>e.A(91021)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>e.A(35799)},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>e.A(51916)},{id:"nord",displayName:"Nord",type:"dark",import:()=>e.A(8143)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>e.A(68485)},{id:"one-light",displayName:"One Light",type:"light",import:()=>e.A(27890)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>e.A(66111)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>e.A(3814)},{id:"red",displayName:"Red",type:"dark",import:()=>e.A(1266)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>e.A(79531)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>e.A(20101)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>e.A(5906)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>e.A(25753)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>e.A(60595)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>e.A(76643)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>e.A(34167)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>e.A(85880)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>e.A(7546)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>e.A(49660)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>e.A(75386)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>e.A(18452)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>e.A(48828)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>e.A(97306)}].map(e=>[e.id,e.import])),dn=/\s+/g;function di(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(dn)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(dn)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}let dr=["color","background-color"];function da(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&sv.Italic&&(t["font-style"]="italic"),e.fontStyle&sv.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&sv.Underline&&n.push("underline"),e.fontStyle&sv.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ds(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let dl=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var n;let r,o={lines:r=lm(n=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===n.length)return{line:r.length-1,character:r.at(-1).length};let t=e,i=0;for(let e of r){if(t<e.length)break;t-=e.length,i++}return{line:i,character:t}},posToIndex:function(e,t){let n=0;for(let t=0;t<e;t++)n+=r[t].length;return n+t}};function i(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new sa(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...o.indexToPos(e),offset:e}}{let t=o.lines[e.line];if(void 0===t)throw new sa(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${o.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new sa(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:o.posToIndex(e.line,n)}}}let a=(t.options.decorations||[]).map(e=>({...e,start:i(e.start),end:i(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new sa(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){let t=e[i],r=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,o=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,a=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(r||o||a||s){if(r&&o||a&&s||a&&n.start.offset===n.end.offset||o&&t.start.offset===t.end.offset)continue;throw new sa(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(a),e.set(t.meta,{decorations:a,converter:o,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length){var n;let i;return(i=[...(n=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))instanceof Set?n:new Set(n)].sort((e,t)=>e-t)).length?e.map(e=>e.flatMap(e=>{let t=i.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r})):e}},code(e){if(!this.options.decorations?.length)return;let n=t(this),i=[...e.children].filter(e=>"element"===e.type&&"span"===e.tagName);if(i.length!==n.converter.lines.length)throw new sa(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function r(e,t,n,r){let a=i[e],s="",l=-1,d=-1;if(0===t&&(l=0),0===n&&(d=0),n===1/0&&(d=a.children.length),-1===l||-1===d)for(let e=0;e<a.children.length;e++)s+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(a.children[e]),-1===l&&s.length===t&&(l=e+1),-1===d&&s.length===n&&(d=e+1);if(-1===l)throw new sa(`Failed to find start index for decoration ${JSON.stringify(r.start)}`);if(-1===d)throw new sa(`Failed to find end index for decoration ${JSON.stringify(r.end)}`);let u=a.children.slice(l,d);if(r.alwaysWrap||u.length!==a.children.length)if(r.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};o(e,r,"wrapper"),a.children.splice(l,u.length,e)}else o(u[0],r,"token");else o(a,r,"line")}function o(e,t,n){let i=t.properties||{},r=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...i,class:e.properties.class},t.properties?.class&&di(e,t.properties.class),e=r(e,n)||e}let a=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)r(t.line,t.character,n.character,e);else if(t.line<n.line){r(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)a.unshift(()=>{var t;i[t=r]=o(i[t],e,"line")});r(n.line,0,n.character,e)}}a.forEach(e=>e())}}}()];function dd(e){let t=function(e){let t=[],n=[],i=[];for(let r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:i.push(r)}return{pre:t,post:n,normal:i}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...dl]}var du=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],dc={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function dh(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var df={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};let dp=/#([0-9a-f]{3,8})/i,dm=/var\((--[\w-]+-ansi-[\w-]+)\)/,dg={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function db(e,t,n={}){let i=e.resolveLangAlias(n.lang||"text"),{theme:r=e.getLoadedThemes()[0]}=n;if(!lc(i)&&!lf(r)&&"ansi"===i){let i,o,a,s,l,d,u,{theme:c}=e.setTheme(r);return i=ll(c,n),o=lm(t),a=function(e=df){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(i){switch(i.type){case"named":return e[i.name];case"rgb":return n(i.rgb);case"table":var r;return r=i.index,function(){if(t)return t;t=[];for(let n=0;n<du.length;n++)t.push(e[du[n]]);let i=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let r=0;r<6;r++)for(let o=0;o<6;o++)t.push(n([i[e],i[r],i[o]]));let r=8;for(let e=0;e<24;e++,r+=10)t.push(n([r,r,r]));return t}()[r]}}}}(Object.fromEntries(du.map(e=>{let t=`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`;return[e,c.colors?.[t]||dg[e]]}))),s=null,l=null,d=new Set,u={parse(e){let t=[],n=0;do{let i=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),r=i.sequence?e.substring(n,i.startPosition):e.substring(n);if(r.length>0&&t.push({value:r,foreground:s,background:l,decorations:new Set(d)}),i.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let i=Number.parseInt(n);if(!Number.isNaN(i))if(0===i)t.push({type:"resetAll"});else if(i<=9)dc[i]&&t.push({type:"setDecoration",value:dc[i]});else if(i<=29){let e=dc[i-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:du[i-30]}});else if(38===i){let n=dh(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===i)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:du[i-40]}});else if(48===i){let n=dh(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===i?t.push({type:"resetBackgroundColor"}):53===i?t.push({type:"setDecoration",value:"overline"}):55===i?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:du[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:du[i-100+8]}})}return t}(i.sequence);for(let t of e)"resetAll"===t.type?(s=null,l=null,d.clear()):"resetForegroundColor"===t.type?s=null:"resetBackgroundColor"===t.type?l=null:"resetDecoration"===t.type&&d.delete(t.value);for(let t of e)"setForegroundColor"===t.type?s=t.value:"setBackgroundColor"===t.type?l=t.value:"setDecoration"===t.type&&d.add(t.value)}n=i.position}while(n<e.length)return t}},o.map(e=>u.parse(e[0]).map(t=>{let n,r;t.decorations.has("reverse")?(n=t.background?a.value(t.background):c.bg,r=t.foreground?a.value(t.foreground):c.fg):(n=t.foreground?a.value(t.foreground):c.fg,r=t.background?a.value(t.background):void 0),n=ld(n,i),r=ld(r,i),t.decorations.has("dim")&&(n=function(e){let t=e.match(dp);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],i=e[2],r=e[3];return`#${t}${t}${n}${n}${i}${i}${Math.round(Number.parseInt(`${r}${r}`,16)/2).toString(16).padStart(2,"0")}`}else if(3===e.length){let t=e[0],n=e[1],i=e[2];return`#${t}${t}${n}${n}${i}${i}80`}}let n=e.match(dm);return n?`var(${n[1]}-dim)`:e}(n));let o=sv.None;return t.decorations.has("bold")&&(o|=sv.Bold),t.decorations.has("italic")&&(o|=sv.Italic),t.decorations.has("underline")&&(o|=sv.Underline),t.decorations.has("strikethrough")&&(o|=sv.Strikethrough),{content:t.value,offset:e[1],color:n,bgColor:r,fontStyle:o}}))}return lR(e,t,n)}function dv(e,t,n){let i,r,o,a,s,l;if("themes"in n){let{defaultColor:d="light",cssVariablePrefix:u="--shiki-",colorsRendering:c="css-vars"}=n,h=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===d?-1:+(t.color===d));if(0===h.length)throw new sa("`themes` option must not be empty");let f=lI(e,t,n,db);if(l=lL(f),d&&"light-dark()"!==d&&!h.some(e=>e.color===d))throw new sa(`\`themes\` option must contain the defaultColor key \`${d}\``);let p=h.map(t=>e.getTheme(t.theme)),m=h.map(e=>e.color);o=f.map(e=>e.map(e=>(function(e,t,n,i,r="css-vars"){let o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(t=>da(e.variants[t])),s=new Set(a.flatMap(e=>Object.keys(e))),l={},d=(e,i)=>{let r="color"===i?"":"background-color"===i?"-bg":`-${i}`;return n+t[e]+("color"===i?"":r)};return a.forEach((e,n)=>{for(let o of s){let s=e[o]||"inherit";if(0===n&&i&&dr.includes(o))if("light-dark()"===i&&a.length>1){let e=t.findIndex(e=>"light"===e),i=t.findIndex(e=>"dark"===e);if(-1===e||-1===i)throw new sa('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[o]=`light-dark(${a[e][o]||"inherit"}, ${a[i][o]||"inherit"})`,"css-vars"===r&&(l[d(n,o)]=s)}else l[o]=s;else"css-vars"===r&&(l[d(n,o)]=s)}}),o.htmlStyle=l,o})(e,m,u,d,c))),l&&lE(o,l);let g=h.map(e=>ll(e.theme,n));r=dy(h,p,g,u,d,"fg",c),i=dy(h,p,g,u,d,"bg",c),a=`shiki-themes ${p.map(e=>e.name).join(" ")}`,s=d?void 0:[r,i].join(";")}else if("theme"in n){let s=ll(n.theme,n);o=db(e,t,n);let d=e.getTheme(n.theme);i=ld(d.bg,s),r=ld(d.fg,s),a=d.name,l=lL(o)}else throw new sa("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:i,themeName:a,rootStyle:s,grammarState:l}}function dy(e,t,n,i,r,o,a){return e.map((s,l)=>{let d=ld(t[l][o],n[l])||"inherit",u=`${i+s.color}${"bg"===o?"-bg":""}:${d}`;if(0===l&&r){if("light-dark()"===r&&e.length>1){let i=e.findIndex(e=>"light"===e.color),r=e.findIndex(e=>"dark"===e.color);if(-1===i||-1===r)throw new sa('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${ld(t[i][o],n[i])||"inherit"}, ${ld(t[r][o],n[r])||"inherit"});${u}`}return d}return"css-vars"===a?u:null}).filter(e=>!!e).join(";")}let dw=/^\s+$/,dx=/^(\s*)(.*?)(\s*)$/;function dk(e,t,n,i={meta:{},options:n,codeToHast:(t,n)=>dk(e,t,n),codeToTokens:(t,n)=>dv(e,t,n)}){let r=t;for(let e of dd(n))r=e.preprocess?.call(i,r,n)||r;let{tokens:o,fg:a,bg:s,themeName:l,rootStyle:d,grammarState:u}=dv(e,r,n),{mergeWhitespaces:c=!0,mergeSameStyleTokens:h=!1}=n;!0===c?o=o.map(e=>{let t,n=[],i="";return e.forEach((r,o)=>{let a=!(r.fontStyle&&(r.fontStyle&sv.Underline||r.fontStyle&sv.Strikethrough));a&&dw.test(r.content)&&e[o+1]?(void 0===t&&(t=r.offset),i+=r.content):i?(a?n.push({...r,offset:t,content:i+r.content}):n.push({content:i,offset:t},r),t=void 0,i=""):n.push(r)}),n}):"never"===c&&(o=o.map(e=>e.flatMap(e=>{if(dw.test(e.content))return e;let t=e.content.match(dx);if(!t)return e;let[,n,i,r]=t;if(!n&&!r)return e;let o=[{...e,offset:e.offset+n.length,content:i}];return n&&o.unshift({content:n,offset:e.offset}),r&&o.push({content:r,offset:e.offset+n.length+i.length}),o}))),h&&(o=o.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t.at(-1),i=ds(e.htmlStyle||da(e)),r=ds(n.htmlStyle||da(n)),o=e.fontStyle&&(e.fontStyle&sv.Underline||e.fontStyle&sv.Strikethrough),a=n.fontStyle&&(n.fontStyle&sv.Underline||n.fontStyle&sv.Strikethrough);o||a||i!==r?t.push({...n}):e.content+=n.content}return t}));let f={...i,get source(){return r}};for(let e of dd(n))o=e.tokens?.call(f,o)||o;return function(e,t,n,i=lL(e)){let r=dd(t),o=[],a={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,d={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?d.style=t.rootStyle:d.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(d.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(d[e]=n);let u={type:"element",tagName:"pre",properties:d,children:[],data:t.data},c={type:"element",tagName:"code",properties:{},children:o},h=[],f={...n,structure:s,addClassToHast:di,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return u},get code(){return c},get lines(){return h}};if(e.forEach((e,t)=>{t&&("inline"===s?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&o.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},i=0;for(let o of e){let e={type:"element",tagName:"span",properties:{...o.htmlAttrs},children:[{type:"text",value:o.content}]},l=ds(o.htmlStyle||da(o));for(let a of(l&&(e.properties.style=l),r))e=a?.span?.call(f,e,t+1,i,n,o)||e;"inline"===s?a.children.push(e):"classic"===s&&n.children.push(e),i+=o.content.length}if("classic"===s){for(let e of r)n=e?.line?.call(f,n,t+1)||n;h.push(n),o.push(n)}else"inline"===s&&h.push(n)}),"classic"===s){for(let e of r)c=e?.code?.call(f,c)||c;for(let e of(u.children.push(c),r))u=e?.pre?.call(f,u)||u;a.children.push(u)}else if("inline"===s){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of a.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of r)n=e?.code?.call(f,n)||n;a.children=[];for(let e=0;e<n.children.length;e++){e>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&a.children.push(...t.children)}}let p=a;for(let e of r)p=e?.root?.call(f,p)||p;return i&&lE(p,i),p}(o,{...n,fg:a,bg:s,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??d)},f,u)}async function dS(e){let t=await lC(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return lL(e[1]);let[t,n,i={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=i;if(lc(r)||lf(o))throw new sa("Plain language does not have grammar state");if("ansi"===r)throw new sa("ANSI language does not have grammar state");let{theme:a,colorMap:s}=t.setTheme(o),l=t.getLanguage(r);return new l_(lM(n,l,a,s,i).stateStack,l.name,a.name)})(t,...e),codeToTokensBase:(e,n)=>db(t,e,n),codeToTokensWithThemes:(e,n)=>lI(t,e,n),codeToTokens:(e,n)=>dv(t,e,n),codeToHast:(e,n)=>dk(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let i={meta:{},options:n,codeToHast:(t,n)=>dk(e,t,n),codeToTokens:(t,n)=>dv(e,t,n)},r=al(dk(e,t,n,i));for(let e of dd(n))r=e.postprocess?.call(i,r,n)||r;return r})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let dC=(l=(f={langs:a5,themes:dt,engine:()=>(0,de.createOnigurumaEngine)(e.A(86581))}).langs,d=f.themes,u=f.engine,async function(e){function t(t){if("string"==typeof t){if(lh(t=e.langAlias?.[t]||t))return[];let n=l[t];if(!n)throw new sa(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return n}return t}function n(e){if(lf(e))return"none";if("string"==typeof e){let t=d[e];if(!t)throw new sa(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let i=(e.themes??[]).map(e=>n(e)),r=(e.langs??[]).map(e=>t(e)),o=await dS({engine:e.engine??u(),...e,themes:i,langs:r});return{...o,loadLanguage:(...e)=>o.loadLanguage(...e.map(t)),loadTheme:(...e)=>o.loadTheme(...e.map(n)),getBundledLanguages:()=>l,getBundledThemes:()=>d}});var dA=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:i,regexConstructor:r}=t;if(!r)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=i?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=r(e);return i?.set(e,t),t}catch(t){if(i?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let i="string"==typeof e?e:e.content,r=[];function o(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let a=n.exec(i);if(!a)continue;if(a.index===t)return o(e,a,0);r.push([e,a,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(r.length){let e=Math.min(...r.map(e=>e[1].index));for(let[t,n,i]of r)if(n.index===e)return o(t,n,i)}return null}};function dE(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let dL=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),d_=String.raw;function dN(e,t){if(null==e)throw Error(t??"Value expected");return e}let dT=d_`\[\^?`,dR=`c.? | C(?:-.?)?|${d_`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${d_`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${d_`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${d_`o\{[^\}]*\}?`}|${d_`\d{1,3}`}`,dM=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,dP=RegExp(d_`
55
+ \\ (?:
56
+ ${dR}
57
+ | [gk]<[^>]*>?
58
+ | [gk]'[^']*'?
59
+ | .
60
+ )
61
+ | \( (?:
62
+ \? (?:
63
+ [:=!>({]
64
+ | <[=!]
65
+ | <[^>]*>
66
+ | '[^']*'
67
+ | ~\|?
68
+ | #(?:[^)\\]|\\.?)*
69
+ | [^:)]*[:)]
70
+ )?
71
+ | \*[^\)]*\)?
72
+ )?
73
+ | (?:${dM.source})+
74
+ | ${dT}
75
+ | .
76
+ `.replace(/\s+/g,""),"gsu"),dI=RegExp(d_`
77
+ \\ (?:
78
+ ${dR}
79
+ | .
80
+ )
81
+ | \[:(?:\^?\p{Alpha}+|\^):\]
82
+ | ${dT}
83
+ | &&
84
+ | .
85
+ `.replace(/\s+/g,""),"gsu");function dD(e,{inCharClass:t}){let n=e[1];if("c"===n||"C"===n){var i,r=e;let t="c"===r[1]?r[2]:r[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${r}"`);return dj(dE(t.toUpperCase())-64,r)}if("dDhHsSwW".includes(n)){let t;return dB({d:"digit",h:"hex",s:"space",w:"word"}[t=(i=e)[1].toLowerCase()],i,{negate:i[1]!==t})}if(e.startsWith(d_`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);return function(e){let{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return dB("property",e,{value:i,negate:"P"===t&&!n||"p"===t&&!!n})}(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),i=new TextEncoder;return[...n].map(e=>{let t=[...i.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return dj(dE(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===n||"x"===n)return dj(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(dG.has(n))return dj(dG.get(n),e);if(/\d/.test(n))return{type:"EscapedNumber",inCharClass:t,raw:e};if("\\"===e)throw Error(d_`Incomplete escape "\"`);if("M"===n)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return dj(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function d$(e,t){return{type:"Assertion",kind:e,raw:t}}function dO(e){return{type:"Backreference",raw:e}}function dj(e,t){return{type:"Character",value:e,raw:t}}function dz(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function dB(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function dH(e,t,n={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:dN(n.flags),raw:t}}function dU(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}let dF=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),dG=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function dW(e){let t=null,n,i;if("{"===e[0]){let{minStr:r,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+r>1e5||o&&+o>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((n=+r)>(i=void 0===o?+r:""===o?1/0:+o)&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=+("+"===e[0]),i="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:n,max:i,raw:e}}function dq(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function dV(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}let dX=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function dK(e,t={}){var n;let i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=function(e,t={}){let n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let i=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let i=e[n];if(!"imxDPSWy".includes(i))throw Error(`Invalid flag "${i}"`);if("y"===i){if(!/^y{[gw]}/.test(e.slice(n)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[n+2]?"grapheme":"word",n+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[i]]=!0}return t}(n.flags),r=[i.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX:()=>r.at(-1),numOpenGroups:0,popModX(){r.pop()},pushModX(e){r.push(e)},replaceCurrentModX(e){r[r.length-1]=e},singleline:n.rules.singleline},a=[],s;for(dP.lastIndex=0;s=dP.exec(e);){let t=function(e,t,n,i){let[r,o]=n;if("["===n||"[^"===n){let e=function(e,t,n){let i=[dz("^"===t[1],t)],r=1,o;for(dI.lastIndex=n;o=dI.exec(e);){let e=o[0];if("["===e[0]&&":"!==e[1])r++,i.push(dz("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===i.at(-1).type)i.push(dj(93,e));else if(r--,i.push({type:"CharacterClassClose",raw:e}),!r)break}else{let t=function(e){if("\\"===e[0])return dD(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!dL.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return dB("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:dj(dE(e),e)}(e);Array.isArray(t)?i.push(...t):i.push(t)}}return{tokens:i,lastIndex:dI.lastIndex||e.length}}(t,n,i);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===r){if("AbBGyYzZ".includes(o))return{token:d$(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:{type:"Subroutine",raw:n}}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:dO(n)}}if("K"===o)return{token:dH("keep",n)};if("N"===o||"R"===o)return{token:dB("newline",n,{negate:"N"===o})};if("O"===o)return{token:dB("any",n)};if("X"===o)return{token:dB("text_segment",n)};let e=dD(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===r){if("*"===o)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:i,args:r}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(""===i)throw Error(`Named callout tag with empty value not allowed "${e}"`);let o=r?r.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[a,s,l]=o,d=dF.has(n)?n.toLowerCase():"custom";switch(d){case"fail":case"mismatch":case"skip":if(o.length>0)throw Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw Error(`Named callout allows only one argument "${o}"`);if("string"==typeof a)throw Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!o.length||o.length>2)throw Error(`Named callout must have one or two arguments "${o}"`);if("string"==typeof a&&!/^[A-Za-z_]\w*$/.test(a))throw Error(`Named callout argument one must be a tag or number "${a}"`);if(2===o.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case"count":case"total_count":if(o.length>1)throw Error(`Named callout allows only one argument "${o}"`);if(1===o.length&&("number"==typeof a||!/^[<>X]$/.test(a)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(3!==o.length)throw Error(`Named callout must have three arguments "${o}"`);if("string"==typeof a&&!/^[A-Za-z_]\w*$/.test(a))throw Error(`Named callout argument one must be a tag or number "${a}"`);if("number"==typeof s||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${d}"`)}return{type:"NamedCallout",kind:d,tag:i??null,arguments:r?.split(",")??null,raw:e}}(n)};if("(?{"===n)throw Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(")"!==t[i])throw Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:function(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";let r=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),o=dq(n),a=dq(i),s={};if(o&&(s.enable=o),a&&(s.disable=a),e.endsWith(")"))return t.replaceCurrentModX(r),dH("flags",e,{flags:s});if(e.endsWith(":"))return t.pushModX(r),t.numOpenGroups++,dU("group",e,{...(o||a)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===n&&!e.captureGroup||"(?:"===n)return{token:dU("group",n)};if("(?>"===n)return{token:dU("atomic",n)};if("(?="===n||"(?!"===n||"(?<="===n||"(?<!"===n)return{token:dU("<"===n[2]?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if("("===n&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:dU("capturing",n,{..."("!==n&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if("(?~|"===n)throw Error(`Unsupported absence function kind "${n}"`);return{token:dU("absence_repeater",n)}}throw"(?("===n?Error(`Unsupported conditional "${n}"`):Error(`Invalid or unsupported group option "${n}"`)}if(")"===n){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:n}}}if(e.getCurrentModX()){if("#"===n){let e=t.indexOf(`
86
+ `,i);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=i,{lastIndex:e.exec(t)?e.lastIndex:i}}}return"."===n?{token:dB("dot",n)}:"^"===n||"$"===n?{token:d$(e.singleline?({"^":d_`\A`,$:d_`\Z`})[n]:n,n)}:"|"===n?{token:{type:"Alternator",raw:n}}:dM.test(n)?{tokens:function(e){let t,n=[],i=RegExp(dM,"gy");for(;t=i.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:r,max:o}=t.groups;if(+r>+o&&e.endsWith("?")){i.lastIndex--,n.push(dW(e.slice(0,-1)));continue}}}n.push(dW(e))}return n}(n)}:{token:dj(dE(n),n)}}(o,e,s[0],dP.lastIndex);t.tokens?a.push(...t.tokens):t.token&&a.push(t.token),void 0!==t.lastIndex&&(dP.lastIndex=t.lastIndex)}let l=[],d=0;a.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++d:"("===e.raw&&l.push(e)}),d||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let u=d||l.length;return{tokens:a.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:n,inCharClass:i}=e,r=n.slice(1);if(!i&&("0"!==r&&1===r.length||"0"!==r[0]&&+r<=t))return[dO(n)];let o=[],a=r.match(/^[0-7]+|\d/g);for(let e=0;e<a.length;e++){let t,i=a[e];if(0===e&&"8"!==i&&"9"!==i){if((t=parseInt(i,8))>127)throw Error(d_`Octal encoded byte above 177 unsupported "${n}"`)}else t=dE(i);o.push(dj(t,(0===e?"\\":"")+i))}return o}(e,u):e).flat(),flags:i}}(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case"Alternator":return dY();case"Assertion":return function({kind:e}){return dJ(dN({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===d_`\B`||e===d_`\Y`})}(n);case"Backreference":return function({raw:e},t){let n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),r=(n,i=!1)=>{let r=t.capturingGroups.length,o=!1;if(n>r)if(t.skipBackrefValidation)o=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,dQ(i?r+1-n:n,{orphan:o})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(n)return r(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(i))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw Error(`Group name not defined to the left "${e}"`);return dQ(i)}return r(+i)}(n,a);case"Character":return d0(n.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t){let{tokens:n,walk:i}=e,r=e.parent,o=r.body.at(-1),a=n[e.nextIndex];if(!t.isCheckingRangeEnd&&o&&"CharacterClass"!==o.type&&"CharacterClassRange"!==o.type&&a&&"CharacterClassOpen"!==a.type&&"CharacterClassClose"!==a.type&&"CharacterClassIntersector"!==a.type){let e=i(r,{...t,isCheckingRangeEnd:!0});if("Character"===o.type&&"Character"===e.type)return r.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(o,e);throw Error("Invalid character class range")}return d0(dE("-"))}(a,t);case"CharacterClassOpen":return function({negate:e},t,n){let{tokens:i,walk:r}=t,o=[d1()],a=i[t.nextIndex],s=ui(a);for(;"CharacterClassClose"!==s.type;){if("CharacterClassIntersector"===s.type)o.push(d1()),t.nextIndex++;else{let e=o.at(-1);e.body.push(r(e,n))}s=ui(i[t.nextIndex],a)}let l=d1({negate:e});return 1===o.length?l.body=o[0].body:(l.kind="intersection",l.body=o.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(n,a,t);case"CharacterSet":return function({kind:e,negate:t,value:n},i){let{normalizeUnknownPropertyNames:r,skipPropertyNameValidation:o,unicodePropertyMap:a}=i;if("property"===e){let i=un(n);if(!dL.has(i)||a?.has(i))return d4(n,{negate:t,normalizeUnknownPropertyNames:r,skipPropertyNameValidation:o,unicodePropertyMap:a});e="posix",n=i}return"posix"===e?function(e,t){let n=!!t?.negate;if(!dL.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):d2(e,{negate:t})}(n,a);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:dN(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(n.kind,{flags:n.flags});case"GroupOpen":return function(e,t,n){var i,r;let{tokens:o,capturingGroups:a,namedGroupsByName:s,skipLookbehindValidation:l,walk:d}=t,u=function({flags:e,kind:t,name:n,negate:i,number:r}){switch(t){case"absence_repeater":var o="repeater";!1;return{type:"AbsenceFunction",kind:o,body:d7(void 0)};case"atomic":return d8({atomic:!0});case"capturing":return dZ(r,{name:n});case"group":return d8({flags:e});case"lookahead":case"lookbehind":return d5({behind:"lookbehind"===t,negate:i});default:throw Error(`Unexpected group kind "${t}"`)}}(e),c="AbsenceFunction"===u.type,h=ut(u),f=h&&u.negate;if("CapturingGroup"===u.type&&(a.push(u),u.name&&(i=u.name,r=[],s.has(i)||s.set(i,r),s.get(i)).push(u)),c&&n.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let p=ur(o[t.nextIndex]);for(;"GroupClose"!==p.type;){if("Alternator"===p.type)u.body.push(dY()),t.nextIndex++;else{let e=u.body.at(-1),t=d(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||f});if(e.body.push(t),(h||n.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(ue(t)||"CapturingGroup"===t.type)throw Error(e)}else if(ue(t)||ut(t)&&t.negate)throw Error(e)}}p=ur(o[t.nextIndex])}return t.nextIndex++,u}(n,a,t);case"NamedCallout":var i,o;return i=n.kind,o=n.tag,{type:"NamedCallout",kind:i,tag:o,arguments:n.arguments};case"Quantifier":return function({kind:e,min:t,max:n},i){let r=i.parent,o=r.body.at(-1);if(!o||!dX.has(o.type))throw Error("Quantifier requires a repeatable token");let a=d6(e,t,n,o);return r.body.pop(),a}(n,a);case"Subroutine":return function({raw:e},t){let{capturingGroups:n,subroutines:i}=t,r=e.slice(3,-1),o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(r);if(o){let e=+o.groups.num,i=n.length;if(t.hasNumberedRef=!0,(r=({"":e,"+":i+e,"-":i+1-e})[o.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===r&&(r=0);let a=d3(r);return i.push(a),a}(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:i.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:i.skipBackrefValidation,skipLookbehindValidation:i.skipLookbehindValidation,skipPropertyNameValidation:i.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:i.unicodePropertyMap,walk:o},s=(n={type:"Flags",...r.flags},{type:"Regex",body:d7(void 0),flags:n}),l=s.body[0];for(;a.nextIndex<r.tokens.length;){let e=o(l,{});"Alternative"===e.type?(s.body.push(e),l=e):l.body.push(e)}let{capturingGroups:d,hasNumberedRef:u,namedGroupsByName:c,subroutines:h}=a;if(u&&c.size&&!i.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of h)if("number"==typeof e){if(e>d.length)throw Error("Subroutine uses a group number that's not defined");e&&(d[e-1].isSubroutined=!0)}else if(c.has(e)){if(c.get(e).length>1)throw Error(d_`Subroutine uses a duplicate group name "\g<${e}>"`);c.get(e)[0].isSubroutined=!0}else throw Error(d_`Subroutine uses a group name that's not defined "\g<${e}>"`);return s}function dY(e){return{type:"Alternative",body:d9(e?.body)}}function dJ(e,t){let n={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(n.negate=!!t?.negate),n}function dQ(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function dZ(e,t){var n;let i={name:void 0,isSubroutined:!1,...t};if(void 0!==i.name&&(n=i.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(n)))throw Error(`Group name "${i.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...i.name&&{name:i.name},...i.isSubroutined&&{isSubroutined:i.isSubroutined},body:d7(t?.body)}}function d0(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function d1(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:d9(e?.body)}}function d2(e,t){let n=!!t?.negate,i={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(i.negate=n),"text_segment"!==e&&("newline"!==e||n)||(i.variableLength=!0),i}function d8(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:d7(e?.body)}}function d5(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:d7(e?.body)}}function d6(e,t,n,i){if(t>n)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function d3(e){return{type:"Subroutine",ref:e}}function d4(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},i=n.unicodePropertyMap?.get(un(e));if(!i){if(n.normalizeUnknownPropertyNames)i=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(d_`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function d7(e){if(void 0===e)e=[dY()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function d9(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function ue(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function ut(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function un(e){return e.replace(/[- _]+/g,"").toLowerCase()}function ui(e,t){return dN(e,`Unclosed character class${t?.type==="Character"&&93===t.value&&"]"===t.raw?' (started with "]")':""}`)}function ur(e){return dN(e,"Unclosed group")}function uo(e,t,n=null){function i(e,t){for(let n=0;n<e.length;n++){let i=r(e[n],t,n,e);n=Math.max(-1,n+i)}}function r(o,a=null,s=null,l=null){let d=0,u=!1,c={node:o,parent:a,key:s,container:l,root:e,remove(){ua(l).splice(Math.max(0,us(s)+d),1),d--,u=!0},removeAllNextSiblings:()=>ua(l).splice(us(s)+1),removeAllPrevSiblings(){let e=us(s)+d;return d-=e,ua(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;l?l[Math.max(0,us(s)+d)]=e:dN(a,"Can't replace root node")[s]=e,n&&r(e,a,s,l),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(ua(l).splice(Math.max(0,us(s)+d),1,...e),d+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=r(e[n],a,us(s)+n+t,l)}u=!0},skip(){u=!0}},{type:h}=o,f=t["*"],p=t[h],m="function"==typeof f?f:f?.enter,g="function"==typeof p?p:p?.enter;if(m?.(c,n),g?.(c,n),!u)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":r(o.min,o,"min"),r(o.max,o,"max");break;case"Quantifier":r(o.body,o,"body");break;case"Regex":i(o.body,o),r(o.flags,o,"flags");break;default:throw Error(`Unexpected node type "${h}"`)}return p?.exit?.(c,n),f?.exit?.(c,n),d}return r(e),e}function ua(e){if(!Array.isArray(e))throw Error("Container expected");return e}function us(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let ul=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,ud=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function uu(e,t,n,i){let r=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1],a=0,s="";for(let t of e.matchAll(r)){let{0:e,groups:{$skip:r}}=t;if(!r&&(!i||i===ud.DEFAULT==!a)){n instanceof Function?s+=n(t,{context:a?ud.CHAR_CLASS:ud.DEFAULT,negated:o[o.length-1]}):s+=n;continue}"["===e[0]?(a++,o.push("^"===e[1])):"]"===e&&a&&(a--,o.pop()),s+=e}return s}function uc(e,t,n){return!!function(e,t,n=0,i){let r;if(!RegExp(t,"su").test(e))return null;let o=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let a=0;for(;r=o.exec(e);){let{0:e,groups:{$skip:t}}=r;if(!t&&(!i||i===ud.DEFAULT==!a))return r;"["===e?a++:"]"===e&&a&&a--,o.lastIndex==r.index&&o.lastIndex++}return null}(e,t,0,n)}let uh=RegExp(String.raw`(?<noncapturingStart>${ul})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),uf=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,up=RegExp(String.raw`
87
+ \\(?: \d+
88
+ | c[A-Za-z]
89
+ | [gk]<[^>]+>
90
+ | [pPu]\{[^\}]+\}
91
+ | u[A-Fa-f\d]{4}
92
+ | x[A-Fa-f\d]{2}
93
+ )
94
+ | \((?: \? (?: [:=!>]
95
+ | <(?:[=!]|[^>]+>)
96
+ | [A-Za-z\-]+:
97
+ | \(DEFINE\)
98
+ ))?
99
+ | (?<qBase>${uf})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
100
+ | \\?.
101
+ `.replace(/\s+/g,""),"gsu"),um=String.raw,ug=um`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ub=um`\(\?R=(?<rDepth>[^\)]+)\)|${ug}`,uv=um`\(\?<(?![=!])(?<captureName>[^>]+)>`,uy=um`${uv}|(?<unnamed>\()(?!\?)`,uw=RegExp(um`${uv}|${ub}|\(\?|\\?.`,"gsu"),ux="Cannot use multiple overlapping recursions";function uk(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e*=1)<2||e>100)throw Error(t)}function uS(e,t,n,i,r,o,a){let s=new Set;i&&uu(e+t,uv,({groups:{captureName:e}})=>{s.add(e)},ud.DEFAULT);let l=[n,i?s:null,r,o,a];return`${e}${uC(`(?:${e}`,"forward",...l)}(?:)${uC(`${t})`,"backward",...l)}${t}`}function uC(e,t,n,i,r,o,a){let s=e=>"forward"===t?e+2:n-e+2-1,l="";for(let t=0;t<n;t++){let n=s(t);l+=uu(e,um`${uy}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:l}})=>{if(l&&i&&!i.has(l))return e;let d=`_$${n}`;if(s||t){let n=a+o.length+1;return o.push(n),function(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}(r,n),s?e:`(?<${t}${d}>`}return um`\k<${l}${d}>`},ud.DEFAULT)}return l}function uA(e,t,n,i,r,o){if(e.size&&i){let a=0;uu(t,uy,()=>a++,ud.DEFAULT);let s=o-a+r,l=new Map;return e.forEach((e,t)=>{let r=(i-a*n)/n,o=a*n,d=t>s+a?t+i:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+a+r)u.push(t+i);else if(t<=s+a)for(let e=0;e<=n;e++)u.push(t+a*e);else for(let e=0;e<=n;e++)u.push(t+o+r*e);l.set(d,u)}),l}return e}var uE=String.fromCodePoint,uL=String.raw,u_={},uN=globalThis.RegExp;function uT(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function uR(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}u_.flagGroups=(()=>{try{new uN("(?i:)")}catch{return!1}return!0})(),u_.unicodeSets=(()=>{try{new uN("[[]]","v")}catch{return!1}return!0})(),u_.bugFlagVLiteralHyphenIsRange=!!u_.unicodeSets&&(()=>{try{new uN(uL`[\d\-a]`,"v")}catch{return!0}return!1})(),u_.bugNestedClassIgnoresNegation=u_.unicodeSets&&new uN("[[^a]]","v").test("a");var uM={ES2025:2025,ES2024:2024,ES2018:2018},uP={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function uI(e={}){if("[object Object]"!==({}).toString.call(e))throw Error("Unexpected options");if(void 0!==e.target&&!uP[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return"auto"===t.target&&(t.target=u_.flagGroups?"ES2025":u_.unicodeSets?"ES2024":"ES2018"),t}var uD=new Set([uE(304),uE(305)]),u$=uL`[\p{L}\p{M}\p{N}\p{Pc}]`;function uO(e){if(uD.has(e))return[e];let t=new Set,n=e.toLowerCase(),i=n.toUpperCase(),r=uH.get(n),o=uz.get(n),a=uB.get(n);return 1==[...i].length&&t.add(i),a&&t.add(a),r&&t.add(r),t.add(n),o&&t.add(o),[...t]}var uj=new Map(`C Other
102
+ Cc Control cntrl
103
+ Cf Format
104
+ Cn Unassigned
105
+ Co Private_Use
106
+ Cs Surrogate
107
+ L Letter
108
+ LC Cased_Letter
109
+ Ll Lowercase_Letter
110
+ Lm Modifier_Letter
111
+ Lo Other_Letter
112
+ Lt Titlecase_Letter
113
+ Lu Uppercase_Letter
114
+ M Mark Combining_Mark
115
+ Mc Spacing_Mark
116
+ Me Enclosing_Mark
117
+ Mn Nonspacing_Mark
118
+ N Number
119
+ Nd Decimal_Number digit
120
+ Nl Letter_Number
121
+ No Other_Number
122
+ P Punctuation punct
123
+ Pc Connector_Punctuation
124
+ Pd Dash_Punctuation
125
+ Pe Close_Punctuation
126
+ Pf Final_Punctuation
127
+ Pi Initial_Punctuation
128
+ Po Other_Punctuation
129
+ Ps Open_Punctuation
130
+ S Symbol
131
+ Sc Currency_Symbol
132
+ Sk Modifier_Symbol
133
+ Sm Math_Symbol
134
+ So Other_Symbol
135
+ Z Separator
136
+ Zl Line_Separator
137
+ Zp Paragraph_Separator
138
+ Zs Space_Separator
139
+ ASCII
140
+ ASCII_Hex_Digit AHex
141
+ Alphabetic Alpha
142
+ Any
143
+ Assigned
144
+ Bidi_Control Bidi_C
145
+ Bidi_Mirrored Bidi_M
146
+ Case_Ignorable CI
147
+ Cased
148
+ Changes_When_Casefolded CWCF
149
+ Changes_When_Casemapped CWCM
150
+ Changes_When_Lowercased CWL
151
+ Changes_When_NFKC_Casefolded CWKCF
152
+ Changes_When_Titlecased CWT
153
+ Changes_When_Uppercased CWU
154
+ Dash
155
+ Default_Ignorable_Code_Point DI
156
+ Deprecated Dep
157
+ Diacritic Dia
158
+ Emoji
159
+ Emoji_Component EComp
160
+ Emoji_Modifier EMod
161
+ Emoji_Modifier_Base EBase
162
+ Emoji_Presentation EPres
163
+ Extended_Pictographic ExtPict
164
+ Extender Ext
165
+ Grapheme_Base Gr_Base
166
+ Grapheme_Extend Gr_Ext
167
+ Hex_Digit Hex
168
+ IDS_Binary_Operator IDSB
169
+ IDS_Trinary_Operator IDST
170
+ ID_Continue IDC
171
+ ID_Start IDS
172
+ Ideographic Ideo
173
+ Join_Control Join_C
174
+ Logical_Order_Exception LOE
175
+ Lowercase Lower
176
+ Math
177
+ Noncharacter_Code_Point NChar
178
+ Pattern_Syntax Pat_Syn
179
+ Pattern_White_Space Pat_WS
180
+ Quotation_Mark QMark
181
+ Radical
182
+ Regional_Indicator RI
183
+ Sentence_Terminal STerm
184
+ Soft_Dotted SD
185
+ Terminal_Punctuation Term
186
+ Unified_Ideograph UIdeo
187
+ Uppercase Upper
188
+ Variation_Selector VS
189
+ White_Space space
190
+ XID_Continue XIDC
191
+ XID_Start XIDS`.split(/\s/).map(e=>[un(e),e])),uz=new Map([["s",uE(383)],[uE(383),"s"]]),uB=new Map([[uE(223),uE(7838)],[uE(107),uE(8490)],[uE(229),uE(8491)],[uE(969),uE(8486)]]),uH=new Map([uF(453),uF(456),uF(459),uF(498),...uG(8072,8079),...uG(8088,8095),...uG(8104,8111),uF(8124),uF(8140),uF(8188)]),uU=new Map([["alnum",uL`[\p{Alpha}\p{Nd}]`],["alpha",uL`\p{Alpha}`],["ascii",uL`\p{ASCII}`],["blank",uL`[\p{Zs}\t]`],["cntrl",uL`\p{Cc}`],["digit",uL`\p{Nd}`],["graph",uL`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",uL`\p{Lower}`],["print",uL`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",uL`[\p{P}\p{S}]`],["space",uL`\p{space}`],["upper",uL`\p{Upper}`],["word",uL`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",uL`\p{AHex}`]]);function uF(e){let t=uE(e);return[t.toLowerCase(),t]}function uG(e,t){return(function(e,t){let n=[];for(let i=e;i<=t;i++)n.push(i);return n})(e,t).map(e=>uF(e))}var uW=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),uq={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:i,kind:r}=e;if("repeater"===r){let e=d8();e.body[0].body.push(d5({negate:!0,body:i}),d4("Any"));let r=d8();r.body[0].body.push(d6("greedy",0,1/0,e)),n(u5(r,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:i}){let r=e.body.filter(e=>"flags"===e.kind);for(let e=n+1;e<t.body.length;e++)uR(i,t.body[e],[]).push(...r)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=uQ(t.get(e));if(n){let t=d8({flags:n});t.body[0].body=e.body,e.body=[u5(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:i,root:r,remove:o,replaceWith:a},s){let{kind:l,negate:d}=e,{asciiWordBoundaries:u,avoidSubclass:c,supportedGNodes:h,wordIsAscii:f}=s;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${d?"Y":"y"}"`);if("line_end"===l)a(u5(d5({body:[dY({body:[dJ("string_end")]}),dY({body:[d0(10)]})]}),t));else if("line_start"===l)a(u5(u1(uL`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(h.has(e))r.flags.sticky=!0,o();else{var p;let e,r=i[n-1];if(r&&((e=["Character","CharacterClass","CharacterSet"]).includes((p=r).type)||"Quantifier"===p.type&&p.min&&e.includes(p.body.type)))a(u5(d5({negate:!0}),t));else if(c)throw Error(uL`Uses "\G" in a way that requires a subclass`);else a(u8(dJ("string_start"),t)),s.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)a(u5(u1(uL`(?=\n?\z)`),t));else if("word_boundary"===l){if(!f&&!u){let e=`(?:(?<=${u$})(?!${u$})|(?<!${u$})(?=${u$}))`,n=`(?:(?<=${u$})(?=${u$})|(?<!${u$})(?!${u$}))`;a(u5(u1(d?n:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||u0(n)||(e.ref=n=uJ(n,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:i}=e;i&&!u0(i)&&(e.name=i=uJ(i,t)),n.set(e.number,e),i&&n.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){"intersection"===t.kind&&n(u5(d1({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:i,minTargetEs2024:r,digitIsAscii:o,spaceIsAscii:a,wordIsAscii:s}){let{kind:l,negate:d,value:u}=e;if(o&&("digit"===l||"digit"===u))return void n(u8(d2("digit",{negate:d}),t));if(a&&("space"===l||"space"===u))return void n(u5(u2(u1("[ -\r ]"),d),t));if(s&&("word"===l||"word"===u))return void n(u8(d2("word",{negate:d}),t));if("any"===l)n(u8(d4("Any"),t));else if("digit"===l)n(u8(d4("Nd",{negate:d}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===i)throw Error(uL`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",o=uL`\p{RI}{2}|${e}(?:\u200D${e})*`;n(u5(u1(uL`(?>\r\n|${r?uL`\p{RGI_Emoji}`:o}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)n(u8(d4("AHex",{negate:d}),t));else if("newline"===l)n(u5(u1(d?"[^\n]":"(?>\r\n?|[\n\v\f…\u2028\u2029])"),t));else if("posix"===l)if(r||"graph"!==u&&"print"!==u)n(u5(u2(u1(uU.get(u)),d),t));else{if("strict"===i)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];d&&(e=`\0-${uE(e.codePointAt(0)-1)}${uE(e.codePointAt(2)+1)}-\u{10FFFF}`),n(u5(u1(`[${e}]`),t))}else if("property"===l)uj.has(un(u))||(e.key="sc");else if("space"===l)n(u8(d4("space",{negate:d}),t));else if("word"===l)n(u5(u2(u1(u$),d),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:r,removeAllPrevSiblings:o,removeAllNextSiblings:a}){let{kind:s,flags:l}=e;if("flags"===s)if(l.enable||l.disable){let e=d8({flags:l});e.body[0].body=a(),r(u5(e,t),{traverse:!0})}else i();else if("keep"===s){let e=n.body[0],i=1===n.body.length&&dV(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:n;if(t.parent!==i||i.body.length>1)throw Error(uL`Uses "\K" in a way that's unsupported`);let a=d5({behind:!0});a.body[0].body=o(),r(u5(a,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;"lookbehind"===n&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:i}=e;if("fail"===i)n(u5(d5({negate:!0}),t));else throw Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=d8();t.body[0].body.push(e.body),e.body=u5(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],i=!1,r=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let n=t.find(e=>"search_start"===e.kind||function(e,t){let n={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===n.negate||e.negate===n.negate)&&1===e.body.length&&dV(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!n)return null;if("search_start"===n.kind)return n;if("LookaroundAssertion"===n.type)return n.body[0].body[0];if("CapturingGroup"===n.type||"Group"===n.type){let t=[];for(let i of n.body){let n=e(i.body);if(!n)return null;Array.isArray(n)?t.push(...n):t.push(n)}return t}return null}(t.body);e?(i=!0,Array.isArray(e)?n.push(...e):n.push(e)):r=!0}i&&!r&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if("strict"===t&&n&&i)throw Error(uL`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||u0(n)||(e.ref=n=uJ(n,t))}},uV={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:i,ref:r}=e;i||n.set(e,[...t.get(r).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:r,groupsByName:o,multiplexCapturesToLeftByRef:a,openRefs:s,reffedNodesByReferencer:l}){let d=r.get(e);if(d&&s.has(e.number)){let i=u8(uY(e.number),t);l.set(i,s.get(e.number)),n(i);return}s.set(e.number,e),a.set(e.number,[]),e.name&&uR(a,e.name,[]);let u=a.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(d===n.node||d&&d===n.origin||e===n.origin){u.splice(t,1);break}}if(a.get(e.number).push({node:e,origin:d}),e.name&&a.get(e.name).push({node:e,origin:d}),e.name){let t=uR(o,e.name,new Map),n=!1;if(d)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=uT(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){let{isRecursive:r,ref:o}=e;if(r){let n=t;for(;(n=n.parent)&&("CapturingGroup"!==n.type||n.name!==o&&n.number!==o););i.reffedNodesByReferencer.set(e,n);return}let a=i.subroutineRefMap.get(o),s=0===o,l=s?uY(0):function e(t,n,i,r){let o=Array.isArray(t)?[]:{};for(let[a,s]of Object.entries(t))"parent"===a?o.parent=Array.isArray(i)?r:i:s&&"object"==typeof s?o[a]=e(s,n,o,i):("type"===a&&"CapturingGroup"===s&&n.set(o,n.get(t)??t),o[a]=s);return o}(a,i.groupOriginByCopy,null),d=l;if(!s){var u,c;let e=uQ(function(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}(a,e=>"Group"===e.type&&!!e.flags)),t=e?uT(i.globalFlags,e):i.globalFlags;u=t,c=i.currentFlags,(u.dotAll!==c.dotAll||u.ignoreCase!==c.ignoreCase)&&(d=d8({flags:function({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},e||(n.disable.dotAll=!0),t||(n.disable.ignoreCase=!0)),n}(t)})).body[0].body.push(l)}n(u5(d,t),{traverse:!s})}},uX={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}let r=i.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let n=t;do{if("Regex"===n.type)return!1;if("Alternative"===n.type)continue;if(n===e)return!1;for(let t of uZ(n.parent)){if(t===n)break;if(t===e||function e(t,n){for(let i of uZ(t)??[])if(i===n||e(i,n))return!0;return!1}(t,e))return!0}}while(n=n.parent)throw Error("Unexpected path")})(t,e));r.length?r.length>1?n(u5(d8({atomic:!0,body:r.reverse().map(e=>dY({body:[dQ(e.number)]}))}),t)):e.ref=r[0].number:n(u5(d5({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=dZ();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function uK(e){uo(e,{"*"({node:e,parent:t}){e.parent=t}})}function uY(e){let t=d3(e);return t.isRecursive=!0,t}function uJ(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function uQ(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable)?n:null}function uZ(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function u0(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function u1(e,t){let n=dK(e,{...t,unicodePropertyMap:uj}).body;return n.length>1||n[0].body.length>1?d8({body:n}):n[0].body[0]}function u2(e,t){return e.negate=t,e}function u8(e,t){return e.parent=t,e}function u5(e,t){return uK(e),e.parent=t,e}var u6={"*":{enter({node:e},t){if(co(e)){let n=t.getCurrentModI();t.pushModI(e.flags?uT({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){co(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){cn(uE(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),ci(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&uW.has(e.value)&&t.setHasCasedChar()}},u3={Alternative:({body:e},t,n)=>e.map(n).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?uL`\B`:uL`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:i,name:r,number:o}=e,a={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(a.hidden=!0,o>s.number&&(a.transferTo=s.number)),t.captureMap.set(o,a),`(${r?`?<${r}>`:""}${i.map(n).join("|")})`},Character({value:e},t){let n=uE(e),i=cr(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&cn(n)){let e=uO(n);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:i,negate:r,parent:o}=e,{body:a}=e;if("intersection"===i&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");u_.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(ca)&&(a=[d0(45),...a.filter(e=>!ca(e))]);let s=()=>`[${r?"^":""}${a.map(n).join("intersection"===i?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||u_.bugNestedClassIgnoresNegation)&&!r){let t=a.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let i=d8(),r=i.body[0];return i.parent=o,r.parent=i,e.body=a=a.filter(e=>!t.includes(e)),a.length?(e.parent=r,r.body.push(e)):i.body.pop(),t.forEach(e=>{let t=dY({body:[e]});e.parent=t,t.parent=i,i.body.push(t)}),n(i)}}t.inCharClass=!0;let i=s();return t.inCharClass=!1,i}let l=a[0];if("union"===i&&!r&&l&&((!t.useFlagV||!t.verbose)&&"union"===o.kind&&!(u_.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===o.kind&&1===a.length&&"CharacterClassRange"!==l.type))return a.map(n).join("");if(!t.useFlagV&&"CharacterClass"===o.type)throw Error("Uses nested character class in a way that requires min target ES2024");return s()},CharacterClassRange(e,t){let n=e.min.value,i=e.max.value,r={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=cr(n,r),a=cr(i,r),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],i=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?i??=t[e]:null===i?n.push(t[e]):(n.push([i,t[e]]),i=null);return n})(ci(e)).forEach(e=>{s.add(Array.isArray(e)?`${cr(e[0],r)}-${cr(e[1],r)}`:cr(e,r))}),`${o}-${a}${[...s].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},r){if("dot"===e)return r.currentFlags.dotAll?r.appliedGlobalFlags.dotAll||r.useFlagMods?".":"[^]":uL`[^\n]`;if("digit"===e)return t?uL`\D`:uL`\d`;if("property"===e){if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase&&uW.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?uL`\P`:uL`\p`}{${i?`${i}=`:""}${n}}`}if("word"===e)return t?uL`\W`:uL`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:n,parent:i},r,o){let a=r.currentFlags;n&&(r.currentFlags=uT(a,n));let s=t.map(o).join("|"),l=r.verbose||1!==t.length||"Quantifier"===i.type||e||r.useFlagMods&&n?`(?${function(e,t,n){if(e)return">";let i="";if(t&&n){let{enable:e,disable:n}=t;i=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(n?"-":"")+(n?.ignoreCase?"i":"")+(n?.dotAll?"s":"")}return`${i}:`}(e,n,r.useFlagMods)}${s})`:s;return r.currentFlags=a,l},LookaroundAssertion({body:e,kind:t,negate:n},i,r){let o=`${"lookahead"===t?"":"<"}${n?"!":"="}`;return`(?${o}${e.map(r).join("|")})`},Quantifier:(e,t,n)=>n(e.body)+function({kind:e,max:t,min:n}){return(n||1!==t?n||t!==1/0?1===n&&t===1/0?"+":n===t?`{${n}}`:`{${n},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let i=n.recursionLimit;return 0===t?`(?R=${i})`:uL`\g<${t}&R=${i}>`}},u4=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),u7=new Set(["-","\\","]","^","["]),u9=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),ce=new Map([[9,uL`\t`],[10,uL`\n`],[11,uL`\v`],[12,uL`\f`],[13,uL`\r`],[8232,uL`\u2028`],[8233,uL`\u2029`],[65279,uL`\uFEFF`]]),ct=/^\p{Cased}$/u;function cn(e){return ct.test(e)}function ci(e,t){let n=!!t?.firstOnly,i=e.min.value,r=e.max.value,o=[];if(i<65&&(65535===r||r>=131071)||65536===i&&r>=131071)return o;for(let e=i;e<=r;e++){let t=uE(e);if(!cn(t))continue;let a=uO(t).filter(e=>{let t=e.codePointAt(0);return t<i||t>r});if(a.length&&(o.push(...a),n))break}return o}function cr(e,{escDigit:t,inCharClass:n,useFlagV:i}){var r;if(ce.has(e))return ce.get(e);if(e<32||e>126&&e<160||e>262143||t&&(r=e)>47&&r<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let o=uE(e);return((n?i?u9:u7:u4).has(o)?"\\":"")+o}function co({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function ca({type:e,value:t}){return"Character"===e&&45===t}var cs=class e extends RegExp{#t=new Map;#n=null;#i;#r=null;#o=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,n,i){const r=!!i?.lazyCompile;if(t instanceof RegExp){if(i)throw Error("Cannot provide options when copying a regexp");super(t,n),this.#i=t.source,t instanceof e&&(this.#t=t.#t,this.#r=t.#r,this.#o=t.#o,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...i};super(r?"":t,n),this.#i=t,this.#t=function(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,i]of t)for(let t of i)uR(n,t,{}).transferTo=e;return n}(e.hiddenCaptures,e.transfers),this.#o=e.strategy,this.rawOptions=i??{}}r||(this.#n=this)}exec(t){if(!this.#n){let{lazyCompile:t,...n}=this.rawOptions;this.#n=new e(this.#i,this.flags,n)}let n=this.global||this.sticky,i=this.lastIndex;if("clip_search"===this.#o&&n&&i){this.lastIndex=0;let e=this.#a(t.slice(i));return e&&(function(e,t,n,i){if(e.index+=t,e.input=n,i){let n=e.indices;for(let e=0;e<n.length;e++){let i=n[e];i&&(n[e]=[i[0]+t,i[1]+t])}let i=n.groups;i&&Object.keys(i).forEach(e=>{let n=i[e];n&&(i[e]=[n[0]+t,n[1]+t])})}}(e,i,t,this.hasIndices),this.lastIndex+=i),e}return this.#a(t)}#a(e){let t;this.#n.lastIndex=this.lastIndex;let n=super.exec.call(this.#n,e);if(this.lastIndex=this.#n.lastIndex,!n||!this.#t.size)return n;let i=[...n];n.length=1,this.hasIndices&&(t=[...n.indices],n.indices.length=1);let r=[0];for(let e=1;e<i.length;e++){let{hidden:o,transferTo:a}=this.#t.get(e)??{};if(o?r.push(null):(r.push(n.length),n.push(i[e]),this.hasIndices&&n.indices.push(t[e])),a&&void 0!==i[e]){let o=r[a];if(!o)throw Error(`Invalid capture transfer to "${o}"`);if(n[o]=i[e],this.hasIndices&&(n.indices[o]=t[e]),n.groups){this.#r||(this.#r=function(e){let t,n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map,r=0,o=0;for(;t=n.exec(e);){let{0:e,groups:{capture:n,name:a}}=t;"["===e?r++:r?"]"===e&&r--:n&&(o++,a&&i.set(o,a))}return i}(this.source));let r=this.#r.get(a);r&&(n.groups[r]=i[e],this.hasIndices&&(n.indices.groups[r]=t[e]))}}}return n}};let cl=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],cd=[...cl,"pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],cu=new Set(cl),cc={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},ch={"pierre-dark":()=>e.A(68939),"pierre-dark-soft":()=>e.A(40534),"pierre-dark-vibrant":()=>e.A(73116),"pierre-dark-protanopia-deuteranopia":()=>e.A(6457),"pierre-dark-tritanopia":()=>e.A(34331),"pierre-light":()=>e.A(75193),"pierre-light-soft":()=>e.A(22453),"pierre-light-vibrant":()=>e.A(80660),"pierre-light-protanopia-deuteranopia":()=>e.A(11361),"pierre-light-tritanopia":()=>e.A(93154)};async function cf({themes:t,langs:n,preferredHighlighter:i="shiki-js"}){let r=!function(e=o){return null!=e&&"then"in e}(o??=dC({themes:[],langs:["text"],engine:"shiki-wasm"===i?l7(e.A(86581)):function(e={}){let t={target:"auto",cache:new Map,...e};return t.regexConstructor||=e=>{let n;return(n=function(e,t){var n;let i,r,o,a,s=uI(t),l=(n=dK(e,{flags:s.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:s.rules.captureGroup,singleline:s.rules.singleline},skipBackrefValidation:s.rules.allowOrphanBackrefs,unicodePropertyMap:uj}),i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:s.accuracy,asciiWordBoundaries:s.rules.asciiWordBoundaries,avoidSubclass:s.avoidSubclass,bestEffortTarget:s.target}},uK(n),r={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:uM[i.bestEffortTarget]>=uM.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:n.flags.digitIsAscii,spaceIsAscii:n.flags.spaceIsAscii,wordIsAscii:n.flags.wordIsAscii},uo(n,uq,r),a={currentFlags:o={dotAll:n.flags.dotAll,ignoreCase:n.flags.ignoreCase},prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap},uo(n,uV,a),uo(n,uX,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),n._originMap=a.groupOriginByCopy,n._strategy=r.strategy,n),d=function(e,t){let n=uI(t),i=uM[n.target]>=uM.ES2024,r=uM[n.target]>=uM.ES2025,o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw Error("Invalid recursionLimit; use 2-20");let a=null,s=null;if(!r){let t=[e.flags.ignoreCase];uo(e,u6,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?a=!0:s=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!s)},d=e,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:d,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!r&&a&&s),useFlagMods:r,useFlagV:i,verbose:n.verbose};function c(e){return u.lastNode=d,d=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(u3[e.type],`Unexpected node type "${e.type}"`)(e,u,c)}let h={pattern:e.body.map(c).join("|"),flags:c(e.flags),options:{...e.options}};return i||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&h._hiddenCaptures.push(t),e.transferTo&&uR(h._captureTransfers,e.transferTo,[]).push(t)}),h}(l,s),u=function(e,t){let n,{hiddenCaptures:i,mode:r}={hiddenCaptures:[],mode:"plugin",...t},o=t?.captureTransfers??new Map;if(!RegExp(ub,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if("plugin"===r&&uc(e,um`\(\?\(DEFINE\)`,ud.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let a=[],s=uc(e,um`\\[1-9]`,ud.DEFAULT),l=new Map,d=[],u=!1,c=0,h=0;for(uw.lastIndex=0;n=uw.exec(e);){let{0:t,groups:{captureName:f,rDepth:p,gRNameOrNum:m,gRDepth:g}}=n;if("["===t)c++;else if(c)"]"===t&&c--;else if(p){if(uk(p),u)throw Error(ux);if(s)throw Error(`${"external"===r?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,n.index),l=e.slice(uw.lastIndex);if(uc(l,ub,ud.DEFAULT))throw Error(ux);let d=p-1;e=uS(t,l,d,!1,i,a,h),o=uA(o,t,d,a.length,0,h);break}else if(m){uk(g);let c=!1;for(let e of d)if(e.name===m||e.num===+m){if(c=!0,e.hasRecursedWithin)throw Error(ux);break}if(!c)throw Error(um`Recursive \g cannot be used outside the referenced group "${"external"===r?m:um`\g<${m}&R=${g}>`}"`);let f=l.get(m),p=function(e,t){let n,i=/\\?./gsu;i.lastIndex=t;let r=e.length,o=0,a=1;for(;n=i.exec(e);){let[e]=n;if("["===e)o++;else if(o)"]"===e&&o--;else if("("===e)a++;else if(")"===e&&!--a){r=n.index;break}}return e.slice(t,r)}(e,f);if(s&&uc(p,um`${uv}|\((?!\?)`,ud.DEFAULT))throw Error(`${"external"===r?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let b=e.slice(f,n.index),v=p.slice(b.length+t.length),y=a.length,w=g-1,x=uS(b,v,w,!0,i,a,h);o=uA(o,b,w,a.length-y,y,h);let k=e.slice(0,f),S=e.slice(f+p.length);e=`${k}${x}${S}`,uw.lastIndex+=x.length-t.length-b.length-v.length,d.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(f)h++,l.set(String(h),uw.lastIndex),l.set(f,uw.lastIndex),d.push({num:h,name:f});else if("("===t[0]){let e="("===t;e&&(h++,l.set(String(h),uw.lastIndex)),d.push(e?{num:h}:{})}else")"===t&&d.pop()}return i.push(...a),{pattern:e,captureTransfers:o,hiddenCaptures:i}}(d.pattern,{captureTransfers:d._captureTransfers,hiddenCaptures:d._hiddenCaptures,mode:"external"}),c=function(e,t){let n,i=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:i};let o="(?:(?=(",a=[0],s=[],l=0,d=0,u=NaN;do{let t;n=!1;let c=0,h=0,f=!1;for(uh.lastIndex=Number.isNaN(u)?0:u+o.length;t=uh.exec(e);){let{0:p,index:m,groups:{capturingStart:g,noncapturingStart:b}}=t;if("["===p)c++;else if(c)"]"===p&&c--;else if("(?>"!==p||f){if(f&&b)h++;else if(g)f?h++:(l++,a.push(l+d));else if(")"===p&&f){if(!h){let t=l+ ++d;e=`${e.slice(0,u)}${o}${e.slice(u+3,m)}))<$$${t}>)${e.slice(m+1)}`,n=!0,s.push(t);for(let e=0;e<i.length;e++)i[e]>=t&&i[e]++;if(r.size){let e=new Map;r.forEach((n,i)=>{e.set(i>=t?i+1:i,n.map(e=>e>=t?e+1:e))}),r=e}break}h--}}else u=m,f=!0}}while(n)return i.push(...s),{pattern:e=uu(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>a.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${a[n]}`}return`\\${n}`},ud.DEFAULT),captureTransfers:r,hiddenCaptures:i}}(function(e){let t;if(!RegExp(`${uf}\\+`).test(e))return{pattern:e};let n=[],i=null,r=null,o="",a=0;for(up.lastIndex=0;t=up.exec(e);){let{0:d,index:u,groups:{qBase:c,qMod:h,invalidQ:f}}=t;if("["===d)a||(r=u),a++;else if("]"===d)a?a--:r=null;else if(!a)if("+"===h&&o&&!o.startsWith("(")){if(f)throw Error(`Invalid quantifier "${d}"`);let t=-1;if(/^\{\d+\}$/.test(c)){var s,l;s=e,l=u+c.length,e=s.slice(0,l)+""+s.slice(l+h.length)}else{if(")"===o||"]"===o){let t=")"===o?i:r;if(null===t)throw Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${c})${e.slice(u+d.length)}`}else e=`${e.slice(0,u-o.length)}(?>${o}${c})${e.slice(u+d.length)}`;t+=4}up.lastIndex+=t}else"("===d[0]?n.push(u):")"===d&&(i=n.length?n.pop():null);o=d}return{pattern:e}}(u.pattern).pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:c.pattern,flags:`${s.hasIndices?"d":""}${s.global?"g":""}${d.flags}${d.options.disable.v?"u":"v"}`};if(s.avoidSubclass){if(s.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=c.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(c.captureTransfers),n=l._strategy,i=h.pattern.length>=s.lazyCompileLength;(e.length||t.length||n||i)&&(h.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...n&&{strategy:n},...i&&{lazyCompile:i}})}return h}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...{target:t.target}})).options?new cs(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)},{createScanner:e=>new dA(e,t),createString:e=>({content:e})}}()}))?o:await o;o=r;let a=[];for(let e of n){if("text"===e||"ansi"===e)continue;let t=a3(e);"then"in t?a.push(t):aZ(t,r)}let s=[];for(let e of t){let t=st.getResolvedTheme(e)??lF(e);"then"in t?s.push(t):si(t,o)}return(a.length>0||s.length>0)&&await Promise.all([Promise.all(a).then(e=>{aZ(e,r)}),Promise.all(s).then(e=>{si(e,r)})]),r}for(let e of sr({themes:cd.map(e=>lD({name:e,collection:"pierre",colorScheme:cu.has(e)?"light":"dark",displayName:cc[e],load:ch[e]}))}).getThemes())st.registerThemeIfAbsent(e.name,e.load);function cp(e=rx){let t=[];return"string"==typeof e?t.push(e):(t.push(e.dark),t.push(e.light)),t}function cm(e){for(let t of cp(e))if(!sn.has(t))return!1;return!0}function cg(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function cb(e){return{...rS,...e}}function cv(e,t){var n,i;let r=(n=e,i=t,n.paddingTop??(i?n.spacing:0));return t?r:e.diffHeaderHeight+r}function cy(e){return e.paddingBottom??e.spacing}function cw({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}){let o=Math.max(t,0);if(0===o||e)return{fromStart:0,fromEnd:0,rangeSize:o,collapsedLines:o,renderAll:!1};if(!0===n||o<=r)return{fromStart:o,fromEnd:0,rangeSize:o,collapsedLines:0,renderAll:!0};let a=n?.get(i),s=Math.min(Math.max(a?.fromStart??0,0),o),l=Math.min(Math.max(a?.fromEnd??0,0),o),d=s+l,u=d>=o;return{fromStart:u?o:s,fromEnd:u?0:l,rangeSize:o,collapsedLines:Math.max(o-d,0),renderAll:u}}function cx({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(null==n||e.isPartial||0===e.additionLines.length||0===e.deletionLines.length)return 0;let i=e.additionLines.length-(n.additionLineIndex+n.additionCount),r=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(i<=0&&r<=0)return 0;if(i!==r)throw Error(`${t}: trailing context mismatch (additions=${i}, deletions=${r}) for ${e.name}`);return Math.min(i,r)}function ck({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:r}){if(t!==e.hunks.length-1)return;let o=cx({fileDiff:e,errorPrefix:r});if(o<=0)return;if(!0===n||o<=i)return{fromStart:o,fromEnd:0,rangeSize:o,collapsedLines:0,renderAll:!0};let a=n?.get(e.hunks.length),s=Math.min(Math.max(a?.fromStart??0,0),o);return{fromStart:s,fromEnd:0,rangeSize:o,collapsedLines:o-s,renderAll:s>=o}}function cS({type:e,metrics:t}){return t.hunkSeparatorHeight??function(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}(e)}function cC({type:e,metrics:t}){return"simple"===e||"metadata"===e||"line-info-basic"===e?0:t.spacing}function cA({type:e,metrics:t,hunkIndex:n,hunkSpecs:i}){if(!function({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return null!=n;case"line-info":case"line-info-basic":case"custom":return!0}}({type:e,hunkIndex:n,hunkSpecs:i}))return;let r=cS({type:e,metrics:t}),o=cC({type:e,metrics:t}),a=n>0?o:0;return{height:r,gapBefore:a,gapAfter:o,totalHeight:a+r+o}}function cE({type:e,metrics:t}){if("simple"===e||"metadata"===e)return;let n=cS({type:e,metrics:t}),i=cC({type:e,metrics:t});return{height:n,gapBefore:i,gapAfter:0,totalHeight:i+n}}function cL({diff:e,diffStyle:t,startingLine:n=0,totalLines:i=1/0,expandedHunks:r,collapsedContextThreshold:o=1,callback:a}){let s=function({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:r}){if(n<=0||"both"===t)return{hunkIndex:0,splitCount:0,unifiedCount:0};let o=function({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let i=0,r=0,o=e.hunks.length-1,a=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let l=e.hunks[s];if(null==l)throw Error("iterateOverDiff: invalid hunk summary index");let d=cw({isPartial:e.isPartial,rangeSize:l.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=d.fromStart+d.fromEnd;i+=u+l.splitLineCount,r+=u+l.unifiedLineCount;let c=s===o?ck({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"iterateOverDiff"}):void 0;if(null!=c){let e=c.fromStart+c.fromEnd;i+=e,r+=e}a.push({splitCount:i,unifiedCount:r})}return a}({diff:e,expandedHunks:i,collapsedContextThreshold:r}),a=0,s=e.hunks.length-1,l=e.hunks.length;for(;a<=s;){let e=a+s>>1,i=o[e+1];if(null==i)throw Error("iterateOverDiff: invalid hunk prefix index");("unified"===t?i.unifiedCount:i.splitCount)>n?(l=e,s=e-1):a=e+1}if(l>=e.hunks.length){let t=o[e.hunks.length];if(null==t)throw Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let d=o[l];if(null==d)throw Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:l,splitCount:d.splitCount,unifiedCount:d.unifiedCount}}({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:o}),l={viewportStart:n,viewportEnd:n+i,isWindowedHighlight:n>0||i<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!l.isWindowedHighlight)return!1;let e=l.unifiedCount>=n+i,r=l.splitCount>=n+i;return"unified"===t?e:"split"===t?r:e&&r},shouldSkip(e,i){if(!l.isWindowedHighlight)return!1;let r=l.unifiedCount+e<n,o=l.splitCount+i<n;return"unified"===t?r:"split"===t?o:r&&o},incrementCounts(e,n){("unified"===t||"both"===t)&&(l.unifiedCount+=e),("split"===t||"both"===t)&&(l.splitCount+=n)},isInWindow(e,n){if(!l.isWindowedHighlight)return!0;let i=l.isInUnifiedWindow(e),r=l.isInSplitWindow(n);return"unified"===t?i:"split"===t?r:i||r},isInUnifiedWindow:e=>!l.isWindowedHighlight||l.unifiedCount>=n-e&&l.unifiedCount<n+i,isInSplitWindow:e=>!l.isWindowedHighlight||l.splitCount>=n-e&&l.splitCount<n+i,emit:(e,n=!1)=>(n||("unified"===t?l.incrementCounts(1,0):"split"===t?l.incrementCounts(0,1):l.incrementCounts(1,1)),a(e)??!1)};e:for(let n=s.hunkIndex;n<e.hunks.length;n++){let i=e.hunks[n];if(null==i)throw Error("iterateOverDiff: invalid hunk index");if(l.shouldBreak())break;let a=cw({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:r,hunkIndex:n,collapsedContextThreshold:o}),s=n===l.finalHunkIndex?ck({fileDiff:e,hunkIndex:n,expandedHunks:r,collapsedContextThreshold:o,errorPrefix:"iterateOverDiff"}):void 0,c=a.fromStart+a.fromEnd;function d(e,n){return null==s||s.collapsedLines<=0||s.fromStart+s.fromEnd>0?0:"unified"===t?e===i.unifiedLineStart+i.unifiedLineCount-1?s.collapsedLines:0:n===i.splitLineStart+i.splitLineCount-1?s.collapsedLines:0}let h=0===a.collapsedLines;function u(){return h?0:(h=!0,a.collapsedLines)}if(l.shouldSkip(c,c))l.incrementCounts(c,c),u();else{let e=i.unifiedLineStart-a.rangeSize,r=i.splitLineStart-a.rangeSize,o=i.deletionLineIndex-a.rangeSize,s=i.additionLineIndex-a.rangeSize,d=i.deletionStart-a.rangeSize,c=i.additionStart-a.rangeSize;if(c_(l,a.fromStart,t,t=>l.emit({hunkIndex:n,hunk:i,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:d+t,lineIndex:o+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:r+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:r+t,lineIndex:s+t,lineNumber:c+t,noEOFCR:!1}}))||(e=i.unifiedLineStart-a.fromEnd,r=i.splitLineStart-a.fromEnd,o=i.deletionLineIndex-a.fromEnd,s=i.additionLineIndex-a.fromEnd,d=i.deletionStart-a.fromEnd,c=i.additionStart-a.fromEnd,c_(l,a.fromEnd,t,t=>l.emit({hunkIndex:n,hunk:i,collapsedBefore:u(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:d+t,lineIndex:o+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:r+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:r+t,lineIndex:s+t,lineNumber:c+t,noEOFCR:!1}}),()=>{u()})))break}let f=i.unifiedLineStart,p=i.splitLineStart,m=i.deletionLineIndex,g=i.additionLineIndex,b=i.deletionStart,v=i.additionStart,y=i.hunkContent.at(-1);for(let e of i.hunkContent){if(l.shouldBreak())break e;let r=e===y;if("context"===e.type){if(l.shouldSkip(e.lines,e.lines))l.incrementCounts(e.lines,e.lines),u();else if(c_(l,e.lines,t,t=>{let o=r&&t===e.lines-1,a=f+t,s=p+t;return l.emit({hunkIndex:n,hunk:i,collapsedBefore:u(),collapsedAfter:d(a,s),type:"context",deletionLine:{lineNumber:b+t,lineIndex:m+t,noEOFCR:o&&i.noEOFCRDeletions,unifiedLineIndex:a,splitLineIndex:s},additionLine:{unifiedLineIndex:a,splitLineIndex:s,lineIndex:g+t,lineNumber:v+t,noEOFCR:o&&i.noEOFCRAdditions}})},()=>{u()}))break e;f+=e.lines,p+=e.lines,m+=e.lines,g+=e.lines,b+=e.lines,v+=e.lines}else{let o=Math.max(e.deletions,e.additions),a=e.deletions+e.additions;if(!l.shouldSkip(a,o)){let s=function(e,t,n){if(!e.isWindowedHighlight)return[[0,"unified"===n?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let i="unified"===n?"unified":"split",r=[];function o(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let i=Math.max(0,e.viewportStart-t),r=Math.min(n,e.viewportEnd-t);return r>i?[i,r]:void 0}function a(e,n){if(null==e)return;let[o,a]="split"===i?e:"additions"===n?[e[0]+t.deletions,e[1]+t.deletions]:e;a>o&&r.push([o,a])}if("split"!==n&&(a(o(e.unifiedCount,t.deletions),"deletions"),a(o(e.unifiedCount+t.deletions,t.additions),"additions")),"unified"!==n&&(a(o(e.splitCount,t.deletions),"deletions"),a(o(e.splitCount,t.additions),"additions")),0===r.length)return r;r.sort((e,t)=>e[0]-t[0]);let s=[r[0]];for(let[e,t]of r.slice(1)){let n=s[s.length-1];e<=n[1]?n[1]=Math.max(n[1],t):s.push([e,t])}return s}(l,e,t);for(let[c,h]of((s[0]?.[0]??0)>0&&u(),s))for(let s=c;s<h;s++){let c=d(f+s,"unified"===t?p+(s<e.deletions?s:s-e.deletions):p+s);if(l.emit(function({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,diffStyle:r,index:o,unifiedLineIndex:a,splitLineIndex:s,additionLineIndex:l,deletionLineIndex:d,additionLineNumber:u,deletionLineNumber:c,content:h,isLastContent:f,unifiedCount:p,splitCount:m}){let g=o<h.deletions?a+o:void 0,b="unified"===r?o>=h.deletions?a+o:void 0:o<h.additions?a+h.deletions+o:void 0,v="unified"===r?s+(o<h.deletions?o:o-h.deletions):s+o,y=o<h.deletions?d+o:void 0,w=o<h.deletions?c+o:void 0,x="unified"===r?o>=h.deletions?l+(o-h.deletions):void 0:o<h.additions?l+o:void 0,k="unified"===r?o>=h.deletions?u+(o-h.deletions):void 0:o<h.additions?u+o:void 0,S="unified"===r?f&&o===h.deletions-1&&t.noEOFCRDeletions:f&&o===m-1&&t.noEOFCRDeletions,C="unified"===r?f&&o===p-1&&t.noEOFCRAdditions:f&&o===m-1&&t.noEOFCRAdditions,A=null!=y&&null!=w&&null!=g?{lineNumber:w,lineIndex:y,noEOFCR:S,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=null!=x&&null!=k&&null!=b?{unifiedLineIndex:b,splitLineIndex:v,lineIndex:x,lineNumber:k,noEOFCR:C}:void 0;if(null==A&&null!=E)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:void 0,additionLine:E};if(null!=A&&null==E)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:A,additionLine:void 0};if(null==A||null==E)throw Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:A,additionLine:E}}({hunkIndex:n,hunk:i,collapsedBefore:u(),collapsedAfter:c,diffStyle:t,index:s,unifiedLineIndex:f,splitLineIndex:p,additionLineIndex:g,deletionLineIndex:m,additionLineNumber:v,deletionLineNumber:b,content:e,isLastContent:r,unifiedCount:a,splitCount:o}),!0))break e}}u(),l.incrementCounts(a,o),f+=a,p+=o,m+=e.deletions,g+=e.additions,b+=e.deletions,v+=e.additions}}if(null!=s){let{collapsedLines:n,fromStart:i,fromEnd:r}=s,o=i+r;if(c_(l,o,t,t=>{let i=t===o-1;return l.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:i?n:0,type:"context-expanded",deletionLine:{lineNumber:b+t,lineIndex:m+t,noEOFCR:!1,unifiedLineIndex:f+t,splitLineIndex:p+t},additionLine:{unifiedLineIndex:f+t,splitLineIndex:p+t,lineIndex:g+t,lineNumber:v+t,noEOFCR:!1}})},void 0,()=>l.shouldBreak()))break}}}function c_(e,t,n,i,r,o){let[a,s]=function(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let i=[];function r(n){let r=Math.max(0,e.viewportStart-n),o=Math.min(t,e.viewportEnd-n);o>r&&i.push([r,o])}if("split"!==n&&r(e.unifiedCount),"unified"!==n&&r(e.splitCount),0===i.length)return[0,0];let o=i[0][0],a=i[0][1];for(let e=1;e<i.length;e++){let t=i[e];o=Math.min(o,t[0]),a=Math.max(a,t[1])}return[o,a]}(e,t,n);a>0&&(e.incrementCounts(a,a),r?.());let l=a;for(;l<t;){if(o?.()===!0)return!0;if(l>=s){e.incrementCounts(t-l,t-l);break}if(e.isInWindow(0,0)){if(!0===i(l))return!0}else e.incrementCounts(1,1);l++}return!1}function cN(e,t){return rQ(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function cT(e){return r5({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function cR(e){return r5({tagName:"div",children:[r5({tagName:"span",children:[r8("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function cM(e){return r5({tagName:"div",children:[r6({name:"both"===e?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":"both"===e?"":void 0,"data-expand-up":"up"===e?"":void 0,"data-expand-down":"down"===e?"":void 0}})}function cP({type:e,content:t,expandIndex:n,chunked:i=!1,slotName:r,isFirstHunk:o,isLastHunk:a}){let s=0,l=[];if("metadata"===e&&null!=t&&l.push(r5({tagName:"div",children:[r8(t)],properties:{"data-separator-wrapper":""}})),("line-info"===e||"line-info-basic"===e)&&null!=t){let e=[];null!=n&&(i?(!o&&(e.push(cM("up")),s++),!a&&(e.push(cM("down")),s++)):(e.push(cM(o||a?o?"down":"up":"both")),s++)),e.push(r5({tagName:"div",children:[r5({tagName:"span",children:[r8(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),i&&null!=n&&e.push(r5({tagName:"div",children:[r8("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),l.push(r5({tagName:"div",children:e,properties:{"data-separator-wrapper":"","data-separator-multi-button":s>1?"":void 0}}))}return"custom"===e&&null!=r&&l.push(r5({tagName:"slot",properties:{name:r}})),r5({tagName:"div",children:l,properties:{"data-separator":0===l.length?"simple":e,"data-expand-index":n,"data-separator-first":o?"":void 0,"data-separator-last":a?"":void 0}})}let cI=Symbol("no-token"),cD=Symbol("multiple-tokens");function c$(e){if("element"===e.type)for(let t of(e.properties["data-char"]=void 0,e.children))c$(t)}Symbol("highlighted-lines");let cO=function(e={}){let{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=e=>e}=e,r=new Map;function o(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}function a(e){let a=t+function(e,t=0){let n=0xdeadbeef^t,i=0x41c6ce57^t;for(let t=0,r;t<e.length;t++)n=Math.imul(n^(r=e.charCodeAt(t)),0x9e3779b1),i=Math.imul(i^r,0x5f356495);return n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(i^i>>>13,0xc2b2ae35),(0x100000000*(2097151&(i=Math.imul(i^i>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35)))+(n>>>0)).toString(36).slice(0,6)}("string"==typeof e?e:o(e))+n;return a=i(a),r.has(a)||r.set(a,"string"==typeof e?e:{...e}),a}return{name:"@shikijs/transformers:style-to-class",pre(e){if(!e.properties.style)return;let t=a(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=a(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry:()=>r,getCSS(){let e="";for(let[t,n]of r.entries())e+=`.${t}{${"string"==typeof n?n:o(n)}}`;return e},clearRegistry(){r.clear()}}}({classPrefix:"hl-"}),cj={name:"token-style-normalizer",tokens(e){for(let t of e)for(let e of t){if(null!=e.htmlStyle)continue;let t={};null!=e.color&&(t.color=e.color),null!=e.bgColor&&(t["background-color"]=e.bgColor),null!=e.fontStyle&&0!==e.fontStyle&&((1&e.fontStyle)!=0&&(t["font-style"]="italic"),(2&e.fontStyle)!=0&&(t["font-weight"]="bold"),(4&e.fontStyle)!=0&&(t["text-decoration"]="underline")),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function cz(e){return`--${"token"===e?"diffs-token":"diffs"}-`}let cB=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,cH=/^0(?:\.0+)?%?$/;function cU(e){if(null==e)return null;let t=function(e){let t,n=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(null==n)return null;let i=n[1],r=1;return 3===i.length?t=i.split("").map(e=>e+e).join(""):6===i.length?t=i:(t=i.slice(0,6),r=parseInt(i.slice(6,8),16)/255),[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),r]}(e);if(null==t)return null;let n=t[0]/255,i=t[1]/255,r=t[2]/255,o=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(i)+.0722*o(r)}function cF(e){if(null==e)return!1;let t=e.trim().toLowerCase();if("transparent"===t||cB.test(t))return!0;let n=function(e){let t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let i=e.slice(t+1,-1).trim();if(0===i.length)return;let r=i.lastIndexOf("/");if(-1!==r)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=i.split(",");if(4===e.length)return e[3]?.trim()}}(t);return null!=n&&cH.test(n)}let cG=new WeakMap;function cW(e){var t,n;let i=cG.get(e);if(null!=i)return i;let r=e.colors??{},o={...r},a=r["editor.background"]??e.bg,s=r["editor.foreground"]??e.fg,l=r["sideBar.background"]??a,d=r["sideBar.foreground"]??s;cq(o,"editor.background",a),cq(o,"editor.foreground",s),cq(o,"sideBar.background",l),cq(o,"sideBar.foreground",d),cq(o,"input.background",r["input.background"]??l),cq(o,"sideBarSectionHeader.foreground",r["sideBarSectionHeader.foreground"]??d),cq(o,"list.activeSelectionForeground",r["list.activeSelectionForeground"]??d),cq(o,"gitDecoration.addedResourceForeground",cV(r["gitDecoration.addedResourceForeground"],r["terminal.ansiGreen"],r["editorGutter.addedBackground"])),cq(o,"gitDecoration.modifiedResourceForeground",cV(r["gitDecoration.modifiedResourceForeground"],r["terminal.ansiBlue"],r["editorGutter.modifiedBackground"])),cq(o,"gitDecoration.deletedResourceForeground",cV(r["gitDecoration.deletedResourceForeground"],r["terminal.ansiRed"],r["editorGutter.deletedBackground"]));let u=(cF(r["list.focusOutline"])?void 0:r["list.focusOutline"])??(cF(r.focusBorder)?void 0:r.focusBorder);null!=u?o["list.focusOutline"]=u:delete o["list.focusOutline"];let c=r["list.hoverBackground"];null!=c&&(t=c,null!=(n=l)&&t.toLowerCase()===n.toLowerCase()||function(e,t,n){if(null==t||null==n)return!1;let i=cU(e),r=cU(t),o=cU(n);return null!=i&&null!=r&&null!=o&&Math.abs(i-o)<Math.abs(i-r)}(c,l,d))&&delete o["list.hoverBackground"];let h=Object.freeze({...e,colors:Object.freeze(o)});return cG.set(e,h),h}function cq(e,t,n){null!=n&&""!==n&&(e[t]=n)}function cV(...e){for(let t of e)if(null!=t&&""!==t)return t}function cX(e,t){t=null!=t?`${t}-`:"";let n="",i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];null!=i&&(n+=`${cz("global")}${t}addition-color:${i};`);let r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];null!=r&&(n+=`${cz("global")}${t}deletion-color:${r};`);let o=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return null!=o&&(n+=`${cz("global")}${t}modified-color:${o};`),n}function cK(e){let t=e.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t.children;t="children"in t?t.children[0]:null}throw console.error(e),Error("getLineNodes: Unable to find children")}function cY({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function cJ({item:e,arr:t,enableJoin:n,isNeutral:i=!1,isLastItem:r=!1}){let o=t[t.length-1];if(null==o||r||!n)return void t.push([+!i,e.value]);let a=0===o[0];if(i===a||i&&1===e.value.length&&!a){o[1]+=e.value;return}t.push([+!i,e.value])}let cQ=new class extends aP{};function cZ(e,t){let n;for(n=0;n<e.length&&n<t.length&&e[n]==t[n];n++);return e.slice(0,n)}function c0(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length&&e[e.length-(n+1)]==t[t.length-(n+1)];n++);return e.slice(-n)}function c1(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function c2(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function c8(e,t){return c1(e,t,"")}function c5(e,t){return t.slice(0,function(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let i=t.length;e.length<t.length&&(i=e.length);let r=Array(i),o=0;r[0]=0;for(let e=1;e<i;e++){for(t[e]==t[o]?r[e]=r[o]:r[e]=o;o>0&&t[e]!=t[o];)o=r[o];t[e]==t[o]&&o++}o=0;for(let i=n;i<e.length;i++){for(;o>0&&e[i]!=t[o];)o=r[o];e[i]==t[o]&&o++}return o}(e,t))}function c6(e,t){let n=[];for(let i of Array.from(t.segment(e))){let e=i.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function c3(e,t){let n;if(t)return c7(e,t)[1];for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function c4(e,t){if(t)return c7(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:""}function c7(e,t){if(!t)return[c4(e),c3(e)];if("word"!=t.resolvedOptions().granularity)throw Error('The segmenter passed must have a granularity of "word"');let n=c6(e,t),i=n[0],r=n[n.length-1];return[/\s/.test(i)?i:"",/\s/.test(r)?r:""]}let c9="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",he=RegExp(`[${c9}]+|\\s+|[^${c9}]`,"ug");function ht(e,t,n,i,r){var o,a,s,l;if(t&&n){let[s,l]=c7(t.value,r),[d,u]=c7(n.value,r);if(e){let i=cZ(s,d);e.value=c2(e.value,d,i),t.value=c8(t.value,i),n.value=c8(n.value,i)}if(i){let e=c0(l,u);i.value=c1(i.value,u,e),o=t.value,t.value=c2(o,e,""),a=n.value,n.value=c2(a,e,"")}}else if(n){if(e){let e=c4(n.value,r);n.value=n.value.substring(e.length)}if(i){let e=c4(i.value,r);i.value=i.value.substring(e.length)}}else if(e&&i){let n=c4(i.value,r),[o,a]=c7(t.value,r),l=cZ(n,o);t.value=c8(t.value,l);let d=c0(c8(n,l),a);s=t.value,t.value=c2(s,d,""),i.value=c1(i.value,n,d),e.value=c2(e.value,n,n.slice(0,n.length-d.length))}else if(i){let e=c4(i.value,r),n=c5(c3(t.value,r),e);l=t.value,t.value=c2(l,n,"")}else if(e){let n=c5(c3(e.value,r),c4(t.value,r));t.value=c8(t.value,n)}}new class extends aP{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let i=t.intlSegmenter;if("word"!=i.resolvedOptions().granularity)throw Error('The segmenter passed must have a granularity of "word"');n=c6(e,i)}else n=e.match(he)||[];let i=[],r=null;return n.forEach(e=>{/\s/.test(e)?null==r?i.push(e):i.push(i.pop()+e):null!=r&&/\s/.test(r)?i[i.length-1]==r?i.push(i.pop()+e):i.push(r+e):i.push(e),r=e}),i}join(e){return e.map((e,t)=>0==t?e:e.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,i=null,r=null;return e.forEach(e=>{e.added?i=e:e.removed?r=e:((i||r)&&ht(n,r,i,e,t.intlSegmenter),n=e,i=null,r=null)}),(i||r)&&ht(n,r,i,null,t.intlSegmenter),e}};let hn=new class extends aP{tokenize(e){let t=RegExp(`(\\r?\\n)|[${c9}]+|[^\\S\\n\\r]+|[^${c9}]`,"ug");return e.match(t)||[]}},hi={forcePlainText:!1},hr=-1;var ho=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++hr}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:rx},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=cm(e.theme??rx)?function(){if(null!=o&&!("then"in o))return o}():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let i={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};("up"===t||"both"===t)&&(i.fromStart+=n),("down"===t||"both"===t)&&(i.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,i)}getExpandedHunk(e){return this.expandedHunks.get(e)??rC}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){for(let t of(this.additionAnnotations={},this.deletionAnnotations={},e)){let e=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return"change"!==t?{gutterLineType:t}:{gutterLineType:"deletions"===e?"change-deletion":"change-addition"}}createAnnotationElement=e=>r5({tagName:"div",children:[r5({tagName:"div",children:e.annotations?.map(e=>r5({tagName:"slot",properties:{name:e}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}});getOptionsWithDefaults(){let{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:i=!1,disableLineNumbers:r=!1,disableVirtualizationBuffers:o=!1,collapsed:a=!1,expandUnchanged:s=!1,collapsedContextThreshold:l=1,expansionLineCount:d=100,hunkSeparators:u="line-info",lineDiffType:c="word-alt",maxLineDiffLength:h=1e3,overflow:f="scroll",stickyHeader:p=!1,theme:m=rx,headerRenderMode:g="default",tokenizeMaxLineLength:b=1e3,tokenizeMaxLength:v=1e5,useTokenTransformer:y=!1,useCSSClasses:w=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:i,disableLineNumbers:r,disableVirtualizationBuffers:o,collapsed:a,expandUnchanged:s,collapsedContextThreshold:l,expansionLineCount:d,hunkSeparators:u,lineDiffType:c,maxLineDiffLength:h,overflow:f,stickyHeader:p,theme:this.workerManager?.getDiffRenderOptions().theme??m,headerRenderMode:g,tokenizeMaxLineLength:b,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:w}}async initializeHighlighter(){return this.highlighter=await cf(function(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cp(t),preferredHighlighter:n}}(this.computedLang,this.options)),this.highlighter}hydrate(e){if(null==e)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=hp(e,this.getTokenizeMaxLength()),i=this.workerManager?.getDiffResultCache(e);null==i||cN(t,i.options)||(i=void 0),this.renderCache??={diff:e,highlighted:!n&&!aW(e),options:t,result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?null!=this.renderCache.result||n||this.workerManager.highlightDiffAST(this,this.diff):null==this.highlighter&&(this.computedLang=e.lang??aG(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{var e;if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:t,tokenizeMaxLineLength:n,lineDiffType:i,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:t,useTokenTransformer:!0===(e=this.options).useTokenTransformer||null!=e.onTokenClick||null!=e.onTokenEnter||null!=e.onTokenLeave,tokenizeMaxLineLength:n,lineDiffType:i,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result!=null&&cg(e,n.diff)&&cN(t,n.options)?{options:t,forceHighlight:!1}:{options:t,forceHighlight:!0}}renderDiff(e=this.renderCache?.diff,t=rA){if(null==e)return;let{expandUnchanged:n=!1,collapsedContextThreshold:i}=this.getOptionsWithDefaults(),{options:r,forceHighlight:o}=this.getRenderOptions(e),a=this.getMatchingWorkerResultCache(e,r);null==a||this.hasHighlightedRenderCache(e,r)||(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...a},o=!1),this.renderCache??={diff:e,highlighted:!1,options:r,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,l=!s||aW(e)||hp(e,this.getTokenizeMaxLength()),d=!cg(e,this.renderCache.diff),u=!aA(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0){(l||null==this.renderCache.result||!this.renderCache.highlighted&&(d||u))&&(this.renderCache.diff=e,this.renderCache.options=r,this.renderCache.highlighted=!1,(null==this.renderCache.result||d||u||o)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,0===t.startingLine&&t.totalLines===1/0&&0===t.bufferBefore&&0===t.bufferAfter||!!n||this.expandedHunks,i)),this.renderCache.renderRange=t);!l&&s&&(!this.renderCache.highlighted||o)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLang=e.lang??aG(e.name);let t=null!=this.highlighter&&cm(r.theme),n=null!=this.highlighter&&aQ(this.computedLang),i=!l&&n;if(null!=this.highlighter&&t&&(o||l||!this.renderCache.highlighted&&i||null==this.renderCache.result)){let{result:t,options:r}=this.renderDiffWithHighlighter(e,this.highlighter,l||!n);this.renderCache={diff:e,options:r,highlighted:i,result:t,renderRange:void 0}}t&&(l||n)||this.asyncHighlight(e).then(({result:t,options:n})=>{null!=this.renderCache&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n,!l)})}return null!=this.renderCache.result?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=rA){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:i,disableBackground:r,disableLineNumbers:o,overflow:a}=this.getOptionsWithDefaults();return r5({tagName:"pre",properties:function({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:a,customProperties:s}){return{...s,"data-diff":"diff"===a?"":void 0,"data-file":"file"===a?"":void 0,"data-diff-type":"diff"===a?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":"bars"===e||"classic"===e?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}({type:"diff",diffIndicators:i,disableBackground:r,disableLineNumbers:o,overflow:a,split:e,totalLines:t,customProperties:n})})}async asyncHighlight(e){let t=hp(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??aG(e.name);let n=null!=this.highlighter&&cm(this.options.theme??rx),i=t||null!=this.highlighter&&aQ(this.computedLang);return null!=this.highlighter&&n&&i||(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:i}=this.getRenderOptions(e),{collapsedContextThreshold:r}=this.getOptionsWithDefaults();return{result:function(e,t,n,{forcePlainText:i,startingLine:r,totalLines:o,expandedHunks:a,collapsedContextThreshold:s=1}=hi){i?(r??=0,o??=1/0):(r=0,o=1/0);let l=r>0||o<1/0,d="string"==typeof n.theme?t.getTheme(n.theme).type:void 0,u=function({theme:e=rx,highlighter:t,prefix:n}){let i="";if("string"==typeof e){let r=t.getTheme(e),o=cW(r);i+=`color:${o.fg};`,i+=`background-color:${o.bg};`,i+=`${cz("global")}fg:${o.fg};`,i+=`${cz("global")}bg:${o.bg};`,i+=cX(r,n)}else{let n=t.getTheme(e.dark),r=cW(n);i+=`${cz("global")}dark:${r.fg};`,i+=`${cz("global")}dark-bg:${r.bg};`,i+=cX(n,"dark"),r=cW(n=t.getTheme(e.light)),i+=`${cz("global")}light:${r.fg};`,i+=`${cz("global")}light-bg:${r.bg};`,i+=cX(n,"light")}return i}({theme:n.theme,highlighter:t}),c=i&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,h={deletionLines:[],additionLines:[]},{maxLineDiffLength:f}=n,p=!i&&!e.isPartial,m=new Map;function g(e,t,n,i){if(l){let e=n.at(-1);(null==e||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:i.length,count:0},n.push(e)),e.count++}i.push(e)}for(let d of(cL({diff:e,diffStyle:"both",startingLine:r,totalLines:o,expandedHunks:!l||(i?a:void 0),collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:i,type:r})=>{let o,a,s=(o=p?0:t,a=m.get(o)??{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]},m.set(o,a),a),l=null!=n?n.splitLineIndex:i.splitLineIndex;"change"===r&&null!=n&&null!=i&&function({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:i,deletionDecorations:r,additionDecorations:o,lineDiffType:a,maxLineDiffLength:s}){var l,d,u,c;if(null==e||null==t||"none"===a||(e=rL(e),t=rL(t),e.length>s||t.length>s))return;let h="char"===a?(l=e,d=t,cQ.diff(l,d,void 0)):(u=e,c=t,hn.diff(u,c,void 0)),f=[],p=[],m="word-alt"===a,g=h.at(-1);for(let e of h){let t=e===g;e.added||e.removed?e.removed?cJ({item:e,arr:f,enableJoin:m,isLastItem:t}):cJ({item:e,arr:p,enableJoin:m,isLastItem:t}):(cJ({item:e,arr:f,enableJoin:m,isNeutral:!0,isLastItem:t}),cJ({item:e,arr:p,enableJoin:m,isNeutral:!0,isLastItem:t}))}let b=0;for(let e of f)1===e[0]&&r.push(cY({line:n,spanStart:b,spanLength:e[1].length})),b+=e[1].length;for(let e of(b=0,p))1===e[0]&&o.push(cY({line:i,spanStart:b,spanLength:e[1].length})),b+=e[1].length}({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[i.lineIndex],deletionLineIndex:s.deletionContent.length,additionLineIndex:s.additionContent.length,deletionDecorations:s.deletionDecorations,additionDecorations:s.additionDecorations,lineDiffType:c,maxLineDiffLength:f}),null!=i&&(g(e.deletionLines[i.lineIndex],i.lineIndex,s.deletionSegments,s.deletionContent),s.deletionInfo.push({type:"change"===r?"change-deletion":r,lineNumber:i.lineNumber,altLineNumber:"change"===r?void 0:n.lineNumber??void 0,lineIndex:`${i.unifiedLineIndex},${l}`})),null!=n&&(g(e.additionLines[n.lineIndex],n.lineIndex,s.additionSegments,s.additionContent),s.additionInfo.push({type:"change"===r?"change-addition":r,lineNumber:n.lineNumber,altLineNumber:"change"===r?void 0:i.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${l}`}))}}),m.values())){if(0===d.deletionContent.length&&0===d.additionContent.length)continue;let r={name:e.prevName??e.name,contents:d.deletionContent.value},o={name:e.name,contents:d.additionContent.value},{deletionLines:a,additionLines:s}=function({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:i,highlighter:r,deletionDecorations:o,additionDecorations:a,languageOverride:s,options:{theme:l=rx,...d}}){let u=s??aG(e.name),c=s??aG(t.name),{state:h,transformers:f}=function(e=!1,t=!1){let n={lineInfo:[]},i=[{line:e=>(delete e.properties.class,e),pre(t){let i=function(e){let t=e.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t;t="children"in t?t.children[0]:null}}(t),r=[];if(null!=i){let t=1;for(let o of i.children)"element"===o.type&&(e&&function e(t){let n,i=function(e){let t=e.properties["data-char"];if("number"==typeof t)return t}(t);if(null!=i)return i;let r=cI,o=[],a=[],s=()=>{if(0===a.length||null==n){a=[],n=void 0;return}if(1===a.length){let i=a[0];if(i?.type==="element"){var e,t;for(let r of(e=i,t=n,e.properties["data-char"]=t,i.children))c$(r)}else c$(i);o.push(i),a=[],n=void 0;return}for(let e of a)c$(e);o.push(r5({tagName:"span",properties:{"data-char":n},children:a})),a=[],n=void 0},l=e=>{if(e!==cI){if(e===cD){r=cD;return}if(r===cI){r=e;return}r!==e&&(r=cD)}};for(let i of t.children){let t="element"===i.type?e(i):cI;if(l(t),"number"!=typeof t){s(),o.push(i);continue}null!=n&&n!==t&&s(),n??=t,a.push(i)}return s(),t.children=o,r}(o),r.push(function(e,t,n){let i="function"==typeof n.lineInfo?n.lineInfo(t):n.lineInfo[t-1];if(null==i){let i=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(i,{node:e,line:t,state:n}),Error(i)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,0===e.children.length&&e.children.push(r8("\n")),e}(o,t,n)),t++);i.children=r}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t)n.__lineChar??=e,e+=n.content.length}},preprocess(e,t){t.mergeWhitespaces="never"},span(e,t,n,i,r){if(r?.offset!=null&&null!=r.content){let t=r.__lineChar;null!=t&&(e.properties["data-char"]=t)}return e}}:null}];return t&&i.push(cj,cO),{state:n,transformers:i,toClass:cO}}(d.useTokenTransformer),p="string"==typeof l?{...d,lang:"text",theme:l,transformers:f,decorations:void 0,defaultColor:!1,cssVariablePrefix:cz("token"),tokenizeTimeLimit:0}:{...d,lang:"text",themes:l,transformers:f,decorations:void 0,defaultColor:!1,cssVariablePrefix:cz("token"),tokenizeTimeLimit:0};return{deletionLines:""===e.contents?[]:(p.lang=u,h.lineInfo=n,p.decorations=o,cK(r.codeToHast(rL(e.contents),p))),additionLines:""===t.contents?[]:(p.lang=c,p.decorations=a,h.lineInfo=i,cK(r.codeToHast(rL(t.contents),p)))}}({deletionFile:r,deletionInfo:d.deletionInfo,deletionDecorations:d.deletionDecorations,additionFile:o,additionInfo:d.additionInfo,additionDecorations:d.additionDecorations,highlighter:t,options:n,languageOverride:i?"text":e.lang});if(p){h.deletionLines=a,h.additionLines=s;continue}if(d.deletionSegments.length>0)for(let e of d.deletionSegments)for(let t=0;t<e.count;t++)h.deletionLines[e.targetIndex+t]=a[e.originalOffset+t];else h.deletionLines.push(...a);if(d.additionSegments.length>0)for(let e of d.additionSegments)for(let t=0;t<e.count;t++)h.additionLines[e.targetIndex+t]=s[e.originalOffset+t];else h.additionLines.push(...s)}return{code:h,themeStyles:u,baseThemeType:d}}(e,t,i,{forcePlainText:n,expandedHunks:!!n||void 0,collapsedContextThreshold:r}),options:i}}onHighlightSuccess(e,t,n,i=!0){if(null==this.renderCache)return;let r=!this.renderCache.highlighted||!cN(this.renderCache.options,n)||!cg(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){let n=this.workerManager?.getDiffResultCache(e);if(null!=n&&cN(t,n.options))return n}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&cg(e,n.diff)&&cN(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){let o,{diffStyle:a,disableFileHeader:s,expandUnchanged:l,expansionLineCount:d,collapsedContextThreshold:u,hunkSeparators:c}=this.getOptionsWithDefaults();this.diff=e;let h="unified"===a,f=[],p=[],m=[],g=[],{additionLines:b,deletionLines:v}=n,y={rowCount:0,hunkSeparators:c,additionsContentAST:f,deletionsContentAST:p,unifiedContentAST:m,unifiedGutterAST:r3(),deletionsGutterAST:r3(),additionsGutterAST:r3(),expansionLineCount:d,hunkData:g,incrementRowCount(e=1){y.rowCount+=e},pushToGutter(e,t){switch(e){case"unified":y.unifiedGutterAST.children.push(t);break;case"deletions":y.deletionsGutterAST.children.push(t);break;case"additions":y.additionsGutterAST.children.push(t)}}},w=cx({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),x={size:0,side:void 0,increment(){this.size+=1},flush(){if("unified"!==a){if(this.size<=0||null==this.side){this.side=void 0,this.size=0;return}"additions"===this.side?(y.pushToGutter("additions",r4(void 0,"buffer",this.size)),f?.push(cT(this.size))):(y.pushToGutter("deletions",r4(void 0,"buffer",this.size)),p?.push(cT(this.size))),this.size=0,this.side=void 0}}},k=(e,t,n,i,r)=>{y.pushToGutter(e,function(e,t,n,i={}){return r5({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:null!=t?[r5({tagName:"span",properties:{"data-line-number-content":""},children:[r8(`${t}`)]})]:void 0})}(t,n,i,r))};function S(e){x.flush(),"unified"===a?hh("unified",e,y):(hh("deletions",e,y),hh("additions",e,y))}this.pushFileLevelAnnotations(e,a,t,y),cL({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:!!l||this.expandedHunks,collapsedContextThreshold:u,callback:({hunkIndex:t,hunk:n,collapsedBefore:i,collapsedAfter:r,additionLine:o,deletionLine:s,type:l})=>{let d=null!=s?s.splitLineIndex:o.splitLineIndex,u=null!=o?o.unifiedLineIndex:s.unifiedLineIndex;"split"===a&&"change"!==l&&x.flush(),i>0&&S({hunkIndex:t,collapsedLines:i,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:0===t,isLastHunk:!1,isExpandable:!e.isPartial});let h="unified"===a?u:d,f={type:l,hunkIndex:t,lineIndex:h,unifiedLineIndex:u,splitLineIndex:d,deletionLine:s,additionLine:o};if("unified"===a){let n=this.getUnifiedInjectedRowsForLine?.(f);n?.before!=null&&hd(n.before,y);let i=null!=s?v[s.lineIndex]:void 0,r=null!=o?b[o.lineIndex]:void 0;if(null==i&&null==r){let t="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(t,{file:e.name}),Error(t)}let a="change"===l?null!=o?"change-addition":"change-deletion":l,c=this.getUnifiedLineDecoration({type:l,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});k("unified",c.gutterLineType,null!=o?o.lineNumber:s.lineNumber,`${u},${d}`,c.gutterProperties),null!=r?r=hf(r,c.contentProperties):null!=i&&(i=hf(i,c.contentProperties)),hc({diffStyle:"unified",type:l,deletionLine:i,additionLine:r,unifiedSpan:this.getAnnotations("unified",s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:y}),n?.after!=null&&hd(n.after,y)}else{let n=this.getSplitInjectedRowsForLine?.(f);n?.before!=null&&hu(n.before,y,x);let i=null!=s?v[s.lineIndex]:void 0,r=null!=o?b[o.lineIndex]:void 0,a=this.getSplitLineDecoration({side:"deletions",type:l,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:"additions",type:l,lineIndex:o?.lineIndex});if(null==i&&null==r){let t="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(t,{file:e.name}),Error(t)}let c=(()=>{if("change"===l){if(null==r)return"additions";else if(null==i)return"deletions"}})();if(null!=c){if(null!=x.side&&x.side!==c)throw Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");x.side=c,x.increment()}let p=this.getAnnotations("split",s?.lineNumber,o?.lineNumber,t,h);if(null!=p&&x.size>0&&x.flush(),null!=s){let e=hf(i,a.contentProperties);k("deletions",a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${d}`,a.gutterProperties),null!=e&&(i=e)}if(null!=o){let e=hf(r,u.contentProperties);k("additions",u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${d}`,u.gutterProperties),null!=e&&(r=e)}hc({diffStyle:"split",type:l,additionLine:r,deletionLine:i,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:y}),n?.after!=null&&hu(n.after,y,x)}let p="split"===a&&null!=n&&d===n.splitLineStart+n.splitLineCount-1,m=!!p&&n.noEOFCRDeletions,g=!!p&&n.noEOFCRAdditions,C=(s?.noEOFCR??!1)||m,A=(o?.noEOFCR??!1)||g;if(A||C){if("split"===a&&x.flush(),C){let e="context"===l||"context-expanded"===l?l:"change-deletion";"unified"===a?(y.unifiedContentAST.push(cR(e)),y.pushToGutter("unified",r4(e,"metadata",1))):(y.deletionsContentAST.push(cR(e)),y.pushToGutter("deletions",r4(e,"metadata",1)),A||(y.pushToGutter("additions",r4(void 0,"buffer",1)),y.additionsContentAST.push(cT(1))))}if(A){let e="context"===l||"context-expanded"===l?l:"change-addition";"unified"===a?(y.unifiedContentAST.push(cR(e)),y.pushToGutter("unified",r4(e,"metadata",1))):(y.additionsContentAST.push(cR(e)),y.pushToGutter("additions",r4(e,"metadata",1)),C||(y.pushToGutter("deletions",r4(void 0,"buffer",1)),y.deletionsContentAST.push(cT(1))))}y.incrementRowCount(1)}r>0&&"simple"!==c&&S({hunkIndex:"context-expanded"===l?t:t+1,collapsedLines:r,rangeSize:w,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),y.incrementRowCount(1)}}),"split"===a&&x.flush();let C=Math.max(null==(o=e.hunks.at(-1))?0:Math.max(o.additionStart+o.additionCount,o.deletionStart+o.deletionCount),e.additionLines.length??0,e.deletionLines.length??0),A=t.bufferBefore>0||t.bufferAfter>0,E=!h&&"deleted"!==e.type,L=!h&&"new"!==e.type,_=y.rowCount>0||A;f=E&&_?f:void 0,p=L&&_?p:void 0,m=h&&_?m:void 0;let N=this.createPreElement(null!=p&&null!=f,C);return{unifiedGutterAST:h&&_?y.unifiedGutterAST.children:void 0,unifiedContentAST:m,deletionsGutterAST:L&&_?y.deletionsGutterAST.children:void 0,deletionsContentAST:p,additionsGutterAST:E&&_?y.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:g,preNode:N,themeStyles:i,baseThemeType:r,headerElement:s?void 0:this.renderHeader(this.diff),totalLines:C,rowCount:y.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){var n;let i="unified"===e?t.unifiedGutterAST:"deletions"===e?t.deletionsGutterAST:t.additionsGutterAST,r="unified"===e?t.unifiedContentAST:"deletions"===e?t.deletionsContentAST:t.additionsContentAST;if(null==i||null==r)return;let o=r3(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,(n=t.rowCount,r5({tagName:"div",children:r,properties:{"data-content":"",style:`grid-row: span ${n}`}}))]}renderFullAST(e,t=[]){let n="line-info"===this.getOptionsWithDefaults().hunkSeparators,i=this.renderCodeAST("unified",e);if(null!=i)return t.push(r5({tagName:"code",children:i,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};let r=this.renderCodeAST("deletions",e);null!=r&&t.push(r5({tagName:"code",children:r,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));let o=this.renderCodeAST("additions",e);return null!=o&&t.push(r5({tagName:"code",children:o,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return al(this.renderFullAST(e,t))}renderPartialHTML(e,t){return null==t?al(e):al(r5({tagName:"code",children:e,properties:{"data-code":"","data-container-size":"line-info"===this.getOptionsWithDefaults().hunkSeparators?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,n,i){if(!aV(n))return;let r="new"!==e.type?ha(aq(this.deletionAnnotations)):[],o="deleted"!==e.type?ha(aq(this.additionAnnotations)):[];if(0===r.length&&0===o.length)return;let{createAnnotationElement:a}=this;"unified"===t?hc({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:r.concat(o)},createAnnotationElement:a,context:i}):hc({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:r},additionSpan:{type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:o},createAnnotationElement:a,context:i})}getAnnotations(e,t,n,i,r){let o={type:"annotation",hunkIndex:i,lineIndex:r,annotations:[]};if(null!=t)for(let e of this.deletionAnnotations[t]??[])o.annotations.push(rV(e));let a={type:"annotation",hunkIndex:i,lineIndex:r,annotations:[]};if(null!=n)for(let t of this.additionAnnotations[n]??[])("unified"===e?o:a).annotations.push(rV(t));return"unified"===e?o.annotations.length>0?o:void 0:0!==a.annotations.length||0!==o.annotations.length?{deletionSpan:o,additionSpan:a}:void 0}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return function({fileOrDiff:e,mode:t,stickyHeader:n}){let i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return r5({tagName:"div",children:["custom"===t?r5({tagName:"slot",properties:{name:rw}}):function({name:e,prevName:t,iconType:n}){let i=[r5({tagName:"slot",properties:{name:rv}}),r6({name:function(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}(n),properties:{"data-change-icon":n}})];return null!=t&&(i.push(r5({tagName:"div",children:[r5({tagName:"bdi",children:[r8(t)]})],properties:{"data-prev-name":""}})),i.push(r6({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(r5({tagName:"div",children:[r5({tagName:"bdi",children:[r8(e)]})],properties:{"data-title":""}})),r5({tagName:"div",children:i,properties:{"data-header-content":""}})}({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),..."custom"===t?[]:[function(e){let t=[];if(null!=e){let n=0,i=0;for(let t of e.hunks)n+=t.additionLines,i+=t.deletionLines;(i>0||0===n)&&t.push(r5({tagName:"span",children:[r8(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||0===i)&&t.push(r5({tagName:"span",children:[r8(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(r5({tagName:"slot",properties:{name:ry}})),r5({tagName:"div",children:t,properties:{"data-metadata":""}})}(i)]],properties:r})}({fileOrDiff:e,mode:t,stickyHeader:n})}};function ha(e){return e?.map(e=>rV(e))??[]}let hs=new Intl.PluralRules("en-US");function hl(e){return`${e} unmodified line${"one"===hs.select(e)?"":"s"}`}function hd(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function hu(e,t,n){for(let{deletion:i,addition:r}of e){if(null==i&&null==r)continue;let e=null!=i&&null!=r?void 0:null==i?"deletions":"additions";(null==e||n.side!==e)&&n.flush(),null!=i&&(t.deletionsContentAST.push(i.content),t.pushToGutter("deletions",i.gutter)),null!=r&&(t.additionsContentAST.push(r.content),t.pushToGutter("additions",r.gutter)),null!=e&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function hc({diffStyle:e,type:t,deletionLine:n,additionLine:i,unifiedSpan:r,deletionSpan:o,additionSpan:a,createAnnotationElement:s,context:l}){let d=!1;"unified"===e?(null!=i?l.unifiedContentAST.push(i):null!=n&&l.unifiedContentAST.push(n),null!=r&&(l.unifiedContentAST.push(s(r)),l.pushToGutter("unified",r4("change"===t?null!=n?"change-deletion":"change-addition":t,"annotation",1)),d=!0)):"split"===e&&(null!=n&&l.deletionsContentAST.push(n),null!=i&&l.additionsContentAST.push(i),null!=o&&(l.deletionsContentAST.push(s(o)),l.pushToGutter("deletions",r4("change"===t?null!=n?"change-deletion":"context":t,"annotation",1)),d=!0),null!=a&&(l.additionsContentAST.push(s(a)),l.pushToGutter("additions",r4("change"===t?null!=i?"change-addition":"context":t,"annotation",1)),d=!0)),d&&l.incrementRowCount(1)}function hh(e,{hunkIndex:t,collapsedLines:n,rangeSize:i,hunkSpecs:r,isFirstHunk:o,isLastHunk:a,isExpandable:s},l){if(n<=0)return;let d="unified"===e?l.unifiedContentAST:"deletions"===e?l.deletionsContentAST:l.additionsContentAST;if("metadata"===l.hunkSeparators){null!=r&&(l.pushToGutter(e,cP({type:"metadata",content:r,isFirstHunk:o,isLastHunk:a})),d.push(cP({type:"metadata",content:r,isFirstHunk:o,isLastHunk:a})),"additions"!==e&&l.incrementRowCount(1));return}if("simple"===l.hunkSeparators){t>0&&(l.pushToGutter(e,cP({type:"simple",isFirstHunk:o,isLastHunk:!1})),d.push(cP({type:"simple",isFirstHunk:o,isLastHunk:!1})),"additions"!==e&&l.incrementRowCount(1));return}let u=`hunk-separator-${e}-${t}`,c=i>l.expansionLineCount,h=s?t:void 0;l.pushToGutter(e,cP({type:l.hunkSeparators,content:hl(n),expandIndex:h,chunked:c,slotName:u,isFirstHunk:o,isLastHunk:a})),d.push(cP({type:l.hunkSeparators,content:hl(n),expandIndex:h,chunked:c,slotName:u,isFirstHunk:o,isLastHunk:a})),"additions"!==e&&l.incrementRowCount(1),l.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:s?{up:!o,down:!a,chunked:c}:void 0})}function hf(e,t){return null==e||"element"!==e.type||null==t?e:{...e,properties:{...e.properties,...t}}}function hp(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}let hm=-1;var hg=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++hm}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:rx},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new aS,this.scrollSyncManager=new aH,this.interactionManager=new ac("diff",ah(e,"function"==typeof e.hunkSeparators||(e.hunkSeparators??"line-info")==="line-info"||"line-info-basic"===e.hunkSeparators?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:"function"==typeof e?.hunkSeparators?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}createHunksRenderer(e){return new ho(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t="additions")=>{let n,i;if(null==this.fileDiff)return;let r=this.fileDiff.hunks.at(-1);e:for(let o of this.fileDiff.hunks){let a="deletions"===t?o.deletionStart:o.additionStart,s="deletions"===t?o.deletionCount:o.additionCount,l=o.splitLineStart,d=o.unifiedLineStart;if(e<a){let t=a-e;n=Math.max(d-t,0),i=Math.max(l-t,0);break}if(e>=a+s){if(o===r){let t=e-(a+s);n=d+o.unifiedLineCount+t,i=l+o.splitLineCount+t;break}continue}for(let r of o.hunkContent)if("context"===r.type)if(e<a+r.lines){let t=e-a;i=l+t,n=d+t;break e}else a+=r.lines,l+=r.lines,d+=r.lines;else{let o="deletions"===t?r.deletions:r.additions;if(e<a+o){let o=e-a;n=d+("additions"===t?r.deletions:0)+o,i=l+o;break e}a+=o,l+=Math.max(r.deletions,r.additions),d+=r.deletions+r.additions}break}if(null!=n&&null!=i)return[n,i]};setOptions(e){null!=e&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(ah(this.options,"function"==typeof this.options.hunkSeparators||(this.options.hunkSeparators??"line-info")==="line-info"||"line-info-basic"===this.options.hunkSeparators?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??"system")!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if("string"==typeof this.options.theme||null==this.fileContainer||null==this.appliedThemeCSS)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return null!=this.appliedThemeCSS&&!rQ(this.appliedThemeCSS.theme,this.options.theme??rx)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!e&&!t&&!n&&"function"!=typeof this.options.hunkSeparators}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||null==this.pre){this.managersDirty=!1;return}let{diffStyle:e="split",overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,"wrap"===t),"scroll"===t&&"split"===e?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:i=!1,lineAnnotations:r,oldFile:o,newFile:a,fileDiff:s}=e;this.hydrateElements(t,n),function(e,t,n=!1){return!n&&null==e&&t}(this.pre,function({fileDiff:e,oldFile:t,newFile:n}){return null!=e&&e.hunks.length>0||null!=t||null!=n}({fileDiff:s,oldFile:o,newFile:a}),this.options.collapsed)||function(e,t,n=!1){return null==e&&t&&!n}(this.headerElement,function({fileDiff:e,oldFile:t,newFile:n}){return null!=e||null!=t||null!=n}({fileDiff:s,oldFile:o,newFile:a}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:s,oldFile:o,newFile:a,lineAnnotations:r}),i||this.emitPostRender()}hydrateElements(e,t){for(let n of(this.fileContainer!==e&&this.emitPostRender(!0),!function(e,t){if(null==t)return;let n=e.shadowRoot??e.attachShadow({mode:"open"});""===n.innerHTML&&(n.innerHTML=t)}(e,t),e.shadowRoot?.children??[])){if(n instanceof SVGElement){this.spriteSVG=n;continue}if(n instanceof HTMLElement){if(n instanceof HTMLPreElement){for(let e of(this.pre=n,n.children))e instanceof HTMLElement&&"code"===e.tagName.toLowerCase()&&("deletions"in e.dataset&&(this.codeDeletions=e),"additions"in e.dataset&&(this.codeAdditions=e),"unified"in e.dataset&&(this.codeUnified=e));continue}if("diffsHeader"in n.dataset){this.headerElement=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-theme-css")){this.themeCSSStyle=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=n,this.appliedUnsafeCSS=n.textContent;continue}}}null!=this.pre&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:i}){this.lineAnnotations=i??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(null!=t&&null!=n?aB(t,n,this.options.parseDiffOptions):void 0),null!=this.pre&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){this.enabled&&(null!=this.fileDiff||null!=this.additionFile||null!=this.deletionFile)&&this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:i=!1,forceRender:r=!1,preventEmit:o=!1,lineAnnotations:a,fileContainer:s,containerWrapper:l,renderRange:d}){if(!this.enabled)throw Error("FileDiff.render: attempting to call render after cleaned up");let{collapsed:u=!1,themeType:c="system"}=this.options,h=u?void 0:d,f=this.hasThemeChanged(),p=null!=e&&null!=t&&(!aC(e,this.deletionFile)||!aC(t,this.additionFile)),m=null!=n&&n!==this.fileDiff,g=null!=a&&(a.length>0||this.lineAnnotations.length>0)&&a!==this.lineAnnotations;if(!u&&aA(h,this.renderRange)&&!r&&!g&&!f&&(null!=n&&n===this.fileDiff||null==n&&!p))return this.applyCachedThemeState(c);let{renderRange:b}=this;if(this.renderRange=h,this.deletionFile=e,this.additionFile=t,null!=n?this.fileDiff=n:null!=e&&null!=t&&p&&(m=!0,this.fileDiff=aB(e,t,this.options.parseDiffOptions)),m&&(this.cachedHeaderHTML=void 0),null!=a&&this.setLineAnnotations(a),null==this.fileDiff)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:v=!1,disableFileHeader:y=!1}=this.options;if(y&&(null!=this.headerElement&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),s=this.getOrCreateFileContainer(s,l),this.applyCachedThemeState(c),u){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,rE);null!=e&&this.applyThemeState(s,e.themeStyles,c,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,s),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return o||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(s);if(!(this.canPartiallyRender(r,g,p||m||f)&&this.applyPartialRender({previousRenderRange:b,renderRange:h}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,h);if(null==t)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(s,t.themeStyles,c,t.baseThemeType),null!=t.headerElement&&this.applyHeaderToDOM(t.headerElement,s),null!=t.additionsContentAST||null!=t.deletionsContentAST||null!=t.unifiedContentAST?this.applyHunksToDOM(e,t):null!=this.pre&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,i||this.flushManagers()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return o||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,null==t))return;this.options.onPostRender?.(t,this,"unmount");return}if(null==t)return;let i=this.mounted?"update":"mount";this.mounted=!0,n?.(t,this,i)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();for(let{element:e}of(this.separatorCache.clear(),this.annotationCache.values()))e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(null==this.fileContainer)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),null==this.placeHolder){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${e}px`),!0}primeHighlightCache(){let{fileDiff:e,workerManager:t}=this;if(null==e||null==t||aW(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||null==this.fileContainer||"function"!=typeof t){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){var i;let e=r.slotName,o=this.separatorCache.get(e);if(null==o||(i=o.hunkData,r.slotName!==i.slotName||r.hunkIndex!==i.hunkIndex||r.lines!==i.lines||r.type!==i.type||r.expandable?.chunked!==i.expandable?.chunked||r.expandable?.up!==i.expandable?.up||r.expandable?.down!==i.expandable?.down)){o?.element.remove();let n=document.createElement("div");n.style.display="contents",n.slot=r.slotName;let i=t(r,this);null!=i&&n.appendChild(i),this.fileContainer.appendChild(n),o={element:n,hunkData:r},this.separatorCache.set(e,o)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||null==this.fileContainer){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(null!=t&&this.lineAnnotations.length>0)for(let[i,r]of this.lineAnnotations.entries()){var n;let o=`${i}-${rV(r)}`,a=this.annotationCache.get(o);if(null==a||(n=a.annotation,r.lineNumber!==n.lineNumber||r.side!==n.side||r.metadata!==n.metadata)){a?.element.remove();let e=t(r);if(null==e)continue;(a={element:function(e){let t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}(rV(r)),annotation:r}).element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(o,a)}e.delete(o)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let e,{renderGutterUtility:t}=this.options;if(null==this.fileContainer||null==t){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=t(this.interactionManager.getHoveredLine);if(null!=n&&null!=this.gutterUtilityContent)return;if(null==n){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let i=((e=document.createElement("div")).slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e);i.appendChild(n),this.fileContainer.appendChild(i),this.gutterUtilityContent=i}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,i=e??n??document.createElement("diffs-container"),r=n!==i;return r&&this.emitPostRender(!0),this.fileContainer=i,null!=n&&r&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),null!=t&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),r&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(null!=t)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:r1(e)&&e.hasAttribute("data-theme-css")?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):r1(e)&&e.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:"open"});if(null==this.spriteSVG){let e=document.createElement("div");e.innerHTML=aE;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}null!=this.spriteSVG&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:"open"});return null==this.pre?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){for(let t of(this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,Array.from(e.children)))t instanceof HTMLElement&&(t.hasAttribute("data-unified")?this.codeUnified=t:t.hasAttribute("data-deletions")?this.codeDeletions=t:t.hasAttribute("data-additions")&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,i=this.cachedHeaderHTML??al(e);if(this.cachedHeaderHTML=i,i!==this.lastRenderedHeaderHTML){let e=document.createElement("div");e.innerHTML=i;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;null!=this.headerElement?t.shadowRoot?.replaceChild(n,this.headerElement):t.shadowRoot?.prepend(n),this.headerElement=n,this.lastRenderedHeaderHTML=i}if(this.isContainerManaged||null==n)return;let{renderCustomHeader:r,renderHeaderPrefix:o,renderHeaderMetadata:a}=this.options;if(null!=r){let e=r(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,rw,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}let s=o?.(n)??void 0,l=a?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,rv,s),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,ry,l),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,i){if(null==i)return void t?.remove();let r=t??this.createHeaderSlotElement(n);return null==t&&e.appendChild(r),this.replaceHeaderSlotContent(r,i),r}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement("div");return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(null!=t){if(null==e||""===e){null!=this.unsafeCSSStyle&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}if(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e){let n;this.unsafeCSSStyle??=((n=document.createElement("style")).setAttribute("data-unsafe-css",""),n),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=`${aT}
192
+ @layer unsafe {
193
+ ${e}
194
+ }`,this.appliedUnsafeCSS=e}}}applyThemeState(e,t,n,i){let r=e.shadowRoot??e.attachShadow({mode:"open"}),o=i??n,a=this.options.theme??rx,s="string"==typeof a?a:{...a},l=a_(r);if(this.themeCSSStyle?.parentNode===r&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===l){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===r){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:l};return}this.themeCSSStyle=function({shadowRoot:e,currentNode:t,themeCSS:n}){let i;return""===n.trim()?void t?.remove():((t??=((i=document.createElement("style")).setAttribute("data-theme-css",""),i)).textContent=n,t.parentNode!==e&&e.appendChild(t),t)}({shadowRoot:r,currentNode:this.themeCSSStyle,themeCSS:function(e,t="system",n){return`${aT}
195
+ @layer rendered {
196
+ :host {${"system"===t?"":`
197
+ color-scheme: ${t};`}
198
+ ${aN(n)}
199
+ ${e}
200
+ }
201
+ }`}(t,o,l)}),this.appliedThemeCSS=null!=this.themeCSSStyle?{theme:s,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:l}:void 0}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;if(null!=e&&null!=this.themeCSSStyle){var t;let n;this.themeCSSStyle.textContent=(t=this.themeCSSStyle.textContent??"",n=aN(a_(e)),t.replace(aR,n))}}applyHunksToDOM(e,t){let{overflow:n="scroll"}=this.options,i=(this.options.hunkSeparators??"line-info")==="line-info",r="wrap"===n?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let o=!1,a=[],s=this.hunksRenderer.renderCodeAST("unified",t),l=this.hunksRenderer.renderCodeAST("deletions",t),d=this.hunksRenderer.renderCodeAST("additions",t);null!=s?(o=null==this.codeUnified||null!=this.codeAdditions||null!=this.codeDeletions,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=aM({code:this.codeUnified,columnType:"unified",rowSpan:r,containerSize:i}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s),a.push(this.codeUnified)):null!=l||null!=d?(null!=l?(o=null==this.codeDeletions||null!=this.codeUnified,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=aM({code:this.codeDeletions,columnType:"deletions",rowSpan:r,containerSize:i}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(l),a.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),null!=d?(o=o||null==this.codeAdditions||null!=this.codeUnified,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=aM({code:this.codeAdditions,columnType:"additions",rowSpan:r,containerSize:i}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(d),a.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),0===a.length?e.textContent="":o&&e.replaceChildren(...a),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:i,codeAdditions:r,codeDeletions:o,options:{diffStyle:a="split"}}=this;if(null==n||null==e||null==t||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||null==this.lastRowCount)return!1;let s=this.getCodeColumns(a,i,o,r);if(null==s)return!1;let l=e.startingLine,d=t.startingLine,u=l+e.totalLines,c=d+t.totalLines,h=Math.max(l,d),f=Math.min(u,c);if(f<=h)return!1;let p=Math.max(0,h-l),m=Math.max(0,u-f),g=this.trimColumns({columns:s,trimStart:p,trimEnd:m,previousStart:l,overlapStart:h,overlapEnd:f,diffStyle:a});if(g<0)throw Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<g)throw Error("applyPartialRender: trimmed beyond DOM row count");let b=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0)&&null!=this.fileDiff)return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(d,Math.max(h-d,0));if(null==y&&d<h)return!1;let w=v(f,Math.max(c-f,0));if(null==w&&c>f)return!1;let x=(e,t)=>{if(null!=e){if("unified"!==a||Array.isArray(s))if("split"===a&&Array.isArray(s))this.insertPartialHTML(a,s,e,t);else throw Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");else this.insertPartialHTML(a,s,e,t);b+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,"afterbegin"),x(w,"beforeend"),this.lastRowCount!==b&&(this.applyRowSpan(a,s,b),this.lastRowCount=b),!0}insertPartialHTML(e,t,n,i){if("unified"!==e||Array.isArray(t))if("split"===e&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST("deletions",n),r=this.hunksRenderer.renderCodeAST("additions",n);this.renderPartialColumn(t[0],e,i),this.renderPartialColumn(t[1],r,i)}else throw Error("FileDiff.insertPartialHTML: Invalid argument composition");else{let e=this.hunksRenderer.renderCodeAST("unified",n);this.renderPartialColumn(t,e,i)}}renderPartialColumn(e,t,n){if(null==e||null==t)return;let i=hb(t[0]),r=hb(t[1]);if(null==i||null==r)throw Error("FileDiff.insertPartialHTML: Unexpected AST structure");let o=r.at(0);"beforeend"===n&&o?.type==="element"&&"number"==typeof o.properties["data-buffer-size"]&&this.mergeBuffersIfNecessary(o.properties["data-buffer-size"],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],i,r,!0);let a=r.at(-1);"afterbegin"===n&&a?.type==="element"&&"number"==typeof a.properties["data-buffer-size"]&&this.mergeBuffersIfNecessary(a.properties["data-buffer-size"],e.content.children[0],e.gutter.children[0],i,r,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r))}mergeBuffersIfNecessary(e,t,n,i,r,o){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let a=this.getBufferSize(t.dataset);null!=a&&(o?(i.shift(),r.shift()):(i.pop(),r.pop()),this.updateBufferSize(t,a+e),this.updateBufferSize(n,a+e))}applyRowSpan(e,t,n){let i=e=>{null!=e&&(e.gutter.style.setProperty("grid-row",`span ${n}`),e.content.style.setProperty("grid-row",`span ${n}`))};if("unified"!==e||Array.isArray(t))if("split"===e&&Array.isArray(t))i(t[0]),i(t[1]);else throw Error("dun fuuuuked up");else i(t)}trimColumnRows(e,t,n){let i=0,r=0,o=0,a=!1,s=n>=0;if(null==e)return 0;let l=Array.from(e.content.children),d=Array.from(e.gutter.children);if(l.length!==d.length)throw Error("FileDiff.trimColumnRows: columns do not match");for(;o<l.length&&(!(t<=0)||s||a);){let e=d[o],u=l[o];if(o++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error("FileDiff.trimColumnRows: invalid row elements");if(a&&(a=!1,"annotation"===e.dataset.gutterBuffer&&"lineAnnotation"in u.dataset||"metadata"===e.dataset.gutterBuffer&&"noNewline"in u.dataset)){e.remove(),u.remove(),r++;continue}if("lineIndex"in e.dataset&&"lineIndex"in u.dataset){(t>0||s&&i>=n)&&(e.remove(),u.remove(),t>0&&0==--t&&(a=!0),r++),i++;continue}if("separator"in e.dataset&&"separator"in u.dataset||"annotation"===e.dataset.gutterBuffer&&"lineAnnotation"in u.dataset||"metadata"===e.dataset.gutterBuffer&&"noNewline"in u.dataset){(t>0||s&&i>=n)&&(e.remove(),u.remove(),r++);continue}if("buffer"===e.dataset.gutterBuffer&&"contentBuffer"in u.dataset){let o=this.getBufferSize(u.dataset);if(null==o)throw Error("FileDiff.trimColumnRows: invalid element");if(t>0){let n=Math.min(t,o),i=o-n;i>0?(this.updateBufferSize(e,i),this.updateBufferSize(u,i),r+=n):(e.remove(),u.remove(),r+=o),0==(t-=n)&&0===i&&(a=!0)}else if(s){let t=i,a=i+o-1;if(n<=t)e.remove(),u.remove(),r+=o;else if(n<=a){let t=a-n+1,i=o-t;this.updateBufferSize(e,i),this.updateBufferSize(u,i),r+=t}}i+=o;continue}throw console.error({gutterElement:e,contentElement:u}),Error("FileDiff.trimColumnRows: unknown row elements")}return r}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:i,previousStart:r,trimEnd:o,trimStart:a}){let s=Math.max(0,i-r),l=n-r;if(l<0)throw Error("FileDiff.trimColumns: overlap ends before previous");let d=a>0,u=o>0;if(!d&&!u)return 0;let c=d?s:0,h=u?l:-1;if("unified"===t&&!Array.isArray(e))return this.trimColumnRows(e,c,h);if("split"===t&&Array.isArray(e)){let t=this.trimColumnRows(e[0],c,h),n=this.trimColumnRows(e[1],c,h);if(null!=e[0]&&null!=e[1]&&t!==n)throw Error("FileDiff.trimColumns: split columns out of sync");return null!=e[0]?t:n}throw console.error({diffStyle:t,columns:e}),Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??"",10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty("grid-row",`span ${t}`),e.style.setProperty("min-height",`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,i){function r(e){if(null==e)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&null!=t.dataset.gutter&&null!=n.dataset.content)return{gutter:t,content:n}}if("unified"===e)return r(t);{let e=r(n),t=r(i);return null!=e||null!=t?[e,t]:void 0}}applyBuffers(e,t){if(null==t||this.shouldDisableVirtualizationBuffers()){null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(null==this.bufferBefore&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(null==this.bufferAfter&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:i},r){var o;let{diffIndicators:a="bars",disableBackground:s=!1,disableLineNumbers:l=!1,overflow:d="scroll",diffStyle:u="split"}=this.options,c={type:"diff",diffIndicators:a,disableBackground:s,disableLineNumbers:l,overflow:d,split:"unified"!==u&&null!=t&&null!=n,totalLines:i,customProperties:r};o=this.appliedPreAttributes,(null==c||null==o?c!==o:!function(e=aL,t=aL){if(e===t)return!0;let n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let i of n)if(e[i]!==t[i])return!1;return!0}(c.customProperties,o.customProperties)||c.type!==o.type||c.diffIndicators!==o.diffIndicators||c.disableBackground!==o.disableBackground||c.disableLineNumbers!==o.disableLineNumbers||c.overflow!==o.overflow||c.split!==o.split||c.totalLines!==o.totalLines)&&(!function(e,{type:t,diffIndicators:n,disableBackground:i,disableLineNumbers:r,overflow:o,split:a,totalLines:s,customProperties:l}){if(null!=l)for(let t in l){let n=l[t];null!=n&&e.setAttribute(t,`${n}`)}switch("diff"===t?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators")}r?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),"diff"===t?e.setAttribute("data-diff-type",a?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",o),e.style.setProperty("--diffs-min-number-column-width-default",`${`${s}`.length}ch`)}(e,c),this.appliedPreAttributes=c)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);let i=document.createElement("div");i.dataset.errorMessage="",i.innerText=e.message,this.errorWrapper.appendChild(i);let r=document.createElement("pre");r.dataset.errorStack="",r.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(r)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function hb(e){if(null!=e&&"element"===e.type)return e.children??[]}let hv=-1;var hy=class extends hg{__id=`little-virtualized-file-diff:${++hv}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,i,r=!1){super(e,i,r),this.virtualizer=t,this.metrics=cb(n)}setMetrics(e,t=!1){let n=cb(e);!t&&rJ(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return null!=e&&e!==this.lineAnnotations&&(0!==e.length||0!==this.lineAnnotations.length)&&(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){var t;return null!=e&&(t=this.lineAnnotations,!!t?.some(e=>0===e.lineNumber))&&this.lineAnnotations.some(t=>0===t.lineNumber&&("new"===e.type?"additions"===t.side:"deleted"!==e.type||"deletions"===t.side))}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){return this.metrics.lineHeight*(e?2:1)}setOptions(e){var t,n,i,r;if(this.isAdvancedMode())throw Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(null==e)return;let{options:o}=this,a=!rZ(o,e),s=a&&(t=o,n=e,(t.diffStyle??"split")!==(n.diffStyle??"split")||(t.overflow??"scroll")!==(n.overflow??"scroll")||(t.collapsed??!1)!==(n.collapsed??!1)||(t.disableLineNumbers??!1)!==(n.disableLineNumbers??!1)||(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||(t.diffIndicators??"bars")!==(n.diffIndicators??"bars")||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)||t.unsafeCSS!==n.unsafeCSS);super.setOptions(e),s&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:(i=o,r=e,(i.disableFileHeader??!1)!==(r.disableFileHeader??!1)||(i.hunkSeparators??"line-info")!==(r.hunkSeparators??"line-info")||(i.expandUnchanged??!1)!==(r.expandUnchanged??!1)||(i.collapsedContextThreshold??1)!==(r.collapsedContextThreshold??1))}),a&&(this.forceRenderOverride=!0),a&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,s)}setThemeType(e){if(this.isAdvancedMode())throw Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),0!==this.cache.measuredHeightDeltaTotal&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),0!==this.cache.totalLines&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),null!=this.renderRange&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1,{overflow:t="scroll"}=this.options;if(null==this.fileContainer||null==this.fileDiff)return 0!==this.height&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),"scroll"===t&&0===this.lineAnnotations.length&&!this.isResizeDebuggingEnabled())return e;let n=this.getDiffStyle(),i="split"===n?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],r=this.hasFileAnnotations(this.fileDiff);if(null!=this.renderRange&&r&&aV(this.renderRange)){let t=function(e){let t;for(let n of e){if(null==n)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&"-1,-1"===n.dataset.lineAnnotation&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}(i)??0;this.setFileAnnotationHeight(t)&&(e=!0)}else!r&&this.setFileAnnotationHeight(0)&&(e=!0);for(let t of i){if(null==t)continue;let i=t.children[1];if(i instanceof HTMLElement)for(let t of i.children){if(!(t instanceof HTMLElement))continue;let i=t.dataset.lineIndex;if(null==i)continue;let r=function(e,t){let[n,i]=e.split(",").map(Number);return"split"===t?i:n}(i,n),o=t.getBoundingClientRect().height,a=!1;t.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in t.nextElementSibling.dataset||"noNewline"in t.nextElementSibling.dataset)&&("noNewline"in t.nextElementSibling.dataset&&(a=!0),o+=t.nextElementSibling.getBoundingClientRect().height);let s=this.getEstimatedLineHeight(a),l=this.cache.heightDeltas.get(r)??0,d=o-s;d!==l&&(e=!0,this.cache.measuredHeightDeltaTotal+=d-l,0===d?this.cache.heightDeltas.delete(r):this.cache.heightDeltas.set(r,d))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>null!=this.fileContainer&&(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n,i){let r=!cg(this.fileDiff,e),o=this.syncLineAnnotations(i),a=n?.resetDiffLayoutCache===!0||r||o,s=r||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=cb(n.metrics),a=!0,s=!0);let{collapsed:l=!1}=this.options;return this.currentCollapsed!==l&&(this.currentCollapsed=l,a=!0),a&&this.resetLayoutCache({includeEstimatedHeights:s}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){let n;if(null==this.fileDiff||e<1)return;let i=this.getLineIndex(e,t);if(null==i)return;let{disableFileHeader:r=!1,expandUnchanged:o=!1,collapsed:a=!1,collapsedContextThreshold:s=1}=this.options,l=this.getDiffStyle(),d=this.getHunkSeparatorType(),u="split"===l?i[1]:i[0];this.approximateLayoutCheckpoints();let c=cv(this.metrics,r),h=this.getLayoutCheckpointBeforeLineIndex(u),f=h?.top??c+this.cache.fileAnnotationHeight;return a?{top:c,height:0}:(cL({diff:this.fileDiff,diffStyle:l,startingLine:h?.renderedLineIndex??0,expandedHunks:!!o||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:i,collapsedAfter:r,deletionLine:o,additionLine:a})=>{let s="split"===l?a?.splitLineIndex??o?.splitLineIndex:a?.unifiedLineIndex??o?.unifiedLineIndex;if(null==s)throw Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(i>0){let r=cA({type:d,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(null!=r){if(f+=r.gapBefore,u>=s-i&&u<s)return n={top:f,height:r.height},!0;f+=r.height+r.gapAfter}}let c=this.getLineHeight(s,(a?.noEOFCR??!1)||(o?.noEOFCR??!1));if(s===u)return n={top:f,height:c},!0;if(f+=c,r>0){let e=cE({type:d,metrics:this.metrics});if(null!=e){if(u>s&&u<=s+r)return n={top:f+e.gapBefore,height:e.height},!0;f+=e.totalHeight}}return!1}}),n)}getNumericScrollAnchor(e){let t;if(null==this.fileDiff)return;let{disableFileHeader:n=!1,expandUnchanged:i=!1,collapsed:r=!1,collapsedContextThreshold:o=1}=this.options;if(r)return;let a=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();let l=this.getLayoutCheckpointBeforeTop(e),d=l?.top??cv(this.metrics,n)+this.cache.fileAnnotationHeight;return cL({diff:this.fileDiff,diffStyle:a,startingLine:l?.renderedLineIndex??0,expandedHunks:!!i||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:n,hunk:i,collapsedBefore:r,collapsedAfter:o,deletionLine:l,additionLine:u})=>{let c="split"===a?u?.splitLineIndex??l?.splitLineIndex:u?.unifiedLineIndex??l?.unifiedLineIndex;if(null==c)throw Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(r>0){let e=cA({type:s,metrics:this.metrics,hunkIndex:n,hunkSpecs:i?.hunkSpecs});null!=e&&(d+=e.totalHeight)}if(d>=e&&(null!=l?t={lineNumber:l.lineNumber,side:"deletions",top:d}:null!=u&&(t={lineNumber:u.lineNumber,side:"additions",top:d}),null!=t))return!0;let h=this.getLineHeight(c,(u?.noEOFCR??!1)||(l?.noEOFCR??!1));if(d+=h,o>0){let e=cE({type:s,metrics:this.metrics});null!=e&&(d+=e.totalHeight)}return!1}}),t}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(null==this.top||null==this.fileDiff)return;if(!0===this.options.collapsed)return{topOffset:this.top,height:this.height};let t=null!=e?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(null==t)return;let{bufferBefore:n,bufferAfter:i,totalLines:r}=t,o=0;if(0===r){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+n+o,height:this.height-(n+i)}}cleanUp(e=!1){null!=this.fileContainer&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||null==this.fileContainer||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){this.enabled&&(null!=this.fileDiff||null!=this.additionFile||null!=this.deletionFile)&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){let t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;let n=0===this.height;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,null==this.fileDiff){this.layoutDirty=!1;return}let{disableFileHeader:i=!1,collapsed:r=!1}=this.options,o=cv(this.metrics,i);if(this.height+=o,r){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();let e="split"===this.getDiffStyle()?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(null==e)throw Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(null==this.fileDiff){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(null!=this.cache.estimatedSplitHeight&&null!=this.cache.estimatedUnifiedHeight)return;let{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,{splitHeight:i,unifiedHeight:r}=function({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:i,expandUnchanged:r,expandedHunks:o,collapsedContextThreshold:a}){let s=cv(t,n),l=s,d=!!r||o,u=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let r=e.hunks[n];if(null==r)throw Error("computeEstimatedDiffHeights: invalid hunk index");let o=cw({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:d,hunkIndex:n,collapsedContextThreshold:a}),c=(o.fromStart+o.fromEnd)*t.lineHeight;if(s+=c,l+=c,o.collapsedLines>0){let e=cA({type:i,metrics:t,hunkIndex:n,hunkSpecs:r.hunkSpecs})?.totalHeight??0;s+=e,l+=e}s+=r.splitLineCount*t.lineHeight,l+=r.unifiedLineCount*t.lineHeight;let h=function(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(null==t)return{split:0,unified:0};if("context"===t.type){let e=+(t.lines>0);return{split:e,unified:e}}return function(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),i=t.deletions>0&&e.noEOFCRDeletions,r=t.additions>0&&e.noEOFCRAdditions;return{split:i||r?1:0,unified:n}}(e,t)}(r);s+=h.split*t.lineHeight,l+=h.unified*t.lineHeight;let f=n===u?ck({fileDiff:e,hunkIndex:n,expandedHunks:d,collapsedContextThreshold:a,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(null!=f){let e=(f.fromStart+f.fromEnd)*t.lineHeight;if(s+=e,l+=e,f.collapsedLines>0){let e=cE({type:i,metrics:t})?.totalHeight??0;s+=e,l+=e}}}if(e.hunks.length>0){let e=cy(t);s+=e,l+=e}return{splitHeight:s,unifiedHeight:l}}({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=r}validateComputedHeight(){if(null==this.fileContainer||null==this.fileDiff)return;let e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:i,forceRender:r=!1,lineAnnotations:o,...a}={}){let{forceRenderOverride:s,isSetup:l}=this;this.forceRenderOverride=void 0;let d=this.syncLineAnnotations(o);if(d&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=i??(null!=t&&null!=n?aB(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),null==this.fileDiff)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(l)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(null==t)throw Error("VirtualizedFileDiff.render: simple virtualizer is not available");t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);let u=this.virtualizer.getWindowSpecs(),c=this.top??0,h=this.computeRenderRangeFromWindow(this.fileDiff,c,u);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:h,oldFile:t,newFile:n,lineAnnotations:o,forceRender:(s??r)||d,...a})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return"simple"===this.virtualizer.type}isAdvancedMode(){return"advanced"===this.virtualizer.type}getVirtualizedTop(){return"advanced"===this.virtualizer.type?this.virtualizer.getLocalTopForInstance(this):null!=this.fileContainer?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return"simple"===this.virtualizer.type?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){var e;return"function"==typeof(e=this.options.hunkSeparators)?"custom":e??"line-info"}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||null==this.fileDiff||0===this.fileDiff.hunks.length||!0===this.options.collapsed)return;let{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,i=this.fileDiff.hunks.length-1,r=this.getDiffStyle(),o=this.getHunkSeparatorType(),a=!!t||this.hunksRenderer.getExpandedHunksMap(),s=function(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],i=[0],r=0;for(let[e,o]of t)n.push(e),r+=o,i.push(r);return{lineIndexes:n,prefixTotals:i}}(this.cache.heightDeltas),l=cv(this.metrics,e)+this.cache.fileAnnotationHeight,d=0,u=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:i=0,metadataOffsets:r=[]})=>{if(e<=0)return;let o=d,a=d+e,u=5e3*Math.ceil(o/5e3);for(;u<a;){let e=u-o,i=l+(e>0?n:0)+e*this.metrics.lineHeight+function(e,t){let n=0;for(let i of e)i<t&&n++;return n}(r,e)*this.metrics.lineHeight+hw(s,t,t+e);this.cache.checkpoints.push({renderedLineIndex:u,lineIndex:t+e,top:i}),u+=5e3}l+=n+e*this.metrics.lineHeight+r.length*this.metrics.lineHeight+hw(s,t,t+e)+i,d=a};for(let e=0;e<this.fileDiff.hunks.length;e++){let t=this.fileDiff.hunks[e];if(null==t)throw Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");let s=cw({isPartial:this.fileDiff.isPartial,rangeSize:t.collapsedBefore,expandedHunks:a,hunkIndex:e,collapsedContextThreshold:n}),l=s.collapsedLines>0?cA({type:o,metrics:this.metrics,hunkIndex:e,hunkSpecs:t.hunkSpecs})?.totalHeight??0:0;u({rowCount:s.fromStart,startLineIndex:("split"===r?t.splitLineStart:t.unifiedLineStart)-s.rangeSize});let d=l;u({rowCount:s.fromEnd,startLineIndex:("split"===r?t.splitLineStart:t.unifiedLineStart)-s.fromEnd,preSeparatorHeight:d}),s.fromEnd>0&&(d=0);let c=e===i?ck({fileDiff:this.fileDiff,hunkIndex:e,expandedHunks:a,collapsedContextThreshold:n,errorPrefix:"VirtualizedFileDiff"}):void 0,h=null!=c&&c.collapsedLines>0?cE({type:o,metrics:this.metrics})?.totalHeight??0:0,f=null!=c?c.fromStart+c.fromEnd:0,p="split"===r?t.splitLineCount:t.unifiedLineCount,m="split"===r?t.splitLineStart:t.unifiedLineStart;u({rowCount:p,startLineIndex:m,preSeparatorHeight:d,postSeparatorHeight:0===f?h:0,metadataOffsets:function({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let i=t.hunkContent.at(-1);if(null==i)return[];if("context"===i.type)return[n-1];let r=Math.max(i.deletions,i.additions),o=i.deletions+i.additions;if("split"===e)return r>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let a=[];return i.deletions>0&&t.noEOFCRDeletions&&a.push(n-o+i.deletions-1),i.additions>0&&t.noEOFCRAdditions&&a.push(n-1),a}({diffStyle:r,hunk:t,rowCount:p})}),null!=c&&f>0&&u({rowCount:f,startLineIndex:m+p,postSeparatorHeight:h})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){let t;if(e<=0||0===this.cache.checkpoints.length)return;let n=0,i=this.cache.checkpoints.length-1;for(;n<=i;){let r=n+i>>1,o=this.cache.checkpoints[r];if(null==o)throw Error("VirtualizedFileDiff: invalid checkpoint index");o.lineIndex<=e?(t=o,n=r+1):i=r-1}return t}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,r=-1;for(;n<=i;){let t=n+i>>1,o=this.cache.checkpoints[t];if(null==o)throw Error("VirtualizedFileDiff: invalid checkpoint index");o.top<=e?(r=t,n=t+1):i=t-1}if(null==t)return r>=0?this.cache.checkpoints[r]:void 0;for(let e=r;e>=0;e--){let n=this.cache.checkpoints[e];if(null==n)throw Error("VirtualizedFileDiff: invalid checkpoint index");if(n.renderedLineIndex%t==0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let i of e.hunks)n+="split"===t?i.splitLineCount:i.unifiedLineCount;return n}let{expandUnchanged:i=!1,collapsedContextThreshold:r=1}=this.options,o=!!i||this.hunksRenderer.getExpandedHunksMap();for(let[i,a]of e.hunks.entries()){n+="split"===t?a.splitLineCount:a.unifiedLineCount;let s=Math.max(a.collapsedBefore,0),{fromStart:l,fromEnd:d,renderAll:u}=cw({isPartial:e.isPartial,rangeSize:s,expandedHunks:o,hunkIndex:i,collapsedContextThreshold:r});s>0&&(n+=u?s:l+d)}let a=ck({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:o,collapsedContextThreshold:r,errorPrefix:"VirtualizedFileDiff"});return null!=a&&(n+=a.fromStart+a.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){let r,o,a,{disableFileHeader:s=!1,expandUnchanged:l=!1,collapsedContextThreshold:d=1}=this.options,{hunkLineCount:u,lineHeight:c}=this.metrics,h=this.getDiffStyle(),f=this.getHunkSeparatorType(),p=this.height,m=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,h),g=cv(this.metrics,s),b=e.hunks.length>0?cy(this.metrics):0,{fileAnnotationHeight:v}=this.cache,y=g+v,w=Math.max(0,p-g-v-b),x=this.hasFileAnnotations(e),k=t+g;if(t<n-p||t>i)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-g-b};if(m<=u||0===e.hunks.length)return{startingLine:0,totalLines:u,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),m=this.cache.totalLines>0?this.cache.totalLines:m;let S=Math.ceil(Math.ceil(Math.max(i-n,0)/c)/u)*u+u,C=S/u,A=[],E=(n+i)/2,L=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-S*c*2),u),_=t+(L?.top??y),N=L?.renderedLineIndex??0;if(cL({diff:e,diffStyle:h,startingLine:L?.renderedLineIndex??0,expandedHunks:!!l||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:d,callback:({hunkIndex:e,hunk:s,collapsedBefore:l,collapsedAfter:d,deletionLine:c,additionLine:p})=>{let m=null!=p?p.splitLineIndex:c.splitLineIndex,g=null!=p?p.unifiedLineIndex:c.unifiedLineIndex,b=(p?.noEOFCR??!1)||(c?.noEOFCR??!1),v=(l>0?cA({type:f,metrics:this.metrics,hunkIndex:e,hunkSpecs:s?.hunkSpecs}):void 0)?.totalHeight??0;_+=v;let w=N%u==0,x=Math.floor(N/u);if(w&&(A[x]=_-(t+y+v),null!=a)){if(a<=0)return!0;a--}let k=this.getLineHeight("split"===h?m:g,b);return _>n-k&&_<i&&(r??=x),null==o&&_+k>E&&(o=x),null==a&&_>=i&&w&&(a=C),N++,_+=k,d>0&&(_+=cE({type:f,metrics:this.metrics})?.totalHeight??0),!1}}),null==r)if(!(v>0)||!x||!(k<i)||!(k+v>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-g-b};else r=0,o=0;let T=Math.round((o??=r)-C/2),R=Math.max(0,Math.min(T,Math.max(0,Math.ceil(m/u)-C))),M=R*u,P=T<0?S+T*u:S,I=A[R]??0,D=R+P/u;return{startingLine:M,totalLines:P,bufferBefore:0===M?0:v+I,bufferAfter:Math.max(0,D<A.length?w-A[D]:w-(_-t-y))}}};function hw({lineIndexes:e,prefixTotals:t},n,i){if(n>=i||0===e.length)return 0;let r=hx(e,n);return(t[hx(e,i)]??0)-(t[r]??0)}function hx(e,t){let n=0,i=e.length;for(;n<i;){let r=n+i>>1,o=e[r];if(null==o)throw Error("VirtualizedFileDiff: invalid prefix index");o<t?n=r+1:i=r}return n}e.i(4135),Symbol("IGNORE_RESPONSE");let hk=(0,g.createContext)(void 0),hS=new Set,hC=null;function hA(e){hS.add(e),hC??=requestAnimationFrame(hE)}function hE(e){let t=new Set(hS);for(let n of(hS.clear(),t))try{n(e)}catch(e){console.error(e)}hC=hS.size>0?requestAnimationFrame(hE):null}function hL({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){let a=n+2*o,s=i?n+2*r:a;if(a>=(t=Math.max(t,s))||i){let n=Math.max(e-r,0);return{top:n,bottom:Math.max(Math.min(e+s,t),n)}}let l=e+n/2-a/2,d=l+a;return l<0&&(l=0),d>t&&(d=t),{top:l=Math.floor(Math.max(l,0)),bottom:Math.ceil(Math.max(Math.min(d,t),l))}}let h_=[0,1e-6,.99999,1],hN={overscrollSize:1e3,intersectionObserverMargin:4e3,resizeDebugging:!1},hT=0,hR=-1;function hM(e,t){let n=e.getBoundingClientRect(),i=t?.getBoundingClientRect().top??0;return n.top-i}(class e{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++hR}`;config;type="simple";intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(e){this.config={...hN,...e}}setup(t,n){if(null==this.root){for(let[i,r]of(this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:h_,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:e.__lastScrollPosition}),hA(this.computeRenderRangeAndEmit)):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)},this.connectQueue.entries()))this.connect(i,r);this.connectQueue.clear(),this.markDOMDirty(),hA(this.computeRenderRangeAndEmit)}}instanceChanged(e,t){this.instancesChanged.add(e),t&&this.markDOMDirty(),hA(this.computeRenderRangeAndEmit)}getWindowSpecs(){return 0===this.windowSpecs.top&&0===this.windowSpecs.bottom&&(this.windowSpecs=hL({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}isInstanceVisible(e,t){let n=this.getScrollTop(),i=this.getHeight(),r=this.config.intersectionObserverMargin;return!(e<n-r-t||e>n+i+r)}handleContainerResize=e=>{if(null==this.root)return;let t=!1;for(let n of e){let e=n.borderBoxSize[0].blockSize;this.root instanceof Document?e!==this.scrollHeight&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:e-hT,newSize:e}),hT=e)):n.target===this.root?e!==this.height&&(this.heightDirty=!0,t=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:e-hT,newSize:e}),hT=e))}t&&hA(this.computeRenderRangeAndEmit)};setupWindow(){if(null==this.root||!(this.root instanceof Document))throw Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(e){if(null==this.root||this.root instanceof Document)throw Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),(e??=this.root.firstElementChild??void 0)instanceof HTMLElement&&(this.contentContainer=e,this.resizeObserver?.observe(e))}cleanUp(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0}getOffsetInScrollContainer(e){return this.getScrollTop()+hM(e,this.getScrollContainerElement())}connect(e,t){if(this.observers.has(e))throw Error("Virtualizer.connect: instance is already connected...");return null==this.intersectionObserver?this.connectQueue.set(e,t):(this.intersectionObserver.observe(e),this.observers.set(e,t),this.instancesChanged.add(t),this.markDOMDirty(),hA(this.computeRenderRangeAndEmit)),()=>this.disconnect(e)}disconnect(e){let t=this.observers.get(e);this.connectQueue.delete(e),null!=t&&(this.intersectionObserver?.unobserve(e),this.observers.delete(e),this.visibleInstances.delete(e)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),hA(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{e.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,hA(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{!e.__STOP&&null!=this.root&&this.root instanceof Document&&(this.scrollDirty=!0,hA(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{e.__STOP||null==this.root||this.root instanceof Document||(this.scrollDirty=!0,hA(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(e.__STOP)return;let t=this.heightDirty||this.scrollHeightDirty;if(!this.scrollDirty&&!this.scrollHeightDirty&&!this.heightDirty&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&0===this.instancesChanged.size)return;let n=this.instancesChanged.size>0;if(0===this.instancesChanged.size){var i;let e=hL({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&(i=this.windowSpecs,null==i||null==e?i===e:i.top===e.top&&i.bottom===e.bottom)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty)return;this.windowSpecs=e}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;let r=this.getScrollAnchor(this.height),o=new Set;for(let e of t?this.observers.values():this.visibleInstances.values())e.onRender(t)&&o.add(e);for(let e of this.instancesChanged)!o.has(e)&&e.onRender(t)&&o.add(e);for(let e of(this.scrollFix(r),o))e.reconcileHeights();(n||=this.instancesChanged.size>0)&&this.markDOMDirty(),(n||t)&&hA(this.computeRenderRangeAndEmit),o.clear(),this.instancesChanged.clear()};scrollFix(e){if(null==e)return;let t=this.getScrollContainerElement(),{lineIndex:n,lineOffset:i,fileElement:r,fileOffset:o,fileTypeOffset:a}=e;if(null!=n&&null!=i){let e=r.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(e instanceof HTMLElement){let n=hM(e,t);n!==i&&this.applyScrollFix(n-i);return}}let s=hM(r,t);if("top"===a)s!==o&&this.applyScrollFix(s-o);else{let e=s+r.getBoundingClientRect().height;e!==o&&this.applyScrollFix(e-o)}}applyScrollFix(e){null==this.root||this.root instanceof Document?window.scrollTo({top:window.scrollY+e,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+e,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(e){let t,n=this.getScrollContainerElement();for(let[i]of this.visibleInstances.entries()){let r,o,a,s,l=hM(i,n),d=l+i.offsetHeight;if(d<=0?(r=d,o="bottom"):(r=l,o="top"),d>0&&l<e)for(let e of i.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(e instanceof HTMLElement))continue;let t=e.dataset.lineIndex;if(null==t)continue;let i=hM(e,n);if(!(i<0)){a=t,s=i;break}}if(t?.lineOffset!=null&&null==s)continue;let u=!1;null==t||null!=s&&(null==t.lineOffset||s<t.lineOffset)?u=!0:null==s&&null==t.lineOffset&&(r>=0&&(t.fileOffset<0||r<t.fileOffset)?u=!0:r<0&&t.fileOffset<0&&r>t.fileOffset&&(u=!0)),u&&(t={fileElement:i,fileTypeOffset:o,fileOffset:r,lineIndex:a,lineOffset:s})}return t}handleIntersectionChange=e=>{for(let{target:t,isIntersecting:n}of(this.scrollDirty=!0,e)){if(!(t instanceof HTMLElement))throw Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");let e=this.observers.get(t);null!=e&&(n&&!this.visibleInstances.has(t)?(e.setVisibility(!0),this.visibleInstances.set(t,e),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(t)&&(e.setVisibility(!1),this.visibleInstances.delete(t),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&hA(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=null==this.root?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return e=Math.max(0,Math.min(e,this.getScrollHeight()-this.getHeight())),this.scrollTop=e,e}getScrollHeight(){return this.scrollHeightDirty&&(this.scrollHeightDirty=!1,this.scrollHeight=null==this.root?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight),this.scrollHeight}getHeight(){return this.heightDirty&&(this.heightDirty=!1,this.height=null==this.root?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height),this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return null==this.root||this.root instanceof Document?void 0:this.root}});let hP=(0,g.createContext)(void 0),hI="u"<typeof window?g.useEffect:g.useLayoutEffect;function hD({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:i}){return t||i||n?{...e,controlledSelection:t,renderCustomHeader:n?rY:e?.renderCustomHeader,renderGutterUtility:i?rY:e?.renderGutterUtility}:e}function h$({fileDiff:e,options:t,metrics:n,lineAnnotations:i,selectedLines:r,className:o,style:a,prerenderedHTML:s,renderAnnotation:l,renderCustomHeader:d,renderHeaderPrefix:u,renderHeaderMetadata:c,renderGutterUtility:h,disableWorkerPool:f=!1}){var p;let{ref:b,getHoveredLine:v}=function({fileDiff:e,options:t,lineAnnotations:n,selectedLines:i,prerenderedHTML:r,metrics:o,hasGutterRenderUtility:a,hasCustomHeader:s,disableWorkerPool:l}){var d;let u,c=(0,g.useContext)(hP),h=void 0!==i,f=(0,g.useContext)(hk),p=(0,g.useRef)(null),m=(d=i=>{if(null!=i){if(null!=p.current)throw Error("useFileDiffInstance: An instance should not already exist when a node is created");null!=c?p.current=new hy(hD({controlledSelection:h,hasCustomHeader:s,hasGutterRenderUtility:a,options:t}),c,o,!l?f:void 0,!0):p.current=new hg(hD({controlledSelection:h,hasCustomHeader:s,hasGutterRenderUtility:a,options:t}),!l?f:void 0,!0),p.current.hydrate({fileDiff:e,fileContainer:i,lineAnnotations:n,prerenderedHTML:r})}else{if(null==p.current)throw Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");p.current.cleanUp(),p.current=null}},u=(0,g.useRef)(d),(0,g.useInsertionEffect)(()=>void(u.current=d)),(0,g.useCallback)((...e)=>u.current(...e),[]));return hI(()=>{let{current:r}=p;if(null==r)return;let o=hD({controlledSelection:h,hasCustomHeader:s,hasGutterRenderUtility:a,options:t}),l=!rZ(r.options,o);r.setOptions(o),r.render({forceRender:l,fileDiff:e,lineAnnotations:n}),void 0!==i&&r.setSelectedLines(i)}),{ref:m,getHoveredLine:(0,g.useCallback)(()=>p.current?.getHoveredLine(),[])}}({fileDiff:e,options:t,metrics:n,lineAnnotations:i,selectedLines:r,prerenderedHTML:s,hasGutterRenderUtility:null!=h,hasCustomHeader:null!=d,disableWorkerPool:f});return(0,m.jsx)(rc,{ref:b,className:o,style:a,children:(p=function({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:i,renderHeaderMetadata:r,renderAnnotation:o,renderGutterUtility:a,renderMergeConflictUtility:s,lineAnnotations:l,getHoveredLine:d,getInstance:u}){let c=n?.(e),h=i?.(e),f=r?.(e);return(0,m.jsxs)(m.Fragment,{children:[null!=c?(0,m.jsx)("div",{slot:rw,children:c}):(0,m.jsxs)(m.Fragment,{children:[null!=h&&(0,m.jsx)("div",{slot:"header-prefix",children:h}),null!=f&&(0,m.jsx)("div",{slot:"header-metadata",children:f})]}),null!=o&&l?.map((e,t)=>(0,m.jsx)("div",{slot:rV(e),children:o(e)},t)),null!=t&&null!=s&&null!=u&&t.map(t=>{var n;let i;if(null==t)return;let r=null!=(i=function(e,t){let n=t.hunks[e.hunkIndex];if(null!=n)return{hunkIndex:e.hunkIndex,lineIndex:function(e,t){let n=e.unifiedLineStart;for(let i=0;i<t;i++){let t=e.hunkContent[i];n+="context"===t.type?t.lines:t.deletions+t.additions}return n}(n,e.startContentIndex)}}(n=t,e))?function({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:n.conflictIndex}):void 0;return(0,m.jsx)("div",{slot:r,style:rK,children:s(t,u)},r)}),null!=a&&(0,m.jsx)("div",{slot:"gutter-utility-slot",style:rX,children:a(d)})]})}({fileDiff:e,renderCustomHeader:d,renderHeaderPrefix:u,renderHeaderMetadata:c,renderAnnotation:l,renderGutterUtility:h,lineAnnotations:i,getHoveredLine:v}),"u"<typeof window&&null!=s?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:s}}),p]}):(0,m.jsx)(m.Fragment,{children:p}))})}let hO="devframe-git-theme",hj={light:"vitesse-light",dark:"vitesse-dark"};function hz({file:e,options:t,defaultOpen:n}){let[i,r]=(0,g.useState)(n),{additions:o,deletions:a}=function(e){let t=0,n=0;for(let i of e.hunks)t+=i.additionLines,n+=i.deletionLines;return{additions:t,deletions:n}}(e),s=e.prevName?`${e.prevName} → ${e.name}`:e.name;return(0,m.jsxs)("div",{children:[(0,m.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),"aria-expanded":i,className:"hover:bg-active bg-secondary flex w-full items-center gap-1.5 px-2.5 py-1.5 text-left font-mono text-xs transition-colors",children:[(0,m.jsx)(iC,{name:"i-ph-caret-right",className:iy("color-faint size-3 transition-transform",i&&"rotate-90")}),(0,m.jsx)(ru,{code:function(e){switch(e){case"new":return"added";case"deleted":return"deleted";case"rename-pure":case"rename-changed":return"renamed";default:return"modified"}}(e.type)}),(0,m.jsx)(iA,{path:e.name,className:"size-3.5"}),(0,m.jsx)("span",{className:"min-w-0 flex-1 truncate",title:s,children:s}),e.hunks.length>0?(0,m.jsxs)("span",{className:"shrink-0 tabular-nums",children:[(0,m.jsx)("span",{className:"text-success",children:`+${o}`})," ",(0,m.jsx)("span",{className:"text-error",children:`−${a}`})]}):e.type.startsWith("rename")?(0,m.jsx)(iw,{variant:"secondary",className:"px-1.5 py-0 text-[10px]",children:"renamed"}):(0,m.jsx)(iw,{variant:"secondary",className:"px-1.5 py-0 text-[10px]",children:"bin"})]}),i&&(e.hunks.length>0?(0,m.jsx)(h$,{fileDiff:e,options:t,disableWorkerPool:!0}):(0,m.jsx)("p",{className:"color-muted px-3 py-2 text-xs",children:"No textual diff (binary or metadata-only change)."}))]})}function hB({patch:e,loading:t,truncated:n,scroll:i=!0,collapsible:r=!1}){let o=function(){let[e,t]=(0,g.useState)("dark");return(0,g.useEffect)(()=>{let e=document.documentElement,n=()=>t(e.classList.contains("dark")?"dark":"light");n();let i=new MutationObserver(n);return i.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>i.disconnect()},[]),e}(),a=(0,g.useMemo)(()=>e?function(e){try{return(function(e,t=!1){var n;let i=[];for(let r of(n=e).startsWith("From ")||n.includes("\nFrom ")?e.split(rh):[e])try{i.push(function(e,t,n){try{return function(e,t,n=!1){var i,r,o;let a,s=(i=e).startsWith("diff --git")||i.includes("\ndiff --git"),l=s?(r=e,rU(r,"diff --git")):function(e){if(0===e.length)return[""];let t=[],n=0,i=0,r=0,o=0,a=!1;for(;i<e.length;){let s=rz(e,i);if(r<=0&&o<=0){if(rO(e,i)){i>n&&t.push(e.slice(n,i)),n=i,a=!0,i=rz(e,s);continue}if(a&&e.startsWith("@@ -",i)){let t=rB(e.slice(i,s));null!=t&&(r=t.deletionCount,o=t.additionCount)}i=s;continue}let l=e[i];if("\\"===l){i=s;continue}" "===l?(r=Math.max(r-1,0),o=Math.max(o-1,0)):"-"===l?r=Math.max(r-1,0):"+"===l&&(o=Math.max(o-1,0)),i=s}return t.push(e.slice(n)),t}(e),d=[];for(let e of l){if(s&&!rf.test(e)){if(null==a)a=rP(e);else if(n)throw Error("parsePatchContent: unknown file blob");else console.error("parsePatchContent: unknown file blob:",e);continue}if(!s&&(o=e,!rO(o,0))){if(null==a)a=rP(e);else if(n)throw Error("parsePatchContent: unknown file blob");else console.error("parsePatchContent: unknown file blob:",e);continue}let i=rI(e,{cacheKey:null!=t?`${t}-${d.length}`:void 0,isGitDiff:s,throwOnError:n});null!=i&&d.push(i)}return{patchMetadata:a,files:d}}(e,t,n)}finally{rM()}}(r,void 0,t))}catch(e){if(t)throw e;console.error(e)}return i})(e).flatMap(e=>e.files)}catch{return[]}}(e):[],[e]),s=(0,g.useMemo)(()=>({theme:hj,themeType:o,diffStyle:"unified",diffIndicators:"classic",disableFileHeader:r}),[o,r]);if(t)return(0,m.jsx)(rs,{className:"h-40 w-full"});if(!e||0===a.length)return(0,m.jsx)("p",{className:"color-muted p-3 text-sm",children:"No textual diff available (binary or unchanged)."});if(r)return(0,m.jsxs)("div",{className:"flex flex-col [&>*+*]:border-t [&>*+*]:border-base",children:[a.map((e,t)=>(0,m.jsx)(hz,{file:e,options:s,defaultOpen:1===a.length},e.name||t)),n&&(0,m.jsx)("p",{className:"text-warning px-3 py-1 text-xs",children:"Patch truncated."})]});let l=(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"flex flex-col text-sm [&>*+*]:border-t [&>*+*]:border-base",children:a.map((e,t)=>(0,m.jsx)(h$,{fileDiff:e,options:s,disableWorkerPool:!0},e.name||t))}),n&&(0,m.jsx)("p",{className:"text-warning px-3 py-1 text-xs",children:"Patch truncated."})]});return i?(0,m.jsx)(ro,{className:"h-72 w-full",children:l}):(0,m.jsx)("div",{children:l})}function hH({label:e}){let t=e.startsWith("tag: "),n=t?e.slice(5):e;return(0,m.jsxs)(iw,{variant:"secondary",className:"gap-1 font-mono text-[10px]",children:[t&&(0,m.jsx)(iC,{name:"i-ph-tag-duotone",className:"size-3"}),n]})}function hU({data:e,loading:t,error:n,onClose:i}){var r;return(0,m.jsxs)("div",{className:"flex h-full flex-col",children:[(0,m.jsxs)("div",{className:"flex items-start justify-between gap-2 pb-2",children:[(0,m.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,m.jsx)(iC,{name:"i-ph-git-commit-duotone",className:"color-active size-4"}),(0,m.jsx)("h2",{className:"text-sm leading-none font-semibold",children:"Commit details"})]}),i&&(0,m.jsx)(ik,{variant:"ghost",size:"sm",onClick:i,"aria-label":"Close commit details",children:(0,m.jsx)(iC,{name:"i-ph-x",className:"size-4"})})]}),n&&(0,m.jsx)("p",{className:"text-error text-sm",children:n}),!n&&(t||!e)&&(0,m.jsxs)("div",{className:"space-y-2",children:[(0,m.jsx)(rs,{className:"h-5 w-3/4"}),(0,m.jsx)(rs,{className:"h-4 w-1/2"}),(0,m.jsx)(rs,{className:"h-24 w-full"})]}),!n&&e&&!e.found&&(0,m.jsx)("p",{className:"color-muted text-sm",children:"Commit not found."}),!n&&e&&e.found&&(0,m.jsx)(ro,{className:"min-h-0 flex-1 pr-2",children:(0,m.jsxs)("div",{className:"space-y-4",children:[(0,m.jsxs)("div",{className:"space-y-1.5",children:[(0,m.jsx)("p",{className:"text-sm leading-snug font-medium break-words",children:e.subject}),e.refs.length>0&&(0,m.jsx)("div",{className:"flex flex-wrap gap-1",children:e.refs.map(e=>(0,m.jsx)(hH,{label:e},e))})]}),(0,m.jsxs)("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs",children:[(0,m.jsx)("dt",{className:"color-muted",children:"Commit"}),(0,m.jsx)("dd",{className:"truncate font-mono tabular-nums",title:e.hash,children:e.shortHash}),(0,m.jsx)("dt",{className:"color-muted",children:"Author"}),(0,m.jsxs)("dd",{className:"truncate",children:[e.author,(0,m.jsx)("span",{className:"color-muted",children:` <${e.email}>`})]}),(0,m.jsx)("dt",{className:"color-muted",children:"Authored"}),(0,m.jsx)("dd",{className:"truncate",children:(r=e.date)?new Date(r).toLocaleString():""}),e.committer!==e.author&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("dt",{className:"color-muted",children:"Committer"}),(0,m.jsx)("dd",{className:"truncate",children:e.committer})]}),e.parents.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("dt",{className:"color-muted",children:e.parents.length>1?"Parents":"Parent"}),(0,m.jsx)("dd",{className:"truncate font-mono tabular-nums",children:e.parents.map(e=>e.slice(0,7)).join(", ")})]})]}),e.body&&(0,m.jsx)("pre",{className:"bg-secondary max-h-48 overflow-auto rounded-md p-3 font-mono text-xs whitespace-pre-wrap",children:e.body}),(0,m.jsxs)("div",{className:"space-y-1.5",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsx)("span",{className:"color-muted text-xs font-medium tracking-wide uppercase",children:`${e.files.length} ${1===e.files.length?"file":"files"} changed`}),(0,m.jsxs)("span",{className:"text-xs tabular-nums",children:[(0,m.jsx)("span",{className:"text-success",children:`+${e.totalAdditions}`})," ",(0,m.jsx)("span",{className:"text-error",children:`−${e.totalDeletions}`})]})]}),null!==e.patch?(0,m.jsx)("div",{className:"overflow-hidden rounded-md border",children:(0,m.jsx)(hB,{patch:e.patch,loading:!1,truncated:e.truncated,scroll:!1,collapsible:!0})}):(0,m.jsx)("ul",{className:"space-y-0.5",children:e.files.map(e=>(0,m.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,m.jsx)(ru,{code:e.status}),(0,m.jsx)(iA,{path:e.path,className:"size-4 shrink-0"}),(0,m.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",title:e.path,children:e.path}),e.binary?(0,m.jsx)(iw,{variant:"secondary",className:"px-1.5 py-0 text-[10px]",children:"bin"}):(0,m.jsxs)("span",{className:"shrink-0 font-mono tabular-nums",children:[(0,m.jsx)("span",{className:"text-success",children:`+${e.additions}`})," ",(0,m.jsx)("span",{className:"text-error",children:`−${e.deletions}`})]})]},e.path))})]})]})})]})}function hF({hash:e,onClose:t}){let{data:n,loading:i,error:r}=nr((0,g.useCallback)(t=>t.call("git:show",{hash:e}),[e]));return(0,m.jsx)(hU,{data:n,loading:i,error:r,onClose:t})}let hG=Math.min,hW=Math.max,hq=Math.round,hV=Math.floor,hX=e=>({x:e,y:e}),hK={left:"right",right:"left",bottom:"top",top:"bottom"};function hY(e,t){return"function"==typeof e?e(t):e}function hJ(e){return e.split("-")[0]}function hQ(e){return e.split("-")[1]}function hZ(e){return"x"===e?"y":"x"}function h0(e){return"y"===e?"height":"width"}function h1(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function h2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let h8=["left","right"],h5=["right","left"],h6=["top","bottom"],h3=["bottom","top"];function h4(e){let t=hJ(e);return hK[t]+e.slice(t.length)}function h7(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function h9(e,t,n){let i,{reference:r,floating:o}=e,a=h1(t),s=hZ(h1(t)),l=h0(s),d=hJ(t),u=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;switch(d){case"top":i={x:u,y:r.y-o.height};break;case"bottom":i={x:u,y:r.y+r.height};break;case"right":i={x:r.x+r.width,y:c};break;case"left":i={x:r.x-o.width,y:c};break;default:i={x:r.x,y:r.y}}let f=hQ(t);return f&&(i[s]+=h*("end"===f?1:-1)*(n&&"y"===a?-1:1)),i}async function fe(e,t){var n,i,r,o,a;void 0===t&&(t={});let{x:s,y:l,platform:d,rects:u,elements:c,strategy:h}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:b=0}=hY(t,e),v="number"!=typeof b?{top:null!=(i=b.top)?i:0,right:null!=(r=b.right)?r:0,bottom:null!=(o=b.bottom)?o:0,left:null!=(a=b.left)?a:0}:{top:b,right:b,bottom:b,left:b},y=c[g?"floating"===m?"reference":"floating":m],w=h7(await d.getClippingRect({element:null==(n=await (null==d.isElement?void 0:d.isElement(y)))||n?y:y.contextElement||await (null==d.getDocumentElement?void 0:d.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:h})),x="floating"===m?{x:s,y:l,width:u.floating.width,height:u.floating.height}:u.reference,k=await (null==d.getOffsetParent?void 0:d.getOffsetParent(c.floating)),S=await (null==d.isElement?void 0:d.isElement(k))&&await (null==d.getScale?void 0:d.getScale(k))||{x:1,y:1},C=h7(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:k,strategy:h}):x);return{top:(w.top-C.top+v.top)/S.y,bottom:(C.bottom-w.bottom+v.bottom)/S.y,left:(w.left-C.left+v.left)/S.x,right:(C.right-w.right+v.right)/S.x}}let ft=async(e,t,n)=>{let{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:fe},l=await (null==a.isRTL?void 0:a.isRTL(t)),d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:c}=h9(d,i,l),h=i,f=0,p={};for(let n=0;n<o.length;n++){let m=o[n];if(!m)continue;let{name:g,fn:b}=m,{x:v,y:y,data:w,reset:x}=await b({x:u,y:c,initialPlacement:i,placement:h,strategy:r,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,c=null!=y?y:c,p[g]={...p[g],...w},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(d=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):x.rects),{x:u,y:c}=h9(d,h,l)),n=-1)}return{x:u,y:c,placement:h,strategy:r,middlewareData:p}},fn=new Set(["left","top"]);async function fi(e,t){let{placement:n,platform:i,elements:r}=e,o=await (null==i.isRTL?void 0:i.isRTL(r.floating)),a=hJ(n),s=hQ(n),l="y"===h1(n),d=fn.has(a)?-1:1,u=o&&l?-1:1,c=hY(t,e),{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&"number"==typeof p&&(f="end"===s?-1*p:p),l?{x:f*u,y:h*d}:{x:h*d,y:f*u}}function fr(){return"u">typeof window}function fo(e){return fl(e)?(e.nodeName||"").toLowerCase():"#document"}function fa(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fs(e){var t;return null==(t=(fl(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function fl(e){return!!fr()&&(e instanceof Node||e instanceof fa(e).Node)}function fd(e){return!!fr()&&(e instanceof Element||e instanceof fa(e).Element)}function fu(e){return!!fr()&&(e instanceof HTMLElement||e instanceof fa(e).HTMLElement)}function fc(e){return!(!fr()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof fa(e).ShadowRoot)}function fh(e){let{overflow:t,overflowX:n,overflowY:i,display:r}=fw(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&"inline"!==r&&"contents"!==r}function ff(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let fp=/transform|translate|scale|rotate|perspective|filter/,fm=/paint|layout|strict|content/,fg=e=>!!e&&"none"!==e;function fb(e){let t=fd(e)?fw(e):e;return fg(t.transform)||fg(t.translate)||fg(t.scale)||fg(t.rotate)||fg(t.perspective)||!fv()&&(fg(t.backdropFilter)||fg(t.filter))||fp.test(t.willChange||"")||fm.test(t.contain||"")}function fv(){return null==a&&(a="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),a}function fy(e){return/^(html|body|#document)$/.test(fo(e))}function fw(e){return fa(e).getComputedStyle(e)}function fx(e){return fd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fk(e){if("html"===fo(e))return e;let t=e.assignedSlot||e.parentNode||fc(e)&&e.host||fs(e);return fc(t)?t.host:t}function fS(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);let r=function e(t){let n=fk(t);return fy(n)?(t.ownerDocument||t).body:fu(n)&&fh(n)?n:e(n)}(e),o=r===(null==(i=e.ownerDocument)?void 0:i.body),a=fa(r);if(!o)return t.concat(r,fS(r,[],n));{let e=fC(a);return t.concat(a,a.visualViewport||[],fh(r)?r:[],e&&n?fS(e):[])}}function fC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fA(e){let t=fw(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=fu(e),o=r?e.offsetWidth:n,a=r?e.offsetHeight:i,s=hq(n)!==o||hq(i)!==a;return s&&(n=o,i=a),{width:n,height:i,$:s}}function fE(e){return fd(e)?e:e.contextElement}function fL(e){let t=fE(e);if(!fu(t))return hX(1);let n=t.getBoundingClientRect(),{width:i,height:r,$:o}=fA(t),a=(o?hq(n.width):n.width)/i,s=(o?hq(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let f_=hX(0);function fN(e){let t=fa(e);return fv()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:f_}function fT(e,t,n,i){var r;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=fE(e),s=hX(1);t&&(i?fd(i)&&(s=fL(i)):s=fL(e));let l=(void 0===(r=n)&&(r=!1),i&&r&&i===fa(a))?fN(a):hX(0),d=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,c=o.width/s.x,h=o.height/s.y;if(a&&i){let e=fa(a),t=fd(i)?fa(i):i,n=e,r=fC(n);for(;r&&t!==n;){let e=fL(r),t=r.getBoundingClientRect(),i=fw(r),o=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;d*=e.x,u*=e.y,c*=e.x,h*=e.y,d+=o,u+=a,r=fC(n=fa(r))}}return h7({width:c,height:h,x:d,y:u})}function fR(e,t){let n=fx(e).scrollLeft;return t?t.left+n:fT(fs(e)).left+n}function fM(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-fR(e,n),y:n.top+t.scrollTop}}function fP(e,t,n){var i;let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");let i="layoutViewport"===n,r=fa(e),o=fs(e),a=r.visualViewport,s=o.clientWidth,l=o.clientHeight,d=0,u=0;if(a){let e=!fv()||"fixed"===t;i?e||(d=-a.offsetLeft,u=-a.offsetTop):(s=a.width,l=a.height,e&&(d=a.offsetLeft,u=a.offsetTop))}if(0>=fR(o)){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(o.clientWidth-t.clientWidth-i),a="stable both-edges"===getComputedStyle(o).scrollbarGutter?r/2:r;a<=25&&(s-=a)}return{width:s,height:l,x:d,y:u}}(e,n,t);else if("document"===t){let t,n,o,a,s,l;t=fx(i=fs(e)),n=i.ownerDocument.body,o=hW(i.scrollWidth,i.clientWidth,n.scrollWidth,n.clientWidth),a=hW(i.scrollHeight,i.clientHeight,n.scrollHeight,n.clientHeight),s=-t.scrollLeft+fR(i),l=-t.scrollTop,"rtl"===fw(n).direction&&(s+=hW(i.clientWidth,n.clientWidth)-o),r={width:o,height:a,x:s,y:l}}else if(fd(t)){let e,i,o,a,s,l;i=(e=fT(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,a=fL(t),s=t.clientWidth*a.x,l=t.clientHeight*a.y,r={width:s,height:l,x:o*a.x,y:i*a.y}}else{let n=fN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return h7(r)}function fI(e){return"static"===fw(e).position}function fD(e,t){if(!fu(e)||"fixed"===fw(e).position)return null;if(t)return t(e);let n=e.offsetParent;return fs(e)===n&&(n=n.ownerDocument.body),n}function f$(e,t){var n;let i=fa(e);if(ff(e))return i;if(!fu(e)){let t=fk(e);for(;t&&!fy(t);){if(fd(t)&&!fI(t))return t;t=fk(t)}return i}let r=fD(e,t);for(;r&&(n=r,/^(table|td|th)$/.test(fo(n)))&&fI(r);)r=fD(r,t);return r&&fy(r)&&fI(r)&&!fb(r)?i:r||function(e){let t=fk(e);for(;fu(t)&&!fy(t);){if(fb(t))return t;if(ff(t))break;t=fk(t)}return null}(e)||i}let fO=async function(e){let t=this.getOffsetParent||f$,n=this.getDimensions,i=await n(e.floating);return{reference:function(e,t,n){let i=fu(t),r=fs(t),o="fixed"===n,a=fT(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=hX(0);if((i||!o)&&(("body"!==fo(t)||fh(r))&&(s=fx(t)),i)){let e=fT(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}!i&&r&&(l.x=fR(r));let d=!r||i||o?hX(0):fM(r,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},fj={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e,o="fixed"===r,a=fs(i),s=!!t&&ff(t.floating);if(i===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},d=hX(1),u=hX(0),c=fu(i);if((c||!o)&&(("body"!==fo(i)||fh(a))&&(l=fx(i)),c)){let e=fT(i);d=fL(i),u.x=e.x+i.clientLeft,u.y=e.y+i.clientTop}let h=!a||c||o?hX(0):fM(a,l);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+u.x+h.x,y:n.y*d.y-l.scrollTop*d.y+u.y+h.y}},getDocumentElement:fs,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e,o=[..."clippingAncestors"===n?ff(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let i=fS(e,[],!1).filter(e=>fd(e)&&"body"!==fo(e)),r=null,o="fixed"===fw(e).position,a=o?fk(e):e;for(;fd(a)&&!fy(a);){let e=fw(a),t=fb(a),n=r?r.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?r=e:i=i.filter(e=>e!==a),a=fk(a)}return t.set(e,i),i}(t,this._c):[].concat(n),i],a=fP(t,o[0],r),s=a.top,l=a.right,d=a.bottom,u=a.left;for(let e=1;e<o.length;e++){let n=fP(t,o[e],r);s=hW(n.top,s),l=hG(n.right,l),d=hG(n.bottom,d),u=hW(n.left,u)}return{width:l-u,height:d-s,x:u,y:s}},getOffsetParent:f$,getElementRects:fO,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=fA(e);return{width:t,height:n}},getScale:fL,isElement:fd,isRTL:function(e){return"rtl"===fw(e).direction}};function fz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fB(e,t,n,i){let r;void 0===i&&(i={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:d=!1}=i,u=fE(e),c=o||a?[...u?fS(u):[],...t?fS(t):[]]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});let h=u&&l?function(e,t,n){let i,r=null,o=fs(e);function a(){var e;clearTimeout(i),null==(e=r)||e.disconnect(),r=null}function s(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),a();let d=e.getBoundingClientRect(),{left:u,top:c,width:h,height:f}=d;if(n||t(),!h||!f)return;let p={rootMargin:-hV(c)+"px "+-hV(o.clientWidth-(u+h))+"px "+-hV(o.clientHeight-(c+f))+"px "+-hV(u)+"px",threshold:hW(0,hG(1,l))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(!fz(d,e.getBoundingClientRect()))return s();if(n!==l){if(!m)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}m=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}let l=fa(e),d=()=>s(n);return l.addEventListener("resize",d),s(!0),()=>{l.removeEventListener("resize",d),a()}}(u,n,a):null,f=-1,p=null;s&&(p=new ResizeObserver(e=>{let[i]=e;i&&i.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),u&&!d&&p.observe(u),t&&p.observe(t));let m=d?fT(e):null;return d&&function t(){let i=fT(e);m&&!fz(m,i)&&n(),m=i,r=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,d&&cancelAnimationFrame(r)}}var fH="u">typeof document?g.useLayoutEffect:function(){};function fU(e,t){let n,i,r;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(i=n;0!=i--;)if(!fU(e[i],t[i]))return!1;return!0}if((n=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!({}).hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!=i--;){let n=r[i];if(("_owner"!==n||!e.$$typeof)&&!fU(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function fF(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fG(e,t){let n=fF(e);return Math.round(t*n)/n}function fW(e){let t=g.useRef(e);return fH(()=>{t.current=e}),t}var fq='input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),area[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)',fV="u"<typeof Element,fX=fV?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fK=!fV&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},fY=function(e,t){void 0===t&&(t=!0);var n,i=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"inert");return""===i||"true"===i||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):fY(e.parentNode))},fJ=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},fQ=function(e,t,n){if(fY(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(fq));return t&&fX.call(e,fq)&&i.unshift(e),i=i.filter(n)},fZ=function(e,t,n){for(var i=[],r=Array.from(e);r.length;){var o=r.shift();if(!fY(o,!1))if("SLOT"===o.tagName){var a=o.assignedElements(),s=fZ(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:o,candidates:s})}else{fX.call(o,fq)&&n.filter(o)&&(t||!e.includes(o))&&i.push(o);var l=o.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(o),d=!fY(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(l&&d){var u=fZ(!0===l?o.children:l.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else r.unshift.apply(r,o.children)}}return i},f0=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},f1=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||fJ(e))&&!f0(e)?0:e.tabIndex},f2=function(e,t){var n=f1(e);return n<0&&t&&!f0(e)?0:n},f8=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},f5=function(e){return"INPUT"===e.tagName},f6=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},f3=function(e){if(!e.name)return!0;var t,n=e.form||fK(e),i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("u">typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var r=f6(t,e.form);return!r||r===e},f4=function(e){return f5(e)&&"radio"===e.type&&!f3(e)},f7=function(e){var t,n,i,r,o,a,s,l=e&&fK(e),d=null==(t=l)?void 0:t.host,u=!1;if(l&&l!==e)for(u=!!(null!=(n=d)&&null!=(i=n.ownerDocument)&&i.contains(d)||null!=e&&null!=(r=e.ownerDocument)&&r.contains(e));!u&&d;)u=!!(null!=(a=d=null==(o=l=fK(d))?void 0:o.host)&&null!=(s=a.ownerDocument)&&s.contains(d));return u},f9=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},pe=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var r=getComputedStyle(e).visibility;if("hidden"===r||"collapse"===r)return!0;var o=fX.call(e,"details>summary:first-of-type")?e.parentElement:e;if(fX.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return f9(e)}else{if("function"==typeof i){for(var a=e;e;){var s=e.parentElement,l=fK(e);if(s&&!s.shadowRoot&&!0===i(s))return f9(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=a}if(f7(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},pt=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if("LEGEND"===i.tagName)return!!fX.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1},pn=function(e,t){return!(t.disabled||f5(t)&&"hidden"===t.type||pe(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||pt(t))},pi=function(e,t){return!(f4(t)||0>f1(t))&&!!pn(e,t)},pr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},po=function(e){var t=[],n=[];return e.forEach(function(e,i){var r=!!e.scopeParent,o=r?e.scopeParent:e,a=f2(o,r),s=r?po(e.candidates):o;0===a?r?t.push.apply(t,s):t.push(o):n.push({documentOrder:i,tabIndex:a,item:e,isScope:r,content:s})}),n.sort(f8).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},pa=function(e,t){return po((t=t||{}).getShadowRoot?fZ([e],t.includeContainer,{filter:pi.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:pr}):fQ(e,t.includeContainer,pi.bind(null,t)))};function ps(){return/apple/i.test(navigator.vendor)}function pl(e){let t=e.activeElement;for(;(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function pd(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fc(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function pu(e){return"composedPath"in e?e.composedPath()[0]:e.target}function pc(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function ph(e){return(null==e?void 0:e.ownerDocument)||document}function pf(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var i;return e.parentId===t&&(!n||(null==(i=e.context)?void 0:i.open))}).flatMap(t=>[t,...pf(e,t.id,n)])}function pp(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var pm="u">typeof document?g.useLayoutEffect:function(){};function pg(e){let t=g.useRef(e);return pm(()=>{t.current=e}),t}let pb={...g}.useInsertionEffect||(e=>e());function pv(e){let t=g.useRef(()=>{});return pb(()=>{t.current=e}),g.useCallback(function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)},[])}let py=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pw(e,t){let n=pa(e,py()),i=n.length;if(0===i)return;let r=pl(ph(e)),o=n.indexOf(r);return n[-1===o?1===t?0:i-1:o+t]}function px(e,t){let n=t||e.currentTarget,i=e.relatedTarget;return!i||!pd(n,i)}function pk(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}let pS="active",pC="selected",pA={...g},pE=!1,pL=0,p_=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pL++,pN=pA.useId||function(){let[e,t]=g.useState(()=>pE?p_():void 0);return pm(()=>{null==e&&t(p_())},[]),g.useEffect(()=>{pE=!0},[]),e},pT=g.createContext(null),pR=g.createContext(null),pM=()=>{var e;return(null==(e=g.useContext(pT))?void 0:e.id)||null};function pP(e){return"data-floating-ui-"+e}function pI(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let pD=pP("safe-polygon");function p$(e,t,n){if(n&&!pp(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){let n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function pO(e){return"function"==typeof e?e():e}function pj(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fc(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}let pz={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},pB=g.forwardRef(function(e,t){let[n,i]=g.useState();pm(()=>{ps()&&i("button")},[]);let r={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[pP("focus-guard")]:"",style:pz};return(0,m.jsx)("span",{...e,...r})}),pH={clipPath:"inset(50%)",position:"fixed",top:0,left:0},pU=g.createContext(null),pF=pP("portal");function pG(e){let{children:t,id:n,root:i,preserveTabOrder:r=!0}=e,o=function(e){void 0===e&&(e={});let{id:t,root:n}=e,i=pN(),r=pW(),[o,a]=g.useState(null),s=g.useRef(null);return pm(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),pm(()=>{if(!i||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement("div");n.id=i,n.setAttribute(pF,""),e.appendChild(n),s.current=n,a(n)},[t,i]),pm(()=>{if(null===n||!i||s.current)return;let e=n||(null==r?void 0:r.portalNode);e&&!fl(e)&&(e=e.current),e=e||document.body;let o=null;t&&((o=document.createElement("div")).id=t,e.appendChild(o));let l=document.createElement("div");l.id=i,l.setAttribute(pF,""),(e=o||e).appendChild(l),s.current=l,a(l)},[t,n,i,r]),o}({id:n,root:i}),[a,s]=g.useState(null),l=g.useRef(null),d=g.useRef(null),u=g.useRef(null),c=g.useRef(null),h=null==a?void 0:a.modal,f=null==a?void 0:a.open,p=!!a&&!a.modal&&a.open&&r&&!!(i||o);return g.useEffect(()=>{if(o&&r&&!h)return o.addEventListener("focusin",e,!0),o.addEventListener("focusout",e,!0),()=>{o.removeEventListener("focusin",e,!0),o.removeEventListener("focusout",e,!0)};function e(e){o&&px(e)&&("focusin"===e.type?pk:function(e){pa(e,py()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(o)}},[o,r,h]),g.useEffect(()=>{!o||f||pk(o)},[f,o]),(0,m.jsxs)(pU.Provider,{value:g.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:c,portalNode:o,setFocusManagerState:s}),[r,o]),children:[p&&o&&(0,m.jsx)(pB,{"data-type":"outside",ref:l,onFocus:e=>{var t,n;if(px(e,o))null==(t=u.current)||t.focus();else{let e=pw(ph(n=a?a.domReference:null).body,-1)||n;null==e||e.focus()}}}),p&&o&&(0,m.jsx)("span",{"aria-owns":o.id,style:pH}),o&&iE.createPortal(t,o),p&&o&&(0,m.jsx)(pB,{"data-type":"outside",ref:d,onFocus:e=>{var t,n;if(px(e,o))null==(t=c.current)||t.focus();else{let t=pw(ph(n=a?a.domReference:null).body,1)||n;null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let pW=()=>g.useContext(pU),pq={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},pV={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},pX=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function pK(){let e;return(null!=(e=navigator.userAgentData)&&e.platform?e.platform:navigator.platform).toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&ps()}function pY(e,t,n){let i=new Map,r="item"===n,o=e;if(r&&e){let{[pS]:t,[pC]:n,...i}=e;o=i}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...o,...t.map(t=>{let i=t?t[n]:null;return"function"==typeof i?e?i(e):null:i}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(!(r&&[pS,pC].includes(n)))if(0===n.indexOf("on")){if(i.has(n)||i.set(n,[]),"function"==typeof o){var a;null==(a=i.get(n))||a.push(o),e[n]=function(){for(var e,t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return null==(e=i.get(n))?void 0:e.map(e=>e(...r)).find(e=>void 0!==e)}}}else e[n]=o}),e),{})}}function pJ(e,t){let[n,i]=e,r=!1,o=t.length;for(let e=0,a=o-1;e<o;a=e++){let[o,s]=t[e]||[0,0],[l,d]=t[a]||[0,0];s>=i!=d>=i&&n<=(l-o)*(i-s)/(d-s)+o&&(r=!r)}return r}let pQ=["#3b82f6","#f59e0b","#ef4444","#8b5cf6","#10b981","#ec4899","#06b6d4","#f97316"],pZ={remote:0,head:1,tag:2,branch:3};function p0(e){return"branch"===e.kind&&e.current?4:pZ[e.kind]}let p1=["#3b82f6","#f59e0b","#ef4444","#8b5cf6","#10b981","#ec4899","#06b6d4","#f97316","#14b8a6","#6366f1"];async function p2(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t)),e=>e.toString(16).padStart(2,"0")).join("")}let p8=/^(?:\d+\+)?([a-z0-9](?:[a-z0-9-]*[a-z0-9])?)@users\.noreply\.github\.com$/i;async function p5(e,t){let n=e.trim().toLowerCase();if(!n||!n.includes("@"))return null;let i=n.match(p8);if(i)return`https://github.com/${i[1]}.png?size=${t}`;if(!globalThis.crypto?.subtle)return null;let r=await p2(n);return`https://gravatar.com/avatar/${r}?s=${t}&d=404`}function p6({name:e,email:t,size:n=64,className:i,...r}){let o,a=p1[function(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Math.abs(t)}((t||e||"?").toLowerCase())%p1.length],[s,l]=(0,g.useState)(null),[d,u]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{let e=!0;return l(null),u(!1),p5(t??"",n).then(t=>e&&l(t)).catch(()=>{}),()=>{e=!1}},[t,n]),(0,m.jsxs)("span",{className:iy("relative inline-flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-full text-[11px] font-semibold text-white select-none",i),style:{backgroundColor:a},title:e,...r,children:[0===(o=(e.trim()||(t??"").split("@")[0]||"?").split(/[\s._-]+/).filter(Boolean)).length?"?":1===o.length?o[0].slice(0,2).toUpperCase():(o[0][0]+o[o.length-1][0]).toUpperCase(),s&&!d&&(0,m.jsx)("img",{src:s,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>u(!0),className:"absolute inset-0 size-full rounded-full object-cover"})]})}function p3(e,t){let n=Number.parseInt(e.slice(1,3),16),i=Number.parseInt(e.slice(3,5),16),r=Number.parseInt(e.slice(5,7),16);return`rgba(${n}, ${i}, ${r}, ${t})`}function p4(e){return 8+15*e+7.5}function p7(e,t,n,i){let r=p4(e),o=p4(n);if(e===n)return`M ${r} ${t} L ${o} ${i}`;let a=(t+i)/2;return`M ${r} ${t} C ${r} ${a} ${o} ${a} ${o} ${i}`}function p9({row:e,width:t,isHead:n,topStub:i}){return(0,m.jsxs)("svg",{width:t,height:30,className:"block shrink-0",style:{overflow:"visible"},"aria-hidden":!0,children:[i&&(0,m.jsx)("path",{d:p7(e.col,0,e.col,15),fill:"none",stroke:e.color,strokeWidth:2,strokeLinecap:"round"}),e.topLinks.map((e,t)=>(0,m.jsx)("path",{d:p7(e.from,0,e.to,15),fill:"none",stroke:e.color,strokeWidth:2,strokeLinecap:"round"},`t${t}`)),e.bottomLinks.map((e,t)=>(0,m.jsx)("path",{d:p7(e.from,15,e.to,30),fill:"none",stroke:e.color,strokeWidth:2,strokeLinecap:"round"},`b${t}`)),n&&(0,m.jsx)("circle",{cx:p4(e.col),cy:15,r:7.5,fill:"none",stroke:e.color,strokeWidth:1.5,opacity:.3}),(0,m.jsx)("circle",{cx:p4(e.col),cy:15,r:4,fill:n?void 0:e.color,className:n?"fill-white dark:fill-[#111]":void 0,stroke:e.color,strokeWidth:2.5})]})}function me({refToken:e,color:t}){if("tag"===e.kind)return(0,m.jsxs)("span",{className:"inline-flex max-w-[140px] items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] leading-none font-medium",style:{color:t,borderColor:p3(t,.5),backgroundColor:p3(t,.12)},children:[(0,m.jsx)(iC,{name:"i-ph-tag-duotone",className:"size-2.5 shrink-0"}),(0,m.jsx)("span",{className:"truncate",title:e.name,children:e.name})]});if("head"===e.kind)return(0,m.jsx)("span",{className:"color-muted inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 font-mono text-[10px] leading-none font-medium",children:"HEAD"});let n="remote"===e.kind?`${e.remote}/${e.name}`:e.name,i="branch"===e.kind&&e.current;return(0,m.jsxs)("span",{className:"inline-flex max-w-[140px] items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] leading-none font-medium",style:i?{color:"#fff",backgroundColor:t}:{color:t,borderColor:p3(t,.5),backgroundColor:p3(t,.12),borderWidth:1,borderStyle:"solid"},children:[i?(0,m.jsx)(iC,{name:"i-ph-check",className:"size-2.5 shrink-0"}):(0,m.jsx)(iC,{name:"i-ph-git-branch-duotone",className:"size-2.5 shrink-0 opacity-70"}),(0,m.jsx)("span",{className:"truncate",title:n,children:n})]})}function mt({additions:e,deletions:t}){return(0,m.jsxs)("span",{className:"tabular-nums",children:[(0,m.jsx)("span",{className:"text-success font-medium",children:`+${e}`})," ",(0,m.jsx)("span",{className:"text-error font-medium",children:`−${t}`})]})}function mn({commit:e,detail:t,onOpen:n}){let i=(t?.data?.body||e.body||e.subject).trim(),r=t?.data?.files.length??0;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"space-y-2.5 p-3.5",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,m.jsx)(p6,{name:e.author,email:e.email,className:"size-8 text-xs"}),(0,m.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2",children:[(0,m.jsx)("span",{className:"color-base truncate font-semibold",children:e.author}),(0,m.jsx)("span",{className:"color-muted shrink-0 text-xs",title:new Date(e.date).toLocaleString(),children:function(e){let t=Math.round((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t} minute${1===t?"":"s"} ago`;let n=Math.round(t/60);if(n<24)return`${n} hour${1===n?"":"s"} ago`;let i=Math.round(n/24);return i<30?`${i} day${1===i?"":"s"} ago`:new Date(e).toLocaleDateString()}(e.date)})]})]}),(0,m.jsx)("p",{className:"color-muted line-clamp-3 text-sm leading-snug",children:i})]}),(0,m.jsxs)("div",{className:"border-base flex items-center justify-between border-t px-3.5 py-2.5 text-sm",children:[t?.loading||!t?(0,m.jsxs)("span",{className:"color-faint inline-flex items-center gap-1.5",children:[(0,m.jsx)(iC,{name:"i-ph-spinner-gap",className:"size-3.5 animate-spin"}),"Loading…"]}):t.data?(0,m.jsxs)("span",{className:"color-muted",children:[(0,m.jsxs)("span",{className:"color-base font-medium",children:[r," ",1===r?"file":"files"," ","changed"]})," ",(0,m.jsx)(mt,{additions:t.data.totalAdditions,deletions:t.data.totalDeletions})]}):(0,m.jsx)("code",{className:"color-muted tabular-nums",children:e.shortHash}),(0,m.jsx)(ik,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Open commit details",children:(0,m.jsx)(iC,{name:"i-ph-arrow-right",className:"size-4"})})]})]})}let mi=(0,g.memo)(({commit:e,row:t,gutter:n,currentBranch:i,isHead:r,topStub:o,selected:a,onSelect:s,onLoadDetail:l})=>{var d,u,c,h,f,p,b,v;let y,w,x,k,S,C,A,E,L,_=(0,g.useMemo)(()=>(function(e,t){let n=[];for(let i of e){let e=i.trim();if(!e)continue;if(e.startsWith("tag: ")){n.push({kind:"tag",name:e.slice(5).trim()});continue}if(e.includes("->")){let t=e.split("->")[1]?.trim();t&&n.push({kind:"branch",name:t,current:!0});continue}if("HEAD"===e){n.push({kind:"head"});continue}let r=e.indexOf("/");if(r>0){let t=e.slice(0,r),i=e.slice(r+1);if("HEAD"===i)continue;n.push({kind:"remote",remote:t,name:i});continue}n.push({kind:"branch",name:e,current:t===e})}return n.sort((e,t)=>p0(e)-p0(t))})(e.refs,i),[e.refs,i]),[N,T]=(0,g.useState)(!1),[R,M]=(0,g.useState)(),P=0!==t.col&&!a&&!N,I=function(e){var t,n;let{elements:i,...r}=void 0===e?{}:e,{nodeId:o}=r,a=function(e){let{open:t=!1,onOpenChange:n,elements:i}=e,r=pN(),o=g.useRef({}),[a]=g.useState(()=>{let e;return e=new Map,{emit(t,n){var i;null==(i=e.get(t))||i.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var i;null==(i=e.get(t))||i.delete(n)}}}),s=null!=pM(),[l,d]=g.useState(i.reference),u=pv((e,t,i)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:i,nested:s}),null==n||n(e,t,i)}),c=g.useMemo(()=>({setPositionReference:d}),[]),h=g.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return g.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:h,events:a,floatingId:r,refs:c}),[t,u,h,a,r,c])}({...r,elements:{reference:null!=(t=null==i?void 0:i.reference)?t:null,floating:null!=(n=null==i?void 0:i.floating)?n:null}}),s=r.rootContext||a,l=s.elements,[d,u]=g.useState(null),[c,h]=g.useState(null),f=(null==l?void 0:l.domReference)||d,p=g.useRef(null),m=g.useContext(pR);pm(()=>{f&&(p.current=f)},[f]);let b=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:d}=e,[u,c]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=g.useState(i);fU(h,i)||f(i);let[p,m]=g.useState(null),[b,v]=g.useState(null),y=g.useCallback(e=>{e!==S.current&&(S.current=e,m(e))},[]),w=g.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),x=o||p,k=a||b,S=g.useRef(null),C=g.useRef(null),A=g.useRef(u),E=null!=l,L=fW(l),_=fW(r),N=fW(d),T=g.useCallback(()=>{var e,i;let r,o,a;if(!S.current||!C.current)return;let s={placement:t,strategy:n,middleware:h};_.current&&(s.platform=_.current),(e=S.current,i=C.current,r=new Map,o=null!=s?s:{},a={...fj,...o.platform,_c:r},ft(e,i,{...o,platform:a})).then(e=>{let t={...e,isPositioned:!1!==N.current};R.current&&!fU(A.current,t)&&(A.current=t,iE.flushSync(()=>{c(t)}))})},[h,t,n,_,N]);fH(()=>{!1===d&&A.current.isPositioned&&(A.current.isPositioned=!1,c(e=>({...e,isPositioned:!1})))},[d]);let R=g.useRef(!1);fH(()=>(R.current=!0,()=>{R.current=!1}),[]),fH(()=>{if(x&&(S.current=x),k&&(C.current=k),x&&k){if(L.current)return L.current(x,k,T);T()}},[x,k,T,L,E]);let M=g.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:w}),[y,w]),P=g.useMemo(()=>({reference:x,floating:k}),[x,k]),I=g.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=fG(P.floating,u.x),i=fG(P.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...fF(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:i}},[n,s,P.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:T,refs:M,elements:P,floatingStyles:I}),[u,T,M,P,I])}({...r,elements:{...l,...c&&{reference:c}}}),v=g.useCallback(e=>{let t=fd(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;h(t),b.refs.setReference(t)},[b.refs]),y=g.useCallback(e=>{(fd(e)||null===e)&&(p.current=e,u(e)),(fd(b.refs.reference.current)||null===b.refs.reference.current||null!==e&&!fd(e))&&b.refs.setReference(e)},[b.refs]),w=g.useMemo(()=>({...b.refs,setReference:y,setPositionReference:v,domReference:p}),[b.refs,y,v]),x=g.useMemo(()=>({...b.elements,domReference:f}),[b.elements,f]),k=g.useMemo(()=>({...b,...s,refs:w,elements:x,nodeId:o}),[b,w,x,o,s]);return pm(()=>{s.dataRef.current.floatingContext=k;let e=null==m?void 0:m.nodesRef.current.find(e=>e.id===o);e&&(e.context=k)}),g.useMemo(()=>({...b,context:k,refs:w,elements:x}),[b,w,x,k])}({open:N,onOpenChange:T,placement:"bottom-start",middleware:[{name:(y={name:"offset",options:6,async fn(e){var t,n;let{x:i,y:r,placement:o,middlewareData:a}=e,s=await fi(e,6);return o===(null==(t=a.offset)?void 0:t.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:o}}}}).name,fn:y.fn,options:[6,d]},{name:(w={name:"flip",options:h=u={padding:8},async fn(e){var t,n,i,r,o,a,s,l;let d,u,c,{placement:f,middlewareData:p,rects:m,initialPlacement:g,platform:b,elements:v}=e,{mainAxis:y=!0,crossAxis:w=!0,fallbackPlacements:x,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...A}=hY(h,e);if(null!=(t=p.arrow)&&t.alignmentOffset)return{};let E=hJ(f),L=h1(g),_=hJ(g)===g,N=await (null==b.isRTL?void 0:b.isRTL(v.floating)),T=x||(_||!C?[h4(g)]:(d=h4(g),[h2(g),d,h2(d)])),R="none"!==S;!x&&R&&T.push(...(u=hQ(g),c=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?h5:h8;return t?h8:h5;case"left":case"right":return t?h6:h3;default:return[]}}(hJ(g),"start"===S,N),u&&(c=c.map(e=>e+"-"+u),C&&(c=c.concat(c.map(h2)))),c));let M=[g,...T],P=await b.detectOverflow(e,A),I=[],D=(null==(n=p.flip)?void 0:n.overflows)||[];if(y&&I.push(P[E]),w){let e,t,n,i,r=(a=f,s=m,void 0===(l=N)&&(l=!1),e=hQ(a),n=h0(t=hZ(h1(a))),i="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",s.reference[n]>s.floating[n]&&(i=h4(i)),[i,h4(i)]);I.push(P[r[0]],P[r[1]])}if(D=[...D,{placement:f,overflows:I}],!I.every(e=>e<=0)){let e=((null==(i=p.flip)?void 0:i.index)||0)+1,t=M[e];if(t&&("alignment"!==w||L===h1(t)||D.every(e=>h1(e.placement)!==L||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(r=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:r.placement;if(!n)switch(k){case"bestFit":{let e=null==(o=D.filter(e=>{if(R){let t=h1(e.placement);return t===L||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=g}if(f!==n)return{reset:{placement:n}}}return{}}}).name,fn:w.fn,options:[u,c]},{name:(x={name:"shift",options:b=f={padding:8},async fn(e){let{x:t,y:n,placement:i,platform:r}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hY(b,e),d={x:t,y:n},u=await r.detectOverflow(e,l),c=h1(i),h=hZ(c),f=d[h],p=d[c],m=(e,t)=>hW(t+u["y"===e?"top":"left"],hG(t,t-u["y"===e?"bottom":"right"]));o&&(f=m(h,f)),a&&(p=m(c,p));let g=s.fn({...e,[h]:f,[c]:p});return{...g,data:{x:g.x-t,y:g.y-n,enabled:{[h]:o,[c]:a}}}}}).name,fn:x.fn,options:[f,p]}],whileElementsMounted:fB}),{getReferenceProps:D,getFloatingProps:$}=(k=(v=[function(e,t){void 0===t&&(t={});let{open:n,onOpenChange:i,dataRef:r,events:o,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:d=null,mouseOnly:u=!1,restMs:c=0,move:h=!0}=t,f=g.useContext(pR),p=pM(),m=pg(d),b=pg(l),v=pg(n),y=pg(c),w=g.useRef(),x=g.useRef(-1),k=g.useRef(),S=g.useRef(-1),C=g.useRef(!0),A=g.useRef(!1),E=g.useRef(()=>{}),L=g.useRef(!1),_=pv(()=>{var e;let t=null==(e=r.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});g.useEffect(()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{open:t}=e;t||(pI(x),pI(S),C.current=!0,L.current=!1)}},[s,o]),g.useEffect(()=>{if(!s||!m.current||!n)return;function e(e){_()&&i(!1,e,"hover")}let t=ph(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[a.floating,n,i,s,m,_]);let N=g.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");let r=p$(b.current,"close",w.current);r&&!k.current?(pI(x),x.current=window.setTimeout(()=>i(!1,e,n),r)):t&&(pI(x),i(!1,e,n))},[b,i]),T=pv(()=>{E.current(),k.current=void 0}),R=pv(()=>{if(A.current){let e=ph(a.floating).body;e.style.pointerEvents="",e.removeAttribute(pD),A.current=!1}}),M=pv(()=>!!r.current.openEvent&&["click","mousedown"].includes(r.current.openEvent.type));g.useEffect(()=>{if(s&&fd(a.domReference)){let i=a.domReference,r=a.floating;return n&&i.addEventListener("mouseleave",o),h&&i.addEventListener("mousemove",e,{once:!0}),i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",t),r&&(r.addEventListener("mouseleave",o),r.addEventListener("mouseenter",l),r.addEventListener("mouseleave",d)),()=>{n&&i.removeEventListener("mouseleave",o),h&&i.removeEventListener("mousemove",e),i.removeEventListener("mouseenter",e),i.removeEventListener("mouseleave",t),r&&(r.removeEventListener("mouseleave",o),r.removeEventListener("mouseenter",l),r.removeEventListener("mouseleave",d))}}function e(e){if(pI(x),C.current=!1,u&&!pp(w.current)||pO(y.current)>0&&!p$(b.current,"open"))return;let t=p$(b.current,"open",w.current);t?x.current=window.setTimeout(()=>{v.current||i(!0,e,"hover")},t):n||i(!0,e,"hover")}function t(e){if(M())return void R();E.current();let t=ph(a.floating);if(pI(S),L.current=!1,m.current&&r.current.floatingContext){n||pI(x),k.current=m.current({...r.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){R(),T(),M()||N(e,!0,"safe-polygon")}});let i=k.current;t.addEventListener("mousemove",i),E.current=()=>{t.removeEventListener("mousemove",i)};return}"touch"===w.current&&pd(a.floating,e.relatedTarget)||N(e)}function o(e){M()||r.current.floatingContext&&(null==m.current||m.current({...r.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){R(),T(),M()||N(e)}})(e))}function l(){pI(x)}function d(e){M()||N(e,!1)}},[a,s,e,u,h,N,T,R,i,n,v,f,b,m,r,M,y]),pm(()=>{var e,t;if(s&&n&&null!=(e=m.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&_()){A.current=!0;let e=a.floating;if(fd(a.domReference)&&e){let n=ph(a.floating).body;n.setAttribute(pD,"");let i=a.domReference,r=null==f||null==(t=f.nodesRef.current.find(e=>e.id===p))||null==(t=t.context)?void 0:t.elements.floating;return r&&(r.style.pointerEvents=""),n.style.pointerEvents="none",i.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",i.style.pointerEvents="",e.style.pointerEvents=""}}}},[s,n,p,a,f,m,_]),pm(()=>{n||(w.current=void 0,L.current=!1,T(),R())},[n,T,R]),g.useEffect(()=>()=>{T(),pI(x),pI(S),R()},[s,a.domReference,T,R]);let P=g.useMemo(()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function r(){C.current||v.current||i(!0,t,"hover")}u&&!pp(w.current)||n||0===pO(y.current)||L.current&&e.movementX**2+e.movementY**2<2||(pI(S),"touch"===w.current?r():(L.current=!0,S.current=window.setTimeout(r,pO(y.current))))}}},[u,i,n,v,y]);return g.useMemo(()=>s?{reference:P}:{},[s,P])}(I.context,{delay:{open:200,close:80},handleClose:function(e){void 0===e&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:i=!0}=e,r={current:-1},o=!1,a=null,s=null,l="u">typeof performance?performance.now():0,d=e=>{let{x:n,y:d,placement:u,elements:c,onClose:h,nodeId:f,tree:p}=e;return function(e){function m(){pI(r),h()}if(pI(r),!c.domReference||!c.floating||null==u||null==n||null==d)return;let{clientX:g,clientY:b}=e,v=[g,b],y="composedPath"in e?e.composedPath()[0]:e.target,w="mouseleave"===e.type,x=pj(c.floating,y),k=pj(c.domReference,y),S=c.domReference.getBoundingClientRect(),C=c.floating.getBoundingClientRect(),A=u.split("-")[0],E=n>C.right-C.width/2,L=d>C.bottom-C.height/2,_=v[0]>=S.x&&v[0]<=S.x+S.width&&v[1]>=S.y&&v[1]<=S.y+S.height,N=C.width>S.width,T=C.height>S.height,R=(N?S:C).left,M=(N?S:C).right,P=(T?S:C).top,I=(T?S:C).bottom;if(x&&(o=!0,!w))return;if(k&&(o=!1),k&&!w){o=!0;return}if(w&&fd(e.relatedTarget)&&pj(c.floating,e.relatedTarget)||p&&function e(t,n,i){return void 0===i&&(i=!0),t.filter(e=>{var t;return e.parentId===n&&(!i||(null==(t=e.context)?void 0:t.open))}).flatMap(n=>[n,...e(t,n.id,i)])}(p.nodesRef.current,f).length)return;if("top"===A&&d>=S.bottom-1||"bottom"===A&&d<=S.top+1||"left"===A&&n>=S.right-1||"right"===A&&n<=S.left+1)return m();let D=[];switch(A){case"top":D=[[R,S.top+1],[R,C.bottom-1],[M,C.bottom-1],[M,S.top+1]];break;case"bottom":D=[[R,C.top+1],[R,S.bottom-1],[M,S.bottom-1],[M,C.top+1]];break;case"left":D=[[C.right-1,I],[C.right-1,P],[S.left+1,P],[S.left+1,I]];break;case"right":D=[[S.right-1,I],[S.right-1,P],[C.left+1,P],[C.left+1,I]]}if(!pJ([g,b],D)){if(o&&!_)return m();if(!w&&i){let t=function(e,t){let n=performance.now(),i=n-l;if(null===a||null===s||0===i)return a=e,s=t,l=n,null;let r=e-a,o=t-s,d=Math.sqrt(r*r+o*o);return a=e,s=t,l=n,d/i}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}pJ([g,b],function(e){let[n,i]=e;switch(A){case"top":{let e=[[C.left,E||N?C.bottom-t:C.top],[C.right,E?N?C.bottom-t:C.top:C.bottom-t]];return[[N?n+t/2:E?n+4*t:n-4*t,i+t+1],[N?n-t/2:E?n+4*t:n-4*t,i+t+1],...e]}case"bottom":{let e=[[C.left,E||N?C.top+t:C.bottom],[C.right,E?N?C.top+t:C.bottom:C.top+t]];return[[N?n+t/2:E?n+4*t:n-4*t,i-t],[N?n-t/2:E?n+4*t:n-4*t,i-t],...e]}case"left":return[[L||T?C.right-t:C.left,C.top],[L?T?C.right-t:C.left:C.right-t,C.bottom],[n+t+1,T?i+t/2:L?i+4*t:i-4*t],[n+t+1,T?i-t/2:L?i+4*t:i-4*t]];case"right":{let e=[[L||T?C.left+t:C.right,C.top],[L?T?C.left+t:C.right:C.left+t,C.bottom]];return[[n-t,T?i+t/2:L?i+4*t:i-4*t],[n-t,T?i-t/2:L?i+4*t:i-4*t],...e]}}}([n,d]))?!o&&i&&(r.current=window.setTimeout(m,40)):m()}}};return d.__options={blockPointerEvents:n},d}()}),function(e,t){void 0===t&&(t={});let{open:n,onOpenChange:i,events:r,dataRef:o,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,d=g.useRef(!1),u=g.useRef(-1),c=g.useRef(!0);g.useEffect(()=>{if(!s)return;let e=fa(a.domReference);function t(){!n&&fu(a.domReference)&&a.domReference===pl(ph(a.domReference))&&(d.current=!0)}function i(){c.current=!0}function r(){c.current=!1}return e.addEventListener("blur",t),pK()&&(e.addEventListener("keydown",i,!0),e.addEventListener("pointerdown",r,!0)),()=>{e.removeEventListener("blur",t),pK()&&(e.removeEventListener("keydown",i,!0),e.removeEventListener("pointerdown",r,!0))}},[a.domReference,n,s]),g.useEffect(()=>{if(s)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(d.current=!0)}},[r,s]),g.useEffect(()=>()=>{pI(u)},[]);let h=g.useMemo(()=>({onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;let t=pu(e.nativeEvent);if(l&&fd(t)){if(pK()&&!e.relatedTarget){if(!c.current&&!(fu(t)&&t.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")))return}else if(!function(e){let t;if(!e||((t=navigator.userAgentData)&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent).includes("jsdom/"))return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return}i(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;let t=e.relatedTarget,n=e.nativeEvent,r=fd(t)&&t.hasAttribute(pP("focus-guard"))&&"outside"===t.getAttribute("data-type");u.current=window.setTimeout(()=>{var e;let s=pl(a.domReference?a.domReference.ownerDocument:document);!t&&s===a.domReference||pd(null==(e=o.current.floatingContext)?void 0:e.refs.floating.current,s)||pd(a.domReference,s)||r||i(!1,n,"focus")})}}),[o,a.domReference,i,l]);return g.useMemo(()=>s?{reference:h}:{},[s,h])}(I.context),function(e,t){void 0===t&&(t={});let{open:n,onOpenChange:i,elements:r,dataRef:o}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:c="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:p}=t,m=g.useContext(pR),b=pv("function"==typeof l?l:()=>!1),v="function"==typeof l?b:l,y=g.useRef(!1),{escapeKey:w,outsidePress:x}=pX(f),{escapeKey:k,outsidePress:S}=pX(p),C=g.useRef(!1),A=pv(e=>{var t;if(!n||!a||!s||"Escape"!==e.key||C.current)return;let r=null==(t=o.current.floatingContext)?void 0:t.nodeId,l=m?pf(m.nodesRef.current,r):[];if(!w&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}i(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),E=pv(e=>{var t;let n=()=>{var t;A(e),null==(t=pu(e))||t.removeEventListener("keydown",n)};null==(t=pu(e))||t.addEventListener("keydown",n)}),L=pv(e=>{var t;let n=o.current.insideReactTree;o.current.insideReactTree=!1;let a=y.current;if(y.current=!1,"click"===d&&a||n||"function"==typeof v&&!v(e))return;let s=pu(e),l="["+pP("inert")+"]",u=ph(r.floating).querySelectorAll(l),c=fd(s)?s:null;for(;c&&!fy(c);){let e=fk(c);if(fy(e)||!fd(e))break;c=e}if(u.length&&fd(s)&&!s.matches("html,body")&&!pd(s,r.floating)&&Array.from(u).every(e=>!pd(c,e)))return;if(fu(s)&&T){let t=fy(s),n=fw(s),i=/auto|scroll/,r=t||i.test(n.overflowX),o=t||i.test(n.overflowY),a=r&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=o&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,d="rtl"===n.direction,u=l&&(d?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),c=a&&e.offsetY>s.clientHeight;if(u||c)return}let h=null==(t=o.current.floatingContext)?void 0:t.nodeId,f=m&&pf(m.nodesRef.current,h).some(t=>{var n;return pc(e,null==(n=t.context)?void 0:n.elements.floating)});if(pc(e,r.floating)||pc(e,r.domReference)||f)return;let p=m?pf(m.nodesRef.current,h):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}i(!1,e,"outside-press")}),_=pv(e=>{var t;let n=()=>{var t;L(e),null==(t=pu(e))||t.removeEventListener(d,n)};null==(t=pu(e))||t.addEventListener(d,n)});g.useEffect(()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=w,o.current.__outsidePressBubbles=x;let e=-1;function t(e){i(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},5*!!fv())}let c=ph(r.floating);s&&(c.addEventListener("keydown",k?E:A,k),c.addEventListener("compositionstart",l),c.addEventListener("compositionend",u)),v&&c.addEventListener(d,S?_:L,S);let f=[];return h&&(fd(r.domReference)&&(f=fS(r.domReference)),fd(r.floating)&&(f=f.concat(fS(r.floating))),!fd(r.reference)&&r.reference&&r.reference.contextElement&&(f=f.concat(fS(r.reference.contextElement)))),(f=f.filter(e=>{var t;return e!==(null==(t=c.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",t)}),()=>{s&&(c.removeEventListener("keydown",k?E:A,k),c.removeEventListener("compositionstart",l),c.removeEventListener("compositionend",u)),v&&c.removeEventListener(d,S?_:L,S),f.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[o,r,s,v,d,n,i,h,a,w,x,A,k,E,L,S,_]),g.useEffect(()=>{o.current.insideReactTree=!1},[o,v,d]);let N=g.useMemo(()=>({onKeyDown:A,...u&&{[pq[c]]:e=>{i(!1,e.nativeEvent,"reference-press")},..."click"!==c&&{onClick(e){i(!1,e.nativeEvent,"reference-press")}}}}),[A,i,u,c]),T=g.useMemo(()=>{function e(e){0===e.button&&(y.current=!0)}return{onKeyDown:A,onMouseDown:e,onMouseUp:e,[pV[d]]:()=>{o.current.insideReactTree=!0}}},[A,d,o]);return g.useMemo(()=>a?{reference:N,floating:T}:{},[a,N,T])}(I.context)]).map(e=>null==e?void 0:e.reference),S=v.map(e=>null==e?void 0:e.floating),C=v.map(e=>null==e?void 0:e.item),A=g.useCallback(e=>pY(e,v,"reference"),k),E=g.useCallback(e=>pY(e,v,"floating"),S),L=g.useCallback(e=>pY(e,v,"item"),C),g.useMemo(()=>({getReferenceProps:A,getFloatingProps:E,getItemProps:L}),[A,E,L])),{isMounted:O,status:j}=function(e,t){void 0===t&&(t={});let{open:n,elements:{floating:i}}=e,{duration:r=250}=t,o=("number"==typeof r?r:r.close)||0,[a,s]=g.useState("unmounted"),l=function(e,t){let[n,i]=g.useState(e);return e&&!n&&i(!0),g.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>i(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,o);return l||"close"!==a||s("unmounted"),pm(()=>{if(i){if(n){s("initial");let e=requestAnimationFrame(()=>{iE.flushSync(()=>{s("open")})});return()=>{cancelAnimationFrame(e)}}s("close")}},[n,i]),{isMounted:l,status:a}}(I.context,{duration:150});return(0,g.useEffect)(()=>{if(!N||R||!l)return;let t=!0;return M({loading:!0,data:null}),l(e.hash).then(e=>t&&M({loading:!1,data:e})).catch(()=>t&&M({loading:!1,data:null})),()=>{t=!1}},[N,R,l,e.hash]),(0,m.jsxs)("li",{children:[(0,m.jsxs)("button",{ref:I.refs.setReference,type:"button","aria-current":a?"true":void 0,className:iy("relative flex w-full items-stretch rounded-md text-left transition-colors","focus-visible:ring-primary-500/40 outline-none focus-visible:ring-2",a?"bg-active":"hover:bg-active"),style:{height:30},...D({onClick:()=>s?.(e.hash)}),children:[(0,m.jsx)("div",{className:"relative z-10",children:(0,m.jsx)(p9,{row:t,width:n,isHead:r,topStub:o})}),(0,m.jsxs)("div",{className:"relative z-10 flex min-w-0 flex-1 items-center gap-1.5 pr-2 pl-1.5",children:[(0,m.jsx)("span",{className:iy("truncate text-[13px] transition-colors",P?"color-faint font-normal":"color-base font-medium"),title:e.subject,children:e.subject}),_.map((e,n)=>(0,m.jsx)(me,{refToken:e,color:t.color},n))]})]}),O&&(0,m.jsx)(pG,{children:(0,m.jsx)("div",{ref:I.refs.setFloating,style:I.floatingStyles,"data-af-animate":!0,"data-state":"open"===j?"open":"closed",className:"border-base bg-base z-tooltip w-80 overflow-hidden rounded-lg border shadow-lg",...$(),children:(0,m.jsx)(mn,{commit:e,detail:R,onOpen:()=>{s?.(e.hash),T(!1)}})})})]})});function mr({col:e,color:t,gutter:n,changes:i}){return(0,m.jsxs)("li",{className:"relative flex items-stretch",style:{height:30},children:[(0,m.jsx)("div",{className:"relative z-10",children:(0,m.jsxs)("svg",{width:n,height:30,className:"block shrink-0",style:{overflow:"visible"},"aria-hidden":!0,children:[(0,m.jsx)("path",{d:p7(e,15,e,30),fill:"none",stroke:t,strokeWidth:2,strokeDasharray:"2 3",strokeLinecap:"round"}),(0,m.jsx)("circle",{cx:p4(e),cy:15,r:4,className:"fill-white dark:fill-[#111]",stroke:t,strokeWidth:2,strokeDasharray:"2 2"})]})}),(0,m.jsxs)("div",{className:"relative z-10 flex min-w-0 flex-1 items-center gap-2 pr-2 pl-1.5",children:[(0,m.jsx)(iC,{name:"i-ph-pencil-simple-duotone",className:"color-muted size-3.5 shrink-0"}),(0,m.jsx)("span",{className:"text-[13px] font-medium",children:"Work in Progress"}),(0,m.jsxs)("span",{className:"color-muted text-xs",children:[i," ",1===i?"change":"changes"]})]})]})}function mo(e){let{rpcConnected:t,isRepo:n,commits:i,hasMore:r,loading:o,error:a,selectedRef:s,currentBranch:l,workingChanges:d,selectedHash:u,onRefresh:c,onLoadMore:h,onSelectCommit:f,onLoadDetail:p}=e,b=(0,g.useMemo)(()=>(function(e){let t=[],n=0,i=()=>pQ[n++%pQ.length],r=()=>{let e=t.indexOf(null);return -1===e?t.length:e},o=[];for(let n of e){let e,{hash:a}=n,s=n.parents,l=[];for(let e=0;e<t.length;e++){let n=t[e];n&&l.push({col:e,hash:n.hash,color:n.color})}let d=t.findIndex(e=>e?.hash===a);-1===d?(d=r(),e=i()):e=t[d].color;for(let e=0;e<t.length;e++)t[e]?.hash===a&&(t[e]=null);t[d]=null;let u=[];for(s.forEach((n,o)=>{if(0===o){t[d]={hash:n,color:e},u.push({col:d,color:e});return}let a=t.findIndex(e=>e?.hash===n);-1===a&&(t[a=r()]={hash:n,color:i()}),u.push({col:a,color:t[a].color})}),0===s.length&&(t[d]=null);t.length>0&&null==t[t.length-1];)t.pop();let c=l.map(e=>({from:e.col,to:e.hash===a?d:e.col,color:e.color})),h=[];for(let e of l)e.hash!==a&&h.push({from:e.col,to:e.col,color:e.color});for(let e of u)h.push({from:d,to:e.col,color:e.color});o.push({col:d,color:e,topLinks:c,bottomLinks:h})}let a=0;for(let e of o){for(let t of(a=Math.max(a,e.col+1),e.topLinks))a=Math.max(a,t.from+1,t.to+1);for(let t of e.bottomLinks)a=Math.max(a,t.from+1,t.to+1)}return{rows:o,columns:a}})(i),[i]),v=15*Math.max(b.columns,1)+7.5+8,y=(d??0)>0&&i.length>0&&(!s||s===l),w=b.rows[0],x=(0,g.useRef)(null),k=(0,g.useRef)(null),S=(0,g.useRef)(!1),C=(0,g.useRef)(h);return C.current=h,(0,g.useEffect)(()=>{o||(S.current=!1)},[o]),(0,g.useEffect)(()=>{let e=x.current,t=k.current;if(!e||!t||!r)return;let n=new IntersectionObserver(e=>{!e[0]?.isIntersecting||S.current||o||(S.current=!0,C.current())},{root:e,rootMargin:"120px"});return n.observe(t),()=>n.disconnect()},[r,o,i.length]),(0,m.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,m.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2.5",children:[(0,m.jsx)("h2",{className:"text-lg leading-none font-semibold tracking-tight",children:"Commit History"}),(0,m.jsx)("span",{className:"color-muted shrink-0 text-xs tabular-nums",children:n?`${i.length}${r?"+":""}${s?` \xb7 ${s}`:""}`:""})]}),(0,m.jsx)(ik,{variant:"ghost",size:"sm",onClick:c,disabled:o,"aria-label":"Refresh log",children:(0,m.jsx)(iC,{name:"i-ph-arrows-clockwise",className:iy("size-4",o&&"animate-spin")})})]}),!t&&(0,m.jsx)("div",{className:"space-y-1.5",children:Array.from({length:6}).map((e,t)=>(0,m.jsx)(rs,{className:"h-8 w-full"},t))}),a&&(0,m.jsx)("p",{className:"text-error text-sm",children:a}),!1===n&&(0,m.jsx)("p",{className:"color-muted text-sm",children:"The working directory is not a git repository."}),!0===n&&0===i.length&&(0,m.jsx)("p",{className:"color-muted text-sm",children:"No commits yet."}),!0===n&&i.length>0&&(0,m.jsxs)("div",{ref:x,className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[(0,m.jsxs)("ul",{children:[y&&w&&(0,m.jsx)(mr,{col:w.col,color:w.color,gutter:v,changes:d??0}),i.map((e,t)=>(0,m.jsx)(mi,{commit:e,row:b.rows[t],gutter:v,currentBranch:l,isHead:0===t,topStub:0===t&&y,selected:e.hash===u,onSelect:f,onLoadDetail:p},e.hash))]}),r&&(0,m.jsxs)("div",{ref:k,className:"color-muted flex items-center justify-center gap-2 py-3 text-xs",children:[(0,m.jsx)(iC,{name:"i-ph-spinner-gap",className:"size-3.5 animate-spin"}),"Loading more…"]})]})]})}function ma({branch:e,selectedHash:t,onSelectCommit:n}){let{rpc:i}=nn(),[r,o]=(0,g.useState)(null),[a,s]=(0,g.useState)([]),[l,d]=(0,g.useState)(0),[u,c]=(0,g.useState)(!1),[h,f]=(0,g.useState)(!1),[p,b]=(0,g.useState)(null),[v,y]=(0,g.useState)(null),[w,x]=(0,g.useState)(null),k=(0,g.useRef)([]);(0,g.useEffect)(()=>{k.current=a},[a]);let S=(0,g.useCallback)(async(t,n,i)=>{f(!0),b(null);try{let r=await t.call("git:log",{limit:30,skip:n,ref:e??void 0});if(o(r.isRepo),"replace"===i)s(r.commits),d(r.commits.length);else{let e=new Set(k.current.map(e=>e.hash)),t=r.commits.filter(t=>!e.has(t.hash)&&(e.add(t.hash),!0));if(0===t.length)return void c(!1);s(e=>[...e,...t]),d(e=>e+t.length)}c(r.hasMore)}catch(e){b(e instanceof Error?e.message:String(e))}finally{f(!1)}},[e]),C=(0,g.useCallback)(async e=>{try{let t=await e.call("git:status");y(t.branch),x(t.staged.length+t.unstaged.length+t.untracked.length)}catch{}},[]);(0,g.useEffect)(()=>{i&&(S(i,0,"replace"),C(i))},[i,S,C]);let A=(0,g.useCallback)(async()=>{i&&await Promise.all([S(i,0,"replace"),C(i)])},[i,S,C]),E=(0,g.useCallback)(async()=>{i&&await S(i,l,"append")},[i,l,S]),L=(0,g.useCallback)(e=>i?i.call("git:show",{hash:e,patch:!1}):Promise.reject(Error("rpc unavailable")),[i]);return(0,m.jsx)(mo,{rpcConnected:!!i,isRepo:r,commits:a,hasMore:u,loading:h,error:p,selectedRef:e??null,currentBranch:v,workingChanges:w,selectedHash:t,onRefresh:A,onLoadMore:E,onSelectCommit:n,onLoadDetail:i?L:void 0})}function ms({className:e,...t}){return(0,m.jsx)("textarea",{"data-slot":"textarea",className:iy("border-base placeholder:color-muted focus-visible:ring-primary-500/40 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t})}function ml(e,t){return`${t}:${e}`}function md({entry:e,staged:t,selected:n,action:i,onSelect:r}){let o=e.from?`${e.from} → ${e.path}`:e.path;return(0,m.jsxs)("li",{className:iy("group flex items-center gap-1 rounded pr-1 transition-colors",n?"bg-active":"hover:bg-active"),children:[(0,m.jsxs)("button",{type:"button",onClick:()=>r?.(e.path,t),className:"flex min-w-0 flex-1 items-center gap-1.5 py-0.5 pl-1 text-left text-xs outline-none",children:[(0,m.jsx)(ru,{code:e.status}),(0,m.jsx)(iA,{path:e.path,className:"size-4"}),(0,m.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",title:o,children:o})]}),i]})}function mu({title:e,count:t,headerAction:n,children:i}){return 0===t?null:(0,m.jsxs)("div",{className:"space-y-1",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsxs)("div",{className:"color-muted flex items-center gap-2 text-xs font-medium tracking-wide uppercase",children:[e,(0,m.jsx)(iw,{variant:"secondary",className:"px-1.5 py-0 text-[10px] tabular-nums",children:t})]}),n]}),(0,m.jsx)("ul",{children:i})]})}function mc(e){let{data:t,loading:n,busy:i,canWrite:r,message:o,note:a,selectedKey:s,onRefresh:l,onStage:d,onUnstage:u,onCommit:c,onMessageChange:h,onSelectFile:f,patchSlot:p}=e,g=(e,t)=>(0,m.jsx)(ik,{variant:"ghost",size:"sm",disabled:i,"aria-label":t,onClick:()=>d(e),children:(0,m.jsx)(iC,{name:"i-ph-plus",className:"size-4"})});return(0,m.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[(0,m.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2",children:[(0,m.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2.5",children:[(0,m.jsx)("h2",{className:"text-lg leading-none font-semibold tracking-tight",children:"Changes"}),t?.isRepo&&!t.clean&&(0,m.jsxs)("span",{className:"color-muted shrink-0 text-xs tabular-nums",children:[t.staged.length+t.unstaged.length+t.untracked.length," ","changed"]})]}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[t?.isRepo&&(t.ahead>0||t.behind>0)&&(0,m.jsxs)(iw,{variant:"secondary",className:"gap-1 font-mono",children:[t.ahead>0&&(0,m.jsxs)("span",{className:"text-success inline-flex items-center tabular-nums",children:[(0,m.jsx)(iC,{name:"i-ph-arrow-up",className:"size-3"}),t.ahead]}),t.behind>0&&(0,m.jsxs)("span",{className:"text-warning inline-flex items-center tabular-nums",children:[(0,m.jsx)(iC,{name:"i-ph-arrow-down",className:"size-3"}),t.behind]})]}),(0,m.jsx)(ik,{variant:"ghost",size:"sm",onClick:l,disabled:n||i,"aria-label":"Refresh status",children:(0,m.jsx)(iC,{name:"i-ph-arrows-clockwise",className:`size-4 ${n?"animate-spin":""}`})})]})]}),!t&&(0,m.jsx)("div",{className:"space-y-2",children:Array.from({length:4}).map((e,t)=>(0,m.jsx)(rs,{className:"h-6 w-full"},t))}),t&&!t.isRepo&&(0,m.jsx)("p",{className:"color-muted text-sm",children:"The working directory is not a git repository."}),t?.isRepo&&t.clean&&(0,m.jsx)("p",{className:"color-muted text-sm",children:"Nothing to commit. The working tree is clean."}),t?.isRepo&&!t.clean&&(0,m.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[(0,m.jsx)(ro,{className:"min-h-0 flex-1 pr-3",children:(0,m.jsxs)("div",{className:"space-y-4",children:[(0,m.jsx)(mu,{title:"Staged",count:t.staged.length,headerAction:r&&t.staged.length>0?(0,m.jsx)(ix,{variant:"ghost",size:"sm",disabled:i,onClick:()=>u(t.staged.map(e=>e.path)),children:"Unstage all"}):void 0,children:t.staged.map(e=>{let t,n;return(0,m.jsx)(md,{entry:e,staged:!0,selected:s===ml(e.path,!0),onSelect:f,action:r?(t=[e.path],n=`Unstage ${e.path}`,(0,m.jsx)(ik,{variant:"ghost",size:"sm",disabled:i,"aria-label":n,onClick:()=>u(t),children:(0,m.jsx)(iC,{name:"i-ph-minus",className:"size-4"})})):void 0},`s:${e.path}`)})}),(0,m.jsx)(mu,{title:"Unstaged",count:t.unstaged.length,headerAction:r&&t.unstaged.length>0?(0,m.jsx)(ix,{variant:"ghost",size:"sm",disabled:i,onClick:()=>d(t.unstaged.map(e=>e.path)),children:"Stage all"}):void 0,children:t.unstaged.map(e=>(0,m.jsx)(md,{entry:e,staged:!1,selected:s===ml(e.path,!1),onSelect:f,action:r?g([e.path],`Stage ${e.path}`):void 0},`u:${e.path}`))}),(0,m.jsx)(mu,{title:"Untracked",count:t.untracked.length,headerAction:r&&t.untracked.length>0?(0,m.jsx)(ix,{variant:"ghost",size:"sm",disabled:i,onClick:()=>d(t.untracked),children:"Stage all"}):void 0,children:t.untracked.map(e=>(0,m.jsx)(md,{entry:{path:e,status:"unknown"},staged:!1,selected:s===ml(e,!1),onSelect:f,action:r?g([e],`Stage ${e}`):void 0},`t:${e}`))})]})}),p&&(0,m.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden rounded-md border",children:p}),r&&t.staged.length>0&&(0,m.jsxs)("div",{className:"shrink-0 space-y-2 border-t pt-3",children:[(0,m.jsx)(ms,{value:o,onChange:e=>h(e.target.value),placeholder:"Commit message",rows:2,disabled:i,"aria-label":"Commit message"}),a&&(0,m.jsx)("p",{className:"text-error text-xs",children:a}),(0,m.jsx)(ix,{size:"sm",className:"tabular-nums",onClick:c,disabled:i||0===o.trim().length,children:`Commit ${t.staged.length} file${1===t.staged.length?"":"s"}`})]})]})]})}function mh({staged:e,path:t}){let{data:n,loading:i}=nr((0,g.useCallback)(n=>n.call("git:diff",{staged:e,path:t}),[e,t]));return(0,m.jsx)(hB,{patch:n?.patch??null,loading:i||!n,truncated:n?.truncated??!1})}function mf(){let{rpc:e}=nn(),{data:t,loading:n,refresh:i,setData:r}=nr((0,g.useCallback)(e=>e.call("git:status"),[])),[o,a]=(0,g.useState)(!1),[s,l]=(0,g.useState)(""),[d,u]=(0,g.useState)(null),[c,h]=(0,g.useState)(null),f=!!t?.canWrite&&e?.connectionMeta.backend==="websocket",p=(0,g.useCallback)(async t=>{if(e&&0!==t.length){a(!0),u(null);try{r(await e.call("git:stage",{paths:t}))}finally{a(!1)}}},[e,r]),b=(0,g.useCallback)(async t=>{if(e&&0!==t.length){a(!0),u(null);try{r(await e.call("git:unstage",{paths:t}))}finally{a(!1)}}},[e,r]),v=(0,g.useCallback)(async()=>{if(e){a(!0),u(null);try{let t=await e.call("git:commit",{message:s});r(t.status),t.ok?l(""):u(t.message)}finally{a(!1)}}},[e,s,r]),y=(0,g.useCallback)((e,t)=>{h(n=>n&&n.path===e&&n.staged===t?null:{path:e,staged:t})},[]);return(0,m.jsx)(mc,{data:t,loading:n,busy:o,canWrite:!!f,message:s,note:d,selectedKey:c?`${c.staged}:${c.path}`:null,onRefresh:i,onStage:p,onUnstage:b,onCommit:v,onMessageChange:l,onSelectFile:y,patchSlot:c?(0,m.jsx)(mh,{staged:c.staged,path:c.path},`${c.staged}:${c.path}`):null})}let mp=[{id:"commits",label:"Commits",icon:"i-ph-git-commit-duotone"},{id:"changes",label:"Changes",icon:"i-ph-git-diff-duotone"}];function mm(e,t,n){return Math.min(Math.max(e,t),n)}function mg({onPointerDown:e,label:t}){return(0,m.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":t,onPointerDown:e,className:"group bg-[#8882] relative w-px shrink-0 cursor-col-resize",children:(0,m.jsx)("div",{className:"group-hover:bg-primary/40 group-active:bg-primary/60 absolute inset-y-0 -left-1 -right-1 z-10 transition-colors"})})}function mb(){let{rpc:e,error:t}=nn();if(t)return(0,m.jsx)(iw,{variant:"destructive",children:"disconnected"});if(!e)return(0,m.jsx)(iw,{variant:"secondary",children:"connecting…"});let n=e.connectionMeta.backend;return(0,m.jsx)(iw,{variant:"websocket"===n?"success":"secondary",className:"font-mono",children:"websocket"===n?"live":"static"})}function mv(){let{theme:e,toggle:t}=function(){let[e,t]=(0,g.useState)("dark");return(0,g.useEffect)(()=>{t(function(){try{let e=localStorage.getItem(hO);return"light"===e||"dark"===e?e:null}catch{return null}}()??(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"))},[]),(0,g.useEffect)(()=>{document.documentElement.classList.toggle("dark","dark"===e)},[e]),{theme:e,toggle:function(){t(e=>{let t="dark"===e?"light":"dark";try{localStorage.setItem(hO,t)}catch{}return t})}}}();return(0,m.jsx)(ik,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Toggle light/dark theme",children:(0,m.jsx)(iC,{name:"dark"===e?"i-ph-sun-duotone":"i-ph-moon-duotone",className:"size-4"})})}function my({branches:e,disabled:t,value:n,onSelect:i}){return(0,m.jsxs)("label",{className:"border-base bg-base focus-within:ring-primary-500/40 flex h-7 min-w-0 items-center gap-1.5 rounded-md border pr-1.5 pl-2 focus-within:ring-2",children:[(0,m.jsx)(iC,{name:"i-ph-git-branch-duotone",className:"color-active size-3.5 shrink-0"}),(0,m.jsxs)("select",{"aria-label":"Branch",value:n??"",onChange:e=>i(e.target.value),disabled:t,className:"color-base h-full max-w-44 min-w-0 cursor-pointer appearance-none truncate bg-transparent pr-4 text-sm outline-none disabled:cursor-default",children:[!e?.isRepo&&(0,m.jsx)("option",{value:"",children:"Not a repository"}),e?.isRepo&&0===e.branches.length&&(0,m.jsx)("option",{value:"",children:"No branches"}),e?.isRepo&&e.branches.map(e=>(0,m.jsx)("option",{value:e.name,children:e.name},e.name))]}),(0,m.jsx)(iC,{name:"i-ph-caret-up-down",className:"color-faint pointer-events-none -ml-4 size-3.5 shrink-0"})]})}function mw(){let[e,t]=(0,g.useState)("commits"),[n,i]=(0,g.useState)(null),[r,o]=(0,g.useState)(null),a=function(e){let[t,n]=(0,g.useState)(480),i=(0,g.useRef)(480);return i.current=t,(0,g.useEffect)(()=>{try{let t=Number(localStorage.getItem(e));Number.isFinite(t)&&t>0&&n(mm(t,340,760))}catch{}},[e,340,760]),{width:t,onPointerDown:(0,g.useCallback)(t=>{t.preventDefault();let r=t.clientX,o=i.current,a=e=>n(mm(o+-1*(e.clientX-r),340,760)),s=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",s),document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem(e,String(Math.round(i.current)))}catch{}};window.addEventListener("pointermove",a),window.addEventListener("pointerup",s),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[e,340,760,-1])}}("devframe-git:rail-right"),{data:s,loading:l}=nr((0,g.useCallback)(e=>e.call("git:branches"),[]));(0,g.useEffect)(()=>{if(!s?.isRepo)return void i(null);let e=s.branches.map(e=>e.name),t=s.current??s.branches.find(e=>e.current)?.name??null;i(n=>n&&e.includes(n)?n:t??e[0]??null)},[s]);let d="commits"===e&&null!==r;return(0,m.jsxs)("div",{className:"bg-base flex h-svh w-full flex-col overflow-hidden",children:[(0,m.jsxs)("header",{className:b("flex items-center gap-2 shrink-0 h-10 px-3 border-b border-base bg-base z-nav",void 0),children:[(0,m.jsxs)("div",{className:b("flex items-center gap-1.5 shrink-0 font-semibold text-sm select-none",void 0),children:[(0,m.jsx)(iC,{name:"i-ph-git-fork-duotone",className:"text-base color-active"}),(0,m.jsx)("span",{children:"Git"})]}),(0,m.jsx)(my,{branches:s,disabled:l||!s?.isRepo||0===s.branches.length,value:n,onSelect:e=>{i(e),o(null),t("commits")}}),(0,m.jsx)("nav",{className:b("inline-flex items-center gap-1 p-1 rounded-lg bg-secondary w-max",void 0),role:"tablist","aria-label":"Git views",children:mp.map(({id:n,label:i,icon:r})=>(0,m.jsxs)("button",{type:"button",role:"tab","aria-selected":e===n,"data-state":e===n?"active":"inactive",className:b("px-3 py-1 rounded-md text-sm color-muted inline-flex gap-1.5 items-center whitespace-nowrap select-none cursor-pointer transition outline-none hover:color-base focus-visible:ring-2 focus-visible:ring-primary-500/40 data-[state=active]:bg-base data-[state=active]:color-base data-[state=active]:shadow-sm",void 0),onClick:()=>t(n),children:[(0,m.jsx)(iC,{name:r,className:"size-4"}),i]},n))}),(0,m.jsx)("div",{className:"flex-1"}),(0,m.jsx)(mb,{}),(0,m.jsx)(mv,{})]}),(0,m.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,m.jsxs)("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:["commits"===e&&(0,m.jsx)("div",{className:"flex min-h-0 flex-1 flex-col px-3 py-2.5",children:(0,m.jsx)(ma,{branch:n,selectedHash:r,onSelectCommit:o})}),"changes"===e&&(0,m.jsx)("div",{className:"flex min-h-0 flex-1 flex-col px-3 py-2.5",children:(0,m.jsx)(mf,{})})]}),d&&r&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(mg,{onPointerDown:a.onPointerDown,label:"Resize commit details"}),(0,m.jsx)("aside",{className:"flex min-h-0 flex-col p-3",style:{width:a.width},children:(0,m.jsx)(hF,{hash:r,onClose:()=>o(null)})})]})]})]})}e.s(["Dashboard",0,function(){return(0,m.jsx)(ni,{children:(0,m.jsx)(mw,{})})}],53567)}]);