vimrc/sources_non_forked/copilot.vim/copilot-language-server/dist/main.js

1736 lines
3.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";var RKe=Object.create;var iI=Object.defineProperty;var wpe=Object.getOwnPropertyDescriptor;var kKe=Object.getOwnPropertyNames;var BKe=Object.getPrototypeOf,DKe=Object.prototype.hasOwnProperty;var Ipe=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Tpe=e=>{throw TypeError(e)};var s=(e,t)=>iI(e,"name",{value:t,configurable:!0});var PKe=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),K1=(e,t)=>{for(var r in t)iI(e,r,{get:t[r],enumerable:!0})},_pe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of kKe(t))!DKe.call(e,i)&&i!==r&&iI(e,i,{get:()=>t[i],enumerable:!(n=wpe(t,i))||n.enumerable});return e};var Ze=(e,t,r)=>(r=e!=null?RKe(BKe(e)):{},_pe(t||!e||!e.__esModule?iI(r,"default",{value:e,enumerable:!0}):r,e)),NKe=e=>_pe(iI({},"__esModule",{value:!0}),e),f0=(e,t,r,n)=>{for(var i=n>1?void 0:n?wpe(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&iI(t,r,i),i},Vs=(e,t)=>(r,n)=>t(r,n,e);var UK=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Tpe("Object expected");var n,i;r&&(n=t[Ipe("asyncDispose")]),n===void 0&&(n=t[Ipe("dispose")],r&&(i=n)),typeof n!="function"&&Tpe("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.push([r,n,t])}else r&&e.push([r]);return t},qK=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,l,c,u){return u=Error(c),u.name="SuppressedError",u.error=a,u.suppressed=l,u},i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var l=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(l).then(o,c=>(i(c),o()))}catch(c){i(c)}if(r)throw t};return o()};var importMetaUrlShim,d=PKe(()=>{"use strict";importMetaUrlShim=typeof document>"u"?require("node:url").pathToFileURL(__filename).href:importMetaUrlShim});var Rpe=H(WK=>{d();var Spe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");WK.encode=function(e){if(0<=e&&e<Spe.length)return Spe[e];throw new TypeError("Must be between 0 and 63: "+e)};WK.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,l=43,c=47,u=26,f=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+u:o<=e&&e<=a?e-o+f:e==l?62:e==c?63:-1}});var jK=H(HK=>{d();var kpe=Rpe(),GK=5,Bpe=1<<GK,Dpe=Bpe-1,Ppe=Bpe;function LKe(e){return e<0?(-e<<1)+1:(e<<1)+0}s(LKe,"toVLQSigned");function FKe(e){var t=(e&1)===1,r=e>>1;return t?-r:r}s(FKe,"fromVLQSigned");HK.encode=s(function(t){var r="",n,i=LKe(t);do n=i&Dpe,i>>>=GK,i>0&&(n|=Ppe),r+=kpe.encode(n);while(i>0);return r},"base64VLQ_encode");HK.decode=s(function(t,r,n){var i=t.length,o=0,a=0,l,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=kpe.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));l=!!(c&Ppe),c&=Dpe,o=o+(c<<a),a+=GK}while(l);n.value=FKe(o),n.rest=r},"base64VLQ_decode")});var aI=H(Rc=>{d();function MKe(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}s(MKe,"getArg");Rc.getArg=MKe;var Npe=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,QKe=/^data:.+\,.+$/;function L7(e){var t=e.match(Npe);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}s(L7,"urlParse");Rc.urlParse=L7;function oI(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}s(oI,"urlGenerate");Rc.urlGenerate=oI;function VK(e){var t=e,r=L7(e);if(r){if(!r.path)return e;t=r.path}for(var n=Rc.isAbsolute(t),i=t.split(/\/+/),o,a=0,l=i.length-1;l>=0;l--)o=i[l],o==="."?i.splice(l,1):o===".."?a++:a>0&&(o===""?(i.splice(l+1,a),a=0):(i.splice(l,2),a--));return t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,oI(r)):t}s(VK,"normalize");Rc.normalize=VK;function Lpe(e,t){e===""&&(e="."),t===""&&(t=".");var r=L7(t),n=L7(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),oI(r);if(r||t.match(QKe))return t;if(n&&!n.host&&!n.path)return n.host=t,oI(n);var i=t.charAt(0)==="/"?t:VK(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,oI(n)):i}s(Lpe,"join");Rc.join=Lpe;Rc.isAbsolute=function(e){return e.charAt(0)==="/"||Npe.test(e)};function OKe(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}s(OKe,"relative");Rc.relative=OKe;var Fpe=function(){var e=Object.create(null);return!("__proto__"in e)}();function Mpe(e){return e}s(Mpe,"identity");function UKe(e){return Qpe(e)?"$"+e:e}s(UKe,"toSetString");Rc.toSetString=Fpe?Mpe:UKe;function qKe(e){return Qpe(e)?e.slice(1):e}s(qKe,"fromSetString");Rc.fromSetString=Fpe?Mpe:qKe;function Qpe(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}s(Qpe,"isProtoString");function WKe(e,t,r){var n=sI(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:sI(e.name,t.name)}s(WKe,"compareByOriginalPositions");Rc.compareByOriginalPositions=WKe;function GKe(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=sI(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:sI(e.name,t.name)}s(GKe,"compareByGeneratedPositionsDeflated");Rc.compareByGeneratedPositionsDeflated=GKe;function sI(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}s(sI,"strcmp");function HKe(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=sI(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:sI(e.name,t.name)}s(HKe,"compareByGeneratedPositionsInflated");Rc.compareByGeneratedPositionsInflated=HKe;function jKe(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}s(jKe,"parseSourceMapInput");Rc.parseSourceMapInput=jKe;function VKe(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=L7(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=Lpe(oI(n),t)}return VK(t)}s(VKe,"computeSourceURL");Rc.computeSourceURL=VKe});var YK=H(Ope=>{d();var $K=aI(),zK=Object.prototype.hasOwnProperty,Dx=typeof Map<"u";function J1(){this._array=[],this._set=Dx?new Map:Object.create(null)}s(J1,"ArraySet");J1.fromArray=s(function(t,r){for(var n=new J1,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n},"ArraySet_fromArray");J1.prototype.size=s(function(){return Dx?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");J1.prototype.add=s(function(t,r){var n=Dx?t:$K.toSetString(t),i=Dx?this.has(t):zK.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(Dx?this._set.set(t,o):this._set[n]=o)},"ArraySet_add");J1.prototype.has=s(function(t){if(Dx)return this._set.has(t);var r=$K.toSetString(t);return zK.call(this._set,r)},"ArraySet_has");J1.prototype.indexOf=s(function(t){if(Dx){var r=this._set.get(t);if(r>=0)return r}else{var n=$K.toSetString(t);if(zK.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");J1.prototype.at=s(function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},"ArraySet_at");J1.prototype.toArray=s(function(){return this._array.slice()},"ArraySet_toArray");Ope.ArraySet=J1});var Wpe=H(qpe=>{d();var Upe=aI();function $Ke(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||Upe.compareByGeneratedPositionsInflated(e,t)<=0}s($Ke,"generatedPositionAfter");function YP(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}s(YP,"MappingList");YP.prototype.unsortedForEach=s(function(t,r){this._array.forEach(t,r)},"MappingList_forEach");YP.prototype.add=s(function(t){$Ke(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},"MappingList_add");YP.prototype.toArray=s(function(){return this._sorted||(this._array.sort(Upe.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");qpe.MappingList=YP});var KK=H(Gpe=>{d();var F7=jK(),Qa=aI(),KP=YK().ArraySet,zKe=Wpe().MappingList;function hd(e){e||(e={}),this._file=Qa.getArg(e,"file",null),this._sourceRoot=Qa.getArg(e,"sourceRoot",null),this._skipValidation=Qa.getArg(e,"skipValidation",!1),this._sources=new KP,this._names=new KP,this._mappings=new zKe,this._sourcesContents=null}s(hd,"SourceMapGenerator");hd.prototype._version=3;hd.fromSourceMap=s(function(t){var r=t.sourceRoot,n=new hd({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Qa.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=Qa.relative(r,i)),n._sources.has(o)||n._sources.add(o);var a=t.sourceContentFor(i);a!=null&&n.setSourceContent(i,a)}),n},"SourceMapGenerator_fromSourceMap");hd.prototype.addMapping=s(function(t){var r=Qa.getArg(t,"generated"),n=Qa.getArg(t,"original",null),i=Qa.getArg(t,"source",null),o=Qa.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})},"SourceMapGenerator_addMapping");hd.prototype.setSourceContent=s(function(t,r){var n=t;this._sourceRoot!=null&&(n=Qa.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Qa.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Qa.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");hd.prototype.applySourceMap=s(function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var o=this._sourceRoot;o!=null&&(i=Qa.relative(o,i));var a=new KP,l=new KP;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Qa.join(n,c.source)),o!=null&&(c.source=Qa.relative(o,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var m=c.name;m!=null&&!l.has(m)&&l.add(m)},this),this._sources=a,this._names=l,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=Qa.join(n,c)),o!=null&&(c=Qa.relative(o,c)),this.setSourceContent(c,u))},this)},"SourceMapGenerator_applySourceMap");hd.prototype._validateMapping=s(function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");hd.prototype._serializeMappings=s(function(){for(var t=0,r=1,n=0,i=0,o=0,a=0,l="",c,u,f,m,h=this._mappings.toArray(),p=0,g=h.length;p<g;p++){if(u=h[p],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(p>0){if(!Qa.compareByGeneratedPositionsInflated(u,h[p-1]))continue;c+=","}c+=F7.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(m=this._sources.indexOf(u.source),c+=F7.encode(m-a),a=m,c+=F7.encode(u.originalLine-1-i),i=u.originalLine-1,c+=F7.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(f=this._names.indexOf(u.name),c+=F7.encode(f-o),o=f)),l+=c}return l},"SourceMapGenerator_serializeMappings");hd.prototype._generateSourcesContent=s(function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Qa.relative(r,n));var i=Qa.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");hd.prototype.toJSON=s(function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},"SourceMapGenerator_toJSON");hd.prototype.toString=s(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");Gpe.SourceMapGenerator=hd});var Hpe=H(Px=>{d();Px.GREATEST_LOWER_BOUND=1;Px.LEAST_UPPER_BOUND=2;function JK(e,t,r,n,i,o){var a=Math.floor((t-e)/2)+e,l=i(r,n[a],!0);return l===0?a:l>0?t-a>1?JK(a,t,r,n,i,o):o==Px.LEAST_UPPER_BOUND?t<n.length?t:-1:a:a-e>1?JK(e,a,r,n,i,o):o==Px.LEAST_UPPER_BOUND?a:e<0?-1:e}s(JK,"recursiveSearch");Px.search=s(function(t,r,n,i){if(r.length===0)return-1;var o=JK(-1,r.length,t,r,n,i||Px.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o},"search")});var Vpe=H(jpe=>{d();function XK(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}s(XK,"swap");function YKe(e,t){return Math.round(e+Math.random()*(t-e))}s(YKe,"randomIntInRange");function ZK(e,t,r,n){if(r<n){var i=YKe(r,n),o=r-1;XK(e,i,n);for(var a=e[n],l=r;l<n;l++)t(e[l],a)<=0&&(o+=1,XK(e,o,l));XK(e,o+1,l);var c=o+1;ZK(e,t,r,c-1),ZK(e,t,c+1,n)}}s(ZK,"doQuickSort");jpe.quickSort=function(e,t){ZK(e,t,0,e.length-1)}});var zpe=H(JP=>{d();var Ur=aI(),eJ=Hpe(),lI=YK().ArraySet,KKe=jK(),M7=Vpe().quickSort;function ss(e,t){var r=e;return typeof e=="string"&&(r=Ur.parseSourceMapInput(e)),r.sections!=null?new jm(r,t):new ec(r,t)}s(ss,"SourceMapConsumer");ss.fromSourceMap=function(e,t){return ec.fromSourceMap(e,t)};ss.prototype._version=3;ss.prototype.__generatedMappings=null;Object.defineProperty(ss.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:s(function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings},"get")});ss.prototype.__originalMappings=null;Object.defineProperty(ss.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:s(function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings},"get")});ss.prototype._charIsMappingSeparator=s(function(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");ss.prototype._parseMappings=s(function(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");ss.GENERATED_ORDER=1;ss.ORIGINAL_ORDER=2;ss.GREATEST_LOWER_BOUND=1;ss.LEAST_UPPER_BOUND=2;ss.prototype.eachMapping=s(function(t,r,n){var i=r||null,o=n||ss.GENERATED_ORDER,a;switch(o){case ss.GENERATED_ORDER:a=this._generatedMappings;break;case ss.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;a.map(function(c){var u=c.source===null?null:this._sources.at(c.source);return u=Ur.computeSourceURL(l,u,this._sourceMapURL),{source:u,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");ss.prototype.allGeneratedPositionsFor=s(function(t){var r=Ur.getArg(t,"line"),n={source:Ur.getArg(t,"source"),originalLine:r,originalColumn:Ur.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ur.compareByOriginalPositions,eJ.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(t.column===void 0)for(var l=a.originalLine;a&&a.originalLine===l;)i.push({line:Ur.getArg(a,"generatedLine",null),column:Ur.getArg(a,"generatedColumn",null),lastColumn:Ur.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:Ur.getArg(a,"generatedLine",null),column:Ur.getArg(a,"generatedColumn",null),lastColumn:Ur.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i},"SourceMapConsumer_allGeneratedPositionsFor");JP.SourceMapConsumer=ss;function ec(e,t){var r=e;typeof e=="string"&&(r=Ur.parseSourceMapInput(e));var n=Ur.getArg(r,"version"),i=Ur.getArg(r,"sources"),o=Ur.getArg(r,"names",[]),a=Ur.getArg(r,"sourceRoot",null),l=Ur.getArg(r,"sourcesContent",null),c=Ur.getArg(r,"mappings"),u=Ur.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=Ur.normalize(a)),i=i.map(String).map(Ur.normalize).map(function(f){return a&&Ur.isAbsolute(a)&&Ur.isAbsolute(f)?Ur.relative(a,f):f}),this._names=lI.fromArray(o.map(String),!0),this._sources=lI.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return Ur.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=l,this._mappings=c,this._sourceMapURL=t,this.file=u}s(ec,"BasicSourceMapConsumer");ec.prototype=Object.create(ss.prototype);ec.prototype.consumer=ss;ec.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=Ur.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};ec.fromSourceMap=s(function(t,r){var n=Object.create(ec.prototype),i=n._names=lI.fromArray(t._names.toArray(),!0),o=n._sources=lI.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(p){return Ur.computeSourceURL(n.sourceRoot,p,r)});for(var a=t._mappings.toArray().slice(),l=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,f=a.length;u<f;u++){var m=a[u],h=new $pe;h.generatedLine=m.generatedLine,h.generatedColumn=m.generatedColumn,m.source&&(h.source=o.indexOf(m.source),h.originalLine=m.originalLine,h.originalColumn=m.originalColumn,m.name&&(h.name=i.indexOf(m.name)),c.push(h)),l.push(h)}return M7(n.__originalMappings,Ur.compareByOriginalPositions),n},"SourceMapConsumer_fromSourceMap");ec.prototype._version=3;Object.defineProperty(ec.prototype,"sources",{get:s(function(){return this._absoluteSources.slice()},"get")});function $pe(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s($pe,"Mapping");ec.prototype._parseMappings=s(function(t,r){for(var n=1,i=0,o=0,a=0,l=0,c=0,u=t.length,f=0,m={},h={},p=[],g=[],y,x,b,E,_;f<u;)if(t.charAt(f)===";")n++,f++,i=0;else if(t.charAt(f)===",")f++;else{for(y=new $pe,y.generatedLine=n,E=f;E<u&&!this._charIsMappingSeparator(t,E);E++);if(x=t.slice(f,E),b=m[x],b)f+=x.length;else{for(b=[];f<E;)KKe.decode(t,f,h),_=h.value,f=h.rest,b.push(_);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");m[x]=b}y.generatedColumn=i+b[0],i=y.generatedColumn,b.length>1&&(y.source=l+b[1],l+=b[1],y.originalLine=o+b[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=a+b[3],a=y.originalColumn,b.length>4&&(y.name=c+b[4],c+=b[4])),g.push(y),typeof y.originalLine=="number"&&p.push(y)}M7(g,Ur.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,M7(p,Ur.compareByOriginalPositions),this.__originalMappings=p},"SourceMapConsumer_parseMappings");ec.prototype._findMapping=s(function(t,r,n,i,o,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return eJ.search(t,r,o,a)},"SourceMapConsumer_findMapping");ec.prototype.computeColumnSpans=s(function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},"SourceMapConsumer_computeColumnSpans");ec.prototype.originalPositionFor=s(function(t){var r={generatedLine:Ur.getArg(t,"line"),generatedColumn:Ur.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Ur.compareByGeneratedPositionsDeflated,Ur.getArg(t,"bias",ss.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=Ur.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=Ur.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=Ur.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:Ur.getArg(i,"originalLine",null),column:Ur.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");ec.prototype.hasContentsOfAllSources=s(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");ec.prototype.sourceContentFor=s(function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=Ur.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=Ur.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')},"SourceMapConsumer_sourceContentFor");ec.prototype.generatedPositionFor=s(function(t){var r=Ur.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:Ur.getArg(t,"line"),originalColumn:Ur.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ur.compareByOriginalPositions,Ur.getArg(t,"bias",ss.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:Ur.getArg(o,"generatedLine",null),column:Ur.getArg(o,"generatedColumn",null),lastColumn:Ur.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");JP.BasicSourceMapConsumer=ec;function jm(e,t){var r=e;typeof e=="string"&&(r=Ur.parseSourceMapInput(e));var n=Ur.getArg(r,"version"),i=Ur.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new lI,this._names=new lI;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var l=Ur.getArg(a,"offset"),c=Ur.getArg(l,"line"),u=Ur.getArg(l,"column");if(c<o.line||c===o.line&&u<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=l,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new ss(Ur.getArg(a,"map"),t)}})}s(jm,"IndexedSourceMapConsumer");jm.prototype=Object.create(ss.prototype);jm.prototype.constructor=ss;jm.prototype._version=3;Object.defineProperty(jm.prototype,"sources",{get:s(function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e},"get")});jm.prototype.originalPositionFor=s(function(t){var r={generatedLine:Ur.getArg(t,"line"),generatedColumn:Ur.getArg(t,"column")},n=eJ.search(r,this._sections,function(o,a){var l=o.generatedLine-a.generatedOffset.generatedLine;return l||o.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},"IndexedSourceMapConsumer_originalPositionFor");jm.prototype.hasContentsOfAllSources=s(function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");jm.prototype.sourceContentFor=s(function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')},"IndexedSourceMapConsumer_sourceContentFor");jm.prototype.generatedPositionFor=s(function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(Ur.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},"IndexedSourceMapConsumer_generatedPositionFor");jm.prototype._parseMappings=s(function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var l=o[a],c=i.consumer._sources.at(l.source);c=Ur.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;l.name&&(u=i.consumer._names.at(l.name),this._names.add(u),u=this._names.indexOf(u));var f={source:c,generatedLine:l.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(i.generatedOffset.generatedLine===l.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:u};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}M7(this.__generatedMappings,Ur.compareByGeneratedPositionsDeflated),M7(this.__originalMappings,Ur.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");JP.IndexedSourceMapConsumer=jm});var Kpe=H(Ype=>{d();var JKe=KK().SourceMapGenerator,XP=aI(),XKe=/(\r?\n)/,ZKe=10,cI="$$$isSourceNode$$$";function ju(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[cI]=!0,n!=null&&this.add(n)}s(ju,"SourceNode");ju.fromStringWithSourceMap=s(function(t,r,n){var i=new ju,o=t.split(XKe),a=0,l=s(function(){var h=g(),p=g()||"";return h+p;function g(){return a<o.length?o[a++]:void 0}},"shiftNextLine"),c=1,u=0,f=null;return r.eachMapping(function(h){if(f!==null)if(c<h.generatedLine)m(f,l()),c++,u=0;else{var p=o[a]||"",g=p.substr(0,h.generatedColumn-u);o[a]=p.substr(h.generatedColumn-u),u=h.generatedColumn,m(f,g),f=h;return}for(;c<h.generatedLine;)i.add(l()),c++;if(u<h.generatedColumn){var p=o[a]||"";i.add(p.substr(0,h.generatedColumn)),o[a]=p.substr(h.generatedColumn),u=h.generatedColumn}f=h},this),a<o.length&&(f&&m(f,l()),i.add(o.splice(a).join(""))),r.sources.forEach(function(h){var p=r.sourceContentFor(h);p!=null&&(n!=null&&(h=XP.join(n,h)),i.setSourceContent(h,p))}),i;function m(h,p){if(h===null||h.source===void 0)i.add(p);else{var g=n?XP.join(n,h.source):h.source;i.add(new ju(h.originalLine,h.originalColumn,g,p,h.name))}}s(m,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");ju.prototype.add=s(function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[cI]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_add");ju.prototype.prepend=s(function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[cI]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_prepend");ju.prototype.walk=s(function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[cI]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},"SourceNode_walk");ju.prototype.join=s(function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this},"SourceNode_join");ju.prototype.replaceRight=s(function(t,r){var n=this.children[this.children.length-1];return n[cI]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},"SourceNode_replaceRight");ju.prototype.setSourceContent=s(function(t,r){this.sourceContents[XP.toSetString(t)]=r},"SourceNode_setSourceContent");ju.prototype.walkSourceContents=s(function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][cI]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(XP.fromSetString(i[r]),this.sourceContents[i[r]])},"SourceNode_walkSourceContents");ju.prototype.toString=s(function(){var t="";return this.walk(function(r){t+=r}),t},"SourceNode_toString");ju.prototype.toStringWithSourceMap=s(function(t){var r={code:"",line:1,column:0},n=new JKe(t),i=!1,o=null,a=null,l=null,c=null;return this.walk(function(u,f){r.code+=u,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||a!==f.line||l!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,a=f.line,l=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var m=0,h=u.length;m<h;m++)u.charCodeAt(m)===ZKe?(r.line++,r.column=0,m+1===h?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(u,f){n.setSourceContent(u,f)}),{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");Ype.SourceNode=ju});var Jpe=H(ZP=>{d();ZP.SourceMapGenerator=KK().SourceMapGenerator;ZP.SourceMapConsumer=zpe().SourceMapConsumer;ZP.SourceNode=Kpe().SourceNode});var Zpe=H((Ljt,Xpe)=>{d();var eJe=Object.prototype.toString,tJ=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function tJe(e){return eJe.call(e).slice(8,-1)==="ArrayBuffer"}s(tJe,"isArrayBuffer");function rJe(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return tJ?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}s(rJe,"fromArrayBuffer");function nJe(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return tJ?Buffer.from(e,t):new Buffer(e,t)}s(nJe,"fromString");function iJe(e,t,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return tJe(e)?rJe(e,t,r):typeof e=="string"?nJe(e,t):tJ?Buffer.from(e):new Buffer(e)}s(iJe,"bufferFrom");Xpe.exports=iJe});var age=H((Lx,oJ)=>{d();var oJe=Jpe().SourceMapConsumer,rJ=require("path"),Gp;try{Gp=require("fs"),(!Gp.existsSync||!Gp.readFileSync)&&(Gp=null)}catch{}var sJe=Zpe();function ege(e,t){return e.require(t)}s(ege,"dynamicRequire");var tge=!1,rge=!1,nJ=!1,Q7="auto",Nx={},O7={},aJe=/^data:application\/json[^,]+base64,/,Zy=[],e5=[];function sJ(){return Q7==="browser"?!0:Q7==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}s(sJ,"isInBrowser");function lJe(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}s(lJe,"hasGlobalProcessEventEmitter");function cJe(){return typeof process=="object"&&process!==null?process.version:""}s(cJe,"globalProcessVersion");function uJe(){if(typeof process=="object"&&process!==null)return process.stderr}s(uJe,"globalProcessStderr");function fJe(e){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(e)}s(fJe,"globalProcessExit");function eN(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}s(eN,"handlerExec");var aJ=eN(Zy);Zy.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(n,i){return i?"":"/"})),e in Nx)return Nx[e];var t="";try{if(Gp)Gp.existsSync(e)&&(t=Gp.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),r.readyState===4&&r.status===200&&(t=r.responseText)}}catch{}return Nx[e]=t});function iJ(e,t){if(!e)return t;var r=rJ.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",o=r.slice(i.length);return i&&/^\/\w\:/.test(o)?(i+="/",i+rJ.resolve(r.slice(i.length),t).replace(/\\/g,"/")):i+rJ.resolve(r.slice(i.length),t)}s(iJ,"supportRelativeURL");function dJe(e){var t;if(sJ())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=r.readyState===4?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch{}t=aJ(e);for(var i=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,o,a;a=i.exec(t);)o=a;return o?o[1]:null}s(dJe,"retrieveSourceMapURL");var lJ=eN(e5);e5.push(function(e){var t=dJe(e);if(!t)return null;var r;if(aJe.test(t)){var n=t.slice(t.indexOf(",")+1);r=sJe(n,"base64").toString(),t=e}else t=iJ(e,t),r=aJ(t);return r?{url:t,map:r}:null});function cJ(e){var t=O7[e.source];if(!t){var r=lJ(e.source);r?(t=O7[e.source]={url:r.url,map:new oJe(r.map)},t.map.sourcesContent&&t.map.sources.forEach(function(i,o){var a=t.map.sourcesContent[o];if(a){var l=iJ(t.url,i);Nx[l]=a}})):t=O7[e.source]={url:null,map:null}}if(t&&t.map&&typeof t.map.originalPositionFor=="function"){var n=t.map.originalPositionFor(e);if(n.source!==null)return n.source=iJ(t.url,n.source),n}return e}s(cJ,"mapSourcePosition");function ige(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=cJ({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?"eval at "+t[1]+" ("+ige(t[2])+")":e}s(ige,"mapEvalOrigin");function mJe(){var e,t="";if(this.isNative())t="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),e?t+=e:t+="<anonymous>";var r=this.getLineNumber();if(r!=null){t+=":"+r;var n=this.getColumnNumber();n&&(t+=":"+n)}}var i="",o=this.getFunctionName(),a=!0,l=this.isConstructor(),c=!(this.isToplevel()||l);if(c){var u=this.getTypeName();u==="[object Object]"&&(u="null");var f=this.getMethodName();o?(u&&o.indexOf(u)!=0&&(i+=u+"."),i+=o,f&&o.indexOf("."+f)!=o.length-f.length-1&&(i+=" [as "+f+"]")):i+=u+"."+(f||"<anonymous>")}else l?i+="new "+(o||"<anonymous>"):o?i+=o:(i+=t,a=!1);return a&&(i+=" ("+t+")"),i}s(mJe,"CallSiteToString");function nge(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]}),t.toString=mJe,t}s(nge,"cloneCallSite");function oge(e,t){if(t===void 0&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber(),i=e.getColumnNumber()-1,o=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,a=o.test(cJe())?0:62;n===1&&i>a&&!sJ()&&!e.isEval()&&(i-=a);var l=cJ({source:r,line:n,column:i});t.curPosition=l,e=nge(e);var c=e.getFunctionName;return e.getFunctionName=function(){return t.nextPosition==null?c():t.nextPosition.name||c()},e.getFileName=function(){return l.source},e.getLineNumber=function(){return l.line},e.getColumnNumber=function(){return l.column+1},e.getScriptNameOrSourceURL=function(){return l.source},e}var u=e.isEval()&&e.getEvalOrigin();return u&&(u=ige(u),e=nge(e),e.getEvalOrigin=function(){return u}),e}s(oge,"wrapCallSite");function hJe(e,t){nJ&&(Nx={},O7={});for(var r=e.name||"Error",n=e.message||"",i=r+": "+n,o={nextPosition:null,curPosition:null},a=[],l=t.length-1;l>=0;l--)a.push(`
at `+oge(t[l],o)),o.nextPosition=o.curPosition;return o.curPosition=o.nextPosition=null,i+a.reverse().join("")}s(hJe,"prepareStackTrace");function sge(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],n=+t[2],i=+t[3],o=Nx[r];if(!o&&Gp&&Gp.existsSync(r))try{o=Gp.readFileSync(r,"utf8")}catch{o=""}if(o){var a=o.split(/(?:\r\n|\r|\n)/)[n-1];if(a)return r+":"+n+`
`+a+`
`+new Array(i).join(" ")+"^"}}return null}s(sge,"getErrorSource");function pJe(e){var t=sge(e),r=uJe();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),fJe(1)}s(pJe,"printErrorAndExit");function gJe(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,n=this.listeners(t).length>0;if(r&&!n)return pJe(arguments[1])}return e.apply(this,arguments)}}s(gJe,"shimEmitUncaughtException");var AJe=Zy.slice(0),yJe=e5.slice(0);Lx.wrapCallSite=oge;Lx.getErrorSource=sge;Lx.mapSourcePosition=cJ;Lx.retrieveSourceMap=lJ;Lx.install=function(e){if(e=e||{},e.environment&&(Q7=e.environment,["node","browser","auto"].indexOf(Q7)===-1))throw new Error("environment "+Q7+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(Zy.length=0),Zy.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(e5.length=0),e5.unshift(e.retrieveSourceMap)),e.hookRequire&&!sJ()){var t=ege(oJ,"module"),r=t.prototype._compile;r.__sourceMapSupport||(t.prototype._compile=function(o,a){return Nx[a]=o,O7[a]=void 0,r.call(this,o,a)},t.prototype._compile.__sourceMapSupport=!0)}if(nJ||(nJ="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),tge||(tge=!0,Error.prepareStackTrace=hJe),!rge){var n="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;try{var i=ege(oJ,"worker_threads");i.isMainThread===!1&&(n=!1)}catch{}n&&lJe()&&(rge=!0,gJe())}};Lx.resetRetrieveHandlers=function(){Zy.length=0,e5.length=0,Zy=AJe.slice(0),e5=yJe.slice(0),lJ=eN(e5),aJ=eN(Zy)}});var ki=H((tN,lge)=>{d();(function(e,t){typeof tN=="object"?lge.exports=tN=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(tN,function(){var e=e||function(t,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof require=="function")try{n=require("crypto")}catch{}var i=s(function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},"cryptoSecureRandomInt"),o=Object.create||function(){function b(){}return s(b,"F"),function(E){var _;return b.prototype=E,_=new b,b.prototype=null,_}}(),a={},l=a.lib={},c=l.Base=function(){return{extend:s(function(b){var E=o(this);return b&&E.mixIn(b),(!E.hasOwnProperty("init")||this.init===E.init)&&(E.init=function(){E.$super.init.apply(this,arguments)}),E.init.prototype=E,E.$super=this,E},"extend"),create:s(function(){var b=this.extend();return b.init.apply(b,arguments),b},"create"),init:s(function(){},"init"),mixIn:s(function(b){for(var E in b)b.hasOwnProperty(E)&&(this[E]=b[E]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},"mixIn"),clone:s(function(){return this.init.prototype.extend(this)},"clone")}}(),u=l.WordArray=c.extend({init:s(function(b,E){b=this.words=b||[],E!=r?this.sigBytes=E:this.sigBytes=b.length*4},"init"),toString:s(function(b){return(b||m).stringify(this)},"toString"),concat:s(function(b){var E=this.words,_=b.words,k=this.sigBytes,B=b.sigBytes;if(this.clamp(),k%4)for(var N=0;N<B;N++){var M=_[N>>>2]>>>24-N%4*8&255;E[k+N>>>2]|=M<<24-(k+N)%4*8}else for(var Z=0;Z<B;Z+=4)E[k+Z>>>2]=_[Z>>>2];return this.sigBytes+=B,this},"concat"),clamp:s(function(){var b=this.words,E=this.sigBytes;b[E>>>2]&=4294967295<<32-E%4*8,b.length=t.ceil(E/4)},"clamp"),clone:s(function(){var b=c.clone.call(this);return b.words=this.words.slice(0),b},"clone"),random:s(function(b){for(var E=[],_=0;_<b;_+=4)E.push(i());return new u.init(E,b)},"random")}),f=a.enc={},m=f.Hex={stringify:s(function(b){for(var E=b.words,_=b.sigBytes,k=[],B=0;B<_;B++){var N=E[B>>>2]>>>24-B%4*8&255;k.push((N>>>4).toString(16)),k.push((N&15).toString(16))}return k.join("")},"stringify"),parse:s(function(b){for(var E=b.length,_=[],k=0;k<E;k+=2)_[k>>>3]|=parseInt(b.substr(k,2),16)<<24-k%8*4;return new u.init(_,E/2)},"parse")},h=f.Latin1={stringify:s(function(b){for(var E=b.words,_=b.sigBytes,k=[],B=0;B<_;B++){var N=E[B>>>2]>>>24-B%4*8&255;k.push(String.fromCharCode(N))}return k.join("")},"stringify"),parse:s(function(b){for(var E=b.length,_=[],k=0;k<E;k++)_[k>>>2]|=(b.charCodeAt(k)&255)<<24-k%4*8;return new u.init(_,E)},"parse")},p=f.Utf8={stringify:s(function(b){try{return decodeURIComponent(escape(h.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:s(function(b){return h.parse(unescape(encodeURIComponent(b)))},"parse")},g=l.BufferedBlockAlgorithm=c.extend({reset:s(function(){this._data=new u.init,this._nDataBytes=0},"reset"),_append:s(function(b){typeof b=="string"&&(b=p.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},"_append"),_process:s(function(b){var E,_=this._data,k=_.words,B=_.sigBytes,N=this.blockSize,M=N*4,Z=B/M;b?Z=t.ceil(Z):Z=t.max((Z|0)-this._minBufferSize,0);var he=Z*N,ee=t.min(he*4,B);if(he){for(var G=0;G<he;G+=N)this._doProcessBlock(k,G);E=k.splice(0,he),_.sigBytes-=ee}return new u.init(E,ee)},"_process"),clone:s(function(){var b=c.clone.call(this);return b._data=this._data.clone(),b},"clone"),_minBufferSize:0}),y=l.Hasher=g.extend({cfg:c.extend(),init:s(function(b){this.cfg=this.cfg.extend(b),this.reset()},"init"),reset:s(function(){g.reset.call(this),this._doReset()},"reset"),update:s(function(b){return this._append(b),this._process(),this},"update"),finalize:s(function(b){b&&this._append(b);var E=this._doFinalize();return E},"finalize"),blockSize:512/32,_createHelper:s(function(b){return function(E,_){return new b.init(_).finalize(E)}},"_createHelper"),_createHmacHelper:s(function(b){return function(E,_){return new x.HMAC.init(b,_).finalize(E)}},"_createHmacHelper")}),x=a.algo={};return a}(Math);return e})});var q7=H((rN,cge)=>{d();(function(e,t){typeof rN=="object"?cge.exports=rN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(rN,function(e){return function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=r.x64={},l=a.Word=i.extend({init:s(function(u,f){this.high=u,this.low=f},"init")}),c=a.WordArray=i.extend({init:s(function(u,f){u=this.words=u||[],f!=t?this.sigBytes=f:this.sigBytes=u.length*8},"init"),toX32:s(function(){for(var u=this.words,f=u.length,m=[],h=0;h<f;h++){var p=u[h];m.push(p.high),m.push(p.low)}return o.create(m,this.sigBytes)},"toX32"),clone:s(function(){for(var u=i.clone.call(this),f=u.words=this.words.slice(0),m=f.length,h=0;h<m;h++)f[h]=f[h].clone();return u},"clone")})}(),e})});var fge=H((nN,uge)=>{d();(function(e,t){typeof nN=="object"?uge.exports=nN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(nN,function(e){return function(){if(typeof ArrayBuffer=="function"){var t=e,r=t.lib,n=r.WordArray,i=n.init,o=n.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||typeof Uint8ClampedArray<"u"&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var l=a.byteLength,c=[],u=0;u<l;u++)c[u>>>2]|=a[u]<<24-u%4*8;i.call(this,c,l)}else i.apply(this,arguments)};o.prototype=n}}(),e.lib.WordArray})});var mge=H((iN,dge)=>{d();(function(e,t){typeof iN=="object"?dge.exports=iN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(iN,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=t.enc,o=i.Utf16=i.Utf16BE={stringify:s(function(l){for(var c=l.words,u=l.sigBytes,f=[],m=0;m<u;m+=2){var h=c[m>>>2]>>>16-m%4*8&65535;f.push(String.fromCharCode(h))}return f.join("")},"stringify"),parse:s(function(l){for(var c=l.length,u=[],f=0;f<c;f++)u[f>>>1]|=l.charCodeAt(f)<<16-f%2*16;return n.create(u,c*2)},"parse")};i.Utf16LE={stringify:s(function(l){for(var c=l.words,u=l.sigBytes,f=[],m=0;m<u;m+=2){var h=a(c[m>>>2]>>>16-m%4*8&65535);f.push(String.fromCharCode(h))}return f.join("")},"stringify"),parse:s(function(l){for(var c=l.length,u=[],f=0;f<c;f++)u[f>>>1]|=a(l.charCodeAt(f)<<16-f%2*16);return n.create(u,c*2)},"parse")};function a(l){return l<<8&4278255360|l>>>8&16711935}s(a,"swapEndian")}(),e.enc.Utf16})});var t5=H((oN,hge)=>{d();(function(e,t){typeof oN=="object"?hge.exports=oN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(oN,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=t.enc,o=i.Base64={stringify:s(function(l){var c=l.words,u=l.sigBytes,f=this._map;l.clamp();for(var m=[],h=0;h<u;h+=3)for(var p=c[h>>>2]>>>24-h%4*8&255,g=c[h+1>>>2]>>>24-(h+1)%4*8&255,y=c[h+2>>>2]>>>24-(h+2)%4*8&255,x=p<<16|g<<8|y,b=0;b<4&&h+b*.75<u;b++)m.push(f.charAt(x>>>6*(3-b)&63));var E=f.charAt(64);if(E)for(;m.length%4;)m.push(E);return m.join("")},"stringify"),parse:s(function(l){var c=l.length,u=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var m=0;m<u.length;m++)f[u.charCodeAt(m)]=m}var h=u.charAt(64);if(h){var p=l.indexOf(h);p!==-1&&(c=p)}return a(l,c,f)},"parse"),_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(l,c,u){for(var f=[],m=0,h=0;h<c;h++)if(h%4){var p=u[l.charCodeAt(h-1)]<<h%4*2,g=u[l.charCodeAt(h)]>>>6-h%4*2,y=p|g;f[m>>>2]|=y<<24-m%4*8,m++}return n.create(f,m)}s(a,"parseLoop")}(),e.enc.Base64})});var gge=H((sN,pge)=>{d();(function(e,t){typeof sN=="object"?pge.exports=sN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(sN,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=t.enc,o=i.Base64url={stringify:s(function(l,c){c===void 0&&(c=!0);var u=l.words,f=l.sigBytes,m=c?this._safe_map:this._map;l.clamp();for(var h=[],p=0;p<f;p+=3)for(var g=u[p>>>2]>>>24-p%4*8&255,y=u[p+1>>>2]>>>24-(p+1)%4*8&255,x=u[p+2>>>2]>>>24-(p+2)%4*8&255,b=g<<16|y<<8|x,E=0;E<4&&p+E*.75<f;E++)h.push(m.charAt(b>>>6*(3-E)&63));var _=m.charAt(64);if(_)for(;h.length%4;)h.push(_);return h.join("")},"stringify"),parse:s(function(l,c){c===void 0&&(c=!0);var u=l.length,f=c?this._safe_map:this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var h=0;h<f.length;h++)m[f.charCodeAt(h)]=h}var p=f.charAt(64);if(p){var g=l.indexOf(p);g!==-1&&(u=g)}return a(l,u,m)},"parse"),_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(l,c,u){for(var f=[],m=0,h=0;h<c;h++)if(h%4){var p=u[l.charCodeAt(h-1)]<<h%4*2,g=u[l.charCodeAt(h)]>>>6-h%4*2,y=p|g;f[m>>>2]|=y<<24-m%4*8,m++}return n.create(f,m)}s(a,"parseLoop")}(),e.enc.Base64url})});var r5=H((aN,Age)=>{d();(function(e,t){typeof aN=="object"?Age.exports=aN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(aN,function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,l=[];(function(){for(var p=0;p<64;p++)l[p]=t.abs(t.sin(p+1))*4294967296|0})();var c=a.MD5=o.extend({_doReset:s(function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},"_doReset"),_doProcessBlock:s(function(p,g){for(var y=0;y<16;y++){var x=g+y,b=p[x];p[x]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var E=this._hash.words,_=p[g+0],k=p[g+1],B=p[g+2],N=p[g+3],M=p[g+4],Z=p[g+5],he=p[g+6],ee=p[g+7],G=p[g+8],q=p[g+9],ie=p[g+10],z=p[g+11],j=p[g+12],U=p[g+13],V=p[g+14],K=p[g+15],ae=E[0],re=E[1],le=E[2],ce=E[3];ae=u(ae,re,le,ce,_,7,l[0]),ce=u(ce,ae,re,le,k,12,l[1]),le=u(le,ce,ae,re,B,17,l[2]),re=u(re,le,ce,ae,N,22,l[3]),ae=u(ae,re,le,ce,M,7,l[4]),ce=u(ce,ae,re,le,Z,12,l[5]),le=u(le,ce,ae,re,he,17,l[6]),re=u(re,le,ce,ae,ee,22,l[7]),ae=u(ae,re,le,ce,G,7,l[8]),ce=u(ce,ae,re,le,q,12,l[9]),le=u(le,ce,ae,re,ie,17,l[10]),re=u(re,le,ce,ae,z,22,l[11]),ae=u(ae,re,le,ce,j,7,l[12]),ce=u(ce,ae,re,le,U,12,l[13]),le=u(le,ce,ae,re,V,17,l[14]),re=u(re,le,ce,ae,K,22,l[15]),ae=f(ae,re,le,ce,k,5,l[16]),ce=f(ce,ae,re,le,he,9,l[17]),le=f(le,ce,ae,re,z,14,l[18]),re=f(re,le,ce,ae,_,20,l[19]),ae=f(ae,re,le,ce,Z,5,l[20]),ce=f(ce,ae,re,le,ie,9,l[21]),le=f(le,ce,ae,re,K,14,l[22]),re=f(re,le,ce,ae,M,20,l[23]),ae=f(ae,re,le,ce,q,5,l[24]),ce=f(ce,ae,re,le,V,9,l[25]),le=f(le,ce,ae,re,N,14,l[26]),re=f(re,le,ce,ae,G,20,l[27]),ae=f(ae,re,le,ce,U,5,l[28]),ce=f(ce,ae,re,le,B,9,l[29]),le=f(le,ce,ae,re,ee,14,l[30]),re=f(re,le,ce,ae,j,20,l[31]),ae=m(ae,re,le,ce,Z,4,l[32]),ce=m(ce,ae,re,le,G,11,l[33]),le=m(le,ce,ae,re,z,16,l[34]),re=m(re,le,ce,ae,V,23,l[35]),ae=m(ae,re,le,ce,k,4,l[36]),ce=m(ce,ae,re,le,M,11,l[37]),le=m(le,ce,ae,re,ee,16,l[38]),re=m(re,le,ce,ae,ie,23,l[39]),ae=m(ae,re,le,ce,U,4,l[40]),ce=m(ce,ae,re,le,_,11,l[41]),le=m(le,ce,ae,re,N,16,l[42]),re=m(re,le,ce,ae,he,23,l[43]),ae=m(ae,re,le,ce,q,4,l[44]),ce=m(ce,ae,re,le,j,11,l[45]),le=m(le,ce,ae,re,K,16,l[46]),re=m(re,le,ce,ae,B,23,l[47]),ae=h(ae,re,le,ce,_,6,l[48]),ce=h(ce,ae,re,le,ee,10,l[49]),le=h(le,ce,ae,re,V,15,l[50]),re=h(re,le,ce,ae,Z,21,l[51]),ae=h(ae,re,le,ce,j,6,l[52]),ce=h(ce,ae,re,le,N,10,l[53]),le=h(le,ce,ae,re,ie,15,l[54]),re=h(re,le,ce,ae,k,21,l[55]),ae=h(ae,re,le,ce,G,6,l[56]),ce=h(ce,ae,re,le,K,10,l[57]),le=h(le,ce,ae,re,he,15,l[58]),re=h(re,le,ce,ae,U,21,l[59]),ae=h(ae,re,le,ce,M,6,l[60]),ce=h(ce,ae,re,le,z,10,l[61]),le=h(le,ce,ae,re,B,15,l[62]),re=h(re,le,ce,ae,q,21,l[63]),E[0]=E[0]+ae|0,E[1]=E[1]+re|0,E[2]=E[2]+le|0,E[3]=E[3]+ce|0},"_doProcessBlock"),_doFinalize:s(function(){var p=this._data,g=p.words,y=this._nDataBytes*8,x=p.sigBytes*8;g[x>>>5]|=128<<24-x%32;var b=t.floor(y/4294967296),E=y;g[(x+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,g[(x+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,p.sigBytes=(g.length+1)*4,this._process();for(var _=this._hash,k=_.words,B=0;B<4;B++){var N=k[B];k[B]=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360}return _},"_doFinalize"),clone:s(function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},"clone")});function u(p,g,y,x,b,E,_){var k=p+(g&y|~g&x)+b+_;return(k<<E|k>>>32-E)+g}s(u,"FF");function f(p,g,y,x,b,E,_){var k=p+(g&x|y&~x)+b+_;return(k<<E|k>>>32-E)+g}s(f,"GG");function m(p,g,y,x,b,E,_){var k=p+(g^y^x)+b+_;return(k<<E|k>>>32-E)+g}s(m,"HH");function h(p,g,y,x,b,E,_){var k=p+(y^(g|~x))+b+_;return(k<<E|k>>>32-E)+g}s(h,"II"),r.MD5=o._createHelper(c),r.HmacMD5=o._createHmacHelper(c)}(Math),e.MD5})});var uJ=H((lN,yge)=>{d();(function(e,t){typeof lN=="object"?yge.exports=lN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(lN,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],l=o.SHA1=i.extend({_doReset:s(function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:s(function(c,u){for(var f=this._hash.words,m=f[0],h=f[1],p=f[2],g=f[3],y=f[4],x=0;x<80;x++){if(x<16)a[x]=c[u+x]|0;else{var b=a[x-3]^a[x-8]^a[x-14]^a[x-16];a[x]=b<<1|b>>>31}var E=(m<<5|m>>>27)+y+a[x];x<20?E+=(h&p|~h&g)+1518500249:x<40?E+=(h^p^g)+1859775393:x<60?E+=(h&p|h&g|p&g)-1894007588:E+=(h^p^g)-899497514,y=g,g=p,p=h<<30|h>>>2,h=m,m=E}f[0]=f[0]+m|0,f[1]=f[1]+h|0,f[2]=f[2]+p|0,f[3]=f[3]+g|0,f[4]=f[4]+y|0},"_doProcessBlock"),_doFinalize:s(function(){var c=this._data,u=c.words,f=this._nDataBytes*8,m=c.sigBytes*8;return u[m>>>5]|=128<<24-m%32,u[(m+64>>>9<<4)+14]=Math.floor(f/4294967296),u[(m+64>>>9<<4)+15]=f,c.sigBytes=u.length*4,this._process(),this._hash},"_doFinalize"),clone:s(function(){var c=i.clone.call(this);return c._hash=this._hash.clone(),c},"clone")});t.SHA1=i._createHelper(l),t.HmacSHA1=i._createHmacHelper(l)}(),e.SHA1})});var uN=H((cN,Cge)=>{d();(function(e,t){typeof cN=="object"?Cge.exports=cN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(cN,function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,l=[],c=[];(function(){function m(y){for(var x=t.sqrt(y),b=2;b<=x;b++)if(!(y%b))return!1;return!0}s(m,"isPrime");function h(y){return(y-(y|0))*4294967296|0}s(h,"getFractionalBits");for(var p=2,g=0;g<64;)m(p)&&(g<8&&(l[g]=h(t.pow(p,1/2))),c[g]=h(t.pow(p,1/3)),g++),p++})();var u=[],f=a.SHA256=o.extend({_doReset:s(function(){this._hash=new i.init(l.slice(0))},"_doReset"),_doProcessBlock:s(function(m,h){for(var p=this._hash.words,g=p[0],y=p[1],x=p[2],b=p[3],E=p[4],_=p[5],k=p[6],B=p[7],N=0;N<64;N++){if(N<16)u[N]=m[h+N]|0;else{var M=u[N-15],Z=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,he=u[N-2],ee=(he<<15|he>>>17)^(he<<13|he>>>19)^he>>>10;u[N]=Z+u[N-7]+ee+u[N-16]}var G=E&_^~E&k,q=g&y^g&x^y&x,ie=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),z=(E<<26|E>>>6)^(E<<21|E>>>11)^(E<<7|E>>>25),j=B+z+G+c[N]+u[N],U=ie+q;B=k,k=_,_=E,E=b+j|0,b=x,x=y,y=g,g=j+U|0}p[0]=p[0]+g|0,p[1]=p[1]+y|0,p[2]=p[2]+x|0,p[3]=p[3]+b|0,p[4]=p[4]+E|0,p[5]=p[5]+_|0,p[6]=p[6]+k|0,p[7]=p[7]+B|0},"_doProcessBlock"),_doFinalize:s(function(){var m=this._data,h=m.words,p=this._nDataBytes*8,g=m.sigBytes*8;return h[g>>>5]|=128<<24-g%32,h[(g+64>>>9<<4)+14]=t.floor(p/4294967296),h[(g+64>>>9<<4)+15]=p,m.sigBytes=h.length*4,this._process(),this._hash},"_doFinalize"),clone:s(function(){var m=o.clone.call(this);return m._hash=this._hash.clone(),m},"clone")});r.SHA256=o._createHelper(f),r.HmacSHA256=o._createHmacHelper(f)}(Math),e.SHA256})});var vge=H((fN,xge)=>{d();(function(e,t,r){typeof fN=="object"?xge.exports=fN=t(ki(),uN()):typeof define=="function"&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)})(fN,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=t.algo,o=i.SHA256,a=i.SHA224=o.extend({_doReset:s(function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},"_doReset"),_doFinalize:s(function(){var l=o._doFinalize.call(this);return l.sigBytes-=4,l},"_doFinalize")});t.SHA224=o._createHelper(a),t.HmacSHA224=o._createHmacHelper(a)}(),e.SHA224})});var fJ=H((dN,bge)=>{d();(function(e,t,r){typeof dN=="object"?bge.exports=dN=t(ki(),q7()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(dN,function(e){return function(){var t=e,r=t.lib,n=r.Hasher,i=t.x64,o=i.Word,a=i.WordArray,l=t.algo;function c(){return o.create.apply(o,arguments)}s(c,"X64Word_create");var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],f=[];(function(){for(var h=0;h<80;h++)f[h]=c()})();var m=l.SHA512=n.extend({_doReset:s(function(){this._hash=new a.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},"_doReset"),_doProcessBlock:s(function(h,p){for(var g=this._hash.words,y=g[0],x=g[1],b=g[2],E=g[3],_=g[4],k=g[5],B=g[6],N=g[7],M=y.high,Z=y.low,he=x.high,ee=x.low,G=b.high,q=b.low,ie=E.high,z=E.low,j=_.high,U=_.low,V=k.high,K=k.low,ae=B.high,re=B.low,le=N.high,ce=N.low,De=M,be=Z,qe=he,Re=ee,Xe=G,ft=q,at=ie,lt=z,oe=j,Ne=U,Ae=V,Ge=K,Y=ae,ne=re,Fe=le,Se=ce,Ce=0;Ce<80;Ce++){var Ue,Ve,tt=f[Ce];if(Ce<16)Ve=tt.high=h[p+Ce*2]|0,Ue=tt.low=h[p+Ce*2+1]|0;else{var Ct=f[Ce-15],Pt=Ct.high,yt=Ct.low,Kt=(Pt>>>1|yt<<31)^(Pt>>>8|yt<<24)^Pt>>>7,Xt=(yt>>>1|Pt<<31)^(yt>>>8|Pt<<24)^(yt>>>7|Pt<<25),lr=f[Ce-2],ge=lr.high,Me=lr.low,Je=(ge>>>19|Me<<13)^(ge<<3|Me>>>29)^ge>>>6,rt=(Me>>>19|ge<<13)^(Me<<3|ge>>>29)^(Me>>>6|ge<<26),St=f[Ce-7],bt=St.high,Mt=St.low,Ot=f[Ce-16],wt=Ot.high,kt=Ot.low;Ue=Xt+Mt,Ve=Kt+bt+(Ue>>>0<Xt>>>0?1:0),Ue=Ue+rt,Ve=Ve+Je+(Ue>>>0<rt>>>0?1:0),Ue=Ue+kt,Ve=Ve+wt+(Ue>>>0<kt>>>0?1:0),tt.high=Ve,tt.low=Ue}var _t=oe&Ae^~oe&Y,qt=Ne&Ge^~Ne&ne,$t=De&qe^De&Xe^qe&Xe,Zt=be&Re^be&ft^Re&ft,dr=(De>>>28|be<<4)^(De<<30|be>>>2)^(De<<25|be>>>7),xr=(be>>>28|De<<4)^(be<<30|De>>>2)^(be<<25|De>>>7),ur=(oe>>>14|Ne<<18)^(oe>>>18|Ne<<14)^(oe<<23|Ne>>>9),mr=(Ne>>>14|oe<<18)^(Ne>>>18|oe<<14)^(Ne<<23|oe>>>9),nr=u[Ce],hr=nr.high,Ie=nr.low,O=Se+mr,de=Fe+ur+(O>>>0<Se>>>0?1:0),O=O+qt,de=de+_t+(O>>>0<qt>>>0?1:0),O=O+Ie,de=de+hr+(O>>>0<Ie>>>0?1:0),O=O+Ue,de=de+Ve+(O>>>0<Ue>>>0?1:0),ye=xr+Zt,J=dr+$t+(ye>>>0<xr>>>0?1:0);Fe=Y,Se=ne,Y=Ae,ne=Ge,Ae=oe,Ge=Ne,Ne=lt+O|0,oe=at+de+(Ne>>>0<lt>>>0?1:0)|0,at=Xe,lt=ft,Xe=qe,ft=Re,qe=De,Re=be,be=O+ye|0,De=de+J+(be>>>0<O>>>0?1:0)|0}Z=y.low=Z+be,y.high=M+De+(Z>>>0<be>>>0?1:0),ee=x.low=ee+Re,x.high=he+qe+(ee>>>0<Re>>>0?1:0),q=b.low=q+ft,b.high=G+Xe+(q>>>0<ft>>>0?1:0),z=E.low=z+lt,E.high=ie+at+(z>>>0<lt>>>0?1:0),U=_.low=U+Ne,_.high=j+oe+(U>>>0<Ne>>>0?1:0),K=k.low=K+Ge,k.high=V+Ae+(K>>>0<Ge>>>0?1:0),re=B.low=re+ne,B.high=ae+Y+(re>>>0<ne>>>0?1:0),ce=N.low=ce+Se,N.high=le+Fe+(ce>>>0<Se>>>0?1:0)},"_doProcessBlock"),_doFinalize:s(function(){var h=this._data,p=h.words,g=this._nDataBytes*8,y=h.sigBytes*8;p[y>>>5]|=128<<24-y%32,p[(y+128>>>10<<5)+30]=Math.floor(g/4294967296),p[(y+128>>>10<<5)+31]=g,h.sigBytes=p.length*4,this._process();var x=this._hash.toX32();return x},"_doFinalize"),clone:s(function(){var h=n.clone.call(this);return h._hash=this._hash.clone(),h},"clone"),blockSize:1024/32});t.SHA512=n._createHelper(m),t.HmacSHA512=n._createHmacHelper(m)}(),e.SHA512})});var Ige=H((mN,Ege)=>{d();(function(e,t,r){typeof mN=="object"?Ege.exports=mN=t(ki(),q7(),fJ()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],t):t(e.CryptoJS)})(mN,function(e){return function(){var t=e,r=t.x64,n=r.Word,i=r.WordArray,o=t.algo,a=o.SHA512,l=o.SHA384=a.extend({_doReset:s(function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},"_doReset"),_doFinalize:s(function(){var c=a._doFinalize.call(this);return c.sigBytes-=16,c},"_doFinalize")});t.SHA384=a._createHelper(l),t.HmacSHA384=a._createHmacHelper(l)}(),e.SHA384})});var wge=H((hN,Tge)=>{d();(function(e,t,r){typeof hN=="object"?Tge.exports=hN=t(ki(),q7()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(hN,function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64,l=a.Word,c=r.algo,u=[],f=[],m=[];(function(){for(var g=1,y=0,x=0;x<24;x++){u[g+5*y]=(x+1)*(x+2)/2%64;var b=y%5,E=(2*g+3*y)%5;g=b,y=E}for(var g=0;g<5;g++)for(var y=0;y<5;y++)f[g+5*y]=y+(2*g+3*y)%5*5;for(var _=1,k=0;k<24;k++){for(var B=0,N=0,M=0;M<7;M++){if(_&1){var Z=(1<<M)-1;Z<32?N^=1<<Z:B^=1<<Z-32}_&128?_=_<<1^113:_<<=1}m[k]=l.create(B,N)}})();var h=[];(function(){for(var g=0;g<25;g++)h[g]=l.create()})();var p=c.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:s(function(){for(var g=this._state=[],y=0;y<25;y++)g[y]=new l.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},"_doReset"),_doProcessBlock:s(function(g,y){for(var x=this._state,b=this.blockSize/2,E=0;E<b;E++){var _=g[y+2*E],k=g[y+2*E+1];_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;var B=x[E];B.high^=k,B.low^=_}for(var N=0;N<24;N++){for(var M=0;M<5;M++){for(var Z=0,he=0,ee=0;ee<5;ee++){var B=x[M+5*ee];Z^=B.high,he^=B.low}var G=h[M];G.high=Z,G.low=he}for(var M=0;M<5;M++)for(var q=h[(M+4)%5],ie=h[(M+1)%5],z=ie.high,j=ie.low,Z=q.high^(z<<1|j>>>31),he=q.low^(j<<1|z>>>31),ee=0;ee<5;ee++){var B=x[M+5*ee];B.high^=Z,B.low^=he}for(var U=1;U<25;U++){var Z,he,B=x[U],V=B.high,K=B.low,ae=u[U];ae<32?(Z=V<<ae|K>>>32-ae,he=K<<ae|V>>>32-ae):(Z=K<<ae-32|V>>>64-ae,he=V<<ae-32|K>>>64-ae);var re=h[f[U]];re.high=Z,re.low=he}var le=h[0],ce=x[0];le.high=ce.high,le.low=ce.low;for(var M=0;M<5;M++)for(var ee=0;ee<5;ee++){var U=M+5*ee,B=x[U],De=h[U],be=h[(M+1)%5+5*ee],qe=h[(M+2)%5+5*ee];B.high=De.high^~be.high&qe.high,B.low=De.low^~be.low&qe.low}var B=x[0],Re=m[N];B.high^=Re.high,B.low^=Re.low}},"_doProcessBlock"),_doFinalize:s(function(){var g=this._data,y=g.words,x=this._nDataBytes*8,b=g.sigBytes*8,E=this.blockSize*32;y[b>>>5]|=1<<24-b%32,y[(t.ceil((b+1)/E)*E>>>5)-1]|=128,g.sigBytes=y.length*4,this._process();for(var _=this._state,k=this.cfg.outputLength/8,B=k/8,N=[],M=0;M<B;M++){var Z=_[M],he=Z.high,ee=Z.low;he=(he<<8|he>>>24)&16711935|(he<<24|he>>>8)&4278255360,ee=(ee<<8|ee>>>24)&16711935|(ee<<24|ee>>>8)&4278255360,N.push(ee),N.push(he)}return new i.init(N,k)},"_doFinalize"),clone:s(function(){for(var g=o.clone.call(this),y=g._state=this._state.slice(0),x=0;x<25;x++)y[x]=y[x].clone();return g},"clone")});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)}(Math),e.SHA3})});var Sge=H((pN,_ge)=>{d();(function(e,t){typeof pN=="object"?_ge.exports=pN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(pN,function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,l=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),m=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o.extend({_doReset:s(function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:s(function(k,B){for(var N=0;N<16;N++){var M=B+N,Z=k[M];k[M]=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360}var he=this._hash.words,ee=m.words,G=h.words,q=l.words,ie=c.words,z=u.words,j=f.words,U,V,K,ae,re,le,ce,De,be,qe;le=U=he[0],ce=V=he[1],De=K=he[2],be=ae=he[3],qe=re=he[4];for(var Re,N=0;N<80;N+=1)Re=U+k[B+q[N]]|0,N<16?Re+=g(V,K,ae)+ee[0]:N<32?Re+=y(V,K,ae)+ee[1]:N<48?Re+=x(V,K,ae)+ee[2]:N<64?Re+=b(V,K,ae)+ee[3]:Re+=E(V,K,ae)+ee[4],Re=Re|0,Re=_(Re,z[N]),Re=Re+re|0,U=re,re=ae,ae=_(K,10),K=V,V=Re,Re=le+k[B+ie[N]]|0,N<16?Re+=E(ce,De,be)+G[0]:N<32?Re+=b(ce,De,be)+G[1]:N<48?Re+=x(ce,De,be)+G[2]:N<64?Re+=y(ce,De,be)+G[3]:Re+=g(ce,De,be)+G[4],Re=Re|0,Re=_(Re,j[N]),Re=Re+qe|0,le=qe,qe=be,be=_(De,10),De=ce,ce=Re;Re=he[1]+K+be|0,he[1]=he[2]+ae+qe|0,he[2]=he[3]+re+le|0,he[3]=he[4]+U+ce|0,he[4]=he[0]+V+De|0,he[0]=Re},"_doProcessBlock"),_doFinalize:s(function(){var k=this._data,B=k.words,N=this._nDataBytes*8,M=k.sigBytes*8;B[M>>>5]|=128<<24-M%32,B[(M+64>>>9<<4)+14]=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360,k.sigBytes=(B.length+1)*4,this._process();for(var Z=this._hash,he=Z.words,ee=0;ee<5;ee++){var G=he[ee];he[ee]=(G<<8|G>>>24)&16711935|(G<<24|G>>>8)&4278255360}return Z},"_doFinalize"),clone:s(function(){var k=o.clone.call(this);return k._hash=this._hash.clone(),k},"clone")});function g(k,B,N){return k^B^N}s(g,"f1");function y(k,B,N){return k&B|~k&N}s(y,"f2");function x(k,B,N){return(k|~B)^N}s(x,"f3");function b(k,B,N){return k&N|B&~N}s(b,"f4");function E(k,B,N){return k^(B|~N)}s(E,"f5");function _(k,B){return k<<B|k>>>32-B}s(_,"rotl"),r.RIPEMD160=o._createHelper(p),r.HmacRIPEMD160=o._createHmacHelper(p)}(Math),e.RIPEMD160})});var AN=H((gN,Rge)=>{d();(function(e,t){typeof gN=="object"?Rge.exports=gN=t(ki()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(gN,function(e){(function(){var t=e,r=t.lib,n=r.Base,i=t.enc,o=i.Utf8,a=t.algo,l=a.HMAC=n.extend({init:s(function(c,u){c=this._hasher=new c.init,typeof u=="string"&&(u=o.parse(u));var f=c.blockSize,m=f*4;u.sigBytes>m&&(u=c.finalize(u)),u.clamp();for(var h=this._oKey=u.clone(),p=this._iKey=u.clone(),g=h.words,y=p.words,x=0;x<f;x++)g[x]^=1549556828,y[x]^=909522486;h.sigBytes=p.sigBytes=m,this.reset()},"init"),reset:s(function(){var c=this._hasher;c.reset(),c.update(this._iKey)},"reset"),update:s(function(c){return this._hasher.update(c),this},"update"),finalize:s(function(c){var u=this._hasher,f=u.finalize(c);u.reset();var m=u.finalize(this._oKey.clone().concat(f));return m},"finalize")})})()})});var Bge=H((yN,kge)=>{d();(function(e,t,r){typeof yN=="object"?kge.exports=yN=t(ki(),uN(),AN()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],t):t(e.CryptoJS)})(yN,function(e){return function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.SHA256,l=o.HMAC,c=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:25e4}),init:s(function(u){this.cfg=this.cfg.extend(u)},"init"),compute:s(function(u,f){for(var m=this.cfg,h=l.create(m.hasher,u),p=i.create(),g=i.create([1]),y=p.words,x=g.words,b=m.keySize,E=m.iterations;y.length<b;){var _=h.update(f).finalize(g);h.reset();for(var k=_.words,B=k.length,N=_,M=1;M<E;M++){N=h.finalize(N),h.reset();for(var Z=N.words,he=0;he<B;he++)k[he]^=Z[he]}p.concat(_),x[0]++}return p.sigBytes=b*4,p},"compute")});t.PBKDF2=function(u,f,m){return c.create(m).compute(u,f)}}(),e.PBKDF2})});var X1=H((CN,Dge)=>{d();(function(e,t,r){typeof CN=="object"?Dge.exports=CN=t(ki(),uJ(),AN()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(CN,function(e){return function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,l=o.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:1}),init:s(function(c){this.cfg=this.cfg.extend(c)},"init"),compute:s(function(c,u){for(var f,m=this.cfg,h=m.hasher.create(),p=i.create(),g=p.words,y=m.keySize,x=m.iterations;g.length<y;){f&&h.update(f),f=h.update(c).finalize(u),h.reset();for(var b=1;b<x;b++)f=h.finalize(f),h.reset();p.concat(f)}return p.sigBytes=y*4,p},"compute")});t.EvpKDF=function(c,u,f){return l.create(f).compute(c,u)}}(),e.EvpKDF})});var sl=H((xN,Pge)=>{d();(function(e,t,r){typeof xN=="object"?Pge.exports=xN=t(ki(),X1()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(xN,function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,l=r.enc,c=l.Utf8,u=l.Base64,f=r.algo,m=f.EvpKDF,h=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:s(function(G,q){return this.create(this._ENC_XFORM_MODE,G,q)},"createEncryptor"),createDecryptor:s(function(G,q){return this.create(this._DEC_XFORM_MODE,G,q)},"createDecryptor"),init:s(function(G,q,ie){this.cfg=this.cfg.extend(ie),this._xformMode=G,this._key=q,this.reset()},"init"),reset:s(function(){a.reset.call(this),this._doReset()},"reset"),process:s(function(G){return this._append(G),this._process()},"process"),finalize:s(function(G){G&&this._append(G);var q=this._doFinalize();return q},"finalize"),keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function G(q){return typeof q=="string"?ee:M}return s(G,"selectCipherStrategy"),function(q){return{encrypt:s(function(ie,z,j){return G(z).encrypt(q,ie,z,j)},"encrypt"),decrypt:s(function(ie,z,j){return G(z).decrypt(q,ie,z,j)},"decrypt")}}}()}),p=n.StreamCipher=h.extend({_doFinalize:s(function(){var G=this._process(!0);return G},"_doFinalize"),blockSize:1}),g=r.mode={},y=n.BlockCipherMode=i.extend({createEncryptor:s(function(G,q){return this.Encryptor.create(G,q)},"createEncryptor"),createDecryptor:s(function(G,q){return this.Decryptor.create(G,q)},"createDecryptor"),init:s(function(G,q){this._cipher=G,this._iv=q},"init")}),x=g.CBC=function(){var G=y.extend();G.Encryptor=G.extend({processBlock:s(function(ie,z){var j=this._cipher,U=j.blockSize;q.call(this,ie,z,U),j.encryptBlock(ie,z),this._prevBlock=ie.slice(z,z+U)},"processBlock")}),G.Decryptor=G.extend({processBlock:s(function(ie,z){var j=this._cipher,U=j.blockSize,V=ie.slice(z,z+U);j.decryptBlock(ie,z),q.call(this,ie,z,U),this._prevBlock=V},"processBlock")});function q(ie,z,j){var U,V=this._iv;V?(U=V,this._iv=t):U=this._prevBlock;for(var K=0;K<j;K++)ie[z+K]^=U[K]}return s(q,"xorBlock"),G}(),b=r.pad={},E=b.Pkcs7={pad:s(function(G,q){for(var ie=q*4,z=ie-G.sigBytes%ie,j=z<<24|z<<16|z<<8|z,U=[],V=0;V<z;V+=4)U.push(j);var K=o.create(U,z);G.concat(K)},"pad"),unpad:s(function(G){var q=G.words[G.sigBytes-1>>>2]&255;G.sigBytes-=q},"unpad")},_=n.BlockCipher=h.extend({cfg:h.cfg.extend({mode:x,padding:E}),reset:s(function(){var G;h.reset.call(this);var q=this.cfg,ie=q.iv,z=q.mode;this._xformMode==this._ENC_XFORM_MODE?G=z.createEncryptor:(G=z.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==G?this._mode.init(this,ie&&ie.words):(this._mode=G.call(z,this,ie&&ie.words),this._mode.__creator=G)},"reset"),_doProcessBlock:s(function(G,q){this._mode.processBlock(G,q)},"_doProcessBlock"),_doFinalize:s(function(){var G,q=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(q.pad(this._data,this.blockSize),G=this._process(!0)):(G=this._process(!0),q.unpad(G)),G},"_doFinalize"),blockSize:128/32}),k=n.CipherParams=i.extend({init:s(function(G){this.mixIn(G)},"init"),toString:s(function(G){return(G||this.formatter).stringify(this)},"toString")}),B=r.format={},N=B.OpenSSL={stringify:s(function(G){var q,ie=G.ciphertext,z=G.salt;return z?q=o.create([1398893684,1701076831]).concat(z).concat(ie):q=ie,q.toString(u)},"stringify"),parse:s(function(G){var q,ie=u.parse(G),z=ie.words;return z[0]==1398893684&&z[1]==1701076831&&(q=o.create(z.slice(2,4)),z.splice(0,4),ie.sigBytes-=16),k.create({ciphertext:ie,salt:q})},"parse")},M=n.SerializableCipher=i.extend({cfg:i.extend({format:N}),encrypt:s(function(G,q,ie,z){z=this.cfg.extend(z);var j=G.createEncryptor(ie,z),U=j.finalize(q),V=j.cfg;return k.create({ciphertext:U,key:ie,iv:V.iv,algorithm:G,mode:V.mode,padding:V.padding,blockSize:G.blockSize,formatter:z.format})},"encrypt"),decrypt:s(function(G,q,ie,z){z=this.cfg.extend(z),q=this._parse(q,z.format);var j=G.createDecryptor(ie,z).finalize(q.ciphertext);return j},"decrypt"),_parse:s(function(G,q){return typeof G=="string"?q.parse(G,this):G},"_parse")}),Z=r.kdf={},he=Z.OpenSSL={execute:s(function(G,q,ie,z,j){if(z||(z=o.random(64/8)),j)var U=m.create({keySize:q+ie,hasher:j}).compute(G,z);else var U=m.create({keySize:q+ie}).compute(G,z);var V=o.create(U.words.slice(q),ie*4);return U.sigBytes=q*4,k.create({key:U,iv:V,salt:z})},"execute")},ee=n.PasswordBasedCipher=M.extend({cfg:M.cfg.extend({kdf:he}),encrypt:s(function(G,q,ie,z){z=this.cfg.extend(z);var j=z.kdf.execute(ie,G.keySize,G.ivSize,z.salt,z.hasher);z.iv=j.iv;var U=M.encrypt.call(this,G,q,j.key,z);return U.mixIn(j),U},"encrypt"),decrypt:s(function(G,q,ie,z){z=this.cfg.extend(z),q=this._parse(q,z.format);var j=z.kdf.execute(ie,G.keySize,G.ivSize,q.salt,z.hasher);z.iv=j.iv;var U=M.decrypt.call(this,G,q,j.key,z);return U},"decrypt")})}()})});var Lge=H((vN,Nge)=>{d();(function(e,t,r){typeof vN=="object"?Nge.exports=vN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(vN,function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:s(function(n,i){var o=this._cipher,a=o.blockSize;r.call(this,n,i,a,o),this._prevBlock=n.slice(i,i+a)},"processBlock")}),t.Decryptor=t.extend({processBlock:s(function(n,i){var o=this._cipher,a=o.blockSize,l=n.slice(i,i+a);r.call(this,n,i,a,o),this._prevBlock=l},"processBlock")});function r(n,i,o,a){var l,c=this._iv;c?(l=c.slice(0),this._iv=void 0):l=this._prevBlock,a.encryptBlock(l,0);for(var u=0;u<o;u++)n[i+u]^=l[u]}return s(r,"generateKeystreamAndEncrypt"),t}(),e.mode.CFB})});var Mge=H((bN,Fge)=>{d();(function(e,t,r){typeof bN=="object"?Fge.exports=bN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(bN,function(e){return e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:s(function(n,i){var o=this._cipher,a=o.blockSize,l=this._iv,c=this._counter;l&&(c=this._counter=l.slice(0),this._iv=void 0);var u=c.slice(0);o.encryptBlock(u,0),c[a-1]=c[a-1]+1|0;for(var f=0;f<a;f++)n[i+f]^=u[f]},"processBlock")});return t.Decryptor=r,t}(),e.mode.CTR})});var Oge=H((EN,Qge)=>{d();(function(e,t,r){typeof EN=="object"?Qge.exports=EN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(EN,function(e){return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(o){if((o>>24&255)===255){var a=o>>16&255,l=o>>8&255,c=o&255;a===255?(a=0,l===255?(l=0,c===255?c=0:++c):++l):++a,o=0,o+=a<<16,o+=l<<8,o+=c}else o+=1<<24;return o}s(r,"incWord");function n(o){return(o[0]=r(o[0]))===0&&(o[1]=r(o[1])),o}s(n,"incCounter");var i=t.Encryptor=t.extend({processBlock:s(function(o,a){var l=this._cipher,c=l.blockSize,u=this._iv,f=this._counter;u&&(f=this._counter=u.slice(0),this._iv=void 0),n(f);var m=f.slice(0);l.encryptBlock(m,0);for(var h=0;h<c;h++)o[a+h]^=m[h]},"processBlock")});return t.Decryptor=i,t}(),e.mode.CTRGladman})});var qge=H((IN,Uge)=>{d();(function(e,t,r){typeof IN=="object"?Uge.exports=IN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(IN,function(e){return e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:s(function(n,i){var o=this._cipher,a=o.blockSize,l=this._iv,c=this._keystream;l&&(c=this._keystream=l.slice(0),this._iv=void 0),o.encryptBlock(c,0);for(var u=0;u<a;u++)n[i+u]^=c[u]},"processBlock")});return t.Decryptor=r,t}(),e.mode.OFB})});var Gge=H((TN,Wge)=>{d();(function(e,t,r){typeof TN=="object"?Wge.exports=TN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(TN,function(e){return e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:s(function(r,n){this._cipher.encryptBlock(r,n)},"processBlock")}),t.Decryptor=t.extend({processBlock:s(function(r,n){this._cipher.decryptBlock(r,n)},"processBlock")}),t}(),e.mode.ECB})});var jge=H((wN,Hge)=>{d();(function(e,t,r){typeof wN=="object"?Hge.exports=wN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(wN,function(e){return e.pad.AnsiX923={pad:s(function(t,r){var n=t.sigBytes,i=r*4,o=i-n%i,a=n+o-1;t.clamp(),t.words[a>>>2]|=o<<24-a%4*8,t.sigBytes+=o},"pad"),unpad:s(function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r},"unpad")},e.pad.Ansix923})});var $ge=H((_N,Vge)=>{d();(function(e,t,r){typeof _N=="object"?Vge.exports=_N=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(_N,function(e){return e.pad.Iso10126={pad:s(function(t,r){var n=r*4,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},"pad"),unpad:s(function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r},"unpad")},e.pad.Iso10126})});var Yge=H((SN,zge)=>{d();(function(e,t,r){typeof SN=="object"?zge.exports=SN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(SN,function(e){return e.pad.Iso97971={pad:s(function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},"pad"),unpad:s(function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--},"unpad")},e.pad.Iso97971})});var Jge=H((RN,Kge)=>{d();(function(e,t,r){typeof RN=="object"?Kge.exports=RN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(RN,function(e){return e.pad.ZeroPadding={pad:s(function(t,r){var n=r*4;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},"pad"),unpad:s(function(t){for(var r=t.words,n=t.sigBytes-1,n=t.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}},"unpad")},e.pad.ZeroPadding})});var Zge=H((kN,Xge)=>{d();(function(e,t,r){typeof kN=="object"?Xge.exports=kN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(kN,function(e){return e.pad.NoPadding={pad:s(function(){},"pad"),unpad:s(function(){},"unpad")},e.pad.NoPadding})});var t1e=H((BN,e1e)=>{d();(function(e,t,r){typeof BN=="object"?e1e.exports=BN=t(ki(),sl()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(BN,function(e){return function(t){var r=e,n=r.lib,i=n.CipherParams,o=r.enc,a=o.Hex,l=r.format,c=l.Hex={stringify:s(function(u){return u.ciphertext.toString(a)},"stringify"),parse:s(function(u){var f=a.parse(u);return i.create({ciphertext:f})},"parse")}}(),e.format.Hex})});var n1e=H((DN,r1e)=>{d();(function(e,t,r){typeof DN=="object"?r1e.exports=DN=t(ki(),t5(),r5(),X1(),sl()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(DN,function(e){return function(){var t=e,r=t.lib,n=r.BlockCipher,i=t.algo,o=[],a=[],l=[],c=[],u=[],f=[],m=[],h=[],p=[],g=[];(function(){for(var b=[],E=0;E<256;E++)E<128?b[E]=E<<1:b[E]=E<<1^283;for(var _=0,k=0,E=0;E<256;E++){var B=k^k<<1^k<<2^k<<3^k<<4;B=B>>>8^B&255^99,o[_]=B,a[B]=_;var N=b[_],M=b[N],Z=b[M],he=b[B]*257^B*16843008;l[_]=he<<24|he>>>8,c[_]=he<<16|he>>>16,u[_]=he<<8|he>>>24,f[_]=he;var he=Z*16843009^M*65537^N*257^_*16843008;m[B]=he<<24|he>>>8,h[B]=he<<16|he>>>16,p[B]=he<<8|he>>>24,g[B]=he,_?(_=N^b[b[b[Z^N]]],k^=b[b[k]]):_=k=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],x=i.AES=n.extend({_doReset:s(function(){var b;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var E=this._keyPriorReset=this._key,_=E.words,k=E.sigBytes/4,B=this._nRounds=k+6,N=(B+1)*4,M=this._keySchedule=[],Z=0;Z<N;Z++)Z<k?M[Z]=_[Z]:(b=M[Z-1],Z%k?k>6&&Z%k==4&&(b=o[b>>>24]<<24|o[b>>>16&255]<<16|o[b>>>8&255]<<8|o[b&255]):(b=b<<8|b>>>24,b=o[b>>>24]<<24|o[b>>>16&255]<<16|o[b>>>8&255]<<8|o[b&255],b^=y[Z/k|0]<<24),M[Z]=M[Z-k]^b);for(var he=this._invKeySchedule=[],ee=0;ee<N;ee++){var Z=N-ee;if(ee%4)var b=M[Z];else var b=M[Z-4];ee<4||Z<=4?he[ee]=b:he[ee]=m[o[b>>>24]]^h[o[b>>>16&255]]^p[o[b>>>8&255]]^g[o[b&255]]}}},"_doReset"),encryptBlock:s(function(b,E){this._doCryptBlock(b,E,this._keySchedule,l,c,u,f,o)},"encryptBlock"),decryptBlock:s(function(b,E){var _=b[E+1];b[E+1]=b[E+3],b[E+3]=_,this._doCryptBlock(b,E,this._invKeySchedule,m,h,p,g,a);var _=b[E+1];b[E+1]=b[E+3],b[E+3]=_},"decryptBlock"),_doCryptBlock:s(function(b,E,_,k,B,N,M,Z){for(var he=this._nRounds,ee=b[E]^_[0],G=b[E+1]^_[1],q=b[E+2]^_[2],ie=b[E+3]^_[3],z=4,j=1;j<he;j++){var U=k[ee>>>24]^B[G>>>16&255]^N[q>>>8&255]^M[ie&255]^_[z++],V=k[G>>>24]^B[q>>>16&255]^N[ie>>>8&255]^M[ee&255]^_[z++],K=k[q>>>24]^B[ie>>>16&255]^N[ee>>>8&255]^M[G&255]^_[z++],ae=k[ie>>>24]^B[ee>>>16&255]^N[G>>>8&255]^M[q&255]^_[z++];ee=U,G=V,q=K,ie=ae}var U=(Z[ee>>>24]<<24|Z[G>>>16&255]<<16|Z[q>>>8&255]<<8|Z[ie&255])^_[z++],V=(Z[G>>>24]<<24|Z[q>>>16&255]<<16|Z[ie>>>8&255]<<8|Z[ee&255])^_[z++],K=(Z[q>>>24]<<24|Z[ie>>>16&255]<<16|Z[ee>>>8&255]<<8|Z[G&255])^_[z++],ae=(Z[ie>>>24]<<24|Z[ee>>>16&255]<<16|Z[G>>>8&255]<<8|Z[q&255])^_[z++];b[E]=U,b[E+1]=V,b[E+2]=K,b[E+3]=ae},"_doCryptBlock"),keySize:256/32});t.AES=n._createHelper(x)}(),e.AES})});var o1e=H((PN,i1e)=>{d();(function(e,t,r){typeof PN=="object"?i1e.exports=PN=t(ki(),t5(),r5(),X1(),sl()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(PN,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=r.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=o.DES=i.extend({_doReset:s(function(){for(var y=this._key,x=y.words,b=[],E=0;E<56;E++){var _=a[E]-1;b[E]=x[_>>>5]>>>31-_%32&1}for(var k=this._subKeys=[],B=0;B<16;B++){for(var N=k[B]=[],M=c[B],E=0;E<24;E++)N[E/6|0]|=b[(l[E]-1+M)%28]<<31-E%6,N[4+(E/6|0)]|=b[28+(l[E+24]-1+M)%28]<<31-E%6;N[0]=N[0]<<1|N[0]>>>31;for(var E=1;E<7;E++)N[E]=N[E]>>>(E-1)*4+3;N[7]=N[7]<<5|N[7]>>>27}for(var Z=this._invSubKeys=[],E=0;E<16;E++)Z[E]=k[15-E]},"_doReset"),encryptBlock:s(function(y,x){this._doCryptBlock(y,x,this._subKeys)},"encryptBlock"),decryptBlock:s(function(y,x){this._doCryptBlock(y,x,this._invSubKeys)},"decryptBlock"),_doCryptBlock:s(function(y,x,b){this._lBlock=y[x],this._rBlock=y[x+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var E=0;E<16;E++){for(var _=b[E],k=this._lBlock,B=this._rBlock,N=0,M=0;M<8;M++)N|=u[M][((B^_[M])&f[M])>>>0];this._lBlock=B,this._rBlock=k^N}var Z=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Z,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),y[x]=this._lBlock,y[x+1]=this._rBlock},"_doCryptBlock"),keySize:64/32,ivSize:64/32,blockSize:64/32});function h(y,x){var b=(this._lBlock>>>y^this._rBlock)&x;this._rBlock^=b,this._lBlock^=b<<y}s(h,"exchangeLR");function p(y,x){var b=(this._rBlock>>>y^this._lBlock)&x;this._lBlock^=b,this._rBlock^=b<<y}s(p,"exchangeRL"),t.DES=i._createHelper(m);var g=o.TripleDES=i.extend({_doReset:s(function(){var y=this._key,x=y.words;if(x.length!==2&&x.length!==4&&x.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var b=x.slice(0,2),E=x.length<4?x.slice(0,2):x.slice(2,4),_=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=m.createEncryptor(n.create(b)),this._des2=m.createEncryptor(n.create(E)),this._des3=m.createEncryptor(n.create(_))},"_doReset"),encryptBlock:s(function(y,x){this._des1.encryptBlock(y,x),this._des2.decryptBlock(y,x),this._des3.encryptBlock(y,x)},"encryptBlock"),decryptBlock:s(function(y,x){this._des3.decryptBlock(y,x),this._des2.encryptBlock(y,x),this._des1.decryptBlock(y,x)},"decryptBlock"),keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=i._createHelper(g)}(),e.TripleDES})});var a1e=H((NN,s1e)=>{d();(function(e,t,r){typeof NN=="object"?s1e.exports=NN=t(ki(),t5(),r5(),X1(),sl()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(NN,function(e){return function(){var t=e,r=t.lib,n=r.StreamCipher,i=t.algo,o=i.RC4=n.extend({_doReset:s(function(){for(var c=this._key,u=c.words,f=c.sigBytes,m=this._S=[],h=0;h<256;h++)m[h]=h;for(var h=0,p=0;h<256;h++){var g=h%f,y=u[g>>>2]>>>24-g%4*8&255;p=(p+m[h]+y)%256;var x=m[h];m[h]=m[p],m[p]=x}this._i=this._j=0},"_doReset"),_doProcessBlock:s(function(c,u){c[u]^=a.call(this)},"_doProcessBlock"),keySize:256/32,ivSize:0});function a(){for(var c=this._S,u=this._i,f=this._j,m=0,h=0;h<4;h++){u=(u+1)%256,f=(f+c[u])%256;var p=c[u];c[u]=c[f],c[f]=p,m|=c[(c[u]+c[f])%256]<<24-h*8}return this._i=u,this._j=f,m}s(a,"generateKeystreamWord"),t.RC4=n._createHelper(o);var l=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:s(function(){o._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)a.call(this)},"_doReset")});t.RC4Drop=n._createHelper(l)}(),e.RC4})});var c1e=H((LN,l1e)=>{d();(function(e,t,r){typeof LN=="object"?l1e.exports=LN=t(ki(),t5(),r5(),X1(),sl()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(LN,function(e){return function(){var t=e,r=t.lib,n=r.StreamCipher,i=t.algo,o=[],a=[],l=[],c=i.Rabbit=n.extend({_doReset:s(function(){for(var f=this._key.words,m=this.cfg.iv,h=0;h<4;h++)f[h]=(f[h]<<8|f[h]>>>24)&16711935|(f[h]<<24|f[h]>>>8)&4278255360;var p=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],g=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var h=0;h<4;h++)u.call(this);for(var h=0;h<8;h++)g[h]^=p[h+4&7];if(m){var y=m.words,x=y[0],b=y[1],E=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,_=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,k=E>>>16|_&4294901760,B=_<<16|E&65535;g[0]^=E,g[1]^=k,g[2]^=_,g[3]^=B,g[4]^=E,g[5]^=k,g[6]^=_,g[7]^=B;for(var h=0;h<4;h++)u.call(this)}},"_doReset"),_doProcessBlock:s(function(f,m){var h=this._X;u.call(this),o[0]=h[0]^h[5]>>>16^h[3]<<16,o[1]=h[2]^h[7]>>>16^h[5]<<16,o[2]=h[4]^h[1]>>>16^h[7]<<16,o[3]=h[6]^h[3]>>>16^h[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,f[m+p]^=o[p]},"_doProcessBlock"),blockSize:128/32,ivSize:64/32});function u(){for(var f=this._X,m=this._C,h=0;h<8;h++)a[h]=m[h];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<a[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<a[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<a[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<a[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<a[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<a[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<a[6]>>>0?1:0)|0,this._b=m[7]>>>0<a[7]>>>0?1:0;for(var h=0;h<8;h++){var p=f[h]+m[h],g=p&65535,y=p>>>16,x=((g*g>>>17)+g*y>>>15)+y*y,b=((p&4294901760)*p|0)+((p&65535)*p|0);l[h]=x^b}f[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,f[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,f[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,f[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,f[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,f[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,f[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,f[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}s(u,"nextState"),t.Rabbit=n._createHelper(c)}(),e.Rabbit})});var f1e=H((FN,u1e)=>{d();(function(e,t,r){typeof FN=="object"?u1e.exports=FN=t(ki(),t5(),r5(),X1(),sl()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(FN,function(e){return function(){var t=e,r=t.lib,n=r.StreamCipher,i=t.algo,o=[],a=[],l=[],c=i.RabbitLegacy=n.extend({_doReset:s(function(){var f=this._key.words,m=this.cfg.iv,h=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],p=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var g=0;g<4;g++)u.call(this);for(var g=0;g<8;g++)p[g]^=h[g+4&7];if(m){var y=m.words,x=y[0],b=y[1],E=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,_=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,k=E>>>16|_&4294901760,B=_<<16|E&65535;p[0]^=E,p[1]^=k,p[2]^=_,p[3]^=B,p[4]^=E,p[5]^=k,p[6]^=_,p[7]^=B;for(var g=0;g<4;g++)u.call(this)}},"_doReset"),_doProcessBlock:s(function(f,m){var h=this._X;u.call(this),o[0]=h[0]^h[5]>>>16^h[3]<<16,o[1]=h[2]^h[7]>>>16^h[5]<<16,o[2]=h[4]^h[1]>>>16^h[7]<<16,o[3]=h[6]^h[3]>>>16^h[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,f[m+p]^=o[p]},"_doProcessBlock"),blockSize:128/32,ivSize:64/32});function u(){for(var f=this._X,m=this._C,h=0;h<8;h++)a[h]=m[h];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<a[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<a[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<a[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<a[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<a[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<a[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<a[6]>>>0?1:0)|0,this._b=m[7]>>>0<a[7]>>>0?1:0;for(var h=0;h<8;h++){var p=f[h]+m[h],g=p&65535,y=p>>>16,x=((g*g>>>17)+g*y>>>15)+y*y,b=((p&4294901760)*p|0)+((p&65535)*p|0);l[h]=x^b}f[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,f[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,f[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,f[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,f[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,f[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,f[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,f[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}s(u,"nextState"),t.RabbitLegacy=n._createHelper(c)}(),e.RabbitLegacy})});var m1e=H((MN,d1e)=>{d();(function(e,t,r){typeof MN=="object"?d1e.exports=MN=t(ki(),t5(),r5(),X1(),sl()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(MN,function(e){return function(){var t=e,r=t.lib,n=r.BlockCipher,i=t.algo;let o=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],l=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(g,y){let x=y>>24&255,b=y>>16&255,E=y>>8&255,_=y&255,k=g.sbox[0][x]+g.sbox[1][b];return k=k^g.sbox[2][E],k=k+g.sbox[3][_],k}s(u,"F");function f(g,y,x){let b=y,E=x,_;for(let k=0;k<o;++k)b=b^g.pbox[k],E=u(g,b)^E,_=b,b=E,E=_;return _=b,b=E,E=_,E=E^g.pbox[o],b=b^g.pbox[o+1],{left:b,right:E}}s(f,"BlowFish_Encrypt");function m(g,y,x){let b=y,E=x,_;for(let k=o+1;k>1;--k)b=b^g.pbox[k],E=u(g,b)^E,_=b,b=E,E=_;return _=b,b=E,E=_,E=E^g.pbox[1],b=b^g.pbox[0],{left:b,right:E}}s(m,"BlowFish_Decrypt");function h(g,y,x){for(let B=0;B<4;B++){g.sbox[B]=[];for(let N=0;N<256;N++)g.sbox[B][N]=l[B][N]}let b=0;for(let B=0;B<o+2;B++)g.pbox[B]=a[B]^y[b],b++,b>=x&&(b=0);let E=0,_=0,k=0;for(let B=0;B<o+2;B+=2)k=f(g,E,_),E=k.left,_=k.right,g.pbox[B]=E,g.pbox[B+1]=_;for(let B=0;B<4;B++)for(let N=0;N<256;N+=2)k=f(g,E,_),E=k.left,_=k.right,g.sbox[B][N]=E,g.sbox[B][N+1]=_;return!0}s(h,"BlowFishInit");var p=i.Blowfish=n.extend({_doReset:s(function(){if(this._keyPriorReset!==this._key){var g=this._keyPriorReset=this._key,y=g.words,x=g.sigBytes/4;h(c,y,x)}},"_doReset"),encryptBlock:s(function(g,y){var x=f(c,g[y],g[y+1]);g[y]=x.left,g[y+1]=x.right},"encryptBlock"),decryptBlock:s(function(g,y){var x=m(c,g[y],g[y+1]);g[y]=x.left,g[y+1]=x.right},"decryptBlock"),blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(p)}(),e.Blowfish})});var n5=H((QN,h1e)=>{d();(function(e,t,r){typeof QN=="object"?h1e.exports=QN=t(ki(),q7(),fge(),mge(),t5(),gge(),r5(),uJ(),uN(),vge(),fJ(),Ige(),wge(),Sge(),AN(),Bge(),X1(),sl(),Lge(),Mge(),Oge(),qge(),Gge(),jge(),$ge(),Yge(),Jge(),Zge(),t1e(),n1e(),o1e(),a1e(),c1e(),f1e(),m1e()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],t):e.CryptoJS=t(e.CryptoJS)})(QN,function(e){return e})});var DI=H(Lc=>{"use strict";d();Object.defineProperty(Lc,"__esModule",{value:!0});Lc.stringArray=Lc.array=Lc.func=Lc.error=Lc.number=Lc.string=Lc.boolean=void 0;function mrt(e){return e===!0||e===!1}s(mrt,"boolean");Lc.boolean=mrt;function S2e(e){return typeof e=="string"||e instanceof String}s(S2e,"string");Lc.string=S2e;function hrt(e){return typeof e=="number"||e instanceof Number}s(hrt,"number");Lc.number=hrt;function prt(e){return e instanceof Error}s(prt,"error");Lc.error=prt;function grt(e){return typeof e=="function"}s(grt,"func");Lc.func=grt;function R2e(e){return Array.isArray(e)}s(R2e,"array");Lc.array=R2e;function Art(e){return R2e(e)&&e.every(t=>S2e(t))}s(Art,"stringArray");Lc.stringArray=Art});var xX=H(Zr=>{"use strict";d();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.Message=Zr.NotificationType9=Zr.NotificationType8=Zr.NotificationType7=Zr.NotificationType6=Zr.NotificationType5=Zr.NotificationType4=Zr.NotificationType3=Zr.NotificationType2=Zr.NotificationType1=Zr.NotificationType0=Zr.NotificationType=Zr.RequestType9=Zr.RequestType8=Zr.RequestType7=Zr.RequestType6=Zr.RequestType5=Zr.RequestType4=Zr.RequestType3=Zr.RequestType2=Zr.RequestType1=Zr.RequestType=Zr.RequestType0=Zr.AbstractMessageSignature=Zr.ParameterStructures=Zr.ResponseError=Zr.ErrorCodes=void 0;var zx=DI(),KJ;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(KJ||(Zr.ErrorCodes=KJ={}));var JJ=class e extends Error{static{s(this,"ResponseError")}constructor(t,r,n){super(r),this.code=zx.number(t)?t:KJ.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};Zr.ResponseError=JJ;var eu=class e{static{s(this,"ParameterStructures")}constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};Zr.ParameterStructures=eu;eu.auto=new eu("auto");eu.byPosition=new eu("byPosition");eu.byName=new eu("byName");var ms=class{static{s(this,"AbstractMessageSignature")}constructor(t,r){this.method=t,this.numberOfParams=r}get parameterStructures(){return eu.auto}};Zr.AbstractMessageSignature=ms;var XJ=class extends ms{static{s(this,"RequestType0")}constructor(t){super(t,0)}};Zr.RequestType0=XJ;var ZJ=class extends ms{static{s(this,"RequestType")}constructor(t,r=eu.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Zr.RequestType=ZJ;var eX=class extends ms{static{s(this,"RequestType1")}constructor(t,r=eu.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Zr.RequestType1=eX;var tX=class extends ms{static{s(this,"RequestType2")}constructor(t){super(t,2)}};Zr.RequestType2=tX;var rX=class extends ms{static{s(this,"RequestType3")}constructor(t){super(t,3)}};Zr.RequestType3=rX;var nX=class extends ms{static{s(this,"RequestType4")}constructor(t){super(t,4)}};Zr.RequestType4=nX;var iX=class extends ms{static{s(this,"RequestType5")}constructor(t){super(t,5)}};Zr.RequestType5=iX;var oX=class extends ms{static{s(this,"RequestType6")}constructor(t){super(t,6)}};Zr.RequestType6=oX;var sX=class extends ms{static{s(this,"RequestType7")}constructor(t){super(t,7)}};Zr.RequestType7=sX;var aX=class extends ms{static{s(this,"RequestType8")}constructor(t){super(t,8)}};Zr.RequestType8=aX;var lX=class extends ms{static{s(this,"RequestType9")}constructor(t){super(t,9)}};Zr.RequestType9=lX;var cX=class extends ms{static{s(this,"NotificationType")}constructor(t,r=eu.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Zr.NotificationType=cX;var uX=class extends ms{static{s(this,"NotificationType0")}constructor(t){super(t,0)}};Zr.NotificationType0=uX;var fX=class extends ms{static{s(this,"NotificationType1")}constructor(t,r=eu.auto){super(t,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Zr.NotificationType1=fX;var dX=class extends ms{static{s(this,"NotificationType2")}constructor(t){super(t,2)}};Zr.NotificationType2=dX;var mX=class extends ms{static{s(this,"NotificationType3")}constructor(t){super(t,3)}};Zr.NotificationType3=mX;var hX=class extends ms{static{s(this,"NotificationType4")}constructor(t){super(t,4)}};Zr.NotificationType4=hX;var pX=class extends ms{static{s(this,"NotificationType5")}constructor(t){super(t,5)}};Zr.NotificationType5=pX;var gX=class extends ms{static{s(this,"NotificationType6")}constructor(t){super(t,6)}};Zr.NotificationType6=gX;var AX=class extends ms{static{s(this,"NotificationType7")}constructor(t){super(t,7)}};Zr.NotificationType7=AX;var yX=class extends ms{static{s(this,"NotificationType8")}constructor(t){super(t,8)}};Zr.NotificationType8=yX;var CX=class extends ms{static{s(this,"NotificationType9")}constructor(t){super(t,9)}};Zr.NotificationType9=CX;var k2e;(function(e){function t(i){let o=i;return o&&zx.string(o.method)&&(zx.string(o.id)||zx.number(o.id))}s(t,"isRequest"),e.isRequest=t;function r(i){let o=i;return o&&zx.string(o.method)&&i.id===void 0}s(r,"isNotification"),e.isNotification=r;function n(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(zx.string(o.id)||zx.number(o.id)||o.id===null)}s(n,"isResponse"),e.isResponse=n})(k2e||(Zr.Message=k2e={}))});var bX=H(m5=>{"use strict";d();var B2e;Object.defineProperty(m5,"__esModule",{value:!0});m5.LRUCache=m5.LinkedMap=m5.Touch=void 0;var Fc;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Fc||(m5.Touch=Fc={}));var mL=class{static{s(this,"LinkedMap")}constructor(){this[B2e]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,r=Fc.None){let n=this._map.get(t);if(n)return r!==Fc.None&&this.touch(n,r),n.value}set(t,r,n=Fc.None){let i=this._map.get(t);if(i)i.value=r,n!==Fc.None&&this.touch(i,n);else{switch(i={key:t,value:r,next:void 0,previous:void 0},n){case Fc.None:this.addItemLast(i);break;case Fc.First:this.addItemFirst(i);break;case Fc.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let r=this._map.get(t);if(r)return this._map.delete(t),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,r){let n=this._state,i=this._head;for(;i;){if(r?t.bind(r)(i.value,i.key,this):t(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:s(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}},"next")};return n}values(){let t=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:s(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}},"next")};return n}entries(){let t=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:s(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}},"next")};return n}[(B2e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>t;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let r=t.next,n=t.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}t.next=void 0,t.previous=void 0,this._state++}touch(t,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==Fc.First&&r!==Fc.Last)){if(r===Fc.First){if(t===this._head)return;let n=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(r===Fc.Last){if(t===this._tail)return;let n=t.next,i=t.previous;t===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((r,n)=>{t.push([n,r])}),t}fromJSON(t){this.clear();for(let[r,n]of t)this.set(r,n)}};m5.LinkedMap=mL;var vX=class extends mL{static{s(this,"LRUCache")}constructor(t,r=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,r=Fc.AsNew){return super.get(t,r)}peek(t){return super.get(t,Fc.None)}set(t,r){return super.set(t,r,Fc.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};m5.LRUCache=vX});var P2e=H(hL=>{"use strict";d();Object.defineProperty(hL,"__esModule",{value:!0});hL.Disposable=void 0;var D2e;(function(e){function t(r){return{dispose:r}}s(t,"create"),e.create=t})(D2e||(hL.Disposable=D2e={}))});var h5=H(TX=>{"use strict";d();Object.defineProperty(TX,"__esModule",{value:!0});var EX;function IX(){if(EX===void 0)throw new Error("No runtime abstraction layer installed");return EX}s(IX,"RAL");(function(e){function t(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");EX=r}s(t,"install"),e.install=t})(IX||(IX={}));TX.default=IX});var NI=H(PI=>{"use strict";d();Object.defineProperty(PI,"__esModule",{value:!0});PI.Emitter=PI.Event=void 0;var yrt=h5(),N2e;(function(e){let t={dispose(){}};e.None=function(){return t}})(N2e||(PI.Event=N2e={}));var wX=class{static{s(this,"CallbackList")}add(t,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:s(()=>this.remove(t,r),"dispose")})}remove(t,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===r){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else n=!0;if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let r=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,a=n.length;o<a;o++)try{r.push(n[o].apply(i[o],t))}catch(l){(0,yrt.default)().console.error(l)}return r}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},pL=class e{static{s(this,"Emitter")}constructor(t){this._options=t}get event(){return this._event||(this._event=(t,r,n)=>{this._callbacks||(this._callbacks=new wX),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,r);let i={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(t,r),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};PI.Emitter=pL;pL._noop=function(){}});var yL=H(LI=>{"use strict";d();Object.defineProperty(LI,"__esModule",{value:!0});LI.CancellationTokenSource=LI.CancellationToken=void 0;var Crt=h5(),xrt=DI(),_X=NI(),gL;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:_X.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:_X.Event.None});function t(r){let n=r;return n&&(n===e.None||n===e.Cancelled||xrt.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}s(t,"is"),e.is=t})(gL||(LI.CancellationToken=gL={}));var vrt=Object.freeze(function(e,t){let r=(0,Crt.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),AL=class{static{s(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?vrt:(this._emitter||(this._emitter=new _X.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},SX=class{static{s(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new AL),this._token}cancel(){this._token?this._token.cancel():this._token=gL.Cancelled}dispose(){this._token?this._token instanceof AL&&this._token.dispose():this._token=gL.None}};LI.CancellationTokenSource=SX});var L2e=H(FI=>{"use strict";d();Object.defineProperty(FI,"__esModule",{value:!0});FI.SharedArrayReceiverStrategy=FI.SharedArraySenderStrategy=void 0;var brt=yL(),a_;(function(e){e.Continue=0,e.Cancelled=1})(a_||(a_={}));var RX=class{static{s(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let r=new SharedArrayBuffer(4),n=new Int32Array(r,0,1);n[0]=a_.Continue,this.buffers.set(t.id,r),t.$cancellationData=r}async sendCancellation(t,r){let n=this.buffers.get(r);if(n===void 0)return;let i=new Int32Array(n,0,1);Atomics.store(i,0,a_.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};FI.SharedArraySenderStrategy=RX;var kX=class{static{s(this,"SharedArrayBufferCancellationToken")}constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===a_.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},BX=class{static{s(this,"SharedArrayBufferCancellationTokenSource")}constructor(t){this.token=new kX(t)}cancel(){}dispose(){}},DX=class{static{s(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(t){let r=t.$cancellationData;return r===void 0?new brt.CancellationTokenSource:new BX(r)}};FI.SharedArrayReceiverStrategy=DX});var NX=H(CL=>{"use strict";d();Object.defineProperty(CL,"__esModule",{value:!0});CL.Semaphore=void 0;var Ert=h5(),PX=class{static{s(this,"Semaphore")}constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((r,n)=>{this._waiting.push({thunk:t,resolve:r,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Ert.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=t.thunk();r instanceof Promise?r.then(n=>{this._active--,t.resolve(n),this.runNext()},n=>{this._active--,t.reject(n),this.runNext()}):(this._active--,t.resolve(r),this.runNext())}catch(r){this._active--,t.reject(r),this.runNext()}}};CL.Semaphore=PX});var M2e=H(p5=>{"use strict";d();Object.defineProperty(p5,"__esModule",{value:!0});p5.ReadableStreamMessageReader=p5.AbstractMessageReader=p5.MessageReader=void 0;var FX=h5(),MI=DI(),LX=NI(),Irt=NX(),F2e;(function(e){function t(r){let n=r;return n&&MI.func(n.listen)&&MI.func(n.dispose)&&MI.func(n.onError)&&MI.func(n.onClose)&&MI.func(n.onPartialMessage)}s(t,"is"),e.is=t})(F2e||(p5.MessageReader=F2e={}));var xL=class{static{s(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new LX.Emitter,this.closeEmitter=new LX.Emitter,this.partialMessageEmitter=new LX.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${MI.string(t.message)?t.message:"unknown"}`)}};p5.AbstractMessageReader=xL;var MX;(function(e){function t(r){let n,i,o,a=new Map,l,c=new Map;if(r===void 0||typeof r=="string")n=r??"utf-8";else{if(n=r.charset??"utf-8",r.contentDecoder!==void 0&&(o=r.contentDecoder,a.set(o.name,o)),r.contentDecoders!==void 0)for(let u of r.contentDecoders)a.set(u.name,u);if(r.contentTypeDecoder!==void 0&&(l=r.contentTypeDecoder,c.set(l.name,l)),r.contentTypeDecoders!==void 0)for(let u of r.contentTypeDecoders)c.set(u.name,u)}return l===void 0&&(l=(0,FX.default)().applicationJson.decoder,c.set(l.name,l)),{charset:n,contentDecoder:o,contentDecoders:a,contentTypeDecoder:l,contentTypeDecoders:c}}s(t,"fromOptions"),e.fromOptions=t})(MX||(MX={}));var QX=class extends xL{static{s(this,"ReadableStreamMessageReader")}constructor(t,r){super(),this.readable=t,this.options=MX.fromOptions(r),this.buffer=(0,FX.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new Irt.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let r=this.readable.onData(n=>{this.onData(n)});return this.readable.onError(n=>this.fireError(n)),this.readable.onClose(()=>this.fireClose()),r}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let n=this.buffer.tryReadHeaders(!0);if(!n)return;let i=n.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
${JSON.stringify(Object.fromEntries(n))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let n=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,i=await this.options.contentTypeDecoder.decode(n,this.options);this.callback(i)}).catch(n=>{this.fireError(n)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,FX.default)().timer.setTimeout((t,r)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};p5.ReadableStreamMessageReader=QX});var W2e=H(g5=>{"use strict";d();Object.defineProperty(g5,"__esModule",{value:!0});g5.WriteableStreamMessageWriter=g5.AbstractMessageWriter=g5.MessageWriter=void 0;var Q2e=h5(),l_=DI(),Trt=NX(),O2e=NI(),wrt="Content-Length: ",U2e=`\r
`,q2e;(function(e){function t(r){let n=r;return n&&l_.func(n.dispose)&&l_.func(n.onClose)&&l_.func(n.onError)&&l_.func(n.write)}s(t,"is"),e.is=t})(q2e||(g5.MessageWriter=q2e={}));var vL=class{static{s(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new O2e.Emitter,this.closeEmitter=new O2e.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,r,n){this.errorEmitter.fire([this.asError(t),r,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${l_.string(t.message)?t.message:"unknown"}`)}};g5.AbstractMessageWriter=vL;var OX;(function(e){function t(r){return r===void 0||typeof r=="string"?{charset:r??"utf-8",contentTypeEncoder:(0,Q2e.default)().applicationJson.encoder}:{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,Q2e.default)().applicationJson.encoder}}s(t,"fromOptions"),e.fromOptions=t})(OX||(OX={}));var UX=class extends vL{static{s(this,"WriteableStreamMessageWriter")}constructor(t,r){super(),this.writable=t,this.options=OX.fromOptions(r),this.errorCount=0,this.writeSemaphore=new Trt.Semaphore(1),this.writable.onError(n=>this.fireError(n)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(n=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(n):n).then(n=>{let i=[];return i.push(wrt,n.byteLength.toString(),U2e),i.push(U2e),this.doWrite(t,i,n)},n=>{throw this.fireError(n),n}))}async doWrite(t,r,n){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(n)}catch(i){return this.handleError(i,t),Promise.reject(i)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}end(){this.writable.end()}};g5.WriteableStreamMessageWriter=UX});var G2e=H(bL=>{"use strict";d();Object.defineProperty(bL,"__esModule",{value:!0});bL.AbstractMessageBuffer=void 0;var _rt=13,Srt=10,Rrt=`\r
`,qX=class{static{s(this,"AbstractMessageBuffer")}constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let r=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let r=0,n=0,i=0,o=0;e:for(;n<this._chunks.length;){let u=this._chunks[n];for(i=0;i<u.length;){switch(u[i]){case _rt:switch(r){case 0:r=1;break;case 2:r=3;break;default:r=0}break;case Srt:switch(r){case 1:r=2;break;case 3:r=4,i++;break e;default:r=0}break;default:r=0}i++}o+=u.byteLength,n++}if(r!==4)return;let a=this._read(o+i),l=new Map,c=this.toString(a,"ascii").split(Rrt);if(c.length<2)return l;for(let u=0;u<c.length-2;u++){let f=c[u],m=f.indexOf(":");if(m===-1)throw new Error(`Message header must separate key and value using ':'
${f}`);let h=f.substr(0,m),p=f.substr(m+1).trim();l.set(t?h.toLowerCase():h,p)}return l}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],a=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,a}let r=this.allocNative(t),n=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let a=o.slice(0,t);r.set(a,n),n+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else r.set(o,n),n+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return r}};bL.AbstractMessageBuffer=qX});var z2e=H(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.createMessageConnection=Jn.ConnectionOptions=Jn.MessageStrategy=Jn.CancellationStrategy=Jn.CancellationSenderStrategy=Jn.CancellationReceiverStrategy=Jn.RequestCancellationReceiverStrategy=Jn.IdCancellationReceiverStrategy=Jn.ConnectionStrategy=Jn.ConnectionError=Jn.ConnectionErrors=Jn.LogTraceNotification=Jn.SetTraceNotification=Jn.TraceFormat=Jn.TraceValues=Jn.Trace=Jn.NullLogger=Jn.ProgressType=Jn.ProgressToken=void 0;var H2e=h5(),Ys=DI(),Rn=xX(),j2e=bX(),c_=NI(),WX=yL(),d_;(function(e){e.type=new Rn.NotificationType("$/cancelRequest")})(d_||(d_={}));var GX;(function(e){function t(r){return typeof r=="string"||typeof r=="number"}s(t,"is"),e.is=t})(GX||(Jn.ProgressToken=GX={}));var u_;(function(e){e.type=new Rn.NotificationType("$/progress")})(u_||(u_={}));var HX=class{static{s(this,"ProgressType")}constructor(){}};Jn.ProgressType=HX;var jX;(function(e){function t(r){return Ys.func(r)}s(t,"is"),e.is=t})(jX||(jX={}));Jn.NullLogger=Object.freeze({error:s(()=>{},"error"),warn:s(()=>{},"warn"),info:s(()=>{},"info"),log:s(()=>{},"log")});var ho;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(ho||(Jn.Trace=ho={}));var V2e;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(V2e||(Jn.TraceValues=V2e={}));(function(e){function t(n){if(!Ys.string(n))return e.Off;switch(n=n.toLowerCase(),n){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}s(t,"fromString"),e.fromString=t;function r(n){switch(n){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}s(r,"toString"),e.toString=r})(ho||(Jn.Trace=ho={}));var ef;(function(e){e.Text="text",e.JSON="json"})(ef||(Jn.TraceFormat=ef={}));(function(e){function t(r){return Ys.string(r)?(r=r.toLowerCase(),r==="json"?e.JSON:e.Text):e.Text}s(t,"fromString"),e.fromString=t})(ef||(Jn.TraceFormat=ef={}));var VX;(function(e){e.type=new Rn.NotificationType("$/setTrace")})(VX||(Jn.SetTraceNotification=VX={}));var EL;(function(e){e.type=new Rn.NotificationType("$/logTrace")})(EL||(Jn.LogTraceNotification=EL={}));var f_;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(f_||(Jn.ConnectionErrors=f_={}));var QI=class e extends Error{static{s(this,"ConnectionError")}constructor(t,r){super(r),this.code=t,Object.setPrototypeOf(this,e.prototype)}};Jn.ConnectionError=QI;var $X;(function(e){function t(r){let n=r;return n&&Ys.func(n.cancelUndispatched)}s(t,"is"),e.is=t})($X||(Jn.ConnectionStrategy=$X={}));var IL;(function(e){function t(r){let n=r;return n&&(n.kind===void 0||n.kind==="id")&&Ys.func(n.createCancellationTokenSource)&&(n.dispose===void 0||Ys.func(n.dispose))}s(t,"is"),e.is=t})(IL||(Jn.IdCancellationReceiverStrategy=IL={}));var zX;(function(e){function t(r){let n=r;return n&&n.kind==="request"&&Ys.func(n.createCancellationTokenSource)&&(n.dispose===void 0||Ys.func(n.dispose))}s(t,"is"),e.is=t})(zX||(Jn.RequestCancellationReceiverStrategy=zX={}));var TL;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new WX.CancellationTokenSource}});function t(r){return IL.is(r)||zX.is(r)}s(t,"is"),e.is=t})(TL||(Jn.CancellationReceiverStrategy=TL={}));var wL;(function(e){e.Message=Object.freeze({sendCancellation(r,n){return r.sendNotification(d_.type,{id:n})},cleanup(r){}});function t(r){let n=r;return n&&Ys.func(n.sendCancellation)&&Ys.func(n.cleanup)}s(t,"is"),e.is=t})(wL||(Jn.CancellationSenderStrategy=wL={}));var _L;(function(e){e.Message=Object.freeze({receiver:TL.Message,sender:wL.Message});function t(r){let n=r;return n&&TL.is(n.receiver)&&wL.is(n.sender)}s(t,"is"),e.is=t})(_L||(Jn.CancellationStrategy=_L={}));var SL;(function(e){function t(r){let n=r;return n&&Ys.func(n.handleMessage)}s(t,"is"),e.is=t})(SL||(Jn.MessageStrategy=SL={}));var $2e;(function(e){function t(r){let n=r;return n&&(_L.is(n.cancellationStrategy)||$X.is(n.connectionStrategy)||SL.is(n.messageStrategy))}s(t,"is"),e.is=t})($2e||(Jn.ConnectionOptions=$2e={}));var ih;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(ih||(ih={}));function krt(e,t,r,n){let i=r!==void 0?r:Jn.NullLogger,o=0,a=0,l=0,c="2.0",u,f=new Map,m,h=new Map,p=new Map,g,y=new j2e.LinkedMap,x=new Map,b=new Set,E=new Map,_=ho.Off,k=ef.Text,B,N=ih.New,M=new c_.Emitter,Z=new c_.Emitter,he=new c_.Emitter,ee=new c_.Emitter,G=new c_.Emitter,q=n&&n.cancellationStrategy?n.cancellationStrategy:_L.Message;function ie(ge){if(ge===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+ge.toString()}s(ie,"createRequestQueueKey");function z(ge){return ge===null?"res-unknown-"+(++l).toString():"res-"+ge.toString()}s(z,"createResponseQueueKey");function j(){return"not-"+(++a).toString()}s(j,"createNotificationQueueKey");function U(ge,Me){Rn.Message.isRequest(Me)?ge.set(ie(Me.id),Me):Rn.Message.isResponse(Me)?ge.set(z(Me.id),Me):ge.set(j(),Me)}s(U,"addMessageToQueue");function V(ge){}s(V,"cancelUndispatched");function K(){return N===ih.Listening}s(K,"isListening");function ae(){return N===ih.Closed}s(ae,"isClosed");function re(){return N===ih.Disposed}s(re,"isDisposed");function le(){(N===ih.New||N===ih.Listening)&&(N=ih.Closed,Z.fire(void 0))}s(le,"closeHandler");function ce(ge){M.fire([ge,void 0,void 0])}s(ce,"readErrorHandler");function De(ge){M.fire(ge)}s(De,"writeErrorHandler"),e.onClose(le),e.onError(ce),t.onClose(le),t.onError(De);function be(){g||y.size===0||(g=(0,H2e.default)().timer.setImmediate(()=>{g=void 0,Re()}))}s(be,"triggerMessageQueue");function qe(ge){Rn.Message.isRequest(ge)?ft(ge):Rn.Message.isNotification(ge)?lt(ge):Rn.Message.isResponse(ge)?at(ge):oe(ge)}s(qe,"handleMessage");function Re(){if(y.size===0)return;let ge=y.shift();try{let Me=n?.messageStrategy;SL.is(Me)?Me.handleMessage(ge,qe):qe(ge)}finally{be()}}s(Re,"processMessageQueue");let Xe=s(ge=>{try{if(Rn.Message.isNotification(ge)&&ge.method===d_.type.method){let Me=ge.params.id,Je=ie(Me),rt=y.get(Je);if(Rn.Message.isRequest(rt)){let bt=n?.connectionStrategy,Mt=bt&&bt.cancelUndispatched?bt.cancelUndispatched(rt,V):void 0;if(Mt&&(Mt.error!==void 0||Mt.result!==void 0)){y.delete(Je),E.delete(Me),Mt.id=rt.id,Y(Mt,ge.method,Date.now()),t.write(Mt).catch(()=>i.error("Sending response for canceled message failed."));return}}let St=E.get(Me);if(St!==void 0){St.cancel(),Fe(ge);return}else b.add(Me)}U(y,ge)}finally{be()}},"callback");function ft(ge){if(re())return;function Me(wt,kt,_t){let qt={jsonrpc:c,id:ge.id};wt instanceof Rn.ResponseError?qt.error=wt.toJson():qt.result=wt===void 0?null:wt,Y(qt,kt,_t),t.write(qt).catch(()=>i.error("Sending response failed."))}s(Me,"reply");function Je(wt,kt,_t){let qt={jsonrpc:c,id:ge.id,error:wt.toJson()};Y(qt,kt,_t),t.write(qt).catch(()=>i.error("Sending response failed."))}s(Je,"replyError");function rt(wt,kt,_t){wt===void 0&&(wt=null);let qt={jsonrpc:c,id:ge.id,result:wt};Y(qt,kt,_t),t.write(qt).catch(()=>i.error("Sending response failed."))}s(rt,"replySuccess"),ne(ge);let St=f.get(ge.method),bt,Mt;St&&(bt=St.type,Mt=St.handler);let Ot=Date.now();if(Mt||u){let wt=ge.id??String(Date.now()),kt=IL.is(q.receiver)?q.receiver.createCancellationTokenSource(wt):q.receiver.createCancellationTokenSource(ge);ge.id!==null&&b.has(ge.id)&&kt.cancel(),ge.id!==null&&E.set(wt,kt);try{let _t;if(Mt)if(ge.params===void 0){if(bt!==void 0&&bt.numberOfParams!==0){Je(new Rn.ResponseError(Rn.ErrorCodes.InvalidParams,`Request ${ge.method} defines ${bt.numberOfParams} params but received none.`),ge.method,Ot);return}_t=Mt(kt.token)}else if(Array.isArray(ge.params)){if(bt!==void 0&&bt.parameterStructures===Rn.ParameterStructures.byName){Je(new Rn.ResponseError(Rn.ErrorCodes.InvalidParams,`Request ${ge.method} defines parameters by name but received parameters by position`),ge.method,Ot);return}_t=Mt(...ge.params,kt.token)}else{if(bt!==void 0&&bt.parameterStructures===Rn.ParameterStructures.byPosition){Je(new Rn.ResponseError(Rn.ErrorCodes.InvalidParams,`Request ${ge.method} defines parameters by position but received parameters by name`),ge.method,Ot);return}_t=Mt(ge.params,kt.token)}else u&&(_t=u(ge.method,ge.params,kt.token));let qt=_t;_t?qt.then?qt.then($t=>{E.delete(wt),Me($t,ge.method,Ot)},$t=>{E.delete(wt),$t instanceof Rn.ResponseError?Je($t,ge.method,Ot):$t&&Ys.string($t.message)?Je(new Rn.ResponseError(Rn.ErrorCodes.InternalError,`Request ${ge.method} failed with message: ${$t.message}`),ge.method,Ot):Je(new Rn.ResponseError(Rn.ErrorCodes.InternalError,`Request ${ge.method} failed unexpectedly without providing any details.`),ge.method,Ot)}):(E.delete(wt),Me(_t,ge.method,Ot)):(E.delete(wt),rt(_t,ge.method,Ot))}catch(_t){E.delete(wt),_t instanceof Rn.ResponseError?Me(_t,ge.method,Ot):_t&&Ys.string(_t.message)?Je(new Rn.ResponseError(Rn.ErrorCodes.InternalError,`Request ${ge.method} failed with message: ${_t.message}`),ge.method,Ot):Je(new Rn.ResponseError(Rn.ErrorCodes.InternalError,`Request ${ge.method} failed unexpectedly without providing any details.`),ge.method,Ot)}}else Je(new Rn.ResponseError(Rn.ErrorCodes.MethodNotFound,`Unhandled method ${ge.method}`),ge.method,Ot)}s(ft,"handleRequest");function at(ge){if(!re())if(ge.id===null)ge.error?i.error(`Received response message without id: Error is:
${JSON.stringify(ge.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let Me=ge.id,Je=x.get(Me);if(Se(ge,Je),Je!==void 0){x.delete(Me);try{if(ge.error){let rt=ge.error;Je.reject(new Rn.ResponseError(rt.code,rt.message,rt.data))}else if(ge.result!==void 0)Je.resolve(ge.result);else throw new Error("Should never happen.")}catch(rt){rt.message?i.error(`Response handler '${Je.method}' failed with message: ${rt.message}`):i.error(`Response handler '${Je.method}' failed unexpectedly.`)}}}}s(at,"handleResponse");function lt(ge){if(re())return;let Me,Je;if(ge.method===d_.type.method){let rt=ge.params.id;b.delete(rt),Fe(ge);return}else{let rt=h.get(ge.method);rt&&(Je=rt.handler,Me=rt.type)}if(Je||m)try{if(Fe(ge),Je)if(ge.params===void 0)Me!==void 0&&Me.numberOfParams!==0&&Me.parameterStructures!==Rn.ParameterStructures.byName&&i.error(`Notification ${ge.method} defines ${Me.numberOfParams} params but received none.`),Je();else if(Array.isArray(ge.params)){let rt=ge.params;ge.method===u_.type.method&&rt.length===2&&GX.is(rt[0])?Je({token:rt[0],value:rt[1]}):(Me!==void 0&&(Me.parameterStructures===Rn.ParameterStructures.byName&&i.error(`Notification ${ge.method} defines parameters by name but received parameters by position`),Me.numberOfParams!==ge.params.length&&i.error(`Notification ${ge.method} defines ${Me.numberOfParams} params but received ${rt.length} arguments`)),Je(...rt))}else Me!==void 0&&Me.parameterStructures===Rn.ParameterStructures.byPosition&&i.error(`Notification ${ge.method} defines parameters by position but received parameters by name`),Je(ge.params);else m&&m(ge.method,ge.params)}catch(rt){rt.message?i.error(`Notification handler '${ge.method}' failed with message: ${rt.message}`):i.error(`Notification handler '${ge.method}' failed unexpectedly.`)}else he.fire(ge)}s(lt,"handleNotification");function oe(ge){if(!ge){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
${JSON.stringify(ge,null,4)}`);let Me=ge;if(Ys.string(Me.id)||Ys.number(Me.id)){let Je=Me.id,rt=x.get(Je);rt&&rt.reject(new Error("The received response has neither a result nor an error property."))}}s(oe,"handleInvalidMessage");function Ne(ge){if(ge!=null)switch(_){case ho.Verbose:return JSON.stringify(ge,null,4);case ho.Compact:return JSON.stringify(ge);default:return}}s(Ne,"stringifyTrace");function Ae(ge){if(!(_===ho.Off||!B))if(k===ef.Text){let Me;(_===ho.Verbose||_===ho.Compact)&&ge.params&&(Me=`Params: ${Ne(ge.params)}
`),B.log(`Sending request '${ge.method} - (${ge.id})'.`,Me)}else Ce("send-request",ge)}s(Ae,"traceSendingRequest");function Ge(ge){if(!(_===ho.Off||!B))if(k===ef.Text){let Me;(_===ho.Verbose||_===ho.Compact)&&(ge.params?Me=`Params: ${Ne(ge.params)}
`:Me=`No parameters provided.
`),B.log(`Sending notification '${ge.method}'.`,Me)}else Ce("send-notification",ge)}s(Ge,"traceSendingNotification");function Y(ge,Me,Je){if(!(_===ho.Off||!B))if(k===ef.Text){let rt;(_===ho.Verbose||_===ho.Compact)&&(ge.error&&ge.error.data?rt=`Error data: ${Ne(ge.error.data)}
`:ge.result?rt=`Result: ${Ne(ge.result)}
`:ge.error===void 0&&(rt=`No result returned.
`)),B.log(`Sending response '${Me} - (${ge.id})'. Processing request took ${Date.now()-Je}ms`,rt)}else Ce("send-response",ge)}s(Y,"traceSendingResponse");function ne(ge){if(!(_===ho.Off||!B))if(k===ef.Text){let Me;(_===ho.Verbose||_===ho.Compact)&&ge.params&&(Me=`Params: ${Ne(ge.params)}
`),B.log(`Received request '${ge.method} - (${ge.id})'.`,Me)}else Ce("receive-request",ge)}s(ne,"traceReceivedRequest");function Fe(ge){if(!(_===ho.Off||!B||ge.method===EL.type.method))if(k===ef.Text){let Me;(_===ho.Verbose||_===ho.Compact)&&(ge.params?Me=`Params: ${Ne(ge.params)}
`:Me=`No parameters provided.
`),B.log(`Received notification '${ge.method}'.`,Me)}else Ce("receive-notification",ge)}s(Fe,"traceReceivedNotification");function Se(ge,Me){if(!(_===ho.Off||!B))if(k===ef.Text){let Je;if((_===ho.Verbose||_===ho.Compact)&&(ge.error&&ge.error.data?Je=`Error data: ${Ne(ge.error.data)}
`:ge.result?Je=`Result: ${Ne(ge.result)}
`:ge.error===void 0&&(Je=`No result returned.
`)),Me){let rt=ge.error?` Request failed: ${ge.error.message} (${ge.error.code}).`:"";B.log(`Received response '${Me.method} - (${ge.id})' in ${Date.now()-Me.timerStart}ms.${rt}`,Je)}else B.log(`Received response ${ge.id} without active response promise.`,Je)}else Ce("receive-response",ge)}s(Se,"traceReceivedResponse");function Ce(ge,Me){if(!B||_===ho.Off)return;let Je={isLSPMessage:!0,type:ge,message:Me,timestamp:Date.now()};B.log(Je)}s(Ce,"logLSPMessage");function Ue(){if(ae())throw new QI(f_.Closed,"Connection is closed.");if(re())throw new QI(f_.Disposed,"Connection is disposed.")}s(Ue,"throwIfClosedOrDisposed");function Ve(){if(K())throw new QI(f_.AlreadyListening,"Connection is already listening")}s(Ve,"throwIfListening");function tt(){if(!K())throw new Error("Call listen() first.")}s(tt,"throwIfNotListening");function Ct(ge){return ge===void 0?null:ge}s(Ct,"undefinedToNull");function Pt(ge){if(ge!==null)return ge}s(Pt,"nullToUndefined");function yt(ge){return ge!=null&&!Array.isArray(ge)&&typeof ge=="object"}s(yt,"isNamedParam");function Kt(ge,Me){switch(ge){case Rn.ParameterStructures.auto:return yt(Me)?Pt(Me):[Ct(Me)];case Rn.ParameterStructures.byName:if(!yt(Me))throw new Error("Received parameters by name but param is not an object literal.");return Pt(Me);case Rn.ParameterStructures.byPosition:return[Ct(Me)];default:throw new Error(`Unknown parameter structure ${ge.toString()}`)}}s(Kt,"computeSingleParam");function Xt(ge,Me){let Je,rt=ge.numberOfParams;switch(rt){case 0:Je=void 0;break;case 1:Je=Kt(ge.parameterStructures,Me[0]);break;default:Je=[];for(let St=0;St<Me.length&&St<rt;St++)Je.push(Ct(Me[St]));if(Me.length<rt)for(let St=Me.length;St<rt;St++)Je.push(null);break}return Je}s(Xt,"computeMessageParams");let lr={sendNotification:s((ge,...Me)=>{Ue();let Je,rt;if(Ys.string(ge)){Je=ge;let bt=Me[0],Mt=0,Ot=Rn.ParameterStructures.auto;Rn.ParameterStructures.is(bt)&&(Mt=1,Ot=bt);let wt=Me.length,kt=wt-Mt;switch(kt){case 0:rt=void 0;break;case 1:rt=Kt(Ot,Me[Mt]);break;default:if(Ot===Rn.ParameterStructures.byName)throw new Error(`Received ${kt} parameters for 'by Name' notification parameter structure.`);rt=Me.slice(Mt,wt).map(_t=>Ct(_t));break}}else{let bt=Me;Je=ge.method,rt=Xt(ge,bt)}let St={jsonrpc:c,method:Je,params:rt};return Ge(St),t.write(St).catch(bt=>{throw i.error("Sending notification failed."),bt})},"sendNotification"),onNotification:s((ge,Me)=>{Ue();let Je;return Ys.func(ge)?m=ge:Me&&(Ys.string(ge)?(Je=ge,h.set(ge,{type:void 0,handler:Me})):(Je=ge.method,h.set(ge.method,{type:ge,handler:Me}))),{dispose:s(()=>{Je!==void 0?h.delete(Je):m=void 0},"dispose")}},"onNotification"),onProgress:s((ge,Me,Je)=>{if(p.has(Me))throw new Error(`Progress handler for token ${Me} already registered`);return p.set(Me,Je),{dispose:s(()=>{p.delete(Me)},"dispose")}},"onProgress"),sendProgress:s((ge,Me,Je)=>lr.sendNotification(u_.type,{token:Me,value:Je}),"sendProgress"),onUnhandledProgress:ee.event,sendRequest:s((ge,...Me)=>{Ue(),tt();let Je,rt,St;if(Ys.string(ge)){Je=ge;let wt=Me[0],kt=Me[Me.length-1],_t=0,qt=Rn.ParameterStructures.auto;Rn.ParameterStructures.is(wt)&&(_t=1,qt=wt);let $t=Me.length;WX.CancellationToken.is(kt)&&($t=$t-1,St=kt);let Zt=$t-_t;switch(Zt){case 0:rt=void 0;break;case 1:rt=Kt(qt,Me[_t]);break;default:if(qt===Rn.ParameterStructures.byName)throw new Error(`Received ${Zt} parameters for 'by Name' request parameter structure.`);rt=Me.slice(_t,$t).map(dr=>Ct(dr));break}}else{let wt=Me;Je=ge.method,rt=Xt(ge,wt);let kt=ge.numberOfParams;St=WX.CancellationToken.is(wt[kt])?wt[kt]:void 0}let bt=o++,Mt;St&&(Mt=St.onCancellationRequested(()=>{let wt=q.sender.sendCancellation(lr,bt);return wt===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${bt}`),Promise.resolve()):wt.catch(()=>{i.log(`Sending cancellation messages for id ${bt} failed`)})}));let Ot={jsonrpc:c,id:bt,method:Je,params:rt};return Ae(Ot),typeof q.sender.enableCancellation=="function"&&q.sender.enableCancellation(Ot),new Promise(async(wt,kt)=>{let _t=s(Zt=>{wt(Zt),q.sender.cleanup(bt),Mt?.dispose()},"resolveWithCleanup"),qt=s(Zt=>{kt(Zt),q.sender.cleanup(bt),Mt?.dispose()},"rejectWithCleanup"),$t={method:Je,timerStart:Date.now(),resolve:_t,reject:qt};try{await t.write(Ot),x.set(bt,$t)}catch(Zt){throw i.error("Sending request failed."),$t.reject(new Rn.ResponseError(Rn.ErrorCodes.MessageWriteError,Zt.message?Zt.message:"Unknown reason")),Zt}})},"sendRequest"),onRequest:s((ge,Me)=>{Ue();let Je=null;return jX.is(ge)?(Je=void 0,u=ge):Ys.string(ge)?(Je=null,Me!==void 0&&(Je=ge,f.set(ge,{handler:Me,type:void 0}))):Me!==void 0&&(Je=ge.method,f.set(ge.method,{type:ge,handler:Me})),{dispose:s(()=>{Je!==null&&(Je!==void 0?f.delete(Je):u=void 0)},"dispose")}},"onRequest"),hasPendingResponse:s(()=>x.size>0,"hasPendingResponse"),trace:s(async(ge,Me,Je)=>{let rt=!1,St=ef.Text;Je!==void 0&&(Ys.boolean(Je)?rt=Je:(rt=Je.sendNotification||!1,St=Je.traceFormat||ef.Text)),_=ge,k=St,_===ho.Off?B=void 0:B=Me,rt&&!ae()&&!re()&&await lr.sendNotification(VX.type,{value:ho.toString(ge)})},"trace"),onError:M.event,onClose:Z.event,onUnhandledNotification:he.event,onDispose:G.event,end:s(()=>{t.end()},"end"),dispose:s(()=>{if(re())return;N=ih.Disposed,G.fire(void 0);let ge=new Rn.ResponseError(Rn.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Me of x.values())Me.reject(ge);x=new Map,E=new Map,b=new Set,y=new j2e.LinkedMap,Ys.func(t.dispose)&&t.dispose(),Ys.func(e.dispose)&&e.dispose()},"dispose"),listen:s(()=>{Ue(),Ve(),N=ih.Listening,e.listen(Xe)},"listen"),inspect:s(()=>{(0,H2e.default)().console.log("inspect")},"inspect")};return lr.onNotification(EL.type,ge=>{if(_===ho.Off||!B)return;let Me=_===ho.Verbose||_===ho.Compact;B.log(ge.message,Me?ge.verbose:void 0)}),lr.onNotification(u_.type,ge=>{let Me=p.get(ge.token);Me?Me(ge.value):ee.fire(ge)}),lr}s(krt,"createMessageConnection");Jn.createMessageConnection=krt});var RL=H(gt=>{"use strict";d();Object.defineProperty(gt,"__esModule",{value:!0});gt.ProgressType=gt.ProgressToken=gt.createMessageConnection=gt.NullLogger=gt.ConnectionOptions=gt.ConnectionStrategy=gt.AbstractMessageBuffer=gt.WriteableStreamMessageWriter=gt.AbstractMessageWriter=gt.MessageWriter=gt.ReadableStreamMessageReader=gt.AbstractMessageReader=gt.MessageReader=gt.SharedArrayReceiverStrategy=gt.SharedArraySenderStrategy=gt.CancellationToken=gt.CancellationTokenSource=gt.Emitter=gt.Event=gt.Disposable=gt.LRUCache=gt.Touch=gt.LinkedMap=gt.ParameterStructures=gt.NotificationType9=gt.NotificationType8=gt.NotificationType7=gt.NotificationType6=gt.NotificationType5=gt.NotificationType4=gt.NotificationType3=gt.NotificationType2=gt.NotificationType1=gt.NotificationType0=gt.NotificationType=gt.ErrorCodes=gt.ResponseError=gt.RequestType9=gt.RequestType8=gt.RequestType7=gt.RequestType6=gt.RequestType5=gt.RequestType4=gt.RequestType3=gt.RequestType2=gt.RequestType1=gt.RequestType0=gt.RequestType=gt.Message=gt.RAL=void 0;gt.MessageStrategy=gt.CancellationStrategy=gt.CancellationSenderStrategy=gt.CancellationReceiverStrategy=gt.ConnectionError=gt.ConnectionErrors=gt.LogTraceNotification=gt.SetTraceNotification=gt.TraceFormat=gt.TraceValues=gt.Trace=void 0;var Jo=xX();Object.defineProperty(gt,"Message",{enumerable:!0,get:s(function(){return Jo.Message},"get")});Object.defineProperty(gt,"RequestType",{enumerable:!0,get:s(function(){return Jo.RequestType},"get")});Object.defineProperty(gt,"RequestType0",{enumerable:!0,get:s(function(){return Jo.RequestType0},"get")});Object.defineProperty(gt,"RequestType1",{enumerable:!0,get:s(function(){return Jo.RequestType1},"get")});Object.defineProperty(gt,"RequestType2",{enumerable:!0,get:s(function(){return Jo.RequestType2},"get")});Object.defineProperty(gt,"RequestType3",{enumerable:!0,get:s(function(){return Jo.RequestType3},"get")});Object.defineProperty(gt,"RequestType4",{enumerable:!0,get:s(function(){return Jo.RequestType4},"get")});Object.defineProperty(gt,"RequestType5",{enumerable:!0,get:s(function(){return Jo.RequestType5},"get")});Object.defineProperty(gt,"RequestType6",{enumerable:!0,get:s(function(){return Jo.RequestType6},"get")});Object.defineProperty(gt,"RequestType7",{enumerable:!0,get:s(function(){return Jo.RequestType7},"get")});Object.defineProperty(gt,"RequestType8",{enumerable:!0,get:s(function(){return Jo.RequestType8},"get")});Object.defineProperty(gt,"RequestType9",{enumerable:!0,get:s(function(){return Jo.RequestType9},"get")});Object.defineProperty(gt,"ResponseError",{enumerable:!0,get:s(function(){return Jo.ResponseError},"get")});Object.defineProperty(gt,"ErrorCodes",{enumerable:!0,get:s(function(){return Jo.ErrorCodes},"get")});Object.defineProperty(gt,"NotificationType",{enumerable:!0,get:s(function(){return Jo.NotificationType},"get")});Object.defineProperty(gt,"NotificationType0",{enumerable:!0,get:s(function(){return Jo.NotificationType0},"get")});Object.defineProperty(gt,"NotificationType1",{enumerable:!0,get:s(function(){return Jo.NotificationType1},"get")});Object.defineProperty(gt,"NotificationType2",{enumerable:!0,get:s(function(){return Jo.NotificationType2},"get")});Object.defineProperty(gt,"NotificationType3",{enumerable:!0,get:s(function(){return Jo.NotificationType3},"get")});Object.defineProperty(gt,"NotificationType4",{enumerable:!0,get:s(function(){return Jo.NotificationType4},"get")});Object.defineProperty(gt,"NotificationType5",{enumerable:!0,get:s(function(){return Jo.NotificationType5},"get")});Object.defineProperty(gt,"NotificationType6",{enumerable:!0,get:s(function(){return Jo.NotificationType6},"get")});Object.defineProperty(gt,"NotificationType7",{enumerable:!0,get:s(function(){return Jo.NotificationType7},"get")});Object.defineProperty(gt,"NotificationType8",{enumerable:!0,get:s(function(){return Jo.NotificationType8},"get")});Object.defineProperty(gt,"NotificationType9",{enumerable:!0,get:s(function(){return Jo.NotificationType9},"get")});Object.defineProperty(gt,"ParameterStructures",{enumerable:!0,get:s(function(){return Jo.ParameterStructures},"get")});var YX=bX();Object.defineProperty(gt,"LinkedMap",{enumerable:!0,get:s(function(){return YX.LinkedMap},"get")});Object.defineProperty(gt,"LRUCache",{enumerable:!0,get:s(function(){return YX.LRUCache},"get")});Object.defineProperty(gt,"Touch",{enumerable:!0,get:s(function(){return YX.Touch},"get")});var Brt=P2e();Object.defineProperty(gt,"Disposable",{enumerable:!0,get:s(function(){return Brt.Disposable},"get")});var Y2e=NI();Object.defineProperty(gt,"Event",{enumerable:!0,get:s(function(){return Y2e.Event},"get")});Object.defineProperty(gt,"Emitter",{enumerable:!0,get:s(function(){return Y2e.Emitter},"get")});var K2e=yL();Object.defineProperty(gt,"CancellationTokenSource",{enumerable:!0,get:s(function(){return K2e.CancellationTokenSource},"get")});Object.defineProperty(gt,"CancellationToken",{enumerable:!0,get:s(function(){return K2e.CancellationToken},"get")});var J2e=L2e();Object.defineProperty(gt,"SharedArraySenderStrategy",{enumerable:!0,get:s(function(){return J2e.SharedArraySenderStrategy},"get")});Object.defineProperty(gt,"SharedArrayReceiverStrategy",{enumerable:!0,get:s(function(){return J2e.SharedArrayReceiverStrategy},"get")});var KX=M2e();Object.defineProperty(gt,"MessageReader",{enumerable:!0,get:s(function(){return KX.MessageReader},"get")});Object.defineProperty(gt,"AbstractMessageReader",{enumerable:!0,get:s(function(){return KX.AbstractMessageReader},"get")});Object.defineProperty(gt,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return KX.ReadableStreamMessageReader},"get")});var JX=W2e();Object.defineProperty(gt,"MessageWriter",{enumerable:!0,get:s(function(){return JX.MessageWriter},"get")});Object.defineProperty(gt,"AbstractMessageWriter",{enumerable:!0,get:s(function(){return JX.AbstractMessageWriter},"get")});Object.defineProperty(gt,"WriteableStreamMessageWriter",{enumerable:!0,get:s(function(){return JX.WriteableStreamMessageWriter},"get")});var Drt=G2e();Object.defineProperty(gt,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return Drt.AbstractMessageBuffer},"get")});var nc=z2e();Object.defineProperty(gt,"ConnectionStrategy",{enumerable:!0,get:s(function(){return nc.ConnectionStrategy},"get")});Object.defineProperty(gt,"ConnectionOptions",{enumerable:!0,get:s(function(){return nc.ConnectionOptions},"get")});Object.defineProperty(gt,"NullLogger",{enumerable:!0,get:s(function(){return nc.NullLogger},"get")});Object.defineProperty(gt,"createMessageConnection",{enumerable:!0,get:s(function(){return nc.createMessageConnection},"get")});Object.defineProperty(gt,"ProgressToken",{enumerable:!0,get:s(function(){return nc.ProgressToken},"get")});Object.defineProperty(gt,"ProgressType",{enumerable:!0,get:s(function(){return nc.ProgressType},"get")});Object.defineProperty(gt,"Trace",{enumerable:!0,get:s(function(){return nc.Trace},"get")});Object.defineProperty(gt,"TraceValues",{enumerable:!0,get:s(function(){return nc.TraceValues},"get")});Object.defineProperty(gt,"TraceFormat",{enumerable:!0,get:s(function(){return nc.TraceFormat},"get")});Object.defineProperty(gt,"SetTraceNotification",{enumerable:!0,get:s(function(){return nc.SetTraceNotification},"get")});Object.defineProperty(gt,"LogTraceNotification",{enumerable:!0,get:s(function(){return nc.LogTraceNotification},"get")});Object.defineProperty(gt,"ConnectionErrors",{enumerable:!0,get:s(function(){return nc.ConnectionErrors},"get")});Object.defineProperty(gt,"ConnectionError",{enumerable:!0,get:s(function(){return nc.ConnectionError},"get")});Object.defineProperty(gt,"CancellationReceiverStrategy",{enumerable:!0,get:s(function(){return nc.CancellationReceiverStrategy},"get")});Object.defineProperty(gt,"CancellationSenderStrategy",{enumerable:!0,get:s(function(){return nc.CancellationSenderStrategy},"get")});Object.defineProperty(gt,"CancellationStrategy",{enumerable:!0,get:s(function(){return nc.CancellationStrategy},"get")});Object.defineProperty(gt,"MessageStrategy",{enumerable:!0,get:s(function(){return nc.MessageStrategy},"get")});var Prt=h5();gt.RAL=Prt.default});var eye=H(tZ=>{"use strict";d();Object.defineProperty(tZ,"__esModule",{value:!0});var X2e=require("util"),uA=RL(),kL=class e extends uA.AbstractMessageBuffer{static{s(this,"MessageBuffer")}constructor(t="utf-8"){super(t)}emptyBuffer(){return e.emptyBuffer}fromString(t,r){return Buffer.from(t,r)}toString(t,r){return t instanceof Buffer?t.toString(r):new X2e.TextDecoder(r).decode(t)}asNative(t,r){return r===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,r):Buffer.from(t,0,r)}allocNative(t){return Buffer.allocUnsafe(t)}};kL.emptyBuffer=Buffer.allocUnsafe(0);var XX=class{static{s(this,"ReadableStreamWrapper")}constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),uA.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),uA.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),uA.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),uA.Disposable.create(()=>this.stream.off("data",t))}},ZX=class{static{s(this,"WritableStreamWrapper")}constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),uA.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),uA.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),uA.Disposable.create(()=>this.stream.off("end",t))}write(t,r){return new Promise((n,i)=>{let o=s(a=>{a==null?n():i(a)},"callback");typeof t=="string"?this.stream.write(t,r,o):this.stream.write(t,o)})}end(){this.stream.end()}},Z2e=Object.freeze({messageBuffer:Object.freeze({create:s(e=>new kL(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:s((e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(r){return Promise.reject(r)}},"encode")}),decoder:Object.freeze({name:"application/json",decode:s((e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new X2e.TextDecoder(t.charset).decode(e)))}catch(r){return Promise.reject(r)}},"decode")})}),stream:Object.freeze({asReadableStream:s(e=>new XX(e),"asReadableStream"),asWritableStream:s(e=>new ZX(e),"asWritableStream")}),console,timer:Object.freeze({setTimeout(e,t,...r){let n=setTimeout(e,t,...r);return{dispose:s(()=>clearTimeout(n),"dispose")}},setImmediate(e,...t){let r=setImmediate(e,...t);return{dispose:s(()=>clearImmediate(r),"dispose")}},setInterval(e,t,...r){let n=setInterval(e,t,...r);return{dispose:s(()=>clearInterval(n),"dispose")}}})});function eZ(){return Z2e}s(eZ,"RIL");(function(e){function t(){uA.RAL.install(Z2e)}s(t,"install"),e.install=t})(eZ||(eZ={}));tZ.default=eZ});var Jx=H(Wi=>{"use strict";d();var Nrt=Wi&&Wi.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Lrt=Wi&&Wi.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Nrt(t,e,r)};Object.defineProperty(Wi,"__esModule",{value:!0});Wi.createMessageConnection=Wi.createServerSocketTransport=Wi.createClientSocketTransport=Wi.createServerPipeTransport=Wi.createClientPipeTransport=Wi.generateRandomPipeName=Wi.StreamMessageWriter=Wi.StreamMessageReader=Wi.SocketMessageWriter=Wi.SocketMessageReader=Wi.PortMessageWriter=Wi.PortMessageReader=Wi.IPCMessageWriter=Wi.IPCMessageReader=void 0;var OI=eye();OI.default.install();var tye=require("path"),Frt=require("os"),Mrt=require("crypto"),PL=require("net"),tf=RL();Lrt(RL(),Wi);var rZ=class extends tf.AbstractMessageReader{static{s(this,"IPCMessageReader")}constructor(t){super(),this.process=t;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),tf.Disposable.create(()=>this.process.off("message",t))}};Wi.IPCMessageReader=rZ;var nZ=class extends tf.AbstractMessageWriter{static{s(this,"IPCMessageWriter")}constructor(t){super(),this.process=t,this.errorCount=0;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,r=>{r?(this.errorCount++,this.handleError(r,t)):this.errorCount=0}),Promise.resolve()}catch(r){return this.handleError(r,t),Promise.reject(r)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}end(){}};Wi.IPCMessageWriter=nZ;var iZ=class extends tf.AbstractMessageReader{static{s(this,"PortMessageReader")}constructor(t){super(),this.onData=new tf.Emitter,t.on("close",()=>this.fireClose),t.on("error",r=>this.fireError(r)),t.on("message",r=>{this.onData.fire(r)})}listen(t){return this.onData.event(t)}};Wi.PortMessageReader=iZ;var oZ=class extends tf.AbstractMessageWriter{static{s(this,"PortMessageWriter")}constructor(t){super(),this.port=t,this.errorCount=0,t.on("close",()=>this.fireClose()),t.on("error",r=>this.fireError(r))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(r){return this.handleError(r,t),Promise.reject(r)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}end(){}};Wi.PortMessageWriter=oZ;var Yx=class extends tf.ReadableStreamMessageReader{static{s(this,"SocketMessageReader")}constructor(t,r="utf-8"){super((0,OI.default)().stream.asReadableStream(t),r)}};Wi.SocketMessageReader=Yx;var Kx=class extends tf.WriteableStreamMessageWriter{static{s(this,"SocketMessageWriter")}constructor(t,r){super((0,OI.default)().stream.asWritableStream(t),r),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};Wi.SocketMessageWriter=Kx;var BL=class extends tf.ReadableStreamMessageReader{static{s(this,"StreamMessageReader")}constructor(t,r){super((0,OI.default)().stream.asReadableStream(t),r)}};Wi.StreamMessageReader=BL;var DL=class extends tf.WriteableStreamMessageWriter{static{s(this,"StreamMessageWriter")}constructor(t,r){super((0,OI.default)().stream.asWritableStream(t),r)}};Wi.StreamMessageWriter=DL;var rye=process.env.XDG_RUNTIME_DIR,Qrt=new Map([["linux",107],["darwin",103]]);function Ort(){let e=(0,Mrt.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;rye?t=tye.join(rye,`vscode-ipc-${e}.sock`):t=tye.join(Frt.tmpdir(),`vscode-${e}.sock`);let r=Qrt.get(process.platform);return r!==void 0&&t.length>r&&(0,OI.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${r} characters.`),t}s(Ort,"generateRandomPipeName");Wi.generateRandomPipeName=Ort;function Urt(e,t="utf-8"){let r,n=new Promise((i,o)=>{r=i});return new Promise((i,o)=>{let a=(0,PL.createServer)(l=>{a.close(),r([new Yx(l,t),new Kx(l,t)])});a.on("error",o),a.listen(e,()=>{a.removeListener("error",o),i({onConnected:s(()=>n,"onConnected")})})})}s(Urt,"createClientPipeTransport");Wi.createClientPipeTransport=Urt;function qrt(e,t="utf-8"){let r=(0,PL.createConnection)(e);return[new Yx(r,t),new Kx(r,t)]}s(qrt,"createServerPipeTransport");Wi.createServerPipeTransport=qrt;function Wrt(e,t="utf-8"){let r,n=new Promise((i,o)=>{r=i});return new Promise((i,o)=>{let a=(0,PL.createServer)(l=>{a.close(),r([new Yx(l,t),new Kx(l,t)])});a.on("error",o),a.listen(e,"127.0.0.1",()=>{a.removeListener("error",o),i({onConnected:s(()=>n,"onConnected")})})})}s(Wrt,"createClientSocketTransport");Wi.createClientSocketTransport=Wrt;function Grt(e,t="utf-8"){let r=(0,PL.createConnection)(e,"127.0.0.1");return[new Yx(r,t),new Kx(r,t)]}s(Grt,"createServerSocketTransport");Wi.createServerSocketTransport=Grt;function Hrt(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}s(Hrt,"isReadableStream");function jrt(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}s(jrt,"isWritableStream");function Vrt(e,t,r,n){r||(r=tf.NullLogger);let i=Hrt(e)?new BL(e):e,o=jrt(t)?new DL(t):t;return tf.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,tf.createMessageConnection)(i,o,r,n)}s(Vrt,"createMessageConnection");Wi.createMessageConnection=Vrt});var sZ=H((xcr,nye)=>{"use strict";d();nye.exports=Jx()});var LL=H((iye,NL)=>{d();(function(e){if(typeof NL=="object"&&typeof NL.exports=="object"){var t=e(require,iye);t!==void 0&&(NL.exports=t)}else typeof define=="function"&&define.amd&&define(["require","exports"],e)})(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocument=t.EOL=t.WorkspaceFolder=t.InlineCompletionContext=t.SelectedCompletionInfo=t.InlineCompletionTriggerKind=t.InlineCompletionList=t.InlineCompletionItem=t.StringValue=t.InlayHint=t.InlayHintLabelPart=t.InlayHintKind=t.InlineValueContext=t.InlineValueEvaluatableExpression=t.InlineValueVariableLookup=t.InlineValueText=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.SelectionRange=t.DocumentLink=t.FormattingOptions=t.CodeLens=t.CodeAction=t.CodeActionContext=t.CodeActionTriggerKind=t.CodeActionKind=t.DocumentSymbol=t.WorkspaceSymbol=t.SymbolInformation=t.SymbolTag=t.SymbolKind=t.DocumentHighlight=t.DocumentHighlightKind=t.SignatureInformation=t.ParameterInformation=t.Hover=t.MarkedString=t.CompletionList=t.CompletionItem=t.CompletionItemLabelDetails=t.InsertTextMode=t.InsertReplaceEdit=t.CompletionItemTag=t.InsertTextFormat=t.CompletionItemKind=t.MarkupContent=t.MarkupKind=t.TextDocumentItem=t.OptionalVersionedTextDocumentIdentifier=t.VersionedTextDocumentIdentifier=t.TextDocumentIdentifier=t.WorkspaceChange=t.WorkspaceEdit=t.DeleteFile=t.RenameFile=t.CreateFile=t.TextDocumentEdit=t.AnnotatedTextEdit=t.ChangeAnnotationIdentifier=t.ChangeAnnotation=t.TextEdit=t.Command=t.Diagnostic=t.CodeDescription=t.DiagnosticTag=t.DiagnosticSeverity=t.DiagnosticRelatedInformation=t.FoldingRange=t.FoldingRangeKind=t.ColorPresentation=t.ColorInformation=t.Color=t.LocationLink=t.Location=t.Range=t.Position=t.uinteger=t.integer=t.URI=t.DocumentUri=void 0;var r;(function(O){function de(ye){return typeof ye=="string"}s(de,"is"),O.is=de})(r||(t.DocumentUri=r={}));var n;(function(O){function de(ye){return typeof ye=="string"}s(de,"is"),O.is=de})(n||(t.URI=n={}));var i;(function(O){O.MIN_VALUE=-2147483648,O.MAX_VALUE=2147483647;function de(ye){return typeof ye=="number"&&O.MIN_VALUE<=ye&&ye<=O.MAX_VALUE}s(de,"is"),O.is=de})(i||(t.integer=i={}));var o;(function(O){O.MIN_VALUE=0,O.MAX_VALUE=2147483647;function de(ye){return typeof ye=="number"&&O.MIN_VALUE<=ye&&ye<=O.MAX_VALUE}s(de,"is"),O.is=de})(o||(t.uinteger=o={}));var a;(function(O){function de(J,F){return J===Number.MAX_VALUE&&(J=o.MAX_VALUE),F===Number.MAX_VALUE&&(F=o.MAX_VALUE),{line:J,character:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&Ie.uinteger(F.line)&&Ie.uinteger(F.character)}s(ye,"is"),O.is=ye})(a||(t.Position=a={}));var l;(function(O){function de(J,F,Te,Oe){if(Ie.uinteger(J)&&Ie.uinteger(F)&&Ie.uinteger(Te)&&Ie.uinteger(Oe))return{start:a.create(J,F),end:a.create(Te,Oe)};if(a.is(J)&&a.is(F))return{start:J,end:F};throw new Error("Range#create called with invalid arguments[".concat(J,", ").concat(F,", ").concat(Te,", ").concat(Oe,"]"))}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&a.is(F.start)&&a.is(F.end)}s(ye,"is"),O.is=ye})(l||(t.Range=l={}));var c;(function(O){function de(J,F){return{uri:J,range:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&l.is(F.range)&&(Ie.string(F.uri)||Ie.undefined(F.uri))}s(ye,"is"),O.is=ye})(c||(t.Location=c={}));var u;(function(O){function de(J,F,Te,Oe){return{targetUri:J,targetRange:F,targetSelectionRange:Te,originSelectionRange:Oe}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&l.is(F.targetRange)&&Ie.string(F.targetUri)&&l.is(F.targetSelectionRange)&&(l.is(F.originSelectionRange)||Ie.undefined(F.originSelectionRange))}s(ye,"is"),O.is=ye})(u||(t.LocationLink=u={}));var f;(function(O){function de(J,F,Te,Oe){return{red:J,green:F,blue:Te,alpha:Oe}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&Ie.numberRange(F.red,0,1)&&Ie.numberRange(F.green,0,1)&&Ie.numberRange(F.blue,0,1)&&Ie.numberRange(F.alpha,0,1)}s(ye,"is"),O.is=ye})(f||(t.Color=f={}));var m;(function(O){function de(J,F){return{range:J,color:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&l.is(F.range)&&f.is(F.color)}s(ye,"is"),O.is=ye})(m||(t.ColorInformation=m={}));var h;(function(O){function de(J,F,Te){return{label:J,textEdit:F,additionalTextEdits:Te}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&Ie.string(F.label)&&(Ie.undefined(F.textEdit)||B.is(F))&&(Ie.undefined(F.additionalTextEdits)||Ie.typedArray(F.additionalTextEdits,B.is))}s(ye,"is"),O.is=ye})(h||(t.ColorPresentation=h={}));var p;(function(O){O.Comment="comment",O.Imports="imports",O.Region="region"})(p||(t.FoldingRangeKind=p={}));var g;(function(O){function de(J,F,Te,Oe,xt,Wt){var Lt={startLine:J,endLine:F};return Ie.defined(Te)&&(Lt.startCharacter=Te),Ie.defined(Oe)&&(Lt.endCharacter=Oe),Ie.defined(xt)&&(Lt.kind=xt),Ie.defined(Wt)&&(Lt.collapsedText=Wt),Lt}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&Ie.uinteger(F.startLine)&&Ie.uinteger(F.startLine)&&(Ie.undefined(F.startCharacter)||Ie.uinteger(F.startCharacter))&&(Ie.undefined(F.endCharacter)||Ie.uinteger(F.endCharacter))&&(Ie.undefined(F.kind)||Ie.string(F.kind))}s(ye,"is"),O.is=ye})(g||(t.FoldingRange=g={}));var y;(function(O){function de(J,F){return{location:J,message:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&c.is(F.location)&&Ie.string(F.message)}s(ye,"is"),O.is=ye})(y||(t.DiagnosticRelatedInformation=y={}));var x;(function(O){O.Error=1,O.Warning=2,O.Information=3,O.Hint=4})(x||(t.DiagnosticSeverity=x={}));var b;(function(O){O.Unnecessary=1,O.Deprecated=2})(b||(t.DiagnosticTag=b={}));var E;(function(O){function de(ye){var J=ye;return Ie.objectLiteral(J)&&Ie.string(J.href)}s(de,"is"),O.is=de})(E||(t.CodeDescription=E={}));var _;(function(O){function de(J,F,Te,Oe,xt,Wt){var Lt={range:J,message:F};return Ie.defined(Te)&&(Lt.severity=Te),Ie.defined(Oe)&&(Lt.code=Oe),Ie.defined(xt)&&(Lt.source=xt),Ie.defined(Wt)&&(Lt.relatedInformation=Wt),Lt}s(de,"create"),O.create=de;function ye(J){var F,Te=J;return Ie.defined(Te)&&l.is(Te.range)&&Ie.string(Te.message)&&(Ie.number(Te.severity)||Ie.undefined(Te.severity))&&(Ie.integer(Te.code)||Ie.string(Te.code)||Ie.undefined(Te.code))&&(Ie.undefined(Te.codeDescription)||Ie.string((F=Te.codeDescription)===null||F===void 0?void 0:F.href))&&(Ie.string(Te.source)||Ie.undefined(Te.source))&&(Ie.undefined(Te.relatedInformation)||Ie.typedArray(Te.relatedInformation,y.is))}s(ye,"is"),O.is=ye})(_||(t.Diagnostic=_={}));var k;(function(O){function de(J,F){for(var Te=[],Oe=2;Oe<arguments.length;Oe++)Te[Oe-2]=arguments[Oe];var xt={title:J,command:F};return Ie.defined(Te)&&Te.length>0&&(xt.arguments=Te),xt}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.string(F.title)&&Ie.string(F.command)}s(ye,"is"),O.is=ye})(k||(t.Command=k={}));var B;(function(O){function de(Te,Oe){return{range:Te,newText:Oe}}s(de,"replace"),O.replace=de;function ye(Te,Oe){return{range:{start:Te,end:Te},newText:Oe}}s(ye,"insert"),O.insert=ye;function J(Te){return{range:Te,newText:""}}s(J,"del"),O.del=J;function F(Te){var Oe=Te;return Ie.objectLiteral(Oe)&&Ie.string(Oe.newText)&&l.is(Oe.range)}s(F,"is"),O.is=F})(B||(t.TextEdit=B={}));var N;(function(O){function de(J,F,Te){var Oe={label:J};return F!==void 0&&(Oe.needsConfirmation=F),Te!==void 0&&(Oe.description=Te),Oe}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&Ie.string(F.label)&&(Ie.boolean(F.needsConfirmation)||F.needsConfirmation===void 0)&&(Ie.string(F.description)||F.description===void 0)}s(ye,"is"),O.is=ye})(N||(t.ChangeAnnotation=N={}));var M;(function(O){function de(ye){var J=ye;return Ie.string(J)}s(de,"is"),O.is=de})(M||(t.ChangeAnnotationIdentifier=M={}));var Z;(function(O){function de(Te,Oe,xt){return{range:Te,newText:Oe,annotationId:xt}}s(de,"replace"),O.replace=de;function ye(Te,Oe,xt){return{range:{start:Te,end:Te},newText:Oe,annotationId:xt}}s(ye,"insert"),O.insert=ye;function J(Te,Oe){return{range:Te,newText:"",annotationId:Oe}}s(J,"del"),O.del=J;function F(Te){var Oe=Te;return B.is(Oe)&&(N.is(Oe.annotationId)||M.is(Oe.annotationId))}s(F,"is"),O.is=F})(Z||(t.AnnotatedTextEdit=Z={}));var he;(function(O){function de(J,F){return{textDocument:J,edits:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&ae.is(F.textDocument)&&Array.isArray(F.edits)}s(ye,"is"),O.is=ye})(he||(t.TextDocumentEdit=he={}));var ee;(function(O){function de(J,F,Te){var Oe={kind:"create",uri:J};return F!==void 0&&(F.overwrite!==void 0||F.ignoreIfExists!==void 0)&&(Oe.options=F),Te!==void 0&&(Oe.annotationId=Te),Oe}s(de,"create"),O.create=de;function ye(J){var F=J;return F&&F.kind==="create"&&Ie.string(F.uri)&&(F.options===void 0||(F.options.overwrite===void 0||Ie.boolean(F.options.overwrite))&&(F.options.ignoreIfExists===void 0||Ie.boolean(F.options.ignoreIfExists)))&&(F.annotationId===void 0||M.is(F.annotationId))}s(ye,"is"),O.is=ye})(ee||(t.CreateFile=ee={}));var G;(function(O){function de(J,F,Te,Oe){var xt={kind:"rename",oldUri:J,newUri:F};return Te!==void 0&&(Te.overwrite!==void 0||Te.ignoreIfExists!==void 0)&&(xt.options=Te),Oe!==void 0&&(xt.annotationId=Oe),xt}s(de,"create"),O.create=de;function ye(J){var F=J;return F&&F.kind==="rename"&&Ie.string(F.oldUri)&&Ie.string(F.newUri)&&(F.options===void 0||(F.options.overwrite===void 0||Ie.boolean(F.options.overwrite))&&(F.options.ignoreIfExists===void 0||Ie.boolean(F.options.ignoreIfExists)))&&(F.annotationId===void 0||M.is(F.annotationId))}s(ye,"is"),O.is=ye})(G||(t.RenameFile=G={}));var q;(function(O){function de(J,F,Te){var Oe={kind:"delete",uri:J};return F!==void 0&&(F.recursive!==void 0||F.ignoreIfNotExists!==void 0)&&(Oe.options=F),Te!==void 0&&(Oe.annotationId=Te),Oe}s(de,"create"),O.create=de;function ye(J){var F=J;return F&&F.kind==="delete"&&Ie.string(F.uri)&&(F.options===void 0||(F.options.recursive===void 0||Ie.boolean(F.options.recursive))&&(F.options.ignoreIfNotExists===void 0||Ie.boolean(F.options.ignoreIfNotExists)))&&(F.annotationId===void 0||M.is(F.annotationId))}s(ye,"is"),O.is=ye})(q||(t.DeleteFile=q={}));var ie;(function(O){function de(ye){var J=ye;return J&&(J.changes!==void 0||J.documentChanges!==void 0)&&(J.documentChanges===void 0||J.documentChanges.every(function(F){return Ie.string(F.kind)?ee.is(F)||G.is(F)||q.is(F):he.is(F)}))}s(de,"is"),O.is=de})(ie||(t.WorkspaceEdit=ie={}));var z=function(){function O(de,ye){this.edits=de,this.changeAnnotations=ye}return s(O,"TextEditChangeImpl"),O.prototype.insert=function(de,ye,J){var F,Te;if(J===void 0?F=B.insert(de,ye):M.is(J)?(Te=J,F=Z.insert(de,ye,J)):(this.assertChangeAnnotations(this.changeAnnotations),Te=this.changeAnnotations.manage(J),F=Z.insert(de,ye,Te)),this.edits.push(F),Te!==void 0)return Te},O.prototype.replace=function(de,ye,J){var F,Te;if(J===void 0?F=B.replace(de,ye):M.is(J)?(Te=J,F=Z.replace(de,ye,J)):(this.assertChangeAnnotations(this.changeAnnotations),Te=this.changeAnnotations.manage(J),F=Z.replace(de,ye,Te)),this.edits.push(F),Te!==void 0)return Te},O.prototype.delete=function(de,ye){var J,F;if(ye===void 0?J=B.del(de):M.is(ye)?(F=ye,J=Z.del(de,ye)):(this.assertChangeAnnotations(this.changeAnnotations),F=this.changeAnnotations.manage(ye),J=Z.del(de,F)),this.edits.push(J),F!==void 0)return F},O.prototype.add=function(de){this.edits.push(de)},O.prototype.all=function(){return this.edits},O.prototype.clear=function(){this.edits.splice(0,this.edits.length)},O.prototype.assertChangeAnnotations=function(de){if(de===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},O}(),j=function(){function O(de){this._annotations=de===void 0?Object.create(null):de,this._counter=0,this._size=0}return s(O,"ChangeAnnotations"),O.prototype.all=function(){return this._annotations},Object.defineProperty(O.prototype,"size",{get:s(function(){return this._size},"get"),enumerable:!1,configurable:!0}),O.prototype.manage=function(de,ye){var J;if(M.is(de)?J=de:(J=this.nextId(),ye=de),this._annotations[J]!==void 0)throw new Error("Id ".concat(J," is already in use."));if(ye===void 0)throw new Error("No annotation provided for id ".concat(J));return this._annotations[J]=ye,this._size++,J},O.prototype.nextId=function(){return this._counter++,this._counter.toString()},O}(),U=function(){function O(de){var ye=this;this._textEditChanges=Object.create(null),de!==void 0?(this._workspaceEdit=de,de.documentChanges?(this._changeAnnotations=new j(de.changeAnnotations),de.changeAnnotations=this._changeAnnotations.all(),de.documentChanges.forEach(function(J){if(he.is(J)){var F=new z(J.edits,ye._changeAnnotations);ye._textEditChanges[J.textDocument.uri]=F}})):de.changes&&Object.keys(de.changes).forEach(function(J){var F=new z(de.changes[J]);ye._textEditChanges[J]=F})):this._workspaceEdit={}}return s(O,"WorkspaceChange"),Object.defineProperty(O.prototype,"edit",{get:s(function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},"get"),enumerable:!1,configurable:!0}),O.prototype.getTextEditChange=function(de){if(ae.is(de)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var ye={uri:de.uri,version:de.version},J=this._textEditChanges[ye.uri];if(!J){var F=[],Te={textDocument:ye,edits:F};this._workspaceEdit.documentChanges.push(Te),J=new z(F,this._changeAnnotations),this._textEditChanges[ye.uri]=J}return J}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var J=this._textEditChanges[de];if(!J){var F=[];this._workspaceEdit.changes[de]=F,J=new z(F),this._textEditChanges[de]=J}return J}},O.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new j,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},O.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},O.prototype.createFile=function(de,ye,J){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var F;N.is(ye)||M.is(ye)?F=ye:J=ye;var Te,Oe;if(F===void 0?Te=ee.create(de,J):(Oe=M.is(F)?F:this._changeAnnotations.manage(F),Te=ee.create(de,J,Oe)),this._workspaceEdit.documentChanges.push(Te),Oe!==void 0)return Oe},O.prototype.renameFile=function(de,ye,J,F){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var Te;N.is(J)||M.is(J)?Te=J:F=J;var Oe,xt;if(Te===void 0?Oe=G.create(de,ye,F):(xt=M.is(Te)?Te:this._changeAnnotations.manage(Te),Oe=G.create(de,ye,F,xt)),this._workspaceEdit.documentChanges.push(Oe),xt!==void 0)return xt},O.prototype.deleteFile=function(de,ye,J){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var F;N.is(ye)||M.is(ye)?F=ye:J=ye;var Te,Oe;if(F===void 0?Te=q.create(de,J):(Oe=M.is(F)?F:this._changeAnnotations.manage(F),Te=q.create(de,J,Oe)),this._workspaceEdit.documentChanges.push(Te),Oe!==void 0)return Oe},O}();t.WorkspaceChange=U;var V;(function(O){function de(J){return{uri:J}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.string(F.uri)}s(ye,"is"),O.is=ye})(V||(t.TextDocumentIdentifier=V={}));var K;(function(O){function de(J,F){return{uri:J,version:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.string(F.uri)&&Ie.integer(F.version)}s(ye,"is"),O.is=ye})(K||(t.VersionedTextDocumentIdentifier=K={}));var ae;(function(O){function de(J,F){return{uri:J,version:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.string(F.uri)&&(F.version===null||Ie.integer(F.version))}s(ye,"is"),O.is=ye})(ae||(t.OptionalVersionedTextDocumentIdentifier=ae={}));var re;(function(O){function de(J,F,Te,Oe){return{uri:J,languageId:F,version:Te,text:Oe}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.string(F.uri)&&Ie.string(F.languageId)&&Ie.integer(F.version)&&Ie.string(F.text)}s(ye,"is"),O.is=ye})(re||(t.TextDocumentItem=re={}));var le;(function(O){O.PlainText="plaintext",O.Markdown="markdown";function de(ye){var J=ye;return J===O.PlainText||J===O.Markdown}s(de,"is"),O.is=de})(le||(t.MarkupKind=le={}));var ce;(function(O){function de(ye){var J=ye;return Ie.objectLiteral(ye)&&le.is(J.kind)&&Ie.string(J.value)}s(de,"is"),O.is=de})(ce||(t.MarkupContent=ce={}));var De;(function(O){O.Text=1,O.Method=2,O.Function=3,O.Constructor=4,O.Field=5,O.Variable=6,O.Class=7,O.Interface=8,O.Module=9,O.Property=10,O.Unit=11,O.Value=12,O.Enum=13,O.Keyword=14,O.Snippet=15,O.Color=16,O.File=17,O.Reference=18,O.Folder=19,O.EnumMember=20,O.Constant=21,O.Struct=22,O.Event=23,O.Operator=24,O.TypeParameter=25})(De||(t.CompletionItemKind=De={}));var be;(function(O){O.PlainText=1,O.Snippet=2})(be||(t.InsertTextFormat=be={}));var qe;(function(O){O.Deprecated=1})(qe||(t.CompletionItemTag=qe={}));var Re;(function(O){function de(J,F,Te){return{newText:J,insert:F,replace:Te}}s(de,"create"),O.create=de;function ye(J){var F=J;return F&&Ie.string(F.newText)&&l.is(F.insert)&&l.is(F.replace)}s(ye,"is"),O.is=ye})(Re||(t.InsertReplaceEdit=Re={}));var Xe;(function(O){O.asIs=1,O.adjustIndentation=2})(Xe||(t.InsertTextMode=Xe={}));var ft;(function(O){function de(ye){var J=ye;return J&&(Ie.string(J.detail)||J.detail===void 0)&&(Ie.string(J.description)||J.description===void 0)}s(de,"is"),O.is=de})(ft||(t.CompletionItemLabelDetails=ft={}));var at;(function(O){function de(ye){return{label:ye}}s(de,"create"),O.create=de})(at||(t.CompletionItem=at={}));var lt;(function(O){function de(ye,J){return{items:ye||[],isIncomplete:!!J}}s(de,"create"),O.create=de})(lt||(t.CompletionList=lt={}));var oe;(function(O){function de(J){return J.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(de,"fromPlainText"),O.fromPlainText=de;function ye(J){var F=J;return Ie.string(F)||Ie.objectLiteral(F)&&Ie.string(F.language)&&Ie.string(F.value)}s(ye,"is"),O.is=ye})(oe||(t.MarkedString=oe={}));var Ne;(function(O){function de(ye){var J=ye;return!!J&&Ie.objectLiteral(J)&&(ce.is(J.contents)||oe.is(J.contents)||Ie.typedArray(J.contents,oe.is))&&(ye.range===void 0||l.is(ye.range))}s(de,"is"),O.is=de})(Ne||(t.Hover=Ne={}));var Ae;(function(O){function de(ye,J){return J?{label:ye,documentation:J}:{label:ye}}s(de,"create"),O.create=de})(Ae||(t.ParameterInformation=Ae={}));var Ge;(function(O){function de(ye,J){for(var F=[],Te=2;Te<arguments.length;Te++)F[Te-2]=arguments[Te];var Oe={label:ye};return Ie.defined(J)&&(Oe.documentation=J),Ie.defined(F)?Oe.parameters=F:Oe.parameters=[],Oe}s(de,"create"),O.create=de})(Ge||(t.SignatureInformation=Ge={}));var Y;(function(O){O.Text=1,O.Read=2,O.Write=3})(Y||(t.DocumentHighlightKind=Y={}));var ne;(function(O){function de(ye,J){var F={range:ye};return Ie.number(J)&&(F.kind=J),F}s(de,"create"),O.create=de})(ne||(t.DocumentHighlight=ne={}));var Fe;(function(O){O.File=1,O.Module=2,O.Namespace=3,O.Package=4,O.Class=5,O.Method=6,O.Property=7,O.Field=8,O.Constructor=9,O.Enum=10,O.Interface=11,O.Function=12,O.Variable=13,O.Constant=14,O.String=15,O.Number=16,O.Boolean=17,O.Array=18,O.Object=19,O.Key=20,O.Null=21,O.EnumMember=22,O.Struct=23,O.Event=24,O.Operator=25,O.TypeParameter=26})(Fe||(t.SymbolKind=Fe={}));var Se;(function(O){O.Deprecated=1})(Se||(t.SymbolTag=Se={}));var Ce;(function(O){function de(ye,J,F,Te,Oe){var xt={name:ye,kind:J,location:{uri:Te,range:F}};return Oe&&(xt.containerName=Oe),xt}s(de,"create"),O.create=de})(Ce||(t.SymbolInformation=Ce={}));var Ue;(function(O){function de(ye,J,F,Te){return Te!==void 0?{name:ye,kind:J,location:{uri:F,range:Te}}:{name:ye,kind:J,location:{uri:F}}}s(de,"create"),O.create=de})(Ue||(t.WorkspaceSymbol=Ue={}));var Ve;(function(O){function de(J,F,Te,Oe,xt,Wt){var Lt={name:J,detail:F,kind:Te,range:Oe,selectionRange:xt};return Wt!==void 0&&(Lt.children=Wt),Lt}s(de,"create"),O.create=de;function ye(J){var F=J;return F&&Ie.string(F.name)&&Ie.number(F.kind)&&l.is(F.range)&&l.is(F.selectionRange)&&(F.detail===void 0||Ie.string(F.detail))&&(F.deprecated===void 0||Ie.boolean(F.deprecated))&&(F.children===void 0||Array.isArray(F.children))&&(F.tags===void 0||Array.isArray(F.tags))}s(ye,"is"),O.is=ye})(Ve||(t.DocumentSymbol=Ve={}));var tt;(function(O){O.Empty="",O.QuickFix="quickfix",O.Refactor="refactor",O.RefactorExtract="refactor.extract",O.RefactorInline="refactor.inline",O.RefactorRewrite="refactor.rewrite",O.Source="source",O.SourceOrganizeImports="source.organizeImports",O.SourceFixAll="source.fixAll"})(tt||(t.CodeActionKind=tt={}));var Ct;(function(O){O.Invoked=1,O.Automatic=2})(Ct||(t.CodeActionTriggerKind=Ct={}));var Pt;(function(O){function de(J,F,Te){var Oe={diagnostics:J};return F!=null&&(Oe.only=F),Te!=null&&(Oe.triggerKind=Te),Oe}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.typedArray(F.diagnostics,_.is)&&(F.only===void 0||Ie.typedArray(F.only,Ie.string))&&(F.triggerKind===void 0||F.triggerKind===Ct.Invoked||F.triggerKind===Ct.Automatic)}s(ye,"is"),O.is=ye})(Pt||(t.CodeActionContext=Pt={}));var yt;(function(O){function de(J,F,Te){var Oe={title:J},xt=!0;return typeof F=="string"?(xt=!1,Oe.kind=F):k.is(F)?Oe.command=F:Oe.edit=F,xt&&Te!==void 0&&(Oe.kind=Te),Oe}s(de,"create"),O.create=de;function ye(J){var F=J;return F&&Ie.string(F.title)&&(F.diagnostics===void 0||Ie.typedArray(F.diagnostics,_.is))&&(F.kind===void 0||Ie.string(F.kind))&&(F.edit!==void 0||F.command!==void 0)&&(F.command===void 0||k.is(F.command))&&(F.isPreferred===void 0||Ie.boolean(F.isPreferred))&&(F.edit===void 0||ie.is(F.edit))}s(ye,"is"),O.is=ye})(yt||(t.CodeAction=yt={}));var Kt;(function(O){function de(J,F){var Te={range:J};return Ie.defined(F)&&(Te.data=F),Te}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&l.is(F.range)&&(Ie.undefined(F.command)||k.is(F.command))}s(ye,"is"),O.is=ye})(Kt||(t.CodeLens=Kt={}));var Xt;(function(O){function de(J,F){return{tabSize:J,insertSpaces:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&Ie.uinteger(F.tabSize)&&Ie.boolean(F.insertSpaces)}s(ye,"is"),O.is=ye})(Xt||(t.FormattingOptions=Xt={}));var lr;(function(O){function de(J,F,Te){return{range:J,target:F,data:Te}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&l.is(F.range)&&(Ie.undefined(F.target)||Ie.string(F.target))}s(ye,"is"),O.is=ye})(lr||(t.DocumentLink=lr={}));var ge;(function(O){function de(J,F){return{range:J,parent:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&l.is(F.range)&&(F.parent===void 0||O.is(F.parent))}s(ye,"is"),O.is=ye})(ge||(t.SelectionRange=ge={}));var Me;(function(O){O.namespace="namespace",O.type="type",O.class="class",O.enum="enum",O.interface="interface",O.struct="struct",O.typeParameter="typeParameter",O.parameter="parameter",O.variable="variable",O.property="property",O.enumMember="enumMember",O.event="event",O.function="function",O.method="method",O.macro="macro",O.keyword="keyword",O.modifier="modifier",O.comment="comment",O.string="string",O.number="number",O.regexp="regexp",O.operator="operator",O.decorator="decorator"})(Me||(t.SemanticTokenTypes=Me={}));var Je;(function(O){O.declaration="declaration",O.definition="definition",O.readonly="readonly",O.static="static",O.deprecated="deprecated",O.abstract="abstract",O.async="async",O.modification="modification",O.documentation="documentation",O.defaultLibrary="defaultLibrary"})(Je||(t.SemanticTokenModifiers=Je={}));var rt;(function(O){function de(ye){var J=ye;return Ie.objectLiteral(J)&&(J.resultId===void 0||typeof J.resultId=="string")&&Array.isArray(J.data)&&(J.data.length===0||typeof J.data[0]=="number")}s(de,"is"),O.is=de})(rt||(t.SemanticTokens=rt={}));var St;(function(O){function de(J,F){return{range:J,text:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return F!=null&&l.is(F.range)&&Ie.string(F.text)}s(ye,"is"),O.is=ye})(St||(t.InlineValueText=St={}));var bt;(function(O){function de(J,F,Te){return{range:J,variableName:F,caseSensitiveLookup:Te}}s(de,"create"),O.create=de;function ye(J){var F=J;return F!=null&&l.is(F.range)&&Ie.boolean(F.caseSensitiveLookup)&&(Ie.string(F.variableName)||F.variableName===void 0)}s(ye,"is"),O.is=ye})(bt||(t.InlineValueVariableLookup=bt={}));var Mt;(function(O){function de(J,F){return{range:J,expression:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return F!=null&&l.is(F.range)&&(Ie.string(F.expression)||F.expression===void 0)}s(ye,"is"),O.is=ye})(Mt||(t.InlineValueEvaluatableExpression=Mt={}));var Ot;(function(O){function de(J,F){return{frameId:J,stoppedLocation:F}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.defined(F)&&l.is(J.stoppedLocation)}s(ye,"is"),O.is=ye})(Ot||(t.InlineValueContext=Ot={}));var wt;(function(O){O.Type=1,O.Parameter=2;function de(ye){return ye===1||ye===2}s(de,"is"),O.is=de})(wt||(t.InlayHintKind=wt={}));var kt;(function(O){function de(J){return{value:J}}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&(F.tooltip===void 0||Ie.string(F.tooltip)||ce.is(F.tooltip))&&(F.location===void 0||c.is(F.location))&&(F.command===void 0||k.is(F.command))}s(ye,"is"),O.is=ye})(kt||(t.InlayHintLabelPart=kt={}));var _t;(function(O){function de(J,F,Te){var Oe={position:J,label:F};return Te!==void 0&&(Oe.kind=Te),Oe}s(de,"create"),O.create=de;function ye(J){var F=J;return Ie.objectLiteral(F)&&a.is(F.position)&&(Ie.string(F.label)||Ie.typedArray(F.label,kt.is))&&(F.kind===void 0||wt.is(F.kind))&&F.textEdits===void 0||Ie.typedArray(F.textEdits,B.is)&&(F.tooltip===void 0||Ie.string(F.tooltip)||ce.is(F.tooltip))&&(F.paddingLeft===void 0||Ie.boolean(F.paddingLeft))&&(F.paddingRight===void 0||Ie.boolean(F.paddingRight))}s(ye,"is"),O.is=ye})(_t||(t.InlayHint=_t={}));var qt;(function(O){function de(ye){return{kind:"snippet",value:ye}}s(de,"createSnippet"),O.createSnippet=de})(qt||(t.StringValue=qt={}));var $t;(function(O){function de(ye,J,F,Te){return{insertText:ye,filterText:J,range:F,command:Te}}s(de,"create"),O.create=de})($t||(t.InlineCompletionItem=$t={}));var Zt;(function(O){function de(ye){return{items:ye}}s(de,"create"),O.create=de})(Zt||(t.InlineCompletionList=Zt={}));var dr;(function(O){O.Invoked=0,O.Automatic=1})(dr||(t.InlineCompletionTriggerKind=dr={}));var xr;(function(O){function de(ye,J){return{range:ye,text:J}}s(de,"create"),O.create=de})(xr||(t.SelectedCompletionInfo=xr={}));var ur;(function(O){function de(ye,J){return{triggerKind:ye,selectedCompletionInfo:J}}s(de,"create"),O.create=de})(ur||(t.InlineCompletionContext=ur={}));var mr;(function(O){function de(ye){var J=ye;return Ie.objectLiteral(J)&&n.is(J.uri)&&Ie.string(J.name)}s(de,"is"),O.is=de})(mr||(t.WorkspaceFolder=mr={})),t.EOL=[`
`,`\r
`,"\r"];var nr;(function(O){function de(Te,Oe,xt,Wt){return new hr(Te,Oe,xt,Wt)}s(de,"create"),O.create=de;function ye(Te){var Oe=Te;return!!(Ie.defined(Oe)&&Ie.string(Oe.uri)&&(Ie.undefined(Oe.languageId)||Ie.string(Oe.languageId))&&Ie.uinteger(Oe.lineCount)&&Ie.func(Oe.getText)&&Ie.func(Oe.positionAt)&&Ie.func(Oe.offsetAt))}s(ye,"is"),O.is=ye;function J(Te,Oe){for(var xt=Te.getText(),Wt=F(Oe,function(fr,zo){var wm=fr.range.start.line-zo.range.start.line;return wm===0?fr.range.start.character-zo.range.start.character:wm}),Lt=xt.length,sr=Wt.length-1;sr>=0;sr--){var cr=Wt[sr],Ut=Te.offsetAt(cr.range.start),It=Te.offsetAt(cr.range.end);if(It<=Lt)xt=xt.substring(0,Ut)+cr.newText+xt.substring(It,xt.length);else throw new Error("Overlapping edit");Lt=Ut}return xt}s(J,"applyEdits"),O.applyEdits=J;function F(Te,Oe){if(Te.length<=1)return Te;var xt=Te.length/2|0,Wt=Te.slice(0,xt),Lt=Te.slice(xt);F(Wt,Oe),F(Lt,Oe);for(var sr=0,cr=0,Ut=0;sr<Wt.length&&cr<Lt.length;){var It=Oe(Wt[sr],Lt[cr]);It<=0?Te[Ut++]=Wt[sr++]:Te[Ut++]=Lt[cr++]}for(;sr<Wt.length;)Te[Ut++]=Wt[sr++];for(;cr<Lt.length;)Te[Ut++]=Lt[cr++];return Te}s(F,"mergeSort")})(nr||(t.TextDocument=nr={}));var hr=function(){function O(de,ye,J,F){this._uri=de,this._languageId=ye,this._version=J,this._content=F,this._lineOffsets=void 0}return s(O,"FullTextDocument"),Object.defineProperty(O.prototype,"uri",{get:s(function(){return this._uri},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"languageId",{get:s(function(){return this._languageId},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"version",{get:s(function(){return this._version},"get"),enumerable:!1,configurable:!0}),O.prototype.getText=function(de){if(de){var ye=this.offsetAt(de.start),J=this.offsetAt(de.end);return this._content.substring(ye,J)}return this._content},O.prototype.update=function(de,ye){this._content=de.text,this._version=ye,this._lineOffsets=void 0},O.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var de=[],ye=this._content,J=!0,F=0;F<ye.length;F++){J&&(de.push(F),J=!1);var Te=ye.charAt(F);J=Te==="\r"||Te===`
`,Te==="\r"&&F+1<ye.length&&ye.charAt(F+1)===`
`&&F++}J&&ye.length>0&&de.push(ye.length),this._lineOffsets=de}return this._lineOffsets},O.prototype.positionAt=function(de){de=Math.max(Math.min(de,this._content.length),0);var ye=this.getLineOffsets(),J=0,F=ye.length;if(F===0)return a.create(0,de);for(;J<F;){var Te=Math.floor((J+F)/2);ye[Te]>de?F=Te:J=Te+1}var Oe=J-1;return a.create(Oe,de-ye[Oe])},O.prototype.offsetAt=function(de){var ye=this.getLineOffsets();if(de.line>=ye.length)return this._content.length;if(de.line<0)return 0;var J=ye[de.line],F=de.line+1<ye.length?ye[de.line+1]:this._content.length;return Math.max(Math.min(J+de.character,F),J)},Object.defineProperty(O.prototype,"lineCount",{get:s(function(){return this.getLineOffsets().length},"get"),enumerable:!1,configurable:!0}),O}(),Ie;(function(O){var de=Object.prototype.toString;function ye(It){return typeof It<"u"}s(ye,"defined"),O.defined=ye;function J(It){return typeof It>"u"}s(J,"undefined"),O.undefined=J;function F(It){return It===!0||It===!1}s(F,"boolean"),O.boolean=F;function Te(It){return de.call(It)==="[object String]"}s(Te,"string"),O.string=Te;function Oe(It){return de.call(It)==="[object Number]"}s(Oe,"number"),O.number=Oe;function xt(It,fr,zo){return de.call(It)==="[object Number]"&&fr<=It&&It<=zo}s(xt,"numberRange"),O.numberRange=xt;function Wt(It){return de.call(It)==="[object Number]"&&-2147483648<=It&&It<=2147483647}s(Wt,"integer"),O.integer=Wt;function Lt(It){return de.call(It)==="[object Number]"&&0<=It&&It<=2147483647}s(Lt,"uinteger"),O.uinteger=Lt;function sr(It){return de.call(It)==="[object Function]"}s(sr,"func"),O.func=sr;function cr(It){return It!==null&&typeof It=="object"}s(cr,"objectLiteral"),O.objectLiteral=cr;function Ut(It,fr){return Array.isArray(It)&&It.every(fr)}s(Ut,"typedArray"),O.typedArray=Ut})(Ie||(Ie={}))})});var Ls=H(tu=>{"use strict";d();Object.defineProperty(tu,"__esModule",{value:!0});tu.ProtocolNotificationType=tu.ProtocolNotificationType0=tu.ProtocolRequestType=tu.ProtocolRequestType0=tu.RegistrationType=tu.MessageDirection=void 0;var UI=Jx(),oye;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(oye||(tu.MessageDirection=oye={}));var aZ=class{static{s(this,"RegistrationType")}constructor(t){this.method=t}};tu.RegistrationType=aZ;var lZ=class extends UI.RequestType0{static{s(this,"ProtocolRequestType0")}constructor(t){super(t)}};tu.ProtocolRequestType0=lZ;var cZ=class extends UI.RequestType{static{s(this,"ProtocolRequestType")}constructor(t){super(t,UI.ParameterStructures.byName)}};tu.ProtocolRequestType=cZ;var uZ=class extends UI.NotificationType0{static{s(this,"ProtocolNotificationType0")}constructor(t){super(t)}};tu.ProtocolNotificationType0=uZ;var fZ=class extends UI.NotificationType{static{s(this,"ProtocolNotificationType")}constructor(t){super(t,UI.ParameterStructures.byName)}};tu.ProtocolNotificationType=fZ});var FL=H(qa=>{"use strict";d();Object.defineProperty(qa,"__esModule",{value:!0});qa.objectLiteral=qa.typedArray=qa.stringArray=qa.array=qa.func=qa.error=qa.number=qa.string=qa.boolean=void 0;function $rt(e){return e===!0||e===!1}s($rt,"boolean");qa.boolean=$rt;function sye(e){return typeof e=="string"||e instanceof String}s(sye,"string");qa.string=sye;function zrt(e){return typeof e=="number"||e instanceof Number}s(zrt,"number");qa.number=zrt;function Yrt(e){return e instanceof Error}s(Yrt,"error");qa.error=Yrt;function Krt(e){return typeof e=="function"}s(Krt,"func");qa.func=Krt;function aye(e){return Array.isArray(e)}s(aye,"array");qa.array=aye;function Jrt(e){return aye(e)&&e.every(t=>sye(t))}s(Jrt,"stringArray");qa.stringArray=Jrt;function Xrt(e,t){return Array.isArray(e)&&e.every(t)}s(Xrt,"typedArray");qa.typedArray=Xrt;function Zrt(e){return e!==null&&typeof e=="object"}s(Zrt,"objectLiteral");qa.objectLiteral=Zrt});var uye=H(ML=>{"use strict";d();Object.defineProperty(ML,"__esModule",{value:!0});ML.ImplementationRequest=void 0;var lye=Ls(),cye;(function(e){e.method="textDocument/implementation",e.messageDirection=lye.MessageDirection.clientToServer,e.type=new lye.ProtocolRequestType(e.method)})(cye||(ML.ImplementationRequest=cye={}))});var mye=H(QL=>{"use strict";d();Object.defineProperty(QL,"__esModule",{value:!0});QL.TypeDefinitionRequest=void 0;var fye=Ls(),dye;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=fye.MessageDirection.clientToServer,e.type=new fye.ProtocolRequestType(e.method)})(dye||(QL.TypeDefinitionRequest=dye={}))});var gye=H(qI=>{"use strict";d();Object.defineProperty(qI,"__esModule",{value:!0});qI.DidChangeWorkspaceFoldersNotification=qI.WorkspaceFoldersRequest=void 0;var OL=Ls(),hye;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=OL.MessageDirection.serverToClient,e.type=new OL.ProtocolRequestType0(e.method)})(hye||(qI.WorkspaceFoldersRequest=hye={}));var pye;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=OL.MessageDirection.clientToServer,e.type=new OL.ProtocolNotificationType(e.method)})(pye||(qI.DidChangeWorkspaceFoldersNotification=pye={}))});var Cye=H(UL=>{"use strict";d();Object.defineProperty(UL,"__esModule",{value:!0});UL.ConfigurationRequest=void 0;var Aye=Ls(),yye;(function(e){e.method="workspace/configuration",e.messageDirection=Aye.MessageDirection.serverToClient,e.type=new Aye.ProtocolRequestType(e.method)})(yye||(UL.ConfigurationRequest=yye={}))});var bye=H(WI=>{"use strict";d();Object.defineProperty(WI,"__esModule",{value:!0});WI.ColorPresentationRequest=WI.DocumentColorRequest=void 0;var qL=Ls(),xye;(function(e){e.method="textDocument/documentColor",e.messageDirection=qL.MessageDirection.clientToServer,e.type=new qL.ProtocolRequestType(e.method)})(xye||(WI.DocumentColorRequest=xye={}));var vye;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=qL.MessageDirection.clientToServer,e.type=new qL.ProtocolRequestType(e.method)})(vye||(WI.ColorPresentationRequest=vye={}))});var Tye=H(GI=>{"use strict";d();Object.defineProperty(GI,"__esModule",{value:!0});GI.FoldingRangeRefreshRequest=GI.FoldingRangeRequest=void 0;var WL=Ls(),Eye;(function(e){e.method="textDocument/foldingRange",e.messageDirection=WL.MessageDirection.clientToServer,e.type=new WL.ProtocolRequestType(e.method)})(Eye||(GI.FoldingRangeRequest=Eye={}));var Iye;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=WL.MessageDirection.serverToClient,e.type=new WL.ProtocolRequestType0(e.method)})(Iye||(GI.FoldingRangeRefreshRequest=Iye={}))});var Sye=H(GL=>{"use strict";d();Object.defineProperty(GL,"__esModule",{value:!0});GL.DeclarationRequest=void 0;var wye=Ls(),_ye;(function(e){e.method="textDocument/declaration",e.messageDirection=wye.MessageDirection.clientToServer,e.type=new wye.ProtocolRequestType(e.method)})(_ye||(GL.DeclarationRequest=_ye={}))});var Bye=H(HL=>{"use strict";d();Object.defineProperty(HL,"__esModule",{value:!0});HL.SelectionRangeRequest=void 0;var Rye=Ls(),kye;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Rye.MessageDirection.clientToServer,e.type=new Rye.ProtocolRequestType(e.method)})(kye||(HL.SelectionRangeRequest=kye={}))});var Lye=H(A5=>{"use strict";d();Object.defineProperty(A5,"__esModule",{value:!0});A5.WorkDoneProgressCancelNotification=A5.WorkDoneProgressCreateRequest=A5.WorkDoneProgress=void 0;var ent=Jx(),jL=Ls(),Dye;(function(e){e.type=new ent.ProgressType;function t(r){return r===e.type}s(t,"is"),e.is=t})(Dye||(A5.WorkDoneProgress=Dye={}));var Pye;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=jL.MessageDirection.serverToClient,e.type=new jL.ProtocolRequestType(e.method)})(Pye||(A5.WorkDoneProgressCreateRequest=Pye={}));var Nye;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=jL.MessageDirection.clientToServer,e.type=new jL.ProtocolNotificationType(e.method)})(Nye||(A5.WorkDoneProgressCancelNotification=Nye={}))});var Oye=H(y5=>{"use strict";d();Object.defineProperty(y5,"__esModule",{value:!0});y5.CallHierarchyOutgoingCallsRequest=y5.CallHierarchyIncomingCallsRequest=y5.CallHierarchyPrepareRequest=void 0;var HI=Ls(),Fye;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=HI.MessageDirection.clientToServer,e.type=new HI.ProtocolRequestType(e.method)})(Fye||(y5.CallHierarchyPrepareRequest=Fye={}));var Mye;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=HI.MessageDirection.clientToServer,e.type=new HI.ProtocolRequestType(e.method)})(Mye||(y5.CallHierarchyIncomingCallsRequest=Mye={}));var Qye;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=HI.MessageDirection.clientToServer,e.type=new HI.ProtocolRequestType(e.method)})(Qye||(y5.CallHierarchyOutgoingCallsRequest=Qye={}))});var jye=H(ru=>{"use strict";d();Object.defineProperty(ru,"__esModule",{value:!0});ru.SemanticTokensRefreshRequest=ru.SemanticTokensRangeRequest=ru.SemanticTokensDeltaRequest=ru.SemanticTokensRequest=ru.SemanticTokensRegistrationType=ru.TokenFormat=void 0;var fA=Ls(),Uye;(function(e){e.Relative="relative"})(Uye||(ru.TokenFormat=Uye={}));var m_;(function(e){e.method="textDocument/semanticTokens",e.type=new fA.RegistrationType(e.method)})(m_||(ru.SemanticTokensRegistrationType=m_={}));var qye;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=fA.MessageDirection.clientToServer,e.type=new fA.ProtocolRequestType(e.method),e.registrationMethod=m_.method})(qye||(ru.SemanticTokensRequest=qye={}));var Wye;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=fA.MessageDirection.clientToServer,e.type=new fA.ProtocolRequestType(e.method),e.registrationMethod=m_.method})(Wye||(ru.SemanticTokensDeltaRequest=Wye={}));var Gye;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=fA.MessageDirection.clientToServer,e.type=new fA.ProtocolRequestType(e.method),e.registrationMethod=m_.method})(Gye||(ru.SemanticTokensRangeRequest=Gye={}));var Hye;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=fA.MessageDirection.serverToClient,e.type=new fA.ProtocolRequestType0(e.method)})(Hye||(ru.SemanticTokensRefreshRequest=Hye={}))});var zye=H(VL=>{"use strict";d();Object.defineProperty(VL,"__esModule",{value:!0});VL.ShowDocumentRequest=void 0;var Vye=Ls(),$ye;(function(e){e.method="window/showDocument",e.messageDirection=Vye.MessageDirection.serverToClient,e.type=new Vye.ProtocolRequestType(e.method)})($ye||(VL.ShowDocumentRequest=$ye={}))});var Jye=H($L=>{"use strict";d();Object.defineProperty($L,"__esModule",{value:!0});$L.LinkedEditingRangeRequest=void 0;var Yye=Ls(),Kye;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Yye.MessageDirection.clientToServer,e.type=new Yye.ProtocolRequestType(e.method)})(Kye||($L.LinkedEditingRangeRequest=Kye={}))});var o5e=H(Mc=>{"use strict";d();Object.defineProperty(Mc,"__esModule",{value:!0});Mc.WillDeleteFilesRequest=Mc.DidDeleteFilesNotification=Mc.DidRenameFilesNotification=Mc.WillRenameFilesRequest=Mc.DidCreateFilesNotification=Mc.WillCreateFilesRequest=Mc.FileOperationPatternKind=void 0;var Id=Ls(),Xye;(function(e){e.file="file",e.folder="folder"})(Xye||(Mc.FileOperationPatternKind=Xye={}));var Zye;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolRequestType(e.method)})(Zye||(Mc.WillCreateFilesRequest=Zye={}));var e5e;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolNotificationType(e.method)})(e5e||(Mc.DidCreateFilesNotification=e5e={}));var t5e;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolRequestType(e.method)})(t5e||(Mc.WillRenameFilesRequest=t5e={}));var r5e;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolNotificationType(e.method)})(r5e||(Mc.DidRenameFilesNotification=r5e={}));var n5e;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolNotificationType(e.method)})(n5e||(Mc.DidDeleteFilesNotification=n5e={}));var i5e;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolRequestType(e.method)})(i5e||(Mc.WillDeleteFilesRequest=i5e={}))});var u5e=H(C5=>{"use strict";d();Object.defineProperty(C5,"__esModule",{value:!0});C5.MonikerRequest=C5.MonikerKind=C5.UniquenessLevel=void 0;var s5e=Ls(),a5e;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(a5e||(C5.UniquenessLevel=a5e={}));var l5e;(function(e){e.$import="import",e.$export="export",e.local="local"})(l5e||(C5.MonikerKind=l5e={}));var c5e;(function(e){e.method="textDocument/moniker",e.messageDirection=s5e.MessageDirection.clientToServer,e.type=new s5e.ProtocolRequestType(e.method)})(c5e||(C5.MonikerRequest=c5e={}))});var h5e=H(x5=>{"use strict";d();Object.defineProperty(x5,"__esModule",{value:!0});x5.TypeHierarchySubtypesRequest=x5.TypeHierarchySupertypesRequest=x5.TypeHierarchyPrepareRequest=void 0;var jI=Ls(),f5e;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=jI.MessageDirection.clientToServer,e.type=new jI.ProtocolRequestType(e.method)})(f5e||(x5.TypeHierarchyPrepareRequest=f5e={}));var d5e;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=jI.MessageDirection.clientToServer,e.type=new jI.ProtocolRequestType(e.method)})(d5e||(x5.TypeHierarchySupertypesRequest=d5e={}));var m5e;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=jI.MessageDirection.clientToServer,e.type=new jI.ProtocolRequestType(e.method)})(m5e||(x5.TypeHierarchySubtypesRequest=m5e={}))});var A5e=H(VI=>{"use strict";d();Object.defineProperty(VI,"__esModule",{value:!0});VI.InlineValueRefreshRequest=VI.InlineValueRequest=void 0;var zL=Ls(),p5e;(function(e){e.method="textDocument/inlineValue",e.messageDirection=zL.MessageDirection.clientToServer,e.type=new zL.ProtocolRequestType(e.method)})(p5e||(VI.InlineValueRequest=p5e={}));var g5e;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=zL.MessageDirection.serverToClient,e.type=new zL.ProtocolRequestType0(e.method)})(g5e||(VI.InlineValueRefreshRequest=g5e={}))});var v5e=H(v5=>{"use strict";d();Object.defineProperty(v5,"__esModule",{value:!0});v5.InlayHintRefreshRequest=v5.InlayHintResolveRequest=v5.InlayHintRequest=void 0;var $I=Ls(),y5e;(function(e){e.method="textDocument/inlayHint",e.messageDirection=$I.MessageDirection.clientToServer,e.type=new $I.ProtocolRequestType(e.method)})(y5e||(v5.InlayHintRequest=y5e={}));var C5e;(function(e){e.method="inlayHint/resolve",e.messageDirection=$I.MessageDirection.clientToServer,e.type=new $I.ProtocolRequestType(e.method)})(C5e||(v5.InlayHintResolveRequest=C5e={}));var x5e;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=$I.MessageDirection.serverToClient,e.type=new $I.ProtocolRequestType0(e.method)})(x5e||(v5.InlayHintRefreshRequest=x5e={}))});var S5e=H(Td=>{"use strict";d();Object.defineProperty(Td,"__esModule",{value:!0});Td.DiagnosticRefreshRequest=Td.WorkspaceDiagnosticRequest=Td.DocumentDiagnosticRequest=Td.DocumentDiagnosticReportKind=Td.DiagnosticServerCancellationData=void 0;var _5e=Jx(),tnt=FL(),zI=Ls(),b5e;(function(e){function t(r){let n=r;return n&&tnt.boolean(n.retriggerRequest)}s(t,"is"),e.is=t})(b5e||(Td.DiagnosticServerCancellationData=b5e={}));var E5e;(function(e){e.Full="full",e.Unchanged="unchanged"})(E5e||(Td.DocumentDiagnosticReportKind=E5e={}));var I5e;(function(e){e.method="textDocument/diagnostic",e.messageDirection=zI.MessageDirection.clientToServer,e.type=new zI.ProtocolRequestType(e.method),e.partialResult=new _5e.ProgressType})(I5e||(Td.DocumentDiagnosticRequest=I5e={}));var T5e;(function(e){e.method="workspace/diagnostic",e.messageDirection=zI.MessageDirection.clientToServer,e.type=new zI.ProtocolRequestType(e.method),e.partialResult=new _5e.ProgressType})(T5e||(Td.WorkspaceDiagnosticRequest=T5e={}));var w5e;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=zI.MessageDirection.serverToClient,e.type=new zI.ProtocolRequestType0(e.method)})(w5e||(Td.DiagnosticRefreshRequest=w5e={}))});var L5e=H(na=>{"use strict";d();Object.defineProperty(na,"__esModule",{value:!0});na.DidCloseNotebookDocumentNotification=na.DidSaveNotebookDocumentNotification=na.DidChangeNotebookDocumentNotification=na.NotebookCellArrayChange=na.DidOpenNotebookDocumentNotification=na.NotebookDocumentSyncRegistrationType=na.NotebookDocument=na.NotebookCell=na.ExecutionSummary=na.NotebookCellKind=void 0;var h_=LL(),oh=FL(),Kp=Ls(),dZ;(function(e){e.Markup=1,e.Code=2;function t(r){return r===1||r===2}s(t,"is"),e.is=t})(dZ||(na.NotebookCellKind=dZ={}));var mZ;(function(e){function t(i,o){let a={executionOrder:i};return(o===!0||o===!1)&&(a.success=o),a}s(t,"create"),e.create=t;function r(i){let o=i;return oh.objectLiteral(o)&&h_.uinteger.is(o.executionOrder)&&(o.success===void 0||oh.boolean(o.success))}s(r,"is"),e.is=r;function n(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}s(n,"equals"),e.equals=n})(mZ||(na.ExecutionSummary=mZ={}));var YL;(function(e){function t(o,a){return{kind:o,document:a}}s(t,"create"),e.create=t;function r(o){let a=o;return oh.objectLiteral(a)&&dZ.is(a.kind)&&h_.DocumentUri.is(a.document)&&(a.metadata===void 0||oh.objectLiteral(a.metadata))}s(r,"is"),e.is=r;function n(o,a){let l=new Set;return o.document!==a.document&&l.add("document"),o.kind!==a.kind&&l.add("kind"),o.executionSummary!==a.executionSummary&&l.add("executionSummary"),(o.metadata!==void 0||a.metadata!==void 0)&&!i(o.metadata,a.metadata)&&l.add("metadata"),(o.executionSummary!==void 0||a.executionSummary!==void 0)&&!mZ.equals(o.executionSummary,a.executionSummary)&&l.add("executionSummary"),l}s(n,"diff"),e.diff=n;function i(o,a){if(o===a)return!0;if(o==null||a===null||a===void 0||typeof o!=typeof a||typeof o!="object")return!1;let l=Array.isArray(o),c=Array.isArray(a);if(l!==c)return!1;if(l&&c){if(o.length!==a.length)return!1;for(let u=0;u<o.length;u++)if(!i(o[u],a[u]))return!1}if(oh.objectLiteral(o)&&oh.objectLiteral(a)){let u=Object.keys(o),f=Object.keys(a);if(u.length!==f.length||(u.sort(),f.sort(),!i(u,f)))return!1;for(let m=0;m<u.length;m++){let h=u[m];if(!i(o[h],a[h]))return!1}}return!0}s(i,"equalsMetadata")})(YL||(na.NotebookCell=YL={}));var R5e;(function(e){function t(n,i,o,a){return{uri:n,notebookType:i,version:o,cells:a}}s(t,"create"),e.create=t;function r(n){let i=n;return oh.objectLiteral(i)&&oh.string(i.uri)&&h_.integer.is(i.version)&&oh.typedArray(i.cells,YL.is)}s(r,"is"),e.is=r})(R5e||(na.NotebookDocument=R5e={}));var YI;(function(e){e.method="notebookDocument/sync",e.messageDirection=Kp.MessageDirection.clientToServer,e.type=new Kp.RegistrationType(e.method)})(YI||(na.NotebookDocumentSyncRegistrationType=YI={}));var k5e;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=Kp.MessageDirection.clientToServer,e.type=new Kp.ProtocolNotificationType(e.method),e.registrationMethod=YI.method})(k5e||(na.DidOpenNotebookDocumentNotification=k5e={}));var B5e;(function(e){function t(n){let i=n;return oh.objectLiteral(i)&&h_.uinteger.is(i.start)&&h_.uinteger.is(i.deleteCount)&&(i.cells===void 0||oh.typedArray(i.cells,YL.is))}s(t,"is"),e.is=t;function r(n,i,o){let a={start:n,deleteCount:i};return o!==void 0&&(a.cells=o),a}s(r,"create"),e.create=r})(B5e||(na.NotebookCellArrayChange=B5e={}));var D5e;(function(e){e.method="notebookDocument/didChange",e.messageDirection=Kp.MessageDirection.clientToServer,e.type=new Kp.ProtocolNotificationType(e.method),e.registrationMethod=YI.method})(D5e||(na.DidChangeNotebookDocumentNotification=D5e={}));var P5e;(function(e){e.method="notebookDocument/didSave",e.messageDirection=Kp.MessageDirection.clientToServer,e.type=new Kp.ProtocolNotificationType(e.method),e.registrationMethod=YI.method})(P5e||(na.DidSaveNotebookDocumentNotification=P5e={}));var N5e;(function(e){e.method="notebookDocument/didClose",e.messageDirection=Kp.MessageDirection.clientToServer,e.type=new Kp.ProtocolNotificationType(e.method),e.registrationMethod=YI.method})(N5e||(na.DidCloseNotebookDocumentNotification=N5e={}))});var Q5e=H(KL=>{"use strict";d();Object.defineProperty(KL,"__esModule",{value:!0});KL.InlineCompletionRequest=void 0;var F5e=Ls(),M5e;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=F5e.MessageDirection.clientToServer,e.type=new F5e.ProtocolRequestType(e.method)})(M5e||(KL.InlineCompletionRequest=M5e={}))});var JCe=H(Ee=>{"use strict";d();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.WorkspaceSymbolRequest=Ee.CodeActionResolveRequest=Ee.CodeActionRequest=Ee.DocumentSymbolRequest=Ee.DocumentHighlightRequest=Ee.ReferencesRequest=Ee.DefinitionRequest=Ee.SignatureHelpRequest=Ee.SignatureHelpTriggerKind=Ee.HoverRequest=Ee.CompletionResolveRequest=Ee.CompletionRequest=Ee.CompletionTriggerKind=Ee.PublishDiagnosticsNotification=Ee.WatchKind=Ee.RelativePattern=Ee.FileChangeType=Ee.DidChangeWatchedFilesNotification=Ee.WillSaveTextDocumentWaitUntilRequest=Ee.WillSaveTextDocumentNotification=Ee.TextDocumentSaveReason=Ee.DidSaveTextDocumentNotification=Ee.DidCloseTextDocumentNotification=Ee.DidChangeTextDocumentNotification=Ee.TextDocumentContentChangeEvent=Ee.DidOpenTextDocumentNotification=Ee.TextDocumentSyncKind=Ee.TelemetryEventNotification=Ee.LogMessageNotification=Ee.ShowMessageRequest=Ee.ShowMessageNotification=Ee.MessageType=Ee.DidChangeConfigurationNotification=Ee.ExitNotification=Ee.ShutdownRequest=Ee.InitializedNotification=Ee.InitializeErrorCodes=Ee.InitializeRequest=Ee.WorkDoneProgressOptions=Ee.TextDocumentRegistrationOptions=Ee.StaticRegistrationOptions=Ee.PositionEncodingKind=Ee.FailureHandlingKind=Ee.ResourceOperationKind=Ee.UnregistrationRequest=Ee.RegistrationRequest=Ee.DocumentSelector=Ee.NotebookCellTextDocumentFilter=Ee.NotebookDocumentFilter=Ee.TextDocumentFilter=void 0;Ee.MonikerRequest=Ee.MonikerKind=Ee.UniquenessLevel=Ee.WillDeleteFilesRequest=Ee.DidDeleteFilesNotification=Ee.WillRenameFilesRequest=Ee.DidRenameFilesNotification=Ee.WillCreateFilesRequest=Ee.DidCreateFilesNotification=Ee.FileOperationPatternKind=Ee.LinkedEditingRangeRequest=Ee.ShowDocumentRequest=Ee.SemanticTokensRegistrationType=Ee.SemanticTokensRefreshRequest=Ee.SemanticTokensRangeRequest=Ee.SemanticTokensDeltaRequest=Ee.SemanticTokensRequest=Ee.TokenFormat=Ee.CallHierarchyPrepareRequest=Ee.CallHierarchyOutgoingCallsRequest=Ee.CallHierarchyIncomingCallsRequest=Ee.WorkDoneProgressCancelNotification=Ee.WorkDoneProgressCreateRequest=Ee.WorkDoneProgress=Ee.SelectionRangeRequest=Ee.DeclarationRequest=Ee.FoldingRangeRefreshRequest=Ee.FoldingRangeRequest=Ee.ColorPresentationRequest=Ee.DocumentColorRequest=Ee.ConfigurationRequest=Ee.DidChangeWorkspaceFoldersNotification=Ee.WorkspaceFoldersRequest=Ee.TypeDefinitionRequest=Ee.ImplementationRequest=Ee.ApplyWorkspaceEditRequest=Ee.ExecuteCommandRequest=Ee.PrepareRenameRequest=Ee.RenameRequest=Ee.PrepareSupportDefaultBehavior=Ee.DocumentOnTypeFormattingRequest=Ee.DocumentRangesFormattingRequest=Ee.DocumentRangeFormattingRequest=Ee.DocumentFormattingRequest=Ee.DocumentLinkResolveRequest=Ee.DocumentLinkRequest=Ee.CodeLensRefreshRequest=Ee.CodeLensResolveRequest=Ee.CodeLensRequest=Ee.WorkspaceSymbolResolveRequest=void 0;Ee.InlineCompletionRequest=Ee.DidCloseNotebookDocumentNotification=Ee.DidSaveNotebookDocumentNotification=Ee.DidChangeNotebookDocumentNotification=Ee.NotebookCellArrayChange=Ee.DidOpenNotebookDocumentNotification=Ee.NotebookDocumentSyncRegistrationType=Ee.NotebookDocument=Ee.NotebookCell=Ee.ExecutionSummary=Ee.NotebookCellKind=Ee.DiagnosticRefreshRequest=Ee.WorkspaceDiagnosticRequest=Ee.DocumentDiagnosticRequest=Ee.DocumentDiagnosticReportKind=Ee.DiagnosticServerCancellationData=Ee.InlayHintRefreshRequest=Ee.InlayHintResolveRequest=Ee.InlayHintRequest=Ee.InlineValueRefreshRequest=Ee.InlineValueRequest=Ee.TypeHierarchySupertypesRequest=Ee.TypeHierarchySubtypesRequest=Ee.TypeHierarchyPrepareRequest=void 0;var tr=Ls(),O5e=LL(),Tl=FL(),rnt=uye();Object.defineProperty(Ee,"ImplementationRequest",{enumerable:!0,get:s(function(){return rnt.ImplementationRequest},"get")});var nnt=mye();Object.defineProperty(Ee,"TypeDefinitionRequest",{enumerable:!0,get:s(function(){return nnt.TypeDefinitionRequest},"get")});var $Ce=gye();Object.defineProperty(Ee,"WorkspaceFoldersRequest",{enumerable:!0,get:s(function(){return $Ce.WorkspaceFoldersRequest},"get")});Object.defineProperty(Ee,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:s(function(){return $Ce.DidChangeWorkspaceFoldersNotification},"get")});var int=Cye();Object.defineProperty(Ee,"ConfigurationRequest",{enumerable:!0,get:s(function(){return int.ConfigurationRequest},"get")});var zCe=bye();Object.defineProperty(Ee,"DocumentColorRequest",{enumerable:!0,get:s(function(){return zCe.DocumentColorRequest},"get")});Object.defineProperty(Ee,"ColorPresentationRequest",{enumerable:!0,get:s(function(){return zCe.ColorPresentationRequest},"get")});var YCe=Tye();Object.defineProperty(Ee,"FoldingRangeRequest",{enumerable:!0,get:s(function(){return YCe.FoldingRangeRequest},"get")});Object.defineProperty(Ee,"FoldingRangeRefreshRequest",{enumerable:!0,get:s(function(){return YCe.FoldingRangeRefreshRequest},"get")});var ont=Sye();Object.defineProperty(Ee,"DeclarationRequest",{enumerable:!0,get:s(function(){return ont.DeclarationRequest},"get")});var snt=Bye();Object.defineProperty(Ee,"SelectionRangeRequest",{enumerable:!0,get:s(function(){return snt.SelectionRangeRequest},"get")});var yZ=Lye();Object.defineProperty(Ee,"WorkDoneProgress",{enumerable:!0,get:s(function(){return yZ.WorkDoneProgress},"get")});Object.defineProperty(Ee,"WorkDoneProgressCreateRequest",{enumerable:!0,get:s(function(){return yZ.WorkDoneProgressCreateRequest},"get")});Object.defineProperty(Ee,"WorkDoneProgressCancelNotification",{enumerable:!0,get:s(function(){return yZ.WorkDoneProgressCancelNotification},"get")});var CZ=Oye();Object.defineProperty(Ee,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:s(function(){return CZ.CallHierarchyIncomingCallsRequest},"get")});Object.defineProperty(Ee,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:s(function(){return CZ.CallHierarchyOutgoingCallsRequest},"get")});Object.defineProperty(Ee,"CallHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return CZ.CallHierarchyPrepareRequest},"get")});var KI=jye();Object.defineProperty(Ee,"TokenFormat",{enumerable:!0,get:s(function(){return KI.TokenFormat},"get")});Object.defineProperty(Ee,"SemanticTokensRequest",{enumerable:!0,get:s(function(){return KI.SemanticTokensRequest},"get")});Object.defineProperty(Ee,"SemanticTokensDeltaRequest",{enumerable:!0,get:s(function(){return KI.SemanticTokensDeltaRequest},"get")});Object.defineProperty(Ee,"SemanticTokensRangeRequest",{enumerable:!0,get:s(function(){return KI.SemanticTokensRangeRequest},"get")});Object.defineProperty(Ee,"SemanticTokensRefreshRequest",{enumerable:!0,get:s(function(){return KI.SemanticTokensRefreshRequest},"get")});Object.defineProperty(Ee,"SemanticTokensRegistrationType",{enumerable:!0,get:s(function(){return KI.SemanticTokensRegistrationType},"get")});var ant=zye();Object.defineProperty(Ee,"ShowDocumentRequest",{enumerable:!0,get:s(function(){return ant.ShowDocumentRequest},"get")});var lnt=Jye();Object.defineProperty(Ee,"LinkedEditingRangeRequest",{enumerable:!0,get:s(function(){return lnt.LinkedEditingRangeRequest},"get")});var Xx=o5e();Object.defineProperty(Ee,"FileOperationPatternKind",{enumerable:!0,get:s(function(){return Xx.FileOperationPatternKind},"get")});Object.defineProperty(Ee,"DidCreateFilesNotification",{enumerable:!0,get:s(function(){return Xx.DidCreateFilesNotification},"get")});Object.defineProperty(Ee,"WillCreateFilesRequest",{enumerable:!0,get:s(function(){return Xx.WillCreateFilesRequest},"get")});Object.defineProperty(Ee,"DidRenameFilesNotification",{enumerable:!0,get:s(function(){return Xx.DidRenameFilesNotification},"get")});Object.defineProperty(Ee,"WillRenameFilesRequest",{enumerable:!0,get:s(function(){return Xx.WillRenameFilesRequest},"get")});Object.defineProperty(Ee,"DidDeleteFilesNotification",{enumerable:!0,get:s(function(){return Xx.DidDeleteFilesNotification},"get")});Object.defineProperty(Ee,"WillDeleteFilesRequest",{enumerable:!0,get:s(function(){return Xx.WillDeleteFilesRequest},"get")});var xZ=u5e();Object.defineProperty(Ee,"UniquenessLevel",{enumerable:!0,get:s(function(){return xZ.UniquenessLevel},"get")});Object.defineProperty(Ee,"MonikerKind",{enumerable:!0,get:s(function(){return xZ.MonikerKind},"get")});Object.defineProperty(Ee,"MonikerRequest",{enumerable:!0,get:s(function(){return xZ.MonikerRequest},"get")});var vZ=h5e();Object.defineProperty(Ee,"TypeHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return vZ.TypeHierarchyPrepareRequest},"get")});Object.defineProperty(Ee,"TypeHierarchySubtypesRequest",{enumerable:!0,get:s(function(){return vZ.TypeHierarchySubtypesRequest},"get")});Object.defineProperty(Ee,"TypeHierarchySupertypesRequest",{enumerable:!0,get:s(function(){return vZ.TypeHierarchySupertypesRequest},"get")});var KCe=A5e();Object.defineProperty(Ee,"InlineValueRequest",{enumerable:!0,get:s(function(){return KCe.InlineValueRequest},"get")});Object.defineProperty(Ee,"InlineValueRefreshRequest",{enumerable:!0,get:s(function(){return KCe.InlineValueRefreshRequest},"get")});var bZ=v5e();Object.defineProperty(Ee,"InlayHintRequest",{enumerable:!0,get:s(function(){return bZ.InlayHintRequest},"get")});Object.defineProperty(Ee,"InlayHintResolveRequest",{enumerable:!0,get:s(function(){return bZ.InlayHintResolveRequest},"get")});Object.defineProperty(Ee,"InlayHintRefreshRequest",{enumerable:!0,get:s(function(){return bZ.InlayHintRefreshRequest},"get")});var p_=S5e();Object.defineProperty(Ee,"DiagnosticServerCancellationData",{enumerable:!0,get:s(function(){return p_.DiagnosticServerCancellationData},"get")});Object.defineProperty(Ee,"DocumentDiagnosticReportKind",{enumerable:!0,get:s(function(){return p_.DocumentDiagnosticReportKind},"get")});Object.defineProperty(Ee,"DocumentDiagnosticRequest",{enumerable:!0,get:s(function(){return p_.DocumentDiagnosticRequest},"get")});Object.defineProperty(Ee,"WorkspaceDiagnosticRequest",{enumerable:!0,get:s(function(){return p_.WorkspaceDiagnosticRequest},"get")});Object.defineProperty(Ee,"DiagnosticRefreshRequest",{enumerable:!0,get:s(function(){return p_.DiagnosticRefreshRequest},"get")});var Jp=L5e();Object.defineProperty(Ee,"NotebookCellKind",{enumerable:!0,get:s(function(){return Jp.NotebookCellKind},"get")});Object.defineProperty(Ee,"ExecutionSummary",{enumerable:!0,get:s(function(){return Jp.ExecutionSummary},"get")});Object.defineProperty(Ee,"NotebookCell",{enumerable:!0,get:s(function(){return Jp.NotebookCell},"get")});Object.defineProperty(Ee,"NotebookDocument",{enumerable:!0,get:s(function(){return Jp.NotebookDocument},"get")});Object.defineProperty(Ee,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:s(function(){return Jp.NotebookDocumentSyncRegistrationType},"get")});Object.defineProperty(Ee,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Jp.DidOpenNotebookDocumentNotification},"get")});Object.defineProperty(Ee,"NotebookCellArrayChange",{enumerable:!0,get:s(function(){return Jp.NotebookCellArrayChange},"get")});Object.defineProperty(Ee,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Jp.DidChangeNotebookDocumentNotification},"get")});Object.defineProperty(Ee,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Jp.DidSaveNotebookDocumentNotification},"get")});Object.defineProperty(Ee,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:s(function(){return Jp.DidCloseNotebookDocumentNotification},"get")});var cnt=Q5e();Object.defineProperty(Ee,"InlineCompletionRequest",{enumerable:!0,get:s(function(){return cnt.InlineCompletionRequest},"get")});var hZ;(function(e){function t(r){let n=r;return Tl.string(n)||Tl.string(n.language)||Tl.string(n.scheme)||Tl.string(n.pattern)}s(t,"is"),e.is=t})(hZ||(Ee.TextDocumentFilter=hZ={}));var pZ;(function(e){function t(r){let n=r;return Tl.objectLiteral(n)&&(Tl.string(n.notebookType)||Tl.string(n.scheme)||Tl.string(n.pattern))}s(t,"is"),e.is=t})(pZ||(Ee.NotebookDocumentFilter=pZ={}));var gZ;(function(e){function t(r){let n=r;return Tl.objectLiteral(n)&&(Tl.string(n.notebook)||pZ.is(n.notebook))&&(n.language===void 0||Tl.string(n.language))}s(t,"is"),e.is=t})(gZ||(Ee.NotebookCellTextDocumentFilter=gZ={}));var AZ;(function(e){function t(r){if(!Array.isArray(r))return!1;for(let n of r)if(!Tl.string(n)&&!hZ.is(n)&&!gZ.is(n))return!1;return!0}s(t,"is"),e.is=t})(AZ||(Ee.DocumentSelector=AZ={}));var U5e;(function(e){e.method="client/registerCapability",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolRequestType(e.method)})(U5e||(Ee.RegistrationRequest=U5e={}));var q5e;(function(e){e.method="client/unregisterCapability",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolRequestType(e.method)})(q5e||(Ee.UnregistrationRequest=q5e={}));var W5e;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(W5e||(Ee.ResourceOperationKind=W5e={}));var G5e;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(G5e||(Ee.FailureHandlingKind=G5e={}));var H5e;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(H5e||(Ee.PositionEncodingKind=H5e={}));var j5e;(function(e){function t(r){let n=r;return n&&Tl.string(n.id)&&n.id.length>0}s(t,"hasId"),e.hasId=t})(j5e||(Ee.StaticRegistrationOptions=j5e={}));var V5e;(function(e){function t(r){let n=r;return n&&(n.documentSelector===null||AZ.is(n.documentSelector))}s(t,"is"),e.is=t})(V5e||(Ee.TextDocumentRegistrationOptions=V5e={}));var $5e;(function(e){function t(n){let i=n;return Tl.objectLiteral(i)&&(i.workDoneProgress===void 0||Tl.boolean(i.workDoneProgress))}s(t,"is"),e.is=t;function r(n){let i=n;return i&&Tl.boolean(i.workDoneProgress)}s(r,"hasWorkDoneProgress"),e.hasWorkDoneProgress=r})($5e||(Ee.WorkDoneProgressOptions=$5e={}));var z5e;(function(e){e.method="initialize",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(z5e||(Ee.InitializeRequest=z5e={}));var Y5e;(function(e){e.unknownProtocolVersion=1})(Y5e||(Ee.InitializeErrorCodes=Y5e={}));var K5e;(function(e){e.method="initialized",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(K5e||(Ee.InitializedNotification=K5e={}));var J5e;(function(e){e.method="shutdown",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType0(e.method)})(J5e||(Ee.ShutdownRequest=J5e={}));var X5e;(function(e){e.method="exit",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType0(e.method)})(X5e||(Ee.ExitNotification=X5e={}));var Z5e;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(Z5e||(Ee.DidChangeConfigurationNotification=Z5e={}));var eCe;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(eCe||(Ee.MessageType=eCe={}));var tCe;(function(e){e.method="window/showMessage",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolNotificationType(e.method)})(tCe||(Ee.ShowMessageNotification=tCe={}));var rCe;(function(e){e.method="window/showMessageRequest",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolRequestType(e.method)})(rCe||(Ee.ShowMessageRequest=rCe={}));var nCe;(function(e){e.method="window/logMessage",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolNotificationType(e.method)})(nCe||(Ee.LogMessageNotification=nCe={}));var iCe;(function(e){e.method="telemetry/event",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolNotificationType(e.method)})(iCe||(Ee.TelemetryEventNotification=iCe={}));var oCe;(function(e){e.None=0,e.Full=1,e.Incremental=2})(oCe||(Ee.TextDocumentSyncKind=oCe={}));var sCe;(function(e){e.method="textDocument/didOpen",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(sCe||(Ee.DidOpenTextDocumentNotification=sCe={}));var aCe;(function(e){function t(n){let i=n;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}s(t,"isIncremental"),e.isIncremental=t;function r(n){let i=n;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}s(r,"isFull"),e.isFull=r})(aCe||(Ee.TextDocumentContentChangeEvent=aCe={}));var lCe;(function(e){e.method="textDocument/didChange",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(lCe||(Ee.DidChangeTextDocumentNotification=lCe={}));var cCe;(function(e){e.method="textDocument/didClose",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(cCe||(Ee.DidCloseTextDocumentNotification=cCe={}));var uCe;(function(e){e.method="textDocument/didSave",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(uCe||(Ee.DidSaveTextDocumentNotification=uCe={}));var fCe;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(fCe||(Ee.TextDocumentSaveReason=fCe={}));var dCe;(function(e){e.method="textDocument/willSave",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(dCe||(Ee.WillSaveTextDocumentNotification=dCe={}));var mCe;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(mCe||(Ee.WillSaveTextDocumentWaitUntilRequest=mCe={}));var hCe;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolNotificationType(e.method)})(hCe||(Ee.DidChangeWatchedFilesNotification=hCe={}));var pCe;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(pCe||(Ee.FileChangeType=pCe={}));var gCe;(function(e){function t(r){let n=r;return Tl.objectLiteral(n)&&(O5e.URI.is(n.baseUri)||O5e.WorkspaceFolder.is(n.baseUri))&&Tl.string(n.pattern)}s(t,"is"),e.is=t})(gCe||(Ee.RelativePattern=gCe={}));var ACe;(function(e){e.Create=1,e.Change=2,e.Delete=4})(ACe||(Ee.WatchKind=ACe={}));var yCe;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolNotificationType(e.method)})(yCe||(Ee.PublishDiagnosticsNotification=yCe={}));var CCe;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(CCe||(Ee.CompletionTriggerKind=CCe={}));var xCe;(function(e){e.method="textDocument/completion",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(xCe||(Ee.CompletionRequest=xCe={}));var vCe;(function(e){e.method="completionItem/resolve",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(vCe||(Ee.CompletionResolveRequest=vCe={}));var bCe;(function(e){e.method="textDocument/hover",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(bCe||(Ee.HoverRequest=bCe={}));var ECe;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(ECe||(Ee.SignatureHelpTriggerKind=ECe={}));var ICe;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(ICe||(Ee.SignatureHelpRequest=ICe={}));var TCe;(function(e){e.method="textDocument/definition",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(TCe||(Ee.DefinitionRequest=TCe={}));var wCe;(function(e){e.method="textDocument/references",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(wCe||(Ee.ReferencesRequest=wCe={}));var _Ce;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(_Ce||(Ee.DocumentHighlightRequest=_Ce={}));var SCe;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(SCe||(Ee.DocumentSymbolRequest=SCe={}));var RCe;(function(e){e.method="textDocument/codeAction",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(RCe||(Ee.CodeActionRequest=RCe={}));var kCe;(function(e){e.method="codeAction/resolve",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(kCe||(Ee.CodeActionResolveRequest=kCe={}));var BCe;(function(e){e.method="workspace/symbol",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(BCe||(Ee.WorkspaceSymbolRequest=BCe={}));var DCe;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(DCe||(Ee.WorkspaceSymbolResolveRequest=DCe={}));var PCe;(function(e){e.method="textDocument/codeLens",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(PCe||(Ee.CodeLensRequest=PCe={}));var NCe;(function(e){e.method="codeLens/resolve",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(NCe||(Ee.CodeLensResolveRequest=NCe={}));var LCe;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolRequestType0(e.method)})(LCe||(Ee.CodeLensRefreshRequest=LCe={}));var FCe;(function(e){e.method="textDocument/documentLink",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(FCe||(Ee.DocumentLinkRequest=FCe={}));var MCe;(function(e){e.method="documentLink/resolve",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(MCe||(Ee.DocumentLinkResolveRequest=MCe={}));var QCe;(function(e){e.method="textDocument/formatting",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(QCe||(Ee.DocumentFormattingRequest=QCe={}));var OCe;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(OCe||(Ee.DocumentRangeFormattingRequest=OCe={}));var UCe;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(UCe||(Ee.DocumentRangesFormattingRequest=UCe={}));var qCe;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(qCe||(Ee.DocumentOnTypeFormattingRequest=qCe={}));var WCe;(function(e){e.Identifier=1})(WCe||(Ee.PrepareSupportDefaultBehavior=WCe={}));var GCe;(function(e){e.method="textDocument/rename",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(GCe||(Ee.RenameRequest=GCe={}));var HCe;(function(e){e.method="textDocument/prepareRename",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(HCe||(Ee.PrepareRenameRequest=HCe={}));var jCe;(function(e){e.method="workspace/executeCommand",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method)})(jCe||(Ee.ExecuteCommandRequest=jCe={}));var VCe;(function(e){e.method="workspace/applyEdit",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolRequestType("workspace/applyEdit")})(VCe||(Ee.ApplyWorkspaceEditRequest=VCe={}))});var ZCe=H(JL=>{"use strict";d();Object.defineProperty(JL,"__esModule",{value:!0});JL.createProtocolConnection=void 0;var XCe=Jx();function unt(e,t,r,n){return XCe.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,XCe.createMessageConnection)(e,t,r,n)}s(unt,"createProtocolConnection");JL.createProtocolConnection=unt});var t3e=H(nu=>{"use strict";d();var fnt=nu&&nu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),XL=nu&&nu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&fnt(t,e,r)};Object.defineProperty(nu,"__esModule",{value:!0});nu.LSPErrorCodes=nu.createProtocolConnection=void 0;XL(Jx(),nu);XL(LL(),nu);XL(Ls(),nu);XL(JCe(),nu);var dnt=ZCe();Object.defineProperty(nu,"createProtocolConnection",{enumerable:!0,get:s(function(){return dnt.createProtocolConnection},"get")});var e3e;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(e3e||(nu.LSPErrorCodes=e3e={}))});var ii=H(Xp=>{"use strict";d();var mnt=Xp&&Xp.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),r3e=Xp&&Xp.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&mnt(t,e,r)};Object.defineProperty(Xp,"__esModule",{value:!0});Xp.createProtocolConnection=void 0;var hnt=sZ();r3e(sZ(),Xp);r3e(t3e(),Xp);function pnt(e,t,r,n){return(0,hnt.createMessageConnection)(e,t,r,n)}s(pnt,"createProtocolConnection");Xp.createProtocolConnection=pnt});var fxe=H((SF,uxe)=>{d();(function(e,t){typeof SF=="object"&&typeof uxe<"u"?t(SF):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{})))})(SF,function(e){"use strict";function t(w,R){return w||R}s(t,"_pureAssign");function r(w,R){return w[R]}s(r,"_pureRef");var n=void 0,i=null,o="",a="function",l="object",c="prototype",u="__proto__",f="undefined",m="constructor",h="Symbol",p="_polyfill",g="length",y="name",x="call",b="toString",E=t(Object),_=r(E,c),k=t(String),B=r(k,c),N=t(Math),M=t(Array),Z=r(M,c),he=r(Z,"slice");function ee(w,R){try{return{v:w.apply(this,R)}}catch(D){return{e:D}}}s(ee,"safe");function G(w){return function(R){return typeof R===w}}s(G,"_createIs");function q(w){var R="[object "+w+"]";return function(D){return!!(D&&ie(D)===R)}}s(q,"_createObjIs");function ie(w){return _[b].call(w)}s(ie,"objToString");function z(w){return typeof w===f||w===f}s(z,"isUndefined");function j(w){return!V(w)}s(j,"isStrictUndefined");function U(w){return w===i||z(w)}s(U,"isNullOrUndefined");function V(w){return!!w||w!==n}s(V,"isDefined");var K=G("string"),ae=G(a);function re(w){return!w&&U(w)?!1:!!w&&typeof w===l}s(re,"isObject");var le=r(M,"isArray"),ce=q("Error"),De=r(E,"getOwnPropertyDescriptor");function be(w,R){return!!w&&_.hasOwnProperty[x](w,R)}s(be,"objHasOwnProperty");var qe=t(r(E,"hasOwn"),Re);function Re(w,R){return be(w,R)||!!De(w,R)}s(Re,"polyObjHasOwn");function Xe(w,R,D){if(w&&re(w)){for(var Q in w)if(qe(w,Q)&&R[x](D||w,Q,w[Q])===-1)break}}s(Xe,"objForEachKey");var ft={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function at(w){var R={};if(R[ft.c]=!0,R[ft.e]=!0,w.l){R.get=function(){return w.l.v};var D=De(w.l,"v");D&&D.set&&(R.set=function(Q){w.l.v=Q})}return Xe(w,function(Q,ue){R[ft[Q]]=j(ue)?R[ft[Q]]:ue}),R}s(at,"_createProp");var lt=r(E,"defineProperty");function oe(w,R,D){return lt(w,R,at(D))}s(oe,"objDefine");function Ne(w,R,D,Q,ue){var we={};return Xe(w,function(Be,je){Ae(we,Be,R?je:Be),Ae(we,je,D?je:Be)}),Q?Q(we):we}s(Ne,"_createKeyValueMap");function Ae(w,R,D,Q){lt(w,R,{value:D,enumerable:!0,writable:!1})}s(Ae,"_assignMapValue");var Ge=t(k),Y="[object Error]";function ne(w,R){var D=o,Q=_[b][x](w);Q===Y&&(w={stack:Ge(w.stack),message:Ge(w.message),name:Ge(w.name)});try{D=JSON.stringify(w,i,R?typeof R=="number"?R:4:n),D=(D?D.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):i)||Ge(w)}catch(ue){D=" - "+ne(ue,R)}return Q+": "+D}s(ne,"dumpObj");function Fe(w){throw new Error(w)}s(Fe,"throwError");function Se(w){throw new TypeError(w)}s(Se,"throwTypeError");var Ce=r(E,"freeze");function Ue(w){return w}s(Ue,"_doNothing");function Ve(w){return w[u]||i}s(Ve,"_getProto");var tt=r(E,"assign"),Ct=r(E,"keys"),Pt=t(Ce,Ue),yt=t(r(E,"getPrototypeOf"),Ve);function Kt(w){return Ne(w,1,0,Pt)}s(Kt,"createEnum");function Xt(w){var R={};return Xe(w,function(D,Q){Ae(R,D,Q[1]),Ae(R,Q[0],Q[1])}),Pt(R)}s(Xt,"createSimpleMap");function lr(w){return Xt(w)}s(lr,"createTypeMap");var ge="__tsUtils$gblCfg",Me;function Je(){var w;return typeof globalThis!==f&&(w=globalThis),!w&&typeof self!==f&&(w=self),!w&&typeof window!==f&&(w=window),!w&&typeof global!==f&&(w=global),w}s(Je,"_getGlobalValue");function rt(){if(!Me){var w=ee(Je).v||{};Me=w[ge]=w[ge]||{}}return Me}s(rt,"_getGlobalConfig");var St=bt;function bt(w,R,D){var Q=R?R[w]:i;return function(ue){var we=(ue?ue[w]:i)||Q;if(we||D){var Be=arguments;return(we||D).apply(ue,we?he[x](Be,1):Be)}Se('"'+Ge(w)+'" not defined for '+ne(ue))}}s(bt,"_unwrapFunctionWithPoly");var Mt=r(N,"min"),Ot=r(N,"max"),wt=St("slice",B),kt=St("substring",B),_t=bt("substr",B,qt);function qt(w,R,D){return U(w)&&Se("Invalid "+ne(w)),D<0?o:(R=R||0,R<0&&(R=Ot(R+w[g],0)),z(D)?wt(w,R):wt(w,R,R+D))}s(qt,"polyStrSubstr");function $t(w,R){return kt(w,0,R)}s($t,"strLeft");var Zt="_urid",dr;function xr(){if(!dr){var w=rt();dr=w.gblSym=w.gblSym||{k:{},s:{}}}return dr}s(xr,"_globalSymbolRegistry");function ur(w){var R={description:Ge(w),toString:s(function(){return h+"("+w+")"},"toString")};return R[p]=!0,R}s(ur,"polyNewSymbol");function mr(w){var R=xr();if(!qe(R.k,w)){var D=ur(w),Q=Ct(R.s).length;D[Zt]=function(){return Q+"_"+D[b]()},R.k[w]=D,R.s[D[Zt]()]=Ge(w)}return R.k[w]}s(mr,"polySymbolFor");var nr;function hr(){nr=rt()}s(hr,"_initTestHooks");function Ie(w){return lt({toJSON:s(function(){return w},"toJSON")},"v",{value:w})}s(Ie,"createCachedValue");var O="window",de;function ye(w,R){var D;return function(){return!nr&&hr(),(!D||nr.lzy)&&(D=Ie(ee(w,R).v)),D.v}}s(ye,"_getGlobalInstFn");function J(w){return!nr&&hr(),(!de||w===!1||nr.lzy)&&(de=Ie(ee(Je).v||i)),de.v}s(J,"getGlobal");function F(w,R){var D;if(!de||R===!1?D=J(R):D=de.v,D&&D[w])return D[w];if(w===O)try{return window}catch{}return i}s(F,"getInst");var Te=ye(F,["document"]);function Oe(){return!!xt()}s(Oe,"hasWindow");var xt=ye(F,[O]);function Wt(){return!!Lt()}s(Wt,"hasNavigator");var Lt=ye(F,["navigator"]),sr,cr;function Ut(){return sr=Ie(ee(F,[h]).v),sr}s(Ut,"_initSymbol");function It(w){var R=(nr.lzy?0:sr)||Ut();return R.v?R.v[w]:n}s(It,"_getSymbolKey");function fr(w,R){!nr&&hr();var D=(nr.lzy?0:sr)||Ut();return D.v?D.v(w):R?i:ur(w)}s(fr,"newSymbol");function zo(w){return!nr&&hr(),cr=(nr.lzy?0:cr)||Ie(ee(It,["for"]).v),(cr.v||mr)(w)}s(zo,"symbolFor");function wm(w,R,D){return w.apply(R,D)}s(wm,"fnApply");function yl(w,R,D){if(w)for(var Q=w[g]>>>0,ue=0;ue<Q&&!(ue in w&&R[x](D||w,w[ue],ue,w)===-1);ue++);}s(yl,"arrForEach");var _m=St("indexOf",Z),Zf=St("map",Z),ta=St("reduce",Z),fp=t(r(E,"create"),M2);function M2(w){if(!w)return{};var R=typeof w;R!==l&&R!==a&&Se("Prototype must be an Object or function: "+ne(w));function D(){}return s(D,"tempFunc"),D[c]=w,new D}s(M2,"polyObjCreate");var dw;function Sm(w,R){var D=E.setPrototypeOf||function(Q,ue){var we;!dw&&(dw=Ie((we={},we[u]=[],we instanceof Array))),dw.v?Q[u]=ue:Xe(ue,function(Be,je){return Q[Be]=je})};return D(w,R)}s(Sm,"objSetPrototypeOf");function oY(w,R,D){ee(oe,[R,y,{v:w,c:!0,e:!1}]),R=Sm(R,D);function Q(){this[m]=R,ee(oe,[this,y,{v:w,c:!0,e:!1}])}return s(Q,"__"),R[c]=D===i?fp(D):(Q[c]=D[c],new Q),R}s(oY,"_createCustomError");function dp(w,R){R&&(w[y]=R)}s(dp,"_setName");function sY(w,R,D){var Q=D||Error,ue=Q[c][y],we=Error.captureStackTrace;return oY(w,function(){var Be=this,je=arguments;try{ee(dp,[Q,w]);var it=wm(Q,Be,he[x](je))||Be;if(it!==Be){var vt=yt(Be);vt!==yt(it)&&Sm(it,vt)}return we&&we(it,Be[m]),R&&R(it,je),it}finally{ee(dp,[Q,ue])}},Q)}s(sY,"createCustomError");function E1(){return(Date.now||mw)()}s(E1,"utcNow");function mw(){return new Date().getTime()}s(mw,"polyUtcNow");function WE(w){return s(function(D){return U(D)&&Se("strTrim called ["+ne(D)+"]"),D&&D.replace&&(D=D.replace(w,o)),D},"_doTrim")}s(WE,"_createTrimFn");var aY=WE(/^\s+|(?=\s)\s+$/g),Ic=bt("trim",B,aY),mp=r(N,"floor"),N3,I1,L3;function hp(w){if(!w||typeof w!==l)return!1;L3||(L3=Oe()?xt():!0);var R=!1;if(w!==L3){I1||(N3=Function[c][b],I1=N3[x](E));try{var D=yt(w);R=!D,R||(be(D,m)&&(D=D[m]),R=!!(D&&typeof D===a&&N3[x](D)===I1))}catch{}}return R}s(hp,"isPlainObject");var GE;function F3(){return!nr&&hr(),(!GE||nr.lzy)&&(GE=Ie(ee(F,["performance"]).v)),GE.v}s(F3,"getPerformance");var hw=r(N,"round"),Q2=bt("endsWith",B,O2);function O2(w,R,D){K(w)||Se("'"+ne(w)+"' is not a string");var Q=K(R)?R:Ge(R),ue=!z(D)&&D<w[g]?D:w[g];return kt(w,ue-Q[g],ue)===Q}s(O2,"polyStrEndsWith");var Jr=St("indexOf",B),o0="ref",T1="unref",U2="hasRef",lY="enabled";function pp(w,R,D){var Q=!0,ue=w?R(i):i,we;function Be(){return Q=!1,ue&&ue[T1]&&ue[T1](),we}s(Be,"_unref");function je(){ue&&D(ue),ue=i}s(je,"_cancel");function it(){return ue=R(ue),Q||Be(),we}s(it,"_refresh");function vt(Tr){!Tr&&ue&&je(),Tr&&!ue&&it()}return s(vt,"_setEnabled"),we={cancel:je,refresh:it},we[U2]=function(){return ue&&ue[U2]?ue[U2]():Q},we[o0]=function(){return Q=!0,ue&&ue[o0]&&ue[o0](),we},we[T1]=Be,we=lt(we,lY,{get:s(function(){return!!ue},"get"),set:vt}),{h:we,dn:s(function(){ue=i},"dn")}}s(pp,"_createTimerHandler");function cY(w,R,D){var Q=le(R),ue=Q?R.length:0,we=(ue>0?R[0]:Q?n:R)||setTimeout,Be=(ue>1?R[1]:n)||clearTimeout,je=D[0];D[0]=function(){it.dn(),wm(je,n,he[x](arguments))};var it=pp(w,function(vt){if(vt){if(vt.refresh)return vt.refresh(),vt;wm(Be,n,[vt])}return wm(we,n,D)},function(vt){wm(Be,n,[vt])});return it.h}s(cY,"_createTimeoutWith");function pw(w,R){return cY(!0,n,he[x](arguments))}s(pw,"scheduleTimeout");var M3=Kt,uY=lr,Q3="toLowerCase",Pa="length",gp="warnToConsole",O3="throwInternal",pD="watch",fY="apply",ji="push",w1="splice",Ap="logger",gw="cancel",U3="name",s0="unload",gD="version",AD="loggingLevelConsole",Aw="messageId",_1="message",yw="diagLog",yD="userAgent",Cw="split",q2="replace",yp="type",CD="evtName",HE="traceFlags",xw="getAttribute",jE;function dY(w,R){jE||(jE=sY("AggregationError",function(Q,ue){ue[Pa]>1&&(Q.errors=ue[1])}));var D=w||"One or more errors occurred.";throw yl(R,function(Q,ue){D+=`
`.concat(ue," > ").concat(ne(Q))}),new jE(D,R||[])}s(dY,"throwAggregationError");var mY="function",xD="object",hY="undefined",Rm="prototype",VE=Object,vw=VE[Rm];(J()||{}).Symbol,(J()||{}).Reflect;var $E="hasOwnProperty",pY=s(function(w){for(var R,D=1,Q=arguments.length;D<Q;D++){R=arguments[D];for(var ue in R)vw[$E].call(R,ue)&&(w[ue]=R[ue])}return w},"__objAssignFnImpl"),zE=tt||pY,YE=s(function(w,R){return YE=VE.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,Q){D.__proto__=Q}||function(D,Q){for(var ue in Q)Q[$E](ue)&&(D[ue]=Q[ue])},YE(w,R)},"extendStaticsFn");function Cp(w,R){typeof R!==mY&&R!==null&&Se("Class extends value "+String(R)+" is not a constructor or null"),YE(w,R);function D(){this.constructor=w}s(D,"__"),w[Rm]=R===null?fp(R):(D[Rm]=R[Rm],new D)}s(Cp,"__extendsFn");var KE,S1="constructor",U0="prototype",q0="function",R1="_dynInstFuncs",W2="_isDynProxy",xp="_dynClass",G2="_dynCls$",bw="_dynInstChk",k1=bw,H2="_dfOpts",Ew="_unknown_",JE="__proto__",j2="_dyn"+JE,q3="__dynProto$Gbl",XE="_dynInstProto",V2="useBaseInst",$2="setInstFuncs",W3=Object,B1=W3.getPrototypeOf,z2=W3.getOwnPropertyNames,Iw=J(),ZE=Iw[q3]||(Iw[q3]={o:(KE={},KE[$2]=!0,KE[V2]=!0,KE),n:1e3});function Y2(w){return w&&(w===W3[U0]||w===Array[U0])}s(Y2,"_isObjectOrArrayPrototype");function K2(w){return Y2(w)||w===Function[U0]}s(K2,"_isObjectArrayOrFunctionPrototype");function km(w){var R;if(w){if(B1)return B1(w);var D=w[JE]||w[U0]||(w[S1]?w[S1][U0]:null);R=w[j2]||D,be(w,j2)||(delete w[XE],R=w[j2]=w[XE]||w[j2],w[XE]=D)}return R}s(km,"_getObjProto");function ed(w,R){var D=[];if(z2)D=z2(w);else for(var Q in w)typeof Q=="string"&&be(w,Q)&&D.push(Q);if(D&&D.length>0)for(var ue=0;ue<D.length;ue++)R(D[ue])}s(ed,"_forEachProp");function J2(w,R,D){return R!==S1&&typeof w[R]===q0&&(D||be(w,R))&&R!==JE&&R!==U0}s(J2,"_isDynamicCandidate");function X2(w){Se("DynamicProto: "+w)}s(X2,"_throwTypeError");function e4(w){var R=fp(null);return ed(w,function(D){!R[D]&&J2(w,D,!1)&&(R[D]=w[D])}),R}s(e4,"_getInstanceFuncs");function Tw(w,R){for(var D=w.length-1;D>=0;D--)if(w[D]===R)return!0;return!1}s(Tw,"_hasVisited");function ww(w,R,D,Q){function ue(it,vt,Tr){var wn=vt[Tr];if(wn[W2]&&Q){var Hn=it[R1]||{};Hn[k1]!==!1&&(wn=(Hn[vt[xp]]||{})[Tr]||wn)}return function(){return wn.apply(it,arguments)}}s(ue,"_instFuncProxy");var we=fp(null);ed(D,function(it){we[it]=ue(R,D,it)});for(var Be=km(w),je=[];Be&&!K2(Be)&&!Tw(je,Be);)ed(Be,function(it){!we[it]&&J2(Be,it,!B1)&&(we[it]=ue(R,Be,it))}),je.push(Be),Be=km(Be);return we}s(ww,"_getBaseFuncs");function gY(w,R,D,Q){var ue=null;if(w&&be(D,xp)){var we=w[R1]||fp(null);if(ue=(we[D[xp]]||fp(null))[R],ue||X2("Missing ["+R+"] "+q0),!ue[bw]&&we[k1]!==!1){for(var Be=!be(w,R),je=km(w),it=[];Be&&je&&!K2(je)&&!Tw(it,je);){var vt=je[R];if(vt){Be=vt===Q;break}it.push(je),je=km(je)}try{Be&&(w[R]=ue),ue[bw]=1}catch{we[k1]=!1}}}return ue}s(gY,"_getInstFunc");function AY(w,R,D){var Q=R[w];return Q===D&&(Q=km(R)[w]),typeof Q!==q0&&X2("["+w+"] is not a "+q0),Q}s(AY,"_getProtoFunc");function yY(w,R,D,Q,ue){function we(it,vt){var Tr=s(function(){var wn=gY(this,vt,it,Tr)||AY(vt,it,Tr);return wn.apply(this,arguments)},"dynProtoProxy");return Tr[W2]=1,Tr}if(s(we,"_createDynamicPrototype"),!Y2(w)){var Be=D[R1]=D[R1]||fp(null);if(!Y2(Be)){var je=Be[R]=Be[R]||fp(null);Be[k1]!==!1&&(Be[k1]=!!ue),Y2(je)||ed(D,function(it){J2(D,it,!1)&&D[it]!==Q[it]&&(je[it]=D[it],delete D[it],(!be(w,it)||w[it]&&!w[it][W2])&&(w[it]=we(w,it)))})}}}s(yY,"_populatePrototype");function CY(w,R){if(B1){for(var D=[],Q=km(R);Q&&!K2(Q)&&!Tw(D,Q);){if(Q===w)return!0;D.push(Q),Q=km(Q)}return!1}return!0}s(CY,"_checkPrototype");function _w(w,R){return be(w,U0)?w.name||R||Ew:((w||{})[S1]||{}).name||R||Ew}s(_w,"_getObjName");function G3(w,R,D,Q){be(w,U0)||X2("theClass is an invalid class definition.");var ue=w[U0];CY(ue,R)||X2("["+_w(w)+"] not in hierarchy of ["+_w(R)+"]");var we=null;be(ue,xp)?we=ue[xp]:(we=G2+_w(w,"_")+"$"+ZE.n,ZE.n++,ue[xp]=we);var Be=G3[H2],je=!!Be[V2];je&&Q&&Q[V2]!==void 0&&(je=!!Q[V2]);var it=e4(R),vt=ww(ue,R,it,je);D(R,vt);var Tr=!!B1&&!!Be[$2];Tr&&Q&&(Tr=!!Q[$2]),yY(ue,we,R,it,Tr!==!1)}s(G3,"dynamicProto"),G3[H2]=ZE.o;var Yl=void 0,Ws="",vD="Not dynamic - ",bD=/-([a-z])/g,H3=/([^\w\d_$])/g,Sw=/^(\d+[\w\d_$])/;function Rw(w){return!U(w)}s(Rw,"isNotNullOrUndefined");function t4(w){var R=w;return R&&K(R)&&(R=R[q2](bD,function(D,Q){return Q.toUpperCase()}),R=R[q2](H3,"_"),R=R[q2](Sw,function(D,Q){return"_"+Q})),R}s(t4,"normalizeJsName");function ED(w,R){return w&&R?Jr(w,R)!==-1:!1}s(ED,"strContains");function Bm(w){return w&&w.toISOString()||""}s(Bm,"toISOString");function vp(w){return ce(w)?w[U3]:Ws}s(vp,"getExceptionName");function j3(w){return function(){function R(){var D=this;w&&Xe(w,function(Q,ue){D[Q]=ue})}return s(R,"class_1"),R}()}s(j3,"createClassFromInterface");var ID="console",r4="JSON",xY="crypto",bp="msCrypto",Z2="msie",Yn="trident/",ey=null,D1=null,Dm=null;function n4(){return typeof console!==hY?console:F(ID)}s(n4,"getConsole");function Vi(){return!!(typeof JSON===xD&&JSON||F(r4)!==null)}s(Vi,"hasJSON");function ty(){return Vi()?JSON||F(r4):null}s(ty,"getJSON");function ha(){return F(xY)}s(ha,"getCrypto");function ry(){return F(bp)}s(ry,"getMsCrypto");function V3(){var w=Lt();if(w&&(w[yD]!==D1||ey===null)){D1=w[yD];var R=(D1||Ws)[Q3]();ey=ED(R,Z2)||ED(R,Yn)}return ey}s(V3,"isIE");function Ep(w){return(Dm===null||w===!1)&&(Dm=Wt()&&!!Lt().sendBeacon),Dm}s(Ep,"isBeaconsSupported");function $3(w,R){if(w)for(var D=0;D<w[Pa];D++){var Q=w[D];if(Q[U3]&&Q[U3]===R)return Q}return{}}s($3,"_getNamedValue");function i4(w){var R=Te();return R&&w?$3(R.querySelectorAll("meta"),w).content:null}s(i4,"findMetaTag");function td(w){var R,D=F3();if(D){var Q=D.getEntriesByType("navigation")||[];R=$3((Q[Pa]>0?Q[0]:{}).serverTiming,w).description}return R}s(td,"findNamedServerTiming");var ny=4294967296,Qu=4294967295,iy=123456789,Ip=987654321,Cl=!1,oy=iy,rd=Ip;function TD(w){w<0&&(w>>>=0),oy=iy+w&Qu,rd=Ip-w&Qu,Cl=!0}s(TD,"_mwcSeed");function P1(){try{var w=E1()&2147483647;TD((Math.random()*ny^w)+w)}catch{}}s(P1,"_autoSeedMwc");function o4(w){return w>0?mp(sy()/Qu*(w+1))>>>0:0}s(o4,"randomValue");function sy(w){var R=0,D=ha()||ry();return D&&D.getRandomValues&&(R=D.getRandomValues(new Uint32Array(1))[0]&Qu),R===0&&V3()&&(Cl||P1(),R=wD()&Qu),R===0&&(R=mp(ny*Math.random()|0)),w||(R>>>=0),R}s(sy,"random32");function wD(w){rd=36969*(rd&65535)+(rd>>16)&Qu,oy=18e3*(oy&65535)+(oy>>16)&Qu;var R=(rd<<16)+(oy&65535)>>>0&Qu|0;return w||(R>>>=0),R}s(wD,"mwcRandom32");function N1(w){w===void 0&&(w=22);for(var R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=sy()>>>0,Q=0,ue=Ws;ue[Pa]<w;)Q++,ue+=R.charAt(D&63),D>>>=6,Q===5&&(D=(sy()<<2&4294967295|D&3)>>>0,Q=0);return ue}s(N1,"newId");var nd="3.3.6",s4="."+N1(6),L1=0;function id(w){return w.nodeType===1||w.nodeType===9||!+w.nodeType}s(id,"_canAcceptData");function a4(w,R){var D=R[w.id];if(!D){D={};try{id(R)&&oe(R,w.id,{e:!1,v:D})}catch{}}return D}s(a4,"_getCache");function Pm(w,R){return R===void 0&&(R=!1),t4(w+L1+++(R?"."+nd:Ws)+s4)}s(Pm,"createUniqueNamespace");function od(w){var R={id:Pm("_aiData-"+(w||Ws)+"."+nd),accept:s(function(D){return id(D)},"accept"),get:s(function(D,Q,ue,we){var Be=D[R.id];return Be?Be[t4(Q)]:(we&&(Be=a4(R,D),Be[t4(Q)]=ue),ue)},"get"),kill:s(function(D,Q){if(D&&D[Q])try{delete D[Q]}catch{}},"kill")};return R}s(od,"createElmNodeData");function Tp(w){return w&&re(w)&&(w.isVal||w.fb||qe(w,"v")||qe(w,"mrg")||qe(w,"ref")||w.set)}s(Tp,"_isConfigDefaults");function l4(w,R,D){var Q,ue=D.dfVal||V;if(R&&D.fb){var we=D.fb;le(we)||(we=[we]);for(var Be=0;Be<we[Pa];Be++){var je=we[Be],it=R[je];if(ue(it)?Q=it:w&&(it=w.cfg[je],ue(it)&&(Q=it),w.set(w.cfg,Ge(je),it)),ue(Q))break}}return!ue(Q)&&ue(D.v)&&(Q=D.v),Q}s(l4,"_getDefault");function wp(w,R,D){var Q=D;if(D&&Tp(D)&&(Q=l4(w,R,D)),Q){Tp(Q)&&(Q=wp(w,R,Q));var ue;le(Q)?(ue=[],ue[Pa]=Q[Pa]):hp(Q)&&(ue={}),ue&&(Xe(Q,function(we,Be){Be&&Tp(Be)&&(Be=wp(w,R,Be)),ue[we]=Be}),Q=ue)}return Q}s(wp,"_resolveDefaultValue");function _p(w,R,D,Q){var ue,we,Be,je=Q,it,vt,Tr,wn;Tp(je)?(ue=je.isVal,we=je.set,Tr=je.rdOnly,wn=je.blkVal,it=je.mrg,vt=je.ref,!vt&&z(vt)&&(vt=!!it),Be=l4(w,R,je)):Be=Q,wn&&w.blkVal(R,D);var Hn,Rr=!0,Mr=R[D];(Mr||!U(Mr))&&(Hn=Mr,Rr=!1,ue&&Hn!==Be&&!ue(Hn)&&(Hn=Be,Rr=!0),we&&(Hn=we(Hn,Be,R),Rr=Hn===Be)),Rr?Be?Hn=wp(w,R,Be):Hn=Be:(hp(Hn)||le(Be))&&it&&Be&&(hp(Be)||le(Be))&&Xe(Be,function(qn,_n){_p(w,Hn,qn,_n)}),w.set(R,D,Hn),vt&&w.ref(R,D),Tr&&w.rdOnly(R,D)}s(_p,"_applyDefaultValue");var Kl=zo("[[ai_dynCfg_1]]"),kw=zo("[[ai_blkDynCfg_1]]"),z3=zo("[[ai_frcDynCfg_1]]");function Bw(w){if(w){var R;if(le(w)?(R=[],R[Pa]=w[Pa]):hp(w)&&(R={}),R)return Xe(w,function(D,Q){R[D]=Bw(Q)}),R}return w}s(Bw,"_cfgDeepCopy");function Dw(w){if(w){var R=w[Kl]||w;if(R.cfg&&(R.cfg===w||R.cfg[Kl]===R))return R}return null}s(Dw,"getDynamicConfigHandler");function ay(w){if(w&&(hp(w)||le(w)))try{w[kw]=!0}catch{}return w}s(ay,"blockDynamicConversion");function Sp(w,R,D){var Q=!1;return D&&!w[R.blkVal]&&(Q=D[z3],!Q&&!D[kw]&&(Q=hp(D)||le(D))),Q}s(Sp,"_canMakeDynamic");function Ou(w){Se("InvalidAccess:"+w)}s(Ou,"throwInvalidAccess");var _D=["push","pop","shift","unshift","splice"],Nm=s(function(w,R,D,Q){w&&w[O3](3,108,"".concat(D," [").concat(R,"] failed - ")+ne(Q))},"_throwDynamicError");function Pw(w,R,D){le(R)&&yl(_D,function(Q){var ue=R[Q];R[Q]=function(){for(var we=[],Be=0;Be<arguments.length;Be++)we[Be]=arguments[Be];var je=ue[fY](this,we);return F1(w,R,D,"Patching"),je}})}s(Pw,"_patchArray");function Lm(w,R){var D=De(w,R);return D&&D.get}s(Lm,"_getOwnPropGetter");function SD(w,R,D,Q){var ue={n:D,h:[],trk:s(function(vt){vt&&vt.fn&&(_m(ue.h,vt)===-1&&ue.h[ji](vt),w.trk(vt,ue))},"trk"),clr:s(function(vt){var Tr=_m(ue.h,vt);Tr!==-1&&ue.h[w1](Tr,1)},"clr")},we=!0,Be=!1;function je(){we&&(Be=Be||Sp(je,w,Q),Q&&!Q[Kl]&&Be&&(Q=F1(w,Q,D,"Converting")),we=!1);var vt=w.act;return vt&&ue.trk(vt),Q}s(je,"_getProperty"),je[w.prop]={chng:s(function(){w.add(ue)},"chng")};function it(vt){if(Q!==vt){je[w.ro]&&!w.upd&&Ou("["+D+"] is read-only:"+ne(R)),we&&(Be=Be||Sp(je,w,Q),we=!1);var Tr=Be&&je[w.rf];if(Be)if(Tr){Xe(Q,function(Hn){Q[Hn]=vt?vt[Hn]:Yl});try{Xe(vt,function(Hn,Rr){ly(w,Q,Hn,Rr)}),vt=Q}catch(Hn){Nm((w.hdlr||{})[Ap],D,"Assigning",Hn),Be=!1}}else Q&&Q[Kl]&&Xe(Q,function(Hn){var Rr=Lm(Q,Hn);if(Rr){var Mr=Rr[w.prop];Mr&&Mr.chng()}});if(vt!==Q){var wn=vt&&Sp(je,w,vt);!Tr&&wn&&(vt=F1(w,vt,D,"Converting")),Q=vt,Be=wn}w.add(ue)}}s(it,"_setProperty"),oe(R,ue.n,{g:je,s:it})}s(SD,"_createDynamicProperty");function ly(w,R,D,Q){if(R){var ue=Lm(R,D),we=ue&&!!ue[w.prop];we?R[D]=Q:SD(w,R,D,Q)}return R}s(ly,"_setDynamicProperty");function Nw(w,R,D,Q){if(R){var ue=Lm(R,D),we=ue&&!!ue[w.prop],Be=Q&&Q[0],je=Q&&Q[1],it=Q&&Q[2];if(!we){if(it)try{ay(R)}catch(vt){Nm((w.hdlr||{})[Ap],D,"Blocking",vt)}try{ly(w,R,D,R[D]),ue=Lm(R,D)}catch(vt){Nm((w.hdlr||{})[Ap],D,"State",vt)}}Be&&(ue[w.rf]=Be),je&&(ue[w.ro]=je),it&&(ue[w.blkVal]=!0)}return R}s(Nw,"_setDynamicPropertyState");function F1(w,R,D,Q){try{Xe(R,function(ue,we){ly(w,R,ue,we)}),R[Kl]||(lt(R,Kl,{get:s(function(){return w.hdlr},"get")}),Pw(w,R,D))}catch(ue){Nm((w.hdlr||{})[Ap],D,Q,ue)}return R}s(F1,"_makeDynamicObject");var M1="[[ai_",W0="]]";function RD(w){var R=fr(M1+"get"+w.uid+W0),D=fr(M1+"ro"+w.uid+W0),Q=fr(M1+"rf"+w.uid+W0),ue=fr(M1+"blkVal"+w.uid+W0),we=fr(M1+"dtl"+w.uid+W0),Be=null,je=null,it;function vt(Rr,Mr){var qn=it.act;try{it.act=Rr,Rr&&Rr[we]&&(yl(Rr[we],function(pi){pi.clr(Rr)}),Rr[we]=[]),Mr({cfg:w.cfg,set:w.set.bind(w),setDf:w.setDf.bind(w),ref:w.ref.bind(w),rdOnly:w.rdOnly.bind(w)})}catch(pi){var _n=w[Ap];throw _n&&_n[O3](1,107,ne(pi)),pi}finally{it.act=qn||null}}s(vt,"_useHandler");function Tr(){if(Be){var Rr=Be;Be=null,je&&je[gw](),je=null;var Mr=[];if(yl(Rr,function(qn){if(qn&&(qn[we]&&(yl(qn[we],function(_n){_n.clr(qn)}),qn[we]=null),qn.fn))try{vt(qn,qn.fn)}catch(_n){Mr[ji](_n)}}),Be)try{Tr()}catch(qn){Mr[ji](qn)}Mr[Pa]>0&&dY("Watcher error(s): ",Mr)}}s(Tr,"_notifyWatchers");function wn(Rr){if(Rr&&Rr.h[Pa]>0){Be||(Be=[]),je||(je=pw(function(){je=null,Tr()},0));for(var Mr=0;Mr<Rr.h[Pa];Mr++){var qn=Rr.h[Mr];qn&&_m(Be,qn)===-1&&Be[ji](qn)}}}s(wn,"_addWatcher");function Hn(Rr,Mr){if(Rr){var qn=Rr[we]=Rr[we]||[];_m(qn,Mr)===-1&&qn[ji](Mr)}}return s(Hn,"_trackHandler"),it={prop:R,ro:D,rf:Q,blkVal:ue,hdlr:w,add:wn,notify:Tr,use:vt,trk:Hn},it}s(RD,"_createState");function vY(w,R){var D={fn:R,rm:s(function(){D.fn=null,w=null,R=null},"rm")};return oe(D,"toJSON",{v:s(function(){return"WatcherHandler"+(D.fn?"":"[X]")},"v")}),w.use(D,R),D}s(vY,"_createAndUseHandler");function kD(w,R,D){var Q=Dw(R);if(Q)return Q;var ue=Pm("dyncfg",!0),we=R&&D!==!1?R:Bw(R),Be;function je(){Be.notify()}s(je,"_notifyWatchers");function it(_n,pi,no){try{_n=ly(Be,_n,pi,no)}catch(Ri){Nm(w,pi,"Setting value",Ri)}return _n[pi]}s(it,"_setValue");function vt(_n){return vY(Be,_n)}s(vt,"_watch");function Tr(_n,pi){Be.use(null,function(no){var Ri=Be.upd;try{z(pi)||(Be.upd=pi),_n(no)}finally{Be.upd=Ri}})}s(Tr,"_block");function wn(_n,pi){var no;return Nw(Be,_n,pi,(no={},no[0]=!0,no))[pi]}s(wn,"_ref");function Hn(_n,pi){var no;return Nw(Be,_n,pi,(no={},no[1]=!0,no))[pi]}s(Hn,"_rdOnly");function Rr(_n,pi){var no;return Nw(Be,_n,pi,(no={},no[2]=!0,no))[pi]}s(Rr,"_blkPropValue");function Mr(_n,pi){return pi&&Xe(pi,function(no,Ri){_p(qn,_n,no,Ri)}),_n}s(Mr,"_applyDefaults");var qn={uid:null,cfg:we,logger:w,notify:je,set:it,setDf:Mr,watch:vt,ref:wn,rdOnly:Hn,blkVal:Rr,_block:Tr};return oe(qn,"uid",{c:!1,e:!1,w:!1,v:ue}),Be=RD(qn),F1(Be,we,"config","Creating"),qn}s(kD,"_createDynamicHandler");function BD(w,R){w?(w[gp](R),w[O3](2,108,R)):Ou(R)}s(BD,"_logInvalidAccess");function Y3(w,R,D,Q){var ue=kD(D,w||{},Q);return R&&ue.setDf(ue.cfg,R),ue}s(Y3,"createDynamicConfig");function DD(w,R,D){var Q=w[Kl]||w;return Q.cfg&&(Q.cfg===w||Q.cfg[Kl]===Q)?Q[pD](R):(BD(D,vD+ne(w)),Y3(w,null,D)[pD](R))}s(DD,"onConfigChange");var c4=null;function PD(){var w=F("Microsoft");return w&&(c4=w.ApplicationInsights),c4}s(PD,"_getExtensionNamespace");function bY(w){var R=c4;return!R&&w.disableDbgExt!==!0&&(R=c4||PD()),R?R.ChromeDbgExt:null}s(bY,"getDebugExt");var cy,u4="warnToConsole",ND="AI (Internal): ",LD="AI: ",EY="AITR_",IY={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},FD=(cy={},cy[0]=null,cy[1]="errorToConsole",cy[2]=u4,cy[3]="debugToConsole",cy);function MD(w){return w?'"'+w[q2](/\"/g,Ws)+'"':Ws}s(MD,"_sanitizeDiagnosticText");function f4(w,R){var D=n4();if(D){var Q="log";D[w]&&(Q=w),ae(D[Q])&&D[Q](R)}}s(f4,"_logToConsole");var d4=function(){function w(R,D,Q,ue){Q===void 0&&(Q=!1);var we=this;we[Aw]=R,we[_1]=(Q?LD:ND)+R;var Be=Ws;Vi()&&(Be=ty().stringify(ue));var je=(D?" message:"+MD(D):Ws)+(ue?" props:"+MD(Be):Ws);we[_1]+=je}return s(w,"_InternalLogMessage"),w.dataType="MessageData",w}();function TY(w,R){return(w||{})[Ap]||new m4(R)}s(TY,"safeGetLogger");var m4=function(){function w(R){this.identifier="DiagnosticLogger",this.queue=[];var D=0,Q={},ue,we,Be,je,it;G3(w,this,function(vt){it=wn(R||{}),vt.consoleLoggingLevel=function(){return ue},vt[O3]=function(Mr,qn,_n,pi,no){no===void 0&&(no=!1);var Ri=new d4(qn,_n,no,pi);if(je)throw ne(Ri);var Na=FD[Mr]||u4;if(z(Ri[_1]))Rr("throw"+(Mr===1?"Critical":"Warning"),Ri);else{if(no){var Uy=+Ri[Aw];!Q[Uy]&&ue>=Mr&&(vt[Na](Ri[_1]),Q[Uy]=!0)}else ue>=Mr&&vt[Na](Ri[_1]);Tr(Mr,Ri)}},vt.debugToConsole=function(Mr){f4("debug",Mr),Rr("warning",Mr)},vt[gp]=function(Mr){f4("warn",Mr),Rr("warning",Mr)},vt.errorToConsole=function(Mr){f4("error",Mr),Rr("error",Mr)},vt.resetInternalMessageCount=function(){D=0,Q={}},vt.logInternalMessage=Tr,vt[s0]=function(Mr){it&&it.rm(),it=null};function Tr(Mr,qn){if(!Hn()){var _n=!0,pi=EY+qn[Aw];if(Q[pi]?_n=!1:Q[pi]=!0,_n&&(Mr<=we&&(vt.queue[ji](qn),D++,Rr(Mr===1?"error":"warn",qn)),D===Be)){var no="Internal events throttle limit per PageView reached for this app.",Ri=new d4(23,no,!1);vt.queue[ji](Ri),Mr===1?vt.errorToConsole(no):vt[gp](no)}}}s(Tr,"_logInternalMessage");function wn(Mr){return DD(Y3(Mr,IY,vt).cfg,function(qn){var _n=qn.cfg;ue=_n[AD],we=_n.loggingLevelTelemetry,Be=_n.maxMessageLimit,je=_n.enableDebug})}s(wn,"_setDefaultsFromConfig");function Hn(){return D>=Be}s(Hn,"_areInternalMessagesThrottled");function Rr(Mr,qn){var _n=bY(R||{});_n&&_n[yw]&&_n[yw](Mr,qn)}s(Rr,"_debugExtMsg")})}return s(w,"DiagnosticLogger"),w.__ieDyn=1,w}();function h4(w){return w||new m4}s(h4,"_getLogger");function a0(w,R,D,Q,ue,we){we===void 0&&(we=!1),h4(w)[O3](R,D,Q,ue,we)}s(a0,"_throwInternal");function p4(){for(var w=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],R=Ws,D,Q=0;Q<4;Q++)D=sy(),R+=w[D&15]+w[D>>4&15]+w[D>>8&15]+w[D>>12&15]+w[D>>16&15]+w[D>>20&15]+w[D>>24&15]+w[D>>28&15];var ue=w[8+(sy()&3)|0];return _t(R,0,8)+_t(R,9,4)+"4"+_t(R,13,3)+ue+_t(R,16,3)+_t(R,19,12)}s(p4,"generateW3CId");var uy=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,Lw="00",G0="ff",hi="00000000000000000000000000000000",Fm="0000000000000000",pa=1;function Uu(w,R,D){return w&&w[Pa]===R&&w!==D?!!w.match(/^[\da-f]*$/i):!1}s(Uu,"_isValid");function g4(w,R,D){return Uu(w,R)?w:D}s(g4,"_formatValue");function Q1(w){(isNaN(w)||w<0||w>255)&&(w=1);for(var R=w.toString(16);R[Pa]<2;)R="0"+R;return R}s(Q1,"_formatFlags");function fy(w,R,D,Q){return{version:Uu(Q,2,G0)?Q:Lw,traceId:dy(w)?w:p4(),spanId:my(R)?R:$t(p4(),16),traceFlags:D>=0&&D<=255?D:1}}s(fy,"createTraceParent");function H0(w,R){if(!w||(le(w)&&(w=w[0]||""),!w||!K(w)||w[Pa]>8192))return null;if(w.indexOf(",")!==-1){var D=w[Cw](",");w=D[R>0&&D[Pa]>R?R:0]}var Q=uy.exec(Ic(w));return!Q||Q[1]===G0||Q[2]===hi||Q[3]===Fm?null:{version:(Q[1]||Ws)[Q3](),traceId:(Q[2]||Ws)[Q3](),spanId:(Q[3]||Ws)[Q3](),traceFlags:parseInt(Q[4],16)}}s(H0,"parseTraceParent");function dy(w){return Uu(w,32,hi)}s(dy,"isValidTraceId");function my(w){return Uu(w,16,Fm)}s(my,"isValidSpanId");function hy(w){return!(!w||!Uu(w[gD],2,G0)||!Uu(w.traceId,32,hi)||!Uu(w.spanId,16,Fm)||!Uu(Q1(w[HE]),2))}s(hy,"isValidTraceParent");function A4(w){return hy(w)?(w[HE]&pa)===pa:!1}s(A4,"isSampledFlag");function O1(w){if(w){var R=Q1(w[HE]);Uu(R,2)||(R="01");var D=w[gD]||Lw;return D!=="00"&&D!=="ff"&&(D=Lw),"".concat(D.toLowerCase(),"-").concat(g4(w.traceId,32,hi).toLowerCase(),"-").concat(g4(w.spanId,16,Fm).toLowerCase(),"-").concat(R.toLowerCase())}return""}s(O1,"formatTraceParent");function Fw(w){var R="traceparent",D=H0(i4(R),w);return D||(D=H0(td(R),w)),D}s(Fw,"findW3cTraceParent");function Mw(w){var R=w.getElementsByTagName("script"),D=[];return yl(R,function(Q){var ue=Q[xw]("src");if(ue){var we=Q[xw]("crossorigin"),Be=Q.hasAttribute("async")===!0,je=Q.hasAttribute("defer")===!0,it=Q[xw]("referrerpolicy"),vt={url:ue};we&&(vt.crossOrigin=we),Be&&(vt.async=Be),je&&(vt.defer=je),it&&(vt.referrerPolicy=it),D[ji](vt)}}),D}s(Mw,"findAllScripts");var y4="on",K3="attachEvent",C4="addEventListener",x4="detachEvent",QD="removeEventListener",Qw="events";Pm("aiEvtPageHide"),Pm("aiEvtPageShow");var wY=/\.[\.]+/g,_Y=/[\.]+$/,v4=1,py=od("events"),xl=/^([^.]*)(?:\.(.+)|)/;function J3(w){return w&&w[q2]?w[q2](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Ws):w}s(J3,"_normalizeNamespace");function nl(w,R){if(R){var D=Ws;le(R)?(D=Ws,yl(R,function(ue){ue=J3(ue),ue&&(ue[0]!=="."&&(ue="."+ue),D+=ue)})):D=J3(R),D&&(D[0]!=="."&&(D="."+D),w=(w||Ws)+D)}var Q=xl.exec(w||Ws)||[];return{type:Q[1],ns:(Q[2]||Ws).replace(wY,".").replace(_Y,Ws)[Cw](".").sort().join(".")}}s(nl,"_getEvtNamespace");function Rp(w,R,D){D===void 0&&(D=!0);var Q=py.get(w,Qw,{},D),ue=Q[R];return ue||(ue=Q[R]=[]),ue}s(Rp,"_getRegisteredEvents");function OD(w,R,D,Q){w&&R&&R[yp]&&(w[QD]?w[QD](R[yp],D,Q):w[x4]&&w[x4](y4+R[yp],D))}s(OD,"_doDetach");function SY(w,R,D,Q){var ue=!1;return w&&R&&R[yp]&&D&&(w[C4]?(w[C4](R[yp],D,Q),ue=!0):w[K3]&&(w[K3](y4+R[yp],D),ue=!0)),ue}s(SY,"_doAttach");function X3(w,R,D,Q){for(var ue=R[Pa];ue--;){var we=R[ue];we&&(!D.ns||D.ns===we[CD].ns)&&(!Q||Q(we))&&(OD(w,we[CD],we.handler,we.capture),R[w1](ue,1))}}s(X3,"_doUnregister");function Ow(w,R,D){if(R[yp])X3(w,Rp(w,R[yp]),R,D);else{var Q=py.get(w,Qw,{});Xe(Q,function(ue,we){X3(w,we,R,D)}),Ct(Q)[Pa]===0&&py.kill(w,Qw)}}s(Ow,"_unregisterEvents");function RY(w,R){var D;return R?(le(R)?D=[w].concat(R):D=[w,R],D=nl("xx",D).ns[Cw](".")):D=w,D}s(RY,"mergeEvtNamespace");function Uw(w,R,D,Q,ue){ue===void 0&&(ue=!1);var we=!1;if(w)try{var Be=nl(R,Q);if(we=SY(w,Be,D,ue),we&&py.accept(w)){var je={guid:v4++,evtName:Be,handler:D,capture:ue};Rp(w,Be.type)[ji](je)}}catch{}return we}s(Uw,"eventOn");function UD(w,R,D,Q,ue){if(ue===void 0&&(ue=!1),w)try{var we=nl(R,Q),Be=!1;Ow(w,we,function(je){return we.ns&&!D||je.handler===D?(Be=!0,!0):!1}),Be||OD(w,we,D,ue)}catch{}}s(UD,"eventOff");var b4="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",qD="sampleRate",E4="ProcessLegacy",WD="http.method",qw="https://dc.services.visualstudio.com",Z3="/v2/track",sd="not_specified",Ww="iKey",GD=uY({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),kp="split",Tn="length",gy="toLowerCase",U1="ingestionendpoint",q1="toString",Gw="removeItem",ex="message",Ay="count",I4="preTriggerDate",Hw="getUTCDate",T4="stringify",yy="pathname",W1="match",jw="correlationHeaderExcludePatterns",j0="name",Cy="extensionConfig",ad="properties",Tc="measurements",xy="sizeInBytes",tx="typeName",vy="exceptions",rx="severityLevel",by="problemGroup",l0="parsedStack",w4="hasFullStack",_4="assembly",qu="fileName",Ey="line",Bp="aiDataContract",nx="duration";function Vw(w,R,D){var Q=R[Tn],ue=$w(w,R);if(ue[Tn]!==Q){for(var we=0,Be=ue;D[Be]!==void 0;)we++,Be=kt(ue,0,147)+HD(we);ue=Be}return ue}s(Vw,"dataSanitizeKeyAndAddUniqueness");function $w(w,R){var D;return R&&(R=Ic(Ge(R)),R[Tn]>150&&(D=kt(R,0,150),a0(w,2,57,"name is too long. It has been truncated to 150 characters.",{name:R},!0))),D||R}s($w,"dataSanitizeKey");function il(w,R,D){D===void 0&&(D=1024);var Q;return R&&(D=D||1024,R=Ic(Ge(R)),R[Tn]>D&&(Q=kt(R,0,D),a0(w,2,61,"string value is too long. It has been truncated to "+D+" characters.",{value:R},!0))),Q||R}s(il,"dataSanitizeString");function ld(w,R){return Yw(w,R,2048,66)}s(ld,"dataSanitizeUrl");function S4(w,R){var D;return R&&R[Tn]>32768&&(D=kt(R,0,32768),a0(w,2,56,"message is too long, it has been truncated to 32768 characters.",{message:R},!0)),D||R}s(S4,"dataSanitizeMessage");function zw(w,R){var D;if(R){var Q=""+R;Q[Tn]>32768&&(D=kt(Q,0,32768),a0(w,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:R},!0))}return D||R}s(zw,"dataSanitizeException");function Mm(w,R){if(R){var D={};Xe(R,function(Q,ue){if(re(ue)&&Vi())try{ue=ty()[T4](ue)}catch(we){a0(w,2,49,"custom property is not valid",{exception:we},!0)}ue=il(w,ue,8192),Q=Vw(w,Q,D),D[Q]=ue}),R=D}return R}s(Mm,"dataSanitizeProperties");function V0(w,R){if(R){var D={};Xe(R,function(Q,ue){Q=Vw(w,Q,D),D[Q]=ue}),R=D}return R}s(V0,"dataSanitizeMeasurements");function Iy(w,R){return R&&Yw(w,R,128,69)[q1]()}s(Iy,"dataSanitizeId");function Yw(w,R,D,Q){var ue;return R&&(R=Ic(Ge(R)),R[Tn]>D&&(ue=kt(R,0,D),a0(w,2,Q,"input is too long, it has been truncated to "+D+" characters.",{data:R},!0))),ue||R}s(Yw,"dataSanitizeInput");function HD(w){var R="00"+w;return _t(R,R[Tn]-3)}s(HD,"dsPadNumber");var Kw=Te()||{},jD=0,kY=[null,null,null,null,null];function Ty(w){var R=jD,D=kY,Q=D[R];return Kw.createElement?D[R]||(Q=D[R]=Kw.createElement("a")):Q={host:$D(w,!0)},Q.href=w,R++,R>=D[Tn]&&(R=0),jD=R,Q}s(Ty,"urlParseUrl");function BY(w){var R,D=Ty(w);return D&&(R=D.href),R}s(BY,"urlGetAbsoluteUrl");function DY(w){var R,D=Ty(w);return D&&(R=D[yy]),R}s(DY,"urlGetPathName");function VD(w,R){return w?w.toUpperCase()+" "+R:R}s(VD,"urlGetCompleteUrl");function $D(w,R){var D=Qm(w,R)||"";if(D){var Q=D[W1](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(Q!=null&&Q[Tn]>3&&K(Q[2])&&Q[2][Tn]>0)return Q[2]+(Q[3]||"")}return D}s($D,"urlParseHost");function Qm(w,R){var D=null;if(w){var Q=w[W1](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(Q!=null&&Q[Tn]>2&&K(Q[2])&&Q[2][Tn]>0&&(D=Q[2]||"",R&&Q[Tn]>2)){var ue=(Q[1]||"")[gy](),we=Q[3]||"";(ue==="http"&&we===":80"||ue==="https"&&we===":443")&&(we=""),D+=we}}return D}s(Qm,"urlParseFullHost");var zD=[qw+Z3,"https://breeze.aimon.applicationinsights.io"+Z3,"https://dc-int.services.visualstudio.com"+Z3],wy="cid-v1:";function YD(w){return _m(zD,w[gy]())!==-1}s(YD,"isInternalApplicationInsightsEndpoint");function Jw(w){wy=w}s(Jw,"correlationIdSetPrefix");function Xw(){return wy}s(Xw,"correlationIdGetPrefix");function Dp(w,R,D){if(!R||w&&w.disableCorrelationHeaders)return!1;if(w&&w[jw]){for(var Q=0;Q<w.correlationHeaderExcludePatterns[Tn];Q++)if(w[jw][Q].test(R))return!1}var ue=Ty(R).host[gy]();if(ue&&(Jr(ue,":443")!==-1||Jr(ue,":80")!==-1)&&(ue=(Qm(R,!0)||"")[gy]()),(!w||!w.enableCorsCorrelation)&&ue&&ue!==D)return!1;var we=w&&w.correlationHeaderDomains;if(we){var Be;if(yl(we,function(vt){var Tr=new RegExp(vt.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));Be=Be||Tr.test(ue)}),!Be)return!1}var je=w&&w.correlationHeaderExcludedDomains;if(!je||je[Tn]===0)return!0;for(var Q=0;Q<je[Tn];Q++){var it=new RegExp(je[Q].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(it.test(ue))return!1}return ue&&ue[Tn]>0}s(Dp,"correlationIdCanIncludeCorrelationHeader");function KD(w){if(w){var R=JD(w,GD[1]);if(R&&R!==wy)return R}}s(KD,"correlationIdGetCorrelationContext");function JD(w,R){if(w)for(var D=w[kp](","),Q=0;Q<D[Tn];++Q){var ue=D[Q][kp]("=");if(ue[Tn]===2&&ue[0]===R)return ue[1]}}s(JD,"correlationIdGetCorrelationContextValue");function XD(w,R,D,Q){var ue,we=Q,Be=Q;if(R&&R[Tn]>0){var je=Ty(R);if(ue=je.host,!we)if(je[yy]!=null){var it=je.pathname[Tn]===0?"/":je[yy];it.charAt(0)!=="/"&&(it="/"+it),Be=je[yy],we=il(w,D?D+" "+it:it)}else we=il(w,R)}else ue=Q,we=Q;return{target:ue,name:we,data:Be}}s(XD,"AjaxHelperParseDependencyPath");function PY(){var w=F3();if(w&&w.now&&w.timing){var R=w.now()+w.timing.navigationStart;if(R>0)return R}return E1()}s(PY,"dateTimeUtilsNow");function NY(w,R){var D=null;return w!==0&&R!==0&&!U(w)&&!U(R)&&(D=R-w),D}s(NY,"dateTimeUtilsDuration");function Zw(w,R){var D=w||{};return{getName:s(function(){return D[j0]},"getName"),setName:s(function(Q){R&&R.setName(Q),D[j0]=Q},"setName"),getTraceId:s(function(){return D.traceID},"getTraceId"),setTraceId:s(function(Q){R&&R.setTraceId(Q),dy(Q)&&(D.traceID=Q)},"setTraceId"),getSpanId:s(function(){return D.parentID},"getSpanId"),setSpanId:s(function(Q){R&&R.setSpanId(Q),my(Q)&&(D.parentID=Q)},"setSpanId"),getTraceFlags:s(function(){return D.traceFlags},"getTraceFlags"),setTraceFlags:s(function(Q){R&&R.setTraceFlags(Q),D.traceFlags=Q},"setTraceFlags")}}s(Zw,"createDistributedTraceContextFromTrace");var _y=M3({LocalStorage:0,SessionStorage:1}),LY=M3({AI:0,AI_AND_W3C:1,W3C:2}),ix=M3({Normal:1,Critical:2}),Pp=void 0,Wu=void 0,ZD="";function Sy(){return R4()?Ry(_y.LocalStorage):null}s(Sy,"_getLocalStorageObject");function Ry(w){try{if(U(J()))return null;var R=new Date()[q1](),D=F(w===_y.LocalStorage?"localStorage":"sessionStorage"),Q=ZD+R;D.setItem(Q,R);var ue=D.getItem(Q)!==R;if(D[Gw](Q),!ue)return D}catch{}return null}s(Ry,"_getVerifiedStorageObject");function ky(){return Om()?Ry(_y.SessionStorage):null}s(ky,"_getSessionStorageObject");function ox(){Pp=!1,Wu=!1}s(ox,"utlDisableStorage");function sx(w){ZD=w||""}s(sx,"utlSetStoragePrefix");function FY(){Pp=R4(!0),Wu=Om(!0)}s(FY,"utlEnableStorage");function R4(w){return(w||Pp===void 0)&&(Pp=!!Ry(_y.LocalStorage)),Pp}s(R4,"utlCanUseLocalStorage");function eP(w,R){var D=Sy();if(D!==null)try{return D.getItem(R)}catch(Q){Pp=!1,a0(w,2,1,"Browser failed read of local storage. "+vp(Q),{exception:ne(Q)})}return null}s(eP,"utlGetLocalStorage");function tP(w,R,D){var Q=Sy();if(Q!==null)try{return Q.setItem(R,D),!0}catch(ue){Pp=!1,a0(w,2,3,"Browser failed write to local storage. "+vp(ue),{exception:ne(ue)})}return!1}s(tP,"utlSetLocalStorage");function $0(w,R){var D=Sy();if(D!==null)try{return D[Gw](R),!0}catch(Q){Pp=!1,a0(w,2,5,"Browser failed removal of local storage item. "+vp(Q),{exception:ne(Q)})}return!1}s($0,"utlRemoveStorage");function Om(w){return(w||Wu===void 0)&&(Wu=!!Ry(_y.SessionStorage)),Wu}s(Om,"utlCanUseSessionStorage");function By(){var w=[];return Om()&&Xe(F("sessionStorage"),function(R){w.push(R)}),w}s(By,"utlGetSessionStorageKeys");function rP(w,R){var D=ky();if(D!==null)try{return D.getItem(R)}catch(Q){Wu=!1,a0(w,2,2,"Browser failed read of session storage. "+vp(Q),{exception:ne(Q)})}return null}s(rP,"utlGetSessionStorage");function MY(w,R,D){var Q=ky();if(Q!==null)try{return Q.setItem(R,D),!0}catch(ue){Wu=!1,a0(w,2,4,"Browser failed write to session storage. "+vp(ue),{exception:ne(ue)})}return!1}s(MY,"utlSetSessionStorage");function nP(w,R){var D=ky();if(D!==null)try{return D[Gw](R),!0}catch(Q){Wu=!1,a0(w,2,6,"Browser failed removal of session storage item. "+vp(Q),{exception:ne(Q)})}return!1}s(nP,"utlRemoveSessionStorage");var QY="appInsightsThrottle",OY=function(){function w(R,D){var Q=this,ue,we,Be,je,it,vt,Tr,wn=!1,Hn=!1;Mr(),Q._getDbgPlgTargets=function(){return[Tr]},Q.getConfig=function(){return Be},Q.canThrottle=function(Ft){var Gr=m7(Ft),cn=qn(Ft);return no(cn,ue,Gr)},Q.isTriggered=function(Ft){return xP(Ft)},Q.isReady=function(){return wn},Q.flush=function(Ft){try{var Gr=vP(Ft);if(Gr&&Gr[Tn]>0){var cn=Gr.slice(0);return Tr[Ft]=[],yl(cn,function(Mo){Rr(Mo.msgID,Mo[ex],Mo.severity,!1)}),!0}}catch{}return!1},Q.flushAll=function(){try{if(Tr){var Ft=!0;return Xe(Tr,function(Gr){var cn=Q.flush(parseInt(Gr));Ft=Ft&&cn}),Ft}}catch{}return!1},Q.onReadyState=function(Ft,Gr){return Gr===void 0&&(Gr=!0),wn=U(Ft)?!0:Ft,wn&&Gr?Q.flushAll():null},Q.sendMessage=function(Ft,Gr,cn){return Rr(Ft,Gr,cn,!0)};function Rr(Ft,Gr,cn,Mo){if(wn){var La=nK(Ft);if(!La)return;var Gs=qn(Ft),Fa=m7(Ft),H1=no(Gs,ue,Fa),Qp=!1,qy=0,bP=xP(Ft);try{H1&&!bP?(qy=Mt(Gs.limit.maxSendNumber,Fa[Ay]+1),Fa[Ay]=0,Qp=!0,it[Ft]=!0,Fa[I4]=new Date):(it[Ft]=H1,Fa[Ay]+=1);var EP=Ri(Ft);d7(we,EP,Fa);for(var G4=0;G4<qy;G4++)CP(Ft,we,Gr,cn)}catch{}return{isThrottled:Qp,throttleNum:qy}}else if(Mo){var iK=vP(Ft);iK.push({msgID:Ft,message:Gr,severity:cn})}return null}s(Rr,"_flushMessage");function Mr(){we=TY(R),it={},je={},Tr={},Be={},_n(109),vt=Rw(D)?D:"",R.addUnloadHook(DD(R.config,function(Ft){var Gr=Ft.cfg;ue=R4();var cn=Gr.throttleMgrCfg||{};Xe(cn,function(Mo,La){_n(parseInt(Mo),La)})}))}s(Mr,"_initConfig");function qn(Ft){return Be[Ft]||Be[109]}s(qn,"_getCfgByKey");function _n(Ft,Gr){var cn,Mo;try{var La=Gr||{},Gs={};Gs.disabled=!!La.disabled;var Fa=La.interval||{};Hn=Fa?.daysOfMonth&&Fa?.daysOfMonth[Tn]>0,Gs.interval=pi(Fa);var H1={samplingRate:((cn=La.limit)===null||cn===void 0?void 0:cn.samplingRate)||100,maxSendNumber:((Mo=La.limit)===null||Mo===void 0?void 0:Mo.maxSendNumber)||1};Gs.limit=H1,Be[Ft]=Gs}catch{}}s(_n,"_setCfgByKey");function pi(Ft){Ft=Ft||{};var Gr=Ft?.monthInterval,cn=Ft?.dayInterval;return U(Gr)&&U(cn)&&(Ft.monthInterval=3,Hn||(Ft.daysOfMonth=[28],Hn=!0)),Ft={monthInterval:Ft?.monthInterval,dayInterval:Ft?.dayInterval,daysOfMonth:Ft?.daysOfMonth},Ft}s(pi,"_getIntervalConfig");function no(Ft,Gr,cn){if(Ft&&!Ft.disabled&&Gr&&Rw(cn)){var Mo=hx(),La=cn.date,Gs=Ft.interval,Fa=1;if(Gs?.monthInterval){var H1=(Mo.getUTCFullYear()-La.getUTCFullYear())*12+Mo.getUTCMonth()-La.getUTCMonth();Fa=W4(Gs.monthInterval,0,H1)}var Qp=1;if(Hn)Qp=_m(Gs.daysOfMonth,Mo[Hw]());else if(Gs?.dayInterval){var qy=mp((Mo.getTime()-La.getTime())/864e5);Qp=W4(Gs.dayInterval,0,qy)}return Fa>=0&&Qp>=0}return!1}s(no,"_canThrottle");function Ri(Ft,Gr){var cn=Rw(Gr)?Gr:"";return Ft?QY+cn+"-"+Ft:null}s(Ri,"_getLocalStorageName");function Na(Ft){try{if(Ft){var Gr=new Date;return Ft.getUTCFullYear()===Gr.getUTCFullYear()&&Ft.getUTCMonth()===Gr.getUTCMonth()&&Ft[Hw]()===Gr[Hw]()}}catch{}return!1}s(Na,"_isTriggeredOnCurDate");function Uy(Ft,Gr,cn){try{var Mo={date:hx(),count:0};if(Ft){var La=JSON.parse(Ft),Gs={date:hx(La.date)||Mo.date,count:La[Ay]||Mo[Ay],preTriggerDate:La.preTriggerDate?hx(La[I4]):void 0};return Gs}else return d7(Gr,cn,Mo),Mo}catch{}return null}s(Uy,"_getLocalStorageObj");function hx(Ft){try{if(Ft){var Gr=new Date(Ft);if(!isNaN(Gr.getDate()))return Gr}else return new Date}catch{}return null}s(hx,"_getThrottleDate");function d7(Ft,Gr,cn){try{return tP(Ft,Gr,Ic(JSON[T4](cn)))}catch{}return!1}s(d7,"_resetLocalStorage");function W4(Ft,Gr,cn){return Ft<=0?1:cn>=Gr&&(cn-Gr)%Ft==0?mp((cn-Gr)/Ft)+1:-1}s(W4,"_checkInterval");function CP(Ft,Gr,cn,Mo){a0(Gr,Mo||1,Ft,cn)}s(CP,"_sendMessage");function nK(Ft){try{var Gr=qn(Ft);return o4(1e6)<=Gr.limit.samplingRate}catch{}return!1}s(nK,"_canSampledIn");function m7(Ft){try{var Gr=je[Ft];if(!Gr){var cn=Ri(Ft,vt);Gr=Uy(eP(we,cn),we,cn),je[Ft]=Gr}return je[Ft]}catch{}return null}s(m7,"_getLocalStorageObjByKey");function xP(Ft){var Gr=it[Ft];if(U(Gr)){Gr=!1;var cn=m7(Ft);cn&&(Gr=Na(cn[I4])),it[Ft]=Gr}return it[Ft]}s(xP,"_isTrigger");function vP(Ft){return Tr=Tr||{},U(Tr[Ft])&&(Tr[Ft]=[]),Tr[Ft]}s(vP,"_getQueueByKey")}return s(w,"ThrottleMgr"),w}(),e7=";",cd="=";function k4(w){if(!w)return{};var R=w[kp](e7),D=ta(R,function(ue,we){var Be=we[kp](cd);if(Be[Tn]===2){var je=Be[0][gy](),it=Be[1];ue[je]=it}return ue},{});if(Ct(D)[Tn]>0){if(D.endpointsuffix){var Q=D.location?D.location+".":"";D[U1]=D[U1]||"https://"+Q+"dc."+D.endpointsuffix}D[U1]=D[U1]||qw,Q2(D[U1],"/")&&(D[U1]=D[U1].slice(0,-1))}return D}s(k4,"parseConnectionString");var B4={parse:k4},D4=function(){function w(R,D,Q){var ue=this,we=this;we.ver=1,we.sampleRate=100,we.tags={},we[j0]=il(R,Q)||sd,we.data=D,we.time=Bm(new Date),we[Bp]={time:1,iKey:1,name:1,sampleRate:s(function(){return ue.sampleRate===100?4:1},"sampleRate"),tags:1,data:1}}return s(w,"Envelope"),w}(),UY=function(){function w(R,D,Q,ue){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var we=this;we.ver=2,we[j0]=il(R,D)||sd,we[ad]=Mm(R,Q),we[Tc]=V0(R,ue)}return s(w,"Event"),w.envelopeType="Microsoft.ApplicationInsights.{0}.Event",w.dataType="EventData",w}(),qY=58,iP=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,WY=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,Dy=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,oP=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,GY=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,HY=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,jY=/([^\(\s\n]+):([0-9]+)$/,sP="<no_method>",Py="error",c0="stack",ax="stackDetails",P4="errorSrc",lx="message",cx="description",t7=[{re:WY,len:5,m:1,fn:2,ln:3,col:4},{chk:N4,pre:Or,re:Dy,len:4,m:1,fn:2,ln:3},{re:oP,len:3,m:1,fn:2,hdl:n7},{re:GY,len:2,fn:1,hdl:n7}];function Or(w){return w.replace(/(\(anonymous\))/,"<anonymous>")}s(Or,"_scrubAnonymous");function N4(w){return Jr(w,"[native")<0}s(N4,"_ignoreNative");function ux(w,R){var D=w;return D&&!K(D)&&(JSON&&JSON[T4]?(D=JSON[T4](w),R&&(!D||D==="{}")&&(ae(w[q1])?D=w[q1]():D=""+w)):D=""+w+" - (Missing JSON.stringify)"),D||""}s(ux,"_stringify");function Np(w,R){var D=w;return w&&(D&&!K(D)&&(D=w[lx]||w[cx]||D),D&&!K(D)&&(D=ux(D,!0)),w.filename&&(D=D+" @"+(w.filename||"")+":"+(w.lineno||"?")+":"+(w.colno||"?"))),R&&R!=="String"&&R!=="Object"&&R!=="Error"&&Jr(D||"",R)===-1&&(D=R+": "+D),D||""}s(Np,"_formatMessage");function aP(w){try{if(re(w))return"hasFullStack"in w&&"typeName"in w}catch{}return!1}s(aP,"_isExceptionDetailsInternal");function lP(w){try{if(re(w))return"ver"in w&&"exceptions"in w&&"properties"in w}catch{}return!1}s(lP,"_isExceptionInternal");function L4(w){return w&&w.src&&K(w.src)&&w.obj&&le(w.obj)}s(L4,"_isStackDetails");function Um(w){var R=w||"";K(R)||(K(R[c0])?R=R[c0]:R=""+R);var D=R[kp](`
`);return{src:R,obj:D}}s(Um,"_convertStackObj");function cP(w){for(var R=[],D=w[kp](`
`),Q=0;Q<D[Tn];Q++){var ue=D[Q];D[Q+1]&&(ue+="@"+D[Q+1],Q++),R.push(ue)}return{src:w,obj:R}}s(cP,"_getOperaStack");function F4(w){var R=null;if(w)try{if(w[c0])R=Um(w[c0]);else if(w[Py]&&w[Py][c0])R=Um(w[Py][c0]);else if(w.exception&&w.exception[c0])R=Um(w.exception[c0]);else if(L4(w))R=w;else if(L4(w[ax]))R=w[ax];else if(xt()&&xt().opera&&w[lx])R=cP(w[ex]);else if(w.reason&&w.reason[c0])R=Um(w.reason[c0]);else if(K(w))R=Um(w);else{var D=w[lx]||w[cx]||"";K(w[P4])&&(D&&(D+=`
`),D+=" from "+w[P4]),D&&(R=Um(D))}}catch(Q){R=Um(Q)}return R||{src:"",obj:null}}s(F4,"_getStackFromErrorObj");function uP(w){var R="";return w&&(w.obj?R=w.obj.join(`
`):R=w.src||""),R}s(uP,"_formatStackTrace");function M4(w){var R,D=w.obj;if(D&&D[Tn]>0){R=[];var Q=0,ue=!1,we=0;yl(D,function(qn){if(ue||VY(qn)){var _n=Ge(qn);ue=!0;var pi=$Y(_n,Q);pi&&(we+=pi[xy],R.push(pi),Q++)}});var Be=32*1024;if(we>Be)for(var je=0,it=R[Tn]-1,vt=0,Tr=je,wn=it;je<it;){var Hn=R[je][xy],Rr=R[it][xy];if(vt+=Hn+Rr,vt>Be){var Mr=wn-Tr+1;R.splice(Tr,Mr);break}Tr=je,wn=it,je++,it--}}return R}s(M4,"_parseStack");function Ny(w){var R="";if(w&&(R=w.typeName||w[j0]||"",!R))try{var D=/function (.{1,200})\(/,Q=D.exec(w.constructor[q1]());R=Q&&Q[Tn]>1?Q[1]:""}catch{}return R}s(Ny,"_getErrorType");function Q4(w){if(w)try{if(!K(w)){var R=Ny(w),D=ux(w,!1);return(!D||D==="{}")&&(w[Py]&&(w=w[Py],R=Ny(w)),D=ux(w,!0)),Jr(D,R)!==0&&R!=="String"?R+":"+D:D}}catch{}return""+(w||"")}s(Q4,"_formatErrorCode");var ud=function(){function w(R,D,Q,ue,we,Be){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var je=this;je.ver=2,lP(D)?(je[vy]=D[vy]||[],je[ad]=D[ad],je[Tc]=D[Tc],D[rx]&&(je[rx]=D[rx]),D.id&&(je.id=D.id,D[ad].id=D.id),D[by]&&(je[by]=D[by]),U(D.isManual)||(je.isManual=D.isManual)):(Q||(Q={}),Be&&(Q.id=Be),je[vy]=[mP(R,D,Q)],je[ad]=Mm(R,Q),je[Tc]=V0(R,ue),we&&(je[rx]=we),Be&&(je.id=Be))}return s(w,"Exception"),w.CreateAutoException=function(R,D,Q,ue,we,Be,je,it){var vt=Ny(we||Be||R);return{message:Np(R,vt),url:D,lineNumber:Q,columnNumber:ue,error:Q4(we||Be||R),evt:Q4(Be||R),typeName:vt,stackDetails:F4(je||we||Be),errorSrc:it}},w.CreateFromInterface=function(R,D,Q,ue){var we=D[vy]&&Zf(D[vy],function(je){return r7(R,je)}),Be=new w(R,zE(zE({},D),{exceptions:we}),Q,ue);return Be},w.prototype.toInterface=function(){var R=this,D=R.exceptions,Q=R.properties,ue=R.measurements,we=R.severityLevel,Be=R.problemGroup,je=R.id,it=R.isManual,vt=D instanceof Array&&Zf(D,function(Tr){return Tr.toInterface()})||void 0;return{ver:"4.0",exceptions:vt,severityLevel:we,properties:Q,measurements:ue,problemGroup:Be,id:je,isManual:it}},w.CreateSimpleException=function(R,D,Q,ue,we,Be){var je;return{exceptions:[(je={},je[w4]=!0,je.message=R,je.stack=we,je.typeName=D,je)]}},w.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",w.dataType="ExceptionData",w.formatError=Q4,w}(),fP=Pt({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function dP(){var w=this,R=le(w[l0])&&Zf(w[l0],function(Q){return pP(Q)}),D={id:w.id,outerId:w.outerId,typeName:w[tx],message:w[ex],hasFullStack:w[w4],stack:w[c0],parsedStack:R||void 0};return D}s(dP,"_toInterface");function mP(w,R,D){var Q,ue,we,Be,je,it,vt,Tr;if(aP(R))Be=R[tx],je=R[ex],vt=R[c0],Tr=R[l0]||[],it=R[w4];else{var wn=R,Hn=wn&&wn.evt;ce(wn)||(wn=wn[Py]||Hn||wn),Be=il(w,Ny(wn))||sd,je=S4(w,Np(R||wn,Be))||sd;var Rr=R[ax]||F4(R);Tr=M4(Rr),le(Tr)&&Zf(Tr,function(Mr){Mr[_4]=il(w,Mr[_4]),Mr[qu]=il(w,Mr[qu])}),vt=zw(w,uP(Rr)),it=le(Tr)&&Tr[Tn]>0,D&&(D[tx]=D[tx]||Be)}return Q={},Q[Bp]=fP,Q.id=ue,Q.outerId=we,Q.typeName=Be,Q.message=je,Q[w4]=it,Q.stack=vt,Q.parsedStack=Tr,Q.toInterface=dP,Q}s(mP,"_createExceptionDetails");function r7(w,R){var D=le(R[l0])&&Zf(R[l0],function(ue){return hP(ue)})||R[l0],Q=mP(w,zE(zE({},R),{parsedStack:D}));return Q}s(r7,"_createExDetailsFromInterface");function fx(w,R){var D=R[W1](HY);if(D&&D[Tn]>=4)w[qu]=D[1],w[Ey]=parseInt(D[2]);else{var Q=R[W1](jY);Q&&Q[Tn]>=3?(w[qu]=Q[1],w[Ey]=parseInt(Q[2])):w[qu]=R}}s(fx,"_parseFilename");function n7(w,R,D){var Q=w[qu];R.fn&&D&&D[Tn]>R.fn&&(R.ln&&D[Tn]>R.ln?(Q=Ic(D[R.fn]||""),w[Ey]=parseInt(Ic(D[R.ln]||""))||0):Q=Ic(D[R.fn]||"")),Q&&fx(w,Q)}s(n7,"_handleFilename");function VY(w){var R=!1;if(w&&K(w)){var D=Ic(w);D&&(R=iP.test(D))}return R}s(VY,"_isStackFrame");var i7=Pt({level:1,method:1,assembly:0,fileName:0,line:0});function $Y(w,R){var D,Q;if(w&&K(w)&&Ic(w)){Q=(D={},D[Bp]=i7,D.level=R,D.assembly=Ic(w),D.method=sP,D.fileName="",D.line=0,D.sizeInBytes=0,D);for(var ue=0;ue<t7[Tn];){var we=t7[ue];if(we.chk&&!we.chk(w))break;we.pre&&(w=we.pre(w));var Be=w[W1](we.re);if(Be&&Be[Tn]>=we.len){we.m&&(Q.method=Ic(Be[we.m]||sP)),we.hdl?we.hdl(Q,we,Be):we.fn&&(we.ln?(Q[qu]=Ic(Be[we.fn]||""),Q[Ey]=parseInt(Ic(Be[we.ln]||""))||0):fx(Q,Be[we.fn]||""));break}ue++}}return o7(Q)}s($Y,"_extractStackFrame");function hP(w){var R,D=(R={},R[Bp]=i7,R.level=w.level,R.method=w.method,R.assembly=w[_4],R.fileName=w[qu],R.line=w[Ey],R.sizeInBytes=0,R);return o7(D)}s(hP,"_stackFrameFromInterface");function o7(w){var R=qY;return w&&(R+=w.method[Tn],R+=w.assembly[Tn],R+=w.fileName[Tn],R+=w.level.toString()[Tn],R+=w.line.toString()[Tn],w[xy]=R),w}s(o7,"_populateFrameSizeInBytes");function pP(w){return{level:w.level,method:w.method,assembly:w[_4],fileName:w[qu],line:w[Ey]}}s(pP,"_parsedFrameToInterface");var gP=function(){function w(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return s(w,"DataPoint"),w}(),zY=function(){function w(R,D,Q,ue,we,Be,je,it,vt){this.aiDataContract={ver:1,metrics:1,properties:0};var Tr=this;Tr.ver=2;var wn=new gP;wn[Ay]=ue>0?ue:void 0,wn.max=isNaN(Be)||Be===null?void 0:Be,wn.min=isNaN(we)||we===null?void 0:we,wn[j0]=il(R,D)||sd,wn.value=Q,wn.stdDev=isNaN(je)||je===null?void 0:je,Tr.metrics=[wn],Tr[ad]=Mm(R,it),Tr[Tc]=V0(R,vt)}return s(w,"Metric"),w.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",w.dataType="MetricData",w}(),Ly="";function YY(w,R){return R===void 0&&(R=!1),w==null?R:w.toString()[gy]()==="true"}s(YY,"stringToBoolOrDefault");function s7(w){(isNaN(w)||w<0)&&(w=0),w=hw(w);var R=Ly+w%1e3,D=Ly+mp(w/1e3)%60,Q=Ly+mp(w/(1e3*60))%60,ue=Ly+mp(w/(1e3*60*60))%24,we=mp(w/(1e3*60*60*24));return R=R[Tn]===1?"00"+R:R[Tn]===2?"0"+R:R,D=D[Tn]<2?"0"+D:D,Q=Q[Tn]<2?"0"+Q:Q,ue=ue[Tn]<2?"0"+ue:ue,(we>0?we+".":Ly)+ue+":"+Q+":"+D+"."+R}s(s7,"msToTimeSpan");function KY(w,R){var D=null;return yl(w,function(Q){if(Q.identifier===R)return D=Q,-1}),D}s(KY,"getExtensionByName");function Lp(w,R,D,Q,ue){return!ue&&K(w)&&(w==="Script error."||w==="Script error")}s(Lp,"isCrossOriginError");var JY=function(){function w(R,D,Q,ue,we,Be,je){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var it=this;it.ver=2,it.id=Iy(R,je),it.url=ld(R,Q),it[j0]=il(R,D)||sd,isNaN(ue)||(it[nx]=s7(ue)),it[ad]=Mm(R,we),it[Tc]=V0(R,Be)}return s(w,"PageView"),w.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",w.dataType="PageviewData",w}(),Fy=function(){function w(R,D,Q,ue,we,Be,je,it,vt,Tr,wn,Hn){vt===void 0&&(vt="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var Rr=this;Rr.ver=2,Rr.id=D,Rr[nx]=s7(we),Rr.success=Be,Rr.resultCode=je+"",Rr.type=il(R,vt);var Mr=XD(R,Q,it,ue);Rr.data=ld(R,ue)||Mr.data,Rr.target=il(R,Mr.target),Tr&&(Rr.target="".concat(Rr.target," | ").concat(Tr)),Rr[j0]=il(R,Mr[j0]),Rr[ad]=Mm(R,wn),Rr[Tc]=V0(R,Hn)}return s(w,"RemoteDependencyData"),w.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",w.dataType="RemoteDependencyData",w}(),a7=function(){function w(R,D,Q,ue,we){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var Be=this;Be.ver=2,D=D||sd,Be[ex]=S4(R,D),Be[ad]=Mm(R,ue),Be[Tc]=V0(R,we),Q&&(Be[rx]=Q)}return s(w,"Trace"),w.envelopeType="Microsoft.ApplicationInsights.{0}.Message",w.dataType="MessageData",w}(),dx=function(){function w(R,D,Q,ue,we,Be,je){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var it=this;it.ver=2,it.url=ld(R,Q),it[j0]=il(R,D)||sd,it[ad]=Mm(R,we),it[Tc]=V0(R,Be),je&&(it.domProcessing=je.domProcessing,it[nx]=je[nx],it.networkConnect=je.networkConnect,it.perfTotal=je.perfTotal,it.receivedResponse=je.receivedResponse,it.sentRequest=je.sentRequest)}return s(w,"PageViewPerformance"),w.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",w.dataType="PageviewPerformanceData",w}(),XY=function(){function w(R,D){this.aiDataContract={baseType:1,baseData:1},this.baseType=R,this.baseData=D}return s(w,"Data"),w}(),O4=M3({Verbose:0,Information:1,Warning:2,Error:3,Critical:4}),ZY=function(){function w(){}return s(w,"ConfigurationManager"),w.getConfig=function(R,D,Q,ue){ue===void 0&&(ue=!1);var we;return Q&&R[Cy]&&R[Cy][Q]&&!U(R[Cy][Q][D])?we=R[Cy][Q][D]:we=R[D],U(we)?ue:we},w}();function fd(w){var R="ai."+w+".";return function(D){return R+D}}s(fd,"_aiNameFunc");var My=fd("application"),ga=fd("device"),U4=fd("location"),Qy=fd("operation"),q4=fd("session"),Fp=fd("user"),G1=fd("cloud"),mx=fd("internal"),Mp=function(w){Cp(R,w);function R(){return w.call(this)||this}return s(R,"ContextTagKeys"),R}(j3({applicationVersion:My("ver"),applicationBuild:My("build"),applicationTypeId:My("typeId"),applicationId:My("applicationId"),applicationLayer:My("layer"),deviceId:ga("id"),deviceIp:ga("ip"),deviceLanguage:ga("language"),deviceLocale:ga("locale"),deviceModel:ga("model"),deviceFriendlyName:ga("friendlyName"),deviceNetwork:ga("network"),deviceNetworkName:ga("networkName"),deviceOEMName:ga("oemName"),deviceOS:ga("os"),deviceOSVersion:ga("osVersion"),deviceRoleInstance:ga("roleInstance"),deviceRoleName:ga("roleName"),deviceScreenResolution:ga("screenResolution"),deviceType:ga("type"),deviceMachineName:ga("machineName"),deviceVMName:ga("vmName"),deviceBrowser:ga("browser"),deviceBrowserVersion:ga("browserVersion"),locationIp:U4("ip"),locationCountry:U4("country"),locationProvince:U4("province"),locationCity:U4("city"),operationId:Qy("id"),operationName:Qy("name"),operationParentId:Qy("parentId"),operationRootId:Qy("rootId"),operationSyntheticSource:Qy("syntheticSource"),operationCorrelationVector:Qy("correlationVector"),sessionId:q4("id"),sessionIsFirst:q4("isFirst"),sessionIsNew:q4("isNew"),userAccountAcquisitionDate:Fp("accountAcquisitionDate"),userAccountId:Fp("accountId"),userAgent:Fp("userAgent"),userId:Fp("id"),userStoreRegion:Fp("storeRegion"),userAuthUserId:Fp("authUserId"),userAnonymousUserAcquisitionDate:Fp("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Fp("authUserAcquisitionDate"),cloudName:G1("name"),cloudRole:G1("role"),cloudRoleVer:G1("roleVer"),cloudRoleInstance:G1("roleInstance"),cloudEnvironment:G1("environment"),cloudLocation:G1("location"),cloudDeploymentUnit:G1("deploymentUnit"),internalNodeName:mx("nodeName"),internalSdkVersion:mx("sdkVersion"),internalAgentVersion:mx("agentVersion"),internalSnippet:mx("snippet"),internalSdkSrc:mx("sdkSrc")}));function l7(w,R,D,Q,ue,we){D=il(Q,D)||sd,(U(w)||U(R)||U(D))&&Fe("Input doesn't contain all required fields");var Be="";w[Ww]&&(Be=w[Ww],delete w[Ww]);var je={name:D,time:Bm(new Date),iKey:Be,ext:we||{},tags:[],data:{},baseType:R,baseData:w};return U(ue)||Xe(ue,function(it,vt){je.data[it]=vt}),je}s(l7,"createTelemetryItem");var c7=function(){function w(){}return s(w,"TelemetryItemCreator"),w.create=l7,w}(),eK={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},tK=new Mp;function AP(w){var R=null;if(ae(Event))R=new Event(w);else{var D=Te();D&&D.createEvent&&(R=D.createEvent("Event"),R.initEvent(w,!0,!0))}return R}s(AP,"createDomEvent");function u7(w,R){UD(w,null,null,R)}s(u7,"_disableEvents");function yP(w){var R=Te(),D=Lt(),Q=!1,ue=[],we=1;D&&!U(D.onLine)&&!D.onLine&&(we=2);var Be=0,je=Hn(),it=RY(Pm("OfflineListener"),w);try{if(Tr(xt())&&(Q=!0),R){var vt=R.body||R;vt.ononline&&Tr(vt)&&(Q=!0)}}catch{Q=!1}function Tr(Ri){var Na=!1;return Ri&&(Na=Uw(Ri,"online",qn,it),Na&&Uw(Ri,"offline",_n,it)),Na}s(Tr,"_enableEvents");function wn(){return je}s(wn,"_isOnline");function Hn(){return!(Be===2||we===2)}s(Hn,"calCurrentState");function Rr(){var Ri=Hn();je!==Ri&&(je=Ri,yl(ue,function(Na){var Uy={isOnline:je,rState:we,uState:Be};try{Na(Uy)}catch{}}))}s(Rr,"listnerNoticeCheck");function Mr(Ri){Be=Ri,Rr()}s(Mr,"setOnlineState");function qn(){we=1,Rr()}s(qn,"_setOnline");function _n(){we=2,Rr()}s(_n,"_setOffline");function pi(){var Ri=xt();if(Ri&&Q){if(u7(Ri,it),R){var Na=R.body||R;z(Na.ononline)||u7(Na,it)}Q=!1}}s(pi,"_unload");function no(Ri){return ue.push(Ri),{rm:s(function(){var Na=ue.indexOf(Ri);if(Na>-1)return ue.splice(Na,1)},"rm")}}return s(no,"addListener"),{isOnline:wn,isListening:s(function(){return Q},"isListening"),unload:pi,addListener:no,setOnlineState:Mr}}s(yP,"createOfflineListener");var rK="AppInsightsPropertiesPlugin",f7="AppInsightsChannelPlugin",Oy="ApplicationInsightsAnalytics";e.AnalyticsPluginIdentifier=Oy,e.BreezeChannelIdentifier=f7,e.ConfigurationManager=ZY,e.ConnectionStringParser=B4,e.ContextTagKeys=Mp,e.CtxTagKeys=tK,e.DEFAULT_BREEZE_ENDPOINT=qw,e.DEFAULT_BREEZE_PATH=Z3,e.Data=XY,e.DisabledPropertyName=b4,e.DistributedTracingModes=LY,e.Envelope=D4,e.Event=UY,e.EventPersistence=ix,e.Exception=ud,e.Extensions=eK,e.HttpMethod=WD,e.Metric=zY,e.PageView=JY,e.PageViewPerformance=dx,e.ProcessLegacy=E4,e.PropertiesPluginIdentifier=rK,e.RemoteDependencyData=Fy,e.RequestHeaders=GD,e.SampleRate=qD,e.SeverityLevel=O4,e.TelemetryItemCreator=c7,e.ThrottleMgr=OY,e.Trace=a7,e.correlationIdCanIncludeCorrelationHeader=Dp,e.correlationIdGetCorrelationContext=KD,e.correlationIdGetCorrelationContextValue=JD,e.correlationIdGetPrefix=Xw,e.correlationIdSetPrefix=Jw,e.createDistributedTraceContextFromTrace=Zw,e.createDomEvent=AP,e.createOfflineListener=yP,e.createTelemetryItem=l7,e.createTraceParent=fy,e.dataSanitizeException=zw,e.dataSanitizeId=Iy,e.dataSanitizeInput=Yw,e.dataSanitizeKey=$w,e.dataSanitizeKeyAndAddUniqueness=Vw,e.dataSanitizeMeasurements=V0,e.dataSanitizeMessage=S4,e.dataSanitizeProperties=Mm,e.dataSanitizeString=il,e.dataSanitizeUrl=ld,e.dateTimeUtilsDuration=NY,e.dateTimeUtilsNow=PY,e.dsPadNumber=HD,e.findAllScripts=Mw,e.findW3cTraceParent=Fw,e.formatTraceParent=O1,e.getExtensionByName=KY,e.isBeaconApiSupported=Ep,e.isCrossOriginError=Lp,e.isInternalApplicationInsightsEndpoint=YD,e.isSampledFlag=A4,e.isValidSpanId=my,e.isValidTraceId=dy,e.isValidTraceParent=hy,e.msToTimeSpan=s7,e.parseConnectionString=k4,e.parseTraceParent=H0,e.strNotSpecified=sd,e.stringToBoolOrDefault=YY,e.urlGetAbsoluteUrl=BY,e.urlGetCompleteUrl=VD,e.urlGetPathName=DY,e.urlParseFullHost=Qm,e.urlParseHost=$D,e.urlParseUrl=Ty,e.utlCanUseLocalStorage=R4,e.utlCanUseSessionStorage=Om,e.utlDisableStorage=ox,e.utlEnableStorage=FY,e.utlGetLocalStorage=eP,e.utlGetSessionStorage=rP,e.utlGetSessionStorageKeys=By,e.utlRemoveSessionStorage=nP,e.utlRemoveStorage=$0,e.utlSetLocalStorage=tP,e.utlSetSessionStorage=MY,e.utlSetStoragePrefix=sx})});var mxe=H((RF,dxe)=>{d();(function(e,t){typeof RF=="object"&&typeof dxe<"u"?t(RF):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{})))})(RF,function(e){"use strict";function t(A,v){return A||v}s(t,"_pureAssign");function r(A,v){return A[v]}s(r,"_pureRef");var n=void 0,i=null,o="",a="function",l="object",c="prototype",u="__proto__",f="undefined",m="constructor",h="Symbol",p="_polyfill",g="length",y="name",x="call",b="toString",E=t(Object),_=r(E,c),k=t(String),B=r(k,c),N=t(Math),M=t(Array),Z=r(M,c),he=r(Z,"slice");function ee(A,v){try{return{v:A.apply(this,v)}}catch(T){return{e:T}}}s(ee,"safe");function G(A,v){var T=ee(A);return T.e?v:T.v}s(G,"safeGet");var q;function ie(A){return function(v){return typeof v===A}}s(ie,"_createIs");function z(A){var v="[object "+A+"]";return function(T){return!!(T&&j(T)===v)}}s(z,"_createObjIs");function j(A){return _[b].call(A)}s(j,"objToString");function U(A){return typeof A===f||A===f}s(U,"isUndefined");function V(A){return!re(A)}s(V,"isStrictUndefined");function K(A){return A===i||U(A)}s(K,"isNullOrUndefined");function ae(A){return A===i||!re(A)}s(ae,"isStrictNullOrUndefined");function re(A){return!!A||A!==n}s(re,"isDefined");function le(A){return!q&&(q=["string","number","boolean",f,"symbol","bigint"]),A!==l&&q.indexOf(A)!==-1}s(le,"isPrimitiveType");var ce=ie("string"),De=ie(a);function be(A){return!A&&K(A)?!1:!!A&&typeof A===l}s(be,"isObject");var qe=r(M,"isArray"),Re=z("Date"),Xe=ie("number"),ft=ie("boolean"),at=z("Error");function lt(A){return!!(A&&A.then&&De(A.then))}s(lt,"isPromiseLike");function oe(A){return!(!A||G(function(){return!(A&&0+A)},!A))}s(oe,"isTruthy");var Ne=r(E,"getOwnPropertyDescriptor");function Ae(A,v){return!!A&&_.hasOwnProperty[x](A,v)}s(Ae,"objHasOwnProperty");var Ge=t(r(E,"hasOwn"),Y);function Y(A,v){return Ae(A,v)||!!Ne(A,v)}s(Y,"polyObjHasOwn");function ne(A,v,T){if(A&&be(A)){for(var S in A)if(Ge(A,S)&&v[x](T||A,S,A[S])===-1)break}}s(ne,"objForEachKey");var Fe={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Se(A){var v={};if(v[Fe.c]=!0,v[Fe.e]=!0,A.l){v.get=function(){return A.l.v};var T=Ne(A.l,"v");T&&T.set&&(v.set=function(S){A.l.v=S})}return ne(A,function(S,P){v[Fe[S]]=V(P)?v[Fe[S]]:P}),v}s(Se,"_createProp");var Ce=r(E,"defineProperty");function Ue(A,v,T){return Ce(A,v,Se(T))}s(Ue,"objDefine");function Ve(A,v,T,S,P){var L={};return ne(A,function(W,se){tt(L,W,v?se:W),tt(L,se,T?se:W)}),S?S(L):L}s(Ve,"_createKeyValueMap");function tt(A,v,T,S){Ce(A,v,{value:T,enumerable:!0,writable:!1})}s(tt,"_assignMapValue");var Ct=t(k),Pt="[object Error]";function yt(A,v){var T=o,S=_[b][x](A);S===Pt&&(A={stack:Ct(A.stack),message:Ct(A.message),name:Ct(A.name)});try{T=JSON.stringify(A,i,v?typeof v=="number"?v:4:n),T=(T?T.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):i)||Ct(A)}catch(P){T=" - "+yt(P,v)}return S+": "+T}s(yt,"dumpObj");function Kt(A){throw new Error(A)}s(Kt,"throwError");function Xt(A){throw new TypeError(A)}s(Xt,"throwTypeError");var lr=r(E,"freeze");function ge(A){return A}s(ge,"_doNothing");function Me(A){return A[u]||i}s(Me,"_getProto");var Je=r(E,"assign"),rt=r(E,"keys");function St(A){return lr&&ne(A,function(v,T){(qe(T)||be(T))&&St(T)}),bt(A)}s(St,"objDeepFreeze");var bt=t(lr,ge),Mt=t(r(E,"getPrototypeOf"),Me);function Ot(A){return Ve(A,1,0,bt)}s(Ot,"createEnum");function wt(A){return Ve(A,0,0,bt)}s(wt,"createEnumKeyMap");function kt(A){var v={};return ne(A,function(T,S){tt(v,T,S[1]),tt(v,S[0],S[1])}),bt(v)}s(kt,"createSimpleMap");function _t(A){return kt(A)}s(_t,"createTypeMap");var qt=wt({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),$t="__tsUtils$gblCfg",Zt;function dr(){var A;return typeof globalThis!==f&&(A=globalThis),!A&&typeof self!==f&&(A=self),!A&&typeof window!==f&&(A=window),!A&&typeof global!==f&&(A=global),A}s(dr,"_getGlobalValue");function xr(){if(!Zt){var A=ee(dr).v||{};Zt=A[$t]=A[$t]||{}}return Zt}s(xr,"_getGlobalConfig");var ur=mr;function mr(A,v,T){var S=v?v[A]:i;return function(P){var L=(P?P[A]:i)||S;if(L||T){var W=arguments;return(L||T).apply(P,L?he[x](W,1):W)}Xt('"'+Ct(A)+'" not defined for '+yt(P))}}s(mr,"_unwrapFunctionWithPoly");function nr(A){return function(v){return v[A]}}s(nr,"_unwrapProp");var hr=r(N,"min"),Ie=r(N,"max"),O=ur("slice",B),de=ur("substring",B),ye=mr("substr",B,J);function J(A,v,T){return K(A)&&Xt("Invalid "+yt(A)),T<0?o:(v=v||0,v<0&&(v=Ie(v+A[g],0)),U(T)?O(A,v):O(A,v,v+T))}s(J,"polyStrSubstr");function F(A,v){return de(A,0,v)}s(F,"strLeft");var Te="_urid",Oe;function xt(){if(!Oe){var A=xr();Oe=A.gblSym=A.gblSym||{k:{},s:{}}}return Oe}s(xt,"_globalSymbolRegistry");var Wt;function Lt(A){var v={description:Ct(A),toString:s(function(){return h+"("+A+")"},"toString")};return v[p]=!0,v}s(Lt,"polyNewSymbol");function sr(A){var v=xt();if(!Ge(v.k,A)){var T=Lt(A),S=rt(v.s).length;T[Te]=function(){return S+"_"+T[b]()},v.k[A]=T,v.s[T[Te]()]=Ct(A)}return v.k[A]}s(sr,"polySymbolFor");function cr(A){!Wt&&(Wt={});var v,T=qt[A];return T&&(v=Wt[T]=Wt[T]||Lt(h+"."+T)),v}s(cr,"polyGetKnownSymbol");var Ut;function It(){Ut=xr()}s(It,"_initTestHooks");function fr(A){var v={};return!Ut&&It(),v.b=Ut.lzy,Ce(v,"v",{configurable:!0,get:s(function(){var T=A();return Ut.lzy||Ce(v,"v",{value:T}),v.b=Ut.lzy,T},"get")}),v}s(fr,"getLazy");function zo(A){return Ce({toJSON:s(function(){return A},"toJSON")},"v",{value:A})}s(zo,"createCachedValue");var wm="window",yl;function _m(A,v){var T;return function(){return!Ut&&It(),(!T||Ut.lzy)&&(T=zo(ee(A,v).v)),T.v}}s(_m,"_getGlobalInstFn");function Zf(A){return!Ut&&It(),(!yl||A===!1||Ut.lzy)&&(yl=zo(ee(dr).v||i)),yl.v}s(Zf,"getGlobal");function ta(A,v){var T;if(!yl||v===!1?T=Zf(v):T=yl.v,T&&T[A])return T[A];if(A===wm)try{return window}catch{}return i}s(ta,"getInst");function fp(){return!!M2()}s(fp,"hasDocument");var M2=_m(ta,["document"]);function dw(){return!!Sm()}s(dw,"hasWindow");var Sm=_m(ta,[wm]);function oY(){return!!dp()}s(oY,"hasNavigator");var dp=_m(ta,["navigator"]),sY=_m(function(){return!!ee(function(){return process&&(process.versions||{}).node}).v}),E1,mw;function WE(){return E1=zo(ee(ta,[h]).v),E1}s(WE,"_initSymbol");function aY(A){var v=(Ut.lzy?0:E1)||WE();return v.v?v.v[A]:n}s(aY,"_getSymbolKey");function Ic(){return!!mp()}s(Ic,"hasSymbol");function mp(){return!Ut&&It(),((Ut.lzy?0:E1)||WE()).v}s(mp,"getSymbol");function N3(A,v){var T=qt[A];!Ut&&It();var S=(Ut.lzy?0:E1)||WE();return S.v?S.v[T||A]:v?n:cr(A)}s(N3,"getKnownSymbol");function I1(A,v){!Ut&&It();var T=(Ut.lzy?0:E1)||WE();return T.v?T.v(A):v?i:Lt(A)}s(I1,"newSymbol");function L3(A){return!Ut&&It(),mw=(Ut.lzy?0:mw)||zo(ee(aY,["for"]).v),(mw.v||sr)(A)}s(L3,"symbolFor");function hp(A){return!!A&&De(A.next)}s(hp,"isIterator");function GE(A){return!ae(A)&&De(A[N3(3)])}s(GE,"isIterable");var F3;function hw(A,v,T){if(A&&(hp(A)||(!F3&&(F3=zo(N3(3))),A=A[F3.v]?A[F3.v]():i),hp(A))){var S=n,P=n;try{for(var L=0;!(P=A.next()).done&&v[x](T||A,P.value,L,A)!==-1;)L++}catch(W){S={e:W},A.throw&&(P=i,A.throw(S))}finally{try{P&&!P.done&&A.return&&A.return(P)}finally{if(S)throw S.e}}}}s(hw,"iterForOf");function Q2(A,v,T){return A.apply(v,T)}s(Q2,"fnApply");function O2(A,v){return!U(v)&&A&&(qe(v)?Q2(A.push,A,v):hp(v)||GE(v)?hw(v,function(T){A.push(T)}):A.push(v)),A}s(O2,"arrAppend");function Jr(A,v,T){if(A)for(var S=A[g]>>>0,P=0;P<S&&!(P in A&&v[x](T||A,A[P],P,A)===-1);P++);}s(Jr,"arrForEach");var o0=ur("indexOf",Z),T1=ur("map",Z);function U2(A,v,T){return((A?A.slice:i)||he).apply(A,he[x](arguments,1))}s(U2,"arrSlice");var lY=ur("reduce",Z),pp=t(r(E,"create"),cY);function cY(A){if(!A)return{};var v=typeof A;v!==l&&v!==a&&Xt("Prototype must be an Object or function: "+yt(A));function T(){}return s(T,"tempFunc"),T[c]=A,new T}s(cY,"polyObjCreate");var pw;function M3(A,v){var T=E.setPrototypeOf||function(S,P){var L;!pw&&(pw=zo((L={},L[u]=[],L instanceof Array))),pw.v?S[u]=P:ne(P,function(W,se){return S[W]=se})};return T(A,v)}s(M3,"objSetPrototypeOf");function uY(A,v,T){ee(Ue,[v,y,{v:A,c:!0,e:!1}]),v=M3(v,T);function S(){this[m]=v,ee(Ue,[this,y,{v:A,c:!0,e:!1}])}return s(S,"__"),v[c]=T===i?pp(T):(S[c]=T[c],new S),v}s(uY,"_createCustomError");function Q3(A,v){v&&(A[y]=v)}s(Q3,"_setName");function Pa(A,v,T){var S=T||Error,P=S[c][y],L=Error.captureStackTrace;return uY(A,function(){var W=this,se=arguments;try{ee(Q3,[S,A]);var fe=Q2(S,W,he[x](se))||W;if(fe!==W){var ve=Mt(W);ve!==Mt(fe)&&M3(fe,ve)}return L&&L(fe,W[m]),v&&v(fe,se),fe}finally{ee(Q3,[S,P])}},S)}s(Pa,"createCustomError");function gp(){return(Date.now||O3)()}s(gp,"utcNow");function O3(){return new Date().getTime()}s(O3,"polyUtcNow");function pD(A){return s(function(T){return K(T)&&Xt("strTrim called ["+yt(T)+"]"),T&&T.replace&&(T=T.replace(A,o)),T},"_doTrim")}s(pD,"_createTrimFn");var fY=pD(/^\s+|(?=\s)\s+$/g),ji=mr("trim",B,fY),w1=r(N,"floor"),Ap,gw,U3;function s0(A){if(!A||typeof A!==l)return!1;U3||(U3=dw()?Sm():!0);var v=!1;if(A!==U3){gw||(Ap=Function[c][b],gw=Ap[x](E));try{var T=Mt(A);v=!T,v||(Ae(T,m)&&(T=T[m]),v=!!(T&&typeof T===a&&Ap[x](T)===gw))}catch{}}return v}s(s0,"isPlainObject");function gD(A){return A.value&&HE(A),!0}s(gD,"_defaultDeepCopyHandler");var AD=[q2,HE,CD,yp];function Aw(A,v,T,S){var P;return Jr(A,function(L){if(L.k===v)return P=L,-1}),P||(P={k:v,v},A.push(P),S(P)),P.v}s(Aw,"_getSetVisited");function _1(A,v,T,S){var P=T.handler,L=T.path?S?T.path.concat(S):T.path:[],W={handler:T.handler,src:T.src,path:L},se=typeof v,fe=!1,ve=v===i;ve||(v&&se===l?fe=s0(v):ve=le(se));var ke={type:se,isPrim:ve,isPlain:fe,value:v,result:v,path:L,origin:T.src,copy:s(function(We,et){return _1(A,We,et?W:T,et)},"copy"),copyTo:s(function(We,et){return yw(A,We,et,W)},"copyTo")};return ke.isPrim?P&&P[x](T,ke)?ke.result:v:Aw(A,v,L,function(We){Ue(ke,"result",{g:s(function(){return We.v},"g"),s:s(function(Ye){We.v=Ye},"s")});for(var et=0,He=P;!(He||(et<AD.length?AD[et++]:gD))[x](T,ke);)He=i})}s(_1,"_deepCopy");function yw(A,v,T,S){if(!K(T))for(var P in T)v[P]=_1(A,T[P],S,P);return v}s(yw,"_copyProps");function yD(A,v,T){var S={handler:T,src:v,path:[]};return yw([],A,v,S)}s(yD,"objCopyProps");function Cw(A,v){var T={handler:v,src:A};return _1([],A,T)}s(Cw,"objDeepCopy");function q2(A){var v=A.value;if(qe(v)){var T=A.result=[];return T.length=v.length,A.copyTo(T,v),!0}return!1}s(q2,"arrayDeepCopyHandler");function yp(A){var v=A.value;return Re(v)?(A.result=new Date(v.getTime()),!0):!1}s(yp,"dateDeepCopyHandler");function CD(A){return A.type===a}s(CD,"functionDeepCopyHandler");function HE(A){var v=A.value;if(v&&A.isPlain){var T=A.result={};return A.copyTo(T,v),!0}return!1}s(HE,"plainObjDeepCopyHandler");function xw(A,v){return Jr(v,function(T){yD(A,T)}),A}s(xw,"_doExtend");function jE(A,v,T,S,P,L,W){return xw(Cw(A)||{},he[x](arguments))}s(jE,"deepExtend");var dY=nr(g),mY=r(N,"round"),xD=mr("endsWith",B,hY);function hY(A,v,T){ce(A)||Xt("'"+yt(A)+"' is not a string");var S=ce(v)?v:Ct(v),P=!U(T)&&T<A[g]?T:A[g];return de(A,P-S[g],P)===S}s(hY,"polyStrEndsWith");var Rm=ur("indexOf",B),VE="ref",vw="unref",$E="hasRef",pY="enabled";function zE(A,v,T){var S=!0,P=A?v(i):i,L;function W(){return S=!1,P&&P[vw]&&P[vw](),L}s(W,"_unref");function se(){P&&T(P),P=i}s(se,"_cancel");function fe(){return P=v(P),S||W(),L}s(fe,"_refresh");function ve(ke){!ke&&P&&se(),ke&&!P&&fe()}return s(ve,"_setEnabled"),L={cancel:se,refresh:fe},L[$E]=function(){return P&&P[$E]?P[$E]():S},L[VE]=function(){return S=!0,P&&P[VE]&&P[VE](),L},L[vw]=W,L=Ce(L,pY,{get:s(function(){return!!P},"get"),set:ve}),{h:L,dn:s(function(){P=i},"dn")}}s(zE,"_createTimerHandler");function YE(A,v,T){var S=qe(v),P=S?v.length:0,L=(P>0?v[0]:S?n:v)||setTimeout,W=(P>1?v[1]:n)||clearTimeout,se=T[0];T[0]=function(){fe.dn(),Q2(se,n,he[x](arguments))};var fe=zE(A,function(ve){if(ve){if(ve.refresh)return ve.refresh(),ve;Q2(W,n,[ve])}return Q2(L,n,T)},function(ve){Q2(W,n,[ve])});return fe.h}s(YE,"_createTimeoutWith");function Cp(A,v){return YE(!0,n,he[x](arguments))}s(Cp,"scheduleTimeout");function KE(A,v){return YE(!1,n,he[x](arguments))}s(KE,"createTimeout");var S1,U0="constructor",q0="prototype",R1="function",W2="_dynInstFuncs",xp="_isDynProxy",G2="_dynClass",bw="_dynCls$",k1="_dynInstChk",H2=k1,Ew="_dfOpts",JE="_unknown_",j2="__proto__",q3="_dyn"+j2,XE="__dynProto$Gbl",V2="_dynInstProto",$2="useBaseInst",W3="setInstFuncs",B1=Object,z2=B1.getPrototypeOf,Iw=B1.getOwnPropertyNames,ZE=Zf(),Y2=ZE[XE]||(ZE[XE]={o:(S1={},S1[W3]=!0,S1[$2]=!0,S1),n:1e3});function K2(A){return A&&(A===B1[q0]||A===Array[q0])}s(K2,"_isObjectOrArrayPrototype");function km(A){return K2(A)||A===Function[q0]}s(km,"_isObjectArrayOrFunctionPrototype");function ed(A){var v;if(A){if(z2)return z2(A);var T=A[j2]||A[q0]||(A[U0]?A[U0][q0]:null);v=A[q3]||T,Ae(A,q3)||(delete A[V2],v=A[q3]=A[V2]||A[q3],A[V2]=T)}return v}s(ed,"_getObjProto");function J2(A,v){var T=[];if(Iw)T=Iw(A);else for(var S in A)typeof S=="string"&&Ae(A,S)&&T.push(S);if(T&&T.length>0)for(var P=0;P<T.length;P++)v(T[P])}s(J2,"_forEachProp");function X2(A,v,T){return v!==U0&&typeof A[v]===R1&&(T||Ae(A,v))&&v!==j2&&v!==q0}s(X2,"_isDynamicCandidate");function e4(A){Xt("DynamicProto: "+A)}s(e4,"_throwTypeError");function Tw(A){var v=pp(null);return J2(A,function(T){!v[T]&&X2(A,T,!1)&&(v[T]=A[T])}),v}s(Tw,"_getInstanceFuncs");function ww(A,v){for(var T=A.length-1;T>=0;T--)if(A[T]===v)return!0;return!1}s(ww,"_hasVisited");function gY(A,v,T,S){function P(fe,ve,ke){var We=ve[ke];if(We[xp]&&S){var et=fe[W2]||{};et[H2]!==!1&&(We=(et[ve[G2]]||{})[ke]||We)}return function(){return We.apply(fe,arguments)}}s(P,"_instFuncProxy");var L=pp(null);J2(T,function(fe){L[fe]=P(v,T,fe)});for(var W=ed(A),se=[];W&&!km(W)&&!ww(se,W);)J2(W,function(fe){!L[fe]&&X2(W,fe,!z2)&&(L[fe]=P(v,W,fe))}),se.push(W),W=ed(W);return L}s(gY,"_getBaseFuncs");function AY(A,v,T,S){var P=null;if(A&&Ae(T,G2)){var L=A[W2]||pp(null);if(P=(L[T[G2]]||pp(null))[v],P||e4("Missing ["+v+"] "+R1),!P[k1]&&L[H2]!==!1){for(var W=!Ae(A,v),se=ed(A),fe=[];W&&se&&!km(se)&&!ww(fe,se);){var ve=se[v];if(ve){W=ve===S;break}fe.push(se),se=ed(se)}try{W&&(A[v]=P),P[k1]=1}catch{L[H2]=!1}}}return P}s(AY,"_getInstFunc");function yY(A,v,T){var S=v[A];return S===T&&(S=ed(v)[A]),typeof S!==R1&&e4("["+A+"] is not a "+R1),S}s(yY,"_getProtoFunc");function CY(A,v,T,S,P){function L(fe,ve){var ke=s(function(){var We=AY(this,ve,fe,ke)||yY(ve,fe,ke);return We.apply(this,arguments)},"dynProtoProxy");return ke[xp]=1,ke}if(s(L,"_createDynamicPrototype"),!K2(A)){var W=T[W2]=T[W2]||pp(null);if(!K2(W)){var se=W[v]=W[v]||pp(null);W[H2]!==!1&&(W[H2]=!!P),K2(se)||J2(T,function(fe){X2(T,fe,!1)&&T[fe]!==S[fe]&&(se[fe]=T[fe],delete T[fe],(!Ae(A,fe)||A[fe]&&!A[fe][xp])&&(A[fe]=L(A,fe)))})}}}s(CY,"_populatePrototype");function _w(A,v){if(z2){for(var T=[],S=ed(v);S&&!km(S)&&!ww(T,S);){if(S===A)return!0;T.push(S),S=ed(S)}return!1}return!0}s(_w,"_checkPrototype");function G3(A,v){return Ae(A,q0)?A.name||v||JE:((A||{})[U0]||{}).name||v||JE}s(G3,"_getObjName");function Yl(A,v,T,S){Ae(A,q0)||e4("theClass is an invalid class definition.");var P=A[q0];_w(P,v)||e4("["+G3(A)+"] not in hierarchy of ["+G3(v)+"]");var L=null;Ae(P,G2)?L=P[G2]:(L=bw+G3(A,"_")+"$"+Y2.n,Y2.n++,P[G2]=L);var W=Yl[Ew],se=!!W[$2];se&&S&&S[$2]!==void 0&&(se=!!S[$2]);var fe=Tw(v),ve=gY(P,v,fe,se);T(v,ve);var ke=!!z2&&!!W[W3];ke&&S&&(ke=!!S[W3]),CY(P,L,v,fe,ke!==!1)}s(Yl,"dynamicProto"),Yl[Ew]=Y2.o;var Ws="function",vD="object",bD="undefined",H3="prototype",Sw=Object,Rw=Sw[H3];(Zf()||{}).Symbol,(Zf()||{}).Reflect;var t4="hasOwnProperty",ED=s(function(A){for(var v,T=1,S=arguments.length;T<S;T++){v=arguments[T];for(var P in v)Rw[t4].call(v,P)&&(A[P]=v[P])}return A},"__objAssignFnImpl"),Bm=Je||ED,vp=s(function(A,v){return vp=Sw.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,S){T.__proto__=S}||function(T,S){for(var P in S)S[t4](P)&&(T[P]=S[P])},vp(A,v)},"extendStaticsFn");function j3(A,v){typeof v!==Ws&&v!==null&&Xt("Class extends value "+String(v)+" is not a constructor or null"),vp(A,v);function T(){this.constructor=A}s(T,"__"),A[H3]=v===null?pp(v):(T[H3]=v[H3],new T)}s(j3,"__extendsFn");function ID(A,v){for(var T=0,S=v.length,P=A.length;T<S;T++,P++)A[P]=v[T];return A}s(ID,"__spreadArrayFn");var r4=Ot,xY=_t,bp=r4({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Z2="toLowerCase",Yn="length",ey="warnToConsole",D1="throwInternal",Dm="watch",n4="apply",Vi="push",ty="splice",ha="logger",ry="cancel",V3="initialize",Ep="identifier",$3="removeNotificationListener",i4="addNotificationListener",td="isInitialized",ny="value",Qu="getNotifyMgr",iy="getPlugin",Ip="name",Cl="processNext",oy="getProcessTelContext",rd="enabled",TD="stopPollingInternalLogs",P1="unload",o4="onComplete",sy="version",wD="loggingLevelConsole",N1="createNew",nd="teardown",s4="messageId",L1="message",id="diagLog",a4="_doTeardown",Pm="update",od="getNext",Tp="setNextPlugin",l4="userAgent",wp="split",_p="replace",Kl="type",kw="evtName",z3="status",Bw="getAllResponseHeaders",Dw="isChildEvt",ay="data",Sp="getCtx",Ou="setCtx",_D="itemsReceived",Nm="urlString",Pw="headers",Lm="timeout",SD="traceFlags",ly;function Nw(A,v){ly||(ly=Pa("AggregationError",function(S,P){P[Yn]>1&&(S.errors=P[1])}));var T=A||"One or more errors occurred.";throw Jr(v,function(S,P){T+=`
`.concat(P," > ").concat(yt(S))}),new ly(T,v||[])}s(Nw,"throwAggregationError");var F1="Promise",M1="rejected";function W0(A,v){return RD(A,function(T){return v?v({status:"fulfilled",rejected:!1,value:T}):T},function(T){return v?v({status:M1,rejected:!0,reason:T}):T})}s(W0,"doAwaitResponse");function RD(A,v,T,S){var P=A;try{if(lt(A))(v||T)&&(P=A.then(v,T));else try{v&&(P=v(A))}catch(L){if(T)P=T(L);else throw L}}finally{S&&vY(P,S)}return P}s(RD,"doAwait");function vY(A,v){var T=A;return v&&(lt(A)?A.finally?T=A.finally(v):T=A.then(function(S){return v(),S},function(S){throw v(),S}):v()),T}s(vY,"doFinally");var kD=["pending","resolving","resolved",M1],BD="dispatchEvent",Y3;function DD(A){var v;return A&&A.createEvent&&(v=A.createEvent("Event")),!!v&&v.initEvent}s(DD,"_hasInitEventFn");function c4(A,v,T,S){var P=M2();!Y3&&(Y3=zo(!!ee(DD,[P]).v));var L=Y3.v?P.createEvent("Event"):S?new Event(v):{};if(T&&T(L),Y3.v&&L.initEvent(v,!1,!0),L&&A[BD])A[BD](L);else{var W=A["on"+v];if(W)W(L);else{var se=ta("console");se&&(se.error||se.log)(v,yt(L))}}}s(c4,"emitEvent");var PD="unhandledRejection",bY=PD.toLowerCase(),cy=10,u4;function ND(A){return De(A)?A.toString():yt(A)}s(ND,"dumpFnObj");function LD(A,v,T){var S=U2(arguments,3),P=0,L=!1,W,se=[],fe=!1,ve=null,ke;function We(pr,Pr){try{fe=!0,ve&&ve.cancel(),ve=null;var jn=A(function(xi,vi){se.push(function(){try{var fo=P===2?pr:Pr,pn=U(fo)?W:De(fo)?fo(W):fo;lt(pn)?pn.then(xi,vi):fo?xi(pn):P===3?vi(pn):xi(pn)}catch($r){vi($r)}}),L&&pt()},S);return jn}finally{}}s(We,"_then");function et(pr){return We(void 0,pr)}s(et,"_catch");function He(pr){var Pr=pr,jn=pr;return De(pr)&&(Pr=s(function(xi){return pr&&pr(),xi},"thenFinally"),jn=s(function(xi){throw pr&&pr(),xi},"catchFinally")),We(Pr,jn)}s(He,"_finally");function Ye(){return kD[P]}s(Ye,"_strState");function pt(){if(se.length>0){var pr=se.slice();se=[],fe=!0,ve&&ve.cancel(),ve=null,v(pr)}}s(pt,"_processQueue");function ct(pr,Pr){return function(jn){if(P===Pr){if(pr===2&&lt(jn)){P=1,jn.then(ct(2,1),ct(3,1));return}P=pr,L=!0,W=jn,pt(),!fe&&pr===3&&!ve&&(ve=Cp(Tt,cy))}}}s(ct,"_createSettleIfFn");function Tt(){if(!fe)if(fe=!0,sY())process.emit(PD,W,ke);else{var pr=Sm()||Zf();!u4&&(u4=zo(ee(ta,[F1+"RejectionEvent"]).v)),c4(pr,bY,function(Pr){return Ue(Pr,"promise",{g:s(function(){return ke},"g")}),Pr.reason=W,Pr},!!u4.v)}}s(Tt,"_notifyUnhandledRejection"),ke={then:We,catch:et,finally:He},Ce(ke,"state",{get:Ye}),Ic()&&(ke[N3(11)]="IPromise");function Jt(){return"IPromise "+Ye()+(L?" - "+ND(W):"")}return s(Jt,"_toString"),ke.toString=Jt,s(function(){De(T)||Xt(F1+": executor is not a function - "+ND(T));var Pr=ct(3,0);try{T.call(ke,ct(2,0),Pr)}catch(jn){Pr(jn)}},"_initialize")(),ke}s(LD,"_createPromise");function EY(A){return function(v){var T=U2(arguments,1);return A(function(S,P){try{var L=[],W=1;hw(v,function(se,fe){se&&(W++,RD(se,function(ve){L[fe]=ve,--W===0&&S(L)},P))}),W--,W===0&&S(L)}catch(se){P(se)}},T)}}s(EY,"_createAllPromise");function IY(A){return zo(function(v){var T=U2(arguments,1);return A(function(S,P){var L=[],W=1;function se(fe,ve){W++,W0(fe,function(ke){ke.rejected?L[ve]={status:M1,reason:ke.reason}:L[ve]={status:"fulfilled",value:ke.value},--W===0&&S(L)})}s(se,"processItem");try{qe(v)?Jr(v,se):GE(v)?hw(v,se):Xt("Input is not an iterable"),W--,W===0&&S(L)}catch(fe){P(fe)}},T)})}s(IY,"_createAllSettledPromise");function FD(A){Jr(A,function(v){try{v()}catch{}})}s(FD,"syncItemProcessor");function MD(A){var v=Xe(A)?A:0;return function(T){Cp(function(){FD(T)},v)}}s(MD,"timeoutItemProcessor");function f4(A,v){return LD(f4,MD(v),A,v)}s(f4,"createAsyncPromise");var d4;function TY(A,v){!d4&&(d4=zo(ee(ta,[F1]).v||null));var T=d4.v;if(!T)return f4(A);De(A)||Xt(F1+": executor is not a function - "+yt(A));var S=0;function P(){return kD[S]}s(P,"_strState");var L=new T(function(W,se){function fe(ke){S=2,W(ke)}s(fe,"_resolve");function ve(ke){S=3,se(ke)}s(ve,"_reject"),A(fe,ve)});return Ce(L,"state",{get:P}),L}s(TY,"createNativePromise");var m4;function h4(A){return LD(h4,FD,A)}s(h4,"createSyncPromise");function a0(A,v){return!m4&&(m4=IY(h4)),m4.v(A,v)}s(a0,"createSyncAllSettledPromise");var p4;function uy(A,v){return!p4&&(p4=zo(TY)),p4.v.call(this,A,v)}s(uy,"createPromise");var Lw=EY(uy),G0=void 0,hi="",Fm="channels",pa="core",Uu="createPerfMgr",g4="disabled",Q1="extensionConfig",fy="extensions",H0="processTelemetry",dy="priority",my="eventsSent",hy="eventsDiscarded",A4="eventsSendRequest",O1="perfEvent",Fw="offlineEventsStored",Mw="offlineBatchSent",y4="offlineBatchDrop",K3="getPerfMgr",C4="domain",x4="path",QD="Not dynamic - ",Qw=/-([a-z])/g,wY=/([^\w\d_$])/g,_Y=/^(\d+[\w\d_$])/;function v4(A){return!K(A)}s(v4,"isNotNullOrUndefined");function py(A){var v=A;return v&&ce(v)&&(v=v[_p](Qw,function(T,S){return S.toUpperCase()}),v=v[_p](wY,"_"),v=v[_p](_Y,function(T,S){return"_"+S})),v}s(py,"normalizeJsName");function xl(A,v){return A&&v?Rm(A,v)!==-1:!1}s(xl,"strContains");function J3(A){return A&&A.toISOString()||""}s(J3,"toISOString");function nl(A){return at(A)?A[Ip]:hi}s(nl,"getExceptionName");function Rp(A,v,T,S,P){var L=T;return A&&(L=A[v],L!==T&&(!P||P(L))&&(!S||S(T))&&(L=T,A[v]=L)),L}s(Rp,"setValue");function OD(A,v,T){var S;return A?(S=A[v],!S&&K(S)&&(S=U(T)?{}:T,A[v]=S)):S=U(T)?{}:T,S}s(OD,"getSetValue");function SY(A,v){var T=null,S=null;return De(A)?T=A:S=A,function(){var P=arguments;if(T&&(S=T()),S)return S[v][n4](S,P)}}s(SY,"_createProxyFunction");function X3(A,v,T,S,P){A&&v&&T&&(P!==!1||U(A[v]))&&(A[v]=SY(T,S))}s(X3,"proxyFunctionAs");function Ow(A,v,T,S){return A&&v&&be(A)&&qe(T)&&Jr(T,function(P){ce(P)&&X3(A,P,v,P,S)}),A}s(Ow,"proxyFunctions");function RY(A){return function(){function v(){var T=this;A&&ne(A,function(S,P){T[S]=P})}return s(v,"class_1"),v}()}s(RY,"createClassFromInterface");function Uw(A){return A&&Je&&(A=Sw(Je({},A))),A}s(Uw,"optimizeObject");function UD(A,v,T,S,P,L){var W=arguments,se=W[0]||{},fe=W[Yn],ve=!1,ke=1;for(fe>0&&ft(se)&&(ve=se,se=W[ke]||{},ke++),be(se)||(se={});ke<fe;ke++){var We=W[ke],et=qe(We),He=be(We);for(var Ye in We){var pt=et&&Ye in We||He&&Ge(We,Ye);if(pt){var ct=We[Ye],Tt=void 0;if(ve&&ct&&((Tt=qe(ct))||s0(ct))){var Jt=se[Ye];Tt?qe(Jt)||(Jt=[]):s0(Jt)||(Jt={}),ct=UD(ve,Jt,ct)}ct!==void 0&&(se[Ye]=ct)}}}return se}s(UD,"objExtend");function b4(A){try{return A.responseText}catch{}return null}s(b4,"getResponseText");function qD(A,v){return A?"XDomainRequest,Response:"+b4(A)||"":v}s(qD,"formatErrorMessageXdr");function E4(A,v){return A?"XMLHttpRequest,Status:"+A[z3]+",Response:"+b4(A)||A.response||"":v}s(E4,"formatErrorMessageXhr");function WD(A,v){return v&&(Xe(v)?A=[v].concat(A):qe(v)&&(A=v.concat(A))),A}s(WD,"prependTransports");var qw="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Z3="withCredentials",sd="timeout";function Ww(A,v,T,S,P,L){S===void 0&&(S=!1),P===void 0&&(P=!1);function W(fe,ve,ke){try{fe[ve]=ke}catch{}}s(W,"_wrapSetXhrProp");var se=new XMLHttpRequest;return S&&W(se,qw,S),T&&W(se,Z3,T),se.open(A,v,!P),T&&W(se,Z3,T),!P&&L&&W(se,sd,L),se}s(Ww,"openXhr");function GD(A){var v={};if(ce(A)){var T=ji(A)[wp](/[\r\n]+/);Jr(T,function(S){if(S){var P=S.indexOf(": ");if(P!==-1){var L=ji(S.substring(0,P))[Z2](),W=ji(S.substring(P+1));v[L]=W}else v[ji(S)]=1}})}return v}s(GD,"convertAllHeadersToMap");function kp(A,v,T){if(!A[T]&&v&&v.getResponseHeader){var S=v.getResponseHeader(T);S&&(A[T]=ji(S))}return A}s(kp,"_appendHeader");var Tn="kill-duration",gy="kill-duration-seconds",U1="time-delta-millis";function q1(A,v){var T={};return A[Bw]?T=GD(A[Bw]()):v&&(T=kp(T,A,U1),T=kp(T,A,Tn),T=kp(T,A,gy)),T}s(q1,"_getAllResponseHeaders");var Gw="documentMode",ex="location",Ay="console",I4="JSON",Hw="crypto",T4="msCrypto",yy="msie",W1="trident/",jw="XMLHttpRequest",j0=null,Cy=null,ad=!1,Tc=null,xy=null;function tx(A,v){var T=!1;if(A){try{if(T=v in A,!T){var S=A[H3];S&&(T=v in S)}}catch{}if(!T)try{var P=new A;T=!U(P[v])}catch{}}return T}s(tx,"_hasProperty");function vy(A){if(A&&ad){var v=ta("__mockLocation");if(v)return v}return typeof location===vD&&location?location:ta(ex)}s(vy,"getLocation");function rx(){return typeof console!==bD?console:ta(Ay)}s(rx,"getConsole");function by(){return!!(typeof JSON===vD&&JSON||ta(I4)!==null)}s(by,"hasJSON");function l0(){return by()?JSON||ta(I4):null}s(l0,"getJSON");function w4(){return ta(Hw)}s(w4,"getCrypto");function _4(){return ta(T4)}s(_4,"getMsCrypto");function qu(){var A=dp();if(A&&(A[l4]!==Cy||j0===null)){Cy=A[l4];var v=(Cy||hi)[Z2]();j0=xl(v,yy)||xl(v,W1)}return j0}s(qu,"isIE");function Ey(A){if(A===void 0&&(A=null),!A){var v=dp()||{};A=v?(v.userAgent||hi)[Z2]():hi}var T=(A||hi)[Z2]();if(xl(T,yy)){var S=M2()||{};return Ie(parseInt(T[wp](yy)[1]),S[Gw]||0)}else if(xl(T,W1)){var P=parseInt(T[wp](W1)[1]);if(P)return P+4}return null}s(Ey,"getIEVersion");function Bp(A){return(xy===null||A===!1)&&(xy=oY()&&!!dp().sendBeacon),xy}s(Bp,"isBeaconsSupported");function nx(A){var v=!1;try{v=!!ta("fetch");var T=ta("Request");v&&A&&T&&(v=tx(T,"keepalive"))}catch{}return v}s(nx,"isFetchSupported");function Vw(){return Tc===null&&(Tc=typeof XDomainRequest!==bD,Tc&&$w()&&(Tc=Tc&&!tx(ta(jw),"withCredentials"))),Tc}s(Vw,"useXDomainRequest");function $w(){var A=!1;try{var v=ta(jw);A=!!v}catch{}return A}s($w,"isXhrSupported");var il=4294967296,ld=4294967295,S4=123456789,zw=987654321,Mm=!1,V0=S4,Iy=zw;function Yw(A){A<0&&(A>>>=0),V0=S4+A&ld,Iy=zw-A&ld,Mm=!0}s(Yw,"_mwcSeed");function HD(){try{var A=gp()&2147483647;Yw((Math.random()*il^A)+A)}catch{}}s(HD,"_autoSeedMwc");function Kw(A){var v=0,T=w4()||_4();return T&&T.getRandomValues&&(v=T.getRandomValues(new Uint32Array(1))[0]&ld),v===0&&qu()&&(Mm||HD(),v=jD()&ld),v===0&&(v=w1(il*Math.random()|0)),A||(v>>>=0),v}s(Kw,"random32");function jD(A){Iy=36969*(Iy&65535)+(Iy>>16)&ld,V0=18e3*(V0&65535)+(V0>>16)&ld;var v=(Iy<<16)+(V0&65535)>>>0&ld|0;return A||(v>>>=0),v}s(jD,"mwcRandom32");function kY(A){A===void 0&&(A=22);for(var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=Kw()>>>0,S=0,P=hi;P[Yn]<A;)S++,P+=v.charAt(T&63),T>>>=6,S===5&&(T=(Kw()<<2&4294967295|T&3)>>>0,S=0);return P}s(kY,"newId");var Ty="3.3.6",BY="."+kY(6),DY=0;function VD(A){return A.nodeType===1||A.nodeType===9||!+A.nodeType}s(VD,"_canAcceptData");function $D(A,v){var T=v[A.id];if(!T){T={};try{VD(v)&&Ue(v,A.id,{e:!1,v:T})}catch{}}return T}s($D,"_getCache");function Qm(A,v){return v===void 0&&(v=!1),py(A+DY+++(v?"."+Ty:hi)+BY)}s(Qm,"createUniqueNamespace");function zD(A){var v={id:Qm("_aiData-"+(A||hi)+"."+Ty),accept:s(function(T){return VD(T)},"accept"),get:s(function(T,S,P,L){var W=T[v.id];return W?W[py(S)]:(L&&(W=$D(v,T),W[py(S)]=P),P)},"get"),kill:s(function(T,S){if(T&&T[S])try{delete T[S]}catch{}},"kill")};return v}s(zD,"createElmNodeData");function wy(A){return A&&be(A)&&(A.isVal||A.fb||Ge(A,"v")||Ge(A,"mrg")||Ge(A,"ref")||A.set)}s(wy,"_isConfigDefaults");function YD(A,v,T){var S,P=T.dfVal||re;if(v&&T.fb){var L=T.fb;qe(L)||(L=[L]);for(var W=0;W<L[Yn];W++){var se=L[W],fe=v[se];if(P(fe)?S=fe:A&&(fe=A.cfg[se],P(fe)&&(S=fe),A.set(A.cfg,Ct(se),fe)),P(S))break}}return!P(S)&&P(T.v)&&(S=T.v),S}s(YD,"_getDefault");function Jw(A,v,T){var S=T;if(T&&wy(T)&&(S=YD(A,v,T)),S){wy(S)&&(S=Jw(A,v,S));var P;qe(S)?(P=[],P[Yn]=S[Yn]):s0(S)&&(P={}),P&&(ne(S,function(L,W){W&&wy(W)&&(W=Jw(A,v,W)),P[L]=W}),S=P)}return S}s(Jw,"_resolveDefaultValue");function Xw(A,v,T,S){var P,L,W,se=S,fe,ve,ke,We;wy(se)?(P=se.isVal,L=se.set,ke=se.rdOnly,We=se.blkVal,fe=se.mrg,ve=se.ref,!ve&&U(ve)&&(ve=!!fe),W=YD(A,v,se)):W=S,We&&A.blkVal(v,T);var et,He=!0,Ye=v[T];(Ye||!K(Ye))&&(et=Ye,He=!1,P&&et!==W&&!P(et)&&(et=W,He=!0),L&&(et=L(et,W,v),He=et===W)),He?W?et=Jw(A,v,W):et=W:(s0(et)||qe(W))&&fe&&W&&(s0(W)||qe(W))&&ne(W,function(pt,ct){Xw(A,et,pt,ct)}),A.set(v,T,et),ve&&A.ref(v,T),ke&&A.rdOnly(v,T)}s(Xw,"_applyDefaultValue");var Dp=L3("[[ai_dynCfg_1]]"),KD=L3("[[ai_blkDynCfg_1]]"),JD=L3("[[ai_frcDynCfg_1]]");function XD(A){if(A){var v;if(qe(A)?(v=[],v[Yn]=A[Yn]):s0(A)&&(v={}),v)return ne(A,function(T,S){v[T]=XD(S)}),v}return A}s(XD,"_cfgDeepCopy");function PY(A){if(A){var v=A[Dp]||A;if(v.cfg&&(v.cfg===A||v.cfg[Dp]===v))return v}return null}s(PY,"getDynamicConfigHandler");function NY(A){if(A&&(s0(A)||qe(A)))try{A[KD]=!0}catch{}return A}s(NY,"blockDynamicConversion");function Zw(A,v,T){var S=!1;return T&&!A[v.blkVal]&&(S=T[JD],!S&&!T[KD]&&(S=s0(T)||qe(T))),S}s(Zw,"_canMakeDynamic");function _y(A){Xt("InvalidAccess:"+A)}s(_y,"throwInvalidAccess");var LY=["push","pop","shift","unshift","splice"],ix=s(function(A,v,T,S){A&&A[D1](3,108,"".concat(T," [").concat(v,"] failed - ")+yt(S))},"_throwDynamicError");function Pp(A,v,T){qe(v)&&Jr(LY,function(S){var P=v[S];v[S]=function(){for(var L=[],W=0;W<arguments.length;W++)L[W]=arguments[W];var se=P[n4](this,L);return ky(A,v,T,"Patching"),se}})}s(Pp,"_patchArray");function Wu(A,v){var T=Ne(A,v);return T&&T.get}s(Wu,"_getOwnPropGetter");function ZD(A,v,T,S){var P={n:T,h:[],trk:s(function(ve){ve&&ve.fn&&(o0(P.h,ve)===-1&&P.h[Vi](ve),A.trk(ve,P))},"trk"),clr:s(function(ve){var ke=o0(P.h,ve);ke!==-1&&P.h[ty](ke,1)},"clr")},L=!0,W=!1;function se(){L&&(W=W||Zw(se,A,S),S&&!S[Dp]&&W&&(S=ky(A,S,T,"Converting")),L=!1);var ve=A.act;return ve&&P.trk(ve),S}s(se,"_getProperty"),se[A.prop]={chng:s(function(){A.add(P)},"chng")};function fe(ve){if(S!==ve){se[A.ro]&&!A.upd&&_y("["+T+"] is read-only:"+yt(v)),L&&(W=W||Zw(se,A,S),L=!1);var ke=W&&se[A.rf];if(W)if(ke){ne(S,function(et){S[et]=ve?ve[et]:G0});try{ne(ve,function(et,He){Sy(A,S,et,He)}),ve=S}catch(et){ix((A.hdlr||{})[ha],T,"Assigning",et),W=!1}}else S&&S[Dp]&&ne(S,function(et){var He=Wu(S,et);if(He){var Ye=He[A.prop];Ye&&Ye.chng()}});if(ve!==S){var We=ve&&Zw(se,A,ve);!ke&&We&&(ve=ky(A,ve,T,"Converting")),S=ve,W=We}A.add(P)}}s(fe,"_setProperty"),Ue(v,P.n,{g:se,s:fe})}s(ZD,"_createDynamicProperty");function Sy(A,v,T,S){if(v){var P=Wu(v,T),L=P&&!!P[A.prop];L?v[T]=S:ZD(A,v,T,S)}return v}s(Sy,"_setDynamicProperty");function Ry(A,v,T,S){if(v){var P=Wu(v,T),L=P&&!!P[A.prop],W=S&&S[0],se=S&&S[1],fe=S&&S[2];if(!L){if(fe)try{NY(v)}catch(ve){ix((A.hdlr||{})[ha],T,"Blocking",ve)}try{Sy(A,v,T,v[T]),P=Wu(v,T)}catch(ve){ix((A.hdlr||{})[ha],T,"State",ve)}}W&&(P[A.rf]=W),se&&(P[A.ro]=se),fe&&(P[A.blkVal]=!0)}return v}s(Ry,"_setDynamicPropertyState");function ky(A,v,T,S){try{ne(v,function(P,L){Sy(A,v,P,L)}),v[Dp]||(Ce(v,Dp,{get:s(function(){return A.hdlr},"get")}),Pp(A,v,T))}catch(P){ix((A.hdlr||{})[ha],T,S,P)}return v}s(ky,"_makeDynamicObject");var ox="[[ai_",sx="]]";function FY(A){var v=I1(ox+"get"+A.uid+sx),T=I1(ox+"ro"+A.uid+sx),S=I1(ox+"rf"+A.uid+sx),P=I1(ox+"blkVal"+A.uid+sx),L=I1(ox+"dtl"+A.uid+sx),W=null,se=null,fe;function ve(He,Ye){var pt=fe.act;try{fe.act=He,He&&He[L]&&(Jr(He[L],function(Tt){Tt.clr(He)}),He[L]=[]),Ye({cfg:A.cfg,set:A.set.bind(A),setDf:A.setDf.bind(A),ref:A.ref.bind(A),rdOnly:A.rdOnly.bind(A)})}catch(Tt){var ct=A[ha];throw ct&&ct[D1](1,107,yt(Tt)),Tt}finally{fe.act=pt||null}}s(ve,"_useHandler");function ke(){if(W){var He=W;W=null,se&&se[ry](),se=null;var Ye=[];if(Jr(He,function(pt){if(pt&&(pt[L]&&(Jr(pt[L],function(ct){ct.clr(pt)}),pt[L]=null),pt.fn))try{ve(pt,pt.fn)}catch(ct){Ye[Vi](ct)}}),W)try{ke()}catch(pt){Ye[Vi](pt)}Ye[Yn]>0&&Nw("Watcher error(s): ",Ye)}}s(ke,"_notifyWatchers");function We(He){if(He&&He.h[Yn]>0){W||(W=[]),se||(se=Cp(function(){se=null,ke()},0));for(var Ye=0;Ye<He.h[Yn];Ye++){var pt=He.h[Ye];pt&&o0(W,pt)===-1&&W[Vi](pt)}}}s(We,"_addWatcher");function et(He,Ye){if(He){var pt=He[L]=He[L]||[];o0(pt,Ye)===-1&&pt[Vi](Ye)}}return s(et,"_trackHandler"),fe={prop:v,ro:T,rf:S,blkVal:P,hdlr:A,add:We,notify:ke,use:ve,trk:et},fe}s(FY,"_createState");function R4(A,v){var T={fn:v,rm:s(function(){T.fn=null,A=null,v=null},"rm")};return Ue(T,"toJSON",{v:s(function(){return"WatcherHandler"+(T.fn?"":"[X]")},"v")}),A.use(T,v),T}s(R4,"_createAndUseHandler");function eP(A,v,T){var S=PY(v);if(S)return S;var P=Qm("dyncfg",!0),L=v&&T!==!1?v:XD(v),W;function se(){W.notify()}s(se,"_notifyWatchers");function fe(ct,Tt,Jt){try{ct=Sy(W,ct,Tt,Jt)}catch(pr){ix(A,Tt,"Setting value",pr)}return ct[Tt]}s(fe,"_setValue");function ve(ct){return R4(W,ct)}s(ve,"_watch");function ke(ct,Tt){W.use(null,function(Jt){var pr=W.upd;try{U(Tt)||(W.upd=Tt),ct(Jt)}finally{W.upd=pr}})}s(ke,"_block");function We(ct,Tt){var Jt;return Ry(W,ct,Tt,(Jt={},Jt[0]=!0,Jt))[Tt]}s(We,"_ref");function et(ct,Tt){var Jt;return Ry(W,ct,Tt,(Jt={},Jt[1]=!0,Jt))[Tt]}s(et,"_rdOnly");function He(ct,Tt){var Jt;return Ry(W,ct,Tt,(Jt={},Jt[2]=!0,Jt))[Tt]}s(He,"_blkPropValue");function Ye(ct,Tt){return Tt&&ne(Tt,function(Jt,pr){Xw(pt,ct,Jt,pr)}),ct}s(Ye,"_applyDefaults");var pt={uid:null,cfg:L,logger:A,notify:se,set:fe,setDf:Ye,watch:ve,ref:We,rdOnly:et,blkVal:He,_block:ke};return Ue(pt,"uid",{c:!1,e:!1,w:!1,v:P}),W=FY(pt),ky(W,L,"config","Creating"),pt}s(eP,"_createDynamicHandler");function tP(A,v){A?(A[ey](v),A[D1](2,108,v)):_y(v)}s(tP,"_logInvalidAccess");function $0(A,v,T,S){var P=eP(T,A||{},S);return v&&P.setDf(P.cfg,v),P}s($0,"createDynamicConfig");function Om(A,v,T){var S=A[Dp]||A;return S.cfg&&(S.cfg===A||S.cfg[Dp]===S)?S[Dm](v):(tP(T,QD+yt(A)),$0(A,null,T)[Dm](v))}s(Om,"onConfigChange");function By(A,v){if(A&&A[P1])return A[P1](v)}s(By,"runTargetUnload");function rP(A,v,T){var S;return T||(S=uy(function(P){T=P})),A&&dY(A)>0?W0(By(A[0],v),function(){rP(U2(A,1),v,T)}):T(),S}s(rP,"doUnloadAll");var MY=500,nP="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function QY(A,v,T){return!A&&K(A)?v:ft(A)?A:Ct(A)[Z2]()==="true"}s(QY,"_stringToBoolOrDefault");function OY(A){return{mrg:!0,v:A}}s(OY,"cfgDfMerge");function e7(A,v,T){return{fb:T,isVal:A,v}}s(e7,"cfgDfValidate");function cd(A,v){return{fb:v,set:QY,v:!!A}}s(cd,"cfgDfBoolean");var k4=[my,hy,A4,O1],B4=null,D4;function UY(A,v){return function(){var T=arguments,S=iP(v);if(S){var P=S.listener;P&&P[A]&&P[A][n4](P,T)}}}s(UY,"_listenerProxyFunc");function qY(){var A=ta("Microsoft");return A&&(B4=A.ApplicationInsights),B4}s(qY,"_getExtensionNamespace");function iP(A){var v=B4;return!v&&A.disableDbgExt!==!0&&(v=B4||qY()),v?v.ChromeDbgExt:null}s(iP,"getDebugExt");function WY(A){if(!D4){D4={};for(var v=0;v<k4[Yn];v++)D4[k4[v]]=UY(k4[v],A)}return D4}s(WY,"getDebugListener");var Dy,oP="warnToConsole",GY="AI (Internal): ",HY="AI: ",jY="AITR_",sP={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},Py=(Dy={},Dy[0]=null,Dy[1]="errorToConsole",Dy[2]=oP,Dy[3]="debugToConsole",Dy);function c0(A){return A?'"'+A[_p](/\"/g,hi)+'"':hi}s(c0,"_sanitizeDiagnosticText");function ax(A,v){var T=rx();if(T){var S="log";T[A]&&(S=A),De(T[S])&&T[S](v)}}s(ax,"_logToConsole");var P4=function(){function A(v,T,S,P){S===void 0&&(S=!1);var L=this;L[s4]=v,L[L1]=(S?HY:GY)+v;var W=hi;by()&&(W=l0().stringify(P));var se=(T?" message:"+c0(T):hi)+(P?" props:"+c0(W):hi);L[L1]+=se}return s(A,"_InternalLogMessage"),A.dataType="MessageData",A}();function lx(A,v){return(A||{})[ha]||new cx(v)}s(lx,"safeGetLogger");var cx=function(){function A(v){this.identifier="DiagnosticLogger",this.queue=[];var T=0,S={},P,L,W,se,fe;Yl(A,this,function(ve){fe=We(v||{}),ve.consoleLoggingLevel=function(){return P},ve[D1]=function(Ye,pt,ct,Tt,Jt){Jt===void 0&&(Jt=!1);var pr=new P4(pt,ct,Jt,Tt);if(se)throw yt(pr);var Pr=Py[Ye]||oP;if(U(pr[L1]))He("throw"+(Ye===1?"Critical":"Warning"),pr);else{if(Jt){var jn=+pr[s4];!S[jn]&&P>=Ye&&(ve[Pr](pr[L1]),S[jn]=!0)}else P>=Ye&&ve[Pr](pr[L1]);ke(Ye,pr)}},ve.debugToConsole=function(Ye){ax("debug",Ye),He("warning",Ye)},ve[ey]=function(Ye){ax("warn",Ye),He("warning",Ye)},ve.errorToConsole=function(Ye){ax("error",Ye),He("error",Ye)},ve.resetInternalMessageCount=function(){T=0,S={}},ve.logInternalMessage=ke,ve[P1]=function(Ye){fe&&fe.rm(),fe=null};function ke(Ye,pt){if(!et()){var ct=!0,Tt=jY+pt[s4];if(S[Tt]?ct=!1:S[Tt]=!0,ct&&(Ye<=L&&(ve.queue[Vi](pt),T++,He(Ye===1?"error":"warn",pt)),T===W)){var Jt="Internal events throttle limit per PageView reached for this app.",pr=new P4(23,Jt,!1);ve.queue[Vi](pr),Ye===1?ve.errorToConsole(Jt):ve[ey](Jt)}}}s(ke,"_logInternalMessage");function We(Ye){return Om($0(Ye,sP,ve).cfg,function(pt){var ct=pt.cfg;P=ct[wD],L=ct.loggingLevelTelemetry,W=ct.maxMessageLimit,se=ct.enableDebug})}s(We,"_setDefaultsFromConfig");function et(){return T>=W}s(et,"_areInternalMessagesThrottled");function He(Ye,pt){var ct=iP(v||{});ct&&ct[id]&&ct[id](Ye,pt)}s(He,"_debugExtMsg")})}return s(A,"DiagnosticLogger"),A.__ieDyn=1,A}();function t7(A){return A||new cx}s(t7,"_getLogger");function Or(A,v,T,S,P,L){L===void 0&&(L=!1),t7(A)[D1](v,T,S,P,L)}s(Or,"_throwInternal");function N4(A,v){t7(A)[ey](v)}s(N4,"_warnToConsole");var ux,Np,aP="toGMTString",lP="toUTCString",L4="cookie",Um="expires",cP="isCookieUseDisabled",F4="disableCookiesUsage",uP="_ckMgr",M4=null,Ny=null,Q4=null,ud,fP={},dP={},mP=(ux={cookieCfg:OY((Np={},Np[C4]={fb:"cookieDomain",dfVal:v4},Np.path={fb:"cookiePath",dfVal:v4},Np.enabled=G0,Np.ignoreCookies=G0,Np.blockedCookies=G0,Np)),cookieDomain:G0,cookiePath:G0},ux[F4]=G0,ux);function r7(){!ud&&(ud=fr(function(){return M2()}))}s(r7,"_getDoc");function fx(A){return A?A.isEnabled():!0}s(fx,"_isMgrEnabled");function n7(A,v){return v&&A&&qe(A.ignoreCookies)?o0(A.ignoreCookies,v)!==-1:!1}s(n7,"_isIgnoredCookie");function VY(A,v){return v&&A&&qe(A.blockedCookies)&&o0(A.blockedCookies,v)!==-1?!0:n7(A,v)}s(VY,"_isBlockedCookie");function i7(A,v){var T=v[rd];if(K(T)){var S=void 0;U(A[cP])||(S=!A[cP]),U(A[F4])||(S=!A[F4]),T=S}return T}s(i7,"_isCfgEnabled");function $Y(A,v){var T,S,P,L,W,se,fe,ve;A=$0(A||dP,null,v).cfg,L=Om(A,function(We){We.setDf(We.cfg,mP),T=We.ref(We.cfg,"cookieCfg"),S=T[x4]||"/",P=T[C4],W=i7(A,T)!==!1,se=T.getCookie||zY,fe=T.setCookie||Ly,ve=T.delCookie||Ly},v);var ke={isEnabled:s(function(){var We=i7(A,T)!==!1&&W&&hP(v),et=dP[uP];return We&&et&&ke!==et&&(We=fx(et)),We},"isEnabled"),setEnabled:s(function(We){W=We!==!1,T[rd]=We},"setEnabled"),set:s(function(We,et,He,Ye,pt){var ct=!1;if(fx(ke)&&!VY(T,We)){var Tt={},Jt=ji(et||hi),pr=Rm(Jt,";");if(pr!==-1&&(Jt=ji(F(et,pr)),Tt=o7(de(et,pr+1))),Rp(Tt,C4,Ye||P,oe,U),!K(He)){var Pr=qu();if(U(Tt[Um])){var jn=gp(),xi=jn+He*1e3;if(xi>0){var vi=new Date;vi.setTime(xi),Rp(Tt,Um,pP(vi,Pr?aP:lP)||pP(vi,Pr?aP:lP)||hi,oe)}}Pr||Rp(Tt,"max-age",hi+He,null,U)}var fo=vy();fo&&fo.protocol==="https:"&&(Rp(Tt,"secure",null,null,U),Ny===null&&(Ny=!YY((dp()||{})[l4])),Ny&&Rp(Tt,"SameSite","None",null,U)),Rp(Tt,x4,pt||S,null,U),fe(We,gP(Jt,Tt)),ct=!0}return ct},"set"),get:s(function(We){var et=hi;return fx(ke)&&!n7(T,We)&&(et=se(We)),et},"get"),del:s(function(We,et){var He=!1;return fx(ke)&&(He=ke.purge(We,et)),He},"del"),purge:s(function(We,et){var He,Ye=!1;if(hP(v)){var pt=(He={},He[x4]=et||"/",He[Um]="Thu, 01 Jan 1970 00:00:01 GMT",He);qu()||(pt["max-age"]="0"),ve(We,gP(hi,pt)),Ye=!0}return Ye},"purge"),unload:s(function(We){L&&L.rm(),L=null},"unload")};return ke[uP]=ke,ke}s($Y,"createCookieMgr");function hP(A){if(M4===null){M4=!1,!ud&&r7();try{var v=ud.v||{};M4=v[L4]!==void 0}catch(T){Or(A,2,68,"Cannot access document.cookie - "+nl(T),{exception:yt(T)})}}return M4}s(hP,"areCookiesSupported");function o7(A){var v={};if(A&&A[Yn]){var T=ji(A)[wp](";");Jr(T,function(S){if(S=ji(S||hi),S){var P=Rm(S,"=");P===-1?v[S]=null:v[ji(F(S,P))]=ji(de(S,P+1))}})}return v}s(o7,"_extractParts");function pP(A,v){return De(A[v])?A[v]():null}s(pP,"_formatDate");function gP(A,v){var T=A||hi;return ne(v,function(S,P){T+="; "+S+(K(P)?hi:"="+P)}),T}s(gP,"_formatCookieValue");function zY(A){var v=hi;if(!ud&&r7(),ud.v){var T=ud.v[L4]||hi;Q4!==T&&(fP=o7(T),Q4=T),v=ji(fP[A]||hi)}return v}s(zY,"_getCookieValue");function Ly(A,v){!ud&&r7(),ud.v&&(ud.v[L4]=A+"="+v)}s(Ly,"_setCookieValue");function YY(A){return ce(A)?!!(xl(A,"CPU iPhone OS 12")||xl(A,"iPad; CPU OS 12")||xl(A,"Macintosh; Intel Mac OS X 10_14")&&xl(A,"Version/")&&xl(A,"Safari")||xl(A,"Macintosh; Intel Mac OS X 10_14")&&xD(A,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||xl(A,"Chrome/5")||xl(A,"Chrome/6")||xl(A,"UnrealEngine")&&!xl(A,"Chrome")||xl(A,"UCBrowser/12")||xl(A,"UCBrowser/11")):!1}s(YY,"uaDisallowsSameSiteNone");var s7={perfEvtsSendAll:!1};function KY(A){A.h=null;var v=A.cb;A.cb=[],Jr(v,function(T){ee(T.fn,[T.arg])})}s(KY,"_runScheduledListeners");function Lp(A,v,T,S){Jr(A,function(P){P&&P[v]&&(T?(T.cb[Vi]({fn:S,arg:P}),T.h=T.h||Cp(KY,0,T)):ee(S,[P]))})}s(Lp,"_runListeners");var JY=function(){function A(v){this.listeners=[];var T,S,P=[],L={h:null,cb:[]},W=$0(v,s7);S=W[Dm](function(se){T=!!se.cfg.perfEvtsSendAll}),Yl(A,this,function(se){Ue(se,"listeners",{g:s(function(){return P},"g")}),se[i4]=function(fe){P[Vi](fe)},se[$3]=function(fe){for(var ve=o0(P,fe);ve>-1;)P[ty](ve,1),ve=o0(P,fe)},se[my]=function(fe){Lp(P,my,L,function(ve){ve[my](fe)})},se[hy]=function(fe,ve){Lp(P,hy,L,function(ke){ke[hy](fe,ve)})},se[A4]=function(fe,ve){Lp(P,A4,ve?L:null,function(ke){ke[A4](fe,ve)})},se[O1]=function(fe){fe&&(T||!fe[Dw]())&&Lp(P,O1,null,function(ve){fe.isAsync?Cp(function(){return ve[O1](fe)},0):ve[O1](fe)})},se[Fw]=function(fe){fe&&fe[Yn]&&Lp(P,Fw,L,function(ve){ve[Fw](fe)})},se[Mw]=function(fe){fe&&fe[ay]&&Lp(P,Mw,L,function(ve){ve[Mw](fe)})},se[y4]=function(fe,ve){if(fe>0){var ke=ve||0;Lp(P,y4,L,function(We){We[y4](fe,ke)})}},se[P1]=function(fe){var ve=s(function(){S&&S.rm(),S=null,P=[],L.h&&L.h[ry](),L.h=null,L.cb=[]},"_finishUnload"),ke;if(Lp(P,"unload",null,function(We){var et=We[P1](fe);et&&(ke||(ke=[]),ke[Vi](et))}),ke)return uy(function(We){return W0(Lw(ke),function(){ve(),We()})});ve()}})}return s(A,"NotificationManager"),A.__ieDyn=1,A}(),Fy="ctx",a7="ParentContextKey",dx="ChildrenContextKey",XY=null,O4=function(){function A(v,T,S){var P=this;if(P.start=gp(),P[Ip]=v,P.isAsync=S,P[Dw]=function(){return!1},De(T)){var L;Ue(P,"payload",{g:s(function(){return!L&&De(T)&&(L=T(),T=null),L},"g")})}P[Sp]=function(W){return W?W===A[a7]||W===A[dx]?P[W]:(P[Fy]||{})[W]:null},P[Ou]=function(W,se){if(W)if(W===A[a7])P[W]||(P[Dw]=function(){return!0}),P[W]=se;else if(W===A[dx])P[W]=se;else{var fe=P[Fy]=P[Fy]||{};fe[W]=se}},P.complete=function(){var W=0,se=P[Sp](A[dx]);if(qe(se))for(var fe=0;fe<se[Yn];fe++){var ve=se[fe];ve&&(W+=ve.time)}P.time=gp()-P.start,P.exTime=P.time-W,P.complete=function(){}}}return s(A,"PerfEvent"),A.ParentContextKey="parent",A.ChildrenContextKey="childEvts",A}(),ZY=function(){function A(v){this.ctx={},Yl(A,this,function(T){T.create=function(S,P,L){return new O4(S,P,L)},T.fire=function(S){S&&(S.complete(),v&&De(v[O1])&&v[O1](S))},T[Ou]=function(S,P){if(S){var L=T[Fy]=T[Fy]||{};L[S]=P}},T[Sp]=function(S){return(T[Fy]||{})[S]}})}return s(A,"PerfManager"),A.__ieDyn=1,A}(),fd="CoreUtils.doPerf";function My(A,v,T,S,P){if(A){var L=A;if(L[K3]&&(L=L[K3]()),L){var W=void 0,se=L[Sp](fd);try{if(W=L.create(v(),S,P),W){if(se&&W[Ou]&&(W[Ou](O4[a7],se),se[Sp]&&se[Ou])){var fe=se[Sp](O4[dx]);fe||(fe=[],se[Ou](O4[dx],fe)),fe[Vi](W)}return L[Ou](fd,W),T(W)}}catch(ve){W&&W[Ou]&&W[Ou]("exception",ve)}finally{W&&L.fire(W),L[Ou](fd,se)}}}return T()}s(My,"doPerf");function ga(){return XY}s(ga,"getGblPerfMgr");var U4="00000000000000000000000000000000",Qy="0000000000000000";function q4(A,v,T){return A&&A[Yn]===v&&A!==T?!!A.match(/^[\da-f]*$/i):!1}s(q4,"_isValid");function Fp(A){return q4(A,32,U4)}s(Fp,"isValidTraceId");function G1(A){return q4(A,16,Qy)}s(G1,"isValidSpanId");var mx=zD("plugin");function Mp(A){return mx.get(A,"state",{},!0)}s(Mp,"_getPluginState");function l7(A,v){for(var T=[],S=null,P=A[od](),L;P;){var W=P[iy]();if(W){S&&S[Tp]&&W[H0]&&S[Tp](W),L=Mp(W);var se=!!L[td];W[td]&&(se=W[td]()),se||T[Vi](W),S=W,P=P[od]()}}Jr(T,function(fe){var ve=A[pa]();fe[V3](A.getCfg(),ve,v,A[od]()),L=Mp(fe),!fe[pa]&&!L[pa]&&(L[pa]=ve),L[td]=!0,delete L[nd]})}s(l7,"initializePlugins");function c7(A){return A.sort(function(v,T){var S=0;if(T){var P=T[H0];v[H0]?S=P?v[dy]-T[dy]:1:P&&(S=-1)}else S=v?1:-1;return S})}s(c7,"sortPlugins");function eK(A){var v={};return{getName:s(function(){return v[Ip]},"getName"),setName:s(function(T){A&&A.setName(T),v[Ip]=T},"setName"),getTraceId:s(function(){return v.traceId},"getTraceId"),setTraceId:s(function(T){A&&A.setTraceId(T),Fp(T)&&(v.traceId=T)},"setTraceId"),getSpanId:s(function(){return v.spanId},"getSpanId"),setSpanId:s(function(T){A&&A.setSpanId(T),G1(T)&&(v.spanId=T)},"setSpanId"),getTraceFlags:s(function(){return v[SD]},"getTraceFlags"),setTraceFlags:s(function(T){A&&A.setTraceFlags(T),v[SD]=T},"setTraceFlags")}}s(eK,"createDistributedTraceContext");var tK="TelemetryPluginChain",AP="_hasRun",u7="_getTelCtx",yP=0;function rK(A,v,T){for(;A;){if(A[iy]()===T)return A;A=A[od]()}return D([T],v.config||{},v)}s(rK,"_getNextProxyStart");function f7(A,v,T,S){var P=null,L=[];v||(v=$0({},null,T[ha])),S!==null&&(P=S?rK(A,T,S):A);var W={_next:fe,ctx:{core:s(function(){return T},"core"),diagLog:s(function(){return lx(T,v.cfg)},"diagLog"),getCfg:s(function(){return v.cfg},"getCfg"),getExtCfg:ke,getConfig:We,hasNext:s(function(){return!!P},"hasNext"),getNext:s(function(){return P},"getNext"),setNext:s(function(He){P=He},"setNext"),iterate:et,onComplete:se}};function se(He,Ye){for(var pt=[],ct=2;ct<arguments.length;ct++)pt[ct-2]=arguments[ct];He&&L[Vi]({func:He,self:U(Ye)?W.ctx:Ye,args:pt})}s(se,"_addOnComplete");function fe(){var He=P;if(P=He?He[od]():null,!He){var Ye=L;Ye&&Ye[Yn]>0&&(Jr(Ye,function(pt){try{pt.func.call(pt.self,pt.args)}catch(ct){Or(T[ha],2,73,"Unexpected Exception during onComplete - "+yt(ct))}}),L=[])}return He}s(fe,"_moveNext");function ve(He,Ye){var pt=null,ct=v.cfg;if(ct&&He){var Tt=ct[Q1];!Tt&&Ye&&(Tt={}),ct[Q1]=Tt,Tt=v.ref(ct,Q1),Tt&&(pt=Tt[He],!pt&&Ye&&(pt={}),Tt[He]=pt,pt=v.ref(Tt,He))}return pt}s(ve,"_getExtCfg");function ke(He,Ye){var pt=ve(He,!0);return Ye&&ne(Ye,function(ct,Tt){if(K(pt[ct])){var Jt=v.cfg[ct];(Jt||!K(Jt))&&(pt[ct]=Jt)}Xw(v,pt,ct,Tt)}),v.setDf(pt,Ye)}s(ke,"_resolveExtCfg");function We(He,Ye,pt){pt===void 0&&(pt=!1);var ct,Tt=ve(He,!1),Jt=v.cfg;return Tt&&(Tt[Ye]||!K(Tt[Ye]))?ct=Tt[Ye]:(Jt[Ye]||!K(Jt[Ye]))&&(ct=Jt[Ye]),ct||!K(ct)?ct:pt}s(We,"_getConfig");function et(He){for(var Ye;Ye=W._next();){var pt=Ye[iy]();pt&&He(pt)}}return s(et,"_iterateChain"),W}s(f7,"_createInternalContext");function Oy(A,v,T,S){var P=$0(v),L=f7(A,P,T,S),W=L.ctx;function se(ve){var ke=L._next();return ke&&ke[H0](ve,W),!ke}s(se,"_processNext");function fe(ve,ke){return ve===void 0&&(ve=null),qe(ve)&&(ve=D(ve,P.cfg,T,ke)),Oy(ve||W[od](),P.cfg,T,ke)}return s(fe,"_createNew"),W[Cl]=se,W[N1]=fe,W}s(Oy,"createProcessTelemetryContext");function w(A,v,T){var S=$0(v.config),P=f7(A,S,v,T),L=P.ctx;function W(fe){var ve=P._next();return ve&&ve[P1](L,fe),!ve}s(W,"_processNext");function se(fe,ve){return fe===void 0&&(fe=null),qe(fe)&&(fe=D(fe,S.cfg,v,ve)),w(fe||L[od](),v,ve)}return s(se,"_createNew"),L[Cl]=W,L[N1]=se,L}s(w,"createProcessTelemetryUnloadContext");function R(A,v,T){var S=$0(v.config),P=f7(A,S,v,T),L=P.ctx;function W(fe){return L.iterate(function(ve){De(ve[Pm])&&ve[Pm](L,fe)})}s(W,"_processNext");function se(fe,ve){return fe===void 0&&(fe=null),qe(fe)&&(fe=D(fe,S.cfg,v,ve)),R(fe||L[od](),v,ve)}return s(se,"_createNew"),L[Cl]=W,L[N1]=se,L}s(R,"createProcessTelemetryUpdateContext");function D(A,v,T,S){var P=null,L=!S;if(qe(A)&&A[Yn]>0){var W=null;Jr(A,function(se){if(!L&&S===se&&(L=!0),L&&se&&De(se[H0])){var fe=Q(se,v,T);P||(P=fe),W&&W._setNext(fe),W=fe}})}return S&&!P?D([S],v,T):P}s(D,"createTelemetryProxyChain");function Q(A,v,T){var S=null,P=De(A[H0]),L=De(A[Tp]),W;A?W=A[Ep]+"-"+A[dy]+"-"+yP++:W="Unknown-0-"+yP++;var se={getPlugin:s(function(){return A},"getPlugin"),getNext:s(function(){return S},"getNext"),processTelemetry:ke,unload:We,update:et,_id:W,_setNext:s(function(He){S=He},"_setNext")};function fe(){var He;return A&&De(A[u7])&&(He=A[u7]()),He||(He=Oy(se,v,T)),He}s(fe,"_getTelCtx");function ve(He,Ye,pt,ct,Tt){var Jt=!1,pr=A?A[Ep]:tK,Pr=He[AP];return Pr||(Pr=He[AP]={}),He.setNext(S),A&&My(He[pa](),function(){return pr+":"+pt},function(){Pr[W]=!0;try{var jn=S?S._id:hi;jn&&(Pr[jn]=!1),Jt=Ye(He)}catch(vi){var xi=S?Pr[S._id]:!0;xi&&(Jt=!0),(!S||!xi)&&Or(He[id](),1,73,"Plugin ["+pr+"] failed during "+pt+" - "+yt(vi)+", run flags: "+yt(Pr))}},ct,Tt),Jt}s(ve,"_processChain");function ke(He,Ye){Ye=Ye||fe();function pt(ct){if(!A||!P)return!1;var Tt=Mp(A);return Tt[nd]||Tt[g4]?!1:(L&&A[Tp](S),A[H0](He,ct),!0)}s(pt,"_callProcessTelemetry"),ve(Ye,pt,"processTelemetry",function(){return{item:He}},!He.sync)||Ye[Cl](He)}s(ke,"_processTelemetry");function We(He,Ye){function pt(){var ct=!1;if(A){var Tt=Mp(A),Jt=A[pa]||Tt[pa];A&&(!Jt||Jt===He.core())&&!Tt[nd]&&(Tt[pa]=null,Tt[nd]=!0,Tt[td]=!1,A[nd]&&A[nd](He,Ye)===!0&&(ct=!0))}return ct}s(pt,"_callTeardown"),ve(He,pt,"unload",function(){},Ye.isAsync)||He[Cl](Ye)}s(We,"_unloadPlugin");function et(He,Ye){function pt(){var ct=!1;if(A){var Tt=Mp(A),Jt=A[pa]||Tt[pa];A&&(!Jt||Jt===He.core())&&!Tt[nd]&&A[Pm]&&A[Pm](He,Ye)===!0&&(ct=!0)}return ct}s(pt,"_callUpdate"),ve(He,pt,"update",function(){},!1)||He[Cl](Ye)}return s(et,"_updatePlugin"),bt(se)}s(Q,"createTelemetryPluginProxy");function ue(){var A=[];function v(S){S&&A[Vi](S)}s(v,"_addHandler");function T(S,P){Jr(A,function(L){try{L(S,P)}catch(W){Or(S[id](),2,73,"Unexpected error calling unload handler - "+yt(W))}}),A=[]}return s(T,"_runHandlers"),{add:v,run:T}}s(ue,"createUnloadHandlerContainer");function we(){var A=[];function v(S){var P=A;A=[],Jr(P,function(L){try{(L.rm||L.remove).call(L)}catch(W){Or(S,2,73,"Unloading:"+yt(W))}})}s(v,"_doUnload");function T(S){S&&O2(A,S)}return s(T,"_addHook"),{run:v,add:T}}s(we,"createUnloadHookContainer");var Be,je="getPlugin",it=(Be={},Be[Q1]={isVal:v4,v:{}},Be),vt=function(){function A(){var v=this,T,S,P,L,W;ve(),Yl(A,v,function(ke){ke[V3]=function(We,et,He,Ye){fe(We,et,Ye),T=!0},ke[nd]=function(We,et){var He=ke[pa];if(!He||We&&He!==We[pa]())return;var Ye,pt=!1,ct=We||w(null,He,P&&P[je]?P[je]():P),Tt=et||{reason:0,isAsync:!1};function Jt(){pt||(pt=!0,L.run(ct,et),W.run(ct[id]()),Ye===!0&&ct[Cl](Tt),ve())}return s(Jt,"_unloadCallback"),!ke[a4]||ke[a4](ct,Tt,Jt)!==!0?Jt():Ye=!0,Ye},ke[Pm]=function(We,et){var He=ke[pa];if(!He||We&&He!==We[pa]())return;var Ye,pt=!1,ct=We||R(null,He,P&&P[je]?P[je]():P),Tt=et||{reason:0};function Jt(){pt||(pt=!0,fe(ct.getCfg(),ct.core(),ct[od]()))}return s(Jt,"_updateCallback"),!ke._doUpdate||ke._doUpdate(ct,Tt,Jt)!==!0?Jt():Ye=!0,Ye},X3(ke,"_addUnloadCb",function(){return L},"add"),X3(ke,"_addHook",function(){return W},"add"),Ue(ke,"_unloadHooks",{g:s(function(){return W},"g")})}),v[id]=function(ke){return se(ke)[id]()},v[td]=function(){return T},v.setInitialized=function(ke){T=ke},v[Tp]=function(ke){P=ke},v[Cl]=function(ke,We){We?We[Cl](ke):P&&De(P[H0])&&P[H0](ke,null)},v._getTelCtx=se;function se(ke){ke===void 0&&(ke=null);var We=ke;if(!We){var et=S||Oy(null,{},v[pa]);P&&P[je]?We=et[N1](null,P[je]):We=et[N1](null,P)}return We}s(se,"_getTelCtx");function fe(ke,We,et){$0(ke,it,lx(We)),!et&&We&&(et=We[oy]()[od]());var He=P;P&&P[je]&&(He=P[je]()),v[pa]=We,S=Oy(et,ke,We,He)}s(fe,"_setDefaults");function ve(){T=!1,v[pa]=null,S=null,P=null,W=we(),L=ue()}s(ve,"_initDefaults")}return s(A,"BaseTelemetryPlugin"),A.__ieDyn=1,A}();function Tr(A,v,T){var S={id:v,fn:T};O2(A,S);var P={remove:s(function(){Jr(A,function(L,W){if(L.id===S.id)return A[ty](W,1),-1})},"remove")};return P}s(Tr,"_addInitializer");function wn(A,v,T){for(var S=!1,P=A[Yn],L=0;L<P;++L){var W=A[L];if(W)try{if(W.fn[n4](null,[v])===!1){S=!0;break}}catch(se){Or(T,2,64,"Telemetry initializer failed: "+nl(se),{exception:yt(se)},!0)}}return!S}s(wn,"_runInitializers");var Hn=function(A){j3(v,A);function v(){var T=A.call(this)||this;T.identifier="TelemetryInitializerPlugin",T.priority=199;var S,P;L(),Yl(v,T,function(W,se){W.addTelemetryInitializer=function(fe){return Tr(P,S++,fe)},W[H0]=function(fe,ve){wn(P,fe,ve?ve[id]():W[id]())&&W[Cl](fe,ve)},W[a4]=function(){L()}});function L(){S=0,P=[]}return s(L,"_initDefaults"),T}return s(v,"TelemetryInitializerPlugin"),v.__ieDyn=1,v}(vt),Rr,Mr="Plugins must provide initialize method",qn="_notificationManager",_n="SDK is still unloading...",pi="SDK is not initialized",no=100,Ri=5e4,Na=St((Rr={cookieCfg:{}},Rr[fy]={rdOnly:!0,ref:!0,v:[]},Rr[Fm]={rdOnly:!0,ref:!0,v:[]},Rr[Q1]={ref:!0,v:{}},Rr[Uu]=G0,Rr.loggingLevelConsole=0,Rr.diagnosticLogInterval=G0,Rr));function Uy(A,v){return new ZY(v)}s(Uy,"_createPerfManager");function hx(A,v,T){var S=[],P=[],L={};return Jr(T,function(W){(K(W)||K(W[V3]))&&Kt(Mr);var se=W[dy],fe=W[Ep];W&&se&&(K(L[se])?L[se]=fe:N4(A,"Two extensions have same priority #"+se+" - "+L[se]+", "+fe)),!se||se<v?S[Vi](W):P[Vi](W)}),{core:S,channels:P}}s(hx,"_validateExtensions");function d7(A,v){var T=!1;return Jr(v,function(S){if(S===A)return T=!0,-1}),T}s(d7,"_isPluginPresent");function W4(A,v,T,S){T&&ne(T,function(P,L){S&&s0(L)&&s0(v[P])&&W4(A,v[P],L,S),S&&s0(L)&&s0(v[P])?W4(A,v[P],L,S):A.set(v,P,L)})}s(W4,"_deepMergeConfig");function CP(A,v){var T=null,S=-1;return Jr(A,function(P,L){if(P.w===v)return T=P,S=L,-1}),{i:S,l:T}}s(CP,"_findWatcher");function nK(A,v){var T=CP(A,v).l;return T||(T={w:v,rm:s(function(){var S=CP(A,v);S.i!==-1&&A[ty](S.i,1)},"rm")},A[Vi](T)),T}s(nK,"_addDelayedCfgListener");function m7(A,v,T){Jr(v,function(S){var P=Om(A,S.w,T);delete S.w,S.rm=function(){P.rm()}})}s(m7,"_registerDelayedCfgListener");function xP(A,v,T,S){return v.add(A[Dm](function(P){var L=P.cfg.disableDbgExt;L===!0&&S&&(T[$3](S),S=null),T&&!S&&L!==!0&&(S=WY(P.cfg),T[i4](S))})),S}s(xP,"_initDebugListener");function vP(A){return Ue({rm:s(function(){A.rm()},"rm")},"toJSON",{v:s(function(){return"aicore::onCfgChange<"+JSON.stringify(A)+">"},"v")})}s(vP,"_createUnloadHook");var Ft=function(){function A(){var v,T,S,P,L,W,se,fe,ve,ke,We,et,He,Ye,pt,ct,Tt,Jt,pr,Pr,jn,xi,vi,fo,pn,$r,bi,ks,Uo,er,zr,io;Yl(A,this,function(Nt){mt(),Nt._getDbgPlgTargets=function(){return[vi,P]},Nt[td]=function(){return T},Nt.activeStatus=function(){return $r},Nt._setPendingStatus=function(){$r=3},Nt[V3]=function(At,Br,Nn,Hr){He&&Kt(_n),Nt[td]()&&Kt("Core cannot be initialized more than once"),v=$0(At,Na,Nn||Nt[ha],!1),At=v.cfg,Xl(v[Dm](function(To){var os=To.cfg,Sc=$r===3;if(!Sc){ks=os.initInMemoMaxSize||no;var z0=os.instrumentationKey,Gm=os.endpointUrl;if(K(z0)){jn=null,$r=bp.INACTIVE;var Hm="Please provide instrumentation key";T?(Or(S,1,100,Hm),Hs()):Kt(Hm);return}var tI=[];if(lt(z0)?(tI[Vi](z0),jn=null):jn=z0,lt(Gm)?(tI[Vi](Gm),bi=null):bi=Gm,tI[Yn]){Uo=!1,$r=3;var P7=v4(os.initTimeOut)?os.initTimeOut:Ri,LK=a0(tI);Cp(function(){Uo||Sn()},P7),W0(LK,function(Jy){try{if(Uo)return;if(!Jy.rejected){var Xy=Jy[ny];if(Xy&&Xy[Yn]){var jP=Xy[0];if(jn=jP&&jP[ny],Xy[Yn]>1){var VP=Xy[1];bi=VP&&VP[ny]}}jn&&(At.instrumentationKey=jn,At.endpointUrl=bi)}Sn()}catch{Uo||Sn()}})}else Sn();var rI=To.ref(To.cfg,Q1);ne(rI,function(Jy){To.ref(rI,Jy)})}})),L=Hr,pr=xP(v,Jt,L&&Nt[Qu](),pr),Yy(),Nt[ha]=Nn;var Ln=At[fy];if(ke=[],ke[Vi].apply(ke,ID(ID([],Br,!1),Ln)),We=At[Fm],js(null),(!et||et[Yn]===0)&&Kt("No "+Fm+" available"),We&&We[Yn]>1){var Co=Nt[iy]("TeeChannelController");(!Co||!Co.plugin)&&Or(S,1,28,"TeeChannel required")}m7(At,xi,S),xi=null,T=!0,$r===bp.ACTIVE&&Hs()},Nt.getChannels=function(){var At=[];return et&&Jr(et,function(Br){At[Vi](Br)}),bt(At)},Nt.track=function(At){My(Nt[K3](),function(){return"AppInsightsCore:track"},function(){At===null&&(Bs(At),Kt("Invalid telemetry item")),!At[Ip]&&K(At[Ip])&&(Bs(At),Kt("telemetry name required")),At.iKey=At.iKey||jn,At.time=At.time||J3(new Date),At.ver=At.ver||"4.0",!He&&Nt[td]()&&$r===bp.ACTIVE?Ma()[Cl](At):$r!==bp.INACTIVE&&P[Yn]<=ks&&P[Vi](At)},function(){return{item:At}},!At.sync)},Nt[oy]=Ma,Nt[Qu]=function(){return L||(L=new JY(v.cfg),Nt[qn]=L),L},Nt[i4]=function(At){Nt.getNotifyMgr()[i4](At)},Nt[$3]=function(At){L&&L[$3](At)},Nt.getCookieMgr=function(){return fe||(fe=$Y(v.cfg,Nt[ha])),fe},Nt.setCookieMgr=function(At){fe!==At&&(By(fe,!1),fe=At)},Nt[K3]=function(){return W||se||ga()},Nt.setPerfMgr=function(At){W=At},Nt.eventCnt=function(){return P[Yn]},Nt.releaseQueue=function(){if(T&&P[Yn]>0){var At=P;P=[],$r===2?Jr(At,function(Br){Br.iKey=Br.iKey||jn,Ma()[Cl](Br)}):Or(S,2,20,"core init status is not active")}},Nt.pollInternalLogs=function(At){return pt=At||null,io=!1,er&&er[ry](),mo(!0)};function Sn(){Uo=!0,K(jn)?($r=bp.INACTIVE,Or(S,1,112,"ikey can't be resolved from promises")):$r=bp.ACTIVE,Hs()}s(Sn,"_setStatus");function Hs(){T&&(Nt.releaseQueue(),Nt.pollInternalLogs())}s(Hs,"_releaseQueues");function mo(At){if((!er||!er[rd])&&!io){var Br=At||S&&S.queue[Yn]>0;Br&&(zr||(zr=!0,Xl(v[Dm](function(Nn){var Hr=Nn.cfg.diagnosticLogInterval;(!Hr||!(Hr>0))&&(Hr=1e4);var Ln=!1;er&&(Ln=er[rd],er[ry]()),er=KE(zy,Hr),er.unref(),er[rd]=Ln}))),er[rd]=!0)}return er}s(mo,"_startLogPoller"),Nt[TD]=function(){io=!0,er&&er[ry](),zy()},Ow(Nt,function(){return Ye},["addTelemetryInitializer"]),Nt[P1]=function(At,Br,Nn){At===void 0&&(At=!0),T||Kt(pi),He&&Kt(_n);var Hr={reason:50,isAsync:At,flushComplete:!1},Ln;At&&!Br&&(Ln=uy(function(os){Br=os}));var Co=w(md(),Nt);Co[o4](function(){Jt.run(Nt[ha]),rP([fe,L,S],At,function(){mt(),Br&&Br(Hr)})},Nt);function To(os){Hr.flushComplete=os,He=!0,Tt.run(Co,Hr),Nt[TD](),Co[Cl](Hr)}return s(To,"_doUnload"),zy(),qm(At,To,6,Nn),Ln},Nt[iy]=Il,Nt.addPlugin=function(At,Br,Nn,Hr){if(!At){Hr&&Hr(!1),Ky(Mr);return}var Ln=Il(At[Ep]);if(Ln&&!Br){Hr&&Hr(!1),Ky("Plugin ["+At[Ep]+"] is already loaded!");return}var Co={reason:16};function To(z0){ke[Vi](At),Co.added=[At],js(Co),Hr&&Hr(!0)}if(s(To,"_addPlugin"),Ln){var os=[Ln.plugin],Sc={reason:2,isAsync:!!Nn};u0(os,Sc,function(z0){z0?(Co.removed=os,Co.reason|=32,To()):Hr&&Hr(!1)})}else To()},Nt.updateCfg=function(At,Br){Br===void 0&&(Br=!0);var Nn;if(Nt[td]()){Nn={reason:1,cfg:v.cfg,oldCfg:jE({},v.cfg),newConfig:jE({},At),merge:Br},At=Nn.newConfig;var Hr=v.cfg;At[fy]=Hr[fy],At[Fm]=Hr[Fm]}v._block(function(Ln){var Co=Ln.cfg;W4(Ln,Co,At,Br),Br||ne(Co,function(To){Ge(At,To)||Ln.set(Co,To,G0)}),Ln.setDf(Co,Na)},!0),v.notify(),Nn&&Wm(Nn)},Nt.evtNamespace=function(){return ct},Nt.flush=qm,Nt.getTraceCtx=function(At){return Pr||(Pr=eK()),Pr},Nt.setTraceCtx=function(At){Pr=At||null},Nt.addUnloadHook=Xl,X3(Nt,"addUnloadCb",function(){return Tt},"add"),Nt.onCfgChange=function(At){var Br;return T?Br=Om(v.cfg,At,Nt[ha]):Br=nK(xi,At),vP(Br)},Nt.getWParam=function(){return fp()||v.cfg.enableWParam?0:-1};function El(){var At={};fo=[];var Br=s(function(Nn){Nn&&Jr(Nn,function(Hr){if(Hr[Ep]&&Hr[sy]&&!At[Hr.identifier]){var Ln=Hr[Ep]+"="+Hr[sy];fo[Vi](Ln),At[Hr.identifier]=Hr}})},"_addPluginVersions");Br(et),We&&Jr(We,function(Nn){Br(Nn)}),Br(ke)}s(El,"_setPluginVersions");function mt(){T=!1,v=$0({},Na,Nt[ha]),v.cfg[wD]=1,Ue(Nt,"config",{g:s(function(){return v.cfg},"g"),s:s(function(Br){Nt.updateCfg(Br,!1)},"s")}),Ue(Nt,"pluginVersionStringArr",{g:s(function(){return fo||El(),fo},"g")}),Ue(Nt,"pluginVersionString",{g:s(function(){return pn||(fo||El(),pn=fo.join(";")),pn||hi},"g")}),Ue(Nt,"logger",{g:s(function(){return S||(S=new cx(v.cfg),v[ha]=S),S},"g"),s:s(function(Br){v[ha]=Br,S!==Br&&(By(S,!1),S=Br)},"s")}),Nt[ha]=new cx(v.cfg),vi=[];var At=Nt.config[fy]||[];At.splice(0,At[Yn]),O2(At,vi),Ye=new Hn,P=[],By(L,!1),L=null,W=null,se=null,By(fe,!1),fe=null,ve=null,ke=[],We=null,et=null,He=!1,pt=null,ct=Qm("AIBaseCore",!0),Tt=ue(),Pr=null,jn=null,Jt=we(),xi=[],pn=null,fo=null,io=!1,er=null,zr=!1,$r=0,bi=null,ks=null,Uo=!1}s(mt,"_initDefaults");function Ma(){var At=Oy(md(),v.cfg,Nt);return At[o4](mo),At}s(Ma,"_createTelCtx");function js(At){var Br=hx(Nt[ha],MY,ke);ve=null,pn=null,fo=null,et=(We||[])[0]||[],et=c7(O2(et,Br[Fm]));var Nn=O2(c7(Br[pa]),et);vi=bt(Nn);var Hr=Nt.config[fy]||[];Hr.splice(0,Hr[Yn]),O2(Hr,vi);var Ln=Ma();et&&et[Yn]>0&&l7(Ln[N1](et),Nn),l7(Ln,Nn),At&&Wm(At)}s(js,"_initPluginChain");function Il(At){var Br=null,Nn=null,Hr=[];return Jr(vi,function(Ln){if(Ln[Ep]===At&&Ln!==Ye)return Nn=Ln,-1;Ln.getChannel&&Hr[Vi](Ln)}),!Nn&&Hr[Yn]>0&&Jr(Hr,function(Ln){if(Nn=Ln.getChannel(At),!Nn)return-1}),Nn&&(Br={plugin:Nn,setEnabled:s(function(Ln){Mp(Nn)[g4]=!Ln},"setEnabled"),isEnabled:s(function(){var Ln=Mp(Nn);return!Ln[nd]&&!Ln[g4]},"isEnabled"),remove:s(function(Ln,Co){Ln===void 0&&(Ln=!0);var To=[Nn],os={reason:1,isAsync:Ln};u0(To,os,function(Sc){Sc&&js({reason:32,removed:To}),Co&&Co(Sc)})},"remove")}),Br}s(Il,"_getPlugin");function md(){if(!ve){var At=(vi||[]).slice();o0(At,Ye)===-1&&At[Vi](Ye),ve=D(c7(At),v.cfg,Nt)}return ve}s(md,"_getPluginChain");function u0(At,Br,Nn){if(At&&At[Yn]>0){var Hr=D(At,v.cfg,Nt),Ln=w(Hr,Nt);Ln[o4](function(){var Co=!1,To=[];Jr(ke,function(Sc,z0){d7(Sc,At)?Co=!0:To[Vi](Sc)}),ke=To,pn=null,fo=null;var os=[];We&&(Jr(We,function(Sc,z0){var Gm=[];Jr(Sc,function(Hm){d7(Hm,At)?Co=!0:Gm[Vi](Hm)}),os[Vi](Gm)}),We=os),Nn&&Nn(Co),mo()}),Ln[Cl](Br)}else Nn(!1)}s(u0,"_removePlugins");function zy(){if(S&&S.queue){var At=S.queue.slice(0);S.queue[Yn]=0,Jr(At,function(Br){var Nn={name:pt||"InternalMessageId: "+Br[s4],iKey:jn,time:J3(new Date),baseType:P4.dataType,baseData:{message:Br[L1]}};Nt.track(Nn)})}}s(zy,"_flushInternalLogs");function qm(At,Br,Nn,Hr){var Ln=1,Co=!1,To=null;Hr=Hr||5e3;function os(){Ln--,Co&&Ln===0&&(To&&To[ry](),To=null,Br&&Br(Co),Br=null)}if(s(os,"doCallback"),et&&et[Yn]>0){var Sc=Ma()[N1](et);Sc.iterate(function(z0){if(z0.flush){Ln++;var Gm=!1;z0.flush(At,function(){Gm=!0,os()},Nn)||Gm||(At&&To==null?To=Cp(function(){To=null,os()},Hr):os())}})}return Co=!0,os(),!0}s(qm,"_flushChannels");function Yy(){var At;Xl(v[Dm](function(Br){var Nn=Br.cfg.enablePerfMgr;if(Nn){var Hr=Br.cfg[Uu];(At!==Hr||!At)&&(Hr||(Hr=Uy),OD(Br.cfg,Uu,Hr),At=Hr,se=null),!W&&!se&&De(Hr)&&(se=Hr(Nt,Nt[Qu]()))}else se=null,At=null}))}s(Yy,"_initPerfManager");function Wm(At){var Br=R(md(),Nt);Br[o4](mo),(!Nt._updateHook||Nt._updateHook(Br,At)!==!0)&&Br[Cl](At)}s(Wm,"_doUpdate");function Ky(At){var Br=Nt[ha];Br?(Or(Br,2,73,At),mo()):Kt(At)}s(Ky,"_logOrThrowError");function Bs(At){var Br=Nt[Qu]();Br&&Br[hy]([At],2)}s(Bs,"_notifyInvalidEvent");function Xl(At){Jt.add(At)}s(Xl,"_addUnloadHook")})}return s(A,"AppInsightsCore"),A.__ieDyn=1,A}();function Gr(A,v){try{if(A&&A!==""){var T=l0().parse(A);if(T&&T[_D]&&T[_D]>=T.itemsAccepted&&T.itemsReceived-T.itemsAccepted===T.errors[Yn])return T}}catch(S){Or(v,1,43,"Cannot parse the response. "+(S[Ip]||yt(S)),{response:A})}return null}s(Gr,"parseResponse");var cn="",Mo="NoResponseBody",La="&"+Mo+"=true",Gs="POST",Fa=function(){function A(){var v=0,T,S,P,L,W,se,fe,ve,ke,We,et,He,Ye,pt;Yl(A,this,function(ct,Tt){var Jt=!0;Uo(),ct[V3]=function(er,zr){P=zr,S&&Or(P,1,28,"Sender is already initialized"),ct.SetConfig(er),S=!0},ct._getDbgPlgTargets=function(){return[S,L,se,T]},ct.SetConfig=function(er){try{if(W=er.senderOnCompleteCallBack||{},se=!!er.disableCredentials,fe=er.fetchCredentials,L=!!er.isOneDs,T=!!er.enableSendPromise,ke=!!er.disableXhr,We=!!er.disableBeacon,et=!!er.disableBeaconSync,pt=er.timeWrapper,Ye=!!er.addNoResponse,He=!!er.disableFetchKeepAlive,ve={sendPOST:$r},L||(Jt=!1),se){var zr=vy();zr&&zr.protocol&&zr.protocol[Z2]()==="file:"&&(Jt=!1)}return!0}catch{}return!1},ct.getSyncFetchPayload=function(){return v},ct.getSenderInst=function(er,zr){return er&&er[Yn]?xi(er,zr):null},ct.getFallbackInst=function(){return ve},ct[a4]=function(er,zr){Uo()};function pr(er,zr){vi(zr,200,{},er)}s(pr,"_onSuccess");function Pr(er,zr){Or(P,2,26,"Failed to send telemetry.",{message:er}),vi(zr,400,{})}s(Pr,"_onError");function jn(er){Pr("No endpoint url is provided for the batch",er)}s(jn,"_onNoPayloadUrl");function xi(er,zr){for(var io=0,Nt=null,Sn=0;Nt==null&&Sn<er[Yn];)io=er[Sn],!ke&&io===1?Vw()?Nt=ks:$w()&&(Nt=$r):io===2&&nx(zr)&&(!zr||!He)?Nt=bi:io===3&&Bp()&&(zr?!et:!We)&&(Nt=pn),Sn++;return Nt?{_transport:io,_isSync:zr,sendPOST:Nt}:null}s(xi,"_getSenderInterface");function vi(er,zr,io,Nt){try{er&&er(zr,io,Nt)}catch{}}s(vi,"_doOnComplete");function fo(er,zr){var io=dp(),Nt=er[Nm];if(!Nt)return jn(zr),!0;Nt=er[Nm]+(Ye?La:cn);var Sn=er[ay],Hs=L?Sn:new Blob([Sn],{type:"text/plain;charset=UTF-8"}),mo=io.sendBeacon(Nt,Hs);return mo}s(fo,"_doBeaconSend");function pn(er,zr,io){var Nt=er[ay];try{if(Nt)if(fo(er,zr))pr(cn,zr);else{var Sn=W&&W.beaconOnRetry;Sn&&De(Sn)?Sn(er,zr,fo):(ve&&ve.sendPOST(er,zr,!0),Or(P,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(Hs){L&&N4(P,"Failed to send telemetry using sendBeacon API. Ex:"+yt(Hs)),vi(zr,L?0:400,{},cn)}}s(pn,"_beaconSender");function $r(er,zr,io){var Nt,Sn,Hs,mo=er[Pw]||{};!io&&T&&(Nt=uy(function(js,Il){Sn=js,Hs=Il})),L&&io&&er.disableXhrSync&&(io=!1);var El=er[Nm];if(!El){jn(zr),Sn&&Sn(!1);return}var mt=Ww(Gs,El,Jt,!0,io,er[Lm]);L||mt.setRequestHeader("Content-type","application/json"),Jr(rt(mo),function(js){mt.setRequestHeader(js,mo[js])}),mt.onreadystatechange=function(){L||(Ma(mt),mt.readyState===4&&Sn&&Sn(!0))},mt.onload=function(){L&&Ma(mt)};function Ma(js){var Il=W&&W.xhrOnComplete,md=Il&&De(Il);if(md)Il(js,zr,er);else{var u0=b4(js);vi(zr,js[z3],q1(js,L),u0)}}return s(Ma,"_doOnReadyFunc"),mt.onerror=function(js){vi(zr,L?mt[z3]:400,q1(mt,L),L?cn:E4(mt)),Hs&&Hs(js)},mt.ontimeout=function(){vi(zr,L?mt[z3]:500,q1(mt,L),L?cn:E4(mt)),Sn&&Sn(!1)},mt.send(er[ay]),Nt}s($r,"_xhrSender");function bi(er,zr,io){var Nt,Sn=er[Nm],Hs=er[ay],mo=L?Hs:new Blob([Hs],{type:"application/json"}),El,mt,Ma,js=new Headers,Il=Hs[Yn],md=!1,u0=!1,zy=er[Pw]||{},qm=(Nt={method:Gs,body:mo},Nt[nP]=!0,Nt);er.headers&&rt(er.headers)[Yn]>0&&(Jr(rt(zy),function(Bs){js.append(Bs,zy[Bs])}),qm[Pw]=js),fe?qm.credentials=fe:Jt&&L&&(qm.credentials="include"),io&&(qm.keepalive=!0,v+=Il,L?er._sendReason===2&&(md=!0,Ye&&(Sn+=La)):md=!0);var Yy=new Request(Sn,qm);try{Yy[nP]=!0}catch{}if(!io&&T&&(El=uy(function(Bs,Xl){mt=Bs,Ma=Xl})),!Sn){jn(zr),mt&&mt(!1);return}function Wm(Bs){vi(zr,L?0:400,{},L?cn:Bs)}s(Wm,"_handleError");function Ky(Bs,Xl,At){var Br=Bs[z3],Nn=W.fetchOnComplete;Nn&&De(Nn)?Nn(Bs,zr,At||cn,Xl):vi(zr,Br,{},At||cn)}s(Ky,"_onFetchComplete");try{W0(fetch(L?Sn:Yy,L?qm:null),function(Bs){if(io&&(v-=Il,Il=0),!u0)if(u0=!0,Bs.rejected)Wm(Bs.reason&&Bs.reason[L1]),Ma&&Ma(Bs.reason);else{var Xl=Bs[ny];try{!L&&!Xl.ok?(Wm(Xl.statusText),mt&&mt(!1)):L&&!Xl.body?(Ky(Xl,null,cn),mt&&mt(!0)):W0(Xl.text(),function(At){Ky(Xl,er,At[ny]),mt&&mt(!0)})}catch(At){Wm(yt(At)),Ma&&Ma(At)}}})}catch(Bs){u0||(Wm(yt(Bs)),Ma&&Ma(Bs))}return md&&!u0&&(u0=!0,vi(zr,200,{}),mt&&mt(!0)),L&&!u0&&er[Lm]>0&&pt&&pt.set(function(){u0||(u0=!0,vi(zr,500,{}),mt&&mt(!0))},er[Lm]),El}s(bi,"_doFetchSender");function ks(er,zr,io){var Nt=Sm(),Sn=new XDomainRequest,Hs=er[ay];Sn.onload=function(){var js=b4(Sn),Il=W&&W.xdrOnComplete;Il&&De(Il)?Il(Sn,zr,er):vi(zr,200,{},js)},Sn.onerror=function(){vi(zr,400,{},L?cn:qD(Sn))},Sn.ontimeout=function(){vi(zr,500,{})},Sn.onprogress=function(){};var mo=Nt&&Nt.location&&Nt.location.protocol||"",El=er[Nm];if(!El){jn(zr);return}if(!L&&El.lastIndexOf(mo,0)!==0){var mt="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";Or(P,2,40,". "+mt),Pr(mt,zr);return}var Ma=L?El:El[_p](/^(https?:)/,"");Sn.open(Gs,Ma),er[Lm]&&(Sn[Lm]=er[Lm]),Sn.send(Hs),L&&io?pt&&pt.set(function(){Sn.send(Hs)},0):Sn.send(Hs)}s(ks,"_xdrSender");function Uo(){v=0,S=!1,T=!1,P=null,L=null,W=null,se=null,fe=null,ve=null,ke=!1,We=!1,et=!1,He=!1,Ye=!1,pt=null}s(Uo,"_initDefaults")})}return s(A,"SenderPostManager"),A.__ieDyn=1,A}(),H1="on",Qp="attachEvent",qy="addEventListener",bP="detachEvent",EP="removeEventListener",G4="events";Qm("aiEvtPageHide"),Qm("aiEvtPageShow");var iK=/\.[\.]+/g,The=/[\.]+$/,uYe=1,IP=zD("events"),fYe=/^([^.]*)(?:\.(.+)|)/;function whe(A){return A&&A[_p]?A[_p](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,hi):A}s(whe,"_normalizeNamespace");function oK(A,v){if(v){var T=hi;qe(v)?(T=hi,Jr(v,function(P){P=whe(P),P&&(P[0]!=="."&&(P="."+P),T+=P)})):T=whe(v),T&&(T[0]!=="."&&(T="."+T),A=(A||hi)+T)}var S=fYe.exec(A||hi)||[];return{type:S[1],ns:(S[2]||hi).replace(iK,".").replace(The,hi)[wp](".").sort().join(".")}}s(oK,"_getEvtNamespace");function _he(A,v,T){T===void 0&&(T=!0);var S=IP.get(A,G4,{},T),P=S[v];return P||(P=S[v]=[]),P}s(_he,"_getRegisteredEvents");function She(A,v,T,S){A&&v&&v[Kl]&&(A[EP]?A[EP](v[Kl],T,S):A[bP]&&A[bP](H1+v[Kl],T))}s(She,"_doDetach");function dYe(A,v,T,S){var P=!1;return A&&v&&v[Kl]&&T&&(A[qy]?(A[qy](v[Kl],T,S),P=!0):A[Qp]&&(A[Qp](H1+v[Kl],T),P=!0)),P}s(dYe,"_doAttach");function Rhe(A,v,T,S){for(var P=v[Yn];P--;){var L=v[P];L&&(!T.ns||T.ns===L[kw].ns)&&(!S||S(L))&&(She(A,L[kw],L.handler,L.capture),v[ty](P,1))}}s(Rhe,"_doUnregister");function mYe(A,v,T){if(v[Kl])Rhe(A,_he(A,v[Kl]),v,T);else{var S=IP.get(A,G4,{});ne(S,function(P,L){Rhe(A,L,v,T)}),rt(S)[Yn]===0&&IP.kill(A,G4)}}s(mYe,"_unregisterEvents");function khe(A,v){var T;return v?(qe(v)?T=[A].concat(v):T=[A,v],T=oK("xx",T).ns[wp](".")):T=A,T}s(khe,"mergeEvtNamespace");function Bhe(A,v,T,S,P){P===void 0&&(P=!1);var L=!1;if(A)try{var W=oK(v,S);if(L=dYe(A,W,T,P),L&&IP.accept(A)){var se={guid:uYe++,evtName:W,handler:T,capture:P};_he(A,W.type)[Vi](se)}}catch{}return L}s(Bhe,"eventOn");function hYe(A,v,T,S,P){if(P===void 0&&(P=!1),A)try{var L=oK(v,S),W=!1;mYe(A,L,function(se){return L.ns&&!T||se.handler===T?(W=!0,!0):!1}),W||She(A,L,T,P)}catch{}}s(hYe,"eventOff");var Dhe="sampleRate",sK="ProcessLegacy",Phe="http.method",aK="https://dc.services.visualstudio.com",H4="/v2/track",Wy="not_specified",Nhe=xY({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),TP="split",di="length",lK="toLowerCase",px="ingestionendpoint",h7="toString",Lhe="removeItem",wP="message",pYe="count",cK="stringify",uK="pathname",p7="match",Gy="name",Op="properties",j1="measurements",_P="sizeInBytes",SP="typeName",g7="exceptions",A7="severityLevel",fK="problemGroup",j4="parsedStack",RP="hasFullStack",kP="assembly",V1="fileName",V4="line",BP="aiDataContract",DP="duration";function Fhe(A,v,T){var S=v[di],P=gYe(A,v);if(P[di]!==S){for(var L=0,W=P;T[W]!==void 0;)L++,W=de(P,0,147)+CYe(L);P=W}return P}s(Fhe,"dataSanitizeKeyAndAddUniqueness");function gYe(A,v){var T;return v&&(v=ji(Ct(v)),v[di]>150&&(T=de(v,0,150),Or(A,2,57,"name is too long. It has been truncated to 150 characters.",{name:v},!0))),T||v}s(gYe,"dataSanitizeKey");function wc(A,v,T){T===void 0&&(T=1024);var S;return v&&(T=T||1024,v=ji(Ct(v)),v[di]>T&&(S=de(v,0,T),Or(A,2,61,"string value is too long. It has been truncated to "+T+" characters.",{value:v},!0))),S||v}s(wc,"dataSanitizeString");function dK(A,v){return Qhe(A,v,2048,66)}s(dK,"dataSanitizeUrl");function Mhe(A,v){var T;return v&&v[di]>32768&&(T=de(v,0,32768),Or(A,2,56,"message is too long, it has been truncated to 32768 characters.",{message:v},!0)),T||v}s(Mhe,"dataSanitizeMessage");function AYe(A,v){var T;if(v){var S=""+v;S[di]>32768&&(T=de(S,0,32768),Or(A,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:v},!0))}return T||v}s(AYe,"dataSanitizeException");function gx(A,v){if(v){var T={};ne(v,function(S,P){if(be(P)&&by())try{P=l0()[cK](P)}catch(L){Or(A,2,49,"custom property is not valid",{exception:L},!0)}P=wc(A,P,8192),S=Fhe(A,S,T),T[S]=P}),v=T}return v}s(gx,"dataSanitizeProperties");function Ax(A,v){if(v){var T={};ne(v,function(S,P){S=Fhe(A,S,T),T[S]=P}),v=T}return v}s(Ax,"dataSanitizeMeasurements");function yYe(A,v){return v&&Qhe(A,v,128,69)[h7]()}s(yYe,"dataSanitizeId");function Qhe(A,v,T,S){var P;return v&&(v=ji(Ct(v)),v[di]>T&&(P=de(v,0,T),Or(A,2,S,"input is too long, it has been truncated to "+T+" characters.",{data:v},!0))),P||v}s(Qhe,"dataSanitizeInput");function CYe(A){var v="00"+A;return ye(v,v[di]-3)}s(CYe,"dsPadNumber");var Ohe=M2()||{},Uhe=0,xYe=[null,null,null,null,null];function vYe(A){var v=Uhe,T=xYe,S=T[v];return Ohe.createElement?T[v]||(S=T[v]=Ohe.createElement("a")):S={host:bYe(A,!0)},S.href=A,v++,v>=T[di]&&(v=0),Uhe=v,S}s(vYe,"urlParseUrl");function bYe(A,v){var T=EYe(A,v)||"";if(T){var S=T[p7](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(S!=null&&S[di]>3&&ce(S[2])&&S[2][di]>0)return S[2]+(S[3]||"")}return T}s(bYe,"urlParseHost");function EYe(A,v){var T=null;if(A){var S=A[p7](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(S!=null&&S[di]>2&&ce(S[2])&&S[2][di]>0&&(T=S[2]||"",v&&S[di]>2)){var P=(S[1]||"")[lK](),L=S[3]||"";(P==="http"&&L===":80"||P==="https"&&L===":443")&&(L=""),T+=L}}return T}s(EYe,"urlParseFullHost");var IYe=[aK+H4,"https://breeze.aimon.applicationinsights.io"+H4,"https://dc-int.services.visualstudio.com"+H4];function qhe(A){return o0(IYe,A[lK]())!==-1}s(qhe,"isInternalApplicationInsightsEndpoint");function TYe(A,v,T,S){var P,L=S,W=S;if(v&&v[di]>0){var se=vYe(v);if(P=se.host,!L)if(se[uK]!=null){var fe=se.pathname[di]===0?"/":se[uK];fe.charAt(0)!=="/"&&(fe="/"+fe),W=se[uK],L=wc(A,T?T+" "+fe:fe)}else L=wc(A,v)}else P=S,L=S;return{target:P,name:L,data:W}}s(TYe,"AjaxHelperParseDependencyPath");var mK=r4({LocalStorage:0,SessionStorage:1}),$4=void 0,Whe="";function Ghe(A){try{if(K(Zf()))return null;var v=new Date()[h7](),T=ta(A===mK.LocalStorage?"localStorage":"sessionStorage"),S=Whe+v;T.setItem(S,v);var P=T.getItem(S)!==v;if(T[Lhe](S),!P)return T}catch{}return null}s(Ghe,"_getVerifiedStorageObject");function hK(){return Hhe()?Ghe(mK.SessionStorage):null}s(hK,"_getSessionStorageObject");function wYe(A){Whe=A||""}s(wYe,"utlSetStoragePrefix");function Hhe(A){return(A||$4===void 0)&&($4=!!Ghe(mK.SessionStorage)),$4}s(Hhe,"utlCanUseSessionStorage");function _Ye(A,v){var T=hK();if(T!==null)try{return T.getItem(v)}catch(S){$4=!1,Or(A,2,2,"Browser failed read of session storage. "+nl(S),{exception:yt(S)})}return null}s(_Ye,"utlGetSessionStorage");function SYe(A,v,T){var S=hK();if(S!==null)try{return S.setItem(v,T),!0}catch(P){$4=!1,Or(A,2,4,"Browser failed write to session storage. "+nl(P),{exception:yt(P)})}return!1}s(SYe,"utlSetSessionStorage");function RYe(A,v){var T=hK();if(T!==null)try{return T[Lhe](v),!0}catch(S){$4=!1,Or(A,2,6,"Browser failed removal of session storage item. "+nl(S),{exception:yt(S)})}return!1}s(RYe,"utlRemoveSessionStorage");var kYe=";",BYe="=";function pK(A){if(!A)return{};var v=A[TP](kYe),T=lY(v,function(P,L){var W=L[TP](BYe);if(W[di]===2){var se=W[0][lK](),fe=W[1];P[se]=fe}return P},{});if(rt(T)[di]>0){if(T.endpointsuffix){var S=T.location?T.location+".":"";T[px]=T[px]||"https://"+S+"dc."+T.endpointsuffix}T[px]=T[px]||aK,xD(T[px],"/")&&(T[px]=T[px].slice(0,-1))}return T}s(pK,"parseConnectionString");var DYe=function(){function A(v,T,S){var P=this,L=this;L.ver=1,L.sampleRate=100,L.tags={},L[Gy]=wc(v,S)||Wy,L.data=T,L.time=J3(new Date),L[BP]={time:1,iKey:1,name:1,sampleRate:s(function(){return P.sampleRate===100?4:1},"sampleRate"),tags:1,data:1}}return s(A,"Envelope"),A}(),z4=function(){function A(v,T,S,P){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var L=this;L.ver=2,L[Gy]=wc(v,T)||Wy,L[Op]=gx(v,S),L[j1]=Ax(v,P)}return s(A,"Event"),A.envelopeType="Microsoft.ApplicationInsights.{0}.Event",A.dataType="EventData",A}(),PYe=58,NYe=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,LYe=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,FYe=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,MYe=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,QYe=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,OYe=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,UYe=/([^\(\s\n]+):([0-9]+)$/,jhe="<no_method>",Y4="error",dd="stack",gK="stackDetails",Vhe="errorSrc",AK="message",$he="description",zhe=[{re:LYe,len:5,m:1,fn:2,ln:3,col:4},{chk:WYe,pre:qYe,re:FYe,len:4,m:1,fn:2,ln:3},{re:MYe,len:3,m:1,fn:2,hdl:epe},{re:QYe,len:2,fn:1,hdl:epe}];function qYe(A){return A.replace(/(\(anonymous\))/,"<anonymous>")}s(qYe,"_scrubAnonymous");function WYe(A){return Rm(A,"[native")<0}s(WYe,"_ignoreNative");function yK(A,v){var T=A;return T&&!ce(T)&&(JSON&&JSON[cK]?(T=JSON[cK](A),v&&(!T||T==="{}")&&(De(A[h7])?T=A[h7]():T=""+A)):T=""+A+" - (Missing JSON.stringify)"),T||""}s(yK,"_stringify");function Yhe(A,v){var T=A;return A&&(T&&!ce(T)&&(T=A[AK]||A[$he]||T),T&&!ce(T)&&(T=yK(T,!0)),A.filename&&(T=T+" @"+(A.filename||"")+":"+(A.lineno||"?")+":"+(A.colno||"?"))),v&&v!=="String"&&v!=="Object"&&v!=="Error"&&Rm(T||"",v)===-1&&(T=v+": "+T),T||""}s(Yhe,"_formatMessage");function GYe(A){try{if(be(A))return"hasFullStack"in A&&"typeName"in A}catch{}return!1}s(GYe,"_isExceptionDetailsInternal");function HYe(A){try{if(be(A))return"ver"in A&&"exceptions"in A&&"properties"in A}catch{}return!1}s(HYe,"_isExceptionInternal");function Khe(A){return A&&A.src&&ce(A.src)&&A.obj&&qe(A.obj)}s(Khe,"_isStackDetails");function yx(A){var v=A||"";ce(v)||(ce(v[dd])?v=v[dd]:v=""+v);var T=v[TP](`
`);return{src:v,obj:T}}s(yx,"_convertStackObj");function jYe(A){for(var v=[],T=A[TP](`
`),S=0;S<T[di];S++){var P=T[S];T[S+1]&&(P+="@"+T[S+1],S++),v.push(P)}return{src:A,obj:v}}s(jYe,"_getOperaStack");function Jhe(A){var v=null;if(A)try{if(A[dd])v=yx(A[dd]);else if(A[Y4]&&A[Y4][dd])v=yx(A[Y4][dd]);else if(A.exception&&A.exception[dd])v=yx(A.exception[dd]);else if(Khe(A))v=A;else if(Khe(A[gK]))v=A[gK];else if(Sm()&&Sm().opera&&A[AK])v=jYe(A[wP]);else if(A.reason&&A.reason[dd])v=yx(A.reason[dd]);else if(ce(A))v=yx(A);else{var T=A[AK]||A[$he]||"";ce(A[Vhe])&&(T&&(T+=`
`),T+=" from "+A[Vhe]),T&&(v=yx(T))}}catch(S){v=yx(S)}return v||{src:"",obj:null}}s(Jhe,"_getStackFromErrorObj");function VYe(A){var v="";return A&&(A.obj?v=A.obj.join(`
`):v=A.src||""),v}s(VYe,"_formatStackTrace");function $Ye(A){var v,T=A.obj;if(T&&T[di]>0){v=[];var S=0,P=!1,L=0;Jr(T,function(pt){if(P||JYe(pt)){var ct=Ct(pt);P=!0;var Tt=XYe(ct,S);Tt&&(L+=Tt[_P],v.push(Tt),S++)}});var W=32*1024;if(L>W)for(var se=0,fe=v[di]-1,ve=0,ke=se,We=fe;se<fe;){var et=v[se][_P],He=v[fe][_P];if(ve+=et+He,ve>W){var Ye=We-ke+1;v.splice(ke,Ye);break}ke=se,We=fe,se++,fe--}}return v}s($Ye,"_parseStack");function PP(A){var v="";if(A&&(v=A.typeName||A[Gy]||"",!v))try{var T=/function (.{1,200})\(/,S=T.exec(A.constructor[h7]());v=S&&S[di]>1?S[1]:""}catch{}return v}s(PP,"_getErrorType");function CK(A){if(A)try{if(!ce(A)){var v=PP(A),T=yK(A,!1);return(!T||T==="{}")&&(A[Y4]&&(A=A[Y4],v=PP(A)),T=yK(A,!0)),Rm(T,v)!==0&&v!=="String"?v+":"+T:T}}catch{}return""+(A||"")}s(CK,"_formatErrorCode");var NP=function(){function A(v,T,S,P,L,W){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var se=this;se.ver=2,HYe(T)?(se[g7]=T[g7]||[],se[Op]=T[Op],se[j1]=T[j1],T[A7]&&(se[A7]=T[A7]),T.id&&(se.id=T.id,T[Op].id=T.id),T[fK]&&(se[fK]=T[fK]),K(T.isManual)||(se.isManual=T.isManual)):(S||(S={}),W&&(S.id=W),se[g7]=[Xhe(v,T,S)],se[Op]=gx(v,S),se[j1]=Ax(v,P),L&&(se[A7]=L),W&&(se.id=W))}return s(A,"Exception"),A.CreateAutoException=function(v,T,S,P,L,W,se,fe){var ve=PP(L||W||v);return{message:Yhe(v,ve),url:T,lineNumber:S,columnNumber:P,error:CK(L||W||v),evt:CK(W||v),typeName:ve,stackDetails:Jhe(se||L||W),errorSrc:fe}},A.CreateFromInterface=function(v,T,S,P){var L=T[g7]&&T1(T[g7],function(se){return KYe(v,se)}),W=new A(v,Bm(Bm({},T),{exceptions:L}),S,P);return W},A.prototype.toInterface=function(){var v=this,T=v.exceptions,S=v.properties,P=v.measurements,L=v.severityLevel,W=v.problemGroup,se=v.id,fe=v.isManual,ve=T instanceof Array&&T1(T,function(ke){return ke.toInterface()})||void 0;return{ver:"4.0",exceptions:ve,severityLevel:L,properties:S,measurements:P,problemGroup:W,id:se,isManual:fe}},A.CreateSimpleException=function(v,T,S,P,L,W){var se;return{exceptions:[(se={},se[RP]=!0,se.message=v,se.stack=L,se.typeName=T,se)]}},A.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",A.dataType="ExceptionData",A.formatError=CK,A}(),zYe=bt({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function YYe(){var A=this,v=qe(A[j4])&&T1(A[j4],function(S){return eKe(S)}),T={id:A.id,outerId:A.outerId,typeName:A[SP],message:A[wP],hasFullStack:A[RP],stack:A[dd],parsedStack:v||void 0};return T}s(YYe,"_toInterface");function Xhe(A,v,T){var S,P,L,W,se,fe,ve,ke;if(GYe(v))W=v[SP],se=v[wP],ve=v[dd],ke=v[j4]||[],fe=v[RP];else{var We=v,et=We&&We.evt;at(We)||(We=We[Y4]||et||We),W=wc(A,PP(We))||Wy,se=Mhe(A,Yhe(v||We,W))||Wy;var He=v[gK]||Jhe(v);ke=$Ye(He),qe(ke)&&T1(ke,function(Ye){Ye[kP]=wc(A,Ye[kP]),Ye[V1]=wc(A,Ye[V1])}),ve=AYe(A,VYe(He)),fe=qe(ke)&&ke[di]>0,T&&(T[SP]=T[SP]||W)}return S={},S[BP]=zYe,S.id=P,S.outerId=L,S.typeName=W,S.message=se,S[RP]=fe,S.stack=ve,S.parsedStack=ke,S.toInterface=YYe,S}s(Xhe,"_createExceptionDetails");function KYe(A,v){var T=qe(v[j4])&&T1(v[j4],function(P){return ZYe(P)})||v[j4],S=Xhe(A,Bm(Bm({},v),{parsedStack:T}));return S}s(KYe,"_createExDetailsFromInterface");function Zhe(A,v){var T=v[p7](OYe);if(T&&T[di]>=4)A[V1]=T[1],A[V4]=parseInt(T[2]);else{var S=v[p7](UYe);S&&S[di]>=3?(A[V1]=S[1],A[V4]=parseInt(S[2])):A[V1]=v}}s(Zhe,"_parseFilename");function epe(A,v,T){var S=A[V1];v.fn&&T&&T[di]>v.fn&&(v.ln&&T[di]>v.ln?(S=ji(T[v.fn]||""),A[V4]=parseInt(ji(T[v.ln]||""))||0):S=ji(T[v.fn]||"")),S&&Zhe(A,S)}s(epe,"_handleFilename");function JYe(A){var v=!1;if(A&&ce(A)){var T=ji(A);T&&(v=NYe.test(T))}return v}s(JYe,"_isStackFrame");var tpe=bt({level:1,method:1,assembly:0,fileName:0,line:0});function XYe(A,v){var T,S;if(A&&ce(A)&&ji(A)){S=(T={},T[BP]=tpe,T.level=v,T.assembly=ji(A),T.method=jhe,T.fileName="",T.line=0,T.sizeInBytes=0,T);for(var P=0;P<zhe[di];){var L=zhe[P];if(L.chk&&!L.chk(A))break;L.pre&&(A=L.pre(A));var W=A[p7](L.re);if(W&&W[di]>=L.len){L.m&&(S.method=ji(W[L.m]||jhe)),L.hdl?L.hdl(S,L,W):L.fn&&(L.ln?(S[V1]=ji(W[L.fn]||""),S[V4]=parseInt(ji(W[L.ln]||""))||0):Zhe(S,W[L.fn]||""));break}P++}}return rpe(S)}s(XYe,"_extractStackFrame");function ZYe(A){var v,T=(v={},v[BP]=tpe,v.level=A.level,v.method=A.method,v.assembly=A[kP],v.fileName=A[V1],v.line=A[V4],v.sizeInBytes=0,v);return rpe(T)}s(ZYe,"_stackFrameFromInterface");function rpe(A){var v=PYe;return A&&(v+=A.method[di],v+=A.assembly[di],v+=A.fileName[di],v+=A.level.toString()[di],v+=A.line.toString()[di],A[_P]=v),A}s(rpe,"_populateFrameSizeInBytes");function eKe(A){return{level:A.level,method:A.method,assembly:A[kP],fileName:A[V1],line:A[V4]}}s(eKe,"_parsedFrameToInterface");var tKe=function(){function A(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return s(A,"DataPoint"),A}(),y7=function(){function A(v,T,S,P,L,W,se,fe,ve){this.aiDataContract={ver:1,metrics:1,properties:0};var ke=this;ke.ver=2;var We=new tKe;We[pYe]=P>0?P:void 0,We.max=isNaN(W)||W===null?void 0:W,We.min=isNaN(L)||L===null?void 0:L,We[Gy]=wc(v,T)||Wy,We.value=S,We.stdDev=isNaN(se)||se===null?void 0:se,ke.metrics=[We],ke[Op]=gx(v,fe),ke[j1]=Ax(v,ve)}return s(A,"Metric"),A.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",A.dataType="MetricData",A}(),C7="";function npe(A){(isNaN(A)||A<0)&&(A=0),A=mY(A);var v=C7+A%1e3,T=C7+w1(A/1e3)%60,S=C7+w1(A/(1e3*60))%60,P=C7+w1(A/(1e3*60*60))%24,L=w1(A/(1e3*60*60*24));return v=v[di]===1?"00"+v:v[di]===2?"0"+v:v,T=T[di]<2?"0"+T:T,S=S[di]<2?"0"+S:S,P=P[di]<2?"0"+P:P,(L>0?L+".":C7)+P+":"+S+":"+T+"."+v}s(npe,"msToTimeSpan");var LP=function(){function A(v,T,S,P,L,W,se){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var fe=this;fe.ver=2,fe.id=yYe(v,se),fe.url=dK(v,S),fe[Gy]=wc(v,T)||Wy,isNaN(P)||(fe[DP]=npe(P)),fe[Op]=gx(v,L),fe[j1]=Ax(v,W)}return s(A,"PageView"),A.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",A.dataType="PageviewData",A}(),FP=function(){function A(v,T,S,P,L,W,se,fe,ve,ke,We,et){ve===void 0&&(ve="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var He=this;He.ver=2,He.id=T,He[DP]=npe(L),He.success=W,He.resultCode=se+"",He.type=wc(v,ve);var Ye=TYe(v,S,fe,P);He.data=dK(v,P)||Ye.data,He.target=wc(v,Ye.target),ke&&(He.target="".concat(He.target," | ").concat(ke)),He[Gy]=wc(v,Ye[Gy]),He[Op]=gx(v,We),He[j1]=Ax(v,et)}return s(A,"RemoteDependencyData"),A.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",A.dataType="RemoteDependencyData",A}(),MP=function(){function A(v,T,S,P,L){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var W=this;W.ver=2,T=T||Wy,W[wP]=Mhe(v,T),W[Op]=gx(v,P),W[j1]=Ax(v,L),S&&(W[A7]=S)}return s(A,"Trace"),A.envelopeType="Microsoft.ApplicationInsights.{0}.Message",A.dataType="MessageData",A}(),QP=function(){function A(v,T,S,P,L,W,se){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var fe=this;fe.ver=2,fe.url=dK(v,S),fe[Gy]=wc(v,T)||Wy,fe[Op]=gx(v,L),fe[j1]=Ax(v,W),se&&(fe.domProcessing=se.domProcessing,fe[DP]=se[DP],fe.networkConnect=se.networkConnect,fe.perfTotal=se.perfTotal,fe.receivedResponse=se.receivedResponse,fe.sentRequest=se.sentRequest)}return s(A,"PageViewPerformance"),A.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",A.dataType="PageviewPerformanceData",A}(),Cx=function(){function A(v,T){this.aiDataContract={baseType:1,baseData:1},this.baseType=v,this.baseData=T}return s(A,"Data"),A}(),rKe=r4({Verbose:0,Information:1,Warning:2,Error:3,Critical:4});function Hy(A){var v="ai."+A+".";return function(T){return v+T}}s(Hy,"_aiNameFunc");var x7=Hy("application"),ol=Hy("device"),OP=Hy("location"),K4=Hy("operation"),xK=Hy("session"),jy=Hy("user"),xx=Hy("cloud"),v7=Hy("internal"),ipe=function(A){j3(v,A);function v(){return A.call(this)||this}return s(v,"ContextTagKeys"),v}(RY({applicationVersion:x7("ver"),applicationBuild:x7("build"),applicationTypeId:x7("typeId"),applicationId:x7("applicationId"),applicationLayer:x7("layer"),deviceId:ol("id"),deviceIp:ol("ip"),deviceLanguage:ol("language"),deviceLocale:ol("locale"),deviceModel:ol("model"),deviceFriendlyName:ol("friendlyName"),deviceNetwork:ol("network"),deviceNetworkName:ol("networkName"),deviceOEMName:ol("oemName"),deviceOS:ol("os"),deviceOSVersion:ol("osVersion"),deviceRoleInstance:ol("roleInstance"),deviceRoleName:ol("roleName"),deviceScreenResolution:ol("screenResolution"),deviceType:ol("type"),deviceMachineName:ol("machineName"),deviceVMName:ol("vmName"),deviceBrowser:ol("browser"),deviceBrowserVersion:ol("browserVersion"),locationIp:OP("ip"),locationCountry:OP("country"),locationProvince:OP("province"),locationCity:OP("city"),operationId:K4("id"),operationName:K4("name"),operationParentId:K4("parentId"),operationRootId:K4("rootId"),operationSyntheticSource:K4("syntheticSource"),operationCorrelationVector:K4("correlationVector"),sessionId:xK("id"),sessionIsFirst:xK("isFirst"),sessionIsNew:xK("isNew"),userAccountAcquisitionDate:jy("accountAcquisitionDate"),userAccountId:jy("accountId"),userAgent:jy("userAgent"),userId:jy("id"),userStoreRegion:jy("storeRegion"),userAuthUserId:jy("authUserId"),userAnonymousUserAcquisitionDate:jy("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:jy("authUserAcquisitionDate"),cloudName:xx("name"),cloudRole:xx("role"),cloudRoleVer:xx("roleVer"),cloudRoleInstance:xx("roleInstance"),cloudEnvironment:xx("environment"),cloudLocation:xx("location"),cloudDeploymentUnit:xx("deploymentUnit"),internalNodeName:v7("nodeName"),internalSdkVersion:v7("sdkVersion"),internalAgentVersion:v7("agentVersion"),internalSnippet:v7("snippet"),internalSdkSrc:v7("sdkSrc")})),vl=new ipe;function ope(A,v){hYe(A,null,null,v)}s(ope,"_disableEvents");function nKe(A){var v=M2(),T=dp(),S=!1,P=[],L=1;T&&!K(T.onLine)&&!T.onLine&&(L=2);var W=0,se=et(),fe=khe(Qm("OfflineListener"),A);try{if(ke(Sm())&&(S=!0),v){var ve=v.body||v;ve.ononline&&ke(ve)&&(S=!0)}}catch{S=!1}function ke(pr){var Pr=!1;return pr&&(Pr=Bhe(pr,"online",pt,fe),Pr&&Bhe(pr,"offline",ct,fe)),Pr}s(ke,"_enableEvents");function We(){return se}s(We,"_isOnline");function et(){return!(W===2||L===2)}s(et,"calCurrentState");function He(){var pr=et();se!==pr&&(se=pr,Jr(P,function(Pr){var jn={isOnline:se,rState:L,uState:W};try{Pr(jn)}catch{}}))}s(He,"listnerNoticeCheck");function Ye(pr){W=pr,He()}s(Ye,"setOnlineState");function pt(){L=1,He()}s(pt,"_setOnline");function ct(){L=2,He()}s(ct,"_setOffline");function Tt(){var pr=Sm();if(pr&&S){if(ope(pr,fe),v){var Pr=v.body||v;U(Pr.ononline)||ope(Pr,fe)}S=!1}}s(Tt,"_unload");function Jt(pr){return P.push(pr),{rm:s(function(){var Pr=P.indexOf(pr);if(Pr>-1)return P.splice(Pr,1)},"rm")}}return s(Jt,"addListener"),{isOnline:We,isListening:s(function(){return S},"isListening"),unload:Tt,addListener:Jt,setOnlineState:Ye}}s(nKe,"createOfflineListener");var iKe="AppInsightsChannelPlugin",vx="duration",Jl="tags",vK="deviceType",Gu="data",$1="name",b7="traceID",gi="length",E7="stringify",bx="measurements",Up="dataType",Ex="envelopeType",Ix="toString",Tx="enqueue",wx="count",z1="push",bK="emitLineDelimitedJson",J4="clear",UP="markAsSent",I7="clearSent",EK="bufferOverride",T7="BUFFER_KEY",Vy="SENT_BUFFER_KEY",X4="concat",w7="MAX_BUFFER_SIZE",_7="triggerSend",_c="diagLog",IK="initialize",S7="_sender",R7="endpointUrl",k7="instrumentationKey",TK="customHeaders",spe="maxBatchSizeInBytes",wK="onunloadDisableBeacon",_K="isBeaconApiDisabled",ape="alwaysUseXhrOverride",lpe="enableSessionStorageBuffer",qp="_buffer",cpe="onunloadDisableFetch",upe="disableSendBeaconSplit",qP="getSenderInst",_x="_onError",SK="_onPartialSuccess",WP="_onSuccess",RK="itemsReceived",kK="itemsAccepted",BK="baseType",GP="sampleRate",oKe="getHashCodeScore",DK="baseType",Rs="baseData",bl="properties",fpe="true";function Aa(A,v,T){return Rp(A,v,T,oe)}s(Aa,"_setValueIf");function sKe(A,v,T){var S=T[Jl]=T[Jl]||{},P=v.ext=v.ext||{},L=v[Jl]=v[Jl]||[],W=P.user;W&&(Aa(S,vl.userAuthUserId,W.authId),Aa(S,vl.userId,W.id||W.localId));var se=P.app;se&&Aa(S,vl.sessionId,se.sesId);var fe=P.device;fe&&(Aa(S,vl.deviceId,fe.id||fe.localId),Aa(S,vl[vK],fe.deviceClass),Aa(S,vl.deviceIp,fe.ip),Aa(S,vl.deviceModel,fe.model),Aa(S,vl[vK],fe[vK]));var ve=v.ext.web;if(ve){Aa(S,vl.deviceLanguage,ve.browserLang),Aa(S,vl.deviceBrowserVersion,ve.browserVer),Aa(S,vl.deviceBrowser,ve.browser);var ke=T[Gu]=T[Gu]||{},We=ke[Rs]=ke[Rs]||{},et=We[bl]=We[bl]||{};Aa(et,"domain",ve.domain),Aa(et,"isManual",ve.isManual?fpe:null),Aa(et,"screenRes",ve.screenRes),Aa(et,"userConsent",ve.userConsent?fpe:null)}var He=P.os;He&&(Aa(S,vl.deviceOS,He[$1]),Aa(S,vl.deviceOSVersion,He.osVer));var Ye=P.trace;Ye&&(Aa(S,vl.operationParentId,Ye.parentID),Aa(S,vl.operationName,wc(A,Ye[$1])),Aa(S,vl.operationId,Ye[b7]));for(var pt={},ct=L[gi]-1;ct>=0;ct--){var Tt=L[ct];ne(Tt,function(pr,Pr){pt[pr]=Pr}),L.splice(ct,1)}ne(L,function(pr,Pr){pt[pr]=Pr});var Jt=Bm(Bm({},S),pt);Jt[vl.internalSdkVersion]||(Jt[vl.internalSdkVersion]=wc(A,"javascript:".concat(aKe.Version),64)),T[Jl]=Uw(Jt)}s(sKe,"_extractPartAExtensions");function $y(A,v,T){K(A)||ne(A,function(S,P){Xe(P)?T[S]=P:ce(P)?v[S]=P:by()&&(v[S]=l0()[E7](P))})}s($y,"_extractPropsAndMeasurements");function Sx(A,v){K(A)||ne(A,function(T,S){A[T]=S||v})}s(Sx,"_convertPropsUndefinedToCustomDefinedValue");function Rx(A,v,T,S){var P=new DYe(A,S,v);Aa(P,"sampleRate",T[Dhe]),(T[Rs]||{}).startTime&&(P.time=J3(T[Rs].startTime)),P.iKey=T.iKey;var L=T.iKey.replace(/-/g,"");return P[$1]=P[$1].replace("{0}",L),sKe(A,T,P),T[Jl]=T[Jl]||[],Uw(P)}s(Rx,"_createEnvelope");function kx(A,v){K(v[Rs])&&Or(A,1,46,"telemetryItem.baseData cannot be null.")}s(kx,"EnvelopeCreatorInit");var aKe={Version:"3.3.6"};function lKe(A,v,T){kx(A,v);var S=v[Rs][bx]||{},P=v[Rs][bl]||{};$y(v[Gu],P,S),K(T)||Sx(P,T);var L=v[Rs];if(K(L))return N4(A,"Invalid input for dependency data"),null;var W=L[bl]&&L[bl][Phe]?L[bl][Phe]:"GET",se=new FP(A,L.id,L.target,L[$1],L[vx],L.success,L.responseCode,W,L.type,L.correlationContext,P,S),fe=new Cx(FP[Up],se);return Rx(A,FP[Ex],v,fe)}s(lKe,"DependencyEnvelopeCreator");function dpe(A,v,T){kx(A,v);var S={},P={};v[DK]!==z4[Up]&&(S.baseTypeSource=v[DK]),v[DK]===z4[Up]?(S=v[Rs][bl]||{},P=v[Rs][bx]||{}):v[Rs]&&$y(v[Rs],S,P),$y(v[Gu],S,P),K(T)||Sx(S,T);var L=v[Rs][$1],W=new z4(A,L,S,P),se=new Cx(z4[Up],W);return Rx(A,z4[Ex],v,se)}s(dpe,"EventEnvelopeCreator");function cKe(A,v,T){kx(A,v);var S=v[Rs][bx]||{},P=v[Rs][bl]||{};$y(v[Gu],P,S),K(T)||Sx(P,T);var L=v[Rs],W=NP.CreateFromInterface(A,L,P,S),se=new Cx(NP[Up],W);return Rx(A,NP[Ex],v,se)}s(cKe,"ExceptionEnvelopeCreator");function uKe(A,v,T){kx(A,v);var S=v[Rs],P=S[bl]||{},L=S[bx]||{};$y(v[Gu],P,L),K(T)||Sx(P,T);var W=new y7(A,S[$1],S.average,S.sampleCount,S.min,S.max,S.stdDev,P,L),se=new Cx(y7[Up],W);return Rx(A,y7[Ex],v,se)}s(uKe,"MetricEnvelopeCreator");function fKe(A,v,T){kx(A,v);var S,P=v[Rs];!K(P)&&!K(P[bl])&&!K(P[bl][vx])?(S=P[bl][vx],delete P[bl][vx]):!K(v[Gu])&&!K(v[Gu][vx])&&(S=v[Gu][vx],delete v[Gu][vx]);var L=v[Rs],W;((v.ext||{}).trace||{})[b7]&&(W=v.ext.trace[b7]);var se=L.id||W,fe=L[$1],ve=L.uri,ke=L[bl]||{},We=L[bx]||{};if(K(L.refUri)||(ke.refUri=L.refUri),K(L.pageType)||(ke.pageType=L.pageType),K(L.isLoggedIn)||(ke.isLoggedIn=L.isLoggedIn[Ix]()),!K(L[bl])){var et=L[bl];ne(et,function(pt,ct){ke[pt]=ct})}$y(v[Gu],ke,We),K(T)||Sx(ke,T);var He=new LP(A,fe,ve,S,ke,We,se),Ye=new Cx(LP[Up],He);return Rx(A,LP[Ex],v,Ye)}s(fKe,"PageViewEnvelopeCreator");function dKe(A,v,T){kx(A,v);var S=v[Rs],P=S[$1],L=S.uri||S.url,W=S[bl]||{},se=S[bx]||{};$y(v[Gu],W,se),K(T)||Sx(W,T);var fe=new QP(A,P,L,void 0,W,se,S),ve=new Cx(QP[Up],fe);return Rx(A,QP[Ex],v,ve)}s(dKe,"PageViewPerformanceEnvelopeCreator");function mKe(A,v,T){kx(A,v);var S=v[Rs].message,P=v[Rs].severityLevel,L=v[Rs][bl]||{},W=v[Rs][bx]||{};$y(v[Gu],L,W),K(T)||Sx(L,T);var se=new MP(A,S,P,L,W),fe=new Cx(MP[Up],se);return Rx(A,MP[Ex],v,fe)}s(mKe,"TraceEnvelopeCreator");var mpe=function(){function A(v,T){var S=[],P=!1,L=T.maxRetryCnt;this._get=function(){return S},this._set=function(W){return S=W,S},Yl(A,this,function(W){W[Tx]=function(se){if(W[wx]()>=T.eventsLimitInMem){P||(Or(v,2,105,"Maximum in-memory buffer size reached: "+W[wx](),!0),P=!0);return}se.cnt=se.cnt||0,!(!K(L)&&se.cnt>L)&&S[z1](se)},W[wx]=function(){return S[gi]},W.size=function(){for(var se=S[gi],fe=0;fe<S[gi];fe++)se+=S[fe].item[gi];return T[bK]||(se+=2),se},W[J4]=function(){S=[],P=!1},W.getItems=function(){return S.slice(0)},W.batchPayloads=function(se){if(se&&se[gi]>0){var fe=[];Jr(se,function(ke){fe[z1](ke.item)});var ve=T[bK]?fe.join(`
`):"["+fe.join(",")+"]";return ve}return null},W.createNew=function(se,fe,ve){var ke=S.slice(0);se=se||v,fe=fe||{};var We=ve?new hpe(se,fe):new PK(se,fe);return Jr(ke,function(et){We[Tx](et)}),We}})}return s(A,"BaseSendBuffer"),A.__ieDyn=1,A}(),PK=function(A){j3(v,A);function v(T,S){var P=A.call(this,T,S)||this;return Yl(v,P,function(L,W){L[UP]=function(se){W[J4]()},L[I7]=function(se){}}),P}return s(v,"ArraySendBuffer"),v.__ieDyn=1,v}(mpe),hKe=["AI_buffer","AI_sentBuffer"],hpe=function(A){j3(v,A);function v(S,P){var L=A.call(this,S,P)||this,W=!1,se=P?.namePrefix,fe=P[EK]||{getItem:_Ye,setItem:SYe},ve=fe.getItem,ke=fe.setItem,We=P.maxRetryCnt;return Yl(v,L,function(et,He){var Ye=Pr(v[T7]),pt=Pr(v[Vy]),ct=vi(),Tt=pt[X4](ct),Jt=et._set(Ye[X4](Tt));Jt[gi]>v[w7]&&(Jt[gi]=v[w7]),xi(v[Vy],[]),xi(v[T7],Jt),et[Tx]=function(pn){if(et[wx]()>=v[w7]){W||(Or(S,2,67,"Maximum buffer size reached: "+et[wx](),!0),W=!0);return}pn.cnt=pn.cnt||0,!(!K(We)&&pn.cnt>We)&&(He[Tx](pn),xi(v[T7],et._get()))},et[J4]=function(){He[J4](),xi(v[T7],et._get()),xi(v[Vy],[]),W=!1},et[UP]=function(pn){xi(v[T7],et._set(pr(pn,et._get())));var $r=Pr(v[Vy]);$r instanceof Array&&pn instanceof Array&&($r=$r[X4](pn),$r[gi]>v[w7]&&(Or(S,1,67,"Sent buffer reached its maximum size: "+$r[gi],!0),$r[gi]=v[w7]),xi(v[Vy],$r))},et[I7]=function(pn){var $r=Pr(v[Vy]);$r=pr(pn,$r),xi(v[Vy],$r)},et.createNew=function(pn,$r,bi){bi=!!bi;var ks=et._get().slice(0),Uo=Pr(v[Vy]).slice(0);pn=pn||S,$r=$r||{},et[J4]();var er=bi?new v(pn,$r):new PK(pn,$r);return Jr(ks,function(zr){er[Tx](zr)}),bi&&er[UP](Uo),er};function pr(pn,$r){var bi=[],ks=[];return Jr(pn,function(Uo){ks[z1](Uo.item)}),Jr($r,function(Uo){!De(Uo)&&o0(ks,Uo.item)===-1&&bi[z1](Uo)}),bi}s(pr,"_removePayloadsFromBuffer");function Pr(pn){var $r=pn;return $r=se?se+"_"+$r:$r,jn($r)}s(Pr,"_getBuffer");function jn(pn){try{var $r=ve(S,pn);if($r){var bi=l0().parse($r);if(ce(bi)&&(bi=l0().parse(bi)),bi&&qe(bi))return bi}}catch(ks){Or(S,1,42," storage key: "+pn+", "+nl(ks),{exception:yt(ks)})}return[]}s(jn,"_getBufferBase");function xi(pn,$r){var bi=pn;try{bi=se?se+"_"+bi:bi;var ks=JSON[E7]($r);ke(S,bi,ks)}catch(Uo){ke(S,bi,JSON[E7]([])),Or(S,2,41," storage key: "+bi+", "+nl(Uo)+". Buffer cleared",{exception:yt(Uo)})}}s(xi,"_setBuffer");function vi(){var pn=[];try{return Jr(hKe,function($r){var bi=fo($r);if(pn=pn[X4](bi),se){var ks=se+"_"+$r,Uo=fo(ks);pn=pn[X4](Uo)}}),pn}catch($r){Or(S,2,41,"Transfer events from previous buffers: "+nl($r)+". previous Buffer items can not be removed",{exception:yt($r)})}return[]}s(vi,"_getPreviousEvents");function fo(pn){try{var $r=jn(pn),bi=[];return Jr($r,function(ks){var Uo={item:ks,cnt:0};bi[z1](Uo)}),RYe(S,pn),bi}catch{}return[]}s(fo,"_getItemsFromPreviousKey")}),L}s(v,"SessionStorageSendBuffer");var T;return T=v,v.VERSION="_1",v.BUFFER_KEY="AI_buffer"+T.VERSION,v.SENT_BUFFER_KEY="AI_sentBuffer"+T.VERSION,v.MAX_BUFFER_SIZE=2e3,v}(mpe),pKe=function(){function A(v){Yl(A,this,function(T){T.serialize=function(W){var se=S(W,"root");try{return l0()[E7](se)}catch(fe){Or(v,1,48,fe&&De(fe[Ix])?fe[Ix]():"Error serializing object",null,!0)}};function S(W,se){var fe="__aiCircularRefCheck",ve={};if(!W)return Or(v,1,48,"cannot serialize object because it is null or undefined",{name:se},!0),ve;if(W[fe])return Or(v,2,50,"Circular reference detected while serializing object",{name:se},!0),ve;if(!W.aiDataContract){if(se==="measurements")ve=L(W,"number",se);else if(se==="properties")ve=L(W,"string",se);else if(se==="tags")ve=L(W,"string",se);else if(qe(W))ve=P(W,se);else{Or(v,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:se},!0);try{l0()[E7](W),ve=W}catch(ke){Or(v,1,48,ke&&De(ke[Ix])?ke[Ix]():"Error serializing object",null,!0)}}return ve}return W[fe]=!0,ne(W.aiDataContract,function(ke,We){var et=De(We)?We()&1:We&1,He=De(We)?We()&4:We&4,Ye=We&2,pt=W[ke]!==void 0,ct=be(W[ke])&&W[ke]!==null;if(et&&!pt&&!Ye)Or(v,1,24,"Missing required field specification. The field is required but not present on source",{field:ke,name:se});else if(!He){var Tt=void 0;ct?Ye?Tt=P(W[ke],ke):Tt=S(W[ke],ke):Tt=W[ke],Tt!==void 0&&(ve[ke]=Tt)}}),delete W[fe],ve}s(S,"_serializeObject");function P(W,se){var fe;if(W)if(!qe(W))Or(v,1,54,`This field was specified as an array in the contract but the item is not an array.\r
`,{name:se},!0);else{fe=[];for(var ve=0;ve<W[gi];ve++){var ke=W[ve],We=S(ke,se+"["+ve+"]");fe[z1](We)}}return fe}s(P,"_serializeArray");function L(W,se,fe){var ve;return W&&(ve={},ne(W,function(ke,We){if(se==="string")We===void 0?ve[ke]="undefined":We===null?ve[ke]="null":We[Ix]?ve[ke]=We[Ix]():ve[ke]="invalid field: toString() is not defined.";else if(se==="number")if(We===void 0)ve[ke]="undefined";else if(We===null)ve[ke]="null";else{var et=parseFloat(We);ve[ke]=et}else ve[ke]="invalid field: "+fe+" is of unknown type.",Or(v,1,ve[ke],null,!0)})),ve}s(L,"_serializeStringMap")})}return s(A,"Serializer"),A.__ieDyn=1,A}(),gKe=8,AKe=function(){function A(){}return s(A,"HashCodeScoreGenerator"),A.prototype.getHashCodeScore=function(v){var T=this.getHashCode(v)/A.INT_MAX_VALUE;return T*100},A.prototype.getHashCode=function(v){if(v==="")return 0;for(;v[gi]<gKe;)v=v[X4](v);for(var T=5381,S=0;S<v[gi];++S)T=(T<<5)+T+v.charCodeAt(S),T=T&T;return Math.abs(T)},A.INT_MAX_VALUE=2147483647,A}(),yKe=function(){function A(){var v=this,T=new AKe,S=new ipe;v.getSamplingScore=function(P){var L=0;return P[Jl]&&P[Jl][S.userId]?L=T.getHashCodeScore(P[Jl][S.userId]):P.ext&&P.ext.user&&P.ext.user.id?L=T[oKe](P.ext.user.id):P[Jl]&&P[Jl][S.operationId]?L=T.getHashCodeScore(P[Jl][S.operationId]):P.ext&&P.ext.telemetryTrace&&P.ext.telemetryTrace[b7]?L=T.getHashCodeScore(P.ext.telemetryTrace[b7]):L=Math.random()*100,L}}return s(A,"SamplingScoreGenerator"),A}(),CKe=function(){function A(v,T){this.INT_MAX_VALUE=2147483647;var S=T||lx(null);(v>100||v<0)&&(S.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:v},!0),v=100),this[GP]=v,this.samplingScoreGenerator=new yKe}return s(A,"Sample"),A.prototype.isSampledIn=function(v){var T=this[GP],S=!1;return T==null||T>=100||v.baseType===y7[Up]?!0:(S=this.samplingScoreGenerator.getSamplingScore(v)<T,S)},A}(),is,Y1,Wp=void 0,ppe="",xKe=65e3;function gpe(A){try{return A.responseText}catch{}return null}s(gpe,"_getResponseText");function vKe(A){return A&&A.sendPOST}s(vKe,"isOverrideFn");var Ape=St((is={endpointUrl:e7(oe,aK+H4)},is[bK]=cd(),is.maxBatchInterval=15e3,is[spe]=102400,is.disableTelemetry=cd(),is[lpe]=cd(!0),is.isRetryDisabled=cd(),is[_K]=cd(!0),is[upe]=cd(!0),is.disableXhr=cd(),is[cpe]=cd(),is[wK]=cd(),is[k7]=Wp,is.namePrefix=Wp,is.samplingPercentage=e7(bKe,100),is[TK]=Wp,is.convertUndefined=Wp,is.eventsLimitInMem=1e4,is[EK]=!1,is.httpXHROverride={isVal:vKe,v:Wp},is[ape]=cd(),is.transports=Wp,is.retryCodes=Wp,is.maxRetryCnt={isVal:Xe,v:10},is));function bKe(A){return!isNaN(A)&&A>0&&A<=100}s(bKe,"_chkSampling");var EKe=(Y1={},Y1[z4.dataType]=dpe,Y1[MP.dataType]=mKe,Y1[LP.dataType]=fKe,Y1[QP.dataType]=dKe,Y1[NP.dataType]=cKe,Y1[y7.dataType]=uKe,Y1[FP.dataType]=lKe,Y1),ype=function(A){j3(v,A);function v(){var T=A.call(this)||this;T.priority=1001,T.identifier=iKe;var S,P,L,W,se,fe,ve,ke=0,We,et,He,Ye,pt,ct,Tt,Jt,pr,Pr,jn,xi,vi,fo,pn,$r,bi,ks,Uo,er,zr,io,Nt,Sn,Hs,mo,El;return Yl(v,T,function(mt,Ma){xpe(),mt.pause=function(){Jy(),L=!0},mt.resume=function(){L&&(L=!1,P=null,To(),rI())},mt.flush=function($e,Et,vr){if($e===void 0&&($e=!0),!L){Jy();try{return mt[_7]($e,null,vr||1)}catch(qr){Or(mt[_c](),1,22,"flush failed, telemetry will not be collected: "+nl(qr),{exception:yt(qr)})}}},mt.onunloadFlush=function(){if(!L)if(Tt||er)try{return mt[_7](!0,z0,2)}catch($e){Or(mt[_c](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+nl($e),{exception:yt($e)})}else mt.flush(!1)},mt.addHeader=function($e,Et){ve[$e]=Et},mt[IK]=function($e,Et,vr,qr){mt.isInitialized()&&Or(mt[_c](),1,28,"Sender is already initialized"),Ma[IK]($e,Et,vr,qr);var Fn=mt.identifier;se=new pKe(Et.logger),S=0,P=null,mt[S7]=null,fe=0;var An=mt[_c]();He=khe(Qm("Sender"),Et.evtNamespace&&Et.evtNamespace()),et=nKe(He),mt._addHook(Om($e,function($i){var ya=$i.cfg;ya.storagePrefix&&wYe(ya.storagePrefix);var Hu=Oy(null,ya,Et),ci=Hu.getExtCfg(Fn,Ape),vpe=ci[R7];if(Ye&&vpe===Ye){var FK=ya[R7];FK&&FK!==vpe&&(ci[R7]=FK)}lt(ci[k7])&&(ci[k7]=ya[k7]),Ue(mt,"_senderConfig",{g:s(function(){return ci},"g")}),pt!==ci[R7]&&(Ye=pt=ci[R7]),Et.activeStatus()===bp.PENDING?mt.pause():Et.activeStatus()===bp.ACTIVE&&mt.resume(),Pr&&Pr!==ci[TK]&&Jr(Pr,function(Zl){delete ve[Zl.header]}),ct=ci[spe],Tt=(ci[wK]===!1||ci[_K]===!1)&&Bp(),Jt=ci[wK]===!1&&Bp(),pr=ci[_K]===!1&&Bp(),er=ci[ape],zr=!!ci.disableXhr,El=ci.retryCodes;var MK=ci[EK],nI=!!ci[lpe]&&(!!MK||Hhe()),bpe=ci.namePrefix,_Ke=nI!==$r||nI&&ks!==bpe||nI&&bi!==MK;if(mt[qp]){if(_Ke)try{mt[qp]=mt[qp].createNew(An,ci,nI)}catch(Zl){Or(mt[_c](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+nl(Zl),{exception:yt(Zl)})}To()}else mt[qp]=nI?new hpe(An,ci):new PK(An,ci);ks=bpe,$r=nI,bi=MK,io=!ci[cpe]&&nx(!0),Hs=!!ci[upe],mt._sample=new CKe(ci.samplingPercentage,An),xi=ci[k7],!lt(xi)&&!Cpe(xi,ya)&&Or(An,1,100,"Invalid Instrumentation key "+xi),Pr=ci[TK],ce(Ye)&&!qhe(Ye)&&Pr&&Pr[gi]>0?Jr(Pr,function(Zl){T.addHeader(Zl.header,Zl.value)}):Pr=null,Uo=ci.enableSendPromise;var Epe=Il();mo?mo.SetConfig(Epe):(mo=new Fa,mo[IK](Epe,An));var $P=ci.httpXHROverride,zP=null,N7=null,SKe=WD([3,1,2],ci.transports);zP=mo&&mo[qP](SKe,!1);var QK=mo&&mo.getFallbackInst();Nt=s(function(Zl,Bx){return Hr(QK,Zl,Bx)},"_xhrSend"),Sn=s(function(Zl,Bx){return Hr(QK,Zl,Bx,!1)},"_fallbackSend"),zP=er?$P:zP||$P||QK,mt[S7]=function(Zl,Bx){return Hr(zP,Zl,Bx)},io&&(We=tI);var OK=WD([3,1],ci.unloadTransports);io||(OK=OK.filter(function(Zl){return Zl!==2})),N7=mo&&mo[qP](OK,!0),N7=er?$P:N7||$P,(er||ci.unloadTransports||!We)&&N7&&(We=s(function(Zl,Bx){return Hr(N7,Zl,Bx)},"_syncUnloadSender")),We||(We=Nt),jn=ci.disableTelemetry,vi=ci.convertUndefined||Wp,fo=ci.isRetryDisabled,pn=ci.maxBatchInterval}))},mt.processTelemetry=function($e,Et){Et=mt._getTelCtx(Et);var vr=Et[_c]();try{var qr=Wm($e,vr);if(!qr)return;var Fn=Ky($e,vr);if(!Fn)return;var An=se.serialize(Fn),$i=mt[qp];To(An);var ya={item:An,cnt:0};$i[Tx](ya),rI()}catch(Hu){Or(vr,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+nl(Hu),{exception:yt(Hu)})}mt.processNext($e,Et)},mt.isCompletelyIdle=function(){return!L&&ke===0&&mt._buffer[wx]()===0},mt.getOfflineListener=function(){return et},mt._xhrReadyStateChange=function($e,Et,vr){if(!Hm(Et))return md($e,Et,vr)},mt[_7]=function($e,Et,vr){$e===void 0&&($e=!0);var qr;if(!L)try{var Fn=mt[qp];if(jn)Fn[J4]();else if(Fn[wx]()>0){var An=Fn.getItems();VP(vr||0,$e),Et?qr=Et.call(mt,An,$e):qr=mt[S7](An,$e)}Jy()}catch(ya){var $i=Ey();(!$i||$i>9)&&Or(mt[_c](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+nl(ya),{exception:yt(ya)})}return qr},mt.getOfflineSupport=function(){return{getUrl:s(function(){return Ye},"getUrl"),createPayload:At,serialize:Bs,batch:Xl,shouldProcess:s(function($e){return!!Wm($e)},"shouldProcess")}},mt._doTeardown=function($e,Et){mt.onunloadFlush(),By(et,!1),xpe()},mt[_x]=function($e,Et,vr){if(!Hm($e))return u0($e,Et)},mt[SK]=function($e,Et){if(!Hm($e))return zy($e,Et)},mt[WP]=function($e,Et){if(!Hm($e))return qm($e)},mt._xdrOnLoad=function($e,Et){if(!Hm(Et))return js($e,Et)};function js($e,Et){var vr=gpe($e);if($e&&(vr+""=="200"||vr===""))S=0,mt[WP](Et,0);else{var qr=Gr(vr);qr&&qr[RK]&&qr[RK]>qr[kK]&&!fo?mt[SK](Et,qr):mt[_x](Et,qD($e))}}s(js,"_xdrOnLoad");function Il(){try{var $e={xdrOnComplete:s(function(vr,qr,Fn){var An=Yy(Fn);if(An)return js(vr,An)},"xdrOnComplete"),fetchOnComplete:s(function(vr,qr,Fn,An){var $i=Yy(An);if($i)return os(vr.status,$i,vr.url,$i[gi],vr.statusText,Fn||"")},"fetchOnComplete"),xhrOnComplete:s(function(vr,qr,Fn){var An=Yy(Fn);if(An)return md(vr,An,An[gi])},"xhrOnComplete"),beaconOnRetry:s(function(vr,qr,Fn){return Gm(vr,qr,Fn)},"beaconOnRetry")},Et={enableSendPromise:Uo,isOneDs:!1,disableCredentials:!1,disableXhr:zr,disableBeacon:!pr,disableBeaconSync:!Jt,senderOnCompleteCallBack:$e};return Et}catch{}return null}s(Il,"_getSendPostMgrConfig");function md($e,Et,vr){$e.readyState===4&&os($e.status,Et,$e.responseURL,vr,E4($e),gpe($e)||$e.response)}s(md,"_xhrReadyStateChange");function u0($e,Et,vr){Or(mt[_c](),2,26,"Failed to send telemetry.",{message:Et}),mt._buffer&&mt._buffer[I7]($e)}s(u0,"_onError");function zy($e,Et){for(var vr=[],qr=[],Fn=Et.errors.reverse(),An=0,$i=Fn;An<$i.length;An++){var ya=$i[An],Hu=$e.splice(ya.index,1)[0];Xy(ya.statusCode)?qr[z1](Hu):vr[z1](Hu)}$e[gi]>0&&mt[WP]($e,Et[kK]),vr[gi]>0&&mt[_x](vr,E4(null,["partial success",Et[kK],"of",Et.itemsReceived].join(" "))),qr[gi]>0&&(P7(qr),Or(mt[_c](),2,40,"Partial success. Delivered: "+$e[gi]+", Failed: "+vr[gi]+". Will retry to send "+qr[gi]+" our of "+Et[RK]+" items"))}s(zy,"_onPartialSuccess");function qm($e,Et){mt._buffer&&mt._buffer[I7]($e)}s(qm,"_onSuccess");function Yy($e){try{if($e){var Et=$e,vr=Et.oriPayload;return vr&&vr[gi]?vr:null}}catch{}return null}s(Yy,"_getPayloadArr");function Wm($e,Et){if(jn)return!1;if(!$e)return Et&&Or(Et,1,7,"Cannot send empty telemetry"),!1;if($e.baseData&&!$e[BK])return Et&&Or(Et,1,70,"Cannot send telemetry without baseData and baseType"),!1;if($e[BK]||($e[BK]="EventData"),!mt[S7])return Et&&Or(Et,1,28,"Sender was not initialized"),!1;if(Br($e))$e[Dhe]=mt._sample[GP];else return Et&&Or(Et,2,33,"Telemetry item was sampled out and not sent",{SampleRate:mt._sample[GP]}),!1;return!0}s(Wm,"_validate");function Ky($e,Et){var vr=$e.iKey||xi,qr=v.constructEnvelope($e,vr,Et,vi);if(!qr){Or(Et,1,47,"Unable to create an AppInsights envelope");return}var Fn=!1;if($e[Jl]&&$e[Jl][sK]&&(Jr($e[Jl][sK],function(An){try{An&&An(qr)===!1&&(Fn=!0,N4(Et,"Telemetry processor check returns false"))}catch($i){Or(Et,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+nl($i),{exception:yt($i)},!0)}}),delete $e[Jl][sK]),!Fn)return qr}s(Ky,"_getEnvelope");function Bs($e){var Et=ppe,vr=mt[_c]();try{var qr=Wm($e,vr),Fn=null;qr&&(Fn=Ky($e,vr)),Fn&&(Et=se.serialize(Fn))}catch{}return Et}s(Bs,"_serialize");function Xl($e){var Et=ppe;return $e&&$e[gi]&&(Et="["+$e.join(",")+"]"),Et}s(Xl,"_batch");function At($e){var Et=Co();return{urlString:Ye,data:$e,headers:Et}}s(At,"_createPayload");function Br($e){return mt._sample.isSampledIn($e)}s(Br,"_isSampledIn");function Nn($e,Et,vr,qr){Et===200&&$e?mt._onSuccess($e,$e[gi]):qr&&mt[_x]($e,qr)}s(Nn,"_getOnComplete");function Hr($e,Et,vr,qr){qr===void 0&&(qr=!0);var Fn=s(function(ya,Hu,ci){return Nn(Et,ya,Hu,ci)},"onComplete"),An=Ln(Et),$i=$e&&$e.sendPOST;return $i&&An?(qr&&mt._buffer[UP](Et),$i(An,Fn,!vr)):null}s(Hr,"_doSend");function Ln($e){if(qe($e)&&$e[gi]>0){var Et=mt[qp].batchPayloads($e),vr=Co(),qr={data:Et,urlString:Ye,headers:vr,disableXhrSync:zr,disableFetchKeepAlive:!io,oriPayload:$e};return qr}return null}s(Ln,"_getPayload");function Co(){try{var $e=ve||{};return qhe(Ye)&&($e[Nhe[6]]=Nhe[7]),$e}catch{}return null}s(Co,"_getHeaders");function To($e){var Et=$e?$e[gi]:0;return mt[qp].size()+Et>ct?((!et||et.isOnline())&&mt[_7](!0,null,10),!0):!1}s(To,"_checkMaxSize");function os($e,Et,vr,qr,Fn,An){var $i=null;if(mt._appId||($i=Gr(An),$i&&$i.appId&&(mt._appId=$i.appId)),($e<200||$e>=300)&&$e!==0){if(($e===301||$e===307||$e===308)&&!Sc(vr)){mt[_x](Et,Fn);return}if(et&&!et.isOnline()){if(!fo){var ya=10;P7(Et,ya),Or(mt[_c](),2,40,". Offline - Response Code: ".concat($e,". Offline status: ").concat(!et.isOnline(),". Will retry to send ").concat(Et.length," items."))}return}!fo&&Xy($e)?(P7(Et),Or(mt[_c](),2,40,". Response code "+$e+". Will retry to send "+Et[gi]+" items.")):mt[_x](Et,Fn)}else Sc(vr),$e===206?($i||($i=Gr(An)),$i&&!fo?mt[SK](Et,$i):mt[_x](Et,Fn)):(S=0,mt[WP](Et,qr))}s(os,"_checkResponsStatus");function Sc($e){return fe>=10?!1:!K($e)&&$e!==""&&$e!==Ye?(Ye=$e,++fe,!0):!1}s(Sc,"_checkAndUpdateEndPointUrl");function z0($e,Et){if(We)We($e,!1);else{var vr=mo&&mo[qP]([3],!0);return Hr(vr,$e,Et)}}s(z0,"_doUnloadSend");function Gm($e,Et,vr){var qr=$e,Fn=qr&&qr.oriPayload;if(Hs)Sn&&Sn(Fn,!0),Or(mt[_c](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var An=[],$i=0;$i<Fn[gi];$i++){var ya=Fn[$i],Hu=[ya],ci=Ln(Hu);vr(ci,Et)?mt._onSuccess(Hu,Hu[gi]):An[z1](ya)}An[gi]>0&&(Sn&&Sn(An,!0),Or(mt[_c](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}s(Gm,"_onBeaconRetry");function Hm($e){try{if($e&&$e[gi])return ce($e[0])}catch{}return null}s(Hm,"_isStringArr");function tI($e,Et){var vr=null;if(qe($e)){for(var qr=$e[gi],Fn=0;Fn<$e[gi];Fn++)qr+=$e[Fn].item[gi];var An=mo.getSyncFetchPayload();An+qr<=xKe?vr=2:Bp()?vr=3:(vr=1,Or(mt[_c](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var $i=mo&&mo[qP]([vr],!0);return Hr($i,$e,Et)}return null}s(tI,"_fetchKeepAliveSender");function P7($e,Et){if(Et===void 0&&(Et=1),!(!$e||$e[gi]===0)){var vr=mt[qp];vr[I7]($e),S++;for(var qr=0,Fn=$e;qr<Fn.length;qr++){var An=Fn[qr];An.cnt=An.cnt||0,An.cnt++,vr[Tx](An)}LK(Et),rI()}}s(P7,"_resendPayload");function LK($e){var Et=10,vr;if(S<=1)vr=Et;else{var qr=(Math.pow(2,S)-1)/2,Fn=w1(Math.random()*qr*Et)+1;Fn=$e*Fn,vr=Ie(hr(Fn,3600),Et)}var An=gp()+vr*1e3;P=An}s(LK,"_setRetryTime");function rI(){if(!W&&!L){var $e=P?Ie(0,P-gp()):0,Et=Ie(pn,$e);W=Cp(function(){W=null,mt[_7](!0,null,1)},Et)}}s(rI,"_setupTimer");function Jy(){W&&W.cancel(),W=null,P=null}s(Jy,"_clearScheduledTimer");function Xy($e){return K(El)?$e===401||$e===408||$e===429||$e===500||$e===502||$e===503||$e===504:El[gi]&&El.indexOf($e)>-1}s(Xy,"_isRetriable");function jP(){var $e="getNotifyMgr";return mt.core[$e]?mt.core[$e]():mt.core._notificationManager}s(jP,"_getNotifyMgr");function VP($e,Et){var vr=jP();if(vr&&vr.eventsSendRequest)try{vr.eventsSendRequest($e,Et)}catch(qr){Or(mt[_c](),1,74,"send request notification failed: "+nl(qr),{exception:yt(qr)})}}s(VP,"_notifySendRequest");function Cpe($e,Et){var vr=Et.disableInstrumentationKeyValidation,qr=K(vr)?!1:vr;if(qr)return!0;var Fn="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",An=new RegExp(Fn);return An.test($e)}s(Cpe,"_validateInstrumentationKey");function xpe(){mt[S7]=null,mt[qp]=null,mt._appId=null,mt._sample=null,ve={},et=null,S=0,P=null,L=!1,W=null,se=null,fe=0,ke=0,We=null,He=null,Ye=null,pt=null,ct=0,Tt=!1,Pr=null,jn=!1,xi=null,vi=Wp,fo=!1,$r=null,ks=Wp,zr=!1,io=!1,Hs=!1,Nt=null,Sn=null,mo=null,Ue(mt,"_senderConfig",{g:s(function(){return UD({},Ape)},"g")})}s(xpe,"_initDefaults")}),T}return s(v,"Sender"),v.constructEnvelope=function(T,S,P,L){var W;S!==T.iKey&&!K(S)?W=Bm(Bm({},T),{iKey:S}):W=T;var se=EKe[W.baseType]||dpe;return se(P,W,L)},v}(vt),Z4="instrumentationKey",HP="connectionString",B7="endpointUrl",D7="userOverrideEndpointUrl",eI,NK=void 0,IKe=(eI={diagnosticLogInterval:e7(TKe,1e4)},eI[HP]=NK,eI.endpointUrl=NK,eI[Z4]=NK,eI.extensionConfig={},eI);function TKe(A){return A&&A>0}s(TKe,"_chkDiagLevel");var wKe=function(){function A(v){var T=new Ft,S;(K(v)||K(v[Z4])&&K(v[HP]))&&Kt("Invalid input configuration"),Yl(A,this,function(L){Ue(L,"config",{g:s(function(){return S},"g")}),W(),L.initialize=W,L.track=P,Ow(L,T,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange","getTraceCtx","updateCfg","addTelemetryInitializer"]);function W(){var se=$0(v||{},IKe);S=se.cfg,T.addUnloadHook(Om(se,function(){var fe=S[HP];if(lt(fe)){var ve=h4(function(He,Ye){W0(fe,function(pt){var ct=pt.value,Tt=S[Z4];if(!pt.rejected&&ct){S[HP]=ct;var Jt=pK(ct);Tt=Jt.instrumentationkey||Tt}He(Tt)})}),ke=h4(function(He,Ye){W0(fe,function(pt){var ct=pt.value,Tt=S[B7];if(!pt.rejected&&ct){var Jt=pK(ct),pr=Jt.ingestionendpoint;Tt=pr?pr+H4:Tt}He(Tt)})});S[Z4]=ve,S[B7]=S[D7]||ke}if(ce(fe)){var We=pK(fe),et=We.ingestionendpoint;S[B7]=S[D7]?S[D7]:et+H4,S[Z4]=We.instrumentationkey||S[Z4]}S[B7]=S[D7]?S[D7]:S[B7]})),T.initialize(S,[new ype])}s(W,"_initialize")});function P(L){L&&(L.baseData=L.baseData||{},L.baseType=L.baseType||"EventData"),T.track(L)}s(P,"_track")}return s(A,"ApplicationInsights"),A.__ieDyn=1,A}();e.AppInsightsCore=Ft,e.ApplicationInsights=wKe,e.Sender=ype,e.SeverityLevel=rKe,e.arrForEach=Jr,e.isNullOrUndefined=K,e.proxyFunctions=Ow,e.throwError=Kt})});var Txe=H(sg=>{"use strict";d();Object.defineProperty(sg,"__esModule",{value:!0});sg.bytePairEncode=sg.BinaryMap=sg.binaryMapKey=void 0;var pst=s((e,t,r)=>{let n=r-t,i=16777215>>>Math.max(0,(3-n)*8),o=(e[t+0]|e[t+1]<<8|e[t+2]<<16)&i,a=16777215>>>Math.min(31,Math.max(0,(6-n)*8)),l=(e[t+3]|e[t+4]<<8|e[t+5]<<16)&a;return o+16777216*l},"binaryMapKey");sg.binaryMapKey=pst;var iee=class e{static{s(this,"BinaryMap")}constructor(){this.nested=new Map,this.final=new Map}get(t,r=0,n=t.length){let i=n<6+r,o=(0,sg.binaryMapKey)(t,r,n);return i?this.final.get(o):this.nested.get(o)?.get(t,6+r,n)}set(t,r){let n=(0,sg.binaryMapKey)(t,0,t.length);if(t.length<6){this.final.set(n,r);return}let o=this.nested.get(n);if(o instanceof e)o.set(t.subarray(6),r);else{let a=new e;a.set(t.subarray(6),r),this.nested.set(n,a)}}};sg.BinaryMap=iee;var og=new Int32Array(128),g0=new Int32Array(128);function gst(e,t,r){if(r===1)return[t.get(e)];let n=2147483647,i=-1;for(;og.length<r*2;)g0=new Int32Array(g0.length*2),og=new Int32Array(og.length*2);for(let c=0;c<r-1;c++){let u=t.get(e,c,c+2)??2147483647;u<n&&(n=u,i=c),g0[c]=c,og[c]=u}g0[r-1]=r-1,og[r-1]=2147483647,g0[r]=r,og[r]=2147483647;let o=r+1;function a(c,u=0){if(c+u+2<o){let f=t.get(e,g0[c],g0[c+u+2]);if(f!==void 0)return f}return 2147483647}for(s(a,"getRank");n!==2147483647;){og[g0[i]]=a(i,1),i>0&&(og[g0[i-1]]=a(i-1,1));for(let c=i+1;c<o-1;c++)g0[c]=g0[c+1];o--,i=-1,n=2147483647;for(let c=0;c<o-1;c++){let u=og[g0[c]];og[g0[c]]<n&&(n=u,i=c)}}let l=[];for(let c=0;c<o-1;c++)l.push(t.get(e,g0[c],g0[c+1]));return l}s(gst,"bytePairEncode");sg.bytePairEncode=gst});var wxe=H(MF=>{"use strict";d();Object.defineProperty(MF,"__esModule",{value:!0});MF.makeTextEncoder=void 0;var oee=class{static{s(this,"UniversalTextEncoder")}constructor(){this.length=0,this.encoder=new TextEncoder}encode(t){let r=this.encoder.encode(t);return this.length=r.length,r}},see=class{static{s(this,"NodeTextEncoder")}constructor(){this.buffer=Buffer.alloc(256),this.length=0}encode(t){for(;;){if(this.length=this.buffer.write(t,"utf8"),this.length<this.buffer.length-4)return this.buffer;this.buffer=Buffer.alloc(this.length*2),this.length=this.buffer.write(t)}}},Ast=s(()=>typeof Buffer<"u"?new see:new oee,"makeTextEncoder");MF.makeTextEncoder=Ast});var _xe=H(QF=>{"use strict";d();Object.defineProperty(QF,"__esModule",{value:!0});QF.LRUCache=void 0;var aee=class{static{s(this,"LRUCache")}constructor(t){this.size=t,this.nodes=new Map}get(t){let r=this.nodes.get(t);if(r)return this.moveToHead(r),r.value}set(t,r){let n=this.nodes.get(t);if(n)n.value=r,this.moveToHead(n);else{let i=new lee(t,r);this.nodes.set(t,i),this.addNode(i),this.nodes.size>this.size&&(this.nodes.delete(this.tail.key),this.removeNode(this.tail))}}moveToHead(t){this.removeNode(t),t.next=void 0,t.prev=void 0,this.addNode(t)}addNode(t){this.head&&(this.head.prev=t,t.next=this.head),this.tail||(this.tail=t),this.head=t}removeNode(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev}};QF.LRUCache=aee;var lee=class{static{s(this,"Node")}constructor(t,r){this.key=t,this.value=r}}});var uee=H(UF=>{"use strict";d();Object.defineProperty(UF,"__esModule",{value:!0});UF.TikTokenizer=void 0;var OF=Txe(),yst=wxe(),Cst=_xe();function xst(e){let t=new Map;try{let i=require("fs").readFileSync(e,"utf-8");return r(i),t}catch(n){throw new Error(`Failed to load from BPE encoder file stream: ${n}`)}function r(n){for(let i of n.split(/[\r\n]+/)){if(i.trim()==="")continue;let o=i.split(" ");if(o.length!==2)throw new Error("Invalid format in the BPE encoder file stream");let a=new Uint8Array(Buffer.from(o[0],"base64")),l=parseInt(o[1]);if(!isNaN(l))t.set(a,l);else throw new Error(`Can't parse ${o[1]} to integer`)}}s(r,"processBpeRanks")}s(xst,"loadTikTokenBpe");function vst(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(vst,"escapeRegExp");var cee=class{static{s(this,"TikTokenizer")}constructor(t,r,n,i=8192){this.textEncoder=(0,yst.makeTextEncoder)(),this.textDecoder=new TextDecoder("utf-8"),this.cache=new Cst.LRUCache(i);let o=typeof t=="string"?xst(t):t;this.init(o,r,n)}init(t,r,n){this.encoder=new OF.BinaryMap;for(let[i,o]of t)this.encoder.set(i,o);this.regex=new RegExp(n,"gu"),this.specialTokensRegex=new RegExp(Array.from(r.keys()).map(i=>vst(i)).join("|")),this.specialTokensEncoder=r,this.decoder=new Map;for(let[i,o]of t)this.decoder.set(o,i);if(t.size!==this.decoder.size)throw new Error("Encoder and decoder sizes do not match");this.specialTokensDecoder=new Map;for(let[i,o]of r)this.specialTokensDecoder.set(o,i)}findNextSpecialToken(t,r,n){let i=r,o=null;if(n&&this.specialTokensRegex)for(;o=t.slice(i).match(this.specialTokensRegex),!(!o||n&&n.includes(o[0]));)i+=o.index+1;let a=o?i+o.index:t.length;return[o,a]}encode(t,r){let n=[],i=0;for(;;){let o,a;if([o,a]=this.findNextSpecialToken(t,i,r),a>i&&this.encodeByIndex(t,n,i,a),o){if(i=i+this.encodeSpecialToken(n,o),i>=t.length)break}else break}return n}encodeSpecialToken(t,r){let n=this.specialTokensEncoder?.get(r[0]);return t.push(n),r.index+r[0].length}encodeByIndex(t,r,n,i){let o,a=t.substring(n,i);for(this.regex.lastIndex=0;o=this.regex.exec(a);){let l=this.cache.get(o[0]);if(l)for(let c of l)r.push(c);else{let c=this.textEncoder.encode(o[0]),u=this.encoder.get(c,0,this.textEncoder.length);if(u!==void 0)r.push(u),this.cache.set(o[0],[u]);else{let f=(0,OF.bytePairEncode)(c,this.encoder,this.textEncoder.length);for(let m of f)r.push(m);this.cache.set(o[0],f)}}}}encodeTrimSuffixByIndex(t,r,n,i,o,a,l){let c,u=t.substring(n,i);for(this.regex.lastIndex=0;c=this.regex.exec(u);){let f=c[0],m=this.cache.get(f);if(m)if(a+m.length<=o)a+=m.length,l+=f.length,r.push(...m);else{let h=o-a;a+=h,l+=f.length,r.push(...m.slice(0,h));break}else{let h=this.textEncoder.encode(f),p=this.encoder.get(h,0,h.length);if(p!==void 0)if(this.cache.set(f,[p]),a+1<=o)a++,l+=f.length,r.push(p);else break;else{let g=(0,OF.bytePairEncode)(h,this.encoder,this.textEncoder.length);if(this.cache.set(f,g),a+g.length<=o){a+=g.length,l+=f.length;for(let y of g)r.push(y)}else{let y=o-a;a+=y,l+=f.length;for(let x=0;x<y;x++)r.push(g[x]);break}}}if(a>=o)break}return{tokenCount:a,encodeLength:l}}encodeTrimSuffix(t,r,n){let i=[],o=0,a=0,l=0;for(;;){let u,f;if([u,f]=this.findNextSpecialToken(t,o,n),f>o){let{tokenCount:m,encodeLength:h}=this.encodeTrimSuffixByIndex(t,i,o,f,r,a,l);if(a=m,l=h,a>=r)break}if(u!==null){if(a++,a<=r&&(o=o+this.encodeSpecialToken(i,u),l+=u[0].length,o>=t.length)||a>=r)break}else break}let c=l===t.length?t:t.slice(0,l);return{tokenIds:i,text:c}}encodeTrimPrefix(t,r,n){let i=[],o=0,a=0,l=0,c=new Map;for(c.set(a,l);;){let h,p;if([h,p]=this.findNextSpecialToken(t,o,n),p>o){let g,y=t.substring(o,p);for(this.regex.lastIndex=0;g=this.regex.exec(y);){let x=g[0],b=this.cache.get(x);if(b)a+=b.length,l+=x.length,i.push(...b),c.set(a,l);else{let E=this.textEncoder.encode(x),_=this.encoder.get(E);if(_!==void 0)this.cache.set(x,[_]),a++,l+=x.length,i.push(_),c.set(a,l);else{let k=(0,OF.bytePairEncode)(E,this.encoder,this.textEncoder.length);this.cache.set(x,k),a+=k.length,l+=x.length;for(let B of k)i.push(B);c.set(a,l)}}}}if(h!==null){if(o=o+this.encodeSpecialToken(i,h),a++,l+=h[0].length,c.set(a,l),o>=t.length)break}else break}if(a<=r)return{tokenIds:i,text:t};let u=a-r,f=0,m=0;for(let[h,p]of c)if(h>=u){f=h,m=p;break}if(f>r){let h=this.encode(t,n),p=h.slice(h.length-r);return{tokenIds:p,text:this.decode(p)}}return{tokenIds:i.slice(f),text:t.slice(m)}}decode(t){let r=[];for(let n of t){let i=[],o=this.decoder?.get(n);if(o!==void 0)i=Array.from(o);else{let a=this.specialTokensDecoder?.get(n);if(a!==void 0){let l=this.textEncoder.encode(a);i=Array.from(l.subarray(0,this.textEncoder.length))}}r.push(...i)}return this.textDecoder.decode(new Uint8Array(r))}};UF.TikTokenizer=cee});var Mxe=H(ja=>{"use strict";d();Object.defineProperty(ja,"__esModule",{value:!0});ja.createTokenizer=ja.createByEncoderName=ja.createByModelName=ja.getRegexByModel=ja.getRegexByEncoder=ja.getSpecialTokensByModel=ja.getSpecialTokensByEncoder=ja.MODEL_TO_ENCODING=void 0;var bst=uee(),Est=new Map([["gpt-4o-","o200k_base"],["gpt-4-","cl100k_base"],["gpt-3.5-turbo-","cl100k_base"],["gpt-35-turbo-","cl100k_base"]]);ja.MODEL_TO_ENCODING=new Map([["gpt-4o","o200k_base"],["gpt-4","cl100k_base"],["gpt-3.5-turbo","cl100k_base"],["text-davinci-003","p50k_base"],["text-davinci-002","p50k_base"],["text-davinci-001","r50k_base"],["text-curie-001","r50k_base"],["text-babbage-001","r50k_base"],["text-ada-001","r50k_base"],["davinci","r50k_base"],["curie","r50k_base"],["babbage","r50k_base"],["ada","r50k_base"],["code-davinci-002","p50k_base"],["code-davinci-001","p50k_base"],["code-cushman-002","p50k_base"],["code-cushman-001","p50k_base"],["davinci-codex","p50k_base"],["cushman-codex","p50k_base"],["text-davinci-edit-001","p50k_edit"],["code-davinci-edit-001","p50k_edit"],["text-embedding-ada-002","cl100k_base"],["text-similarity-davinci-001","r50k_base"],["text-similarity-curie-001","r50k_base"],["text-similarity-babbage-001","r50k_base"],["text-similarity-ada-001","r50k_base"],["text-search-davinci-doc-001","r50k_base"],["text-search-curie-doc-001","r50k_base"],["text-search-babbage-doc-001","r50k_base"],["text-search-ada-doc-001","r50k_base"],["code-search-babbage-code-001","r50k_base"],["code-search-ada-code-001","r50k_base"],["gpt2","gpt2"]]);var qF="<|endoftext|>",Sxe="<|fim_prefix|>",Rxe="<|fim_middle|>",kxe="<|fim_suffix|>",Bxe="<|endofprompt|>",T_="'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+",Dxe="(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}{1,3}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",Ist=[`[^\r
\\p{L}\\p{N}]?[\\p{Lu}\\p{Lt}\\p{Lm}\\p{Lo}\\p{M}]*[\\p{Ll}\\p{Lm}\\p{Lo}\\p{M}]+(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)?`,`[^\r
\\p{L}\\p{N}]?[\\p{Lu}\\p{Lt}\\p{Lm}\\p{Lo}\\p{M}]+[\\p{Ll}\\p{Lm}\\p{Lo}\\p{M}]*(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)?`,"\\p{N}{1,3}"," ?[^\\s\\p{L}\\p{N}]+[\\r\\n/]*","\\s*[\\r\\n]+","\\s+(?!\\S)","\\s+"],Pxe=Ist.join("|");function fee(e){let t="";if(ja.MODEL_TO_ENCODING.has(e))t=ja.MODEL_TO_ENCODING.get(e);else for(let[r,n]of Est)if(e.startsWith(r)){t=n;break}return t}s(fee,"getEncoderFromModelName");async function Tst(e,t){let r=require("fs"),n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch file from ${e}. Status code: ${n.status}`);let i=await n.text();r.writeFileSync(t,i)}s(Tst,"fetchAndSaveFile");function dee(e){let t=new Map([[qF,50256]]);switch(e){case"o200k_base":t=new Map([[qF,199999],[Bxe,200018]]);break;case"cl100k_base":t=new Map([[qF,100257],[Sxe,100258],[Rxe,100259],[kxe,100260],[Bxe,100276]]);break;case"p50k_edit":t=new Map([[qF,50256],[Sxe,50281],[Rxe,50282],[kxe,50283]]);break;default:break}return t}s(dee,"getSpecialTokensByEncoder");ja.getSpecialTokensByEncoder=dee;function wst(e){let t=fee(e);return dee(t)}s(wst,"getSpecialTokensByModel");ja.getSpecialTokensByModel=wst;function Nxe(e){switch(e){case"o200k_base":return Pxe;case"cl100k_base":return Dxe;default:break}return T_}s(Nxe,"getRegexByEncoder");ja.getRegexByEncoder=Nxe;function _st(e){let t=fee(e);return Nxe(t)}s(_st,"getRegexByModel");ja.getRegexByModel=_st;async function Sst(e,t=null){return Lxe(fee(e),t)}s(Sst,"createByModelName");ja.createByModelName=Sst;async function Lxe(e,t=null){let r,n,i=dee(e);switch(e){case"o200k_base":r=Pxe,n="https://openaipublic.blob.core.windows.net/encodings/o200k_base.tiktoken";break;case"cl100k_base":r=Dxe,n="https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken";break;case"p50k_base":r=T_,n="https://openaipublic.blob.core.windows.net/encodings/p50k_base.tiktoken";break;case"p50k_edit":r=T_,n="https://openaipublic.blob.core.windows.net/encodings/p50k_base.tiktoken";break;case"r50k_base":r=T_,n="https://openaipublic.blob.core.windows.net/encodings/r50k_base.tiktoken";break;case"gpt2":r=T_,n="https://raw.githubusercontent.com/microsoft/Tokenizer/main/model/gpt2.tiktoken";break;default:throw new Error(`Doesn't support this encoder [${e}]`)}t!==null&&(i=new Map([...i,...t]));let o=require("fs"),a=require("path"),l=a.basename(n),c=a.resolve(__dirname,"..","model");o.existsSync(c)||o.mkdirSync(c,{recursive:!0});let u=a.resolve(c,l);return o.existsSync(u)||(console.log(`Downloading file from ${n}`),await Tst(n,u),console.log(`Saved file to ${u}`)),Fxe(u,i,r)}s(Lxe,"createByEncoderName");ja.createByEncoderName=Lxe;function Fxe(e,t,r,n=8192){return new bst.TikTokenizer(e,t,r,n)}s(Fxe,"createTokenizer");ja.createTokenizer=Fxe});var Qxe=H(Va=>{"use strict";d();Object.defineProperty(Va,"__esModule",{value:!0});Va.createTokenizer=Va.createByEncoderName=Va.createByModelName=Va.getSpecialTokensByModel=Va.getSpecialTokensByEncoder=Va.getRegexByModel=Va.getRegexByEncoder=Va.MODEL_TO_ENCODING=Va.TikTokenizer=void 0;var Rst=uee();Object.defineProperty(Va,"TikTokenizer",{enumerable:!0,get:s(function(){return Rst.TikTokenizer},"get")});var S5=Mxe();Object.defineProperty(Va,"MODEL_TO_ENCODING",{enumerable:!0,get:s(function(){return S5.MODEL_TO_ENCODING},"get")});Object.defineProperty(Va,"getRegexByEncoder",{enumerable:!0,get:s(function(){return S5.getRegexByEncoder},"get")});Object.defineProperty(Va,"getRegexByModel",{enumerable:!0,get:s(function(){return S5.getRegexByModel},"get")});Object.defineProperty(Va,"getSpecialTokensByEncoder",{enumerable:!0,get:s(function(){return S5.getSpecialTokensByEncoder},"get")});Object.defineProperty(Va,"getSpecialTokensByModel",{enumerable:!0,get:s(function(){return S5.getSpecialTokensByModel},"get")});Object.defineProperty(Va,"createByModelName",{enumerable:!0,get:s(function(){return S5.createByModelName},"get")});Object.defineProperty(Va,"createByEncoderName",{enumerable:!0,get:s(function(){return S5.createByEncoderName},"get")});Object.defineProperty(Va,"createTokenizer",{enumerable:!0,get:s(function(){return S5.createTokenizer},"get")})});var xee=H((pyr,sve)=>{"use strict";d();sve.exports=s(function(t,r){r===!0&&(r=0);var n="";if(typeof t=="string")try{n=new URL(t).protocol}catch{}else t&&t.constructor===URL&&(n=t.protocol);var i=n.split(/\:|\+/).filter(Boolean);return typeof r=="number"?i[r]:i},"protocols")});var lve=H((yyr,ave)=>{"use strict";d();var lct=xee();function cct(e){var t={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:e,query:{},parse_failed:!1};try{var r=new URL(e);t.protocols=lct(r),t.protocol=t.protocols[0],t.port=r.port,t.resource=r.hostname,t.host=r.host,t.user=r.username||"",t.password=r.password||"",t.pathname=r.pathname,t.hash=r.hash.slice(1),t.search=r.search.slice(1),t.href=r.href,t.query=Object.fromEntries(r.searchParams)}catch{t.protocols=["file"],t.protocol=t.protocols[0],t.port="",t.resource="",t.user="",t.pathname="",t.hash="",t.search="",t.href=e,t.query={},t.parse_failed=!0}return t}s(cct,"parsePath");ave.exports=cct});var hve=H((vyr,mve)=>{"use strict";d();var uct=lve();function fct(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}s(fct,"_interopDefaultLegacy");var dct=fct(uct);function mct(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=s(function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)},"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:s(function(){return e[n]},"get")})}),r}s(mct,"getAugmentedNamespace");var uve={},hct="text/plain",pct="us-ascii",cve=s((e,t)=>t.some(r=>r instanceof RegExp?r.test(e):r===e),"testParameter"),gct=s((e,{stripHash:t})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!r)throw new Error(`Invalid URL: ${e}`);let{type:n,data:i,hash:o}=r.groups,a=n.split(";");o=t?"":o;let l=!1;a[a.length-1]==="base64"&&(a.pop(),l=!0);let c=(a.shift()||"").toLowerCase(),f=[...a.map(m=>{let[h,p=""]=m.split("=").map(g=>g.trim());return h==="charset"&&(p=p.toLowerCase(),p===pct)?"":`${h}${p?`=${p}`:""}`}).filter(Boolean)];return l&&f.push("base64"),(f.length>0||c&&c!==hct)&&f.unshift(c),`data:${f.join(";")},${l?i.trim():i}${o?`#${o}`:""}`},"normalizeDataURL");function Act(e,t){if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},e=e.trim(),/^data:/i.test(e))return gct(e,t);if(/^view-source:/i.test(e))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let i=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&i.protocol==="https:"&&(i.protocol="http:"),t.forceHttps&&i.protocol==="http:"&&(i.protocol="https:"),t.stripAuthentication&&(i.username="",i.password=""),t.stripHash?i.hash="":t.stripTextFragment&&(i.hash=i.hash.replace(/#?:~:text.*?$/i,"")),i.pathname){let a=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,l=0,c="";for(;;){let f=a.exec(i.pathname);if(!f)break;let m=f[0],h=f.index,p=i.pathname.slice(l,h);c+=p.replace(/\/{2,}/g,"/"),c+=m,l=h+m.length}let u=i.pathname.slice(l,i.pathname.length);c+=u.replace(/\/{2,}/g,"/"),i.pathname=c}if(i.pathname)try{i.pathname=decodeURI(i.pathname)}catch{}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let a=i.pathname.split("/"),l=a[a.length-1];cve(l,t.removeDirectoryIndex)&&(a=a.slice(0,-1),i.pathname=a.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(let a of[...i.searchParams.keys()])cve(a,t.removeQueryParameters)&&i.searchParams.delete(a);if(t.removeQueryParameters===!0&&(i.search=""),t.sortQueryParameters){i.searchParams.sort();try{i.search=decodeURIComponent(i.search)}catch{}}t.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,""));let o=e;return e=i.toString(),!t.removeSingleSlash&&i.pathname==="/"&&!o.endsWith("/")&&i.hash===""&&(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||i.pathname==="/")&&i.hash===""&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}s(Act,"normalizeUrl");var yct=Object.freeze({__proto__:null,default:Act}),Cct=mct(yct);Object.defineProperty(uve,"__esModule",{value:!0});var xct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vct=Cct,bct=fve(vct),Ect=dct.default,Ict=fve(Ect);function fve(e){return e&&e.__esModule?e:{default:e}}s(fve,"_interopRequireDefault");var dve=s(function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=/^(?:([a-zA-Z_][a-zA-Z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:](([\~,\.\w,\-,\_,\/,\s]|%[0-9A-Fa-f]{2})+?(?:\.git|\/)?)$/,i=s(function(c){var u=new Error(c);throw u.subject_url=t,u},"throwErr");(typeof t!="string"||!t.trim())&&i("Invalid url."),t.length>e.MAX_INPUT_LENGTH&&i("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),r&&((typeof r>"u"?"undefined":xct(r))!=="object"&&(r={stripHash:!1}),t=(0,bct.default)(t,r));var o=(0,Ict.default)(t);if(o.parse_failed){var a=o.href.match(n);a?(o.protocols=["ssh"],o.protocol="ssh",o.resource=a[2],o.host=a[2],o.user=a[1],o.pathname="/"+a[3],o.parse_failed=!1):i("URL parsing failed.")}return o},"parseUrl");dve.MAX_INPUT_LENGTH=2048;var Tct=uve.default=dve;mve.exports=Tct});var Ave=H((Iyr,gve)=>{"use strict";d();var wct=xee();function pve(e){if(Array.isArray(e))return e.indexOf("ssh")!==-1||e.indexOf("rsync")!==-1;if(typeof e!="string")return!1;var t=wct(e);if(e=e.substring(e.indexOf("://")+3),pve(t))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!e.match(r)&&e.indexOf("@")<e.indexOf(":")}s(pve,"isSsh");gve.exports=pve});var xve=H((_yr,Cve)=>{"use strict";d();var _ct=hve(),yve=Ave();function Sct(e){let t=_ct(e);return t.token="",t.password==="x-oauth-basic"?t.token=t.user:t.user==="x-token-auth"&&(t.token=t.password),yve(t.protocols)||t.protocols.length===0&&yve(e)?t.protocol="ssh":t.protocols.length?t.protocol=t.protocols[0]:(t.protocol="file",t.protocols=["file"]),t.href=t.href.replace(/\/$/,""),t}s(Sct,"gitUp");Cve.exports=Sct});var bve=H((kyr,vve)=>{"use strict";d();var Rct=xve();function vee(e,t){if(t=t||[],typeof e!="string")throw new Error("The url must be a string.");if(!t.every(function(E){return typeof E=="string"}))throw new Error("The refs should contain only strings");var r=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;r.test(e)&&(e="https://github.com/"+e);var n=Rct(e),i=n.resource.split("."),o=null;switch(n.toString=function(E){return vee.stringify(this,E)},n.source=i.length>2?i.slice(1-i.length).join("."):n.source=n.resource,n.git_suffix=/\.git$/.test(n.pathname),n.name=decodeURIComponent((n.pathname||n.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),n.owner=decodeURIComponent(n.user),n.source){case"git.cloudforge.com":n.owner=n.user,n.organization=i[0],n.source="cloudforge.com";break;case"visualstudio.com":if(n.resource==="vs-ssh.visualstudio.com"){o=n.name.split("/"),o.length===4&&(n.organization=o[1],n.owner=o[2],n.name=o[3],n.full_name=o[2]+"/"+o[3]);break}else{o=n.name.split("/"),o.length===2?(n.owner=o[1],n.name=o[1],n.full_name="_git/"+n.name):o.length===3?(n.name=o[2],o[0]==="DefaultCollection"?(n.owner=o[2],n.organization=o[0],n.full_name=n.organization+"/_git/"+n.name):(n.owner=o[0],n.full_name=n.owner+"/_git/"+n.name)):o.length===4&&(n.organization=o[0],n.owner=o[1],n.name=o[3],n.full_name=n.organization+"/"+n.owner+"/_git/"+n.name);break}case"dev.azure.com":case"azure.com":if(n.resource==="ssh.dev.azure.com"){o=n.name.split("/"),o.length===4&&(n.organization=o[1],n.owner=o[2],n.name=o[3]);break}else{o=n.name.split("/"),o.length===5?(n.organization=o[0],n.owner=o[1],n.name=o[4],n.full_name="_git/"+n.name):o.length===3?(n.name=o[2],o[0]==="DefaultCollection"?(n.owner=o[2],n.organization=o[0],n.full_name=n.organization+"/_git/"+n.name):(n.owner=o[0],n.full_name=n.owner+"/_git/"+n.name)):o.length===4&&(n.organization=o[0],n.owner=o[1],n.name=o[3],n.full_name=n.organization+"/"+n.owner+"/_git/"+n.name),n.query&&n.query.path&&(n.filepath=n.query.path.replace(/^\/+/g,"")),n.query&&n.query.version&&(n.ref=n.query.version.replace(/^GB/,""));break}default:o=n.name.split("/");var a=o.length-1;if(o.length>=2){var l=o.indexOf("-",2),c=o.indexOf("blob",2),u=o.indexOf("tree",2),f=o.indexOf("commit",2),m=o.indexOf("issues",2),h=o.indexOf("src",2),p=o.indexOf("raw",2),g=o.indexOf("edit",2);a=l>0?l-1:c>0&&u>0?Math.min(c-1,u-1):c>0?c-1:m>0?m-1:u>0?u-1:f>0?f-1:h>0?h-1:p>0?p-1:g>0?g-1:a,n.owner=o.slice(0,a).join("/"),n.name=o[a],f&&m<0&&(n.commit=o[a+2])}n.ref="",n.filepathtype="",n.filepath="";var y=o.length>a&&o[a+1]==="-"?a+1:a;o.length>y+2&&["raw","src","blob","tree","edit"].indexOf(o[y+1])>=0&&(n.filepathtype=o[y+1],n.ref=o[y+2],o.length>y+3&&(n.filepath=o.slice(y+3).join("/"))),n.organization=n.owner;break}n.full_name||(n.full_name=n.owner,n.name&&(n.full_name&&(n.full_name+="/"),n.full_name+=n.name)),n.owner.startsWith("scm/")&&(n.source="bitbucket-server",n.owner=n.owner.replace("scm/",""),n.organization=n.owner,n.full_name=n.owner+"/"+n.name);var x=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,b=x.exec(n.pathname);return b!=null&&(n.source="bitbucket-server",b[1]==="users"?n.owner="~"+b[2]:n.owner=b[2],n.organization=n.owner,n.name=b[3],o=b[4].split("/"),o.length>1&&(["raw","browse"].indexOf(o[1])>=0?(n.filepathtype=o[1],o.length>2&&(n.filepath=o.slice(2).join("/"))):o[1]==="commits"&&o.length>2&&(n.commit=o[2])),n.full_name=n.owner+"/"+n.name,n.query.at?n.ref=n.query.at:n.ref=""),t.length!==0&&n.ref&&(n.ref=Dct(n.href,t)||n.ref,n.filepath=n.href.split(n.ref+"/")[1]),n}s(vee,"gitUrlParse");vee.stringify=function(e,t){t=t||(e.protocols&&e.protocols.length?e.protocols.join("+"):e.protocol);var r=e.port?":"+e.port:"",n=e.user||"git",i=e.git_suffix?".git":"";switch(t){case"ssh":return r?"ssh://"+n+"@"+e.resource+r+"/"+e.full_name+i:n+"@"+e.resource+":"+e.full_name+i;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return t+"://"+n+"@"+e.resource+r+"/"+e.full_name+i;case"http":case"https":var o=e.token?kct(e):e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?e.user+"@":"";return t+"://"+o+e.resource+r+"/"+Bct(e)+i;default:return e.href}};function kct(e){switch(e.source){case"bitbucket.org":return"x-token-auth:"+e.token+"@";default:return e.token+"@"}}s(kct,"buildToken");function Bct(e){switch(e.source){case"bitbucket-server":return"scm/"+e.full_name;default:var t=e.full_name.split("/").map(function(r){return encodeURIComponent(r)}).join("/");return t}}s(Bct,"buildPath");function Dct(e,t){var r="";return t.forEach(function(n){e.includes(n)&&n.length>r.length&&(r=n)}),r}s(Dct,"findLongestMatchingSubstring");vve.exports=vee});var Pve=H((exports,module)=>{d();var Module=Module!==void 0?Module:{},TreeSitter=function(){var initPromise,document=typeof window=="object"?{currentScript:window.document.currentScript}:null;class Parser{static{s(this,"Parser")}constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise(resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=s((e,t)=>{throw t},"quit_"),ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",scriptDirectory="",read_,readAsync,readBinary,setWindowTitle;function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}s(locateFile,"locateFile");function logExceptionOnExit(e){e instanceof ExitStatus||err("exiting due to exception: "+e)}if(s(logExceptionOnExit,"logExceptionOnExit"),ENVIRONMENT_IS_NODE){var fs=require("fs"),nodePath=require("path");scriptDirectory=ENVIRONMENT_IS_WORKER?nodePath.dirname(scriptDirectory)+"/":__dirname+"/",read_=s((e,t)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFileSync(e,t?void 0:"utf8")),"read_"),readBinary=s(e=>{var t=read_(e,!0);return t.buffer||(t=new Uint8Array(t)),t},"readBinary"),readAsync=s((e,t,r)=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFile(e,function(n,i){n?r(n):t(i.buffer)})},"readAsync"),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),quit_=s((e,t)=>{if(keepRuntimeAlive())throw process.exitCode=e,t;logExceptionOnExit(t),process.exit(e)},"quit_"),Module.inspect=function(){return"[Emscripten Module object]"}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document!==void 0&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=scriptDirectory.indexOf("blob:")!==0?scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1):"",read_=s(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},"read_"),ENVIRONMENT_IS_WORKER&&(readBinary=s(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},"readBinary")),readAsync=s((e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{n.status==200||n.status==0&&n.response?t(n.response):r()},n.onerror=r,n.send(null)},"readAsync"),setWindowTitle=s(e=>document.title=e,"setWindowTitle"));var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var STACK_ALIGN=16,dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var noExitRuntime=Module.noExitRuntime||!0,wasmMemory;typeof WebAssembly!="object"&&abort("no native wasm support detected");var ABORT=!1,EXITSTATUS,UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function UTF8ArrayToString(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var l=63&e[t++];if((224&a)!=192){var c=63&e[t++];if((a=(240&a)==224?(15&a)<<12|l<<6|c:(7&a)<<18|l<<12|c<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|l)}else o+=String.fromCharCode(a)}return o}s(UTF8ArrayToString,"UTF8ArrayToString");function UTF8ToString(e,t){return e?UTF8ArrayToString(HEAPU8,e,t):""}s(UTF8ToString,"UTF8ToString");function stringToUTF8Array(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var l=e.charCodeAt(a);if(l>=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++a)),l<=127){if(r>=o)break;t[r++]=l}else if(l<=2047){if(r+1>=o)break;t[r++]=192|l>>6,t[r++]=128|63&l}else if(l<=65535){if(r+2>=o)break;t[r++]=224|l>>12,t[r++]=128|l>>6&63,t[r++]=128|63&l}else{if(r+3>=o)break;t[r++]=240|l>>18,t[r++]=128|l>>12&63,t[r++]=128|l>>6&63,t[r++]=128|63&l}}return t[r]=0,r-i}s(stringToUTF8Array,"stringToUTF8Array");function stringToUTF8(e,t,r){return stringToUTF8Array(e,HEAPU8,t,r)}s(stringToUTF8,"stringToUTF8");function lengthBytesUTF8(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t}s(lengthBytesUTF8,"lengthBytesUTF8");function updateGlobalBufferAndViews(e){buffer=e,Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}s(updateGlobalBufferAndViews,"updateGlobalBufferAndViews");var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:32768}),wasmMemory&&(buffer=wasmMemory.buffer),INITIAL_MEMORY=buffer.byteLength,updateGlobalBufferAndViews(buffer);var wasmTable=new WebAssembly.Table({initial:20,element:"anyfunc"}),__ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function keepRuntimeAlive(){return noExitRuntime}s(keepRuntimeAlive,"keepRuntimeAlive");function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}s(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}s(initRuntime,"initRuntime");function preMain(){callRuntimeCallbacks(__ATMAIN__)}s(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}s(postRun,"postRun");function addOnPreRun(e){__ATPRERUN__.unshift(e)}s(addOnPreRun,"addOnPreRun");function addOnInit(e){__ATINIT__.unshift(e)}s(addOnInit,"addOnInit");function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}s(addOnPostRun,"addOnPostRun");var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}s(addRunDependency,"addRunDependency");function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}s(removeRunDependency,"removeRunDependency");function abort(e){throw Module.onAbort&&Module.onAbort(e),err(e="Aborted("+e+")"),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}s(abort,"abort");var dataURIPrefix="data:application/octet-stream;base64,",wasmBinaryFile,tempDouble,tempI64;function isDataURI(e){return e.startsWith(dataURIPrefix)}s(isDataURI,"isDataURI");function isFileURI(e){return e.startsWith("file://")}s(isFileURI,"isFileURI");function getBinary(e){try{if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}catch(t){abort(t)}}s(getBinary,"getBinary");function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile))return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return e.arrayBuffer()}).catch(function(){return getBinary(wasmBinaryFile)});if(readAsync)return new Promise(function(e,t){readAsync(wasmBinaryFile,function(r){e(new Uint8Array(r))},t)})}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}s(getBinaryPromise,"getBinaryPromise");function createWasm(){var e={env:asmLibraryArg,wasi_snapshot_preview1:asmLibraryArg,"GOT.mem":new Proxy(asmLibraryArg,GOTHandler),"GOT.func":new Proxy(asmLibraryArg,GOTHandler)};function t(i,o){var a=i.exports;a=relocateExports(a,1024);var l=getDylinkMetadata(o);l.neededDynlibs&&(dynamicLibraries=l.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(a,"main"),Module.asm=a,addOnInit(Module.asm.__wasm_call_ctors),__RELOC_FUNCS__.push(Module.asm.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate")}s(t,"t");function r(i){t(i.instance,i.module)}s(r,"r");function n(i){return getBinaryPromise().then(function(o){return WebAssembly.instantiate(o,e)}).then(function(o){return o}).then(i,function(o){err("failed to asynchronously prepare wasm: "+o),abort(o)})}if(s(n,"_"),addRunDependency("wasm-instantiate"),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(i){return err("Module.instantiateWasm callback failed with error: "+i),!1}return wasmBinary||typeof WebAssembly.instantiateStreaming!="function"||isDataURI(wasmBinaryFile)||isFileURI(wasmBinaryFile)||ENVIRONMENT_IS_NODE||typeof fetch!="function"?n(r):fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(i){return WebAssembly.instantiateStreaming(i,e).then(r,function(o){return err("wasm streaming compile failed: "+o),err("falling back to ArrayBuffer instantiation"),n(r)})}),{}}s(createWasm,"createWasm"),wasmBinaryFile="tree-sitter.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));var ASM_CONSTS={};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}s(ExitStatus,"ExitStatus");var GOT={},CurrentModuleWeakSymbols=new Set([]),GOTHandler={get:s(function(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),CurrentModuleWeakSymbols.has(t)||(r.required=!0),r},"get")};function callRuntimeCallbacks(e){for(;e.length>0;)e.shift()(Module)}s(callRuntimeCallbacks,"callRuntimeCallbacks");function getDylinkMetadata(e){var t=0,r=0;function n(){for(var b=0,E=1;;){var _=e[t++];if(b+=(127&_)*E,E*=128,!(128&_))break}return b}s(n,"_");function i(){var b=n();return UTF8ArrayToString(e,(t+=b)-b,b)}s(i,"n");function o(b,E){if(b)throw new Error(E)}s(o,"s");var a="dylink.0";if(e instanceof WebAssembly.Module){var l=WebAssembly.Module.customSections(e,a);l.length===0&&(a="dylink",l=WebAssembly.Module.customSections(e,a)),o(l.length===0,"need dylink section"),r=(e=new Uint8Array(l[0])).length}else{o(new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0]!=1836278016,"need to see wasm magic number"),o(e[8]!==0,"need the dylink section to be first"),t=9;var c=n();r=t+c,a=i()}var u={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(a=="dylink"){u.memorySize=n(),u.memoryAlign=n(),u.tableSize=n(),u.tableAlign=n();for(var f=n(),m=0;m<f;++m){var h=i();u.neededDynlibs.push(h)}}else for(o(a!=="dylink.0");t<r;){var p=e[t++],g=n();if(p===1)u.memorySize=n(),u.memoryAlign=n(),u.tableSize=n(),u.tableAlign=n();else if(p===2)for(f=n(),m=0;m<f;++m)h=i(),u.neededDynlibs.push(h);else if(p===3)for(var y=n();y--;){var x=i();256&n()&&u.tlsExports.add(x)}else if(p===4)for(y=n();y--;)i(),x=i(),(3&n())==1&&u.weakImports.add(x);else t+=g}return u}s(getDylinkMetadata,"getDylinkMetadata");function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];case"*":return HEAPU32[e>>2];default:abort("invalid type for getValue: "+t)}return null}s(getValue,"getValue");function asmjsMangle(e){return e.indexOf("dynCall_")==0||["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"].includes(e)?e:"_"+e}s(asmjsMangle,"asmjsMangle");function mergeLibSymbols(e,t){for(var r in e)if(e.hasOwnProperty(r)){asmLibraryArg.hasOwnProperty(r)||(asmLibraryArg[r]=e[r]);var n=asmjsMangle(r);Module.hasOwnProperty(n)||(Module[n]=e[r]),r=="__main_argc_argv"&&(Module._main=e[r])}}s(mergeLibSymbols,"mergeLibSymbols");var LDSO={loadedLibsByName:{},loadedLibsByHandle:{}};function dynCallLegacy(e,t,r){var n=Module["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}s(dynCallLegacy,"dynCallLegacy");var wasmTableMirror=[];function getWasmTableEntry(e){var t=wasmTableMirror[e];return t||(e>=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),t}s(getWasmTableEntry,"getWasmTableEntry");function dynCall(e,t,r){return e.includes("j")?dynCallLegacy(e,t,r):getWasmTableEntry(t).apply(null,r)}s(dynCall,"dynCall");function createInvokeFunction(e){return function(){var t=stackSave();try{return dynCall(e,arguments[0],Array.prototype.slice.call(arguments,1))}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}}s(createInvokeFunction,"createInvokeFunction");var ___heap_base=78144;function zeroMemory(e,t){return HEAPU8.fill(0,e,e+t),e}s(zeroMemory,"zeroMemory");function getMemory(e){if(runtimeInitialized)return zeroMemory(_malloc(e),e);var t=___heap_base,r=t+e+15&-16;return ___heap_base=r,GOT.__heap_base.value=r,t}s(getMemory,"getMemory");function isInternalSym(e){return["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm"].includes(e)}s(isInternalSym,"isInternalSym");function uleb128Encode(e,t){e<128?t.push(e):t.push(e%128|128,e>>7)}s(uleb128Encode,"uleb128Encode");function sigToWasmTypes(e){for(var t={i:"i32",j:"i32",f:"f32",d:"f64",p:"i32"},r={parameters:[],results:e[0]=="v"?[]:[t[e[0]]]},n=1;n<e.length;++n)r.parameters.push(t[e[n]]),e[n]==="j"&&r.parameters.push("i32");return r}s(sigToWasmTypes,"sigToWasmTypes");function generateFuncType(e,t){var r=e.slice(0,1),n=e.slice(1),i={i:127,p:127,j:126,f:125,d:124};t.push(96),uleb128Encode(n.length,t);for(var o=0;o<n.length;++o)t.push(i[n[o]]);r=="v"?t.push(0):t.push(1,i[r])}s(generateFuncType,"generateFuncType");function convertJsFunctionToWasm(e,t){if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(t),e);var r=[1];generateFuncType(t,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push.apply(n,r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var i=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(i,{e:{f:e}}).exports.f}s(convertJsFunctionToWasm,"convertJsFunctionToWasm");function updateTableMap(e,t){if(functionsInTableMap)for(var r=e;r<e+t;r++){var n=getWasmTableEntry(r);n&&functionsInTableMap.set(n,r)}}s(updateTableMap,"updateTableMap");var functionsInTableMap=void 0,freeTableIndexes=[];function getEmptyTableSlot(){if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return wasmTable.length-1}s(getEmptyTableSlot,"getEmptyTableSlot");function setWasmTableEntry(e,t){wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)}s(setWasmTableEntry,"setWasmTableEntry");function addFunction(e,t){if(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.has(e))return functionsInTableMap.get(e);var r=getEmptyTableSlot();try{setWasmTableEntry(r,e)}catch(n){if(!(n instanceof TypeError))throw n;setWasmTableEntry(r,convertJsFunctionToWasm(e,t))}return functionsInTableMap.set(e,r),r}s(addFunction,"addFunction");function updateGOT(e,t){for(var r in e)if(!isInternalSym(r)){var n=e[r];r.startsWith("orig$")&&(r=r.split("$")[1],t=!0),GOT[r]||(GOT[r]=new WebAssembly.Global({value:"i32",mutable:!0})),(t||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err("unhandled export type for `"+r+"`: "+typeof n))}}s(updateGOT,"updateGOT");function relocateExports(e,t,r){var n={};for(var i in e){var o=e[i];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),n[i]=o}return updateGOT(n,r),n}s(relocateExports,"relocateExports");function resolveGlobalSymbol(e,t){var r;return t&&(r=asmLibraryArg["orig$"+e]),r||(r=asmLibraryArg[e])&&r.stub&&(r=void 0),r||(r=Module[asmjsMangle(e)]),!r&&e.startsWith("invoke_")&&(r=createInvokeFunction(e.split("_")[1])),r}s(resolveGlobalSymbol,"resolveGlobalSymbol");function alignMemory(e,t){return Math.ceil(e/t)*t}s(alignMemory,"alignMemory");function loadWebAssemblyModule(binary,flags,handle){var metadata=getDylinkMetadata(binary);function loadModule(){var firstLoad=!handle||!HEAP8[handle+12>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign);memAlign=Math.max(memAlign,STACK_ALIGN);var memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+12>>0]=1,HEAPU32[handle+16>>2]=memoryBase,HEAP32[handle+20>>2]=metadata.memorySize,HEAPU32[handle+24>>2]=tableBase,HEAP32[handle+28>>2]=metadata.tableSize)}else memoryBase=HEAPU32[handle+16>>2],tableBase=HEAPU32[handle+24>>2];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length,moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e,!1);return t||(t=moduleExports[e]),t}s(resolveSymbol,"resolveSymbol"),tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var proxyHandler={get:s(function(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in asmLibraryArg)return asmLibraryArg[t];var r;return t in e||(e[t]=function(){return r||(r=resolveSymbol(t)),r.apply(null,arguments)}),e[t]},"get")},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(instance){function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func="("+args+" ) => { "+body+"};";ASM_CONSTS[start]=eval(func)}if(s(addEmAsm,"addEmAsm"),updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols(),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(s(postInstantiation,"postInstantiation"),flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(instance))}return WebAssembly.instantiate(binary,info).then(function(e){return postInstantiation(e.instance)})}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(instance)}return s(loadModule,"loadModule"),CurrentModuleWeakSymbols=metadata.weakImports,flags.loadAsync?metadata.neededDynlibs.reduce(function(e,t){return e.then(function(){return loadDynamicLibrary(t,flags)})},Promise.resolve()).then(function(){return loadModule()}):(metadata.neededDynlibs.forEach(function(e){loadDynamicLibrary(e,flags)}),loadModule())}s(loadWebAssemblyModule,"loadWebAssemblyModule");function loadDynamicLibrary(e,t,r){t=t||{global:!0,nodelete:!0};var n=LDSO.loadedLibsByName[e];if(n)return t.global&&!n.global&&(n.global=!0,n.module!=="loading"&&mergeLibSymbols(n.module,e)),t.nodelete&&n.refcount!==1/0&&(n.refcount=1/0),n.refcount++,r&&(LDSO.loadedLibsByHandle[r]=n),!t.loadAsync||Promise.resolve(!0);function i(l){if(t.fs&&t.fs.findObject(l)){var c=t.fs.readFile(l,{encoding:"binary"});return c instanceof Uint8Array||(c=new Uint8Array(c)),t.loadAsync?Promise.resolve(c):c}if(l=locateFile(l),t.loadAsync)return new Promise(function(u,f){readAsync(l,m=>u(new Uint8Array(m)),f)});if(!readBinary)throw new Error(l+": file not found, and synchronous loading of external files is not available");return readBinary(l)}s(i,"n");function o(){if(typeof preloadedWasm<"u"&&preloadedWasm[e]){var l=preloadedWasm[e];return t.loadAsync?Promise.resolve(l):l}return t.loadAsync?i(e).then(function(c){return loadWebAssemblyModule(c,t,r)}):loadWebAssemblyModule(i(e),t,r)}s(o,"s");function a(l){n.global&&mergeLibSymbols(l,e),n.module=l}return s(a,"a"),n={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},LDSO.loadedLibsByName[e]=n,r&&(LDSO.loadedLibsByHandle[r]=n),t.loadAsync?o().then(function(l){return a(l),!0}):(a(o()),!0)}s(loadDynamicLibrary,"loadDynamicLibrary");function reportUndefinedSymbols(){for(var e in GOT)if(GOT[e].value==0){var t=resolveGlobalSymbol(e,!0);if(!t&&!GOT[e].required)continue;if(typeof t=="function")GOT[e].value=addFunction(t,t.sig);else{if(typeof t!="number")throw new Error("bad export type for `"+e+"`: "+typeof t);GOT[e].value=t}}}s(reportUndefinedSymbols,"reportUndefinedSymbols");function preloadDylibs(){dynamicLibraries.length?(addRunDependency("preloadDylibs"),dynamicLibraries.reduce(function(e,t){return e.then(function(){return loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})})},Promise.resolve()).then(function(){reportUndefinedSymbols(),removeRunDependency("preloadDylibs")})):reportUndefinedSymbols()}s(preloadDylibs,"preloadDylibs");function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;case"*":HEAPU32[e>>2]=t;break;default:abort("invalid type for setValue: "+r)}}s(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78144),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),nowIsMonotonic=!0,_emscripten_get_now;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}s(__emscripten_get_now_is_monotonic,"__emscripten_get_now_is_monotonic");function _abort(){abort("")}s(_abort,"_abort");function _emscripten_date_now(){return Date.now()}s(_emscripten_date_now,"_emscripten_date_now");function _emscripten_memcpy_big(e,t,r){HEAPU8.copyWithin(e,t,t+r)}s(_emscripten_memcpy_big,"_emscripten_memcpy_big");function getHeapMax(){return 2147483648}s(getHeapMax,"getHeapMax");function emscripten_realloc_buffer(e){try{return wasmMemory.grow(e-buffer.byteLength+65535>>>16),updateGlobalBufferAndViews(wasmMemory.buffer),1}catch{}}s(emscripten_realloc_buffer,"emscripten_realloc_buffer");function _emscripten_resize_heap(e){var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var n=1;n<=4;n*=2){var i=t*(1+.2/n);if(i=Math.min(i,e+100663296),emscripten_realloc_buffer(Math.min(r,(o=Math.max(e,i))+((a=65536)-o%a)%a)))return!0}var o,a;return!1}s(_emscripten_resize_heap,"_emscripten_resize_heap"),__emscripten_get_now_is_monotonic.sig="i",Module._abort=_abort,_abort.sig="v",_emscripten_date_now.sig="d",_emscripten_get_now=ENVIRONMENT_IS_NODE?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now(),_emscripten_get_now.sig="d",_emscripten_memcpy_big.sig="vppp",_emscripten_resize_heap.sig="ip";var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:s(function(e,t,r){if(PATH.isAbs(t))return t;var n;if(e===-100?n=FS.cwd():n=SYSCALLS.getStreamFromFD(e).path,t.length==0){if(!r)throw new FS.ErrnoError(44);return n}return PATH.join2(n,t)},"calculateAt"),doStat:s(function(e,t,r){try{var n=e(t)}catch(l){if(l&&l.node&&PATH.normalize(t)!==PATH.normalize(FS.getPath(l.node)))return-54;throw l}HEAP32[r>>2]=n.dev,HEAP32[r+8>>2]=n.ino,HEAP32[r+12>>2]=n.mode,HEAPU32[r+16>>2]=n.nlink,HEAP32[r+20>>2]=n.uid,HEAP32[r+24>>2]=n.gid,HEAP32[r+28>>2]=n.rdev,tempI64=[n.size>>>0,(tempDouble=n.size,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+40>>2]=tempI64[0],HEAP32[r+44>>2]=tempI64[1],HEAP32[r+48>>2]=4096,HEAP32[r+52>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),a=n.ctime.getTime();return tempI64=[Math.floor(i/1e3)>>>0,(tempDouble=Math.floor(i/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+56>>2]=tempI64[0],HEAP32[r+60>>2]=tempI64[1],HEAPU32[r+64>>2]=i%1e3*1e3,tempI64=[Math.floor(o/1e3)>>>0,(tempDouble=Math.floor(o/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+72>>2]=tempI64[0],HEAP32[r+76>>2]=tempI64[1],HEAPU32[r+80>>2]=o%1e3*1e3,tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+88>>2]=tempI64[0],HEAP32[r+92>>2]=tempI64[1],HEAPU32[r+96>>2]=a%1e3*1e3,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+104>>2]=tempI64[0],HEAP32[r+108>>2]=tempI64[1],0},"doStat"),doMsync:s(function(e,t,r,n,i){if(!FS.isFile(t.node.mode))throw new FS.ErrnoError(43);if(2&n)return 0;var o=HEAPU8.slice(e,e+r);FS.msync(t,o,i,r,n)},"doMsync"),varargs:void 0,get:s(function(){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},"get"),getStr:s(function(e){return UTF8ToString(e)},"getStr"),getStreamFromFD:s(function(e){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);return t},"getStreamFromFD")};function _proc_exit(e){EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit&&Module.onExit(e),ABORT=!0),quit_(e,new ExitStatus(e))}s(_proc_exit,"_proc_exit");function exitJS(e,t){EXITSTATUS=e,_proc_exit(e)}s(exitJS,"exitJS"),_proc_exit.sig="vi";var _exit=exitJS;function _fd_close(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.close(t),0}catch(r){if(typeof FS>"u"||!(r instanceof FS.ErrnoError))throw r;return r.errno}}s(_fd_close,"_fd_close");function convertI32PairToI53Checked(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}s(convertI32PairToI53Checked,"convertI32PairToI53Checked");function _fd_seek(e,t,r,n,i){try{var o=convertI32PairToI53Checked(t,r);if(isNaN(o))return 61;var a=SYSCALLS.getStreamFromFD(e);return FS.llseek(a,o,n),tempI64=[a.position>>>0,(tempDouble=a.position,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1],a.getdents&&o===0&&n===0&&(a.getdents=null),0}catch(l){if(typeof FS>"u"||!(l instanceof FS.ErrnoError))throw l;return l.errno}}s(_fd_seek,"_fd_seek");function doWritev(e,t,r,n){for(var i=0,o=0;o<r;o++){var a=HEAPU32[t>>2],l=HEAPU32[t+4>>2];t+=8;var c=FS.write(e,HEAP8,a,l,n);if(c<0)return-1;i+=c,n!==void 0&&(n+=c)}return i}s(doWritev,"doWritev");function _fd_write(e,t,r,n){try{var i=doWritev(SYSCALLS.getStreamFromFD(e),t,r);return HEAPU32[n>>2]=i,0}catch(o){if(typeof FS>"u"||!(o instanceof FS.ErrnoError))throw o;return o.errno}}s(_fd_write,"_fd_write");function _tree_sitter_log_callback(e,t){if(currentLogCallback){let r=UTF8ToString(t);currentLogCallback(r,e!==0)}}s(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(e,t,r,n,i){var o=currentParseCallback(t,{row:r,column:n});typeof o=="string"?(setValue(i,o.length,"i32"),stringToUTF16(o,e,10240)):setValue(i,0,"i32")}s(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");function handleException(e){if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)}s(handleException,"handleException");function allocateUTF8OnStack(e){var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8Array(e,HEAP8,r,t),r}s(allocateUTF8OnStack,"allocateUTF8OnStack");function stringToUTF16(e,t,r){if(r===void 0&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o<i;++o){var a=e.charCodeAt(o);HEAP16[t>>1]=a,t+=2}return HEAP16[t>>1]=0,t-n}s(stringToUTF16,"stringToUTF16");function AsciiToString(e){for(var t="";;){var r=HEAPU8[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}}s(AsciiToString,"AsciiToString"),_exit.sig="vi",_fd_close.sig="ii",_fd_seek.sig="iijip",_fd_write.sig="iippp";var asmLibraryArg={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,abort:_abort,emscripten_get_now:_emscripten_get_now,emscripten_memcpy_big:_emscripten_memcpy_big,emscripten_resize_heap:_emscripten_resize_heap,exit:_exit,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},asm=createWasm(),___wasm_call_ctors=Module.___wasm_call_ctors=function(){return(___wasm_call_ctors=Module.___wasm_call_ctors=Module.asm.__wasm_call_ctors).apply(null,arguments)},___wasm_apply_data_relocs=Module.___wasm_apply_data_relocs=function(){return(___wasm_apply_data_relocs=Module.___wasm_apply_data_relocs=Module.asm.__wasm_apply_data_relocs).apply(null,arguments)},_malloc=Module._malloc=function(){return(_malloc=Module._malloc=Module.asm.malloc).apply(null,arguments)},_calloc=Module._calloc=function(){return(_calloc=Module._calloc=Module.asm.calloc).apply(null,arguments)},_realloc=Module._realloc=function(){return(_realloc=Module._realloc=Module.asm.realloc).apply(null,arguments)},_free=Module._free=function(){return(_free=Module._free=Module.asm.free).apply(null,arguments)},_ts_language_symbol_count=Module._ts_language_symbol_count=function(){return(_ts_language_symbol_count=Module._ts_language_symbol_count=Module.asm.ts_language_symbol_count).apply(null,arguments)},_ts_language_version=Module._ts_language_version=function(){return(_ts_language_version=Module._ts_language_version=Module.asm.ts_language_version).apply(null,arguments)},_ts_language_field_count=Module._ts_language_field_count=function(){return(_ts_language_field_count=Module._ts_language_field_count=Module.asm.ts_language_field_count).apply(null,arguments)},_ts_language_symbol_name=Module._ts_language_symbol_name=function(){return(_ts_language_symbol_name=Module._ts_language_symbol_name=Module.asm.ts_language_symbol_name).apply(null,arguments)},_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=function(){return(_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=Module.asm.ts_language_symbol_for_name).apply(null,arguments)},_ts_language_symbol_type=Module._ts_language_symbol_type=function(){return(_ts_language_symbol_type=Module._ts_language_symbol_type=Module.asm.ts_language_symbol_type).apply(null,arguments)},_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=function(){return(_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=Module.asm.ts_language_field_name_for_id).apply(null,arguments)},_memset=Module._memset=function(){return(_memset=Module._memset=Module.asm.memset).apply(null,arguments)},_memcpy=Module._memcpy=function(){return(_memcpy=Module._memcpy=Module.asm.memcpy).apply(null,arguments)},_ts_parser_delete=Module._ts_parser_delete=function(){return(_ts_parser_delete=Module._ts_parser_delete=Module.asm.ts_parser_delete).apply(null,arguments)},_ts_parser_reset=Module._ts_parser_reset=function(){return(_ts_parser_reset=Module._ts_parser_reset=Module.asm.ts_parser_reset).apply(null,arguments)},_ts_parser_set_language=Module._ts_parser_set_language=function(){return(_ts_parser_set_language=Module._ts_parser_set_language=Module.asm.ts_parser_set_language).apply(null,arguments)},_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=function(){return(_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=Module.asm.ts_parser_timeout_micros).apply(null,arguments)},_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=function(){return(_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=Module.asm.ts_parser_set_timeout_micros).apply(null,arguments)},_memmove=Module._memmove=function(){return(_memmove=Module._memmove=Module.asm.memmove).apply(null,arguments)},_memcmp=Module._memcmp=function(){return(_memcmp=Module._memcmp=Module.asm.memcmp).apply(null,arguments)},_ts_query_new=Module._ts_query_new=function(){return(_ts_query_new=Module._ts_query_new=Module.asm.ts_query_new).apply(null,arguments)},_ts_query_delete=Module._ts_query_delete=function(){return(_ts_query_delete=Module._ts_query_delete=Module.asm.ts_query_delete).apply(null,arguments)},_iswspace=Module._iswspace=function(){return(_iswspace=Module._iswspace=Module.asm.iswspace).apply(null,arguments)},_iswalnum=Module._iswalnum=function(){return(_iswalnum=Module._iswalnum=Module.asm.iswalnum).apply(null,arguments)},_ts_query_pattern_count=Module._ts_query_pattern_count=function(){return(_ts_query_pattern_count=Module._ts_query_pattern_count=Module.asm.ts_query_pattern_count).apply(null,arguments)},_ts_query_capture_count=Module._ts_query_capture_count=function(){return(_ts_query_capture_count=Module._ts_query_capture_count=Module.asm.ts_query_capture_count).apply(null,arguments)},_ts_query_string_count=Module._ts_query_string_count=function(){return(_ts_query_string_count=Module._ts_query_string_count=Module.asm.ts_query_string_count).apply(null,arguments)},_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=function(){return(_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=Module.asm.ts_query_capture_name_for_id).apply(null,arguments)},_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=function(){return(_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=Module.asm.ts_query_string_value_for_id).apply(null,arguments)},_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=function(){return(_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=Module.asm.ts_query_predicates_for_pattern).apply(null,arguments)},_ts_tree_copy=Module._ts_tree_copy=function(){return(_ts_tree_copy=Module._ts_tree_copy=Module.asm.ts_tree_copy).apply(null,arguments)},_ts_tree_delete=Module._ts_tree_delete=function(){return(_ts_tree_delete=Module._ts_tree_delete=Module.asm.ts_tree_delete).apply(null,arguments)},_ts_init=Module._ts_init=function(){return(_ts_init=Module._ts_init=Module.asm.ts_init).apply(null,arguments)},_ts_parser_new_wasm=Module._ts_parser_new_wasm=function(){return(_ts_parser_new_wasm=Module._ts_parser_new_wasm=Module.asm.ts_parser_new_wasm).apply(null,arguments)},_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=function(){return(_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=Module.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=function(){return(_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=Module.asm.ts_parser_parse_wasm).apply(null,arguments)},_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=function(){return(_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=Module.asm.ts_language_type_is_named_wasm).apply(null,arguments)},_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=function(){return(_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=Module.asm.ts_language_type_is_visible_wasm).apply(null,arguments)},_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=function(){return(_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=Module.asm.ts_tree_root_node_wasm).apply(null,arguments)},_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=function(){return(_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=Module.asm.ts_tree_edit_wasm).apply(null,arguments)},_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=function(){return(_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=Module.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=function(){return(_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=Module.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=function(){return(_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=Module.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=function(){return(_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=Module.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=function(){return(_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=Module.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return(_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=Module.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=function(){return(_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=Module.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=function(){return(_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=Module.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=function(){return(_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=Module.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return(_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=Module.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=function(){return(_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=Module.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=function(){return(_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=Module.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=function(){return(_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=Module.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=function(){return(_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=Module.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=function(){return(_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=Module.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=function(){return(_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=Module.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=function(){return(_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=Module.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=function(){return(_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=Module.asm.ts_node_symbol_wasm).apply(null,arguments)},_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=function(){return(_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=Module.asm.ts_node_child_count_wasm).apply(null,arguments)},_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=function(){return(_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=Module.asm.ts_node_named_child_count_wasm).apply(null,arguments)},_ts_node_child_wasm=Module._ts_node_child_wasm=function(){return(_ts_node_child_wasm=Module._ts_node_child_wasm=Module.asm.ts_node_child_wasm).apply(null,arguments)},_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=function(){return(_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=Module.asm.ts_node_named_child_wasm).apply(null,arguments)},_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=function(){return(_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=Module.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=function(){return(_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=Module.asm.ts_node_next_sibling_wasm).apply(null,arguments)},_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=function(){return(_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=Module.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=function(){return(_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=Module.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=function(){return(_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=Module.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},_ts_node_parent_wasm=Module._ts_node_parent_wasm=function(){return(_ts_node_parent_wasm=Module._ts_node_parent_wasm=Module.asm.ts_node_parent_wasm).apply(null,arguments)},_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=function(){return(_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=Module.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=function(){return(_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=Module.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=function(){return(_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=Module.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=function(){return(_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=Module.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=function(){return(_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=Module.asm.ts_node_start_point_wasm).apply(null,arguments)},_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=function(){return(_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=Module.asm.ts_node_end_point_wasm).apply(null,arguments)},_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=function(){return(_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=Module.asm.ts_node_start_index_wasm).apply(null,arguments)},_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=function(){return(_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=Module.asm.ts_node_end_index_wasm).apply(null,arguments)},_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=function(){return(_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=Module.asm.ts_node_to_string_wasm).apply(null,arguments)},_ts_node_children_wasm=Module._ts_node_children_wasm=function(){return(_ts_node_children_wasm=Module._ts_node_children_wasm=Module.asm.ts_node_children_wasm).apply(null,arguments)},_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=function(){return(_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=Module.asm.ts_node_named_children_wasm).apply(null,arguments)},_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=function(){return(_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=Module.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=function(){return(_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=Module.asm.ts_node_is_named_wasm).apply(null,arguments)},_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=function(){return(_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=Module.asm.ts_node_has_changes_wasm).apply(null,arguments)},_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=function(){return(_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=Module.asm.ts_node_has_error_wasm).apply(null,arguments)},_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=function(){return(_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=Module.asm.ts_node_is_missing_wasm).apply(null,arguments)},_ts_query_matches_wasm=Module._ts_query_matches_wasm=function(){return(_ts_query_matches_wasm=Module._ts_query_matches_wasm=Module.asm.ts_query_matches_wasm).apply(null,arguments)},_ts_query_captures_wasm=Module._ts_query_captures_wasm=function(){return(_ts_query_captures_wasm=Module._ts_query_captures_wasm=Module.asm.ts_query_captures_wasm).apply(null,arguments)},___cxa_atexit=Module.___cxa_atexit=function(){return(___cxa_atexit=Module.___cxa_atexit=Module.asm.__cxa_atexit).apply(null,arguments)},_iswdigit=Module._iswdigit=function(){return(_iswdigit=Module._iswdigit=Module.asm.iswdigit).apply(null,arguments)},_iswalpha=Module._iswalpha=function(){return(_iswalpha=Module._iswalpha=Module.asm.iswalpha).apply(null,arguments)},_iswlower=Module._iswlower=function(){return(_iswlower=Module._iswlower=Module.asm.iswlower).apply(null,arguments)},_memchr=Module._memchr=function(){return(_memchr=Module._memchr=Module.asm.memchr).apply(null,arguments)},_strlen=Module._strlen=function(){return(_strlen=Module._strlen=Module.asm.strlen).apply(null,arguments)},_towupper=Module._towupper=function(){return(_towupper=Module._towupper=Module.asm.towupper).apply(null,arguments)},_setThrew=Module._setThrew=function(){return(_setThrew=Module._setThrew=Module.asm.setThrew).apply(null,arguments)},stackSave=Module.stackSave=function(){return(stackSave=Module.stackSave=Module.asm.stackSave).apply(null,arguments)},stackRestore=Module.stackRestore=function(){return(stackRestore=Module.stackRestore=Module.asm.stackRestore).apply(null,arguments)},stackAlloc=Module.stackAlloc=function(){return(stackAlloc=Module.stackAlloc=Module.asm.stackAlloc).apply(null,arguments)},__Znwm=Module.__Znwm=function(){return(__Znwm=Module.__Znwm=Module.asm._Znwm).apply(null,arguments)},__ZdlPv=Module.__ZdlPv=function(){return(__ZdlPv=Module.__ZdlPv=Module.asm._ZdlPv).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=function(){return(__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw).apply(null,arguments)},dynCall_jiji=Module.dynCall_jiji=function(){return(dynCall_jiji=Module.dynCall_jiji=Module.asm.dynCall_jiji).apply(null,arguments)},_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=function(){return(_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=Module.asm.orig$ts_parser_timeout_micros).apply(null,arguments)},_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=function(){return(_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=Module.asm.orig$ts_parser_set_timeout_micros).apply(null,arguments)},calledRun;function callMain(e){var t=Module._main;if(t){(e=e||[]).unshift(thisProgram);var r=e.length,n=stackAlloc(4*(r+1)),i=n>>2;e.forEach(a=>{HEAP32[i++]=allocateUTF8OnStack(a)}),HEAP32[i]=0;try{var o=t(r,n);return exitJS(o,!0),o}catch(a){return handleException(a)}}}s(callMain,"callMain"),Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,dependenciesFulfilled=s(function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},"e");var dylibsLoaded=!1;function run(e){function t(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}s(t,"t"),e=e||arguments_,runDependencies>0||!dylibsLoaded&&(preloadDylibs(),dylibsLoaded=!0,runDependencies>0)||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()))}if(s(run,"run"),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();let C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/;var VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static{s(this,"ParserImpl")}static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(t){if(t.constructor!==Language)throw new Error("Argument must be a Language");{r=t[0];let n=C._ts_language_version(r);if(n<MIN_COMPATIBLE_VERSION||VERSION<n)throw new Error(`Incompatible language version ${n}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${VERSION}.`)}}else r=0,t=null;return this.language=t,C._ts_parser_set_language(this[0],r),this}getLanguage(){return this.language}parse(t,r,n){if(typeof t=="string")currentParseCallback=s((c,u,f)=>t.slice(c,f),"currentParseCallback");else{if(typeof t!="function")throw new Error("Argument must be a string or a function");currentParseCallback=t}this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let i=0,o=0;if(n&&n.includedRanges){i=n.includedRanges.length,o=C._calloc(i,SIZE_OF_RANGE);let c=o;for(let u=0;u<i;u++)marshalRange(c,n.includedRanges[u]),c+=SIZE_OF_RANGE}let a=C._ts_parser_parse_wasm(this[0],this[1],r?r[0]:0,o,i);if(!a)throw currentParseCallback=null,currentLogCallback=null,new Error("Parsing failed");let l=new Tree(INTERNAL,a,this.language,currentParseCallback);return currentParseCallback=null,currentLogCallback=null,l}reset(){C._ts_parser_reset(this[0])}setTimeoutMicros(t){C._ts_parser_set_timeout_micros(this[0],t)}getTimeoutMicros(){return C._ts_parser_timeout_micros(this[0])}setLogger(t){if(t){if(typeof t!="function")throw new Error("Logger callback must be a function")}else t=null;return this.logCallback=t,this}getLogger(){return this.logCallback}}class Tree{static{s(this,"Tree")}constructor(t,r,n,i){assertInternal(t),this[0]=r,this.language=n,this.textCallback=i}copy(){let t=C._ts_tree_copy(this[0]);return new Tree(INTERNAL,t,this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}edit(t){marshalEdit(t),C._ts_tree_edit_wasm(this[0])}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}getLanguage(){return this.language}walk(){return this.rootNode.walk()}getChangedRanges(t){if(t.constructor!==Tree)throw new TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],t[0]);let r=getValue(TRANSFER_BUFFER,"i32"),n=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),i=new Array(r);if(r>0){let o=n;for(let a=0;a<r;a++)i[a]=unmarshalRange(o),o+=SIZE_OF_RANGE;C._free(n)}return i}}class Node{static{s(this,"Node")}constructor(t,r){assertInternal(t),this.tree=r}get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get text(){return getText(this.tree,this.startIndex,this.endIndex)}isNamed(){return marshalNode(this),C._ts_node_is_named_wasm(this.tree[0])===1}hasError(){return marshalNode(this),C._ts_node_has_error_wasm(this.tree[0])===1}hasChanges(){return marshalNode(this),C._ts_node_has_changes_wasm(this.tree[0])===1}isMissing(){return marshalNode(this),C._ts_node_is_missing_wasm(this.tree[0])===1}equals(t){return this.id===t.id}child(t){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],t),unmarshalNode(this.tree)}namedChild(t){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],t),unmarshalNode(this.tree)}childForFieldId(t){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],t),unmarshalNode(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);if(r!==-1)return this.childForFieldId(r)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=new Array(t),t>0){let n=r;for(let i=0;i<t;i++)this._children[i]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(r)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=new Array(t),t>0){let n=r;for(let i=0;i<t;i++)this._namedChildren[i]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(r)}}return this._namedChildren}descendantsOfType(t,r,n){Array.isArray(t)||(t=[t]),r||(r=ZERO_POINT),n||(n=ZERO_POINT);let i=[],o=this.tree.language.types;for(let f=0,m=o.length;f<m;f++)t.includes(o[f])&&i.push(f);let a=C._malloc(SIZE_OF_INT*i.length);for(let f=0,m=i.length;f<m;f++)setValue(a+f*SIZE_OF_INT,i[f],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],a,i.length,r.row,r.column,n.row,n.column);let l=getValue(TRANSFER_BUFFER,"i32"),c=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),u=new Array(l);if(l>0){let f=c;for(let m=0;m<l;m++)u[m]=unmarshalNode(this.tree,f),f+=SIZE_OF_NODE}return C._free(c),C._free(a),u}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(n,t,"i32"),setValue(n+SIZE_OF_INT,r,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(n,t,"i32"),setValue(n+SIZE_OF_INT,r,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(t,r=t){if(!isPoint(t)||!isPoint(r))throw new Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,t),marshalPoint(n+SIZE_OF_POINT,r),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(t,r=t){if(!isPoint(t)||!isPoint(r))throw new Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,t),marshalPoint(n+SIZE_OF_POINT,r),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}toString(){marshalNode(this);let t=C._ts_node_to_string_wasm(this.tree[0]),r=AsciiToString(t);return C._free(t),r}}class TreeCursor{static{s(this,"TreeCursor")}constructor(t,r){assertInternal(t),this.tree=r,unmarshalTreeCursor(this)}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(t){marshalNode(t),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){marshalTreeCursor(this);let t=C._ts_tree_cursor_start_index_wasm(this.tree[0]),r=C._ts_tree_cursor_end_index_wasm(this.tree[0]);return getText(this.tree,t,r)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}gotoNextSibling(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}gotoParent(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}}class Language{static{s(this,"Language")}constructor(t,r){assertInternal(t),this[0]=r,this.types=new Array(C._ts_language_symbol_count(this[0]));for(let n=0,i=this.types.length;n<i;n++)C._ts_language_symbol_type(this[0],n)<2&&(this.types[n]=UTF8ToString(C._ts_language_symbol_name(this[0],n)));this.fields=new Array(C._ts_language_field_count(this[0])+1);for(let n=0,i=this.fields.length;n<i;n++){let o=C._ts_language_field_name_for_id(this[0],n);this.fields[n]=o!==0?UTF8ToString(o):null}}get version(){return C._ts_language_version(this[0])}get fieldCount(){return this.fields.length-1}fieldIdForName(t){let r=this.fields.indexOf(t);return r!==-1?r:null}fieldNameForId(t){return this.fields[t]||null}idForNodeType(t,r){let n=lengthBytesUTF8(t),i=C._malloc(n+1);stringToUTF8(t,i,n+1);let o=C._ts_language_symbol_for_name(this[0],i,n,r);return C._free(i),o||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=C._ts_language_symbol_name(this[0],t);return r?UTF8ToString(r):null}nodeTypeIsNamed(t){return!!C._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!C._ts_language_type_is_visible_wasm(this[0],t)}query(t){let r=lengthBytesUTF8(t),n=C._malloc(r+1);stringToUTF8(t,n,r+1);let i=C._ts_query_new(this[0],n,r,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!i){let y=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),x=UTF8ToString(n,getValue(TRANSFER_BUFFER,"i32")).length,b=t.substr(x,100).split(`
`)[0],E,_=b.match(QUERY_WORD_REGEX)[0];switch(y){case 2:E=new RangeError(`Bad node name '${_}'`);break;case 3:E=new RangeError(`Bad field name '${_}'`);break;case 4:E=new RangeError(`Bad capture name @${_}`);break;case 5:E=new TypeError(`Bad pattern structure at offset ${x}: '${b}'...`),_="";break;default:E=new SyntaxError(`Bad syntax at offset ${x}: '${b}'...`),_=""}throw E.index=x,E.length=_.length,C._free(n),E}let o=C._ts_query_string_count(i),a=C._ts_query_capture_count(i),l=C._ts_query_pattern_count(i),c=new Array(a),u=new Array(o);for(let y=0;y<a;y++){let x=C._ts_query_capture_name_for_id(i,y,TRANSFER_BUFFER),b=getValue(TRANSFER_BUFFER,"i32");c[y]=UTF8ToString(x,b)}for(let y=0;y<o;y++){let x=C._ts_query_string_value_for_id(i,y,TRANSFER_BUFFER),b=getValue(TRANSFER_BUFFER,"i32");u[y]=UTF8ToString(x,b)}let f=new Array(l),m=new Array(l),h=new Array(l),p=new Array(l),g=new Array(l);for(let y=0;y<l;y++){let x=C._ts_query_predicates_for_pattern(i,y,TRANSFER_BUFFER),b=getValue(TRANSFER_BUFFER,"i32");p[y]=[],g[y]=[];let E=[],_=x;for(let k=0;k<b;k++){let B=getValue(_,"i32");_+=SIZE_OF_INT;let N=getValue(_,"i32");if(_+=SIZE_OF_INT,B===PREDICATE_STEP_TYPE_CAPTURE)E.push({type:"capture",name:c[N]});else if(B===PREDICATE_STEP_TYPE_STRING)E.push({type:"string",value:u[N]});else if(E.length>0){if(E[0].type!=="string")throw new Error("Predicates must begin with a literal value");let M=E[0].value,Z=!0;switch(M){case"not-eq?":Z=!1;case"eq?":if(E.length!==3)throw new Error("Wrong number of arguments to `#eq?` predicate. Expected 2, got "+(E.length-1));if(E[1].type!=="capture")throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${E[1].value}"`);if(E[2].type==="capture"){let q=E[1].name,ie=E[2].name;g[y].push(function(z){let j,U;for(let V of z)V.name===q&&(j=V.node),V.name===ie&&(U=V.node);return j===void 0||U===void 0||j.text===U.text===Z})}else{let q=E[1].name,ie=E[2].value;g[y].push(function(z){for(let j of z)if(j.name===q)return j.node.text===ie===Z;return!0})}break;case"not-match?":Z=!1;case"match?":if(E.length!==3)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${E.length-1}.`);if(E[1].type!=="capture")throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${E[1].value}".`);if(E[2].type!=="string")throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${E[2].value}.`);let he=E[1].name,ee=new RegExp(E[2].value);g[y].push(function(q){for(let ie of q)if(ie.name===he)return ee.test(ie.node.text)===Z;return!0});break;case"set!":if(E.length<2||E.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${E.length-1}.`);if(E.some(q=>q.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');f[y]||(f[y]={}),f[y][E[1].value]=E[2]?E[2].value:null;break;case"is?":case"is-not?":if(E.length<2||E.length>3)throw new Error(`Wrong number of arguments to \`#${M}\` predicate. Expected 1 or 2. Got ${E.length-1}.`);if(E.some(q=>q.type!=="string"))throw new Error(`Arguments to \`#${M}\` predicate must be a strings.".`);let G=M==="is?"?m:h;G[y]||(G[y]={}),G[y][E[1].value]=E[2]?E[2].value:null;break;default:p[y].push({operator:M,operands:E.slice(1)})}E.length=0}}Object.freeze(f[y]),Object.freeze(m[y]),Object.freeze(h[y])}return C._free(n),new Query(INTERNAL,i,c,g,p,Object.freeze(f),Object.freeze(m),Object.freeze(h))}static load(t){let r;if(t instanceof Uint8Array)r=Promise.resolve(t);else{let i=t;if(typeof process<"u"&&process.versions&&process.versions.node){let o=require("fs");r=Promise.resolve(o.readFileSync(i))}else r=fetch(i).then(o=>o.arrayBuffer().then(a=>{if(o.ok)return new Uint8Array(a);{let l=new TextDecoder("utf-8").decode(a);throw new Error(`Language.load failed with status ${o.status}.
${l}`)}}))}let n=typeof loadSideModule=="function"?loadSideModule:loadWebAssemblyModule;return r.then(i=>n(i,{loadAsync:!0})).then(i=>{let o=Object.keys(i),a=o.find(c=>LANGUAGE_FUNCTION_REGEX.test(c)&&!c.includes("external_scanner_"));a||console.log(`Couldn't find language function in WASM file. Symbols:
${JSON.stringify(o,null,2)}`);let l=i[a]();return new Language(INTERNAL,l)})}}class Query{static{s(this,"Query")}constructor(t,r,n,i,o,a,l,c){assertInternal(t),this[0]=r,this.captureNames=n,this.textPredicates=i,this.predicates=o,this.setProperties=a,this.assertedProperties=l,this.refutedProperties=c,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(t,r,n,i){r||(r=ZERO_POINT),n||(n=ZERO_POINT),i||(i={});let o=i.matchLimit;if(o===void 0)o=0;else if(typeof o!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_matches_wasm(this[0],t.tree[0],r.row,r.column,n.row,n.column,o);let a=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),u=new Array(a);this.exceededMatchLimit=!!c;let f=0,m=l;for(let h=0;h<a;h++){let p=getValue(m,"i32");m+=SIZE_OF_INT;let g=getValue(m,"i32");m+=SIZE_OF_INT;let y=new Array(g);if(m=unmarshalCaptures(this,t.tree,m,y),this.textPredicates[p].every(x=>x(y))){u[f++]={pattern:p,captures:y};let x=this.setProperties[p];x&&(u[h].setProperties=x);let b=this.assertedProperties[p];b&&(u[h].assertedProperties=b);let E=this.refutedProperties[p];E&&(u[h].refutedProperties=E)}}return u.length=f,C._free(l),u}captures(t,r,n,i){r||(r=ZERO_POINT),n||(n=ZERO_POINT),i||(i={});let o=i.matchLimit;if(o===void 0)o=0;else if(typeof o!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_captures_wasm(this[0],t.tree[0],r.row,r.column,n.row,n.column,o);let a=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),u=[];this.exceededMatchLimit=!!c;let f=[],m=l;for(let h=0;h<a;h++){let p=getValue(m,"i32");m+=SIZE_OF_INT;let g=getValue(m,"i32");m+=SIZE_OF_INT;let y=getValue(m,"i32");if(m+=SIZE_OF_INT,f.length=g,m=unmarshalCaptures(this,t.tree,m,f),this.textPredicates[p].every(x=>x(f))){let x=f[y],b=this.setProperties[p];b&&(x.setProperties=b);let E=this.assertedProperties[p];E&&(x.assertedProperties=E);let _=this.refutedProperties[p];_&&(x.refutedProperties=_),u.push(x)}}return C._free(l),u}predicatesForPattern(t){return this.predicates[t]}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(e,t,r){let n=r-t,i=e.textCallback(t,null,r);for(t+=i.length;t<r;){let o=e.textCallback(t,null,r);if(!(o&&o.length>0))break;t+=o.length,i+=o}return t>r&&(i=i.slice(0,n)),i}s(getText,"getText");function unmarshalCaptures(e,t,r,n){for(let i=0,o=n.length;i<o;i++){let a=getValue(r,"i32"),l=unmarshalNode(t,r+=SIZE_OF_INT);r+=SIZE_OF_NODE,n[i]={name:e.captureNames[a],node:l}}return r}s(unmarshalCaptures,"unmarshalCaptures");function assertInternal(e){if(e!==INTERNAL)throw new Error("Illegal constructor")}s(assertInternal,"assertInternal");function isPoint(e){return e&&typeof e.row=="number"&&typeof e.column=="number"}s(isPoint,"isPoint");function marshalNode(e){let t=TRANSFER_BUFFER;setValue(t,e.id,"i32"),t+=SIZE_OF_INT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.row,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.column,"i32"),t+=SIZE_OF_INT,setValue(t,e[0],"i32")}s(marshalNode,"marshalNode");function unmarshalNode(e,t=TRANSFER_BUFFER){let r=getValue(t,"i32");if(r===0)return null;let n=getValue(t+=SIZE_OF_INT,"i32"),i=getValue(t+=SIZE_OF_INT,"i32"),o=getValue(t+=SIZE_OF_INT,"i32"),a=getValue(t+=SIZE_OF_INT,"i32"),l=new Node(INTERNAL,e);return l.id=r,l.startIndex=n,l.startPosition={row:i,column:o},l[0]=a,l}s(unmarshalNode,"unmarshalNode");function marshalTreeCursor(e,t=TRANSFER_BUFFER){setValue(t+0*SIZE_OF_INT,e[0],"i32"),setValue(t+1*SIZE_OF_INT,e[1],"i32"),setValue(t+2*SIZE_OF_INT,e[2],"i32")}s(marshalTreeCursor,"marshalTreeCursor");function unmarshalTreeCursor(e){e[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),e[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),e[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32")}s(unmarshalTreeCursor,"unmarshalTreeCursor");function marshalPoint(e,t){setValue(e,t.row,"i32"),setValue(e+SIZE_OF_INT,t.column,"i32")}s(marshalPoint,"marshalPoint");function unmarshalPoint(e){return{row:getValue(e,"i32"),column:getValue(e+SIZE_OF_INT,"i32")}}s(unmarshalPoint,"unmarshalPoint");function marshalRange(e,t){marshalPoint(e,t.startPosition),marshalPoint(e+=SIZE_OF_POINT,t.endPosition),setValue(e+=SIZE_OF_POINT,t.startIndex,"i32"),setValue(e+=SIZE_OF_INT,t.endIndex,"i32"),e+=SIZE_OF_INT}s(marshalRange,"marshalRange");function unmarshalRange(e){let t={};return t.startPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.endPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.startIndex=getValue(e,"i32"),e+=SIZE_OF_INT,t.endIndex=getValue(e,"i32"),t}s(unmarshalRange,"unmarshalRange");function marshalEdit(e){let t=TRANSFER_BUFFER;marshalPoint(t,e.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.oldEndPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.newEndPosition),t+=SIZE_OF_POINT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.oldEndIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.newEndIndex,"i32"),t+=SIZE_OF_INT}s(marshalEdit,"marshalEdit");for(let e of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,e,{value:ParserImpl.prototype[e],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return Parser}();typeof exports=="object"&&(module.exports=TreeSitter)});var dte=H((zvr,lbe)=>{d();var fte=require("fs"),QM=require("path"),rS=QM.join,Tut=QM.dirname,sbe=fte.accessSync&&function(e){try{fte.accessSync(e)}catch{return!1}return!0}||fte.existsSync||QM.existsSync,abe={arrow:process.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","compiled","platform","arch","bindings"]]};function wut(e){typeof e=="string"?e={bindings:e}:e||(e={}),Object.keys(abe).map(function(c){c in e||(e[c]=abe[c])}),e.module_root||(e.module_root=_ut(__filename)),QM.extname(e.bindings)!=".node"&&(e.bindings+=".node");for(var t=typeof __webpack_require__=="function"?__non_webpack_require__:require,r=[],n=0,i=e.try.length,o,a,l;n<i;n++){o=rS.apply(null,e.try[n].map(function(c){return e[c]||c})),r.push(o);try{return a=e.path?t.resolve(o):t(o),e.path||(a.path=o),a}catch(c){if(c.code!=="MODULE_NOT_FOUND"&&c.code!=="QUALIFIED_PATH_RESOLUTION_FAILED"&&!/not find/i.test(c.message))throw c}}throw l=new Error(`Could not locate the bindings file. Tried:
`+r.map(function(c){return e.arrow+c}).join(`
`)),l.tries=r,l}s(wut,"bindings");lbe.exports=wut;function _ut(e){for(var t=Tut(e),r;;){if(t==="."&&(t=process.cwd()),sbe(rS(t,"dist")))return rS(t,"dist");if(sbe(rS(t,"compiled")))return t;if(r===t)throw new Error('Could not find module root given file: "'+e+'". Do you have a `dist` or `compiled` directory? ');r=t,t=rS(t,"..")}}s(_ut,"getRoot")});var ube=H((Jvr,cbe)=>{d();cbe.exports=dte()("node_sqlite3.node")});var mbe=H(dbe=>{d();var Sut=require("util");function Rut(e,t,r){let n=e[t];e[t]=function(){let i=new Error,o=e.constructor.name+"#"+t+"("+Array.prototype.slice.call(arguments).map(function(l){return Sut.inspect(l,!1,0)}).join(", ")+")";typeof r>"u"&&(r=-1),r<0&&(r+=arguments.length);let a=arguments[r];return typeof arguments[r]=="function"&&(arguments[r]=s(function(){let c=arguments[0];return c&&c.stack&&!c.__augmented&&(c.stack=fbe(c).join(`
`),c.stack+=`
--> in `+o,c.stack+=`
`+fbe(i).slice(1).join(`
`),c.__augmented=!0),a.apply(this,arguments)},"replacement")),n.apply(this,arguments)}}s(Rut,"extendTrace");dbe.extendTrace=Rut;function fbe(e){return e.stack.split(`
`).filter(function(t){return t.indexOf(__filename)<0})}s(fbe,"filter")});var Abe=H((pbe,gbe)=>{d();var kut=require("path"),Nd=ube(),I8=require("events").EventEmitter;gbe.exports=pbe=Nd;function T8(e){return function(t){let r,n=Array.prototype.slice.call(arguments,1);if(typeof n[n.length-1]=="function"){let o=n[n.length-1];r=s(function(a){a&&o(a)},"errBack")}let i=new OM(this,t,r);return e.call(this,i,n)}}s(T8,"normalizeMethod");function hte(e,t){for(let r in t.prototype)e.prototype[r]=t.prototype[r]}s(hte,"inherits");Nd.cached={Database:s(function(e,t,r){if(e===""||e===":memory:")return new C0(e,t,r);let n;if(e=kut.resolve(e),!Nd.cached.objects[e])n=Nd.cached.objects[e]=new C0(e,t,r);else{n=Nd.cached.objects[e];let o=typeof t=="number"?r:t;if(typeof o=="function"){let a=function(){o.call(n,null)};var i=a;s(a,"cb"),n.open?process.nextTick(a):n.once("open",a)}}return n},"Database"),objects:{}};var C0=Nd.Database,OM=Nd.Statement,mte=Nd.Backup;hte(C0,I8);hte(OM,I8);hte(mte,I8);C0.prototype.prepare=T8(function(e,t){return t.length?e.bind.apply(e,t):e});C0.prototype.run=T8(function(e,t){return e.run.apply(e,t).finalize(),this});C0.prototype.get=T8(function(e,t){return e.get.apply(e,t).finalize(),this});C0.prototype.all=T8(function(e,t){return e.all.apply(e,t).finalize(),this});C0.prototype.each=T8(function(e,t){return e.each.apply(e,t).finalize(),this});C0.prototype.map=T8(function(e,t){return e.map.apply(e,t).finalize(),this});C0.prototype.backup=function(){let e;return arguments.length<=2?e=new mte(this,arguments[0],"main","main",!0,arguments[1]):e=new mte(this,arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),e.retryErrors=[Nd.BUSY,Nd.LOCKED],e};OM.prototype.map=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push(function(r,n){if(r)return t(r);let i={};if(n.length){let o=Object.keys(n[0]),a=o[0];if(o.length>2)for(let l=0;l<n.length;l++)i[n[l][a]]=n[l];else{let l=o[1];for(let c=0;c<n.length;c++)i[n[c][a]]=n[c][l]}}t(r,i)}),this.all.apply(this,e)};var hbe=!1,pte=["trace","profile","change"];C0.prototype.addListener=C0.prototype.on=function(e){let t=I8.prototype.addListener.apply(this,arguments);return pte.indexOf(e)>=0&&this.configure(e,!0),t};C0.prototype.removeListener=function(e){let t=I8.prototype.removeListener.apply(this,arguments);return pte.indexOf(e)>=0&&!this._events[e]&&this.configure(e,!1),t};C0.prototype.removeAllListeners=function(e){let t=I8.prototype.removeAllListeners.apply(this,arguments);return pte.indexOf(e)>=0&&this.configure(e,!1),t};Nd.verbose=function(){if(!hbe){let e=mbe();["prepare","get","run","all","each","map","close","exec"].forEach(function(t){e.extendTrace(C0.prototype,t)}),["bind","get","run","all","each","map","reset","finalize"].forEach(function(t){e.extendTrace(OM.prototype,t)}),hbe=!0}return Nd}});var XM=H(za=>{"use strict";d();Object.defineProperty(za,"__esModule",{value:!0});za.thenable=za.typedArray=za.stringArray=za.array=za.func=za.error=za.number=za.string=za.boolean=void 0;function Dut(e){return e===!0||e===!1}s(Dut,"boolean");za.boolean=Dut;function bbe(e){return typeof e=="string"||e instanceof String}s(bbe,"string");za.string=bbe;function Put(e){return typeof e=="number"||e instanceof Number}s(Put,"number");za.number=Put;function Nut(e){return e instanceof Error}s(Nut,"error");za.error=Nut;function Ebe(e){return typeof e=="function"}s(Ebe,"func");za.func=Ebe;function Ibe(e){return Array.isArray(e)}s(Ibe,"array");za.array=Ibe;function Lut(e){return Ibe(e)&&e.every(t=>bbe(t))}s(Lut,"stringArray");za.stringArray=Lut;function Fut(e,t){return Array.isArray(e)&&e.every(t)}s(Fut,"typedArray");za.typedArray=Fut;function Mut(e){return e&&Ebe(e.then)}s(Mut,"thenable");za.thenable=Mut});var yte=H(Ld=>{"use strict";d();Object.defineProperty(Ld,"__esModule",{value:!0});Ld.generateUuid=Ld.parse=Ld.isUUID=Ld.v4=Ld.empty=void 0;var oS=class{static{s(this,"ValueUUID")}constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},sS=class e extends oS{static{s(this,"V4UUID")}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};sS._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];sS._timeHighBits=["8","9","a","b"];Ld.empty=new oS("00000000-0000-0000-0000-000000000000");function Tbe(){return new sS}s(Tbe,"v4");Ld.v4=Tbe;var Qut=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function wbe(e){return Qut.test(e)}s(wbe,"isUUID");Ld.isUUID=wbe;function Out(e){if(!wbe(e))throw new Error("invalid uuid");return new oS(e)}s(Out,"parse");Ld.parse=Out;function Uut(){return Tbe().asHex()}s(Uut,"generateUuid");Ld.generateUuid=Uut});var _be=H(M5=>{"use strict";d();Object.defineProperty(M5,"__esModule",{value:!0});M5.attachPartialResult=M5.ProgressFeature=M5.attachWorkDone=void 0;var F5=ii(),qut=yte(),gv=class e{static{s(this,"WorkDoneProgressReporterImpl")}constructor(t,r){this._connection=t,this._token=r,e.Instances.set(this._token,this)}begin(t,r,n,i){let o={kind:"begin",title:t,percentage:r,message:n,cancellable:i};this._connection.sendProgress(F5.WorkDoneProgress.type,this._token,o)}report(t,r){let n={kind:"report"};typeof t=="number"?(n.percentage=t,r!==void 0&&(n.message=r)):n.message=t,this._connection.sendProgress(F5.WorkDoneProgress.type,this._token,n)}done(){e.Instances.delete(this._token),this._connection.sendProgress(F5.WorkDoneProgress.type,this._token,{kind:"end"})}};gv.Instances=new Map;var ZM=class extends gv{static{s(this,"WorkDoneProgressServerReporterImpl")}constructor(t,r){super(t,r),this._source=new F5.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},aS=class{static{s(this,"NullProgressReporter")}constructor(){}begin(){}report(){}done(){}},eQ=class extends aS{static{s(this,"NullProgressServerReporter")}constructor(){super(),this._source=new F5.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Wut(e,t){if(t===void 0||t.workDoneToken===void 0)return new aS;let r=t.workDoneToken;return delete t.workDoneToken,new gv(e,r)}s(Wut,"attachWorkDone");M5.attachWorkDone=Wut;var Gut=s(e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(F5.WorkDoneProgressCancelNotification.type,r=>{let n=gv.Instances.get(r.token);(n instanceof ZM||n instanceof eQ)&&n.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new aS:new gv(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,qut.generateUuid)();return this.connection.sendRequest(F5.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new ZM(this.connection,t))}else return Promise.resolve(new eQ)}},"ProgressFeature");M5.ProgressFeature=Gut;var Cte;(function(e){e.type=new F5.ProgressType})(Cte||(Cte={}));var xte=class{static{s(this,"ResultProgressReporterImpl")}constructor(t,r){this._connection=t,this._token=r}report(t){this._connection.sendProgress(Cte.type,this._token,t)}};function Hut(e,t){if(t===void 0||t.partialResultToken===void 0)return;let r=t.partialResultToken;return delete t.partialResultToken,new xte(e,r)}s(Hut,"attachPartialResult");M5.attachPartialResult=Hut});var Sbe=H(tQ=>{"use strict";d();Object.defineProperty(tQ,"__esModule",{value:!0});tQ.ConfigurationFeature=void 0;var jut=ii(),Vut=XM(),$ut=s(e=>class extends e{getConfiguration(t){return t?Vut.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let r={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(jut.ConfigurationRequest.type,r).then(n=>Array.isArray(n)?Array.isArray(t)?n:n[0]:Array.isArray(t)?[]:null)}},"ConfigurationFeature");tQ.ConfigurationFeature=$ut});var Rbe=H(nQ=>{"use strict";d();Object.defineProperty(nQ,"__esModule",{value:!0});nQ.WorkspaceFoldersFeature=void 0;var rQ=ii(),zut=s(e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let r=t.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new rQ.Emitter,this.connection.onNotification(rQ.DidChangeWorkspaceFoldersNotification.type,n=>{this._onDidChangeWorkspaceFolders.fire(n.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let r=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=r===!0||typeof r=="string"}getWorkspaceFolders(){return this.connection.sendRequest(rQ.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(rQ.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}},"WorkspaceFoldersFeature");nQ.WorkspaceFoldersFeature=zut});var kbe=H(iQ=>{"use strict";d();Object.defineProperty(iQ,"__esModule",{value:!0});iQ.CallHierarchyFeature=void 0;var vte=ii(),Yut=s(e=>class extends e{get callHierarchy(){return{onPrepare:s(t=>this.connection.onRequest(vte.CallHierarchyPrepareRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r),void 0)),"onPrepare"),onIncomingCalls:s(t=>{let r=vte.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onIncomingCalls"),onOutgoingCalls:s(t=>{let r=vte.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onOutgoingCalls")}}},"CallHierarchyFeature");iQ.CallHierarchyFeature=Yut});var Ete=H(Q5=>{"use strict";d();Object.defineProperty(Q5,"__esModule",{value:!0});Q5.SemanticTokensBuilder=Q5.SemanticTokensDiff=Q5.SemanticTokensFeature=void 0;var oQ=ii(),Kut=s(e=>class extends e{get semanticTokens(){return{refresh:s(()=>this.connection.sendRequest(oQ.SemanticTokensRefreshRequest.type),"refresh"),on:s(t=>{let r=oQ.SemanticTokensRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on"),onDelta:s(t=>{let r=oQ.SemanticTokensDeltaRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onDelta"),onRange:s(t=>{let r=oQ.SemanticTokensRangeRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onRange")}}},"SemanticTokensFeature");Q5.SemanticTokensFeature=Kut;var sQ=class{static{s(this,"SemanticTokensDiff")}constructor(t,r){this.originalSequence=t,this.modifiedSequence=r}computeDiff(){let t=this.originalSequence.length,r=this.modifiedSequence.length,n=0;for(;n<r&&n<t&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<r&&n<t){let i=t-1,o=r-1;for(;i>=n&&o>=n&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<n||o<n)&&(i++,o++);let a=i-n+1,l=this.modifiedSequence.slice(n,o+1);return l.length===1&&l[0]===this.originalSequence[i]?[{start:n,deleteCount:a-1}]:[{start:n,deleteCount:a,data:l}]}else return n<r?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<t?[{start:n,deleteCount:t-n}]:[]}};Q5.SemanticTokensDiff=sQ;var bte=class{static{s(this,"SemanticTokensBuilder")}constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(t,r,n,i,o){let a=t,l=r;this._dataLen>0&&(a-=this._prevLine,a===0&&(l-=this._prevChar)),this._data[this._dataLen++]=a,this._data[this._dataLen++]=l,this._data[this._dataLen++]=n,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=t,this._prevChar=r}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new sQ(this._prevData,this._data).computeDiff()}:this.build()}};Q5.SemanticTokensBuilder=bte});var Bbe=H(aQ=>{"use strict";d();Object.defineProperty(aQ,"__esModule",{value:!0});aQ.ShowDocumentFeature=void 0;var Jut=ii(),Xut=s(e=>class extends e{showDocument(t){return this.connection.sendRequest(Jut.ShowDocumentRequest.type,t)}},"ShowDocumentFeature");aQ.ShowDocumentFeature=Xut});var Dbe=H(lQ=>{"use strict";d();Object.defineProperty(lQ,"__esModule",{value:!0});lQ.FileOperationsFeature=void 0;var _8=ii(),Zut=s(e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(_8.DidCreateFilesNotification.type,r=>{t(r)})}onDidRenameFiles(t){return this.connection.onNotification(_8.DidRenameFilesNotification.type,r=>{t(r)})}onDidDeleteFiles(t){return this.connection.onNotification(_8.DidDeleteFilesNotification.type,r=>{t(r)})}onWillCreateFiles(t){return this.connection.onRequest(_8.WillCreateFilesRequest.type,(r,n)=>t(r,n))}onWillRenameFiles(t){return this.connection.onRequest(_8.WillRenameFilesRequest.type,(r,n)=>t(r,n))}onWillDeleteFiles(t){return this.connection.onRequest(_8.WillDeleteFilesRequest.type,(r,n)=>t(r,n))}},"FileOperationsFeature");lQ.FileOperationsFeature=Zut});var Pbe=H(cQ=>{"use strict";d();Object.defineProperty(cQ,"__esModule",{value:!0});cQ.LinkedEditingRangeFeature=void 0;var eft=ii(),tft=s(e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(eft.LinkedEditingRangeRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r),void 0))}},"LinkedEditingRangeFeature");cQ.LinkedEditingRangeFeature=tft});var Nbe=H(uQ=>{"use strict";d();Object.defineProperty(uQ,"__esModule",{value:!0});uQ.TypeHierarchyFeature=void 0;var Ite=ii(),rft=s(e=>class extends e{get typeHierarchy(){return{onPrepare:s(t=>this.connection.onRequest(Ite.TypeHierarchyPrepareRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r),void 0)),"onPrepare"),onSupertypes:s(t=>{let r=Ite.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onSupertypes"),onSubtypes:s(t=>{let r=Ite.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onSubtypes")}}},"TypeHierarchyFeature");uQ.TypeHierarchyFeature=rft});var Fbe=H(fQ=>{"use strict";d();Object.defineProperty(fQ,"__esModule",{value:!0});fQ.InlineValueFeature=void 0;var Lbe=ii(),nft=s(e=>class extends e{get inlineValue(){return{refresh:s(()=>this.connection.sendRequest(Lbe.InlineValueRefreshRequest.type),"refresh"),on:s(t=>this.connection.onRequest(Lbe.InlineValueRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r))),"on")}}},"InlineValueFeature");fQ.InlineValueFeature=nft});var Qbe=H(dQ=>{"use strict";d();Object.defineProperty(dQ,"__esModule",{value:!0});dQ.FoldingRangeFeature=void 0;var Mbe=ii(),ift=s(e=>class extends e{get foldingRange(){return{refresh:s(()=>this.connection.sendRequest(Mbe.FoldingRangeRefreshRequest.type),"refresh"),on:s(t=>{let r=Mbe.FoldingRangeRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on")}}},"FoldingRangeFeature");dQ.FoldingRangeFeature=ift});var Obe=H(mQ=>{"use strict";d();Object.defineProperty(mQ,"__esModule",{value:!0});mQ.InlayHintFeature=void 0;var Tte=ii(),oft=s(e=>class extends e{get inlayHint(){return{refresh:s(()=>this.connection.sendRequest(Tte.InlayHintRefreshRequest.type),"refresh"),on:s(t=>this.connection.onRequest(Tte.InlayHintRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r))),"on"),resolve:s(t=>this.connection.onRequest(Tte.InlayHintResolveRequest.type,(r,n)=>t(r,n)),"resolve")}}},"InlayHintFeature");mQ.InlayHintFeature=oft});var Ube=H(hQ=>{"use strict";d();Object.defineProperty(hQ,"__esModule",{value:!0});hQ.DiagnosticFeature=void 0;var lS=ii(),sft=s(e=>class extends e{get diagnostics(){return{refresh:s(()=>this.connection.sendRequest(lS.DiagnosticRefreshRequest.type),"refresh"),on:s(t=>this.connection.onRequest(lS.DocumentDiagnosticRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(lS.DocumentDiagnosticRequest.partialResult,r))),"on"),onWorkspace:s(t=>this.connection.onRequest(lS.WorkspaceDiagnosticRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(lS.WorkspaceDiagnosticRequest.partialResult,r))),"onWorkspace")}}},"DiagnosticFeature");hQ.DiagnosticFeature=sft});var _te=H(pQ=>{"use strict";d();Object.defineProperty(pQ,"__esModule",{value:!0});pQ.TextDocuments=void 0;var Av=ii(),wte=class{static{s(this,"TextDocuments")}constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Av.Emitter,this._onDidOpen=new Av.Emitter,this._onDidClose=new Av.Emitter,this._onDidSave=new Av.Emitter,this._onWillSave=new Av.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Av.TextDocumentSyncKind.Incremental;let r=[];return r.push(t.onDidOpenTextDocument(n=>{let i=n.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let a=Object.freeze({document:o});this._onDidOpen.fire(a),this._onDidChangeContent.fire(a)})),r.push(t.onDidChangeTextDocument(n=>{let i=n.textDocument,o=n.contentChanges;if(o.length===0)return;let{version:a}=i;if(a==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let l=this._syncedDocuments.get(i.uri);l!==void 0&&(l=this._configuration.update(l,o,a),this._syncedDocuments.set(i.uri,l),this._onDidChangeContent.fire(Object.freeze({document:l})))})),r.push(t.onDidCloseTextDocument(n=>{let i=this._syncedDocuments.get(n.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(n.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),r.push(t.onWillSaveTextDocument(n=>{let i=this._syncedDocuments.get(n.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:n.reason}))})),r.push(t.onWillSaveTextDocumentWaitUntil((n,i)=>{let o=this._syncedDocuments.get(n.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:n.reason}),i):[]})),r.push(t.onDidSaveTextDocument(n=>{let i=this._syncedDocuments.get(n.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Av.Disposable.create(()=>{r.forEach(n=>n.dispose())})}};pQ.TextDocuments=wte});var Rte=H(S8=>{"use strict";d();Object.defineProperty(S8,"__esModule",{value:!0});S8.NotebookDocuments=S8.NotebookSyncFeature=void 0;var Fd=ii(),qbe=_te(),aft=s(e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:s(t=>this.connection.onNotification(Fd.DidOpenNotebookDocumentNotification.type,r=>{t(r)}),"onDidOpenNotebookDocument"),onDidChangeNotebookDocument:s(t=>this.connection.onNotification(Fd.DidChangeNotebookDocumentNotification.type,r=>{t(r)}),"onDidChangeNotebookDocument"),onDidSaveNotebookDocument:s(t=>this.connection.onNotification(Fd.DidSaveNotebookDocumentNotification.type,r=>{t(r)}),"onDidSaveNotebookDocument"),onDidCloseNotebookDocument:s(t=>this.connection.onNotification(Fd.DidCloseNotebookDocumentNotification.type,r=>{t(r)}),"onDidCloseNotebookDocument")}}},"NotebookSyncFeature");S8.NotebookSyncFeature=aft;var gQ=class e{static{s(this,"CellTextDocumentConnection")}onDidOpenTextDocument(t){return this.openHandler=t,Fd.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,Fd.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,Fd.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};gQ.NULL_DISPOSE=Object.freeze({dispose:s(()=>{},"dispose")});var Ste=class{static{s(this,"NotebookDocuments")}constructor(t){t instanceof qbe.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new qbe.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Fd.Emitter,this._onDidChange=new Fd.Emitter,this._onDidSave=new Fd.Emitter,this._onDidClose=new Fd.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let r=this.notebookCellMap.get(t);return r&&r[0]}findNotebookDocumentForCell(t){let r=typeof t=="string"?t:t.document,n=this.notebookCellMap.get(r);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let r=new gQ,n=[];return n.push(this.cellTextDocuments.listen(r)),n.push(t.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)r.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),n.push(t.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let a=o.metadata,l=!1,c=i.change;c.metadata!==void 0&&(l=!0,o.metadata=c.metadata);let u=[],f=[],m=[],h=[];if(c.cells!==void 0){let b=c.cells;if(b.structure!==void 0){let E=b.structure.array;if(o.cells.splice(E.start,E.deleteCount,...E.cells!==void 0?E.cells:[]),b.structure.didOpen!==void 0)for(let _ of b.structure.didOpen)r.openTextDocument({textDocument:_}),u.push(_.uri);if(b.structure.didClose)for(let _ of b.structure.didClose)r.closeTextDocument({textDocument:_}),f.push(_.uri)}if(b.data!==void 0){let E=new Map(b.data.map(_=>[_.document,_]));for(let _=0;_<=o.cells.length;_++){let k=E.get(o.cells[_].document);if(k!==void 0){let B=o.cells.splice(_,1,k);if(m.push({old:B[0],new:k}),E.delete(k.document),E.size===0)break}}}if(b.textContent!==void 0)for(let E of b.textContent)r.changeTextDocument({textDocument:E.document,contentChanges:E.changes}),h.push(E.document.uri)}this.updateCellMap(o);let p={notebookDocument:o};l&&(p.metadata={old:a,new:o.metadata});let g=[];for(let b of u)g.push(this.getNotebookCell(b));let y=[];for(let b of f)y.push(this.getNotebookCell(b));let x=[];for(let b of h)x.push(this.getNotebookCell(b));(g.length>0||y.length>0||m.length>0||x.length>0)&&(p.cells={added:g,removed:y,changed:{data:m,textContent:x}}),(p.metadata!==void 0||p.cells!==void 0)&&this._onDidChange.fire(p)})),n.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),n.push(t.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let a of i.cellTextDocuments)r.closeTextDocument({textDocument:a});this.notebookDocuments.delete(i.notebookDocument.uri);for(let a of o.cells)this.notebookCellMap.delete(a.document)}})),Fd.Disposable.create(()=>{n.forEach(i=>i.dispose())})}updateCellMap(t){for(let r of t.cells)this.notebookCellMap.set(r.document,[r,t])}};S8.NotebookDocuments=Ste});var Wbe=H(AQ=>{"use strict";d();Object.defineProperty(AQ,"__esModule",{value:!0});AQ.MonikerFeature=void 0;var lft=ii(),cft=s(e=>class extends e{get moniker(){return{on:s(t=>{let r=lft.MonikerRequest.type;return this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on")}}},"MonikerFeature");AQ.MonikerFeature=cft});var Lte=H(uo=>{"use strict";d();Object.defineProperty(uo,"__esModule",{value:!0});uo.createConnection=uo.combineFeatures=uo.combineNotebooksFeatures=uo.combineLanguagesFeatures=uo.combineWorkspaceFeatures=uo.combineWindowFeatures=uo.combineClientFeatures=uo.combineTracerFeatures=uo.combineTelemetryFeatures=uo.combineConsoleFeatures=uo._NotebooksImpl=uo._LanguagesImpl=uo.BulkUnregistration=uo.BulkRegistration=uo.ErrorMessageTracker=void 0;var gr=ii(),Md=XM(),Bte=yte(),Kn=_be(),uft=Sbe(),fft=Rbe(),dft=kbe(),mft=Ete(),hft=Bbe(),pft=Dbe(),gft=Pbe(),Aft=Nbe(),yft=Fbe(),Cft=Qbe(),xft=Obe(),vft=Ube(),bft=Rte(),Eft=Wbe();function kte(e){if(e!==null)return e}s(kte,"null2Undefined");var Dte=class{static{s(this,"ErrorMessageTracker")}constructor(){this._messages=Object.create(null)}add(t){let r=this._messages[t];r||(r=0),r++,this._messages[t]=r}sendErrors(t){Object.keys(this._messages).forEach(r=>{t.window.showErrorMessage(r)})}};uo.ErrorMessageTracker=Dte;var yQ=class{static{s(this,"RemoteConsoleImpl")}constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(gr.MessageType.Error,t)}warn(t){this.send(gr.MessageType.Warning,t)}info(t){this.send(gr.MessageType.Info,t)}log(t){this.send(gr.MessageType.Log,t)}debug(t){this.send(gr.MessageType.Debug,t)}send(t,r){this._rawConnection&&this._rawConnection.sendNotification(gr.LogMessageNotification.type,{type:t,message:r}).catch(()=>{(0,gr.RAL)().console.error("Sending log message failed")})}},Pte=class{static{s(this,"_RemoteWindowImpl")}constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...r){let n={type:gr.MessageType.Error,message:t,actions:r};return this.connection.sendRequest(gr.ShowMessageRequest.type,n).then(kte)}showWarningMessage(t,...r){let n={type:gr.MessageType.Warning,message:t,actions:r};return this.connection.sendRequest(gr.ShowMessageRequest.type,n).then(kte)}showInformationMessage(t,...r){let n={type:gr.MessageType.Info,message:t,actions:r};return this.connection.sendRequest(gr.ShowMessageRequest.type,n).then(kte)}},Gbe=(0,hft.ShowDocumentFeature)((0,Kn.ProgressFeature)(Pte)),Hbe;(function(e){function t(){return new CQ}s(t,"create"),e.create=t})(Hbe||(uo.BulkRegistration=Hbe={}));var CQ=class{static{s(this,"BulkRegistrationImpl")}constructor(){this._registrations=[],this._registered=new Set}add(t,r){let n=Md.string(t)?t:t.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);let i=Bte.generateUuid();this._registrations.push({id:i,method:n,registerOptions:r||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}},jbe;(function(e){function t(){return new cS(void 0,[])}s(t,"create"),e.create=t})(jbe||(uo.BulkUnregistration=jbe={}));var cS=class{static{s(this,"BulkUnregistrationImpl")}constructor(t,r){this._connection=t,this._unregistrations=new Map,r.forEach(n=>{this._unregistrations.set(n.method,n)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let n of this._unregistrations.values())t.push(n);let r={unregisterations:t};this._connection.sendRequest(gr.UnregistrationRequest.type,r).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let r=Md.string(t)?t:t.method,n=this._unregistrations.get(r);if(!n)return!1;let i={unregisterations:[n]};return this._connection.sendRequest(gr.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(r)},o=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)}),!0}},xQ=class{static{s(this,"RemoteClientImpl")}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,r,n){return t instanceof CQ?this.registerMany(t):t instanceof cS?this.registerSingle1(t,r,n):this.registerSingle2(t,r)}registerSingle1(t,r,n){let i=Md.string(r)?r:r.method,o=Bte.generateUuid(),a={registrations:[{id:o,method:i,registerOptions:n||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(gr.RegistrationRequest.type,a).then(l=>(t.add({id:o,method:i}),t),l=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(l)))}registerSingle2(t,r){let n=Md.string(t)?t:t.method,i=Bte.generateUuid(),o={registrations:[{id:i,method:n,registerOptions:r||{}}]};return this.connection.sendRequest(gr.RegistrationRequest.type,o).then(a=>gr.Disposable.create(()=>{this.unregisterSingle(i,n).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),a=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(a)))}unregisterSingle(t,r){let n={unregisterations:[{id:t,method:r}]};return this.connection.sendRequest(gr.UnregistrationRequest.type,n).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let r=t.asRegistrationParams();return this.connection.sendRequest(gr.RegistrationRequest.type,r).then(()=>new cS(this._connection,r.registrations.map(n=>({id:n.id,method:n.method}))),n=>(this.connection.console.info("Bulk registration failed."),Promise.reject(n)))}},Nte=class{static{s(this,"_RemoteWorkspaceImpl")}constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function r(i){return i&&!!i.edit}s(r,"isApplyWorkspaceEditParams");let n=r(t)?t:{edit:t};return this.connection.sendRequest(gr.ApplyWorkspaceEditRequest.type,n)}},Vbe=(0,pft.FileOperationsFeature)((0,fft.WorkspaceFoldersFeature)((0,uft.ConfigurationFeature)(Nte))),vQ=class{static{s(this,"TracerImpl")}constructor(){this._trace=gr.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,r){this._trace!==gr.Trace.Off&&this.connection.sendNotification(gr.LogTraceNotification.type,{message:t,verbose:this._trace===gr.Trace.Verbose?r:void 0}).catch(()=>{})}},bQ=class{static{s(this,"TelemetryImpl")}constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(gr.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},EQ=class{static{s(this,"_LanguagesImpl")}constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,Kn.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,r){return(0,Kn.attachPartialResult)(this.connection,r)}};uo._LanguagesImpl=EQ;var $be=(0,Cft.FoldingRangeFeature)((0,Eft.MonikerFeature)((0,vft.DiagnosticFeature)((0,xft.InlayHintFeature)((0,yft.InlineValueFeature)((0,Aft.TypeHierarchyFeature)((0,gft.LinkedEditingRangeFeature)((0,mft.SemanticTokensFeature)((0,dft.CallHierarchyFeature)(EQ))))))))),IQ=class{static{s(this,"_NotebooksImpl")}constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,Kn.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,r){return(0,Kn.attachPartialResult)(this.connection,r)}};uo._NotebooksImpl=IQ;var zbe=(0,bft.NotebookSyncFeature)(IQ);function Ybe(e,t){return function(r){return t(e(r))}}s(Ybe,"combineConsoleFeatures");uo.combineConsoleFeatures=Ybe;function Kbe(e,t){return function(r){return t(e(r))}}s(Kbe,"combineTelemetryFeatures");uo.combineTelemetryFeatures=Kbe;function Jbe(e,t){return function(r){return t(e(r))}}s(Jbe,"combineTracerFeatures");uo.combineTracerFeatures=Jbe;function Xbe(e,t){return function(r){return t(e(r))}}s(Xbe,"combineClientFeatures");uo.combineClientFeatures=Xbe;function Zbe(e,t){return function(r){return t(e(r))}}s(Zbe,"combineWindowFeatures");uo.combineWindowFeatures=Zbe;function eEe(e,t){return function(r){return t(e(r))}}s(eEe,"combineWorkspaceFeatures");uo.combineWorkspaceFeatures=eEe;function tEe(e,t){return function(r){return t(e(r))}}s(tEe,"combineLanguagesFeatures");uo.combineLanguagesFeatures=tEe;function rEe(e,t){return function(r){return t(e(r))}}s(rEe,"combineNotebooksFeatures");uo.combineNotebooksFeatures=rEe;function Ift(e,t){function r(i,o,a){return i&&o?a(i,o):i||o}return s(r,"combine"),{__brand:"features",console:r(e.console,t.console,Ybe),tracer:r(e.tracer,t.tracer,Jbe),telemetry:r(e.telemetry,t.telemetry,Kbe),client:r(e.client,t.client,Xbe),window:r(e.window,t.window,Zbe),workspace:r(e.workspace,t.workspace,eEe),languages:r(e.languages,t.languages,tEe),notebooks:r(e.notebooks,t.notebooks,rEe)}}s(Ift,"combineFeatures");uo.combineFeatures=Ift;function Tft(e,t,r){let n=r&&r.console?new(r.console(yQ)):new yQ,i=e(n);n.rawAttach(i);let o=r&&r.tracer?new(r.tracer(vQ)):new vQ,a=r&&r.telemetry?new(r.telemetry(bQ)):new bQ,l=r&&r.client?new(r.client(xQ)):new xQ,c=r&&r.window?new(r.window(Gbe)):new Gbe,u=r&&r.workspace?new(r.workspace(Vbe)):new Vbe,f=r&&r.languages?new(r.languages($be)):new $be,m=r&&r.notebooks?new(r.notebooks(zbe)):new zbe,h=[n,o,a,l,c,u,f,m];function p(E){return E instanceof Promise?E:Md.thenable(E)?new Promise((_,k)=>{E.then(B=>_(B),B=>k(B))}):Promise.resolve(E)}s(p,"asPromise");let g,y,x,b={listen:s(()=>i.listen(),"listen"),sendRequest:s((E,..._)=>i.sendRequest(Md.string(E)?E:E.method,..._),"sendRequest"),onRequest:s((E,_)=>i.onRequest(E,_),"onRequest"),sendNotification:s((E,_)=>{let k=Md.string(E)?E:E.method;return i.sendNotification(k,_)},"sendNotification"),onNotification:s((E,_)=>i.onNotification(E,_),"onNotification"),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:s(E=>(y=E,{dispose:s(()=>{y=void 0},"dispose")}),"onInitialize"),onInitialized:s(E=>i.onNotification(gr.InitializedNotification.type,E),"onInitialized"),onShutdown:s(E=>(g=E,{dispose:s(()=>{g=void 0},"dispose")}),"onShutdown"),onExit:s(E=>(x=E,{dispose:s(()=>{x=void 0},"dispose")}),"onExit"),get console(){return n},get telemetry(){return a},get tracer(){return o},get client(){return l},get window(){return c},get workspace(){return u},get languages(){return f},get notebooks(){return m},onDidChangeConfiguration:s(E=>i.onNotification(gr.DidChangeConfigurationNotification.type,E),"onDidChangeConfiguration"),onDidChangeWatchedFiles:s(E=>i.onNotification(gr.DidChangeWatchedFilesNotification.type,E),"onDidChangeWatchedFiles"),__textDocumentSync:void 0,onDidOpenTextDocument:s(E=>i.onNotification(gr.DidOpenTextDocumentNotification.type,E),"onDidOpenTextDocument"),onDidChangeTextDocument:s(E=>i.onNotification(gr.DidChangeTextDocumentNotification.type,E),"onDidChangeTextDocument"),onDidCloseTextDocument:s(E=>i.onNotification(gr.DidCloseTextDocumentNotification.type,E),"onDidCloseTextDocument"),onWillSaveTextDocument:s(E=>i.onNotification(gr.WillSaveTextDocumentNotification.type,E),"onWillSaveTextDocument"),onWillSaveTextDocumentWaitUntil:s(E=>i.onRequest(gr.WillSaveTextDocumentWaitUntilRequest.type,E),"onWillSaveTextDocumentWaitUntil"),onDidSaveTextDocument:s(E=>i.onNotification(gr.DidSaveTextDocumentNotification.type,E),"onDidSaveTextDocument"),sendDiagnostics:s(E=>i.sendNotification(gr.PublishDiagnosticsNotification.type,E),"sendDiagnostics"),onHover:s(E=>i.onRequest(gr.HoverRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),void 0)),"onHover"),onCompletion:s(E=>i.onRequest(gr.CompletionRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onCompletion"),onCompletionResolve:s(E=>i.onRequest(gr.CompletionResolveRequest.type,E),"onCompletionResolve"),onSignatureHelp:s(E=>i.onRequest(gr.SignatureHelpRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),void 0)),"onSignatureHelp"),onDeclaration:s(E=>i.onRequest(gr.DeclarationRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onDeclaration"),onDefinition:s(E=>i.onRequest(gr.DefinitionRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onDefinition"),onTypeDefinition:s(E=>i.onRequest(gr.TypeDefinitionRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onTypeDefinition"),onImplementation:s(E=>i.onRequest(gr.ImplementationRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onImplementation"),onReferences:s(E=>i.onRequest(gr.ReferencesRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onReferences"),onDocumentHighlight:s(E=>i.onRequest(gr.DocumentHighlightRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onDocumentHighlight"),onDocumentSymbol:s(E=>i.onRequest(gr.DocumentSymbolRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onDocumentSymbol"),onWorkspaceSymbol:s(E=>i.onRequest(gr.WorkspaceSymbolRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onWorkspaceSymbol"),onWorkspaceSymbolResolve:s(E=>i.onRequest(gr.WorkspaceSymbolResolveRequest.type,E),"onWorkspaceSymbolResolve"),onCodeAction:s(E=>i.onRequest(gr.CodeActionRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onCodeAction"),onCodeActionResolve:s(E=>i.onRequest(gr.CodeActionResolveRequest.type,(_,k)=>E(_,k)),"onCodeActionResolve"),onCodeLens:s(E=>i.onRequest(gr.CodeLensRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onCodeLens"),onCodeLensResolve:s(E=>i.onRequest(gr.CodeLensResolveRequest.type,(_,k)=>E(_,k)),"onCodeLensResolve"),onDocumentFormatting:s(E=>i.onRequest(gr.DocumentFormattingRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),void 0)),"onDocumentFormatting"),onDocumentRangeFormatting:s(E=>i.onRequest(gr.DocumentRangeFormattingRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),void 0)),"onDocumentRangeFormatting"),onDocumentOnTypeFormatting:s(E=>i.onRequest(gr.DocumentOnTypeFormattingRequest.type,(_,k)=>E(_,k)),"onDocumentOnTypeFormatting"),onRenameRequest:s(E=>i.onRequest(gr.RenameRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),void 0)),"onRenameRequest"),onPrepareRename:s(E=>i.onRequest(gr.PrepareRenameRequest.type,(_,k)=>E(_,k)),"onPrepareRename"),onDocumentLinks:s(E=>i.onRequest(gr.DocumentLinkRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onDocumentLinks"),onDocumentLinkResolve:s(E=>i.onRequest(gr.DocumentLinkResolveRequest.type,(_,k)=>E(_,k)),"onDocumentLinkResolve"),onDocumentColor:s(E=>i.onRequest(gr.DocumentColorRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onDocumentColor"),onColorPresentation:s(E=>i.onRequest(gr.ColorPresentationRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onColorPresentation"),onFoldingRanges:s(E=>i.onRequest(gr.FoldingRangeRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onFoldingRanges"),onSelectionRanges:s(E=>i.onRequest(gr.SelectionRangeRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),(0,Kn.attachPartialResult)(i,_))),"onSelectionRanges"),onExecuteCommand:s(E=>i.onRequest(gr.ExecuteCommandRequest.type,(_,k)=>E(_,k,(0,Kn.attachWorkDone)(i,_),void 0)),"onExecuteCommand"),dispose:s(()=>i.dispose(),"dispose")};for(let E of h)E.attach(b);return i.onRequest(gr.InitializeRequest.type,E=>{t.initialize(E),Md.string(E.trace)&&(o.trace=gr.Trace.fromString(E.trace));for(let _ of h)_.initialize(E.capabilities);if(y){let _=y(E,new gr.CancellationTokenSource().token,(0,Kn.attachWorkDone)(i,E),void 0);return p(_).then(k=>{if(k instanceof gr.ResponseError)return k;let B=k;B||(B={capabilities:{}});let N=B.capabilities;N||(N={},B.capabilities=N),N.textDocumentSync===void 0||N.textDocumentSync===null?N.textDocumentSync=Md.number(b.__textDocumentSync)?b.__textDocumentSync:gr.TextDocumentSyncKind.None:!Md.number(N.textDocumentSync)&&!Md.number(N.textDocumentSync.change)&&(N.textDocumentSync.change=Md.number(b.__textDocumentSync)?b.__textDocumentSync:gr.TextDocumentSyncKind.None);for(let M of h)M.fillServerCapabilities(N);return B})}else{let _={capabilities:{textDocumentSync:gr.TextDocumentSyncKind.None}};for(let k of h)k.fillServerCapabilities(_.capabilities);return _}}),i.onRequest(gr.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,g)return g(new gr.CancellationTokenSource().token)}),i.onNotification(gr.ExitNotification.type,()=>{try{x&&x()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(gr.SetTraceNotification.type,E=>{o.trace=gr.Trace.fromString(E.value)}),b}s(Tft,"createConnection");uo.createConnection=Tft});var nEe=H(uu=>{"use strict";d();Object.defineProperty(uu,"__esModule",{value:!0});uu.resolveModulePath=uu.FileSystem=uu.resolveGlobalYarnPath=uu.resolveGlobalNodePath=uu.resolve=uu.uriToFilePath=void 0;var wft=require("url"),Ah=require("path"),Fte=require("fs"),Ute=require("child_process");function _ft(e){let t=wft.parse(e);if(t.protocol!=="file:"||!t.path)return;let r=t.path.split("/");for(var n=0,i=r.length;n<i;n++)r[n]=decodeURIComponent(r[n]);if(process.platform==="win32"&&r.length>1){let o=r[0],a=r[1];o.length===0&&a.length>1&&a[1]===":"&&r.shift()}return Ah.normalize(r.join("/"))}s(_ft,"uriToFilePath");uu.uriToFilePath=_ft;function Mte(){return process.platform==="win32"}s(Mte,"isWindows");function TQ(e,t,r,n){let i="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((a,l)=>{let c=process.env,u=Object.create(null);Object.keys(c).forEach(f=>u[f]=c[f]),t&&Fte.existsSync(t)&&(u[i]?u[i]=t+Ah.delimiter+u[i]:u[i]=t,n&&n(`NODE_PATH value is: ${u[i]}`)),u.ELECTRON_RUN_AS_NODE="1";try{let f=(0,Ute.fork)("",[],{cwd:r,env:u,execArgv:["-e",o]});if(f.pid===void 0){l(new Error(`Starting process to resolve node module ${e} failed`));return}f.on("error",h=>{l(h)}),f.on("message",h=>{h.c==="r"&&(f.send({c:"e"}),h.s?a(h.r):l(new Error(`Failed to resolve module: ${e}`)))});let m={c:"rs",a:e};f.send(m)}catch(f){l(f)}})}s(TQ,"resolve");uu.resolve=TQ;function Qte(e){let t="npm",r=Object.create(null);Object.keys(process.env).forEach(o=>r[o]=process.env[o]),r.NO_UPDATE_NOTIFIER="true";let n={encoding:"utf8",env:r};Mte()&&(t="npm.cmd",n.shell=!0);let i=s(()=>{},"handler");try{process.on("SIGPIPE",i);let o=(0,Ute.spawnSync)(t,["config","get","prefix"],n).stdout;if(!o){e&&e("'npm config get prefix' didn't return a value.");return}let a=o.trim();return e&&e(`'npm config get prefix' value is: ${a}`),a.length>0?Mte()?Ah.join(a,"node_modules"):Ah.join(a,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",i)}}s(Qte,"resolveGlobalNodePath");uu.resolveGlobalNodePath=Qte;function Sft(e){let t="yarn",r={encoding:"utf8"};Mte()&&(t="yarn.cmd",r.shell=!0);let n=s(()=>{},"handler");try{process.on("SIGPIPE",n);let i=(0,Ute.spawnSync)(t,["global","dir","--json"],r),o=i.stdout;if(!o){e&&(e("'yarn global dir' didn't return a value."),i.stderr&&e(i.stderr));return}let a=o.trim().split(/\r?\n/);for(let l of a)try{let c=JSON.parse(l);if(c.type==="log")return Ah.join(c.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",n)}}s(Sft,"resolveGlobalYarnPath");uu.resolveGlobalYarnPath=Sft;var Ote;(function(e){let t;function r(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Fte.existsSync(__filename.toUpperCase())||!Fte.existsSync(__filename.toLowerCase())),t}s(r,"isCaseSensitive"),e.isCaseSensitive=r;function n(i,o){return r()?Ah.normalize(o).indexOf(Ah.normalize(i))===0:Ah.normalize(o).toLowerCase().indexOf(Ah.normalize(i).toLowerCase())===0}s(n,"isParent"),e.isParent=n})(Ote||(uu.FileSystem=Ote={}));function Rft(e,t,r,n){return r?(Ah.isAbsolute(r)||(r=Ah.join(e,r)),TQ(t,r,r,n).then(i=>Ote.isParent(r,i)?i:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,i=>TQ(t,Qte(n),e,n))):TQ(t,Qte(n),e,n)}s(Rft,"resolveModulePath");uu.resolveModulePath=Rft});var qte=H((m4r,iEe)=>{"use strict";d();iEe.exports=ii()});var oEe=H(wQ=>{"use strict";d();Object.defineProperty(wQ,"__esModule",{value:!0});wQ.InlineCompletionFeature=void 0;var kft=ii(),Bft=s(e=>class extends e{get inlineCompletion(){return{on:s(t=>this.connection.onRequest(kft.InlineCompletionRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r))),"on")}}},"InlineCompletionFeature");wQ.InlineCompletionFeature=Bft});var lEe=H(Wc=>{"use strict";d();var Dft=Wc&&Wc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),aEe=Wc&&Wc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Dft(t,e,r)};Object.defineProperty(Wc,"__esModule",{value:!0});Wc.ProposedFeatures=Wc.NotebookDocuments=Wc.TextDocuments=Wc.SemanticTokensBuilder=void 0;var Pft=Ete();Object.defineProperty(Wc,"SemanticTokensBuilder",{enumerable:!0,get:s(function(){return Pft.SemanticTokensBuilder},"get")});var Nft=oEe();aEe(ii(),Wc);var Lft=_te();Object.defineProperty(Wc,"TextDocuments",{enumerable:!0,get:s(function(){return Lft.TextDocuments},"get")});var Fft=Rte();Object.defineProperty(Wc,"NotebookDocuments",{enumerable:!0,get:s(function(){return Fft.NotebookDocuments},"get")});aEe(Lte(),Wc);var sEe;(function(e){e.all={__brand:"features",languages:Nft.InlineCompletionFeature}})(sEe||(Wc.ProposedFeatures=sEe={}))});var cl=H(Qd=>{"use strict";d();var Mft=Qd&&Qd.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dEe=Qd&&Qd.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Mft(t,e,r)};Object.defineProperty(Qd,"__esModule",{value:!0});Qd.createConnection=Qd.Files=void 0;var cEe=require("node:util"),Wte=XM(),Qft=Lte(),uS=nEe(),yv=qte();dEe(qte(),Qd);dEe(lEe(),Qd);var uEe;(function(e){e.uriToFilePath=uS.uriToFilePath,e.resolveGlobalNodePath=uS.resolveGlobalNodePath,e.resolveGlobalYarnPath=uS.resolveGlobalYarnPath,e.resolve=uS.resolve,e.resolveModulePath=uS.resolveModulePath})(uEe||(Qd.Files=uEe={}));var fEe;function _Q(){if(fEe!==void 0)try{fEe.end()}catch{}}s(_Q,"endProtocolConnection");var R8=!1,mEe;function Oft(){let e="--clientProcessId";function t(r){try{let n=parseInt(r);isNaN(n)||(mEe=setInterval(()=>{try{process.kill(n,0)}catch{_Q(),process.exit(R8?0:1)}},3e3))}catch{}}s(t,"runTimer");for(let r=2;r<process.argv.length;r++){let n=process.argv[r];if(n===e&&r+1<process.argv.length){t(process.argv[r+1]);return}else{let i=n.split("=");i[0]===e&&t(i[1])}}}s(Oft,"setupExitTimer");Oft();var Uft={initialize:s(e=>{let t=e.processId;Wte.number(t)&&mEe===void 0&&setInterval(()=>{try{process.kill(t,0)}catch{process.exit(R8?0:1)}},3e3)},"initialize"),get shutdownReceived(){return R8},set shutdownReceived(e){R8=e},exit:s(e=>{_Q(),process.exit(e)},"exit")};function qft(e,t,r,n){let i,o,a,l;return e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=r,r=n),yv.ConnectionStrategy.is(e)||yv.ConnectionOptions.is(e)?l=e:(o=e,a=t,l=r),Wft(o,a,l,i)}s(qft,"createConnection");Qd.createConnection=qft;function Wft(e,t,r,n){let i=!1;if(!e&&!t&&process.argv.length>2){let c,u,f=process.argv.slice(2);for(let m=0;m<f.length;m++){let h=f[m];if(h==="--node-ipc"){e=new yv.IPCMessageReader(process),t=new yv.IPCMessageWriter(process);break}else if(h==="--stdio"){i=!0,e=process.stdin,t=process.stdout;break}else if(h==="--socket"){c=parseInt(f[m+1]);break}else if(h==="--pipe"){u=f[m+1];break}else{var o=h.split("=");if(o[0]==="--socket"){c=parseInt(o[1]);break}else if(o[0]==="--pipe"){u=o[1];break}}}if(c){let m=(0,yv.createServerSocketTransport)(c);e=m[0],t=m[1]}else if(u){let m=(0,yv.createServerPipeTransport)(u);e=m[0],t=m[1]}}var a="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+a);if(!t)throw new Error("Connection output stream is not set. "+a);if(Wte.func(e.read)&&Wte.func(e.on)){let c=e;c.on("end",()=>{_Q(),process.exit(R8?0:1)}),c.on("close",()=>{_Q(),process.exit(R8?0:1)})}let l=s(c=>{let u=(0,yv.createProtocolConnection)(e,t,c,r);return i&&Gft(c),u},"connectionFactory");return(0,Qft.createConnection)(l,Uft,n)}s(Wft,"_createConnection");function Gft(e){function t(n){return n.map(i=>typeof i=="string"?i:(0,cEe.inspect)(i)).join(" ")}s(t,"serialize");let r=new Map;console.assert=s(function(i,...o){if(!i)if(o.length===0)e.error("Assertion failed");else{let[a,...l]=o;e.error(`Assertion failed: ${a} ${t(l)}`)}},"assert"),console.count=s(function(i="default"){let o=String(i),a=r.get(o)??0;a+=1,r.set(o,a),e.log(`${o}: ${o}`)},"count"),console.countReset=s(function(i){i===void 0?r.clear():r.delete(String(i))},"countReset"),console.debug=s(function(...i){e.log(t(i))},"debug"),console.dir=s(function(i,o){e.log((0,cEe.inspect)(i,o))},"dir"),console.log=s(function(...i){e.log(t(i))},"log"),console.error=s(function(...i){e.error(t(i))},"error"),console.trace=s(function(...i){let o=new Error().stack.replace(/(.+\n){2}/,""),a="Trace";i.length!==0&&(a+=`: ${t(i)}`),e.log(`${a}
${o}`)},"trace"),console.warn=s(function(...i){e.warn(t(i))},"warn")}s(Gft,"patchConsole")});var yh=H((T4r,hEe)=>{"use strict";d();hEe.exports=cl()});var MIe=H(($9r,FIe)=>{"use strict";d();FIe.exports=NIe;function NIe(e,t,r){e instanceof RegExp&&(e=PIe(e,r)),t instanceof RegExp&&(t=PIe(t,r));var n=LIe(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}s(NIe,"balanced");function PIe(e,t){var r=t.match(e);return r?r[0]:null}s(PIe,"maybeMatch");NIe.range=LIe;function LIe(e,t,r){var n,i,o,a,l,c=r.indexOf(e),u=r.indexOf(t,c+1),f=c;if(c>=0&&u>0){if(e===t)return[c,u];for(n=[],o=r.length;f>=0&&!l;)f==c?(n.push(f),c=r.indexOf(e,f+1)):n.length==1?l=[n.pop(),u]:(i=n.pop(),i<o&&(o=i,a=u),u=r.indexOf(t,f+1)),f=c<u&&c>=0?c:u;n.length&&(l=[o,a])}return l}s(LIe,"range")});var jIe=H((K9r,HIe)=>{d();var QIe=MIe();HIe.exports=Sdt;var OIe="\0SLASH"+Math.random()+"\0",UIe="\0OPEN"+Math.random()+"\0",Lre="\0CLOSE"+Math.random()+"\0",qIe="\0COMMA"+Math.random()+"\0",WIe="\0PERIOD"+Math.random()+"\0";function Nre(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}s(Nre,"numeric");function wdt(e){return e.split("\\\\").join(OIe).split("\\{").join(UIe).split("\\}").join(Lre).split("\\,").join(qIe).split("\\.").join(WIe)}s(wdt,"escapeBraces");function _dt(e){return e.split(OIe).join("\\").split(UIe).join("{").split(Lre).join("}").split(qIe).join(",").split(WIe).join(".")}s(_dt,"unescapeBraces");function GIe(e){if(!e)return[""];var t=[],r=QIe("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var l=GIe(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}s(GIe,"parseCommaParts");function Sdt(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),vS(wdt(e),!0).map(_dt)):[]}s(Sdt,"expandTop");function Rdt(e){return"{"+e+"}"}s(Rdt,"embrace");function kdt(e){return/^-?0\d/.test(e)}s(kdt,"isPadded");function Bdt(e,t){return e<=t}s(Bdt,"lte");function Ddt(e,t){return e>=t}s(Ddt,"gte");function vS(e,t){var r=[],n=QIe("{","}",e);if(!n)return[e];var i=n.pre,o=n.post.length?vS(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var l=i+"{"+n.body+"}"+o[a];r.push(l)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),f=c||u,m=n.body.indexOf(",")>=0;if(!f&&!m)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+Lre+n.post,vS(e)):[e];var h;if(f)h=n.body.split(/\.\./);else if(h=GIe(n.body),h.length===1&&(h=vS(h[0],!1).map(Rdt),h.length===1))return o.map(function(ee){return n.pre+h[0]+ee});var p;if(f){var g=Nre(h[0]),y=Nre(h[1]),x=Math.max(h[0].length,h[1].length),b=h.length==3?Math.abs(Nre(h[2])):1,E=Bdt,_=y<g;_&&(b*=-1,E=Ddt);var k=h.some(kdt);p=[];for(var B=g;E(B,y);B+=b){var N;if(u)N=String.fromCharCode(B),N==="\\"&&(N="");else if(N=String(B),k){var M=x-N.length;if(M>0){var Z=new Array(M+1).join("0");B<0?N="-"+Z+N.slice(1):N=Z+N}}p.push(N)}}else{p=[];for(var he=0;he<h.length;he++)p.push.apply(p,vS(h[he],!1))}for(var he=0;he<p.length;he++)for(var a=0;a<o.length;a++){var l=i+p[he]+o[a];(!t||f||l)&&r.push(l)}}return r}s(vS,"expand")});var Os=H((vWr,TTe)=>{d();TTe.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var go=H((EWr,wTe)=>{"use strict";d();var Zs=class extends Error{static{s(this,"UndiciError")}constructor(t){super(t),this.name="UndiciError",this.code="UND_ERR"}},sie=class extends Zs{static{s(this,"ConnectTimeoutError")}constructor(t){super(t),this.name="ConnectTimeoutError",this.message=t||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},aie=class extends Zs{static{s(this,"HeadersTimeoutError")}constructor(t){super(t),this.name="HeadersTimeoutError",this.message=t||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},lie=class extends Zs{static{s(this,"HeadersOverflowError")}constructor(t){super(t),this.name="HeadersOverflowError",this.message=t||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},cie=class extends Zs{static{s(this,"BodyTimeoutError")}constructor(t){super(t),this.name="BodyTimeoutError",this.message=t||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},uie=class extends Zs{static{s(this,"ResponseStatusCodeError")}constructor(t,r,n,i){super(t),this.name="ResponseStatusCodeError",this.message=t||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=i,this.status=r,this.statusCode=r,this.headers=n}},fie=class extends Zs{static{s(this,"InvalidArgumentError")}constructor(t){super(t),this.name="InvalidArgumentError",this.message=t||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},die=class extends Zs{static{s(this,"InvalidReturnValueError")}constructor(t){super(t),this.name="InvalidReturnValueError",this.message=t||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},kU=class extends Zs{static{s(this,"AbortError")}constructor(t){super(t),this.name="AbortError",this.message=t||"The operation was aborted"}},mie=class extends kU{static{s(this,"RequestAbortedError")}constructor(t){super(t),this.name="AbortError",this.message=t||"Request aborted",this.code="UND_ERR_ABORTED"}},hie=class extends Zs{static{s(this,"InformationalError")}constructor(t){super(t),this.name="InformationalError",this.message=t||"Request information",this.code="UND_ERR_INFO"}},pie=class extends Zs{static{s(this,"RequestContentLengthMismatchError")}constructor(t){super(t),this.name="RequestContentLengthMismatchError",this.message=t||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}},gie=class extends Zs{static{s(this,"ResponseContentLengthMismatchError")}constructor(t){super(t),this.name="ResponseContentLengthMismatchError",this.message=t||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}},Aie=class extends Zs{static{s(this,"ClientDestroyedError")}constructor(t){super(t),this.name="ClientDestroyedError",this.message=t||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},yie=class extends Zs{static{s(this,"ClientClosedError")}constructor(t){super(t),this.name="ClientClosedError",this.message=t||"The client is closed",this.code="UND_ERR_CLOSED"}},Cie=class extends Zs{static{s(this,"SocketError")}constructor(t,r){super(t),this.name="SocketError",this.message=t||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}},xie=class extends Zs{static{s(this,"NotSupportedError")}constructor(t){super(t),this.name="NotSupportedError",this.message=t||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},vie=class extends Zs{static{s(this,"BalancedPoolMissingUpstreamError")}constructor(t){super(t),this.name="MissingUpstreamError",this.message=t||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},bie=class extends Error{static{s(this,"HTTPParserError")}constructor(t,r,n){super(t),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}},Eie=class extends Zs{static{s(this,"ResponseExceededMaxSizeError")}constructor(t){super(t),this.name="ResponseExceededMaxSizeError",this.message=t||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}},Iie=class extends Zs{static{s(this,"RequestRetryError")}constructor(t,r,{headers:n,data:i}){super(t),this.name="RequestRetryError",this.message=t||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=i,this.headers=n}},Tie=class extends Zs{static{s(this,"ResponseError")}constructor(t,r,{headers:n,data:i}){super(t),this.name="ResponseError",this.message=t||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.data=i,this.headers=n}},wie=class extends Zs{static{s(this,"SecureProxyConnectionError")}constructor(t,r,n){super(r,{cause:t,...n??{}}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=t}};wTe.exports={AbortError:kU,HTTPParserError:bie,UndiciError:Zs,HeadersTimeoutError:aie,HeadersOverflowError:lie,BodyTimeoutError:cie,RequestContentLengthMismatchError:pie,ConnectTimeoutError:sie,ResponseStatusCodeError:uie,InvalidArgumentError:fie,InvalidReturnValueError:die,RequestAbortedError:mie,ClientDestroyedError:Aie,ClientClosedError:yie,InformationalError:hie,SocketError:Cie,NotSupportedError:xie,ResponseContentLengthMismatchError:gie,BalancedPoolMissingUpstreamError:vie,ResponseExceededMaxSizeError:Eie,RequestRetryError:Iie,ResponseError:Tie,SecureProxyConnectionError:wie}});var DU=H((wWr,_Te)=>{"use strict";d();var BU={},_ie=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let e=0;e<_ie.length;++e){let t=_ie[e],r=t.toLowerCase();BU[t]=BU[r]=r}Object.setPrototypeOf(BU,null);_Te.exports={wellknownHeaderNames:_ie,headerNameLowerCasedRecord:BU}});var BTe=H((SWr,kTe)=>{"use strict";d();var{wellknownHeaderNames:STe,headerNameLowerCasedRecord:tgt}=DU(),Sie=class e{static{s(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(t,r,n){if(n===void 0||n>=t.length)throw new TypeError("Unreachable");if((this.code=t.charCodeAt(n))>127)throw new TypeError("key must be ascii string");t.length!==++n?this.middle=new e(t,r,n):this.value=r}add(t,r){let n=t.length;if(n===0)throw new TypeError("Unreachable");let i=0,o=this;for(;;){let a=t.charCodeAt(i);if(a>127)throw new TypeError("key must be ascii string");if(o.code===a)if(n===++i){o.value=r;break}else if(o.middle!==null)o=o.middle;else{o.middle=new e(t,r,i);break}else if(o.code<a)if(o.left!==null)o=o.left;else{o.left=new e(t,r,i);break}else if(o.right!==null)o=o.right;else{o.right=new e(t,r,i);break}}}search(t){let r=t.length,n=0,i=this;for(;i!==null&&n<r;){let o=t[n];for(o<=90&&o>=65&&(o|=32);i!==null;){if(o===i.code){if(r===++n)return i;i=i.middle;break}i=i.code<o?i.left:i.right}}return null}},PU=class{static{s(this,"TernarySearchTree")}node=null;insert(t,r){this.node===null?this.node=new Sie(t,r,0):this.node.add(t,r)}lookup(t){return this.node?.search(t)?.value??null}},RTe=new PU;for(let e=0;e<STe.length;++e){let t=tgt[STe[e]];RTe.insert(t,t)}kTe.exports={TernarySearchTree:PU,tree:RTe}});var yi=H((BWr,$Te)=>{"use strict";d();var KS=require("node:assert"),{kDestroyed:PTe,kBodyUsed:A6,kListeners:Rie,kBody:DTe}=Os(),{IncomingMessage:rgt}=require("node:http"),FU=require("node:stream"),ngt=require("node:net"),{Blob:igt}=require("node:buffer"),ogt=require("node:util"),{stringify:sgt}=require("node:querystring"),{EventEmitter:agt}=require("node:events"),{InvalidArgumentError:Nl}=go(),{headerNameLowerCasedRecord:lgt}=DU(),{tree:NTe}=BTe(),[cgt,ugt]=process.versions.node.split(".").map(e=>Number(e)),LU=class{static{s(this,"BodyAsyncIterable")}constructor(t){this[DTe]=t,this[A6]=!1}async*[Symbol.asyncIterator](){KS(!this[A6],"disturbed"),this[A6]=!0,yield*this[DTe]}};function fgt(e){return MU(e)?(OTe(e)===0&&e.on("data",function(){KS(!1)}),typeof e.readableDidRead!="boolean"&&(e[A6]=!1,agt.prototype.on.call(e,"data",function(){this[A6]=!0})),e):e&&typeof e.pipeTo=="function"?new LU(e):e&&typeof e!="string"&&!ArrayBuffer.isView(e)&&QTe(e)?new LU(e):e}s(fgt,"wrapRequestBody");function dgt(){}s(dgt,"nop");function MU(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}s(MU,"isStream");function LTe(e){if(e===null)return!1;if(e instanceof igt)return!0;if(typeof e!="object")return!1;{let t=e[Symbol.toStringTag];return(t==="Blob"||t==="File")&&("stream"in e&&typeof e.stream=="function"||"arrayBuffer"in e&&typeof e.arrayBuffer=="function")}}s(LTe,"isBlobLike");function mgt(e,t){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=sgt(t);return r&&(e+="?"+r),e}s(mgt,"buildURL");function FTe(e){let t=parseInt(e,10);return t===Number(e)&&t>=0&&t<=65535}s(FTe,"isValidPort");function NU(e){return e!=null&&e[0]==="h"&&e[1]==="t"&&e[2]==="t"&&e[3]==="p"&&(e[4]===":"||e[4]==="s"&&e[5]===":")}s(NU,"isHttpOrHttpsPrefixed");function MTe(e){if(typeof e=="string"){if(e=new URL(e),!NU(e.origin||e.protocol))throw new Nl("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new Nl("Invalid URL: The URL argument must be a non-null object.");if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&FTe(e.port)===!1)throw new Nl("Invalid URL: port must be a valid integer or a string representation of an integer.");if(e.path!=null&&typeof e.path!="string")throw new Nl("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new Nl("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new Nl("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new Nl("Invalid URL origin: the origin must be a string or null/undefined.");if(!NU(e.origin||e.protocol))throw new Nl("Invalid URL protocol: the URL must start with `http:` or `https:`.");let t=e.port!=null?e.port:e.protocol==="https:"?443:80,r=e.origin!=null?e.origin:`${e.protocol||""}//${e.hostname||""}:${t}`,n=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!NU(e.origin||e.protocol))throw new Nl("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}s(MTe,"parseURL");function hgt(e){if(e=MTe(e),e.pathname!=="/"||e.search||e.hash)throw new Nl("invalid url");return e}s(hgt,"parseOrigin");function pgt(e){if(e[0]==="["){let r=e.indexOf("]");return KS(r!==-1),e.substring(1,r)}let t=e.indexOf(":");return t===-1?e:e.substring(0,t)}s(pgt,"getHostname");function ggt(e){if(!e)return null;KS(typeof e=="string");let t=pgt(e);return ngt.isIP(t)?"":t}s(ggt,"getServerName");function Agt(e){return JSON.parse(JSON.stringify(e))}s(Agt,"deepClone");function ygt(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}s(ygt,"isAsyncIterable");function QTe(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}s(QTe,"isIterable");function OTe(e){if(e==null)return 0;if(MU(e)){let t=e._readableState;return t&&t.objectMode===!1&&t.ended===!0&&Number.isFinite(t.length)?t.length:null}else{if(LTe(e))return e.size!=null?e.size:null;if(WTe(e))return e.byteLength}return null}s(OTe,"bodyLength");function UTe(e){return e&&!!(e.destroyed||e[PTe]||FU.isDestroyed?.(e))}s(UTe,"isDestroyed");function Cgt(e,t){e==null||!MU(e)||UTe(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===rgt&&(e.socket=null),e.destroy(t)):t&&queueMicrotask(()=>{e.emit("error",t)}),e.destroyed!==!0&&(e[PTe]=!0))}s(Cgt,"destroy");var xgt=/timeout=(\d+)/;function vgt(e){let t=e.toString().match(xgt);return t?parseInt(t[1],10)*1e3:null}s(vgt,"parseKeepAliveTimeout");function qTe(e){return typeof e=="string"?lgt[e]??e.toLowerCase():NTe.lookup(e)??e.toString("latin1").toLowerCase()}s(qTe,"headerNameToString");function bgt(e){return NTe.lookup(e)??e.toString("latin1").toLowerCase()}s(bgt,"bufferToLowerCasedHeaderName");function Egt(e,t){t===void 0&&(t={});for(let r=0;r<e.length;r+=2){let n=qTe(e[r]),i=t[n];if(i)typeof i=="string"&&(i=[i],t[n]=i),i.push(e[r+1].toString("utf8"));else{let o=e[r+1];typeof o=="string"?t[n]=o:t[n]=Array.isArray(o)?o.map(a=>a.toString("utf8")):o.toString("utf8")}}return"content-length"in t&&"content-disposition"in t&&(t["content-disposition"]=Buffer.from(t["content-disposition"]).toString("latin1")),t}s(Egt,"parseHeaders");function Igt(e){let t=e.length,r=new Array(t),n=!1,i=-1,o,a,l=0;for(let c=0;c<e.length;c+=2)o=e[c],a=e[c+1],typeof o!="string"&&(o=o.toString()),typeof a!="string"&&(a=a.toString("utf8")),l=o.length,l===14&&o[7]==="-"&&(o==="content-length"||o.toLowerCase()==="content-length")?n=!0:l===19&&o[7]==="-"&&(o==="content-disposition"||o.toLowerCase()==="content-disposition")&&(i=c+1),r[c]=o,r[c+1]=a;return n&&i!==-1&&(r[i]=Buffer.from(r[i]).toString("latin1")),r}s(Igt,"parseRawHeaders");function WTe(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}s(WTe,"isBuffer");function Tgt(e,t,r){if(!e||typeof e!="object")throw new Nl("handler must be an object");if(typeof e.onConnect!="function")throw new Nl("invalid onConnect method");if(typeof e.onError!="function")throw new Nl("invalid onError method");if(typeof e.onBodySent!="function"&&e.onBodySent!==void 0)throw new Nl("invalid onBodySent method");if(r||t==="CONNECT"){if(typeof e.onUpgrade!="function")throw new Nl("invalid onUpgrade method")}else{if(typeof e.onHeaders!="function")throw new Nl("invalid onHeaders method");if(typeof e.onData!="function")throw new Nl("invalid onData method");if(typeof e.onComplete!="function")throw new Nl("invalid onComplete method")}}s(Tgt,"validateHandler");function wgt(e){return!!(e&&(FU.isDisturbed(e)||e[A6]))}s(wgt,"isDisturbed");function _gt(e){return!!(e&&FU.isErrored(e))}s(_gt,"isErrored");function Sgt(e){return!!(e&&FU.isReadable(e))}s(Sgt,"isReadable");function Rgt(e){return{localAddress:e.localAddress,localPort:e.localPort,remoteAddress:e.remoteAddress,remotePort:e.remotePort,remoteFamily:e.remoteFamily,timeout:e.timeout,bytesWritten:e.bytesWritten,bytesRead:e.bytesRead}}s(Rgt,"getSocketInfo");function kgt(e){let t;return new ReadableStream({async start(){t=e[Symbol.asyncIterator]()},async pull(r){let{done:n,value:i}=await t.next();if(n)queueMicrotask(()=>{r.close(),r.byobRequest?.respond(0)});else{let o=Buffer.isBuffer(i)?i:Buffer.from(i);o.byteLength&&r.enqueue(new Uint8Array(o))}return r.desiredSize>0},async cancel(r){await t.return()},type:"bytes"})}s(kgt,"ReadableStreamFrom");function Bgt(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}s(Bgt,"isFormDataLike");function Dgt(e,t){return"addEventListener"in e?(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)):(e.addListener("abort",t),()=>e.removeListener("abort",t))}s(Dgt,"addAbortListener");var Pgt=typeof String.prototype.toWellFormed=="function",Ngt=typeof String.prototype.isWellFormed=="function";function GTe(e){return Pgt?`${e}`.toWellFormed():ogt.toUSVString(e)}s(GTe,"toUSVString");function Lgt(e){return Ngt?`${e}`.isWellFormed():GTe(e)===`${e}`}s(Lgt,"isUSVString");function HTe(e){switch(e){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return e>=33&&e<=126}}s(HTe,"isTokenCharCode");function Fgt(e){if(e.length===0)return!1;for(let t=0;t<e.length;++t)if(!HTe(e.charCodeAt(t)))return!1;return!0}s(Fgt,"isValidHTTPToken");var Mgt=/[^\t\x20-\x7e\x80-\xff]/;function Qgt(e){return!Mgt.test(e)}s(Qgt,"isValidHeaderValue");function Ogt(e){if(e==null||e==="")return{start:0,end:null,size:null};let t=e?e.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return t?{start:parseInt(t[1]),end:t[2]?parseInt(t[2]):null,size:t[3]?parseInt(t[3]):null}:null}s(Ogt,"parseRangeHeader");function Ugt(e,t,r){return(e[Rie]??=[]).push([t,r]),e.on(t,r),e}s(Ugt,"addListener");function qgt(e){for(let[t,r]of e[Rie]??[])e.removeListener(t,r);e[Rie]=null}s(qgt,"removeAllListeners");function Wgt(e,t,r){try{t.onError(r),KS(t.aborted)}catch(n){e.emit("error",n)}}s(Wgt,"errorRequest");var jTe=Object.create(null);jTe.enumerable=!0;var kie={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},VTe={...kie,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf(kie,null);Object.setPrototypeOf(VTe,null);$Te.exports={kEnumerableProperty:jTe,nop:dgt,isDisturbed:wgt,isErrored:_gt,isReadable:Sgt,toUSVString:GTe,isUSVString:Lgt,isBlobLike:LTe,parseOrigin:hgt,parseURL:MTe,getServerName:ggt,isStream:MU,isIterable:QTe,isAsyncIterable:ygt,isDestroyed:UTe,headerNameToString:qTe,bufferToLowerCasedHeaderName:bgt,addListener:Ugt,removeAllListeners:qgt,errorRequest:Wgt,parseRawHeaders:Igt,parseHeaders:Egt,parseKeepAliveTimeout:vgt,destroy:Cgt,bodyLength:OTe,deepClone:Agt,ReadableStreamFrom:kgt,isBuffer:WTe,validateHandler:Tgt,getSocketInfo:Rgt,isFormDataLike:Bgt,buildURL:mgt,addAbortListener:Dgt,isValidHTTPToken:Fgt,isValidHeaderValue:Qgt,isTokenCharCode:HTe,parseRangeHeader:Ogt,normalizedMethodRecordsBase:kie,normalizedMethodRecords:VTe,isValidPort:FTe,isHttpOrHttpsPrefixed:NU,nodeMajor:cgt,nodeMinor:ugt,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"],wrapRequestBody:fgt}});var y6=H((NWr,YTe)=>{"use strict";d();var vo=require("node:diagnostics_channel"),Die=require("node:util"),QU=Die.debuglog("undici"),Bie=Die.debuglog("fetch"),Yv=Die.debuglog("websocket"),zTe=!1,Ggt={beforeConnect:vo.channel("undici:client:beforeConnect"),connected:vo.channel("undici:client:connected"),connectError:vo.channel("undici:client:connectError"),sendHeaders:vo.channel("undici:client:sendHeaders"),create:vo.channel("undici:request:create"),bodySent:vo.channel("undici:request:bodySent"),headers:vo.channel("undici:request:headers"),trailers:vo.channel("undici:request:trailers"),error:vo.channel("undici:request:error"),open:vo.channel("undici:websocket:open"),close:vo.channel("undici:websocket:close"),socketError:vo.channel("undici:websocket:socket_error"),ping:vo.channel("undici:websocket:ping"),pong:vo.channel("undici:websocket:pong")};if(QU.enabled||Bie.enabled){let e=Bie.enabled?Bie:QU;vo.channel("undici:client:beforeConnect").subscribe(t=>{let{connectParams:{version:r,protocol:n,port:i,host:o}}=t;e("connecting to %s using %s%s",`${o}${i?`:${i}`:""}`,n,r)}),vo.channel("undici:client:connected").subscribe(t=>{let{connectParams:{version:r,protocol:n,port:i,host:o}}=t;e("connected to %s using %s%s",`${o}${i?`:${i}`:""}`,n,r)}),vo.channel("undici:client:connectError").subscribe(t=>{let{connectParams:{version:r,protocol:n,port:i,host:o},error:a}=t;e("connection to %s using %s%s errored - %s",`${o}${i?`:${i}`:""}`,n,r,a.message)}),vo.channel("undici:client:sendHeaders").subscribe(t=>{let{request:{method:r,path:n,origin:i}}=t;e("sending request to %s %s/%s",r,i,n)}),vo.channel("undici:request:headers").subscribe(t=>{let{request:{method:r,path:n,origin:i},response:{statusCode:o}}=t;e("received response to %s %s/%s - HTTP %d",r,i,n,o)}),vo.channel("undici:request:trailers").subscribe(t=>{let{request:{method:r,path:n,origin:i}}=t;e("trailers received from %s %s/%s",r,i,n)}),vo.channel("undici:request:error").subscribe(t=>{let{request:{method:r,path:n,origin:i},error:o}=t;e("request to %s %s/%s errored - %s",r,i,n,o.message)}),zTe=!0}if(Yv.enabled){if(!zTe){let e=QU.enabled?QU:Yv;vo.channel("undici:client:beforeConnect").subscribe(t=>{let{connectParams:{version:r,protocol:n,port:i,host:o}}=t;e("connecting to %s%s using %s%s",o,i?`:${i}`:"",n,r)}),vo.channel("undici:client:connected").subscribe(t=>{let{connectParams:{version:r,protocol:n,port:i,host:o}}=t;e("connected to %s%s using %s%s",o,i?`:${i}`:"",n,r)}),vo.channel("undici:client:connectError").subscribe(t=>{let{connectParams:{version:r,protocol:n,port:i,host:o},error:a}=t;e("connection to %s%s using %s%s errored - %s",o,i?`:${i}`:"",n,r,a.message)}),vo.channel("undici:client:sendHeaders").subscribe(t=>{let{request:{method:r,path:n,origin:i}}=t;e("sending request to %s %s/%s",r,i,n)})}vo.channel("undici:websocket:open").subscribe(e=>{let{address:{address:t,port:r}}=e;Yv("connection opened %s%s",t,r?`:${r}`:"")}),vo.channel("undici:websocket:close").subscribe(e=>{let{websocket:t,code:r,reason:n}=e;Yv("closed connection to %s - %s %s",t.url,r,n)}),vo.channel("undici:websocket:socket_error").subscribe(e=>{Yv("connection errored - %s",e.message)}),vo.channel("undici:websocket:ping").subscribe(e=>{Yv("ping received")}),vo.channel("undici:websocket:pong").subscribe(e=>{Yv("pong received")})}YTe.exports={channels:Ggt}});var ewe=H((FWr,ZTe)=>{"use strict";d();var{InvalidArgumentError:ea,NotSupportedError:Hgt}=go(),DA=require("node:assert"),{isValidHTTPToken:XTe,isValidHeaderValue:KTe,isStream:jgt,destroy:Vgt,isBuffer:$gt,isFormDataLike:zgt,isIterable:Ygt,isBlobLike:Kgt,buildURL:Jgt,validateHandler:Xgt,getServerName:Zgt,normalizedMethodRecords:e1t}=yi(),{channels:Cg}=y6(),{headerNameLowerCasedRecord:JTe}=DU(),t1t=/[^\u0021-\u00ff]/,Yd=Symbol("handler"),Pie=class{static{s(this,"Request")}constructor(t,{path:r,method:n,body:i,headers:o,query:a,idempotent:l,blocking:c,upgrade:u,headersTimeout:f,bodyTimeout:m,reset:h,throwOnError:p,expectContinue:g,servername:y},x){if(typeof r!="string")throw new ea("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new ea("path must be an absolute URL or start with a slash");if(t1t.test(r))throw new ea("invalid request path");if(typeof n!="string")throw new ea("method must be a string");if(e1t[n]===void 0&&!XTe(n))throw new ea("invalid request method");if(u&&typeof u!="string")throw new ea("upgrade must be a string");if(f!=null&&(!Number.isFinite(f)||f<0))throw new ea("invalid headersTimeout");if(m!=null&&(!Number.isFinite(m)||m<0))throw new ea("invalid bodyTimeout");if(h!=null&&typeof h!="boolean")throw new ea("invalid reset");if(g!=null&&typeof g!="boolean")throw new ea("invalid expectContinue");if(this.headersTimeout=f,this.bodyTimeout=m,this.throwOnError=p===!0,this.method=n,this.abort=null,i==null)this.body=null;else if(jgt(i)){this.body=i;let b=this.body._readableState;(!b||!b.autoDestroy)&&(this.endHandler=s(function(){Vgt(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=E=>{this.abort?this.abort(E):this.error=E},this.body.on("error",this.errorHandler)}else if($gt(i))this.body=i.byteLength?i:null;else if(ArrayBuffer.isView(i))this.body=i.buffer.byteLength?Buffer.from(i.buffer,i.byteOffset,i.byteLength):null;else if(i instanceof ArrayBuffer)this.body=i.byteLength?Buffer.from(i):null;else if(typeof i=="string")this.body=i.length?Buffer.from(i):null;else if(zgt(i)||Ygt(i)||Kgt(i))this.body=i;else throw new ea("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=u||null,this.path=a?Jgt(r,a):r,this.origin=t,this.idempotent=l??(n==="HEAD"||n==="GET"),this.blocking=c??!1,this.reset=h??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=g??!1,Array.isArray(o)){if(o.length%2!==0)throw new ea("headers array must be even");for(let b=0;b<o.length;b+=2)OU(this,o[b],o[b+1])}else if(o&&typeof o=="object")if(o[Symbol.iterator])for(let b of o){if(!Array.isArray(b)||b.length!==2)throw new ea("headers must be in key-value pair format");OU(this,b[0],b[1])}else{let b=Object.keys(o);for(let E=0;E<b.length;++E)OU(this,b[E],o[b[E]])}else if(o!=null)throw new ea("headers must be an object or an array");Xgt(x,n,u),this.servername=y||Zgt(this.host),this[Yd]=x,Cg.create.hasSubscribers&&Cg.create.publish({request:this})}onBodySent(t){if(this[Yd].onBodySent)try{return this[Yd].onBodySent(t)}catch(r){this.abort(r)}}onRequestSent(){if(Cg.bodySent.hasSubscribers&&Cg.bodySent.publish({request:this}),this[Yd].onRequestSent)try{return this[Yd].onRequestSent()}catch(t){this.abort(t)}}onConnect(t){if(DA(!this.aborted),DA(!this.completed),this.error)t(this.error);else return this.abort=t,this[Yd].onConnect(t)}onResponseStarted(){return this[Yd].onResponseStarted?.()}onHeaders(t,r,n,i){DA(!this.aborted),DA(!this.completed),Cg.headers.hasSubscribers&&Cg.headers.publish({request:this,response:{statusCode:t,headers:r,statusText:i}});try{return this[Yd].onHeaders(t,r,n,i)}catch(o){this.abort(o)}}onData(t){DA(!this.aborted),DA(!this.completed);try{return this[Yd].onData(t)}catch(r){return this.abort(r),!1}}onUpgrade(t,r,n){return DA(!this.aborted),DA(!this.completed),this[Yd].onUpgrade(t,r,n)}onComplete(t){this.onFinally(),DA(!this.aborted),this.completed=!0,Cg.trailers.hasSubscribers&&Cg.trailers.publish({request:this,trailers:t});try{return this[Yd].onComplete(t)}catch(r){this.onError(r)}}onError(t){if(this.onFinally(),Cg.error.hasSubscribers&&Cg.error.publish({request:this,error:t}),!this.aborted)return this.aborted=!0,this[Yd].onError(t)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(t,r){return OU(this,t,r),this}};function OU(e,t,r){if(r&&typeof r=="object"&&!Array.isArray(r))throw new ea(`invalid ${t} header`);if(r===void 0)return;let n=JTe[t];if(n===void 0&&(n=t.toLowerCase(),JTe[n]===void 0&&!XTe(n)))throw new ea("invalid header key");if(Array.isArray(r)){let i=[];for(let o=0;o<r.length;o++)if(typeof r[o]=="string"){if(!KTe(r[o]))throw new ea(`invalid ${t} header`);i.push(r[o])}else if(r[o]===null)i.push("");else{if(typeof r[o]=="object")throw new ea(`invalid ${t} header`);i.push(`${r[o]}`)}r=i}else if(typeof r=="string"){if(!KTe(r))throw new ea(`invalid ${t} header`)}else r===null?r="":r=`${r}`;if(e.host===null&&n==="host"){if(typeof r!="string")throw new ea("invalid host header");e.host=r}else if(e.contentLength===null&&n==="content-length"){if(e.contentLength=parseInt(r,10),!Number.isFinite(e.contentLength))throw new ea("invalid content-length header")}else if(e.contentType===null&&n==="content-type")e.contentType=r,e.headers.push(t,r);else{if(n==="transfer-encoding"||n==="keep-alive"||n==="upgrade")throw new ea(`invalid ${n} header`);if(n==="connection"){let i=typeof r=="string"?r.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new ea("invalid connection header");i==="close"&&(e.reset=!0)}else{if(n==="expect")throw new Hgt("expect header not supported");e.headers.push(t,r)}}}s(OU,"processHeader");ZTe.exports=Pie});var JS=H((OWr,twe)=>{"use strict";d();var r1t=require("node:events"),UU=class extends r1t{static{s(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...t){let r=Array.isArray(t[0])?t[0]:t,n=this.dispatch.bind(this);for(let i of r)if(i!=null){if(typeof i!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof i}`);if(n=i(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new Nie(this,n)}},Nie=class extends UU{static{s(this,"ComposedDispatcher")}#e=null;#t=null;constructor(t,r){super(),this.#e=t,this.#t=r}dispatch(...t){this.#t(...t)}close(...t){return this.#e.close(...t)}destroy(...t){return this.#e.destroy(...t)}};twe.exports=UU});var b6=H((WWr,rwe)=>{"use strict";d();var n1t=JS(),{ClientDestroyedError:Lie,ClientClosedError:i1t,InvalidArgumentError:C6}=go(),{kDestroy:o1t,kClose:s1t,kClosed:XS,kDestroyed:x6,kDispatch:Fie,kInterceptors:Kv}=Os(),PA=Symbol("onDestroyed"),v6=Symbol("onClosed"),qU=Symbol("Intercepted Dispatch"),Mie=class extends n1t{static{s(this,"DispatcherBase")}constructor(){super(),this[x6]=!1,this[PA]=null,this[XS]=!1,this[v6]=[]}get destroyed(){return this[x6]}get closed(){return this[XS]}get interceptors(){return this[Kv]}set interceptors(t){if(t){for(let r=t.length-1;r>=0;r--)if(typeof this[Kv][r]!="function")throw new C6("interceptor must be an function")}this[Kv]=t}close(t){if(t===void 0)return new Promise((n,i)=>{this.close((o,a)=>o?i(o):n(a))});if(typeof t!="function")throw new C6("invalid callback");if(this[x6]){queueMicrotask(()=>t(new Lie,null));return}if(this[XS]){this[v6]?this[v6].push(t):queueMicrotask(()=>t(null,null));return}this[XS]=!0,this[v6].push(t);let r=s(()=>{let n=this[v6];this[v6]=null;for(let i=0;i<n.length;i++)n[i](null,null)},"onClosed");this[s1t]().then(()=>this.destroy()).then(()=>{queueMicrotask(r)})}destroy(t,r){if(typeof t=="function"&&(r=t,t=null),r===void 0)return new Promise((i,o)=>{this.destroy(t,(a,l)=>a?o(a):i(l))});if(typeof r!="function")throw new C6("invalid callback");if(this[x6]){this[PA]?this[PA].push(r):queueMicrotask(()=>r(null,null));return}t||(t=new Lie),this[x6]=!0,this[PA]=this[PA]||[],this[PA].push(r);let n=s(()=>{let i=this[PA];this[PA]=null;for(let o=0;o<i.length;o++)i[o](null,null)},"onDestroyed");this[o1t](t).then(()=>{queueMicrotask(n)})}[qU](t,r){if(!this[Kv]||this[Kv].length===0)return this[qU]=this[Fie],this[Fie](t,r);let n=this[Fie].bind(this);for(let i=this[Kv].length-1;i>=0;i--)n=this[Kv][i](n);return this[qU]=n,n(t,r)}dispatch(t,r){if(!r||typeof r!="object")throw new C6("handler must be an object");try{if(!t||typeof t!="object")throw new C6("opts must be an object.");if(this[x6]||this[PA])throw new Lie;if(this[XS])throw new i1t;return this[qU](t,r)}catch(n){if(typeof r.onError!="function")throw new C6("invalid onError method");return r.onError(n),!1}}};rwe.exports=Mie});var Hie=H((jWr,swe)=>{"use strict";d();var E6=0,Qie=1e3,Oie=(Qie>>1)-1,NA,Uie=Symbol("kFastTimer"),LA=[],qie=-2,Wie=-1,iwe=0,nwe=1;function Gie(){E6+=Oie;let e=0,t=LA.length;for(;e<t;){let r=LA[e];r._state===iwe?(r._idleStart=E6-Oie,r._state=nwe):r._state===nwe&&E6>=r._idleStart+r._idleTimeout&&(r._state=Wie,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===Wie?(r._state=qie,--t!==0&&(LA[e]=LA[t])):++e}LA.length=t,LA.length!==0&&owe()}s(Gie,"onTick");function owe(){NA?NA.refresh():(clearTimeout(NA),NA=setTimeout(Gie,Oie),NA.unref&&NA.unref())}s(owe,"refreshTimeout");var WU=class{static{s(this,"FastTimer")}[Uie]=!0;_state=qie;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(t,r,n){this._onTimeout=t,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===qie&&LA.push(this),(!NA||LA.length===1)&&owe(),this._state=iwe}clear(){this._state=Wie,this._idleStart=-1}};swe.exports={setTimeout(e,t,r){return t<=Qie?setTimeout(e,t,r):new WU(e,t,r)},clearTimeout(e){e[Uie]?e.clear():clearTimeout(e)},setFastTimeout(e,t,r){return new WU(e,t,r)},clearFastTimeout(e){e.clear()},now(){return E6},tick(e=0){E6+=e-Qie+1,Gie(),Gie()},reset(){E6=0,LA.length=0,clearTimeout(NA),NA=null},kFastTimer:Uie}});var ZS=H((KWr,fwe)=>{"use strict";d();var a1t=require("node:net"),awe=require("node:assert"),uwe=yi(),{InvalidArgumentError:l1t,ConnectTimeoutError:c1t}=go(),GU=Hie();function lwe(){}s(lwe,"noop");var jie,Vie;global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?Vie=class{static{s(this,"WeakSessionCache")}constructor(t){this._maxCachedSessions=t,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size<this._maxCachedSessions)return;let n=this._sessionCache.get(r);n!==void 0&&n.deref()===void 0&&this._sessionCache.delete(r)})}get(t){let r=this._sessionCache.get(t);return r?r.deref():null}set(t,r){this._maxCachedSessions!==0&&(this._sessionCache.set(t,new WeakRef(r)),this._sessionRegistry.register(r,t))}}:Vie=class{static{s(this,"SimpleSessionCache")}constructor(t){this._maxCachedSessions=t,this._sessionCache=new Map}get(t){return this._sessionCache.get(t)}set(t,r){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(t,r)}}};function u1t({allowH2:e,maxCachedSessions:t,socketPath:r,timeout:n,session:i,...o}){if(t!=null&&(!Number.isInteger(t)||t<0))throw new l1t("maxCachedSessions must be a positive integer or zero");let a={path:r,...o},l=new Vie(t??100);return n=n??1e4,e=e??!1,s(function({hostname:u,host:f,protocol:m,port:h,servername:p,localAddress:g,httpSocket:y},x){let b;if(m==="https:"){jie||(jie=require("node:tls")),p=p||a.servername||uwe.getServerName(f)||null;let _=p||u;awe(_);let k=i||l.get(_)||null;h=h||443,b=jie.connect({highWaterMark:16384,...a,servername:p,session:k,localAddress:g,ALPNProtocols:e?["http/1.1","h2"]:["http/1.1"],socket:y,port:h,host:u}),b.on("session",function(B){l.set(_,B)})}else awe(!y,"httpSocket can only be sent on TLS update"),h=h||80,b=a1t.connect({highWaterMark:64*1024,...a,localAddress:g,port:h,host:u});if(a.keepAlive==null||a.keepAlive){let _=a.keepAliveInitialDelay===void 0?6e4:a.keepAliveInitialDelay;b.setKeepAlive(!0,_)}let E=f1t(new WeakRef(b),{timeout:n,hostname:u,port:h});return b.setNoDelay(!0).once(m==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(E),x){let _=x;x=null,_(null,this)}}).on("error",function(_){if(queueMicrotask(E),x){let k=x;x=null,k(_)}}),b},"connect")}s(u1t,"buildConnector");var f1t=process.platform==="win32"?(e,t)=>{if(!t.timeout)return lwe;let r=null,n=null,i=GU.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>cwe(e.deref(),t))})},t.timeout);return()=>{GU.clearFastTimeout(i),clearImmediate(r),clearImmediate(n)}}:(e,t)=>{if(!t.timeout)return lwe;let r=null,n=GU.setFastTimeout(()=>{r=setImmediate(()=>{cwe(e.deref(),t)})},t.timeout);return()=>{GU.clearFastTimeout(n),clearImmediate(r)}};function cwe(e,t){if(e==null)return;let r="Connect Timeout Error";Array.isArray(e.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${e.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${t.hostname}:${t.port},`,r+=` timeout: ${t.timeout}ms)`,uwe.destroy(e,new c1t(r))}s(cwe,"onConnectTimeout");fwe.exports=u1t});var dwe=H(HU=>{"use strict";d();Object.defineProperty(HU,"__esModule",{value:!0});HU.enumToMap=void 0;function d1t(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];typeof n=="number"&&(t[r]=n)}),t}s(d1t,"enumToMap");HU.enumToMap=d1t});var mwe=H(ir=>{"use strict";d();Object.defineProperty(ir,"__esModule",{value:!0});ir.SPECIAL_HEADERS=ir.HEADER_STATE=ir.MINOR=ir.MAJOR=ir.CONNECTION_TOKEN_CHARS=ir.HEADER_CHARS=ir.TOKEN=ir.STRICT_TOKEN=ir.HEX=ir.URL_CHAR=ir.STRICT_URL_CHAR=ir.USERINFO_CHARS=ir.MARK=ir.ALPHANUM=ir.NUM=ir.HEX_MAP=ir.NUM_MAP=ir.ALPHA=ir.FINISH=ir.H_METHOD_MAP=ir.METHOD_MAP=ir.METHODS_RTSP=ir.METHODS_ICE=ir.METHODS_HTTP=ir.METHODS=ir.LENIENT_FLAGS=ir.FLAGS=ir.TYPE=ir.ERROR=void 0;var m1t=dwe(),h1t;(function(e){e[e.OK=0]="OK",e[e.INTERNAL=1]="INTERNAL",e[e.STRICT=2]="STRICT",e[e.LF_EXPECTED=3]="LF_EXPECTED",e[e.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",e[e.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",e[e.INVALID_METHOD=6]="INVALID_METHOD",e[e.INVALID_URL=7]="INVALID_URL",e[e.INVALID_CONSTANT=8]="INVALID_CONSTANT",e[e.INVALID_VERSION=9]="INVALID_VERSION",e[e.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",e[e.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",e[e.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",e[e.INVALID_STATUS=13]="INVALID_STATUS",e[e.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",e[e.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",e[e.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",e[e.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",e[e.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",e[e.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",e[e.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",e[e.PAUSED=21]="PAUSED",e[e.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",e[e.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",e[e.USER=24]="USER"})(h1t=ir.ERROR||(ir.ERROR={}));var p1t;(function(e){e[e.BOTH=0]="BOTH",e[e.REQUEST=1]="REQUEST",e[e.RESPONSE=2]="RESPONSE"})(p1t=ir.TYPE||(ir.TYPE={}));var g1t;(function(e){e[e.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",e[e.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",e[e.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",e[e.CHUNKED=8]="CHUNKED",e[e.UPGRADE=16]="UPGRADE",e[e.CONTENT_LENGTH=32]="CONTENT_LENGTH",e[e.SKIPBODY=64]="SKIPBODY",e[e.TRAILING=128]="TRAILING",e[e.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})(g1t=ir.FLAGS||(ir.FLAGS={}));var A1t;(function(e){e[e.HEADERS=1]="HEADERS",e[e.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",e[e.KEEP_ALIVE=4]="KEEP_ALIVE"})(A1t=ir.LENIENT_FLAGS||(ir.LENIENT_FLAGS={}));var hn;(function(e){e[e.DELETE=0]="DELETE",e[e.GET=1]="GET",e[e.HEAD=2]="HEAD",e[e.POST=3]="POST",e[e.PUT=4]="PUT",e[e.CONNECT=5]="CONNECT",e[e.OPTIONS=6]="OPTIONS",e[e.TRACE=7]="TRACE",e[e.COPY=8]="COPY",e[e.LOCK=9]="LOCK",e[e.MKCOL=10]="MKCOL",e[e.MOVE=11]="MOVE",e[e.PROPFIND=12]="PROPFIND",e[e.PROPPATCH=13]="PROPPATCH",e[e.SEARCH=14]="SEARCH",e[e.UNLOCK=15]="UNLOCK",e[e.BIND=16]="BIND",e[e.REBIND=17]="REBIND",e[e.UNBIND=18]="UNBIND",e[e.ACL=19]="ACL",e[e.REPORT=20]="REPORT",e[e.MKACTIVITY=21]="MKACTIVITY",e[e.CHECKOUT=22]="CHECKOUT",e[e.MERGE=23]="MERGE",e[e["M-SEARCH"]=24]="M-SEARCH",e[e.NOTIFY=25]="NOTIFY",e[e.SUBSCRIBE=26]="SUBSCRIBE",e[e.UNSUBSCRIBE=27]="UNSUBSCRIBE",e[e.PATCH=28]="PATCH",e[e.PURGE=29]="PURGE",e[e.MKCALENDAR=30]="MKCALENDAR",e[e.LINK=31]="LINK",e[e.UNLINK=32]="UNLINK",e[e.SOURCE=33]="SOURCE",e[e.PRI=34]="PRI",e[e.DESCRIBE=35]="DESCRIBE",e[e.ANNOUNCE=36]="ANNOUNCE",e[e.SETUP=37]="SETUP",e[e.PLAY=38]="PLAY",e[e.PAUSE=39]="PAUSE",e[e.TEARDOWN=40]="TEARDOWN",e[e.GET_PARAMETER=41]="GET_PARAMETER",e[e.SET_PARAMETER=42]="SET_PARAMETER",e[e.REDIRECT=43]="REDIRECT",e[e.RECORD=44]="RECORD",e[e.FLUSH=45]="FLUSH"})(hn=ir.METHODS||(ir.METHODS={}));ir.METHODS_HTTP=[hn.DELETE,hn.GET,hn.HEAD,hn.POST,hn.PUT,hn.CONNECT,hn.OPTIONS,hn.TRACE,hn.COPY,hn.LOCK,hn.MKCOL,hn.MOVE,hn.PROPFIND,hn.PROPPATCH,hn.SEARCH,hn.UNLOCK,hn.BIND,hn.REBIND,hn.UNBIND,hn.ACL,hn.REPORT,hn.MKACTIVITY,hn.CHECKOUT,hn.MERGE,hn["M-SEARCH"],hn.NOTIFY,hn.SUBSCRIBE,hn.UNSUBSCRIBE,hn.PATCH,hn.PURGE,hn.MKCALENDAR,hn.LINK,hn.UNLINK,hn.PRI,hn.SOURCE];ir.METHODS_ICE=[hn.SOURCE];ir.METHODS_RTSP=[hn.OPTIONS,hn.DESCRIBE,hn.ANNOUNCE,hn.SETUP,hn.PLAY,hn.PAUSE,hn.TEARDOWN,hn.GET_PARAMETER,hn.SET_PARAMETER,hn.REDIRECT,hn.RECORD,hn.FLUSH,hn.GET,hn.POST];ir.METHOD_MAP=m1t.enumToMap(hn);ir.H_METHOD_MAP={};Object.keys(ir.METHOD_MAP).forEach(e=>{/^H/.test(e)&&(ir.H_METHOD_MAP[e]=ir.METHOD_MAP[e])});var y1t;(function(e){e[e.SAFE=0]="SAFE",e[e.SAFE_WITH_CB=1]="SAFE_WITH_CB",e[e.UNSAFE=2]="UNSAFE"})(y1t=ir.FINISH||(ir.FINISH={}));ir.ALPHA=[];for(let e=65;e<=90;e++)ir.ALPHA.push(String.fromCharCode(e)),ir.ALPHA.push(String.fromCharCode(e+32));ir.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};ir.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};ir.NUM=["0","1","2","3","4","5","6","7","8","9"];ir.ALPHANUM=ir.ALPHA.concat(ir.NUM);ir.MARK=["-","_",".","!","~","*","'","(",")"];ir.USERINFO_CHARS=ir.ALPHANUM.concat(ir.MARK).concat(["%",";",":","&","=","+","$",","]);ir.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(ir.ALPHANUM);ir.URL_CHAR=ir.STRICT_URL_CHAR.concat([" ","\f"]);for(let e=128;e<=255;e++)ir.URL_CHAR.push(e);ir.HEX=ir.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);ir.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(ir.ALPHANUM);ir.TOKEN=ir.STRICT_TOKEN.concat([" "]);ir.HEADER_CHARS=[" "];for(let e=32;e<=255;e++)e!==127&&ir.HEADER_CHARS.push(e);ir.CONNECTION_TOKEN_CHARS=ir.HEADER_CHARS.filter(e=>e!==44);ir.MAJOR=ir.NUM_MAP;ir.MINOR=ir.MAJOR;var I6;(function(e){e[e.GENERAL=0]="GENERAL",e[e.CONNECTION=1]="CONNECTION",e[e.CONTENT_LENGTH=2]="CONTENT_LENGTH",e[e.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",e[e.UPGRADE=4]="UPGRADE",e[e.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",e[e.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",e[e.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",e[e.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(I6=ir.HEADER_STATE||(ir.HEADER_STATE={}));ir.SPECIAL_HEADERS={connection:I6.CONNECTION,"content-length":I6.CONTENT_LENGTH,"proxy-connection":I6.CONNECTION,"transfer-encoding":I6.TRANSFER_ENCODING,upgrade:I6.UPGRADE}});var $ie=H((iGr,hwe)=>{"use strict";d();var{Buffer:C1t}=require("node:buffer");hwe.exports=C1t.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK07MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtXACAAQRhqQgA3AwAgAEIANwMAIABBOGpCADcDACAAQTBqQgA3AwAgAEEoakIANwMAIABBIGpCADcDACAAQRBqQgA3AwAgAEEIakIANwMAIABB3QE2AhwLBgAgABAyC5otAQt/IwBBEGsiCiQAQaTQACgCACIJRQRAQeTTACgCACIFRQRAQfDTAEJ/NwIAQejTAEKAgISAgIDAADcCAEHk0wAgCkEIakFwcUHYqtWqBXMiBTYCAEH40wBBADYCAEHI0wBBADYCAAtBzNMAQYDUBDYCAEGc0ABBgNQENgIAQbDQACAFNgIAQazQAEF/NgIAQdDTAEGArAM2AgADQCABQcjQAGogAUG80ABqIgI2AgAgAiABQbTQAGoiAzYCACABQcDQAGogAzYCACABQdDQAGogAUHE0ABqIgM2AgAgAyACNgIAIAFB2NAAaiABQczQAGoiAjYCACACIAM2AgAgAUHU0ABqIAI2AgAgAUEgaiIBQYACRw0AC0GM1ARBwasDNgIAQajQAEH00wAoAgA2AgBBmNAAQcCrAzYCAEGk0ABBiNQENgIAQcz/B0E4NgIAQYjUBCEJCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFNBEBBjNAAKAIAIgZBECAAQRNqQXBxIABBC0kbIgRBA3YiAHYiAUEDcQRAAkAgAUEBcSAAckEBcyICQQN0IgBBtNAAaiIBIABBvNAAaigCACIAKAIIIgNGBEBBjNAAIAZBfiACd3E2AgAMAQsgASADNgIIIAMgATYCDAsgAEEIaiEBIAAgAkEDdCICQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDBELQZTQACgCACIIIARPDQEgAQRAAkBBAiAAdCICQQAgAmtyIAEgAHRxaCIAQQN0IgJBtNAAaiIBIAJBvNAAaigCACICKAIIIgNGBEBBjNAAIAZBfiAAd3EiBjYCAAwBCyABIAM2AgggAyABNgIMCyACIARBA3I2AgQgAEEDdCIAIARrIQUgACACaiAFNgIAIAIgBGoiBCAFQQFyNgIEIAgEQCAIQXhxQbTQAGohAEGg0AAoAgAhAwJ/QQEgCEEDdnQiASAGcUUEQEGM0AAgASAGcjYCACAADAELIAAoAggLIgEgAzYCDCAAIAM2AgggAyAANgIMIAMgATYCCAsgAkEIaiEBQaDQACAENgIAQZTQACAFNgIADBELQZDQACgCACILRQ0BIAtoQQJ0QbzSAGooAgAiACgCBEF4cSAEayEFIAAhAgNAAkAgAigCECIBRQRAIAJBFGooAgAiAUUNAQsgASgCBEF4cSAEayIDIAVJIQIgAyAFIAIbIQUgASAAIAIbIQAgASECDAELCyAAKAIYIQkgACgCDCIDIABHBEBBnNAAKAIAGiADIAAoAggiATYCCCABIAM2AgwMEAsgAEEUaiICKAIAIgFFBEAgACgCECIBRQ0DIABBEGohAgsDQCACIQcgASIDQRRqIgIoAgAiAQ0AIANBEGohAiADKAIQIgENAAsgB0EANgIADA8LQX8hBCAAQb9/Sw0AIABBE2oiAUFwcSEEQZDQACgCACIIRQ0AQQAgBGshBQJAAkACQAJ/QQAgBEGAAkkNABpBHyAEQf///wdLDQAaIARBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgZBAnRBvNIAaigCACICRQRAQQAhAUEAIQMMAQtBACEBIARBGSAGQQF2a0EAIAZBH0cbdCEAQQAhAwNAAkAgAigCBEF4cSAEayIHIAVPDQAgAiEDIAciBQ0AQQAhBSACIQEMAwsgASACQRRqKAIAIgcgByACIABBHXZBBHFqQRBqKAIAIgJGGyABIAcbIQEgAEEBdCEAIAINAAsLIAEgA3JFBEBBACEDQQIgBnQiAEEAIABrciAIcSIARQ0DIABoQQJ0QbzSAGooAgAhAQsgAUUNAQsDQCABKAIEQXhxIARrIgIgBUkhACACIAUgABshBSABIAMgABshAyABKAIQIgAEfyAABSABQRRqKAIACyIBDQALCyADRQ0AIAVBlNAAKAIAIARrTw0AIAMoAhghByADIAMoAgwiAEcEQEGc0AAoAgAaIAAgAygCCCIBNgIIIAEgADYCDAwOCyADQRRqIgIoAgAiAUUEQCADKAIQIgFFDQMgA0EQaiECCwNAIAIhBiABIgBBFGoiAigCACIBDQAgAEEQaiECIAAoAhAiAQ0ACyAGQQA2AgAMDQtBlNAAKAIAIgMgBE8EQEGg0AAoAgAhAQJAIAMgBGsiAkEQTwRAIAEgBGoiACACQQFyNgIEIAEgA2ogAjYCACABIARBA3I2AgQMAQsgASADQQNyNgIEIAEgA2oiACAAKAIEQQFyNgIEQQAhAEEAIQILQZTQACACNgIAQaDQACAANgIAIAFBCGohAQwPC0GY0AAoAgAiAyAESwRAIAQgCWoiACADIARrIgFBAXI2AgRBpNAAIAA2AgBBmNAAIAE2AgAgCSAEQQNyNgIEIAlBCGohAQwPC0EAIQEgBAJ/QeTTACgCAARAQezTACgCAAwBC0Hw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBDGpBcHFB2KrVqgVzNgIAQfjTAEEANgIAQcjTAEEANgIAQYCABAsiACAEQccAaiIFaiIGQQAgAGsiB3EiAk8EQEH80wBBMDYCAAwPCwJAQcTTACgCACIBRQ0AQbzTACgCACIIIAJqIQAgACABTSAAIAhLcQ0AQQAhAUH80wBBMDYCAAwPC0HI0wAtAABBBHENBAJAAkAgCQRAQczTACEBA0AgASgCACIAIAlNBEAgACABKAIEaiAJSw0DCyABKAIIIgENAAsLQQAQMyIAQX9GDQUgAiEGQejTACgCACIBQQFrIgMgAHEEQCACIABrIAAgA2pBACABa3FqIQYLIAQgBk8NBSAGQf7///8HSw0FQcTTACgCACIDBEBBvNMAKAIAIgcgBmohASABIAdNDQYgASADSw0GCyAGEDMiASAARw0BDAcLIAYgA2sgB3EiBkH+////B0sNBCAGEDMhACAAIAEoAgAgASgCBGpGDQMgACEBCwJAIAYgBEHIAGpPDQAgAUF/Rg0AQezTACgCACIAIAUgBmtqQQAgAGtxIgBB/v///wdLBEAgASEADAcLIAAQM0F/RwRAIAAgBmohBiABIQAMBwtBACAGaxAzGgwECyABIgBBf0cNBQwDC0EAIQMMDAtBACEADAoLIABBf0cNAgtByNMAQcjTACgCAEEEcjYCAAsgAkH+////B0sNASACEDMhAEEAEDMhASAAQX9GDQEgAUF/Rg0BIAAgAU8NASABIABrIgYgBEE4ak0NAQtBvNMAQbzTACgCACAGaiIBNgIAQcDTACgCACABSQRAQcDTACABNgIACwJAAkACQEGk0AAoAgAiAgRAQczTACEBA0AgACABKAIAIgMgASgCBCIFakYNAiABKAIIIgENAAsMAgtBnNAAKAIAIgFBAEcgACABT3FFBEBBnNAAIAA2AgALQQAhAUHQ0wAgBjYCAEHM0wAgADYCAEGs0ABBfzYCAEGw0ABB5NMAKAIANgIAQdjTAEEANgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBeCAAa0EPcSIBIABqIgIgBkE4ayIDIAFrIgFBAXI2AgRBqNAAQfTTACgCADYCAEGY0AAgATYCAEGk0AAgAjYCACAAIANqQTg2AgQMAgsgACACTQ0AIAIgA0kNACABKAIMQQhxDQBBeCACa0EPcSIAIAJqIgNBmNAAKAIAIAZqIgcgAGsiAEEBcjYCBCABIAUgBmo2AgRBqNAAQfTTACgCADYCAEGY0AAgADYCAEGk0AAgAzYCACACIAdqQTg2AgQMAQsgAEGc0AAoAgBJBEBBnNAAIAA2AgALIAAgBmohA0HM0wAhAQJAAkACQANAIAMgASgCAEcEQCABKAIIIgENAQwCCwsgAS0ADEEIcUUNAQtBzNMAIQEDQCABKAIAIgMgAk0EQCADIAEoAgRqIgUgAksNAwsgASgCCCEBDAALAAsgASAANgIAIAEgASgCBCAGajYCBCAAQXggAGtBD3FqIgkgBEEDcjYCBCADQXggA2tBD3FqIgYgBCAJaiIEayEBIAIgBkYEQEGk0AAgBDYCAEGY0ABBmNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEDAgLQaDQACgCACAGRgRAQaDQACAENgIAQZTQAEGU0AAoAgAgAWoiADYCACAEIABBAXI2AgQgACAEaiAANgIADAgLIAYoAgQiBUEDcUEBRw0GIAVBeHEhCCAFQf8BTQRAIAVBA3YhAyAGKAIIIgAgBigCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBwsgAiAANgIIIAAgAjYCDAwGCyAGKAIYIQcgBiAGKAIMIgBHBEAgACAGKAIIIgI2AgggAiAANgIMDAULIAZBFGoiAigCACIFRQRAIAYoAhAiBUUNBCAGQRBqIQILA0AgAiEDIAUiAEEUaiICKAIAIgUNACAAQRBqIQIgACgCECIFDQALIANBADYCAAwEC0F4IABrQQ9xIgEgAGoiByAGQThrIgMgAWsiAUEBcjYCBCAAIANqQTg2AgQgAiAFQTcgBWtBD3FqQT9rIgMgAyACQRBqSRsiA0EjNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAc2AgAgA0EQakHU0wApAgA3AgAgA0HM0wApAgA3AghB1NMAIANBCGo2AgBB0NMAIAY2AgBBzNMAIAA2AgBB2NMAQQA2AgAgA0EkaiEBA0AgAUEHNgIAIAUgAUEEaiIBSw0ACyACIANGDQAgAyADKAIEQX5xNgIEIAMgAyACayIFNgIAIAIgBUEBcjYCBCAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIDcUUEQEGM0AAgASADcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEGQ0AAoAgAiA0EBIAF0IgZxRQRAIAAgAjYCAEGQ0AAgAyAGcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQMCQANAIAMiACgCBEF4cSAFRg0BIAFBHXYhAyABQQF0IQEgACADQQRxakEQaiIGKAIAIgMNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAtBmNAAKAIAIgEgBE0NAEGk0AAoAgAiACAEaiICIAEgBGsiAUEBcjYCBEGY0AAgATYCAEGk0AAgAjYCACAAIARBA3I2AgQgAEEIaiEBDAgLQQAhAUH80wBBMDYCAAwHC0EAIQALIAdFDQACQCAGKAIcIgJBAnRBvNIAaiIDKAIAIAZGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAdBEEEUIAcoAhAgBkYbaiAANgIAIABFDQELIAAgBzYCGCAGKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAGQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAIaiEBIAYgCGoiBigCBCEFCyAGIAVBfnE2AgQgASAEaiABNgIAIAQgAUEBcjYCBCABQf8BTQRAIAFBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASABQQN2dCIBcUUEQEGM0AAgASACcjYCACAADAELIAAoAggLIgEgBDYCDCAAIAQ2AgggBCAANgIMIAQgATYCCAwBC0EfIQUgAUH///8HTQRAIAFBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmohBQsgBCAFNgIcIARCADcCECAFQQJ0QbzSAGohAEGQ0AAoAgAiAkEBIAV0IgNxRQRAIAAgBDYCAEGQ0AAgAiADcjYCACAEIAA2AhggBCAENgIIIAQgBDYCDAwBCyABQRkgBUEBdmtBACAFQR9HG3QhBSAAKAIAIQACQANAIAAiAigCBEF4cSABRg0BIAVBHXYhACAFQQF0IQUgAiAAQQRxakEQaiIDKAIAIgANAAsgAyAENgIAIAQgAjYCGCAEIAQ2AgwgBCAENgIIDAELIAIoAggiACAENgIMIAIgBDYCCCAEQQA2AhggBCACNgIMIAQgADYCCAsgCUEIaiEBDAILAkAgB0UNAAJAIAMoAhwiAUECdEG80gBqIgIoAgAgA0YEQCACIAA2AgAgAA0BQZDQACAIQX4gAXdxIgg2AgAMAgsgB0EQQRQgBygCECADRhtqIAA2AgAgAEUNAQsgACAHNgIYIAMoAhAiAQRAIAAgATYCECABIAA2AhgLIANBFGooAgAiAUUNACAAQRRqIAE2AgAgASAANgIYCwJAIAVBD00EQCADIAQgBWoiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBAwBCyADIARqIgIgBUEBcjYCBCADIARBA3I2AgQgAiAFaiAFNgIAIAVB/wFNBEAgBUF4cUG00ABqIQACf0GM0AAoAgAiAUEBIAVBA3Z0IgVxRQRAQYzQACABIAVyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRBvNIAaiEAQQEgAXQiBCAIcUUEQCAAIAI2AgBBkNAAIAQgCHI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEEAkADQCAEIgAoAgRBeHEgBUYNASABQR12IQQgAUEBdCEBIAAgBEEEcWpBEGoiBigCACIEDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLIANBCGohAQwBCwJAIAlFDQACQCAAKAIcIgFBAnRBvNIAaiICKAIAIABGBEAgAiADNgIAIAMNAUGQ0AAgC0F+IAF3cTYCAAwCCyAJQRBBFCAJKAIQIABGG2ogAzYCACADRQ0BCyADIAk2AhggACgCECIBBEAgAyABNgIQIAEgAzYCGAsgAEEUaigCACIBRQ0AIANBFGogATYCACABIAM2AhgLAkAgBUEPTQRAIAAgBCAFaiIBQQNyNgIEIAAgAWoiASABKAIEQQFyNgIEDAELIAAgBGoiByAFQQFyNgIEIAAgBEEDcjYCBCAFIAdqIAU2AgAgCARAIAhBeHFBtNAAaiEBQaDQACgCACEDAn9BASAIQQN2dCICIAZxRQRAQYzQACACIAZyNgIAIAEMAQsgASgCCAsiAiADNgIMIAEgAzYCCCADIAE2AgwgAyACNgIIC0Gg0AAgBzYCAEGU0AAgBTYCAAsgAEEIaiEBCyAKQRBqJAAgAQtDACAARQRAPwBBEHQPCwJAIABB//8DcQ0AIABBAEgNACAAQRB2QAAiAEF/RgRAQfzTAEEwNgIAQX8PCyAAQRB0DwsACwvcPyIAQYAICwkBAAAAAgAAAAMAQZQICwUEAAAABQBBpAgLCQYAAAAHAAAACABB3AgLii1JbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AFJlc3BvbnNlIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zAFVzZXIgY2FsbGJhY2sgZXJyb3IAYG9uX3Jlc2V0YCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3N0YXR1c19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3ZlcnNpb25fY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl91cmxfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXRob2RfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfZmllbGRfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fbmFtZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdmVyc2lvbgBJbnZhbGlkIG1pbm9yIHZlcnNpb24ASW52YWxpZCBtYWpvciB2ZXJzaW9uAEV4cGVjdGVkIHNwYWNlIGFmdGVyIHZlcnNpb24ARXhwZWN0ZWQgQ1JMRiBhZnRlciB2ZXJzaW9uAEludmFsaWQgSFRUUCB2ZXJzaW9uAEludmFsaWQgaGVhZGVyIHRva2VuAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdXJsAEludmFsaWQgY2hhcmFjdGVycyBpbiB1cmwAVW5leHBlY3RlZCBzdGFydCBjaGFyIGluIHVybABEb3VibGUgQCBpbiB1cmwARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgARHVwbGljYXRlIENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhciBpbiB1cmwgcGF0aABDb250ZW50LUxlbmd0aCBjYW4ndCBiZSBwcmVzZW50IHdpdGggVHJhbnNmZXItRW5jb2RpbmcASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgc2l6ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl92YWx1ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlZCB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9yZXNldCBwYXVzZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fdmFsdWUgcGF1c2UAb25fc3RhdHVzX2NvbXBsZXRlIHBhdXNlAG9uX3ZlcnNpb25fY29tcGxldGUgcGF1c2UAb25fdXJsX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAG9uX21ldGhvZF9jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfZmllbGRfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUgcGF1c2UAVW5leHBlY3RlZCBzcGFjZSBhZnRlciBzdGFydCBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fbWV0aG9kAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABTV0lUQ0hfUFJPWFkAVVNFX1BST1hZAE1LQUNUSVZJVFkAVU5QUk9DRVNTQUJMRV9FTlRJVFkAQ09QWQBNT1ZFRF9QRVJNQU5FTlRMWQBUT09fRUFSTFkATk9USUZZAEZBSUxFRF9ERVBFTkRFTkNZAEJBRF9HQVRFV0FZAFBMQVkAUFVUAENIRUNLT1VUAEdBVEVXQVlfVElNRU9VVABSRVFVRVNUX1RJTUVPVVQATkVUV09SS19DT05ORUNUX1RJTUVPVVQAQ09OTkVDVElPTl9USU1FT1VUAExPR0lOX1RJTUVPVVQATkVUV09SS19SRUFEX1RJTUVPVVQAUE9TVABNSVNESVJFQ1RFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX0xPQURfQkFMQU5DRURfUkVRVUVTVABCQURfUkVRVUVTVABIVFRQX1JFUVVFU1RfU0VOVF9UT19IVFRQU19QT1JUAFJFUE9SVABJTV9BX1RFQVBPVABSRVNFVF9DT05URU5UAE5PX0NPTlRFTlQAUEFSVElBTF9DT05URU5UAEhQRV9JTlZBTElEX0NPTlNUQU5UAEhQRV9DQl9SRVNFVABHRVQASFBFX1NUUklDVABDT05GTElDVABURU1QT1JBUllfUkVESVJFQ1QAUEVSTUFORU5UX1JFRElSRUNUAENPTk5FQ1QATVVMVElfU1RBVFVTAEhQRV9JTlZBTElEX1NUQVRVUwBUT09fTUFOWV9SRVFVRVNUUwBFQVJMWV9ISU5UUwBVTkFWQUlMQUJMRV9GT1JfTEVHQUxfUkVBU09OUwBPUFRJT05TAFNXSVRDSElOR19QUk9UT0NPTFMAVkFSSUFOVF9BTFNPX05FR09USUFURVMATVVMVElQTEVfQ0hPSUNFUwBJTlRFUk5BTF9TRVJWRVJfRVJST1IAV0VCX1NFUlZFUl9VTktOT1dOX0VSUk9SAFJBSUxHVU5fRVJST1IASURFTlRJVFlfUFJPVklERVJfQVVUSEVOVElDQVRJT05fRVJST1IAU1NMX0NFUlRJRklDQVRFX0VSUk9SAElOVkFMSURfWF9GT1JXQVJERURfRk9SAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBTRUVfT1RIRVIASFBFX0NCX0NIVU5LX0hFQURFUgBNS0NBTEVOREFSAFNFVFVQAFdFQl9TRVJWRVJfSVNfRE9XTgBURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASEVVUklTVElDX0VYUElSQVRJT04ARElTQ09OTkVDVEVEX09QRVJBVElPTgBOT05fQVVUSE9SSVRBVElWRV9JTkZPUk1BVElPTgBIUEVfSU5WQUxJRF9WRVJTSU9OAEhQRV9DQl9NRVNTQUdFX0JFR0lOAFNJVEVfSVNfRlJPWkVOAEhQRV9JTlZBTElEX0hFQURFUl9UT0tFTgBJTlZBTElEX1RPS0VOAEZPUkJJRERFTgBFTkhBTkNFX1lPVVJfQ0FMTQBIUEVfSU5WQUxJRF9VUkwAQkxPQ0tFRF9CWV9QQVJFTlRBTF9DT05UUk9MAE1LQ09MAEFDTABIUEVfSU5URVJOQUwAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRV9VTk9GRklDSUFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBSRVRSWV9XSVRIAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABVUklfVE9PX0xPTkcAUFJPQ0VTU0lORwBNSVNDRUxMQU5FT1VTX1BFUlNJU1RFTlRfV0FSTklORwBNSVNDRUxMQU5FT1VTX1dBUk5JTkcASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUAQ09OVElOVUUASFBFX0NCX1NUQVRVU19DT01QTEVURQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfVkVSU0lPTl9DT01QTEVURQBIUEVfQ0JfVVJMX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8AAF4TAAAmEwAAMBAAAPAXAACdEwAAFRIAADkXAADwEgAAChAAAHUSAACtEgAAghMAAE8UAAB/EAAAoBUAACMUAACJEgAAixQAAE0VAADUEQAAzxQAABAYAADJFgAA3BYAAMERAADgFwAAuxQAAHQUAAB8FQAA5RQAAAgXAAAfEAAAZRUAAKMUAAAoFQAAAhUAAJkVAAAsEAAAixkAAE8PAADUDgAAahAAAM4QAAACFwAAiQ4AAG4TAAAcEwAAZhQAAFYXAADBEwAAzRMAAGwTAABoFwAAZhcAAF8XAAAiEwAAzg8AAGkOAADYDgAAYxYAAMsTAACqDgAAKBcAACYXAADFEwAAXRYAAOgRAABnEwAAZRMAAPIWAABzEwAAHRcAAPkWAADzEQAAzw4AAM4VAAAMEgAAsxEAAKURAABhEAAAMhcAALsTAEH5NQsBAQBBkDYL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB/TcLAQEAQZE4C14CAwICAgICAAACAgACAgACAgICAgICAgICAAQAAAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEH9OQsBAQBBkToLXgIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAQfA7Cw1sb3NlZWVwLWFsaXZlAEGJPAsBAQBBoDwL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBiT4LAQEAQaA+C+cBAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAEGwwAALXwEBAAEBAQEBAAABAQABAQABAQEBAQEBAQEBAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAEGQwgALIWVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgBBwMIACy1yYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AQfnCAAsFAQIAAQMAQZDDAAvgAQQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH5xAALBQECAAEDAEGQxQAL4AEEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv","base64")});var gwe=H((sGr,pwe)=>{"use strict";d();var{Buffer:x1t}=require("node:buffer");pwe.exports=x1t.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK77MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtzACAAQRBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAA/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQTBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQSBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQd0BNgIcCwYAIAAQMguaLQELfyMAQRBrIgokAEGk0AAoAgAiCUUEQEHk0wAoAgAiBUUEQEHw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBCGpBcHFB2KrVqgVzIgU2AgBB+NMAQQA2AgBByNMAQQA2AgALQczTAEGA1AQ2AgBBnNAAQYDUBDYCAEGw0AAgBTYCAEGs0ABBfzYCAEHQ0wBBgKwDNgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBjNQEQcGrAzYCAEGo0ABB9NMAKAIANgIAQZjQAEHAqwM2AgBBpNAAQYjUBDYCAEHM/wdBODYCAEGI1AQhCQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQewBTQRAQYzQACgCACIGQRAgAEETakFwcSAAQQtJGyIEQQN2IgB2IgFBA3EEQAJAIAFBAXEgAHJBAXMiAkEDdCIAQbTQAGoiASAAQbzQAGooAgAiACgCCCIDRgRAQYzQACAGQX4gAndxNgIADAELIAEgAzYCCCADIAE2AgwLIABBCGohASAAIAJBA3QiAkEDcjYCBCAAIAJqIgAgACgCBEEBcjYCBAwRC0GU0AAoAgAiCCAETw0BIAEEQAJAQQIgAHQiAkEAIAJrciABIAB0cWgiAEEDdCICQbTQAGoiASACQbzQAGooAgAiAigCCCIDRgRAQYzQACAGQX4gAHdxIgY2AgAMAQsgASADNgIIIAMgATYCDAsgAiAEQQNyNgIEIABBA3QiACAEayEFIAAgAmogBTYCACACIARqIgQgBUEBcjYCBCAIBEAgCEF4cUG00ABqIQBBoNAAKAIAIQMCf0EBIAhBA3Z0IgEgBnFFBEBBjNAAIAEgBnI2AgAgAAwBCyAAKAIICyIBIAM2AgwgACADNgIIIAMgADYCDCADIAE2AggLIAJBCGohAUGg0AAgBDYCAEGU0AAgBTYCAAwRC0GQ0AAoAgAiC0UNASALaEECdEG80gBqKAIAIgAoAgRBeHEgBGshBSAAIQIDQAJAIAIoAhAiAUUEQCACQRRqKAIAIgFFDQELIAEoAgRBeHEgBGsiAyAFSSECIAMgBSACGyEFIAEgACACGyEAIAEhAgwBCwsgACgCGCEJIAAoAgwiAyAARwRAQZzQACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGQ0AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbzSAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEG80gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQZTQACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBnNAAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQZTQACgCACIDIARPBEBBoNAAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GU0AAgAjYCAEGg0AAgADYCACABQQhqIQEMDwtBmNAAKAIAIgMgBEsEQCAEIAlqIgAgAyAEayIBQQFyNgIEQaTQACAANgIAQZjQACABNgIAIAkgBEEDcjYCBCAJQQhqIQEMDwtBACEBIAQCf0Hk0wAoAgAEQEHs0wAoAgAMAQtB8NMAQn83AgBB6NMAQoCAhICAgMAANwIAQeTTACAKQQxqQXBxQdiq1aoFczYCAEH40wBBADYCAEHI0wBBADYCAEGAgAQLIgAgBEHHAGoiBWoiBkEAIABrIgdxIgJPBEBB/NMAQTA2AgAMDwsCQEHE0wAoAgAiAUUNAEG80wAoAgAiCCACaiEAIAAgAU0gACAIS3ENAEEAIQFB/NMAQTA2AgAMDwtByNMALQAAQQRxDQQCQAJAIAkEQEHM0wAhAQNAIAEoAgAiACAJTQRAIAAgASgCBGogCUsNAwsgASgCCCIBDQALC0EAEDMiAEF/Rg0FIAIhBkHo0wAoAgAiAUEBayIDIABxBEAgAiAAayAAIANqQQAgAWtxaiEGCyAEIAZPDQUgBkH+////B0sNBUHE0wAoAgAiAwRAQbzTACgCACIHIAZqIQEgASAHTQ0GIAEgA0sNBgsgBhAzIgEgAEcNAQwHCyAGIANrIAdxIgZB/v///wdLDQQgBhAzIQAgACABKAIAIAEoAgRqRg0DIAAhAQsCQCAGIARByABqTw0AIAFBf0YNAEHs0wAoAgAiACAFIAZrakEAIABrcSIAQf7///8HSwRAIAEhAAwHCyAAEDNBf0cEQCAAIAZqIQYgASEADAcLQQAgBmsQMxoMBAsgASIAQX9HDQUMAwtBACEDDAwLQQAhAAwKCyAAQX9HDQILQcjTAEHI0wAoAgBBBHI2AgALIAJB/v///wdLDQEgAhAzIQBBABAzIQEgAEF/Rg0BIAFBf0YNASAAIAFPDQEgASAAayIGIARBOGpNDQELQbzTAEG80wAoAgAgBmoiATYCAEHA0wAoAgAgAUkEQEHA0wAgATYCAAsCQAJAAkBBpNAAKAIAIgIEQEHM0wAhAQNAIAAgASgCACIDIAEoAgQiBWpGDQIgASgCCCIBDQALDAILQZzQACgCACIBQQBHIAAgAU9xRQRAQZzQACAANgIAC0EAIQFB0NMAIAY2AgBBzNMAIAA2AgBBrNAAQX82AgBBsNAAQeTTACgCADYCAEHY0wBBADYCAANAIAFByNAAaiABQbzQAGoiAjYCACACIAFBtNAAaiIDNgIAIAFBwNAAaiADNgIAIAFB0NAAaiABQcTQAGoiAzYCACADIAI2AgAgAUHY0ABqIAFBzNAAaiICNgIAIAIgAzYCACABQdTQAGogAjYCACABQSBqIgFBgAJHDQALQXggAGtBD3EiASAAaiICIAZBOGsiAyABayIBQQFyNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAI2AgAgACADakE4NgIEDAILIAAgAk0NACACIANJDQAgASgCDEEIcQ0AQXggAmtBD3EiACACaiIDQZjQACgCACAGaiIHIABrIgBBAXI2AgQgASAFIAZqNgIEQajQAEH00wAoAgA2AgBBmNAAIAA2AgBBpNAAIAM2AgAgAiAHakE4NgIEDAELIABBnNAAKAIASQRAQZzQACAANgIACyAAIAZqIQNBzNMAIQECQAJAAkADQCADIAEoAgBHBEAgASgCCCIBDQEMAgsLIAEtAAxBCHFFDQELQczTACEBA0AgASgCACIDIAJNBEAgAyABKAIEaiIFIAJLDQMLIAEoAgghAQwACwALIAEgADYCACABIAEoAgQgBmo2AgQgAEF4IABrQQ9xaiIJIARBA3I2AgQgA0F4IANrQQ9xaiIGIAQgCWoiBGshASACIAZGBEBBpNAAIAQ2AgBBmNAAQZjQACgCACABaiIANgIAIAQgAEEBcjYCBAwIC0Gg0AAoAgAgBkYEQEGg0AAgBDYCAEGU0ABBlNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEIAAgBGogADYCAAwICyAGKAIEIgVBA3FBAUcNBiAFQXhxIQggBUH/AU0EQCAFQQN2IQMgBigCCCIAIAYoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAcLIAIgADYCCCAAIAI2AgwMBgsgBigCGCEHIAYgBigCDCIARwRAIAAgBigCCCICNgIIIAIgADYCDAwFCyAGQRRqIgIoAgAiBUUEQCAGKAIQIgVFDQQgBkEQaiECCwNAIAIhAyAFIgBBFGoiAigCACIFDQAgAEEQaiECIAAoAhAiBQ0ACyADQQA2AgAMBAtBeCAAa0EPcSIBIABqIgcgBkE4ayIDIAFrIgFBAXI2AgQgACADakE4NgIEIAIgBUE3IAVrQQ9xakE/ayIDIAMgAkEQakkbIgNBIzYCBEGo0ABB9NMAKAIANgIAQZjQACABNgIAQaTQACAHNgIAIANBEGpB1NMAKQIANwIAIANBzNMAKQIANwIIQdTTACADQQhqNgIAQdDTACAGNgIAQczTACAANgIAQdjTAEEANgIAIANBJGohAQNAIAFBBzYCACAFIAFBBGoiAUsNAAsgAiADRg0AIAMgAygCBEF+cTYCBCADIAMgAmsiBTYCACACIAVBAXI2AgQgBUH/AU0EQCAFQXhxQbTQAGohAAJ/QYzQACgCACIBQQEgBUEDdnQiA3FFBEBBjNAAIAEgA3I2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEG80gBqIQBBkNAAKAIAIgNBASABdCIGcUUEQCAAIAI2AgBBkNAAIAMgBnI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEDAkADQCADIgAoAgRBeHEgBUYNASABQR12IQMgAUEBdCEBIAAgA0EEcWpBEGoiBigCACIDDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLQZjQACgCACIBIARNDQBBpNAAKAIAIgAgBGoiAiABIARrIgFBAXI2AgRBmNAAIAE2AgBBpNAAIAI2AgAgACAEQQNyNgIEIABBCGohAQwIC0EAIQFB/NMAQTA2AgAMBwtBACEACyAHRQ0AAkAgBigCHCICQQJ0QbzSAGoiAygCACAGRgRAIAMgADYCACAADQFBkNAAQZDQACgCAEF+IAJ3cTYCAAwCCyAHQRBBFCAHKAIQIAZGG2ogADYCACAARQ0BCyAAIAc2AhggBigCECICBEAgACACNgIQIAIgADYCGAsgBkEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgCGohASAGIAhqIgYoAgQhBQsgBiAFQX5xNgIEIAEgBGogATYCACAEIAFBAXI2AgQgAUH/AU0EQCABQXhxQbTQAGohAAJ/QYzQACgCACICQQEgAUEDdnQiAXFFBEBBjNAAIAEgAnI2AgAgAAwBCyAAKAIICyIBIAQ2AgwgACAENgIIIAQgADYCDCAEIAE2AggMAQtBHyEFIAFB////B00EQCABQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qIQULIAQgBTYCHCAEQgA3AhAgBUECdEG80gBqIQBBkNAAKAIAIgJBASAFdCIDcUUEQCAAIAQ2AgBBkNAAIAIgA3I2AgAgBCAANgIYIAQgBDYCCCAEIAQ2AgwMAQsgAUEZIAVBAXZrQQAgBUEfRxt0IQUgACgCACEAAkADQCAAIgIoAgRBeHEgAUYNASAFQR12IQAgBUEBdCEFIAIgAEEEcWpBEGoiAygCACIADQALIAMgBDYCACAEIAI2AhggBCAENgIMIAQgBDYCCAwBCyACKAIIIgAgBDYCDCACIAQ2AgggBEEANgIYIAQgAjYCDCAEIAA2AggLIAlBCGohAQwCCwJAIAdFDQACQCADKAIcIgFBAnRBvNIAaiICKAIAIANGBEAgAiAANgIAIAANAUGQ0AAgCEF+IAF3cSIINgIADAILIAdBEEEUIAcoAhAgA0YbaiAANgIAIABFDQELIAAgBzYCGCADKAIQIgEEQCAAIAE2AhAgASAANgIYCyADQRRqKAIAIgFFDQAgAEEUaiABNgIAIAEgADYCGAsCQCAFQQ9NBEAgAyAEIAVqIgBBA3I2AgQgACADaiIAIAAoAgRBAXI2AgQMAQsgAyAEaiICIAVBAXI2AgQgAyAEQQNyNgIEIAIgBWogBTYCACAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIFcUUEQEGM0AAgASAFcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEEBIAF0IgQgCHFFBEAgACACNgIAQZDQACAEIAhyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhBAJAA0AgBCIAKAIEQXhxIAVGDQEgAUEddiEEIAFBAXQhASAAIARBBHFqQRBqIgYoAgAiBA0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIICyADQQhqIQEMAQsCQCAJRQ0AAkAgACgCHCIBQQJ0QbzSAGoiAigCACAARgRAIAIgAzYCACADDQFBkNAAIAtBfiABd3E2AgAMAgsgCUEQQRQgCSgCECAARhtqIAM2AgAgA0UNAQsgAyAJNgIYIAAoAhAiAQRAIAMgATYCECABIAM2AhgLIABBFGooAgAiAUUNACADQRRqIAE2AgAgASADNgIYCwJAIAVBD00EQCAAIAQgBWoiAUEDcjYCBCAAIAFqIgEgASgCBEEBcjYCBAwBCyAAIARqIgcgBUEBcjYCBCAAIARBA3I2AgQgBSAHaiAFNgIAIAgEQCAIQXhxQbTQAGohAUGg0AAoAgAhAwJ/QQEgCEEDdnQiAiAGcUUEQEGM0AAgAiAGcjYCACABDAELIAEoAggLIgIgAzYCDCABIAM2AgggAyABNgIMIAMgAjYCCAtBoNAAIAc2AgBBlNAAIAU2AgALIABBCGohAQsgCkEQaiQAIAELQwAgAEUEQD8AQRB0DwsCQCAAQf//A3ENACAAQQBIDQAgAEEQdkAAIgBBf0YEQEH80wBBMDYCAEF/DwsgAEEQdA8LAAsL3D8iAEGACAsJAQAAAAIAAAADAEGUCAsFBAAAAAUAQaQICwkGAAAABwAAAAgAQdwIC4otSW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwBB+TULAQEAQZA2C+ABAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQf03CwEBAEGROAteAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgBB/TkLAQEAQZE6C14CAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEHwOwsNbG9zZWVlcC1hbGl2ZQBBiTwLAQEAQaA8C+ABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQYk+CwEBAEGgPgvnAQEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZABBsMAAC18BAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBBkMIACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQcDCAAstcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQoNClNNDQoNClRUUC9DRS9UU1AvAEH5wgALBQECAAEDAEGQwwAL4AEEAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cQACwUBAgABAwBBkMUAC+ABBAEBBQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==","base64")});var eR=H((lGr,Iwe)=>{"use strict";d();var Awe=["GET","HEAD","POST"],v1t=new Set(Awe),b1t=[101,204,205,304],ywe=[301,302,303,307,308],E1t=new Set(ywe),Cwe=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],I1t=new Set(Cwe),xwe=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],T1t=new Set(xwe),w1t=["follow","manual","error"],vwe=["GET","HEAD","OPTIONS","TRACE"],_1t=new Set(vwe),S1t=["navigate","same-origin","no-cors","cors"],R1t=["omit","same-origin","include"],k1t=["default","no-store","reload","no-cache","force-cache","only-if-cached"],B1t=["content-encoding","content-language","content-location","content-type","content-length"],D1t=["half"],bwe=["CONNECT","TRACE","TRACK"],P1t=new Set(bwe),Ewe=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],N1t=new Set(Ewe);Iwe.exports={subresource:Ewe,forbiddenMethods:bwe,requestBodyHeader:B1t,referrerPolicy:xwe,requestRedirect:w1t,requestMode:S1t,requestCredentials:R1t,requestCache:k1t,redirectStatus:ywe,corsSafeListedMethods:Awe,nullBodyStatus:b1t,safeMethods:vwe,badPorts:Cwe,requestDuplex:D1t,subresourceSet:N1t,badPortsSet:I1t,redirectStatusSet:E1t,corsSafeListedMethodsSet:v1t,safeMethodsSet:_1t,forbiddenMethodsSet:P1t,referrerPolicySet:T1t}});var Yie=H((uGr,Twe)=>{"use strict";d();var zie=Symbol.for("undici.globalOrigin.1");function L1t(){return globalThis[zie]}s(L1t,"getGlobalOrigin");function F1t(e){if(e===void 0){Object.defineProperty(globalThis,zie,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${t.protocol}`);Object.defineProperty(globalThis,zie,{value:t,writable:!0,enumerable:!1,configurable:!1})}s(F1t,"setGlobalOrigin");Twe.exports={getGlobalOrigin:L1t,setGlobalOrigin:F1t}});var gu=H((mGr,Dwe)=>{"use strict";d();var VU=require("node:assert"),M1t=new TextEncoder,tR=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,Q1t=/[\u000A\u000D\u0009\u0020]/,O1t=/[\u0009\u000A\u000C\u000D\u0020]/g,U1t=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function q1t(e){VU(e.protocol==="data:");let t=Swe(e,!0);t=t.slice(5);let r={position:0},n=T6(",",t,r),i=n.length;if(n=$1t(n,!0,!0),r.position>=t.length)return"failure";r.position++;let o=t.slice(i+1),a=Rwe(o);if(/;(\u0020){0,}base64$/i.test(n)){let c=Bwe(a);if(a=G1t(c),a==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020)+$/,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let l=Kie(n);return l==="failure"&&(l=Kie("text/plain;charset=US-ASCII")),{mimeType:l,body:a}}s(q1t,"dataURLProcessor");function Swe(e,t=!1){if(!t)return e.href;let r=e.href,n=e.hash.length,i=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?i.slice(0,-1):i}s(Swe,"URLSerializer");function $U(e,t,r){let n="";for(;r.position<t.length&&e(t[r.position]);)n+=t[r.position],r.position++;return n}s($U,"collectASequenceOfCodePoints");function T6(e,t,r){let n=t.indexOf(e,r.position),i=r.position;return n===-1?(r.position=t.length,t.slice(i)):(r.position=n,t.slice(i,r.position))}s(T6,"collectASequenceOfCodePointsFast");function Rwe(e){let t=M1t.encode(e);return W1t(t)}s(Rwe,"stringPercentDecode");function wwe(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}s(wwe,"isHexCharByte");function _we(e){return e>=48&&e<=57?e-48:(e&223)-55}s(_we,"hexByteToNumber");function W1t(e){let t=e.length,r=new Uint8Array(t),n=0;for(let i=0;i<t;++i){let o=e[i];o!==37?r[n++]=o:o===37&&!(wwe(e[i+1])&&wwe(e[i+2]))?r[n++]=37:(r[n++]=_we(e[i+1])<<4|_we(e[i+2]),i+=2)}return t===n?r:r.subarray(0,n)}s(W1t,"percentDecode");function Kie(e){e=jU(e,!0,!0);let t={position:0},r=T6("/",e,t);if(r.length===0||!tR.test(r)||t.position>e.length)return"failure";t.position++;let n=T6(";",e,t);if(n=jU(n,!1,!0),n.length===0||!tR.test(n))return"failure";let i=r.toLowerCase(),o=n.toLowerCase(),a={type:i,subtype:o,parameters:new Map,essence:`${i}/${o}`};for(;t.position<e.length;){t.position++,$U(u=>Q1t.test(u),e,t);let l=$U(u=>u!==";"&&u!=="=",e,t);if(l=l.toLowerCase(),t.position<e.length){if(e[t.position]===";")continue;t.position++}if(t.position>e.length)break;let c=null;if(e[t.position]==='"')c=kwe(e,t,!0),T6(";",e,t);else if(c=T6(";",e,t),c=jU(c,!1,!0),c.length===0)continue;l.length!==0&&tR.test(l)&&(c.length===0||U1t.test(c))&&!a.parameters.has(l)&&a.parameters.set(l,c)}return a}s(Kie,"parseMIMEType");function G1t(e){e=e.replace(O1t,"");let t=e.length;if(t%4===0&&e.charCodeAt(t-1)===61&&(--t,e.charCodeAt(t-1)===61&&--t),t%4===1||/[^+/0-9A-Za-z]/.test(e.length===t?e:e.substring(0,t)))return"failure";let r=Buffer.from(e,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}s(G1t,"forgivingBase64");function kwe(e,t,r){let n=t.position,i="";for(VU(e[t.position]==='"'),t.position++;i+=$U(a=>a!=='"'&&a!=="\\",e,t),!(t.position>=e.length);){let o=e[t.position];if(t.position++,o==="\\"){if(t.position>=e.length){i+="\\";break}i+=e[t.position],t.position++}else{VU(o==='"');break}}return r?i:e.slice(n,t.position)}s(kwe,"collectAnHTTPQuotedString");function H1t(e){VU(e!=="failure");let{parameters:t,essence:r}=e,n=r;for(let[i,o]of t.entries())n+=";",n+=i,n+="=",tR.test(o)||(o=o.replace(/(\\|")/g,"\\$1"),o='"'+o,o+='"'),n+=o;return n}s(H1t,"serializeAMimeType");function j1t(e){return e===13||e===10||e===9||e===32}s(j1t,"isHTTPWhiteSpace");function jU(e,t=!0,r=!0){return Jie(e,t,r,j1t)}s(jU,"removeHTTPWhitespace");function V1t(e){return e===13||e===10||e===9||e===12||e===32}s(V1t,"isASCIIWhitespace");function $1t(e,t=!0,r=!0){return Jie(e,t,r,V1t)}s($1t,"removeASCIIWhitespace");function Jie(e,t,r,n){let i=0,o=e.length-1;if(t)for(;i<e.length&&n(e.charCodeAt(i));)i++;if(r)for(;o>0&&n(e.charCodeAt(o));)o--;return i===0&&o===e.length-1?e:e.slice(i,o+1)}s(Jie,"removeChars");function Bwe(e){let t=e.length;if(65535>t)return String.fromCharCode.apply(null,e);let r="",n=0,i=65535;for(;n<t;)n+i>t&&(i=t-n),r+=String.fromCharCode.apply(null,e.subarray(n,n+=i));return r}s(Bwe,"isomorphicDecode");function z1t(e){switch(e.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return e.subtype.endsWith("+json")?"application/json":e.subtype.endsWith("+xml")?"application/xml":""}s(z1t,"minimizeSupportedMimeType");Dwe.exports={dataURLProcessor:q1t,URLSerializer:Swe,collectASequenceOfCodePoints:$U,collectASequenceOfCodePointsFast:T6,stringPercentDecode:Rwe,parseMIMEType:Kie,collectAnHTTPQuotedString:kwe,serializeAMimeType:H1t,removeChars:Jie,removeHTTPWhitespace:jU,minimizeSupportedMimeType:z1t,HTTP_TOKEN_CODEPOINTS:tR,isomorphicDecode:Bwe}});var dc=H((gGr,Pwe)=>{"use strict";d();var{types:xg,inspect:Y1t}=require("node:util"),{markAsUncloneable:K1t}=require("node:worker_threads"),{toUSVString:J1t}=yi(),Yt={};Yt.converters={};Yt.util={};Yt.errors={};Yt.errors.exception=function(e){return new TypeError(`${e.header}: ${e.message}`)};Yt.errors.conversionFailed=function(e){let t=e.types.length===1?"":" one of",r=`${e.argument} could not be converted to${t}: ${e.types.join(", ")}.`;return Yt.errors.exception({header:e.prefix,message:r})};Yt.errors.invalidArgument=function(e){return Yt.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})};Yt.brandCheck=function(e,t,r){if(r?.strict!==!1){if(!(e instanceof t)){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}else if(e?.[Symbol.toStringTag]!==t.prototype[Symbol.toStringTag]){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}};Yt.argumentLengthCheck=function({length:e},t,r){if(e<t)throw Yt.errors.exception({message:`${t} argument${t!==1?"s":""} required, but${e?" only":""} ${e} found.`,header:r})};Yt.illegalConstructor=function(){throw Yt.errors.exception({header:"TypeError",message:"Illegal constructor"})};Yt.util.Type=function(e){switch(typeof e){case"undefined":return"Undefined";case"boolean":return"Boolean";case"string":return"String";case"symbol":return"Symbol";case"number":return"Number";case"bigint":return"BigInt";case"function":case"object":return e===null?"Null":"Object"}};Yt.util.markAsUncloneable=K1t||(()=>{});Yt.util.ConvertToInt=function(e,t,r,n){let i,o;t===64?(i=Math.pow(2,53)-1,r==="unsigned"?o=0:o=Math.pow(-2,53)+1):r==="unsigned"?(o=0,i=Math.pow(2,t)-1):(o=Math.pow(-2,t)-1,i=Math.pow(2,t-1)-1);let a=Number(e);if(a===0&&(a=0),n?.enforceRange===!0){if(Number.isNaN(a)||a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY)throw Yt.errors.exception({header:"Integer conversion",message:`Could not convert ${Yt.util.Stringify(e)} to an integer.`});if(a=Yt.util.IntegerPart(a),a<o||a>i)throw Yt.errors.exception({header:"Integer conversion",message:`Value must be between ${o}-${i}, got ${a}.`});return a}return!Number.isNaN(a)&&n?.clamp===!0?(a=Math.min(Math.max(a,o),i),Math.floor(a)%2===0?a=Math.floor(a):a=Math.ceil(a),a):Number.isNaN(a)||a===0&&Object.is(0,a)||a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY?0:(a=Yt.util.IntegerPart(a),a=a%Math.pow(2,t),r==="signed"&&a>=Math.pow(2,t)-1?a-Math.pow(2,t):a)};Yt.util.IntegerPart=function(e){let t=Math.floor(Math.abs(e));return e<0?-1*t:t};Yt.util.Stringify=function(e){switch(Yt.util.Type(e)){case"Symbol":return`Symbol(${e.description})`;case"Object":return Y1t(e);case"String":return`"${e}"`;default:return`${e}`}};Yt.sequenceConverter=function(e){return(t,r,n,i)=>{if(Yt.util.Type(t)!=="Object")throw Yt.errors.exception({header:r,message:`${n} (${Yt.util.Stringify(t)}) is not iterable.`});let o=typeof i=="function"?i():t?.[Symbol.iterator]?.(),a=[],l=0;if(o===void 0||typeof o.next!="function")throw Yt.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:c,value:u}=o.next();if(c)break;a.push(e(u,r,`${n}[${l++}]`))}return a}};Yt.recordConverter=function(e,t){return(r,n,i)=>{if(Yt.util.Type(r)!=="Object")throw Yt.errors.exception({header:n,message:`${i} ("${Yt.util.Type(r)}") is not an Object.`});let o={};if(!xg.isProxy(r)){let l=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let c of l){let u=e(c,n,i),f=t(r[c],n,i);o[u]=f}return o}let a=Reflect.ownKeys(r);for(let l of a)if(Reflect.getOwnPropertyDescriptor(r,l)?.enumerable){let u=e(l,n,i),f=t(r[l],n,i);o[u]=f}return o}};Yt.interfaceConverter=function(e){return(t,r,n,i)=>{if(i?.strict!==!1&&!(t instanceof e))throw Yt.errors.exception({header:r,message:`Expected ${n} ("${Yt.util.Stringify(t)}") to be an instance of ${e.name}.`});return t}};Yt.dictionaryConverter=function(e){return(t,r,n)=>{let i=Yt.util.Type(t),o={};if(i==="Null"||i==="Undefined")return o;if(i!=="Object")throw Yt.errors.exception({header:r,message:`Expected ${t} to be one of: Null, Undefined, Object.`});for(let a of e){let{key:l,defaultValue:c,required:u,converter:f}=a;if(u===!0&&!Object.hasOwn(t,l))throw Yt.errors.exception({header:r,message:`Missing required key "${l}".`});let m=t[l],h=Object.hasOwn(a,"defaultValue");if(h&&m!==null&&(m??=c()),u||h||m!==void 0){if(m=f(m,r,`${n}.${l}`),a.allowedValues&&!a.allowedValues.includes(m))throw Yt.errors.exception({header:r,message:`${m} is not an accepted type. Expected one of ${a.allowedValues.join(", ")}.`});o[l]=m}}return o}};Yt.nullableConverter=function(e){return(t,r,n)=>t===null?t:e(t,r,n)};Yt.converters.DOMString=function(e,t,r,n){if(e===null&&n?.legacyNullToEmptyString)return"";if(typeof e=="symbol")throw Yt.errors.exception({header:t,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(e)};Yt.converters.ByteString=function(e,t,r){let n=Yt.converters.DOMString(e,t,r);for(let i=0;i<n.length;i++)if(n.charCodeAt(i)>255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${i} has a value of ${n.charCodeAt(i)} which is greater than 255.`);return n};Yt.converters.USVString=J1t;Yt.converters.boolean=function(e){return!!e};Yt.converters.any=function(e){return e};Yt.converters["long long"]=function(e,t,r){return Yt.util.ConvertToInt(e,64,"signed",void 0,t,r)};Yt.converters["unsigned long long"]=function(e,t,r){return Yt.util.ConvertToInt(e,64,"unsigned",void 0,t,r)};Yt.converters["unsigned long"]=function(e,t,r){return Yt.util.ConvertToInt(e,32,"unsigned",void 0,t,r)};Yt.converters["unsigned short"]=function(e,t,r,n){return Yt.util.ConvertToInt(e,16,"unsigned",n,t,r)};Yt.converters.ArrayBuffer=function(e,t,r,n){if(Yt.util.Type(e)!=="Object"||!xg.isAnyArrayBuffer(e))throw Yt.errors.conversionFailed({prefix:t,argument:`${r} ("${Yt.util.Stringify(e)}")`,types:["ArrayBuffer"]});if(n?.allowShared===!1&&xg.isSharedArrayBuffer(e))throw Yt.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(e.resizable||e.growable)throw Yt.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return e};Yt.converters.TypedArray=function(e,t,r,n,i){if(Yt.util.Type(e)!=="Object"||!xg.isTypedArray(e)||e.constructor.name!==t.name)throw Yt.errors.conversionFailed({prefix:r,argument:`${n} ("${Yt.util.Stringify(e)}")`,types:[t.name]});if(i?.allowShared===!1&&xg.isSharedArrayBuffer(e.buffer))throw Yt.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(e.buffer.resizable||e.buffer.growable)throw Yt.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return e};Yt.converters.DataView=function(e,t,r,n){if(Yt.util.Type(e)!=="Object"||!xg.isDataView(e))throw Yt.errors.exception({header:t,message:`${r} is not a DataView.`});if(n?.allowShared===!1&&xg.isSharedArrayBuffer(e.buffer))throw Yt.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(e.buffer.resizable||e.buffer.growable)throw Yt.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return e};Yt.converters.BufferSource=function(e,t,r,n){if(xg.isAnyArrayBuffer(e))return Yt.converters.ArrayBuffer(e,t,r,{...n,allowShared:!1});if(xg.isTypedArray(e))return Yt.converters.TypedArray(e,e.constructor,t,r,{...n,allowShared:!1});if(xg.isDataView(e))return Yt.converters.DataView(e,t,r,{...n,allowShared:!1});throw Yt.errors.conversionFailed({prefix:t,argument:`${r} ("${Yt.util.Stringify(e)}")`,types:["BufferSource"]})};Yt.converters["sequence<ByteString>"]=Yt.sequenceConverter(Yt.converters.ByteString);Yt.converters["sequence<sequence<ByteString>>"]=Yt.sequenceConverter(Yt.converters["sequence<ByteString>"]);Yt.converters["record<ByteString, ByteString>"]=Yt.recordConverter(Yt.converters.ByteString,Yt.converters.ByteString);Pwe.exports={webidl:Yt}});var Tf=H((yGr,$we)=>{"use strict";d();var{Transform:X1t}=require("node:stream"),Nwe=require("node:zlib"),{redirectStatusSet:Z1t,referrerPolicySet:eAt,badPortsSet:tAt}=eR(),{getGlobalOrigin:Lwe}=Yie(),{collectASequenceOfCodePoints:Jv,collectAnHTTPQuotedString:rAt,removeChars:nAt,parseMIMEType:iAt}=gu(),{performance:oAt}=require("node:perf_hooks"),{isBlobLike:sAt,ReadableStreamFrom:aAt,isValidHTTPToken:Fwe,normalizedMethodRecordsBase:lAt}=yi(),Xv=require("node:assert"),{isUint8Array:cAt}=require("node:util/types"),{webidl:rR}=dc(),Mwe=[],YU;try{YU=require("node:crypto");let e=["sha256","sha384","sha512"];Mwe=YU.getHashes().filter(t=>e.includes(t))}catch{}function Qwe(e){let t=e.urlList,r=t.length;return r===0?null:t[r-1].toString()}s(Qwe,"responseURL");function uAt(e,t){if(!Z1t.has(e.status))return null;let r=e.headersList.get("location",!0);return r!==null&&Uwe(r)&&(Owe(r)||(r=fAt(r)),r=new URL(r,Qwe(e))),r&&!r.hash&&(r.hash=t),r}s(uAt,"responseLocationURL");function Owe(e){for(let t=0;t<e.length;++t){let r=e.charCodeAt(t);if(r>126||r<32)return!1}return!0}s(Owe,"isValidEncodedURL");function fAt(e){return Buffer.from(e,"binary").toString("utf8")}s(fAt,"normalizeBinaryStringToUtf8");function iR(e){return e.urlList[e.urlList.length-1]}s(iR,"requestCurrentURL");function dAt(e){let t=iR(e);return jwe(t)&&tAt.has(t.port)?"blocked":"allowed"}s(dAt,"requestBadPort");function mAt(e){return e instanceof Error||e?.constructor?.name==="Error"||e?.constructor?.name==="DOMException"}s(mAt,"isErrorLike");function hAt(e){for(let t=0;t<e.length;++t){let r=e.charCodeAt(t);if(!(r===9||r>=32&&r<=126||r>=128&&r<=255))return!1}return!0}s(hAt,"isValidReasonPhrase");var pAt=Fwe;function Uwe(e){return(e[0]===" "||e[0]===" "||e[e.length-1]===" "||e[e.length-1]===" "||e.includes(`
`)||e.includes("\r")||e.includes("\0"))===!1}s(Uwe,"isValidHeaderValue");function gAt(e,t){let{headersList:r}=t,n=(r.get("referrer-policy",!0)??"").split(","),i="";if(n.length>0)for(let o=n.length;o!==0;o--){let a=n[o-1].trim();if(eAt.has(a)){i=a;break}}i!==""&&(e.referrerPolicy=i)}s(gAt,"setRequestReferrerPolicyOnRedirect");function AAt(){return"allowed"}s(AAt,"crossOriginResourcePolicyCheck");function yAt(){return"success"}s(yAt,"corsCheck");function CAt(){return"success"}s(CAt,"TAOCheck");function xAt(e){let t=null;t=e.mode,e.headersList.set("sec-fetch-mode",t,!0)}s(xAt,"appendFetchMetadata");function vAt(e){let t=e.origin;if(!(t==="client"||t===void 0)){if(e.responseTainting==="cors"||e.mode==="websocket")e.headersList.append("origin",t,!0);else if(e.method!=="GET"&&e.method!=="HEAD"){switch(e.referrerPolicy){case"no-referrer":t=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":e.origin&&Zie(e.origin)&&!Zie(iR(e))&&(t=null);break;case"same-origin":KU(e,iR(e))||(t=null);break;default:}e.headersList.append("origin",t,!0)}}}s(vAt,"appendRequestOriginHeader");function w6(e,t){return e}s(w6,"coarsenTime");function bAt(e,t,r){return!e?.startTime||e.startTime<t?{domainLookupStartTime:t,domainLookupEndTime:t,connectionStartTime:t,connectionEndTime:t,secureConnectionStartTime:t,ALPNNegotiatedProtocol:e?.ALPNNegotiatedProtocol}:{domainLookupStartTime:w6(e.domainLookupStartTime,r),domainLookupEndTime:w6(e.domainLookupEndTime,r),connectionStartTime:w6(e.connectionStartTime,r),connectionEndTime:w6(e.connectionEndTime,r),secureConnectionStartTime:w6(e.secureConnectionStartTime,r),ALPNNegotiatedProtocol:e.ALPNNegotiatedProtocol}}s(bAt,"clampAndCoarsenConnectionTimingInfo");function EAt(e){return w6(oAt.now(),e)}s(EAt,"coarsenedSharedCurrentTime");function IAt(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}s(IAt,"createOpaqueTimingInfo");function qwe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}s(qwe,"makePolicyContainer");function TAt(e){return{referrerPolicy:e.referrerPolicy}}s(TAt,"clonePolicyContainer");function wAt(e){let t=e.referrerPolicy;Xv(t);let r=null;if(e.referrer==="client"){let l=Lwe();if(!l||l.origin==="null")return"no-referrer";r=new URL(l)}else e.referrer instanceof URL&&(r=e.referrer);let n=Xie(r),i=Xie(r,!0);n.toString().length>4096&&(n=i);let o=KU(e,n),a=nR(n)&&!nR(e.url);switch(t){case"origin":return i??Xie(r,!0);case"unsafe-url":return n;case"same-origin":return o?i:"no-referrer";case"origin-when-cross-origin":return o?n:i;case"strict-origin-when-cross-origin":{let l=iR(e);return KU(n,l)?n:nR(n)&&!nR(l)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return a?"no-referrer":i}}s(wAt,"determineRequestsReferrer");function Xie(e,t){return Xv(e instanceof URL),e=new URL(e),e.protocol==="file:"||e.protocol==="about:"||e.protocol==="blank:"?"no-referrer":(e.username="",e.password="",e.hash="",t&&(e.pathname="",e.search=""),e)}s(Xie,"stripURLForReferrer");function nR(e){if(!(e instanceof URL))return!1;if(e.href==="about:blank"||e.href==="about:srcdoc"||e.protocol==="data:"||e.protocol==="file:")return!0;return t(e.origin);function t(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}s(nR,"isURLPotentiallyTrustworthy");function _At(e,t){if(YU===void 0)return!0;let r=Wwe(t);if(r==="no metadata"||r.length===0)return!0;let n=RAt(r),i=kAt(r,n);for(let o of i){let a=o.algo,l=o.hash,c=YU.createHash(a).update(e).digest("base64");if(c[c.length-1]==="="&&(c[c.length-2]==="="?c=c.slice(0,-2):c=c.slice(0,-1)),BAt(c,l))return!0}return!1}s(_At,"bytesMatch");var SAt=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function Wwe(e){let t=[],r=!0;for(let n of e.split(" ")){r=!1;let i=SAt.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let o=i.groups.algo.toLowerCase();Mwe.includes(o)&&t.push(i.groups)}return r===!0?"no metadata":t}s(Wwe,"parseMetadata");function RAt(e){let t=e[0].algo;if(t[3]==="5")return t;for(let r=1;r<e.length;++r){let n=e[r];if(n.algo[3]==="5"){t="sha512";break}else{if(t[3]==="3")continue;n.algo[3]==="3"&&(t="sha384")}}return t}s(RAt,"getStrongestMetadata");function kAt(e,t){if(e.length===1)return e;let r=0;for(let n=0;n<e.length;++n)e[n].algo===t&&(e[r++]=e[n]);return e.length=r,e}s(kAt,"filterMetadataListByAlgorithm");function BAt(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r]){if(e[r]==="+"&&t[r]==="-"||e[r]==="/"&&t[r]==="_")continue;return!1}return!0}s(BAt,"compareBase64Mixed");function DAt(e){}s(DAt,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function KU(e,t){return e.origin===t.origin&&e.origin==="null"||e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}s(KU,"sameOrigin");function PAt(){let e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}s(PAt,"createDeferredPromise");function NAt(e){return e.controller.state==="aborted"}s(NAt,"isAborted");function LAt(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}s(LAt,"isCancelled");function FAt(e){return lAt[e.toLowerCase()]??e}s(FAt,"normalizeMethod");function MAt(e){let t=JSON.stringify(e);if(t===void 0)throw new TypeError("Value is not JSON serializable");return Xv(typeof t=="string"),t}s(MAt,"serializeJavascriptValueToJSONString");var QAt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Gwe(e,t,r=0,n=1){class i{static{s(this,"FastIterableIterator")}#e;#t;#i;constructor(a,l){this.#e=a,this.#t=l,this.#i=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let a=this.#i,l=this.#e[t],c=l.length;if(a>=c)return{value:void 0,done:!0};let{[r]:u,[n]:f}=l[a];this.#i=a+1;let m;switch(this.#t){case"key":m=u;break;case"value":m=f;break;case"key+value":m=[u,f];break}return{value:m,done:!1}}}return delete i.prototype.constructor,Object.setPrototypeOf(i.prototype,QAt),Object.defineProperties(i.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${e} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(o,a){return new i(o,a)}}s(Gwe,"createIterator");function OAt(e,t,r,n=0,i=1){let o=Gwe(e,r,n,i),a={keys:{writable:!0,enumerable:!0,configurable:!0,value:s(function(){return rR.brandCheck(this,t),o(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:s(function(){return rR.brandCheck(this,t),o(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:s(function(){return rR.brandCheck(this,t),o(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:s(function(c,u=globalThis){if(rR.brandCheck(this,t),rR.argumentLengthCheck(arguments,1,`${e}.forEach`),typeof c!="function")throw new TypeError(`Failed to execute 'forEach' on '${e}': parameter 1 is not of type 'Function'.`);for(let{0:f,1:m}of o(this,"key+value"))c.call(u,m,f,this)},"forEach")}};return Object.defineProperties(t.prototype,{...a,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:a.entries.value}})}s(OAt,"iteratorMixin");async function UAt(e,t,r){let n=t,i=r,o;try{o=e.stream.getReader()}catch(a){i(a);return}try{n(await Hwe(o))}catch(a){i(a)}}s(UAt,"fullyReadBody");function qAt(e){return e instanceof ReadableStream||e[Symbol.toStringTag]==="ReadableStream"&&typeof e.tee=="function"}s(qAt,"isReadableStreamLike");function WAt(e){try{e.close(),e.byobRequest?.respond(0)}catch(t){if(!t.message.includes("Controller is already closed")&&!t.message.includes("ReadableStream is already closed"))throw t}}s(WAt,"readableStreamClose");var GAt=/[^\x00-\xFF]/;function zU(e){return Xv(!GAt.test(e)),e}s(zU,"isomorphicEncode");async function Hwe(e){let t=[],r=0;for(;;){let{done:n,value:i}=await e.read();if(n)return Buffer.concat(t,r);if(!cAt(i))throw new TypeError("Received non-Uint8Array chunk");t.push(i),r+=i.length}}s(Hwe,"readAllBytes");function HAt(e){Xv("protocol"in e);let t=e.protocol;return t==="about:"||t==="blob:"||t==="data:"}s(HAt,"urlIsLocal");function Zie(e){return typeof e=="string"&&e[5]===":"&&e[0]==="h"&&e[1]==="t"&&e[2]==="t"&&e[3]==="p"&&e[4]==="s"||e.protocol==="https:"}s(Zie,"urlHasHttpsScheme");function jwe(e){Xv("protocol"in e);let t=e.protocol;return t==="http:"||t==="https:"}s(jwe,"urlIsHttpHttpsScheme");function jAt(e,t){let r=e;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(t&&Jv(c=>c===" "||c===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,t&&Jv(c=>c===" "||c===" ",r,n);let i=Jv(c=>{let u=c.charCodeAt(0);return u>=48&&u<=57},r,n),o=i.length?Number(i):null;if(t&&Jv(c=>c===" "||c===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,t&&Jv(c=>c===" "||c===" ",r,n);let a=Jv(c=>{let u=c.charCodeAt(0);return u>=48&&u<=57},r,n),l=a.length?Number(a):null;return n.position<r.length||l===null&&o===null||o>l?"failure":{rangeStartValue:o,rangeEndValue:l}}s(jAt,"simpleRangeHeaderValue");function VAt(e,t,r){let n="bytes ";return n+=zU(`${e}`),n+="-",n+=zU(`${t}`),n+="/",n+=zU(`${r}`),n}s(VAt,"buildContentRange");var eoe=class extends X1t{static{s(this,"InflateStream")}#e;constructor(t){super(),this.#e=t}_transform(t,r,n){if(!this._inflateStream){if(t.length===0){n();return}this._inflateStream=(t[0]&15)===8?Nwe.createInflate(this.#e):Nwe.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",i=>this.destroy(i))}this._inflateStream.write(t,r,n)}_final(t){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),t()}};function $At(e){return new eoe(e)}s($At,"createInflate");function zAt(e){let t=null,r=null,n=null,i=Vwe("content-type",e);if(i===null)return"failure";for(let o of i){let a=iAt(o);a==="failure"||a.essence==="*/*"||(n=a,n.essence!==r?(t=null,n.parameters.has("charset")&&(t=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&t!==null&&n.parameters.set("charset",t))}return n??"failure"}s(zAt,"extractMimeType");function YAt(e){let t=e,r={position:0},n=[],i="";for(;r.position<t.length;){if(i+=Jv(o=>o!=='"'&&o!==",",t,r),r.position<t.length)if(t.charCodeAt(r.position)===34){if(i+=rAt(t,r),r.position<t.length)continue}else Xv(t.charCodeAt(r.position)===44),r.position++;i=nAt(i,!0,!0,o=>o===9||o===32),n.push(i),i=""}return n}s(YAt,"gettingDecodingSplitting");function Vwe(e,t){let r=t.get(e,!0);return r===null?null:YAt(r)}s(Vwe,"getDecodeSplit");var KAt=new TextDecoder;function JAt(e){return e.length===0?"":(e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3)),KAt.decode(e))}s(JAt,"utf8DecodeBytes");var toe=class{static{s(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return Lwe()}get origin(){return this.baseUrl?.origin}policyContainer=qwe()},roe=class{static{s(this,"EnvironmentSettingsObject")}settingsObject=new toe},XAt=new roe;$we.exports={isAborted:NAt,isCancelled:LAt,isValidEncodedURL:Owe,createDeferredPromise:PAt,ReadableStreamFrom:aAt,tryUpgradeRequestToAPotentiallyTrustworthyURL:DAt,clampAndCoarsenConnectionTimingInfo:bAt,coarsenedSharedCurrentTime:EAt,determineRequestsReferrer:wAt,makePolicyContainer:qwe,clonePolicyContainer:TAt,appendFetchMetadata:xAt,appendRequestOriginHeader:vAt,TAOCheck:CAt,corsCheck:yAt,crossOriginResourcePolicyCheck:AAt,createOpaqueTimingInfo:IAt,setRequestReferrerPolicyOnRedirect:gAt,isValidHTTPToken:Fwe,requestBadPort:dAt,requestCurrentURL:iR,responseURL:Qwe,responseLocationURL:uAt,isBlobLike:sAt,isURLPotentiallyTrustworthy:nR,isValidReasonPhrase:hAt,sameOrigin:KU,normalizeMethod:FAt,serializeJavascriptValueToJSONString:MAt,iteratorMixin:OAt,createIterator:Gwe,isValidHeaderName:pAt,isValidHeaderValue:Uwe,isErrorLike:mAt,fullyReadBody:UAt,bytesMatch:_At,isReadableStreamLike:qAt,readableStreamClose:WAt,isomorphicEncode:zU,urlIsLocal:HAt,urlHasHttpsScheme:Zie,urlIsHttpHttpsScheme:jwe,readAllBytes:Hwe,simpleRangeHeaderValue:jAt,buildContentRange:VAt,parseMetadata:Wwe,createInflate:$At,extractMimeType:zAt,getDecodeSplit:Vwe,utf8DecodeBytes:JAt,environmentSettingsObject:XAt}});var iC=H((vGr,zwe)=>{"use strict";d();zwe.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kDispatcher:Symbol("dispatcher")}});var ioe=H((EGr,Ywe)=>{"use strict";d();var{Blob:ZAt,File:e2t}=require("node:buffer"),{kState:FA}=iC(),{webidl:vg}=dc(),noe=class e{static{s(this,"FileLike")}constructor(t,r,n={}){let i=r,o=n.type,a=n.lastModified??Date.now();this[FA]={blobLike:t,name:i,type:o,lastModified:a}}stream(...t){return vg.brandCheck(this,e),this[FA].blobLike.stream(...t)}arrayBuffer(...t){return vg.brandCheck(this,e),this[FA].blobLike.arrayBuffer(...t)}slice(...t){return vg.brandCheck(this,e),this[FA].blobLike.slice(...t)}text(...t){return vg.brandCheck(this,e),this[FA].blobLike.text(...t)}get size(){return vg.brandCheck(this,e),this[FA].blobLike.size}get type(){return vg.brandCheck(this,e),this[FA].blobLike.type}get name(){return vg.brandCheck(this,e),this[FA].name}get lastModified(){return vg.brandCheck(this,e),this[FA].lastModified}get[Symbol.toStringTag](){return"File"}};vg.converters.Blob=vg.interfaceConverter(ZAt);function t2t(e){return e instanceof e2t||e&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&e[Symbol.toStringTag]==="File"}s(t2t,"isFileLike");Ywe.exports={FileLike:noe,isFileLike:t2t}});var sR=H((wGr,e7e)=>{"use strict";d();var{isBlobLike:JU,iteratorMixin:r2t}=Tf(),{kState:_0}=iC(),{kEnumerableProperty:_6}=yi(),{FileLike:Kwe,isFileLike:n2t}=ioe(),{webidl:es}=dc(),{File:Zwe}=require("node:buffer"),Jwe=require("node:util"),Xwe=globalThis.File??Zwe,oR=class e{static{s(this,"FormData")}constructor(t){if(es.util.markAsUncloneable(this),t!==void 0)throw es.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[_0]=[]}append(t,r,n=void 0){es.brandCheck(this,e);let i="FormData.append";if(es.argumentLengthCheck(arguments,2,i),arguments.length===3&&!JU(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");t=es.converters.USVString(t,i,"name"),r=JU(r)?es.converters.Blob(r,i,"value",{strict:!1}):es.converters.USVString(r,i,"value"),n=arguments.length===3?es.converters.USVString(n,i,"filename"):void 0;let o=ooe(t,r,n);this[_0].push(o)}delete(t){es.brandCheck(this,e);let r="FormData.delete";es.argumentLengthCheck(arguments,1,r),t=es.converters.USVString(t,r,"name"),this[_0]=this[_0].filter(n=>n.name!==t)}get(t){es.brandCheck(this,e);let r="FormData.get";es.argumentLengthCheck(arguments,1,r),t=es.converters.USVString(t,r,"name");let n=this[_0].findIndex(i=>i.name===t);return n===-1?null:this[_0][n].value}getAll(t){es.brandCheck(this,e);let r="FormData.getAll";return es.argumentLengthCheck(arguments,1,r),t=es.converters.USVString(t,r,"name"),this[_0].filter(n=>n.name===t).map(n=>n.value)}has(t){es.brandCheck(this,e);let r="FormData.has";return es.argumentLengthCheck(arguments,1,r),t=es.converters.USVString(t,r,"name"),this[_0].findIndex(n=>n.name===t)!==-1}set(t,r,n=void 0){es.brandCheck(this,e);let i="FormData.set";if(es.argumentLengthCheck(arguments,2,i),arguments.length===3&&!JU(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");t=es.converters.USVString(t,i,"name"),r=JU(r)?es.converters.Blob(r,i,"name",{strict:!1}):es.converters.USVString(r,i,"name"),n=arguments.length===3?es.converters.USVString(n,i,"name"):void 0;let o=ooe(t,r,n),a=this[_0].findIndex(l=>l.name===t);a!==-1?this[_0]=[...this[_0].slice(0,a),o,...this[_0].slice(a+1).filter(l=>l.name!==t)]:this[_0].push(o)}[Jwe.inspect.custom](t,r){let n=this[_0].reduce((o,a)=>(o[a.name]?Array.isArray(o[a.name])?o[a.name].push(a.value):o[a.name]=[o[a.name],a.value]:o[a.name]=a.value,o),{__proto__:null});r.depth??=t,r.colors??=!0;let i=Jwe.formatWithOptions(r,n);return`FormData ${i.slice(i.indexOf("]")+2)}`}};r2t("FormData",oR,_0,"name","value");Object.defineProperties(oR.prototype,{append:_6,delete:_6,get:_6,getAll:_6,has:_6,set:_6,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function ooe(e,t,r){if(typeof t!="string"){if(n2t(t)||(t=t instanceof Blob?new Xwe([t],"blob",{type:t.type}):new Kwe(t,"blob",{type:t.type})),r!==void 0){let n={type:t.type,lastModified:t.lastModified};t=t instanceof Zwe?new Xwe([t],r,n):new Kwe(t,r,n)}}return{name:e,value:t}}s(ooe,"makeEntry");e7e.exports={FormData:oR,makeEntry:ooe}});var s7e=H((RGr,o7e)=>{"use strict";d();var{isUSVString:t7e,bufferToLowerCasedHeaderName:i2t}=yi(),{utf8DecodeBytes:o2t}=Tf(),{HTTP_TOKEN_CODEPOINTS:s2t,isomorphicDecode:r7e}=gu(),{isFileLike:a2t}=ioe(),{makeEntry:l2t}=sR(),XU=require("node:assert"),{File:c2t}=require("node:buffer"),u2t=globalThis.File??c2t,f2t=Buffer.from('form-data; name="'),n7e=Buffer.from("; filename"),d2t=Buffer.from("--"),m2t=Buffer.from(`--\r
`);function h2t(e){for(let t=0;t<e.length;++t)if((e.charCodeAt(t)&-128)!==0)return!1;return!0}s(h2t,"isAsciiString");function p2t(e){let t=e.length;if(t<27||t>70)return!1;for(let r=0;r<t;++r){let n=e.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}s(p2t,"validateBoundary");function g2t(e,t){XU(t!=="failure"&&t.essence==="multipart/form-data");let r=t.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),i=[],o={position:0};for(;e[o.position]===13&&e[o.position+1]===10;)o.position+=2;let a=e.length;for(;e[a-1]===10&&e[a-2]===13;)a-=2;for(a!==e.length&&(e=e.subarray(0,a));;){if(e.subarray(o.position,o.position+n.length).equals(n))o.position+=n.length;else return"failure";if(o.position===e.length-2&&ZU(e,d2t,o)||o.position===e.length-4&&ZU(e,m2t,o))return i;if(e[o.position]!==13||e[o.position+1]!==10)return"failure";o.position+=2;let l=A2t(e,o);if(l==="failure")return"failure";let{name:c,filename:u,contentType:f,encoding:m}=l;o.position+=2;let h;{let g=e.indexOf(n.subarray(2),o.position);if(g===-1)return"failure";h=e.subarray(o.position,g-4),o.position+=h.length,m==="base64"&&(h=Buffer.from(h.toString(),"base64"))}if(e[o.position]!==13||e[o.position+1]!==10)return"failure";o.position+=2;let p;u!==null?(f??="text/plain",h2t(f)||(f=""),p=new u2t([h],u,{type:f})):p=o2t(Buffer.from(h)),XU(t7e(c)),XU(typeof p=="string"&&t7e(p)||a2t(p)),i.push(l2t(c,p,u))}}s(g2t,"multipartFormDataParser");function A2t(e,t){let r=null,n=null,i=null,o=null;for(;;){if(e[t.position]===13&&e[t.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:i,encoding:o};let a=S6(l=>l!==10&&l!==13&&l!==58,e,t);if(a=soe(a,!0,!0,l=>l===9||l===32),!s2t.test(a.toString())||e[t.position]!==58)return"failure";switch(t.position++,S6(l=>l===32||l===9,e,t),i2t(a)){case"content-disposition":{if(r=n=null,!ZU(e,f2t,t)||(t.position+=17,r=i7e(e,t),r===null))return"failure";if(ZU(e,n7e,t)){let l=t.position+n7e.length;if(e[l]===42&&(t.position+=1,l+=1),e[l]!==61||e[l+1]!==34||(t.position+=12,n=i7e(e,t),n===null))return"failure"}break}case"content-type":{let l=S6(c=>c!==10&&c!==13,e,t);l=soe(l,!1,!0,c=>c===9||c===32),i=r7e(l);break}case"content-transfer-encoding":{let l=S6(c=>c!==10&&c!==13,e,t);l=soe(l,!1,!0,c=>c===9||c===32),o=r7e(l);break}default:S6(l=>l!==10&&l!==13,e,t)}if(e[t.position]!==13&&e[t.position+1]!==10)return"failure";t.position+=2}}s(A2t,"parseMultipartFormDataHeaders");function i7e(e,t){XU(e[t.position-1]===34);let r=S6(n=>n!==10&&n!==13&&n!==34,e,t);return e[t.position]!==34?null:(t.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}s(i7e,"parseMultipartFormDataName");function S6(e,t,r){let n=r.position;for(;n<t.length&&e(t[n]);)++n;return t.subarray(r.position,r.position=n)}s(S6,"collectASequenceOfBytes");function soe(e,t,r,n){let i=0,o=e.length-1;if(t)for(;i<e.length&&n(e[i]);)i++;if(r)for(;o>0&&n(e[o]);)o--;return i===0&&o===e.length-1?e:e.subarray(i,o+1)}s(soe,"removeChars");function ZU(e,t,r){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[r.position+n])return!1;return!0}s(ZU,"bufferStartsWith");o7e.exports={multipartFormDataParser:g2t,validateBoundary:p2t}});var B6=H((DGr,h7e)=>{"use strict";d();var aR=yi(),{ReadableStreamFrom:y2t,isBlobLike:a7e,isReadableStreamLike:C2t,readableStreamClose:x2t,createDeferredPromise:v2t,fullyReadBody:b2t,extractMimeType:E2t,utf8DecodeBytes:u7e}=Tf(),{FormData:l7e}=sR(),{kState:k6}=iC(),{webidl:I2t}=dc(),{Blob:T2t}=require("node:buffer"),aoe=require("node:assert"),{isErrored:f7e,isDisturbed:w2t}=require("node:stream"),{isArrayBuffer:_2t}=require("node:util/types"),{serializeAMimeType:S2t}=gu(),{multipartFormDataParser:R2t}=s7e(),loe;try{let e=require("node:crypto");loe=s(t=>e.randomInt(0,t),"random")}catch{loe=s(e=>Math.floor(Math.random(e)),"random")}var eq=new TextEncoder;function k2t(){}s(k2t,"noop");var coe=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,uoe;coe&&(uoe=new FinalizationRegistry(e=>{let t=e.deref();t&&!t.locked&&!w2t(t)&&!f7e(t)&&t.cancel("Response object has been garbage collected").catch(k2t)}));function d7e(e,t=!1){let r=null;e instanceof ReadableStream?r=e:a7e(e)?r=e.stream():r=new ReadableStream({async pull(c){let u=typeof i=="string"?eq.encode(i):i;u.byteLength&&c.enqueue(u),queueMicrotask(()=>x2t(c))},start(){},type:"bytes"}),aoe(C2t(r));let n=null,i=null,o=null,a=null;if(typeof e=="string")i=e,a="text/plain;charset=UTF-8";else if(e instanceof URLSearchParams)i=e.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(_2t(e))i=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))i=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(aR.isFormDataLike(e)){let c=`----formdata-undici-0${`${loe(1e11)}`.padStart(11,"0")}`,u=`--${c}\r
Content-Disposition: form-data`;let f=s(x=>x.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),m=s(x=>x.replace(/\r?\n|\r/g,`\r
`),"normalizeLinefeeds"),h=[],p=new Uint8Array([13,10]);o=0;let g=!1;for(let[x,b]of e)if(typeof b=="string"){let E=eq.encode(u+`; name="${f(m(x))}"\r
\r
${m(b)}\r
`);h.push(E),o+=E.byteLength}else{let E=eq.encode(`${u}; name="${f(m(x))}"`+(b.name?`; filename="${f(b.name)}"`:"")+`\r
Content-Type: ${b.type||"application/octet-stream"}\r
\r
`);h.push(E,b,p),typeof b.size=="number"?o+=E.byteLength+b.size+p.byteLength:g=!0}let y=eq.encode(`--${c}--\r
`);h.push(y),o+=y.byteLength,g&&(o=null),i=e,n=s(async function*(){for(let x of h)x.stream?yield*x.stream():yield x},"action"),a=`multipart/form-data; boundary=${c}`}else if(a7e(e))i=e,o=e.size,e.type&&(a=e.type);else if(typeof e[Symbol.asyncIterator]=="function"){if(t)throw new TypeError("keepalive");if(aR.isDisturbed(e)||e.locked)throw new TypeError("Response body object should not be disturbed or locked");r=e instanceof ReadableStream?e:y2t(e)}if((typeof i=="string"||aR.isBuffer(i))&&(o=Buffer.byteLength(i)),n!=null){let c;r=new ReadableStream({async start(){c=n(e)[Symbol.asyncIterator]()},async pull(u){let{value:f,done:m}=await c.next();if(m)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!f7e(r)){let h=new Uint8Array(f);h.byteLength&&u.enqueue(h)}return u.desiredSize>0},async cancel(u){await c.return()},type:"bytes"})}return[{stream:r,source:i,length:o},a]}s(d7e,"extractBody");function B2t(e,t=!1){return e instanceof ReadableStream&&(aoe(!aR.isDisturbed(e),"The body has already been consumed."),aoe(!e.locked,"The stream is locked.")),d7e(e,t)}s(B2t,"safelyExtractBody");function D2t(e,t){let[r,n]=t.stream.tee();return coe&&uoe.register(e,new WeakRef(r)),t.stream=r,{stream:n,length:t.length,source:t.source}}s(D2t,"cloneBody");function P2t(e){if(e.aborted)throw new DOMException("The operation was aborted.","AbortError")}s(P2t,"throwIfAborted");function N2t(e){return{blob(){return R6(this,r=>{let n=c7e(this);return n===null?n="":n&&(n=S2t(n)),new T2t([r],{type:n})},e)},arrayBuffer(){return R6(this,r=>new Uint8Array(r).buffer,e)},text(){return R6(this,u7e,e)},json(){return R6(this,F2t,e)},formData(){return R6(this,r=>{let n=c7e(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let i=R2t(r,n);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let o=new l7e;return o[k6]=i,o}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),o=new l7e;for(let[a,l]of i)o.append(a,l);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},e)},bytes(){return R6(this,r=>new Uint8Array(r),e)}}}s(N2t,"bodyMixinMethods");function L2t(e){Object.assign(e.prototype,N2t(e))}s(L2t,"mixinBody");async function R6(e,t,r){if(I2t.brandCheck(e,r),m7e(e))throw new TypeError("Body is unusable: Body has already been read");P2t(e[k6]);let n=v2t(),i=s(a=>n.reject(a),"errorSteps"),o=s(a=>{try{n.resolve(t(a))}catch(l){i(l)}},"successSteps");return e[k6].body==null?(o(Buffer.allocUnsafe(0)),n.promise):(await b2t(e[k6].body,o,i),n.promise)}s(R6,"consumeBody");function m7e(e){let t=e[k6].body;return t!=null&&(t.stream.locked||aR.isDisturbed(t.stream))}s(m7e,"bodyUnusable");function F2t(e){return JSON.parse(u7e(e))}s(F2t,"parseJSONFromBytes");function c7e(e){let t=e[k6].headersList,r=E2t(t);return r==="failure"?null:r}s(c7e,"bodyMimeType");h7e.exports={extractBody:d7e,safelyExtractBody:B2t,cloneBody:D2t,mixinBody:L2t,streamRegistry:uoe,hasFinalizationRegistry:coe,bodyUnusable:m7e}});var T7e=H((LGr,I7e)=>{"use strict";d();var bn=require("node:assert"),zn=yi(),{channels:p7e}=y6(),foe=Hie(),{RequestContentLengthMismatchError:Zv,ResponseContentLengthMismatchError:M2t,RequestAbortedError:v7e,HeadersTimeoutError:Q2t,HeadersOverflowError:O2t,SocketError:sq,InformationalError:D6,BodyTimeoutError:U2t,HTTPParserError:q2t,ResponseExceededMaxSizeError:W2t}=go(),{kUrl:b7e,kReset:Au,kClient:poe,kParser:sa,kBlocking:uR,kRunning:jc,kPending:G2t,kSize:g7e,kWriting:sC,kQueue:wh,kNoRef:lR,kKeepAliveDefaultTimeout:H2t,kHostHeader:j2t,kPendingIdx:V2t,kRunningIdx:Kd,kError:Jd,kPipelining:iq,kSocket:P6,kKeepAliveTimeoutValue:aq,kMaxHeadersSize:doe,kKeepAliveMaxTimeout:$2t,kKeepAliveTimeoutThreshold:z2t,kHeadersTimeout:Y2t,kBodyTimeout:K2t,kStrictContentLength:goe,kMaxRequests:A7e,kCounter:J2t,kMaxResponseSize:X2t,kOnError:Z2t,kResume:oC,kHTTPContext:E7e}=Os(),bg=mwe(),eyt=Buffer.alloc(0),tq=Buffer[Symbol.species],rq=zn.addListener,tyt=zn.removeAllListeners,moe;async function ryt(){let e=process.env.JEST_WORKER_ID?$ie():void 0,t;try{t=await WebAssembly.compile(gwe())}catch{t=await WebAssembly.compile(e||$ie())}return await WebAssembly.instantiate(t,{env:{wasm_on_url:s((r,n,i)=>0,"wasm_on_url"),wasm_on_status:s((r,n,i)=>{bn(dl.ptr===r);let o=n-Ig+Eg.byteOffset;return dl.onStatus(new tq(Eg.buffer,o,i))||0},"wasm_on_status"),wasm_on_message_begin:s(r=>(bn(dl.ptr===r),dl.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:s((r,n,i)=>{bn(dl.ptr===r);let o=n-Ig+Eg.byteOffset;return dl.onHeaderField(new tq(Eg.buffer,o,i))||0},"wasm_on_header_field"),wasm_on_header_value:s((r,n,i)=>{bn(dl.ptr===r);let o=n-Ig+Eg.byteOffset;return dl.onHeaderValue(new tq(Eg.buffer,o,i))||0},"wasm_on_header_value"),wasm_on_headers_complete:s((r,n,i,o)=>(bn(dl.ptr===r),dl.onHeadersComplete(n,!!i,!!o)||0),"wasm_on_headers_complete"),wasm_on_body:s((r,n,i)=>{bn(dl.ptr===r);let o=n-Ig+Eg.byteOffset;return dl.onBody(new tq(Eg.buffer,o,i))||0},"wasm_on_body"),wasm_on_message_complete:s(r=>(bn(dl.ptr===r),dl.onMessageComplete()||0),"wasm_on_message_complete")}})}s(ryt,"lazyllhttp");var hoe=null,Aoe=ryt();Aoe.catch();var dl=null,Eg=null,nq=0,Ig=null,nyt=0,cR=1,N6=2|cR,oq=4|cR,yoe=8|nyt,Coe=class{static{s(this,"Parser")}constructor(t,r,{exports:n}){bn(Number.isFinite(t[doe])&&t[doe]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(bg.TYPE.RESPONSE),this.client=t,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=t[doe],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=t[X2t]}setTimeout(t,r){t!==this.timeoutValue||r&cR^this.timeoutType&cR?(this.timeout&&(foe.clearTimeout(this.timeout),this.timeout=null),t&&(r&cR?this.timeout=foe.setFastTimeout(y7e,t,new WeakRef(this)):(this.timeout=setTimeout(y7e,t,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=t):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(bn(this.ptr!=null),bn(dl==null),this.llhttp.llhttp_resume(this.ptr),bn(this.timeoutType===oq),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||eyt),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let t=this.socket.read();if(t===null)break;this.execute(t)}}execute(t){bn(this.ptr!=null),bn(dl==null),bn(!this.paused);let{socket:r,llhttp:n}=this;t.length>nq&&(Ig&&n.free(Ig),nq=Math.ceil(t.length/4096)*4096,Ig=n.malloc(nq)),new Uint8Array(n.memory.buffer,Ig,nq).set(t);try{let i;try{Eg=t,dl=this,i=n.llhttp_execute(this.ptr,Ig,t.length)}catch(a){throw a}finally{dl=null,Eg=null}let o=n.llhttp_get_error_pos(this.ptr)-Ig;if(i===bg.ERROR.PAUSED_UPGRADE)this.onUpgrade(t.slice(o));else if(i===bg.ERROR.PAUSED)this.paused=!0,r.unshift(t.slice(o));else if(i!==bg.ERROR.OK){let a=n.llhttp_get_error_reason(this.ptr),l="";if(a){let c=new Uint8Array(n.memory.buffer,a).indexOf(0);l="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,a,c).toString()+")"}throw new q2t(l,bg.ERROR[i],t.slice(o))}}catch(i){zn.destroy(r,i)}}destroy(){bn(this.ptr!=null),bn(dl==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&foe.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(t){this.statusText=t.toString()}onMessageBegin(){let{socket:t,client:r}=this;if(t.destroyed)return-1;let n=r[wh][r[Kd]];if(!n)return-1;n.onResponseStarted()}onHeaderField(t){let r=this.headers.length;(r&1)===0?this.headers.push(t):this.headers[r-1]=Buffer.concat([this.headers[r-1],t]),this.trackHeader(t.length)}onHeaderValue(t){let r=this.headers.length;(r&1)===1?(this.headers.push(t),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],t]);let n=this.headers[r-2];if(n.length===10){let i=zn.bufferToLowerCasedHeaderName(n);i==="keep-alive"?this.keepAlive+=t.toString():i==="connection"&&(this.connection+=t.toString())}else n.length===14&&zn.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=t.toString());this.trackHeader(t.length)}trackHeader(t){this.headersSize+=t,this.headersSize>=this.headersMaxSize&&zn.destroy(this.socket,new O2t)}onUpgrade(t){let{upgrade:r,client:n,socket:i,headers:o,statusCode:a}=this;bn(r),bn(n[P6]===i),bn(!i.destroyed),bn(!this.paused),bn((o.length&1)===0);let l=n[wh][n[Kd]];bn(l),bn(l.upgrade||l.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,i.unshift(t),i[sa].destroy(),i[sa]=null,i[poe]=null,i[Jd]=null,tyt(i),n[P6]=null,n[E7e]=null,n[wh][n[Kd]++]=null,n.emit("disconnect",n[b7e],[n],new D6("upgrade"));try{l.onUpgrade(a,o,i)}catch(c){zn.destroy(i,c)}n[oC]()}onHeadersComplete(t,r,n){let{client:i,socket:o,headers:a,statusText:l}=this;if(o.destroyed)return-1;let c=i[wh][i[Kd]];if(!c)return-1;if(bn(!this.upgrade),bn(this.statusCode<200),t===100)return zn.destroy(o,new sq("bad response",zn.getSocketInfo(o))),-1;if(r&&!c.upgrade)return zn.destroy(o,new sq("bad upgrade",zn.getSocketInfo(o))),-1;if(bn(this.timeoutType===N6),this.statusCode=t,this.shouldKeepAlive=n||c.method==="HEAD"&&!o[Au]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let f=c.bodyTimeout!=null?c.bodyTimeout:i[K2t];this.setTimeout(f,oq)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(c.method==="CONNECT")return bn(i[jc]===1),this.upgrade=!0,2;if(r)return bn(i[jc]===1),this.upgrade=!0,2;if(bn((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&i[iq]){let f=this.keepAlive?zn.parseKeepAliveTimeout(this.keepAlive):null;if(f!=null){let m=Math.min(f-i[z2t],i[$2t]);m<=0?o[Au]=!0:i[aq]=m}else i[aq]=i[H2t]}else o[Au]=!0;let u=c.onHeaders(t,a,this.resume,l)===!1;return c.aborted?-1:c.method==="HEAD"||t<200?1:(o[uR]&&(o[uR]=!1,i[oC]()),u?bg.ERROR.PAUSED:0)}onBody(t){let{client:r,socket:n,statusCode:i,maxResponseSize:o}=this;if(n.destroyed)return-1;let a=r[wh][r[Kd]];if(bn(a),bn(this.timeoutType===oq),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),bn(i>=200),o>-1&&this.bytesRead+t.length>o)return zn.destroy(n,new W2t),-1;if(this.bytesRead+=t.length,a.onData(t)===!1)return bg.ERROR.PAUSED}onMessageComplete(){let{client:t,socket:r,statusCode:n,upgrade:i,headers:o,contentLength:a,bytesRead:l,shouldKeepAlive:c}=this;if(r.destroyed&&(!n||c))return-1;if(i)return;bn(n>=100),bn((this.headers.length&1)===0);let u=t[wh][t[Kd]];if(bn(u),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,!(n<200)){if(u.method!=="HEAD"&&a&&l!==parseInt(a,10))return zn.destroy(r,new M2t),-1;if(u.onComplete(o),t[wh][t[Kd]++]=null,r[sC])return bn(t[jc]===0),zn.destroy(r,new D6("reset")),bg.ERROR.PAUSED;if(c){if(r[Au]&&t[jc]===0)return zn.destroy(r,new D6("reset")),bg.ERROR.PAUSED;t[iq]==null||t[iq]===1?setImmediate(()=>t[oC]()):t[oC]()}else return zn.destroy(r,new D6("reset")),bg.ERROR.PAUSED}}};function y7e(e){let{socket:t,timeoutType:r,client:n,paused:i}=e.deref();r===N6?(!t[sC]||t.writableNeedDrain||n[jc]>1)&&(bn(!i,"cannot be paused while waiting for headers"),zn.destroy(t,new Q2t)):r===oq?i||zn.destroy(t,new U2t):r===yoe&&(bn(n[jc]===0&&n[aq]),zn.destroy(t,new D6("socket idle timeout")))}s(y7e,"onParserTimeout");async function iyt(e,t){e[P6]=t,hoe||(hoe=await Aoe,Aoe=null),t[lR]=!1,t[sC]=!1,t[Au]=!1,t[uR]=!1,t[sa]=new Coe(e,t,hoe),rq(t,"error",function(n){bn(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let i=this[sa];if(n.code==="ECONNRESET"&&i.statusCode&&!i.shouldKeepAlive){i.onMessageComplete();return}this[Jd]=n,this[poe][Z2t](n)}),rq(t,"readable",function(){let n=this[sa];n&&n.readMore()}),rq(t,"end",function(){let n=this[sa];if(n.statusCode&&!n.shouldKeepAlive){n.onMessageComplete();return}zn.destroy(this,new sq("other side closed",zn.getSocketInfo(this)))}),rq(t,"close",function(){let n=this[poe],i=this[sa];i&&(!this[Jd]&&i.statusCode&&!i.shouldKeepAlive&&i.onMessageComplete(),this[sa].destroy(),this[sa]=null);let o=this[Jd]||new sq("closed",zn.getSocketInfo(this));if(n[P6]=null,n[E7e]=null,n.destroyed){bn(n[G2t]===0);let a=n[wh].splice(n[Kd]);for(let l=0;l<a.length;l++){let c=a[l];zn.errorRequest(n,c,o)}}else if(n[jc]>0&&o.code!=="UND_ERR_INFO"){let a=n[wh][n[Kd]];n[wh][n[Kd]++]=null,zn.errorRequest(n,a,o)}n[V2t]=n[Kd],bn(n[jc]===0),n.emit("disconnect",n[b7e],[n],o),n[oC]()});let r=!1;return t.on("close",()=>{r=!0}),{version:"h1",defaultPipelining:1,write(...n){return ayt(e,...n)},resume(){oyt(e)},destroy(n,i){r?queueMicrotask(i):t.destroy(n).on("close",i)},get destroyed(){return t.destroyed},busy(n){return!!(t[sC]||t[Au]||t[uR]||n&&(e[jc]>0&&!n.idempotent||e[jc]>0&&(n.upgrade||n.method==="CONNECT")||e[jc]>0&&zn.bodyLength(n.body)!==0&&(zn.isStream(n.body)||zn.isAsyncIterable(n.body)||zn.isFormDataLike(n.body))))}}}s(iyt,"connectH1");function oyt(e){let t=e[P6];if(t&&!t.destroyed){if(e[g7e]===0?!t[lR]&&t.unref&&(t.unref(),t[lR]=!0):t[lR]&&t.ref&&(t.ref(),t[lR]=!1),e[g7e]===0)t[sa].timeoutType!==yoe&&t[sa].setTimeout(e[aq],yoe);else if(e[jc]>0&&t[sa].statusCode<200&&t[sa].timeoutType!==N6){let r=e[wh][e[Kd]],n=r.headersTimeout!=null?r.headersTimeout:e[Y2t];t[sa].setTimeout(n,N6)}}}s(oyt,"resumeH1");function syt(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}s(syt,"shouldSendContentLength");function ayt(e,t){let{method:r,path:n,host:i,upgrade:o,blocking:a,reset:l}=t,{body:c,headers:u,contentLength:f}=t,m=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(zn.isFormDataLike(c)){moe||(moe=B6().extractBody);let[x,b]=moe(c);t.contentType==null&&u.push("content-type",b),c=x.stream,f=x.length}else zn.isBlobLike(c)&&t.contentType==null&&c.type&&u.push("content-type",c.type);c&&typeof c.read=="function"&&c.read(0);let h=zn.bodyLength(c);if(f=h??f,f===null&&(f=t.contentLength),f===0&&!m&&(f=null),syt(r)&&f>0&&t.contentLength!==null&&t.contentLength!==f){if(e[goe])return zn.errorRequest(e,t,new Zv),!1;process.emitWarning(new Zv)}let p=e[P6],g=s(x=>{t.aborted||t.completed||(zn.errorRequest(e,t,x||new v7e),zn.destroy(c),zn.destroy(p,new D6("aborted")))},"abort");try{t.onConnect(g)}catch(x){zn.errorRequest(e,t,x)}if(t.aborted)return!1;r==="HEAD"&&(p[Au]=!0),(o||r==="CONNECT")&&(p[Au]=!0),l!=null&&(p[Au]=l),e[A7e]&&p[J2t]++>=e[A7e]&&(p[Au]=!0),a&&(p[uR]=!0);let y=`${r} ${n} HTTP/1.1\r
`;if(typeof i=="string"?y+=`host: ${i}\r
`:y+=e[j2t],o?y+=`connection: upgrade\r
upgrade: ${o}\r
`:e[iq]&&!p[Au]?y+=`connection: keep-alive\r
`:y+=`connection: close\r
`,Array.isArray(u))for(let x=0;x<u.length;x+=2){let b=u[x+0],E=u[x+1];if(Array.isArray(E))for(let _=0;_<E.length;_++)y+=`${b}: ${E[_]}\r
`;else y+=`${b}: ${E}\r
`}return p7e.sendHeaders.hasSubscribers&&p7e.sendHeaders.publish({request:t,headers:y,socket:p}),!c||h===0?C7e(g,null,e,t,p,f,y,m):zn.isBuffer(c)?C7e(g,c,e,t,p,f,y,m):zn.isBlobLike(c)?typeof c.stream=="function"?x7e(g,c.stream(),e,t,p,f,y,m):cyt(g,c,e,t,p,f,y,m):zn.isStream(c)?lyt(g,c,e,t,p,f,y,m):zn.isIterable(c)?x7e(g,c,e,t,p,f,y,m):bn(!1),!0}s(ayt,"writeH1");function lyt(e,t,r,n,i,o,a,l){bn(o!==0||r[jc]===0,"stream body cannot be pipelined");let c=!1,u=new lq({abort:e,socket:i,request:n,contentLength:o,client:r,expectsPayload:l,header:a}),f=s(function(g){if(!c)try{!u.write(g)&&this.pause&&this.pause()}catch(y){zn.destroy(this,y)}},"onData"),m=s(function(){c||t.resume&&t.resume()},"onDrain"),h=s(function(){if(queueMicrotask(()=>{t.removeListener("error",p)}),!c){let g=new v7e;queueMicrotask(()=>p(g))}},"onClose"),p=s(function(g){if(!c){if(c=!0,bn(i.destroyed||i[sC]&&r[jc]<=1),i.off("drain",m).off("error",p),t.removeListener("data",f).removeListener("end",p).removeListener("close",h),!g)try{u.end()}catch(y){g=y}u.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?zn.destroy(t,g):zn.destroy(t)}},"onFinished");t.on("data",f).on("end",p).on("error",p).on("close",h),t.resume&&t.resume(),i.on("drain",m).on("error",p),t.errorEmitted??t.errored?setImmediate(()=>p(t.errored)):(t.endEmitted??t.readableEnded)&&setImmediate(()=>p(null)),(t.closeEmitted??t.closed)&&setImmediate(h)}s(lyt,"writeStream");function C7e(e,t,r,n,i,o,a,l){try{t?zn.isBuffer(t)&&(bn(o===t.byteLength,"buffer body must have content length"),i.cork(),i.write(`${a}content-length: ${o}\r
\r
`,"latin1"),i.write(t),i.uncork(),n.onBodySent(t),!l&&n.reset!==!1&&(i[Au]=!0)):o===0?i.write(`${a}content-length: 0\r
\r
`,"latin1"):(bn(o===null,"no body must not have content length"),i.write(`${a}\r
`,"latin1")),n.onRequestSent(),r[oC]()}catch(c){e(c)}}s(C7e,"writeBuffer");async function cyt(e,t,r,n,i,o,a,l){bn(o===t.size,"blob body must have content length");try{if(o!=null&&o!==t.size)throw new Zv;let c=Buffer.from(await t.arrayBuffer());i.cork(),i.write(`${a}content-length: ${o}\r
\r
`,"latin1"),i.write(c),i.uncork(),n.onBodySent(c),n.onRequestSent(),!l&&n.reset!==!1&&(i[Au]=!0),r[oC]()}catch(c){e(c)}}s(cyt,"writeBlob");async function x7e(e,t,r,n,i,o,a,l){bn(o!==0||r[jc]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let h=c;c=null,h()}}s(u,"onDrain");let f=s(()=>new Promise((h,p)=>{bn(c===null),i[Jd]?p(i[Jd]):c=h}),"waitForDrain");i.on("close",u).on("drain",u);let m=new lq({abort:e,socket:i,request:n,contentLength:o,client:r,expectsPayload:l,header:a});try{for await(let h of t){if(i[Jd])throw i[Jd];m.write(h)||await f()}m.end()}catch(h){m.destroy(h)}finally{i.off("close",u).off("drain",u)}}s(x7e,"writeIterable");var lq=class{static{s(this,"AsyncWriter")}constructor({abort:t,socket:r,request:n,contentLength:i,client:o,expectsPayload:a,header:l}){this.socket=r,this.request=n,this.contentLength=i,this.client=o,this.bytesWritten=0,this.expectsPayload=a,this.header=l,this.abort=t,r[sC]=!0}write(t){let{socket:r,request:n,contentLength:i,client:o,bytesWritten:a,expectsPayload:l,header:c}=this;if(r[Jd])throw r[Jd];if(r.destroyed)return!1;let u=Buffer.byteLength(t);if(!u)return!0;if(i!==null&&a+u>i){if(o[goe])throw new Zv;process.emitWarning(new Zv)}r.cork(),a===0&&(!l&&n.reset!==!1&&(r[Au]=!0),i===null?r.write(`${c}transfer-encoding: chunked\r
`,"latin1"):r.write(`${c}content-length: ${i}\r
\r
`,"latin1")),i===null&&r.write(`\r
${u.toString(16)}\r
`,"latin1"),this.bytesWritten+=u;let f=r.write(t);return r.uncork(),n.onBodySent(t),f||r[sa].timeout&&r[sa].timeoutType===N6&&r[sa].timeout.refresh&&r[sa].timeout.refresh(),f}end(){let{socket:t,contentLength:r,client:n,bytesWritten:i,expectsPayload:o,header:a,request:l}=this;if(l.onRequestSent(),t[sC]=!1,t[Jd])throw t[Jd];if(!t.destroyed){if(i===0?o?t.write(`${a}content-length: 0\r
\r
`,"latin1"):t.write(`${a}\r
`,"latin1"):r===null&&t.write(`\r
0\r
\r
`,"latin1"),r!==null&&i!==r){if(n[goe])throw new Zv;process.emitWarning(new Zv)}t[sa].timeout&&t[sa].timeoutType===N6&&t[sa].timeout.refresh&&t[sa].timeout.refresh(),n[oC]()}}destroy(t){let{socket:r,client:n,abort:i}=this;r[sC]=!1,t&&(bn(n[jc]<=1,"pipeline should only contain this request"),i(t))}};I7e.exports=iyt});var P7e=H((QGr,D7e)=>{"use strict";d();var Xd=require("node:assert"),{pipeline:uyt}=require("node:stream"),Fi=yi(),{RequestContentLengthMismatchError:xoe,RequestAbortedError:w7e,SocketError:fR,InformationalError:voe}=go(),{kUrl:cq,kReset:fq,kClient:L6,kRunning:dq,kPending:fyt,kQueue:aC,kPendingIdx:boe,kRunningIdx:_h,kError:Rh,kSocket:Ll,kStrictContentLength:dyt,kOnError:Eoe,kMaxConcurrentStreams:B7e,kHTTP2Session:Sh,kResume:lC,kSize:myt,kHTTPContext:hyt}=Os(),MA=Symbol("open streams"),_7e,S7e=!1,uq;try{uq=require("node:http2")}catch{uq={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:pyt,HTTP2_HEADER_METHOD:gyt,HTTP2_HEADER_PATH:Ayt,HTTP2_HEADER_SCHEME:yyt,HTTP2_HEADER_CONTENT_LENGTH:Cyt,HTTP2_HEADER_EXPECT:xyt,HTTP2_HEADER_STATUS:vyt}}=uq;function byt(e){let t=[];for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let i of n)t.push(Buffer.from(r),Buffer.from(i));else t.push(Buffer.from(r),Buffer.from(n));return t}s(byt,"parseH2Headers");async function Eyt(e,t){e[Ll]=t,S7e||(S7e=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=uq.connect(e[cq],{createConnection:s(()=>t,"createConnection"),peerMaxConcurrentStreams:e[B7e]});r[MA]=0,r[L6]=e,r[Ll]=t,Fi.addListener(r,"error",Tyt),Fi.addListener(r,"frameError",wyt),Fi.addListener(r,"end",_yt),Fi.addListener(r,"goaway",Syt),Fi.addListener(r,"close",function(){let{[L6]:i}=this,{[Ll]:o}=i,a=this[Ll][Rh]||this[Rh]||new fR("closed",Fi.getSocketInfo(o));if(i[Sh]=null,i.destroyed){Xd(i[fyt]===0);let l=i[aC].splice(i[_h]);for(let c=0;c<l.length;c++){let u=l[c];Fi.errorRequest(i,u,a)}}}),r.unref(),e[Sh]=r,t[Sh]=r,Fi.addListener(t,"error",function(i){Xd(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Rh]=i,this[L6][Eoe](i)}),Fi.addListener(t,"end",function(){Fi.destroy(this,new fR("other side closed",Fi.getSocketInfo(this)))}),Fi.addListener(t,"close",function(){let i=this[Rh]||new fR("closed",Fi.getSocketInfo(this));e[Ll]=null,this[Sh]!=null&&this[Sh].destroy(i),e[boe]=e[_h],Xd(e[dq]===0),e.emit("disconnect",e[cq],[e],i),e[lC]()});let n=!1;return t.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return kyt(e,...i)},resume(){Iyt(e)},destroy(i,o){n?queueMicrotask(o):t.destroy(i).on("close",o)},get destroyed(){return t.destroyed},busy(){return!1}}}s(Eyt,"connectH2");function Iyt(e){let t=e[Ll];t?.destroyed===!1&&(e[myt]===0&&e[B7e]===0?(t.unref(),e[Sh].unref()):(t.ref(),e[Sh].ref()))}s(Iyt,"resumeH2");function Tyt(e){Xd(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ll][Rh]=e,this[L6][Eoe](e)}s(Tyt,"onHttp2SessionError");function wyt(e,t,r){if(r===0){let n=new voe(`HTTP/2: "frameError" received - type ${e}, code ${t}`);this[Ll][Rh]=n,this[L6][Eoe](n)}}s(wyt,"onHttp2FrameError");function _yt(){let e=new fR("other side closed",Fi.getSocketInfo(this[Ll]));this.destroy(e),Fi.destroy(this[Ll],e)}s(_yt,"onHttp2SessionEnd");function Syt(e){let t=this[Rh]||new fR(`HTTP/2: "GOAWAY" frame received with code ${e}`,Fi.getSocketInfo(this)),r=this[L6];if(r[Ll]=null,r[hyt]=null,this[Sh]!=null&&(this[Sh].destroy(t),this[Sh]=null),Fi.destroy(this[Ll],t),r[_h]<r[aC].length){let n=r[aC][r[_h]];r[aC][r[_h]++]=null,Fi.errorRequest(r,n,t),r[boe]=r[_h]}Xd(r[dq]===0),r.emit("disconnect",r[cq],[r],t),r[lC]()}s(Syt,"onHTTP2GoAway");function Ryt(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}s(Ryt,"shouldSendContentLength");function kyt(e,t){let r=e[Sh],{method:n,path:i,host:o,upgrade:a,expectContinue:l,signal:c,headers:u}=t,{body:f}=t;if(a)return Fi.errorRequest(e,t,new Error("Upgrade not supported for H2")),!1;let m={};for(let k=0;k<u.length;k+=2){let B=u[k+0],N=u[k+1];if(Array.isArray(N))for(let M=0;M<N.length;M++)m[B]?m[B]+=`,${N[M]}`:m[B]=N[M];else m[B]=N}let h,{hostname:p,port:g}=e[cq];m[pyt]=o||`${p}${g?`:${g}`:""}`,m[gyt]=n;let y=s(k=>{t.aborted||t.completed||(k=k||new w7e,Fi.errorRequest(e,t,k),h!=null&&Fi.destroy(h,k),Fi.destroy(f,k),e[aC][e[_h]++]=null,e[lC]())},"abort");try{t.onConnect(y)}catch(k){Fi.errorRequest(e,t,k)}if(t.aborted)return!1;if(n==="CONNECT")return r.ref(),h=r.request(m,{endStream:!1,signal:c}),h.id&&!h.pending?(t.onUpgrade(null,null,h),++r[MA],e[aC][e[_h]++]=null):h.once("ready",()=>{t.onUpgrade(null,null,h),++r[MA],e[aC][e[_h]++]=null}),h.once("close",()=>{r[MA]-=1,r[MA]===0&&r.unref()}),!0;m[Ayt]=i,m[yyt]="https";let x=n==="PUT"||n==="POST"||n==="PATCH";f&&typeof f.read=="function"&&f.read(0);let b=Fi.bodyLength(f);if(Fi.isFormDataLike(f)){_7e??=B6().extractBody;let[k,B]=_7e(f);m["content-type"]=B,f=k.stream,b=k.length}if(b==null&&(b=t.contentLength),(b===0||!x)&&(b=null),Ryt(n)&&b>0&&t.contentLength!=null&&t.contentLength!==b){if(e[dyt])return Fi.errorRequest(e,t,new xoe),!1;process.emitWarning(new xoe)}b!=null&&(Xd(f,"no body must not have content length"),m[Cyt]=`${b}`),r.ref();let E=n==="GET"||n==="HEAD"||f===null;return l?(m[xyt]="100-continue",h=r.request(m,{endStream:E,signal:c}),h.once("continue",_)):(h=r.request(m,{endStream:E,signal:c}),_()),++r[MA],h.once("response",k=>{let{[vyt]:B,...N}=k;if(t.onResponseStarted(),t.aborted){let M=new w7e;Fi.errorRequest(e,t,M),Fi.destroy(h,M);return}t.onHeaders(Number(B),byt(N),h.resume.bind(h),"")===!1&&h.pause(),h.on("data",M=>{t.onData(M)===!1&&h.pause()})}),h.once("end",()=>{(h.state?.state==null||h.state.state<6)&&t.onComplete([]),r[MA]===0&&r.unref(),y(new voe("HTTP/2: stream half-closed (remote)")),e[aC][e[_h]++]=null,e[boe]=e[_h],e[lC]()}),h.once("close",()=>{r[MA]-=1,r[MA]===0&&r.unref()}),h.once("error",function(k){y(k)}),h.once("frameError",(k,B)=>{y(new voe(`HTTP/2: "frameError" received - type ${k}, code ${B}`))}),!0;function _(){!f||b===0?R7e(y,h,null,e,t,e[Ll],b,x):Fi.isBuffer(f)?R7e(y,h,f,e,t,e[Ll],b,x):Fi.isBlobLike(f)?typeof f.stream=="function"?k7e(y,h,f.stream(),e,t,e[Ll],b,x):Dyt(y,h,f,e,t,e[Ll],b,x):Fi.isStream(f)?Byt(y,e[Ll],x,h,f,e,t,b):Fi.isIterable(f)?k7e(y,h,f,e,t,e[Ll],b,x):Xd(!1)}s(_,"writeBodyH2")}s(kyt,"writeH2");function R7e(e,t,r,n,i,o,a,l){try{r!=null&&Fi.isBuffer(r)&&(Xd(a===r.byteLength,"buffer body must have content length"),t.cork(),t.write(r),t.uncork(),t.end(),i.onBodySent(r)),l||(o[fq]=!0),i.onRequestSent(),n[lC]()}catch(c){e(c)}}s(R7e,"writeBuffer");function Byt(e,t,r,n,i,o,a,l){Xd(l!==0||o[dq]===0,"stream body cannot be pipelined");let c=uyt(i,n,f=>{f?(Fi.destroy(c,f),e(f)):(Fi.removeAllListeners(c),a.onRequestSent(),r||(t[fq]=!0),o[lC]())});Fi.addListener(c,"data",u);function u(f){a.onBodySent(f)}s(u,"onPipeData")}s(Byt,"writeStream");async function Dyt(e,t,r,n,i,o,a,l){Xd(a===r.size,"blob body must have content length");try{if(a!=null&&a!==r.size)throw new xoe;let c=Buffer.from(await r.arrayBuffer());t.cork(),t.write(c),t.uncork(),t.end(),i.onBodySent(c),i.onRequestSent(),l||(o[fq]=!0),n[lC]()}catch(c){e(c)}}s(Dyt,"writeBlob");async function k7e(e,t,r,n,i,o,a,l){Xd(a!==0||n[dq]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let m=c;c=null,m()}}s(u,"onDrain");let f=s(()=>new Promise((m,h)=>{Xd(c===null),o[Rh]?h(o[Rh]):c=m}),"waitForDrain");t.on("close",u).on("drain",u);try{for await(let m of r){if(o[Rh])throw o[Rh];let h=t.write(m);i.onBodySent(m),h||await f()}t.end(),i.onRequestSent(),l||(o[fq]=!0),n[lC]()}catch(m){e(m)}finally{t.off("close",u).off("drain",u)}}s(k7e,"writeIterable");D7e.exports=Eyt});var hq=H((qGr,F7e)=>{"use strict";d();var Tg=yi(),{kBodyUsed:dR}=Os(),Toe=require("node:assert"),{InvalidArgumentError:Pyt}=go(),Nyt=require("node:events"),Lyt=[300,301,302,303,307,308],N7e=Symbol("body"),mq=class{static{s(this,"BodyAsyncIterable")}constructor(t){this[N7e]=t,this[dR]=!1}async*[Symbol.asyncIterator](){Toe(!this[dR],"disturbed"),this[dR]=!0,yield*this[N7e]}},Ioe=class{static{s(this,"RedirectHandler")}constructor(t,r,n,i){if(r!=null&&(!Number.isInteger(r)||r<0))throw new Pyt("maxRedirections must be a positive number");Tg.validateHandler(i,n.method,n.upgrade),this.dispatch=t,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=r,this.handler=i,this.history=[],this.redirectionLimitReached=!1,Tg.isStream(this.opts.body)?(Tg.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){Toe(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[dR]=!1,Nyt.prototype.on.call(this.opts.body,"data",function(){this[dR]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new mq(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&Tg.isIterable(this.opts.body)&&(this.opts.body=new mq(this.opts.body))}onConnect(t){this.abort=t,this.handler.onConnect(t,{history:this.history})}onUpgrade(t,r,n){this.handler.onUpgrade(t,r,n)}onError(t){this.handler.onError(t)}onHeaders(t,r,n,i){if(this.location=this.history.length>=this.maxRedirections||Tg.isDisturbed(this.opts.body)?null:Fyt(t,r),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(new Error("max redirects")),this.redirectionLimitReached=!0,this.abort(new Error("max redirects"));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(t,r,n,i);let{origin:o,pathname:a,search:l}=Tg.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),c=l?`${a}${l}`:a;this.opts.headers=Myt(this.opts.headers,t===303,this.opts.origin!==o),this.opts.path=c,this.opts.origin=o,this.opts.maxRedirections=0,this.opts.query=null,t===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(t){if(!this.location)return this.handler.onData(t)}onComplete(t){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(t)}onBodySent(t){this.handler.onBodySent&&this.handler.onBodySent(t)}};function Fyt(e,t){if(Lyt.indexOf(e)===-1)return null;for(let r=0;r<t.length;r+=2)if(t[r].length===8&&Tg.headerNameToString(t[r])==="location")return t[r+1]}s(Fyt,"parseLocation");function L7e(e,t,r){if(e.length===4)return Tg.headerNameToString(e)==="host";if(t&&Tg.headerNameToString(e).startsWith("content-"))return!0;if(r&&(e.length===13||e.length===6||e.length===19)){let n=Tg.headerNameToString(e);return n==="authorization"||n==="cookie"||n==="proxy-authorization"}return!1}s(L7e,"shouldRemoveHeader");function Myt(e,t,r){let n=[];if(Array.isArray(e))for(let i=0;i<e.length;i+=2)L7e(e[i],t,r)||n.push(e[i],e[i+1]);else if(e&&typeof e=="object")for(let i of Object.keys(e))L7e(i,t,r)||n.push(i,e[i]);else Toe(e==null,"headers must be an object or an array");return n}s(Myt,"cleanRequestHeaders");F7e.exports=Ioe});var pq=H((HGr,M7e)=>{"use strict";d();var Qyt=hq();function Oyt({maxRedirections:e}){return t=>s(function(n,i){let{maxRedirections:o=e}=n;if(!o)return t(n,i);let a=new Qyt(t,o,n,i);return n={...n,maxRedirections:0},t(n,a)},"Intercept")}s(Oyt,"createRedirectInterceptor");M7e.exports=Oyt});var CR=H(($Gr,$7e)=>{"use strict";d();var QA=require("node:assert"),G7e=require("node:net"),Uyt=require("node:http"),eb=yi(),{channels:F6}=y6(),qyt=ewe(),Wyt=b6(),{InvalidArgumentError:Sa,InformationalError:Gyt,ClientDestroyedError:Hyt}=go(),jyt=ZS(),{kUrl:wg,kServerName:cC,kClient:Vyt,kBusy:woe,kConnect:$yt,kResuming:tb,kRunning:AR,kPending:yR,kSize:gR,kQueue:kh,kConnected:zyt,kConnecting:M6,kNeedDrain:fC,kKeepAliveDefaultTimeout:Q7e,kHostHeader:Yyt,kPendingIdx:Bh,kRunningIdx:OA,kError:Kyt,kPipelining:gq,kKeepAliveTimeoutValue:Jyt,kMaxHeadersSize:Xyt,kKeepAliveMaxTimeout:Zyt,kKeepAliveTimeoutThreshold:e5t,kHeadersTimeout:t5t,kBodyTimeout:r5t,kStrictContentLength:n5t,kConnector:mR,kMaxRedirections:i5t,kMaxRequests:_oe,kCounter:o5t,kClose:s5t,kDestroy:a5t,kDispatch:l5t,kInterceptors:O7e,kLocalAddress:hR,kMaxResponseSize:c5t,kOnError:u5t,kHTTPContext:Ra,kMaxConcurrentStreams:f5t,kResume:pR}=Os(),d5t=T7e(),m5t=P7e(),U7e=!1,uC=Symbol("kClosedResolve"),q7e=s(()=>{},"noop");function H7e(e){return e[gq]??e[Ra]?.defaultPipelining??1}s(H7e,"getPipelining");var Soe=class extends Wyt{static{s(this,"Client")}constructor(t,{interceptors:r,maxHeaderSize:n,headersTimeout:i,socketTimeout:o,requestTimeout:a,connectTimeout:l,bodyTimeout:c,idleTimeout:u,keepAlive:f,keepAliveTimeout:m,maxKeepAliveTimeout:h,keepAliveMaxTimeout:p,keepAliveTimeoutThreshold:g,socketPath:y,pipelining:x,tls:b,strictContentLength:E,maxCachedSessions:_,maxRedirections:k,connect:B,maxRequestsPerClient:N,localAddress:M,maxResponseSize:Z,autoSelectFamily:he,autoSelectFamilyAttemptTimeout:ee,maxConcurrentStreams:G,allowH2:q}={}){if(super(),f!==void 0)throw new Sa("unsupported keepAlive, use pipelining=0 instead");if(o!==void 0)throw new Sa("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(a!==void 0)throw new Sa("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(u!==void 0)throw new Sa("unsupported idleTimeout, use keepAliveTimeout instead");if(h!==void 0)throw new Sa("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(n!=null&&!Number.isFinite(n))throw new Sa("invalid maxHeaderSize");if(y!=null&&typeof y!="string")throw new Sa("invalid socketPath");if(l!=null&&(!Number.isFinite(l)||l<0))throw new Sa("invalid connectTimeout");if(m!=null&&(!Number.isFinite(m)||m<=0))throw new Sa("invalid keepAliveTimeout");if(p!=null&&(!Number.isFinite(p)||p<=0))throw new Sa("invalid keepAliveMaxTimeout");if(g!=null&&!Number.isFinite(g))throw new Sa("invalid keepAliveTimeoutThreshold");if(i!=null&&(!Number.isInteger(i)||i<0))throw new Sa("headersTimeout must be a positive integer or zero");if(c!=null&&(!Number.isInteger(c)||c<0))throw new Sa("bodyTimeout must be a positive integer or zero");if(B!=null&&typeof B!="function"&&typeof B!="object")throw new Sa("connect must be a function or an object");if(k!=null&&(!Number.isInteger(k)||k<0))throw new Sa("maxRedirections must be a positive number");if(N!=null&&(!Number.isInteger(N)||N<0))throw new Sa("maxRequestsPerClient must be a positive number");if(M!=null&&(typeof M!="string"||G7e.isIP(M)===0))throw new Sa("localAddress must be valid string IP address");if(Z!=null&&(!Number.isInteger(Z)||Z<-1))throw new Sa("maxResponseSize must be a positive number");if(ee!=null&&(!Number.isInteger(ee)||ee<-1))throw new Sa("autoSelectFamilyAttemptTimeout must be a positive number");if(q!=null&&typeof q!="boolean")throw new Sa("allowH2 must be a valid boolean value");if(G!=null&&(typeof G!="number"||G<1))throw new Sa("maxConcurrentStreams must be a positive integer, greater than 0");typeof B!="function"&&(B=jyt({...b,maxCachedSessions:_,allowH2:q,socketPath:y,timeout:l,...he?{autoSelectFamily:he,autoSelectFamilyAttemptTimeout:ee}:void 0,...B})),r?.Client&&Array.isArray(r.Client)?(this[O7e]=r.Client,U7e||(U7e=!0,process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.",{code:"UNDICI-CLIENT-INTERCEPTOR-DEPRECATED"}))):this[O7e]=[h5t({maxRedirections:k})],this[wg]=eb.parseOrigin(t),this[mR]=B,this[gq]=x??1,this[Xyt]=n||Uyt.maxHeaderSize,this[Q7e]=m??4e3,this[Zyt]=p??6e5,this[e5t]=g??2e3,this[Jyt]=this[Q7e],this[cC]=null,this[hR]=M??null,this[tb]=0,this[fC]=0,this[Yyt]=`host: ${this[wg].hostname}${this[wg].port?`:${this[wg].port}`:""}\r
`,this[r5t]=c??3e5,this[t5t]=i??3e5,this[n5t]=E??!0,this[i5t]=k,this[_oe]=N,this[uC]=null,this[c5t]=Z>-1?Z:-1,this[f5t]=G??100,this[Ra]=null,this[kh]=[],this[OA]=0,this[Bh]=0,this[pR]=ie=>Roe(this,ie),this[u5t]=ie=>j7e(this,ie)}get pipelining(){return this[gq]}set pipelining(t){this[gq]=t,this[pR](!0)}get[yR](){return this[kh].length-this[Bh]}get[AR](){return this[Bh]-this[OA]}get[gR](){return this[kh].length-this[OA]}get[zyt](){return!!this[Ra]&&!this[M6]&&!this[Ra].destroyed}get[woe](){return!!(this[Ra]?.busy(null)||this[gR]>=(H7e(this)||1)||this[yR]>0)}[$yt](t){V7e(this),this.once("connect",t)}[l5t](t,r){let n=t.origin||this[wg].origin,i=new qyt(n,t,r);return this[kh].push(i),this[tb]||(eb.bodyLength(i.body)==null&&eb.isIterable(i.body)?(this[tb]=1,queueMicrotask(()=>Roe(this))):this[pR](!0)),this[tb]&&this[fC]!==2&&this[woe]&&(this[fC]=2),this[fC]<2}async[s5t](){return new Promise(t=>{this[gR]?this[uC]=t:t(null)})}async[a5t](t){return new Promise(r=>{let n=this[kh].splice(this[Bh]);for(let o=0;o<n.length;o++){let a=n[o];eb.errorRequest(this,a,t)}let i=s(()=>{this[uC]&&(this[uC](),this[uC]=null),r(null)},"callback");this[Ra]?(this[Ra].destroy(t,i),this[Ra]=null):queueMicrotask(i),this[pR]()})}},h5t=pq();function j7e(e,t){if(e[AR]===0&&t.code!=="UND_ERR_INFO"&&t.code!=="UND_ERR_SOCKET"){QA(e[Bh]===e[OA]);let r=e[kh].splice(e[OA]);for(let n=0;n<r.length;n++){let i=r[n];eb.errorRequest(e,i,t)}QA(e[gR]===0)}}s(j7e,"onError");async function V7e(e){QA(!e[M6]),QA(!e[Ra]);let{host:t,hostname:r,protocol:n,port:i}=e[wg];if(r[0]==="["){let o=r.indexOf("]");QA(o!==-1);let a=r.substring(1,o);QA(G7e.isIP(a)),r=a}e[M6]=!0,F6.beforeConnect.hasSubscribers&&F6.beforeConnect.publish({connectParams:{host:t,hostname:r,protocol:n,port:i,version:e[Ra]?.version,servername:e[cC],localAddress:e[hR]},connector:e[mR]});try{let o=await new Promise((a,l)=>{e[mR]({host:t,hostname:r,protocol:n,port:i,servername:e[cC],localAddress:e[hR]},(c,u)=>{c?l(c):a(u)})});if(e.destroyed){eb.destroy(o.on("error",q7e),new Hyt);return}QA(o);try{e[Ra]=o.alpnProtocol==="h2"?await m5t(e,o):await d5t(e,o)}catch(a){throw o.destroy().on("error",q7e),a}e[M6]=!1,o[o5t]=0,o[_oe]=e[_oe],o[Vyt]=e,o[Kyt]=null,F6.connected.hasSubscribers&&F6.connected.publish({connectParams:{host:t,hostname:r,protocol:n,port:i,version:e[Ra]?.version,servername:e[cC],localAddress:e[hR]},connector:e[mR],socket:o}),e.emit("connect",e[wg],[e])}catch(o){if(e.destroyed)return;if(e[M6]=!1,F6.connectError.hasSubscribers&&F6.connectError.publish({connectParams:{host:t,hostname:r,protocol:n,port:i,version:e[Ra]?.version,servername:e[cC],localAddress:e[hR]},connector:e[mR],error:o}),o.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(QA(e[AR]===0);e[yR]>0&&e[kh][e[Bh]].servername===e[cC];){let a=e[kh][e[Bh]++];eb.errorRequest(e,a,o)}else j7e(e,o);e.emit("connectionError",e[wg],[e],o)}e[pR]()}s(V7e,"connect");function W7e(e){e[fC]=0,e.emit("drain",e[wg],[e])}s(W7e,"emitDrain");function Roe(e,t){e[tb]!==2&&(e[tb]=2,p5t(e,t),e[tb]=0,e[OA]>256&&(e[kh].splice(0,e[OA]),e[Bh]-=e[OA],e[OA]=0))}s(Roe,"resume");function p5t(e,t){for(;;){if(e.destroyed){QA(e[yR]===0);return}if(e[uC]&&!e[gR]){e[uC](),e[uC]=null;return}if(e[Ra]&&e[Ra].resume(),e[woe])e[fC]=2;else if(e[fC]===2){t?(e[fC]=1,queueMicrotask(()=>W7e(e))):W7e(e);continue}if(e[yR]===0||e[AR]>=(H7e(e)||1))return;let r=e[kh][e[Bh]];if(e[wg].protocol==="https:"&&e[cC]!==r.servername){if(e[AR]>0)return;e[cC]=r.servername,e[Ra]?.destroy(new Gyt("servername changed"),()=>{e[Ra]=null,Roe(e)})}if(e[M6])return;if(!e[Ra]){V7e(e);return}if(e[Ra].destroyed||e[Ra].busy(r))return;!r.aborted&&e[Ra].write(r)?e[Bh]++:e[kh].splice(e[Bh],1)}}s(p5t,"_resume");$7e.exports=Soe});var koe=H((JGr,z7e)=>{"use strict";d();var Aq=class{static{s(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(t){this.list[this.top]=t,this.top=this.top+1&2047}shift(){let t=this.list[this.bottom];return t===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,t)}};z7e.exports=class{static{s(this,"FixedQueue")}constructor(){this.head=this.tail=new Aq}isEmpty(){return this.head.isEmpty()}push(t){this.head.isFull()&&(this.head=this.head.next=new Aq),this.head.push(t)}shift(){let t=this.tail,r=t.shift();return t.isEmpty()&&t.next!==null&&(this.tail=t.next),r}}});var K7e=H((eHr,Y7e)=>{d();var{kFree:g5t,kConnected:A5t,kPending:y5t,kQueued:C5t,kRunning:x5t,kSize:v5t}=Os(),rb=Symbol("pool"),Boe=class{static{s(this,"PoolStats")}constructor(t){this[rb]=t}get connected(){return this[rb][A5t]}get free(){return this[rb][g5t]}get pending(){return this[rb][y5t]}get queued(){return this[rb][C5t]}get running(){return this[rb][x5t]}get size(){return this[rb][v5t]}};Y7e.exports=Boe});var Moe=H((nHr,s_e)=>{"use strict";d();var b5t=b6(),E5t=koe(),{kConnected:Doe,kSize:J7e,kRunning:X7e,kPending:Z7e,kQueued:xR,kBusy:I5t,kFree:T5t,kUrl:w5t,kClose:_5t,kDestroy:S5t,kDispatch:R5t}=Os(),k5t=K7e(),yu=Symbol("clients"),S0=Symbol("needDrain"),vR=Symbol("queue"),Poe=Symbol("closed resolve"),Noe=Symbol("onDrain"),e_e=Symbol("onConnect"),t_e=Symbol("onDisconnect"),r_e=Symbol("onConnectionError"),Loe=Symbol("get dispatcher"),i_e=Symbol("add client"),o_e=Symbol("remove client"),n_e=Symbol("stats"),Foe=class extends b5t{static{s(this,"PoolBase")}constructor(){super(),this[vR]=new E5t,this[yu]=[],this[xR]=0;let t=this;this[Noe]=s(function(n,i){let o=t[vR],a=!1;for(;!a;){let l=o.shift();if(!l)break;t[xR]--,a=!this.dispatch(l.opts,l.handler)}this[S0]=a,!this[S0]&&t[S0]&&(t[S0]=!1,t.emit("drain",n,[t,...i])),t[Poe]&&o.isEmpty()&&Promise.all(t[yu].map(l=>l.close())).then(t[Poe])},"onDrain"),this[e_e]=(r,n)=>{t.emit("connect",r,[t,...n])},this[t_e]=(r,n,i)=>{t.emit("disconnect",r,[t,...n],i)},this[r_e]=(r,n,i)=>{t.emit("connectionError",r,[t,...n],i)},this[n_e]=new k5t(this)}get[I5t](){return this[S0]}get[Doe](){return this[yu].filter(t=>t[Doe]).length}get[T5t](){return this[yu].filter(t=>t[Doe]&&!t[S0]).length}get[Z7e](){let t=this[xR];for(let{[Z7e]:r}of this[yu])t+=r;return t}get[X7e](){let t=0;for(let{[X7e]:r}of this[yu])t+=r;return t}get[J7e](){let t=this[xR];for(let{[J7e]:r}of this[yu])t+=r;return t}get stats(){return this[n_e]}async[_5t](){this[vR].isEmpty()?await Promise.all(this[yu].map(t=>t.close())):await new Promise(t=>{this[Poe]=t})}async[S5t](t){for(;;){let r=this[vR].shift();if(!r)break;r.handler.onError(t)}await Promise.all(this[yu].map(r=>r.destroy(t)))}[R5t](t,r){let n=this[Loe]();return n?n.dispatch(t,r)||(n[S0]=!0,this[S0]=!this[Loe]()):(this[S0]=!0,this[vR].push({opts:t,handler:r}),this[xR]++),!this[S0]}[i_e](t){return t.on("drain",this[Noe]).on("connect",this[e_e]).on("disconnect",this[t_e]).on("connectionError",this[r_e]),this[yu].push(t),this[S0]&&queueMicrotask(()=>{this[S0]&&this[Noe](t[w5t],[this,t])}),this}[o_e](t){t.close(()=>{let r=this[yu].indexOf(t);r!==-1&&this[yu].splice(r,1)}),this[S0]=this[yu].some(r=>!r[S0]&&r.closed!==!0&&r.destroyed!==!0)}};s_e.exports={PoolBase:Foe,kClients:yu,kNeedDrain:S0,kAddClient:i_e,kRemoveClient:o_e,kGetDispatcher:Loe}});var Q6=H((sHr,u_e)=>{"use strict";d();var{PoolBase:B5t,kClients:yq,kNeedDrain:D5t,kAddClient:P5t,kGetDispatcher:N5t}=Moe(),L5t=CR(),{InvalidArgumentError:Qoe}=go(),a_e=yi(),{kUrl:l_e,kInterceptors:F5t}=Os(),M5t=ZS(),Ooe=Symbol("options"),Uoe=Symbol("connections"),c_e=Symbol("factory");function Q5t(e,t){return new L5t(e,t)}s(Q5t,"defaultFactory");var qoe=class extends B5t{static{s(this,"Pool")}constructor(t,{connections:r,factory:n=Q5t,connect:i,connectTimeout:o,tls:a,maxCachedSessions:l,socketPath:c,autoSelectFamily:u,autoSelectFamilyAttemptTimeout:f,allowH2:m,...h}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new Qoe("invalid connections");if(typeof n!="function")throw new Qoe("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new Qoe("connect must be a function or an object");typeof i!="function"&&(i=M5t({...a,maxCachedSessions:l,allowH2:m,socketPath:c,timeout:o,...u?{autoSelectFamily:u,autoSelectFamilyAttemptTimeout:f}:void 0,...i})),this[F5t]=h.interceptors?.Pool&&Array.isArray(h.interceptors.Pool)?h.interceptors.Pool:[],this[Uoe]=r||null,this[l_e]=a_e.parseOrigin(t),this[Ooe]={...a_e.deepClone(h),connect:i,allowH2:m},this[Ooe].interceptors=h.interceptors?{...h.interceptors}:void 0,this[c_e]=n,this.on("connectionError",(p,g,y)=>{for(let x of g){let b=this[yq].indexOf(x);b!==-1&&this[yq].splice(b,1)}})}[N5t](){for(let t of this[yq])if(!t[D5t])return t;if(!this[Uoe]||this[yq].length<this[Uoe]){let t=this[c_e](this[l_e],this[Ooe]);return this[P5t](t),t}}};u_e.exports=qoe});var p_e=H((cHr,h_e)=>{"use strict";d();var{BalancedPoolMissingUpstreamError:O5t,InvalidArgumentError:U5t}=go(),{PoolBase:q5t,kClients:Vc,kNeedDrain:bR,kAddClient:W5t,kRemoveClient:G5t,kGetDispatcher:H5t}=Moe(),j5t=Q6(),{kUrl:Woe,kInterceptors:V5t}=Os(),{parseOrigin:f_e}=yi(),d_e=Symbol("factory"),Cq=Symbol("options"),m_e=Symbol("kGreatestCommonDivisor"),nb=Symbol("kCurrentWeight"),ib=Symbol("kIndex"),Zd=Symbol("kWeight"),xq=Symbol("kMaxWeightPerServer"),vq=Symbol("kErrorPenalty");function $5t(e,t){if(e===0)return t;for(;t!==0;){let r=t;t=e%t,e=r}return e}s($5t,"getGreatestCommonDivisor");function z5t(e,t){return new j5t(e,t)}s(z5t,"defaultFactory");var Goe=class extends q5t{static{s(this,"BalancedPool")}constructor(t=[],{factory:r=z5t,...n}={}){if(super(),this[Cq]=n,this[ib]=-1,this[nb]=0,this[xq]=this[Cq].maxWeightPerServer||100,this[vq]=this[Cq].errorPenalty||15,Array.isArray(t)||(t=[t]),typeof r!="function")throw new U5t("factory must be a function.");this[V5t]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[d_e]=r;for(let i of t)this.addUpstream(i);this._updateBalancedPoolStats()}addUpstream(t){let r=f_e(t).origin;if(this[Vc].find(i=>i[Woe].origin===r&&i.closed!==!0&&i.destroyed!==!0))return this;let n=this[d_e](r,Object.assign({},this[Cq]));this[W5t](n),n.on("connect",()=>{n[Zd]=Math.min(this[xq],n[Zd]+this[vq])}),n.on("connectionError",()=>{n[Zd]=Math.max(1,n[Zd]-this[vq]),this._updateBalancedPoolStats()}),n.on("disconnect",(...i)=>{let o=i[2];o&&o.code==="UND_ERR_SOCKET"&&(n[Zd]=Math.max(1,n[Zd]-this[vq]),this._updateBalancedPoolStats())});for(let i of this[Vc])i[Zd]=this[xq];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let t=0;for(let r=0;r<this[Vc].length;r++)t=$5t(this[Vc][r][Zd],t);this[m_e]=t}removeUpstream(t){let r=f_e(t).origin,n=this[Vc].find(i=>i[Woe].origin===r&&i.closed!==!0&&i.destroyed!==!0);return n&&this[G5t](n),this}get upstreams(){return this[Vc].filter(t=>t.closed!==!0&&t.destroyed!==!0).map(t=>t[Woe].origin)}[H5t](){if(this[Vc].length===0)throw new O5t;if(!this[Vc].find(o=>!o[bR]&&o.closed!==!0&&o.destroyed!==!0)||this[Vc].map(o=>o[bR]).reduce((o,a)=>o&&a,!0))return;let n=0,i=this[Vc].findIndex(o=>!o[bR]);for(;n++<this[Vc].length;){this[ib]=(this[ib]+1)%this[Vc].length;let o=this[Vc][this[ib]];if(o[Zd]>this[Vc][i][Zd]&&!o[bR]&&(i=this[ib]),this[ib]===0&&(this[nb]=this[nb]-this[m_e],this[nb]<=0&&(this[nb]=this[xq])),o[Zd]>=this[nb]&&!o[bR])return o}return this[nb]=this[Vc][i][Zd],this[ib]=i,this[Vc][i]}};h_e.exports=Goe});var O6=H((dHr,b_e)=>{"use strict";d();var{InvalidArgumentError:bq}=go(),{kClients:dC,kRunning:g_e,kClose:Y5t,kDestroy:K5t,kDispatch:J5t,kInterceptors:X5t}=Os(),Z5t=b6(),eCt=Q6(),tCt=CR(),rCt=yi(),nCt=pq(),A_e=Symbol("onConnect"),y_e=Symbol("onDisconnect"),C_e=Symbol("onConnectionError"),iCt=Symbol("maxRedirections"),x_e=Symbol("onDrain"),v_e=Symbol("factory"),Hoe=Symbol("options");function oCt(e,t){return t&&t.connections===1?new tCt(e,t):new eCt(e,t)}s(oCt,"defaultFactory");var joe=class extends Z5t{static{s(this,"Agent")}constructor({factory:t=oCt,maxRedirections:r=0,connect:n,...i}={}){if(super(),typeof t!="function")throw new bq("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new bq("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new bq("maxRedirections must be a positive number");n&&typeof n!="function"&&(n={...n}),this[X5t]=i.interceptors?.Agent&&Array.isArray(i.interceptors.Agent)?i.interceptors.Agent:[nCt({maxRedirections:r})],this[Hoe]={...rCt.deepClone(i),connect:n},this[Hoe].interceptors=i.interceptors?{...i.interceptors}:void 0,this[iCt]=r,this[v_e]=t,this[dC]=new Map,this[x_e]=(o,a)=>{this.emit("drain",o,[this,...a])},this[A_e]=(o,a)=>{this.emit("connect",o,[this,...a])},this[y_e]=(o,a,l)=>{this.emit("disconnect",o,[this,...a],l)},this[C_e]=(o,a,l)=>{this.emit("connectionError",o,[this,...a],l)}}get[g_e](){let t=0;for(let r of this[dC].values())t+=r[g_e];return t}[J5t](t,r){let n;if(t.origin&&(typeof t.origin=="string"||t.origin instanceof URL))n=String(t.origin);else throw new bq("opts.origin must be a non-empty string or URL.");let i=this[dC].get(n);return i||(i=this[v_e](t.origin,this[Hoe]).on("drain",this[x_e]).on("connect",this[A_e]).on("disconnect",this[y_e]).on("connectionError",this[C_e]),this[dC].set(n,i)),i.dispatch(t,r)}async[Y5t](){let t=[];for(let r of this[dC].values())t.push(r.close());this[dC].clear(),await Promise.all(t)}async[K5t](t){let r=[];for(let n of this[dC].values())r.push(n.destroy(t));this[dC].clear(),await Promise.all(r)}};b_e.exports=joe});var zoe=H((pHr,w_e)=>{"use strict";d();var{kProxy:sCt,kClose:aCt,kDestroy:lCt,kInterceptors:cCt}=Os(),{URL:ER}=require("node:url"),uCt=O6(),fCt=Q6(),dCt=b6(),{InvalidArgumentError:Tq,RequestAbortedError:mCt,SecureProxyConnectionError:hCt}=go(),E_e=ZS(),Eq=Symbol("proxy agent"),Iq=Symbol("proxy client"),IR=Symbol("proxy headers"),Voe=Symbol("request tls settings"),I_e=Symbol("proxy tls settings"),T_e=Symbol("connect endpoint function");function pCt(e){return e==="https:"?443:80}s(pCt,"defaultProtocolPort");function gCt(e,t){return new fCt(e,t)}s(gCt,"defaultFactory");var ACt=s(()=>{},"noop"),$oe=class extends dCt{static{s(this,"ProxyAgent")}constructor(t){if(super(),!t||typeof t=="object"&&!(t instanceof ER)&&!t.uri)throw new Tq("Proxy uri is mandatory");let{clientFactory:r=gCt}=t;if(typeof r!="function")throw new Tq("Proxy opts.clientFactory must be a function.");let n=this.#e(t),{href:i,origin:o,port:a,protocol:l,username:c,password:u,hostname:f}=n;if(this[sCt]={uri:i,protocol:l},this[cCt]=t.interceptors?.ProxyAgent&&Array.isArray(t.interceptors.ProxyAgent)?t.interceptors.ProxyAgent:[],this[Voe]=t.requestTls,this[I_e]=t.proxyTls,this[IR]=t.headers||{},t.auth&&t.token)throw new Tq("opts.auth cannot be used in combination with opts.token");t.auth?this[IR]["proxy-authorization"]=`Basic ${t.auth}`:t.token?this[IR]["proxy-authorization"]=t.token:c&&u&&(this[IR]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(c)}:${decodeURIComponent(u)}`).toString("base64")}`);let m=E_e({...t.proxyTls});this[T_e]=E_e({...t.requestTls}),this[Iq]=r(n,{connect:m}),this[Eq]=new uCt({...t,connect:s(async(h,p)=>{let g=h.host;h.port||(g+=`:${pCt(h.protocol)}`);try{let{socket:y,statusCode:x}=await this[Iq].connect({origin:o,port:a,path:g,signal:h.signal,headers:{...this[IR],host:h.host},servername:this[I_e]?.servername||f});if(x!==200&&(y.on("error",ACt).destroy(),p(new mCt(`Proxy response (${x}) !== 200 when HTTP Tunneling`))),h.protocol!=="https:"){p(null,y);return}let b;this[Voe]?b=this[Voe].servername:b=h.servername,this[T_e]({...h,servername:b,httpSocket:y},p)}catch(y){y.code==="ERR_TLS_CERT_ALTNAME_INVALID"?p(new hCt(y)):p(y)}},"connect")})}dispatch(t,r){let n=yCt(t.headers);if(CCt(n),n&&!("host"in n)&&!("Host"in n)){let{host:i}=new ER(t.origin);n.host=i}return this[Eq].dispatch({...t,headers:n},r)}#e(t){return typeof t=="string"?new ER(t):t instanceof ER?t:new ER(t.uri)}async[aCt](){await this[Eq].close(),await this[Iq].close()}async[lCt](){await this[Eq].destroy(),await this[Iq].destroy()}};function yCt(e){if(Array.isArray(e)){let t={};for(let r=0;r<e.length;r+=2)t[e[r]]=e[r+1];return t}return e}s(yCt,"buildHeaders");function CCt(e){if(e&&Object.keys(e).find(r=>r.toLowerCase()==="proxy-authorization"))throw new Tq("Proxy-Authorization should be sent in ProxyAgent constructor")}s(CCt,"throwIfProxyAuthIsSent");w_e.exports=$oe});var D_e=H((yHr,B_e)=>{"use strict";d();var xCt=b6(),{kClose:vCt,kDestroy:bCt,kClosed:__e,kDestroyed:S_e,kDispatch:ECt,kNoProxyAgent:TR,kHttpProxyAgent:mC,kHttpsProxyAgent:ob}=Os(),R_e=zoe(),ICt=O6(),TCt={"http:":80,"https:":443},k_e=!1,Yoe=class extends xCt{static{s(this,"EnvHttpProxyAgent")}#e=null;#t=null;#i=null;constructor(t={}){super(),this.#i=t,k_e||(k_e=!0,process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.",{code:"UNDICI-EHPA"}));let{httpProxy:r,httpsProxy:n,noProxy:i,...o}=t;this[TR]=new ICt(o);let a=r??process.env.http_proxy??process.env.HTTP_PROXY;a?this[mC]=new R_e({...o,uri:a}):this[mC]=this[TR];let l=n??process.env.https_proxy??process.env.HTTPS_PROXY;l?this[ob]=new R_e({...o,uri:l}):this[ob]=this[mC],this.#o()}[ECt](t,r){let n=new URL(t.origin);return this.#n(n).dispatch(t,r)}async[vCt](){await this[TR].close(),this[mC][__e]||await this[mC].close(),this[ob][__e]||await this[ob].close()}async[bCt](t){await this[TR].destroy(t),this[mC][S_e]||await this[mC].destroy(t),this[ob][S_e]||await this[ob].destroy(t)}#n(t){let{protocol:r,host:n,port:i}=t;return n=n.replace(/:\d*$/,"").toLowerCase(),i=Number.parseInt(i,10)||TCt[r]||0,this.#r(n,i)?r==="https:"?this[ob]:this[mC]:this[TR]}#r(t,r){if(this.#s&&this.#o(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n<this.#t.length;n++){let i=this.#t[n];if(!(i.port&&i.port!==r)){if(/^[.*]/.test(i.hostname)){if(t.endsWith(i.hostname.replace(/^\*/,"")))return!1}else if(t===i.hostname)return!1}}return!0}#o(){let t=this.#i.noProxy??this.#a,r=t.split(/[,\s]/),n=[];for(let i=0;i<r.length;i++){let o=r[i];if(!o)continue;let a=o.match(/^(.+):(\d+)$/);n.push({hostname:(a?a[1]:o).toLowerCase(),port:a?Number.parseInt(a[2],10):0})}this.#e=t,this.#t=n}get#s(){return this.#i.noProxy!==void 0?!1:this.#e!==this.#a}get#a(){return process.env.no_proxy??process.env.NO_PROXY??""}};B_e.exports=Yoe});var wq=H((vHr,F_e)=>{"use strict";d();var U6=require("node:assert"),{kRetryHandlerDefaultRetry:P_e}=Os(),{RequestRetryError:wR}=go(),{isDisturbed:N_e,parseHeaders:wCt,parseRangeHeader:L_e,wrapRequestBody:_Ct}=yi();function SCt(e){let t=Date.now();return new Date(e).getTime()-t}s(SCt,"calculateRetryAfterHeader");var Koe=class e{static{s(this,"RetryHandler")}constructor(t,r){let{retryOptions:n,...i}=t,{retry:o,maxRetries:a,maxTimeout:l,minTimeout:c,timeoutFactor:u,methods:f,errorCodes:m,retryAfter:h,statusCodes:p}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts={...i,body:_Ct(t.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:o??e[P_e],retryAfter:h??!0,maxTimeout:l??30*1e3,minTimeout:c??500,timeoutFactor:u??2,maxRetries:a??5,methods:f??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:p??[500,502,503,504,429],errorCodes:m??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(t,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(t,r,n)}onConnect(t){this.aborted?t(this.reason):this.abort=t}onBodySent(t){if(this.handler.onBodySent)return this.handler.onBodySent(t)}static[P_e](t,{state:r,opts:n},i){let{statusCode:o,code:a,headers:l}=t,{method:c,retryOptions:u}=n,{maxRetries:f,minTimeout:m,maxTimeout:h,timeoutFactor:p,statusCodes:g,errorCodes:y,methods:x}=u,{counter:b}=r;if(a&&a!=="UND_ERR_REQ_RETRY"&&!y.includes(a)){i(t);return}if(Array.isArray(x)&&!x.includes(c)){i(t);return}if(o!=null&&Array.isArray(g)&&!g.includes(o)){i(t);return}if(b>f){i(t);return}let E=l?.["retry-after"];E&&(E=Number(E),E=Number.isNaN(E)?SCt(E):E*1e3);let _=E>0?Math.min(E,h):Math.min(m*p**(b-1),h);setTimeout(()=>i(null),_)}onHeaders(t,r,n,i){let o=wCt(r);if(this.retryCount+=1,t>=300)return this.retryOpts.statusCodes.includes(t)===!1?this.handler.onHeaders(t,r,n,i):(this.abort(new wR("Request failed",t,{headers:o,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,t!==206&&(this.start>0||t!==200))return this.abort(new wR("server does not support the range header and the payload was partially consumed",t,{headers:o,data:{count:this.retryCount}})),!1;let l=L_e(o["content-range"]);if(!l)return this.abort(new wR("Content-Range mismatch",t,{headers:o,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==o.etag)return this.abort(new wR("ETag mismatch",t,{headers:o,data:{count:this.retryCount}})),!1;let{start:c,size:u,end:f=u-1}=l;return U6(this.start===c,"content-range mismatch"),U6(this.end==null||this.end===f,"content-range mismatch"),this.resume=n,!0}if(this.end==null){if(t===206){let l=L_e(o["content-range"]);if(l==null)return this.handler.onHeaders(t,r,n,i);let{start:c,size:u,end:f=u-1}=l;U6(c!=null&&Number.isFinite(c),"content-range mismatch"),U6(f!=null&&Number.isFinite(f),"invalid content-length"),this.start=c,this.end=f}if(this.end==null){let l=o["content-length"];this.end=l!=null?Number(l)-1:null}return U6(Number.isFinite(this.start)),U6(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=n,this.etag=o.etag!=null?o.etag:null,this.etag!=null&&this.etag.startsWith("W/")&&(this.etag=null),this.handler.onHeaders(t,r,n,i)}let a=new wR("Request failed",t,{headers:o,data:{count:this.retryCount}});return this.abort(a),!1}onData(t){return this.start+=t.length,this.handler.onData(t)}onComplete(t){return this.retryCount=0,this.handler.onComplete(t)}onError(t){if(this.aborted||N_e(this.opts.body))return this.handler.onError(t);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(t,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(n){if(n!=null||this.aborted||N_e(this.opts.body))return this.handler.onError(n);if(this.start!==0){let i={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(i["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...i}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(i){this.handler.onError(i)}}s(r,"onRetry")}};F_e.exports=Koe});var Q_e=H((IHr,M_e)=>{"use strict";d();var RCt=JS(),kCt=wq(),Joe=class extends RCt{static{s(this,"RetryAgent")}#e=null;#t=null;constructor(t,r={}){super(r),this.#e=t,this.#t=r}dispatch(t,r){let n=new kCt({...t,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(t,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};M_e.exports=Joe});var nse=H((_Hr,$_e)=>{"use strict";d();var G_e=require("node:assert"),{Readable:BCt}=require("node:stream"),{RequestAbortedError:H_e,NotSupportedError:DCt,InvalidArgumentError:PCt,AbortError:Xoe}=go(),j_e=yi(),{ReadableStreamFrom:NCt}=yi(),wf=Symbol("kConsume"),_R=Symbol("kReading"),hC=Symbol("kBody"),O_e=Symbol("kAbort"),V_e=Symbol("kContentType"),U_e=Symbol("kContentLength"),LCt=s(()=>{},"noop"),Zoe=class extends BCt{static{s(this,"BodyReadable")}constructor({resume:t,abort:r,contentType:n="",contentLength:i,highWaterMark:o=64*1024}){super({autoDestroy:!0,read:t,highWaterMark:o}),this._readableState.dataEmitted=!1,this[O_e]=r,this[wf]=null,this[hC]=null,this[V_e]=n,this[U_e]=i,this[_R]=!1}destroy(t){return!t&&!this._readableState.endEmitted&&(t=new H_e),t&&this[O_e](),super.destroy(t)}_destroy(t,r){this[_R]?r(t):setImmediate(()=>{r(t)})}on(t,...r){return(t==="data"||t==="readable")&&(this[_R]=!0),super.on(t,...r)}addListener(t,...r){return this.on(t,...r)}off(t,...r){let n=super.off(t,...r);return(t==="data"||t==="readable")&&(this[_R]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(t,...r){return this.off(t,...r)}push(t){return this[wf]&&t!==null?(tse(this[wf],t),this[_R]?super.push(t):!0):super.push(t)}async text(){return SR(this,"text")}async json(){return SR(this,"json")}async blob(){return SR(this,"blob")}async bytes(){return SR(this,"bytes")}async arrayBuffer(){return SR(this,"arrayBuffer")}async formData(){throw new DCt}get bodyUsed(){return j_e.isDisturbed(this)}get body(){return this[hC]||(this[hC]=NCt(this),this[wf]&&(this[hC].getReader(),G_e(this[hC].locked))),this[hC]}async dump(t){let r=Number.isFinite(t?.limit)?t.limit:131072,n=t?.signal;if(n!=null&&(typeof n!="object"||!("aborted"in n)))throw new PCt("signal must be an AbortSignal");return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((i,o)=>{this[U_e]>r&&this.destroy(new Xoe);let a=s(()=>{this.destroy(n.reason??new Xoe)},"onAbort");n?.addEventListener("abort",a),this.on("close",function(){n?.removeEventListener("abort",a),n?.aborted?o(n.reason??new Xoe):i(null)}).on("error",LCt).on("data",function(l){r-=l.length,r<=0&&this.destroy()}).resume()})}};function FCt(e){return e[hC]&&e[hC].locked===!0||e[wf]}s(FCt,"isLocked");function MCt(e){return j_e.isDisturbed(e)||FCt(e)}s(MCt,"isUnusable");async function SR(e,t){return G_e(!e[wf]),new Promise((r,n)=>{if(MCt(e)){let i=e._readableState;i.destroyed&&i.closeEmitted===!1?e.on("error",o=>{n(o)}).on("close",()=>{n(new TypeError("unusable"))}):n(i.errored??new TypeError("unusable"))}else queueMicrotask(()=>{e[wf]={type:t,stream:e,resolve:r,reject:n,length:0,body:[]},e.on("error",function(i){rse(this[wf],i)}).on("close",function(){this[wf].body!==null&&rse(this[wf],new H_e)}),QCt(e[wf])})})}s(SR,"consume");function QCt(e){if(e.body===null)return;let{_readableState:t}=e.stream;if(t.bufferIndex){let r=t.bufferIndex,n=t.buffer.length;for(let i=r;i<n;i++)tse(e,t.buffer[i])}else for(let r of t.buffer)tse(e,r);for(t.endEmitted?W_e(this[wf]):e.stream.on("end",function(){W_e(this[wf])}),e.stream.resume();e.stream.read()!=null;);}s(QCt,"consumeStart");function ese(e,t){if(e.length===0||t===0)return"";let r=e.length===1?e[0]:Buffer.concat(e,t),n=r.length,i=n>2&&r[0]===239&&r[1]===187&&r[2]===191?3:0;return r.utf8Slice(i,n)}s(ese,"chunksDecode");function q_e(e,t){if(e.length===0||t===0)return new Uint8Array(0);if(e.length===1)return new Uint8Array(e[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(t).buffer),n=0;for(let i=0;i<e.length;++i){let o=e[i];r.set(o,n),n+=o.length}return r}s(q_e,"chunksConcat");function W_e(e){let{type:t,body:r,resolve:n,stream:i,length:o}=e;try{t==="text"?n(ese(r,o)):t==="json"?n(JSON.parse(ese(r,o))):t==="arrayBuffer"?n(q_e(r,o).buffer):t==="blob"?n(new Blob(r,{type:i[V_e]})):t==="bytes"&&n(q_e(r,o)),rse(e)}catch(a){i.destroy(a)}}s(W_e,"consumeEnd");function tse(e,t){e.length+=t.length,e.body.push(t)}s(tse,"consumePush");function rse(e,t){e.body!==null&&(t?e.reject(t):e.resolve(),e.type=null,e.stream=null,e.resolve=null,e.reject=null,e.length=0,e.body=null)}s(rse,"consumeFinish");$_e.exports={Readable:Zoe,chunksDecode:ese}});var ise=H((kHr,X_e)=>{d();var OCt=require("node:assert"),{ResponseStatusCodeError:z_e}=go(),{chunksDecode:Y_e}=nse(),UCt=128*1024;async function qCt({callback:e,body:t,contentType:r,statusCode:n,statusMessage:i,headers:o}){OCt(t);let a=[],l=0;try{for await(let m of t)if(a.push(m),l+=m.length,l>UCt){a=[],l=0;break}}catch{a=[],l=0}let c=`Response status code ${n}${i?`: ${i}`:""}`;if(n===204||!r||!l){queueMicrotask(()=>e(new z_e(c,n,o)));return}let u=Error.stackTraceLimit;Error.stackTraceLimit=0;let f;try{K_e(r)?f=JSON.parse(Y_e(a,l)):J_e(r)&&(f=Y_e(a,l))}catch{}finally{Error.stackTraceLimit=u}queueMicrotask(()=>e(new z_e(c,n,o,f)))}s(qCt,"getResolveErrorBodyCallback");var K_e=s(e=>e.length>15&&e[11]==="/"&&e[0]==="a"&&e[1]==="p"&&e[2]==="p"&&e[3]==="l"&&e[4]==="i"&&e[5]==="c"&&e[6]==="a"&&e[7]==="t"&&e[8]==="i"&&e[9]==="o"&&e[10]==="n"&&e[12]==="j"&&e[13]==="s"&&e[14]==="o"&&e[15]==="n","isContentTypeApplicationJson"),J_e=s(e=>e.length>4&&e[4]==="/"&&e[0]==="t"&&e[1]==="e"&&e[2]==="x"&&e[3]==="t","isContentTypeText");X_e.exports={getResolveErrorBodyCallback:qCt,isContentTypeApplicationJson:K_e,isContentTypeText:J_e}});var tSe=H((PHr,ose)=>{"use strict";d();var WCt=require("node:assert"),{Readable:GCt}=nse(),{InvalidArgumentError:q6,RequestAbortedError:Z_e}=go(),_f=yi(),{getResolveErrorBodyCallback:HCt}=ise(),{AsyncResource:jCt}=require("node:async_hooks"),_q=class extends jCt{static{s(this,"RequestHandler")}constructor(t,r){if(!t||typeof t!="object")throw new q6("invalid opts");let{signal:n,method:i,opaque:o,body:a,onInfo:l,responseHeaders:c,throwOnError:u,highWaterMark:f}=t;try{if(typeof r!="function")throw new q6("invalid callback");if(f&&(typeof f!="number"||f<0))throw new q6("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new q6("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new q6("invalid method");if(l&&typeof l!="function")throw new q6("invalid onInfo callback");super("UNDICI_REQUEST")}catch(m){throw _f.isStream(a)&&_f.destroy(a.on("error",_f.nop),m),m}this.method=i,this.responseHeaders=c||null,this.opaque=o||null,this.callback=r,this.res=null,this.abort=null,this.body=a,this.trailers={},this.context=null,this.onInfo=l||null,this.throwOnError=u,this.highWaterMark=f,this.signal=n,this.reason=null,this.removeAbortListener=null,_f.isStream(a)&&a.on("error",m=>{this.onError(m)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new Z_e:this.removeAbortListener=_f.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new Z_e,this.res?_f.destroy(this.res.on("error",_f.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&(this.res?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}))}onConnect(t,r){if(this.reason){t(this.reason);return}WCt(this.callback),this.abort=t,this.context=r}onHeaders(t,r,n,i){let{callback:o,opaque:a,abort:l,context:c,responseHeaders:u,highWaterMark:f}=this,m=u==="raw"?_f.parseRawHeaders(r):_f.parseHeaders(r);if(t<200){this.onInfo&&this.onInfo({statusCode:t,headers:m});return}let h=u==="raw"?_f.parseHeaders(r):m,p=h["content-type"],g=h["content-length"],y=new GCt({resume:n,abort:l,contentType:p,contentLength:this.method!=="HEAD"&&g?Number(g):null,highWaterMark:f});this.removeAbortListener&&y.on("close",this.removeAbortListener),this.callback=null,this.res=y,o!==null&&(this.throwOnError&&t>=400?this.runInAsyncScope(HCt,null,{callback:o,body:y,contentType:p,statusCode:t,statusMessage:i,headers:m}):this.runInAsyncScope(o,null,null,{statusCode:t,headers:m,trailers:this.trailers,opaque:a,body:y,context:c}))}onData(t){return this.res.push(t)}onComplete(t){_f.parseHeaders(t,this.trailers),this.res.push(null)}onError(t){let{res:r,callback:n,body:i,opaque:o}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,t,{opaque:o})})),r&&(this.res=null,queueMicrotask(()=>{_f.destroy(r,t)})),i&&(this.body=null,_f.destroy(i,t)),this.removeAbortListener&&(r?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}};function eSe(e,t){if(t===void 0)return new Promise((r,n)=>{eSe.call(this,e,(i,o)=>i?n(i):r(o))});try{this.dispatch(e,new _q(e,t))}catch(r){if(typeof t!="function")throw r;let n=e?.opaque;queueMicrotask(()=>t(r,{opaque:n}))}}s(eSe,"request");ose.exports=eSe;ose.exports.RequestHandler=_q});var RR=H((FHr,iSe)=>{d();var{addAbortListener:VCt}=yi(),{RequestAbortedError:$Ct}=go(),W6=Symbol("kListener"),_g=Symbol("kSignal");function rSe(e){e.abort?e.abort(e[_g]?.reason):e.reason=e[_g]?.reason??new $Ct,nSe(e)}s(rSe,"abort");function zCt(e,t){if(e.reason=null,e[_g]=null,e[W6]=null,!!t){if(t.aborted){rSe(e);return}e[_g]=t,e[W6]=()=>{rSe(e)},VCt(e[_g],e[W6])}}s(zCt,"addSignal");function nSe(e){e[_g]&&("removeEventListener"in e[_g]?e[_g].removeEventListener("abort",e[W6]):e[_g].removeListener("abort",e[W6]),e[_g]=null,e[W6]=null)}s(nSe,"removeSignal");iSe.exports={addSignal:zCt,removeSignal:nSe}});var lSe=H((OHr,aSe)=>{"use strict";d();var YCt=require("node:assert"),{finished:KCt,PassThrough:JCt}=require("node:stream"),{InvalidArgumentError:G6,InvalidReturnValueError:XCt}=go(),Dh=yi(),{getResolveErrorBodyCallback:ZCt}=ise(),{AsyncResource:e3t}=require("node:async_hooks"),{addSignal:t3t,removeSignal:oSe}=RR(),sse=class extends e3t{static{s(this,"StreamHandler")}constructor(t,r,n){if(!t||typeof t!="object")throw new G6("invalid opts");let{signal:i,method:o,opaque:a,body:l,onInfo:c,responseHeaders:u,throwOnError:f}=t;try{if(typeof n!="function")throw new G6("invalid callback");if(typeof r!="function")throw new G6("invalid factory");if(i&&typeof i.on!="function"&&typeof i.addEventListener!="function")throw new G6("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new G6("invalid method");if(c&&typeof c!="function")throw new G6("invalid onInfo callback");super("UNDICI_STREAM")}catch(m){throw Dh.isStream(l)&&Dh.destroy(l.on("error",Dh.nop),m),m}this.responseHeaders=u||null,this.opaque=a||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=l,this.onInfo=c||null,this.throwOnError=f||!1,Dh.isStream(l)&&l.on("error",m=>{this.onError(m)}),t3t(this,i)}onConnect(t,r){if(this.reason){t(this.reason);return}YCt(this.callback),this.abort=t,this.context=r}onHeaders(t,r,n,i){let{factory:o,opaque:a,context:l,callback:c,responseHeaders:u}=this,f=u==="raw"?Dh.parseRawHeaders(r):Dh.parseHeaders(r);if(t<200){this.onInfo&&this.onInfo({statusCode:t,headers:f});return}this.factory=null;let m;if(this.throwOnError&&t>=400){let g=(u==="raw"?Dh.parseHeaders(r):f)["content-type"];m=new JCt,this.callback=null,this.runInAsyncScope(ZCt,null,{callback:c,body:m,contentType:g,statusCode:t,statusMessage:i,headers:f})}else{if(o===null)return;if(m=this.runInAsyncScope(o,null,{statusCode:t,headers:f,opaque:a,context:l}),!m||typeof m.write!="function"||typeof m.end!="function"||typeof m.on!="function")throw new XCt("expected Writable");KCt(m,{readable:!1},p=>{let{callback:g,res:y,opaque:x,trailers:b,abort:E}=this;this.res=null,(p||!y.readable)&&Dh.destroy(y,p),this.callback=null,this.runInAsyncScope(g,null,p||null,{opaque:x,trailers:b}),p&&E()})}return m.on("drain",n),this.res=m,(m.writableNeedDrain!==void 0?m.writableNeedDrain:m._writableState?.needDrain)!==!0}onData(t){let{res:r}=this;return r?r.write(t):!0}onComplete(t){let{res:r}=this;oSe(this),r&&(this.trailers=Dh.parseHeaders(t),r.end())}onError(t){let{res:r,callback:n,opaque:i,body:o}=this;oSe(this),this.factory=null,r?(this.res=null,Dh.destroy(r,t)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,t,{opaque:i})})),o&&(this.body=null,Dh.destroy(o,t))}};function sSe(e,t,r){if(r===void 0)return new Promise((n,i)=>{sSe.call(this,e,t,(o,a)=>o?i(o):n(a))});try{this.dispatch(e,new sse(e,t,r))}catch(n){if(typeof r!="function")throw n;let i=e?.opaque;queueMicrotask(()=>r(n,{opaque:i}))}}s(sSe,"stream");aSe.exports=sSe});var dSe=H((WHr,fSe)=>{"use strict";d();var{Readable:uSe,Duplex:r3t,PassThrough:n3t}=require("node:stream"),{InvalidArgumentError:kR,InvalidReturnValueError:i3t,RequestAbortedError:ase}=go(),em=yi(),{AsyncResource:o3t}=require("node:async_hooks"),{addSignal:s3t,removeSignal:a3t}=RR(),cSe=require("node:assert"),H6=Symbol("resume"),lse=class extends uSe{static{s(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[H6]=null}_read(){let{[H6]:t}=this;t&&(this[H6]=null,t())}_destroy(t,r){this._read(),r(t)}},cse=class extends uSe{static{s(this,"PipelineResponse")}constructor(t){super({autoDestroy:!0}),this[H6]=t}_read(){this[H6]()}_destroy(t,r){!t&&!this._readableState.endEmitted&&(t=new ase),r(t)}},use=class extends o3t{static{s(this,"PipelineHandler")}constructor(t,r){if(!t||typeof t!="object")throw new kR("invalid opts");if(typeof r!="function")throw new kR("invalid handler");let{signal:n,method:i,opaque:o,onInfo:a,responseHeaders:l}=t;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new kR("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new kR("invalid method");if(a&&typeof a!="function")throw new kR("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=o||null,this.responseHeaders=l||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=a||null,this.req=new lse().on("error",em.nop),this.ret=new r3t({readableObjectMode:t.objectMode,autoDestroy:!0,read:s(()=>{let{body:c}=this;c?.resume&&c.resume()},"read"),write:s((c,u,f)=>{let{req:m}=this;m.push(c,u)||m._readableState.destroyed?f():m[H6]=f},"write"),destroy:s((c,u)=>{let{body:f,req:m,res:h,ret:p,abort:g}=this;!c&&!p._readableState.endEmitted&&(c=new ase),g&&c&&g(),em.destroy(f,c),em.destroy(m,c),em.destroy(h,c),a3t(this),u(c)},"destroy")}).on("prefinish",()=>{let{req:c}=this;c.push(null)}),this.res=null,s3t(this,n)}onConnect(t,r){let{ret:n,res:i}=this;if(this.reason){t(this.reason);return}cSe(!i,"pipeline cannot be retried"),cSe(!n.destroyed),this.abort=t,this.context=r}onHeaders(t,r,n){let{opaque:i,handler:o,context:a}=this;if(t<200){if(this.onInfo){let c=this.responseHeaders==="raw"?em.parseRawHeaders(r):em.parseHeaders(r);this.onInfo({statusCode:t,headers:c})}return}this.res=new cse(n);let l;try{this.handler=null;let c=this.responseHeaders==="raw"?em.parseRawHeaders(r):em.parseHeaders(r);l=this.runInAsyncScope(o,null,{statusCode:t,headers:c,opaque:i,body:this.res,context:a})}catch(c){throw this.res.on("error",em.nop),c}if(!l||typeof l.on!="function")throw new i3t("expected Readable");l.on("data",c=>{let{ret:u,body:f}=this;!u.push(c)&&f.pause&&f.pause()}).on("error",c=>{let{ret:u}=this;em.destroy(u,c)}).on("end",()=>{let{ret:c}=this;c.push(null)}).on("close",()=>{let{ret:c}=this;c._readableState.ended||em.destroy(c,new ase)}),this.body=l}onData(t){let{res:r}=this;return r.push(t)}onComplete(t){let{res:r}=this;r.push(null)}onError(t){let{ret:r}=this;this.handler=null,em.destroy(r,t)}};function l3t(e,t){try{let r=new use(e,t);return this.dispatch({...e,body:r.req},r),r.ret}catch(r){return new n3t().destroy(r)}}s(l3t,"pipeline");fSe.exports=l3t});var ySe=H((jHr,ASe)=>{"use strict";d();var{InvalidArgumentError:fse,SocketError:c3t}=go(),{AsyncResource:u3t}=require("node:async_hooks"),mSe=yi(),{addSignal:f3t,removeSignal:hSe}=RR(),pSe=require("node:assert"),dse=class extends u3t{static{s(this,"UpgradeHandler")}constructor(t,r){if(!t||typeof t!="object")throw new fse("invalid opts");if(typeof r!="function")throw new fse("invalid callback");let{signal:n,opaque:i,responseHeaders:o}=t;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new fse("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=o||null,this.opaque=i||null,this.callback=r,this.abort=null,this.context=null,f3t(this,n)}onConnect(t,r){if(this.reason){t(this.reason);return}pSe(this.callback),this.abort=t,this.context=null}onHeaders(){throw new c3t("bad upgrade",null)}onUpgrade(t,r,n){pSe(t===101);let{callback:i,opaque:o,context:a}=this;hSe(this),this.callback=null;let l=this.responseHeaders==="raw"?mSe.parseRawHeaders(r):mSe.parseHeaders(r);this.runInAsyncScope(i,null,null,{headers:l,socket:n,opaque:o,context:a})}onError(t){let{callback:r,opaque:n}=this;hSe(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,t,{opaque:n})}))}};function gSe(e,t){if(t===void 0)return new Promise((r,n)=>{gSe.call(this,e,(i,o)=>i?n(i):r(o))});try{let r=new dse(e,t);this.dispatch({...e,method:e.method||"GET",upgrade:e.protocol||"Websocket"},r)}catch(r){if(typeof t!="function")throw r;let n=e?.opaque;queueMicrotask(()=>t(r,{opaque:n}))}}s(gSe,"upgrade");ASe.exports=gSe});var ESe=H((zHr,bSe)=>{"use strict";d();var d3t=require("node:assert"),{AsyncResource:m3t}=require("node:async_hooks"),{InvalidArgumentError:mse,SocketError:h3t}=go(),CSe=yi(),{addSignal:p3t,removeSignal:xSe}=RR(),hse=class extends m3t{static{s(this,"ConnectHandler")}constructor(t,r){if(!t||typeof t!="object")throw new mse("invalid opts");if(typeof r!="function")throw new mse("invalid callback");let{signal:n,opaque:i,responseHeaders:o}=t;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new mse("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=i||null,this.responseHeaders=o||null,this.callback=r,this.abort=null,p3t(this,n)}onConnect(t,r){if(this.reason){t(this.reason);return}d3t(this.callback),this.abort=t,this.context=r}onHeaders(){throw new h3t("bad connect",null)}onUpgrade(t,r,n){let{callback:i,opaque:o,context:a}=this;xSe(this),this.callback=null;let l=r;l!=null&&(l=this.responseHeaders==="raw"?CSe.parseRawHeaders(r):CSe.parseHeaders(r)),this.runInAsyncScope(i,null,null,{statusCode:t,headers:l,socket:n,opaque:o,context:a})}onError(t){let{callback:r,opaque:n}=this;xSe(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,t,{opaque:n})}))}};function vSe(e,t){if(t===void 0)return new Promise((r,n)=>{vSe.call(this,e,(i,o)=>i?n(i):r(o))});try{let r=new hse(e,t);this.dispatch({...e,method:"CONNECT"},r)}catch(r){if(typeof t!="function")throw r;let n=e?.opaque;queueMicrotask(()=>t(r,{opaque:n}))}}s(vSe,"connect");bSe.exports=vSe});var ISe=H((JHr,j6)=>{"use strict";d();j6.exports.request=tSe();j6.exports.stream=lSe();j6.exports.pipeline=dSe();j6.exports.upgrade=ySe();j6.exports.connect=ESe()});var gse=H((ZHr,TSe)=>{"use strict";d();var{UndiciError:g3t}=go(),pse=class e extends g3t{static{s(this,"MockNotMatchedError")}constructor(t){super(t),Error.captureStackTrace(this,e),this.name="MockNotMatchedError",this.message=t||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}};TSe.exports={MockNotMatchedError:pse}});var V6=H((rjr,wSe)=>{"use strict";d();wSe.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var BR=H((ijr,MSe)=>{"use strict";d();var{MockNotMatchedError:sb}=gse(),{kDispatches:Sq,kMockAgent:A3t,kOriginalDispatch:y3t,kOrigin:C3t,kGetNetConnect:x3t}=V6(),{buildURL:v3t}=yi(),{STATUS_CODES:b3t}=require("node:http"),{types:{isPromise:E3t}}=require("node:util");function UA(e,t){return typeof e=="string"?e===t:e instanceof RegExp?e.test(t):typeof e=="function"?e(t)===!0:!1}s(UA,"matchValue");function SSe(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t.toLocaleLowerCase(),r]))}s(SSe,"lowerCaseEntries");function RSe(e,t){if(Array.isArray(e)){for(let r=0;r<e.length;r+=2)if(e[r].toLocaleLowerCase()===t.toLocaleLowerCase())return e[r+1];return}else return typeof e.get=="function"?e.get(t):SSe(e)[t.toLocaleLowerCase()]}s(RSe,"getHeaderByName");function Cse(e){let t=e.slice(),r=[];for(let n=0;n<t.length;n+=2)r.push([t[n],t[n+1]]);return Object.fromEntries(r)}s(Cse,"buildHeadersFromArray");function kSe(e,t){if(typeof e.headers=="function")return Array.isArray(t)&&(t=Cse(t)),e.headers(t?SSe(t):{});if(typeof e.headers>"u")return!0;if(typeof t!="object"||typeof e.headers!="object")return!1;for(let[r,n]of Object.entries(e.headers)){let i=RSe(t,r);if(!UA(n,i))return!1}return!0}s(kSe,"matchHeaders");function _Se(e){if(typeof e!="string")return e;let t=e.split("?");if(t.length!==2)return e;let r=new URLSearchParams(t.pop());return r.sort(),[...t,r.toString()].join("?")}s(_Se,"safeUrl");function I3t(e,{path:t,method:r,body:n,headers:i}){let o=UA(e.path,t),a=UA(e.method,r),l=typeof e.body<"u"?UA(e.body,n):!0,c=kSe(e,i);return o&&a&&l&&c}s(I3t,"matchKey");function BSe(e){return Buffer.isBuffer(e)||e instanceof Uint8Array||e instanceof ArrayBuffer?e:typeof e=="object"?JSON.stringify(e):e.toString()}s(BSe,"getResponseData");function DSe(e,t){let r=t.query?v3t(t.path,t.query):t.path,n=typeof r=="string"?_Se(r):r,i=e.filter(({consumed:o})=>!o).filter(({path:o})=>UA(_Se(o),n));if(i.length===0)throw new sb(`Mock dispatch not matched for path '${n}'`);if(i=i.filter(({method:o})=>UA(o,t.method)),i.length===0)throw new sb(`Mock dispatch not matched for method '${t.method}' on path '${n}'`);if(i=i.filter(({body:o})=>typeof o<"u"?UA(o,t.body):!0),i.length===0)throw new sb(`Mock dispatch not matched for body '${t.body}' on path '${n}'`);if(i=i.filter(o=>kSe(o,t.headers)),i.length===0){let o=typeof t.headers=="object"?JSON.stringify(t.headers):t.headers;throw new sb(`Mock dispatch not matched for headers '${o}' on path '${n}'`)}return i[0]}s(DSe,"getMockDispatch");function T3t(e,t,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1},i=typeof r=="function"?{callback:r}:{...r},o={...n,...t,pending:!0,data:{error:null,...i}};return e.push(o),o}s(T3t,"addMockDispatch");function Ase(e,t){let r=e.findIndex(n=>n.consumed?I3t(n,t):!1);r!==-1&&e.splice(r,1)}s(Ase,"deleteMockDispatch");function PSe(e){let{path:t,method:r,body:n,headers:i,query:o}=e;return{path:t,method:r,body:n,headers:i,query:o}}s(PSe,"buildKey");function yse(e){let t=Object.keys(e),r=[];for(let n=0;n<t.length;++n){let i=t[n],o=e[i],a=Buffer.from(`${i}`);if(Array.isArray(o))for(let l=0;l<o.length;++l)r.push(a,Buffer.from(`${o[l]}`));else r.push(a,Buffer.from(`${o}`))}return r}s(yse,"generateKeyValues");function NSe(e){return b3t[e]||"unknown"}s(NSe,"getStatusText");async function w3t(e){let t=[];for await(let r of e)t.push(r);return Buffer.concat(t).toString("utf8")}s(w3t,"getResponse");function LSe(e,t){let r=PSe(e),n=DSe(this[Sq],r);n.timesInvoked++,n.data.callback&&(n.data={...n.data,...n.data.callback(e)});let{data:{statusCode:i,data:o,headers:a,trailers:l,error:c},delay:u,persist:f}=n,{timesInvoked:m,times:h}=n;if(n.consumed=!f&&m>=h,n.pending=m<h,c!==null)return Ase(this[Sq],r),t.onError(c),!0;typeof u=="number"&&u>0?setTimeout(()=>{p(this[Sq])},u):p(this[Sq]);function p(y,x=o){let b=Array.isArray(e.headers)?Cse(e.headers):e.headers,E=typeof x=="function"?x({...e,headers:b}):x;if(E3t(E)){E.then(N=>p(y,N));return}let _=BSe(E),k=yse(a),B=yse(l);t.onConnect?.(N=>t.onError(N),null),t.onHeaders?.(i,k,g,NSe(i)),t.onData?.(Buffer.from(_)),t.onComplete?.(B),Ase(y,r)}s(p,"handleReply");function g(){}return s(g,"resume"),!0}s(LSe,"mockDispatch");function _3t(){let e=this[A3t],t=this[C3t],r=this[y3t];return s(function(i,o){if(e.isMockActive)try{LSe.call(this,i,o)}catch(a){if(a instanceof sb){let l=e[x3t]();if(l===!1)throw new sb(`${a.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)`);if(FSe(l,t))r.call(this,i,o);else throw new sb(`${a.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)`)}else throw a}else r.call(this,i,o)},"dispatch")}s(_3t,"buildMockDispatch");function FSe(e,t){let r=new URL(t);return e===!0?!0:!!(Array.isArray(e)&&e.some(n=>UA(n,r.host)))}s(FSe,"checkNetConnect");function S3t(e){if(e){let{agent:t,...r}=e;return r}}s(S3t,"buildMockOptions");MSe.exports={getResponseData:BSe,getMockDispatch:DSe,addMockDispatch:T3t,deleteMockDispatch:Ase,buildKey:PSe,generateKeyValues:yse,matchValue:UA,getResponse:w3t,getStatusText:NSe,mockDispatch:LSe,buildMockDispatch:_3t,checkNetConnect:FSe,buildMockOptions:S3t,getHeaderByName:RSe,buildHeadersFromArray:Cse}});var wse=H((ajr,Tse)=>{"use strict";d();var{getResponseData:R3t,buildKey:k3t,addMockDispatch:xse}=BR(),{kDispatches:Rq,kDispatchKey:kq,kDefaultHeaders:vse,kDefaultTrailers:bse,kContentLength:Ese,kMockDispatch:Bq}=V6(),{InvalidArgumentError:Sg}=go(),{buildURL:B3t}=yi(),$6=class{static{s(this,"MockScope")}constructor(t){this[Bq]=t}delay(t){if(typeof t!="number"||!Number.isInteger(t)||t<=0)throw new Sg("waitInMs must be a valid integer > 0");return this[Bq].delay=t,this}persist(){return this[Bq].persist=!0,this}times(t){if(typeof t!="number"||!Number.isInteger(t)||t<=0)throw new Sg("repeatTimes must be a valid integer > 0");return this[Bq].times=t,this}},Ise=class{static{s(this,"MockInterceptor")}constructor(t,r){if(typeof t!="object")throw new Sg("opts must be an object");if(typeof t.path>"u")throw new Sg("opts.path must be defined");if(typeof t.method>"u"&&(t.method="GET"),typeof t.path=="string")if(t.query)t.path=B3t(t.path,t.query);else{let n=new URL(t.path,"data://");t.path=n.pathname+n.search}typeof t.method=="string"&&(t.method=t.method.toUpperCase()),this[kq]=k3t(t),this[Rq]=r,this[vse]={},this[bse]={},this[Ese]=!1}createMockScopeDispatchData({statusCode:t,data:r,responseOptions:n}){let i=R3t(r),o=this[Ese]?{"content-length":i.length}:{},a={...this[vse],...o,...n.headers},l={...this[bse],...n.trailers};return{statusCode:t,data:r,headers:a,trailers:l}}validateReplyParameters(t){if(typeof t.statusCode>"u")throw new Sg("statusCode must be defined");if(typeof t.responseOptions!="object"||t.responseOptions===null)throw new Sg("responseOptions must be an object")}reply(t){if(typeof t=="function"){let o=s(l=>{let c=t(l);if(typeof c!="object"||c===null)throw new Sg("reply options callback must return an object");let u={data:"",responseOptions:{},...c};return this.validateReplyParameters(u),{...this.createMockScopeDispatchData(u)}},"wrappedDefaultsCallback"),a=xse(this[Rq],this[kq],o);return new $6(a)}let r={statusCode:t,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),i=xse(this[Rq],this[kq],n);return new $6(i)}replyWithError(t){if(typeof t>"u")throw new Sg("error must be defined");let r=xse(this[Rq],this[kq],{error:t});return new $6(r)}defaultReplyHeaders(t){if(typeof t>"u")throw new Sg("headers must be defined");return this[vse]=t,this}defaultReplyTrailers(t){if(typeof t>"u")throw new Sg("trailers must be defined");return this[bse]=t,this}replyContentLength(){return this[Ese]=!0,this}};Tse.exports.MockInterceptor=Ise;Tse.exports.MockScope=$6});var Rse=H((ujr,HSe)=>{"use strict";d();var{promisify:D3t}=require("node:util"),P3t=CR(),{buildMockDispatch:N3t}=BR(),{kDispatches:QSe,kMockAgent:OSe,kClose:USe,kOriginalClose:qSe,kOrigin:WSe,kOriginalDispatch:L3t,kConnected:_se}=V6(),{MockInterceptor:F3t}=wse(),GSe=Os(),{InvalidArgumentError:M3t}=go(),Sse=class extends P3t{static{s(this,"MockClient")}constructor(t,r){if(super(t,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new M3t("Argument opts.agent must implement Agent");this[OSe]=r.agent,this[WSe]=t,this[QSe]=[],this[_se]=1,this[L3t]=this.dispatch,this[qSe]=this.close.bind(this),this.dispatch=N3t.call(this),this.close=this[USe]}get[GSe.kConnected](){return this[_se]}intercept(t){return new F3t(t,this[QSe])}async[USe](){await D3t(this[qSe])(),this[_se]=0,this[OSe][GSe.kClients].delete(this[WSe])}};HSe.exports=Sse});var Dse=H((mjr,JSe)=>{"use strict";d();var{promisify:Q3t}=require("node:util"),O3t=Q6(),{buildMockDispatch:U3t}=BR(),{kDispatches:jSe,kMockAgent:VSe,kClose:$Se,kOriginalClose:zSe,kOrigin:YSe,kOriginalDispatch:q3t,kConnected:kse}=V6(),{MockInterceptor:W3t}=wse(),KSe=Os(),{InvalidArgumentError:G3t}=go(),Bse=class extends O3t{static{s(this,"MockPool")}constructor(t,r){if(super(t,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new G3t("Argument opts.agent must implement Agent");this[VSe]=r.agent,this[YSe]=t,this[jSe]=[],this[kse]=1,this[q3t]=this.dispatch,this[zSe]=this.close.bind(this),this.dispatch=U3t.call(this),this.close=this[$Se]}get[KSe.kConnected](){return this[kse]}intercept(t){return new W3t(t,this[jSe])}async[$Se](){await Q3t(this[zSe])(),this[kse]=0,this[VSe][KSe.kClients].delete(this[YSe])}};JSe.exports=Bse});var ZSe=H((Ajr,XSe)=>{"use strict";d();var H3t={pronoun:"it",is:"is",was:"was",this:"this"},j3t={pronoun:"they",is:"are",was:"were",this:"these"};XSe.exports=class{static{s(this,"Pluralizer")}constructor(t,r){this.singular=t,this.plural=r}pluralize(t){let r=t===1,n=r?H3t:j3t,i=r?this.singular:this.plural;return{...n,count:t,noun:i}}}});var tRe=H((vjr,eRe)=>{"use strict";d();var{Transform:V3t}=require("node:stream"),{Console:$3t}=require("node:console"),z3t=process.versions.icu?"\u2705":"Y ",Y3t=process.versions.icu?"\u274C":"N ";eRe.exports=class{static{s(this,"PendingInterceptorsFormatter")}constructor({disableColors:t}={}){this.transform=new V3t({transform(r,n,i){i(null,r)}}),this.logger=new $3t({stdout:this.transform,inspectOptions:{colors:!t&&!process.env.CI}})}format(t){let r=t.map(({method:n,path:i,data:{statusCode:o},persist:a,times:l,timesInvoked:c,origin:u})=>({Method:n,Origin:u,Path:i,"Status code":o,Persistent:a?z3t:Y3t,Invocations:c,Remaining:a?1/0:l-c}));return this.logger.table(r),this.transform.read().toString()}}});var oRe=H((Ijr,iRe)=>{"use strict";d();var{kClients:ab}=Os(),K3t=O6(),{kAgent:Pse,kMockAgentSet:Dq,kMockAgentGet:rRe,kDispatches:Nse,kIsMockActive:Pq,kNetConnect:lb,kGetNetConnect:J3t,kOptions:Nq,kFactory:Lq}=V6(),X3t=Rse(),Z3t=Dse(),{matchValue:ext,buildMockOptions:txt}=BR(),{InvalidArgumentError:nRe,UndiciError:rxt}=go(),nxt=JS(),ixt=ZSe(),oxt=tRe(),Lse=class extends nxt{static{s(this,"MockAgent")}constructor(t){if(super(t),this[lb]=!0,this[Pq]=!0,t?.agent&&typeof t.agent.dispatch!="function")throw new nRe("Argument opts.agent must implement Agent");let r=t?.agent?t.agent:new K3t(t);this[Pse]=r,this[ab]=r[ab],this[Nq]=txt(t)}get(t){let r=this[rRe](t);return r||(r=this[Lq](t),this[Dq](t,r)),r}dispatch(t,r){return this.get(t.origin),this[Pse].dispatch(t,r)}async close(){await this[Pse].close(),this[ab].clear()}deactivate(){this[Pq]=!1}activate(){this[Pq]=!0}enableNetConnect(t){if(typeof t=="string"||typeof t=="function"||t instanceof RegExp)Array.isArray(this[lb])?this[lb].push(t):this[lb]=[t];else if(typeof t>"u")this[lb]=!0;else throw new nRe("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[lb]=!1}get isMockActive(){return this[Pq]}[Dq](t,r){this[ab].set(t,r)}[Lq](t){let r=Object.assign({agent:this},this[Nq]);return this[Nq]&&this[Nq].connections===1?new X3t(t,r):new Z3t(t,r)}[rRe](t){let r=this[ab].get(t);if(r)return r;if(typeof t!="string"){let n=this[Lq]("http://localhost:9999");return this[Dq](t,n),n}for(let[n,i]of Array.from(this[ab]))if(i&&typeof n!="string"&&ext(n,t)){let o=this[Lq](t);return this[Dq](t,o),o[Nse]=i[Nse],o}}[J3t](){return this[lb]}pendingInterceptors(){let t=this[ab];return Array.from(t.entries()).flatMap(([r,n])=>n[Nse].map(i=>({...i,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:t=new oxt}={}){let r=this.pendingInterceptors();if(r.length===0)return;let n=new ixt("interceptor","interceptors").pluralize(r.length);throw new rxt(`
${n.count} ${n.noun} ${n.is} pending:
${t.format(r)}
`.trim())}};iRe.exports=Lse});var Fq=H((_jr,cRe)=>{"use strict";d();var sRe=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:sxt}=go(),axt=O6();lRe()===void 0&&aRe(new axt);function aRe(e){if(!e||typeof e.dispatch!="function")throw new sxt("Argument agent must implement Agent");Object.defineProperty(globalThis,sRe,{value:e,writable:!0,enumerable:!1,configurable:!1})}s(aRe,"setGlobalDispatcher");function lRe(){return globalThis[sRe]}s(lRe,"getGlobalDispatcher");cRe.exports={setGlobalDispatcher:aRe,getGlobalDispatcher:lRe}});var Mq=H((Bjr,uRe)=>{"use strict";d();uRe.exports=class{static{s(this,"DecoratorHandler")}#e;constructor(t){if(typeof t!="object"||t===null)throw new TypeError("handler must be an object");this.#e=t}onConnect(...t){return this.#e.onConnect?.(...t)}onError(...t){return this.#e.onError?.(...t)}onUpgrade(...t){return this.#e.onUpgrade?.(...t)}onResponseStarted(...t){return this.#e.onResponseStarted?.(...t)}onHeaders(...t){return this.#e.onHeaders?.(...t)}onData(...t){return this.#e.onData?.(...t)}onComplete(...t){return this.#e.onComplete?.(...t)}onBodySent(...t){return this.#e.onBodySent?.(...t)}}});var dRe=H((Njr,fRe)=>{"use strict";d();var lxt=hq();fRe.exports=e=>{let t=e?.maxRedirections;return r=>s(function(i,o){let{maxRedirections:a=t,...l}=i;if(!a)return r(i,o);let c=new lxt(r,a,i,o);return r(l,c)},"redirectInterceptor")}});var hRe=H((Mjr,mRe)=>{"use strict";d();var cxt=wq();mRe.exports=e=>t=>s(function(n,i){return t(n,new cxt({...n,retryOptions:{...e,...n.retryOptions}},{handler:i,dispatch:t}))},"retryInterceptor")});var gRe=H((Ujr,pRe)=>{"use strict";d();var uxt=yi(),{InvalidArgumentError:fxt,RequestAbortedError:dxt}=go(),mxt=Mq(),Fse=class extends mxt{static{s(this,"DumpHandler")}#e=1024*1024;#t=null;#i=!1;#n=!1;#r=0;#o=null;#s=null;constructor({maxSize:t},r){if(super(r),t!=null&&(!Number.isFinite(t)||t<1))throw new fxt("maxSize must be a number greater than 0");this.#e=t??this.#e,this.#s=r}onConnect(t){this.#t=t,this.#s.onConnect(this.#a.bind(this))}#a(t){this.#n=!0,this.#o=t}onHeaders(t,r,n,i){let a=uxt.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new dxt(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#n?!0:this.#s.onHeaders(t,r,n,i)}onError(t){this.#i||(t=this.#o??t,this.#s.onError(t))}onData(t){return this.#r=this.#r+t.length,this.#r>=this.#e&&(this.#i=!0,this.#n?this.#s.onError(this.#o):this.#s.onComplete([])),!0}onComplete(t){if(!this.#i){if(this.#n){this.#s.onError(this.reason);return}this.#s.onComplete(t)}}};function hxt({maxSize:e}={maxSize:1024*1024}){return t=>s(function(n,i){let{dumpMaxSize:o=e}=n,a=new Fse({maxSize:o},i);return t(n,a)},"Intercept")}s(hxt,"createDumpInterceptor");pRe.exports=hxt});var CRe=H((Gjr,yRe)=>{"use strict";d();var{isIP:pxt}=require("node:net"),{lookup:gxt}=require("node:dns"),Axt=Mq(),{InvalidArgumentError:z6,InformationalError:yxt}=go(),ARe=Math.pow(2,31)-1,Mse=class{static{s(this,"DNSInstance")}#e=0;#t=0;#i=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(t){this.#e=t.maxTTL,this.#t=t.maxItems,this.dualStack=t.dualStack,this.affinity=t.affinity,this.lookup=t.lookup??this.#n,this.pick=t.pick??this.#r}get full(){return this.#i.size===this.#t}runLookup(t,r,n){let i=this.#i.get(t.hostname);if(i==null&&this.full){n(null,t.origin);return}let o={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(i==null)this.lookup(t,o,(a,l)=>{if(a||l==null||l.length===0){n(a??new yxt("No DNS entries found"));return}this.setRecords(t,l);let c=this.#i.get(t.hostname),u=this.pick(t,c,o.affinity),f;typeof u.port=="number"?f=`:${u.port}`:t.port!==""?f=`:${t.port}`:f="",n(null,`${t.protocol}//${u.family===6?`[${u.address}]`:u.address}${f}`)});else{let a=this.pick(t,i,o.affinity);if(a==null){this.#i.delete(t.hostname),this.runLookup(t,r,n);return}let l;typeof a.port=="number"?l=`:${a.port}`:t.port!==""?l=`:${t.port}`:l="",n(null,`${t.protocol}//${a.family===6?`[${a.address}]`:a.address}${l}`)}}#n(t,r,n){gxt(t.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(i,o)=>{if(i)return n(i);let a=new Map;for(let l of o)a.set(`${l.address}:${l.family}`,l);n(null,a.values())})}#r(t,r,n){let i=null,{records:o,offset:a}=r,l;if(this.dualStack?(n==null&&(a==null||a===ARe?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),o[n]!=null&&o[n].ips.length>0?l=o[n]:l=o[n===4?6:4]):l=o[n],l==null||l.ips.length===0)return i;l.offset==null||l.offset===ARe?l.offset=0:l.offset++;let c=l.offset%l.ips.length;return i=l.ips[c]??null,i==null?i:Date.now()-i.timestamp>i.ttl?(l.ips.splice(c,1),this.pick(t,r,n)):i}setRecords(t,r){let n=Date.now(),i={records:{4:null,6:null}};for(let o of r){o.timestamp=n,typeof o.ttl=="number"?o.ttl=Math.min(o.ttl,this.#e):o.ttl=this.#e;let a=i.records[o.family]??{ips:[]};a.ips.push(o),i.records[o.family]=a}this.#i.set(t.hostname,i)}getHandler(t,r){return new Qse(this,t,r)}},Qse=class extends Axt{static{s(this,"DNSDispatchHandler")}#e=null;#t=null;#i=null;#n=null;#r=null;constructor(t,{origin:r,handler:n,dispatch:i},o){super(n),this.#r=r,this.#n=n,this.#t={...o},this.#e=t,this.#i=i}onError(t){switch(t.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#r,this.#t,(r,n)=>{if(r)return this.#n.onError(r);let i={...this.#t,origin:n};this.#i(i,this)});return}this.#n.onError(t);return}case"ENOTFOUND":this.#e.deleteRecord(this.#r);default:this.#n.onError(t);break}}};yRe.exports=e=>{if(e?.maxTTL!=null&&(typeof e?.maxTTL!="number"||e?.maxTTL<0))throw new z6("Invalid maxTTL. Must be a positive number");if(e?.maxItems!=null&&(typeof e?.maxItems!="number"||e?.maxItems<1))throw new z6("Invalid maxItems. Must be a positive number and greater than zero");if(e?.affinity!=null&&e?.affinity!==4&&e?.affinity!==6)throw new z6("Invalid affinity. Must be either 4 or 6");if(e?.dualStack!=null&&typeof e?.dualStack!="boolean")throw new z6("Invalid dualStack. Must be a boolean");if(e?.lookup!=null&&typeof e?.lookup!="function")throw new z6("Invalid lookup. Must be a function");if(e?.pick!=null&&typeof e?.pick!="function")throw new z6("Invalid pick. Must be a function");let t=e?.dualStack??!0,r;t?r=e?.affinity??null:r=e?.affinity??4;let n={maxTTL:e?.maxTTL??1e4,lookup:e?.lookup??null,pick:e?.pick??null,dualStack:t,affinity:r,maxItems:e?.maxItems??1/0},i=new Mse(n);return o=>s(function(l,c){let u=l.origin.constructor===URL?l.origin:new URL(l.origin);return pxt(u.hostname)!==0?o(l,c):(i.runLookup(u,l,(f,m)=>{if(f)return c.onError(f);let h=null;h={...l,servername:u.hostname,origin:m,headers:{host:u.hostname,...l.headers}},o(h,i.getHandler({origin:u,dispatch:o,handler:c},l))}),!0)},"dnsInterceptor")}});var cb=H((Vjr,wRe)=>{"use strict";d();var{kConstruct:Cxt}=Os(),{kEnumerableProperty:Y6}=yi(),{iteratorMixin:xxt,isValidHeaderName:DR,isValidHeaderValue:vRe}=Tf(),{webidl:Zi}=dc(),Ose=require("node:assert"),Qq=require("node:util"),Ya=Symbol("headers map"),Sf=Symbol("headers map sorted");function xRe(e){return e===10||e===13||e===9||e===32}s(xRe,"isHTTPWhiteSpaceCharCode");function bRe(e){let t=0,r=e.length;for(;r>t&&xRe(e.charCodeAt(r-1));)--r;for(;r>t&&xRe(e.charCodeAt(t));)++t;return t===0&&r===e.length?e:e.substring(t,r)}s(bRe,"headerValueNormalize");function ERe(e,t){if(Array.isArray(t))for(let r=0;r<t.length;++r){let n=t[r];if(n.length!==2)throw Zi.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${n.length}.`});Use(e,n[0],n[1])}else if(typeof t=="object"&&t!==null){let r=Object.keys(t);for(let n=0;n<r.length;++n)Use(e,r[n],t[r[n]])}else throw Zi.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}s(ERe,"fill");function Use(e,t,r){if(r=bRe(r),DR(t)){if(!vRe(r))throw Zi.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Zi.errors.invalidArgument({prefix:"Headers.append",value:t,type:"header name"});if(TRe(e)==="immutable")throw new TypeError("immutable");return qse(e).append(t,r,!1)}s(Use,"appendHeader");function IRe(e,t){return e[0]<t[0]?-1:1}s(IRe,"compareHeaderName");var Oq=class e{static{s(this,"HeadersList")}cookies=null;constructor(t){t instanceof e?(this[Ya]=new Map(t[Ya]),this[Sf]=t[Sf],this.cookies=t.cookies===null?null:[...t.cookies]):(this[Ya]=new Map(t),this[Sf]=null)}contains(t,r){return this[Ya].has(r?t:t.toLowerCase())}clear(){this[Ya].clear(),this[Sf]=null,this.cookies=null}append(t,r,n){this[Sf]=null;let i=n?t:t.toLowerCase(),o=this[Ya].get(i);if(o){let a=i==="cookie"?"; ":", ";this[Ya].set(i,{name:o.name,value:`${o.value}${a}${r}`})}else this[Ya].set(i,{name:t,value:r});i==="set-cookie"&&(this.cookies??=[]).push(r)}set(t,r,n){this[Sf]=null;let i=n?t:t.toLowerCase();i==="set-cookie"&&(this.cookies=[r]),this[Ya].set(i,{name:t,value:r})}delete(t,r){this[Sf]=null,r||(t=t.toLowerCase()),t==="set-cookie"&&(this.cookies=null),this[Ya].delete(t)}get(t,r){return this[Ya].get(r?t:t.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:t,1:{value:r}}of this[Ya])yield[t,r]}get entries(){let t={};if(this[Ya].size!==0)for(let{name:r,value:n}of this[Ya].values())t[r]=n;return t}rawValues(){return this[Ya].values()}get entriesList(){let t=[];if(this[Ya].size!==0)for(let{0:r,1:{name:n,value:i}}of this[Ya])if(r==="set-cookie")for(let o of this.cookies)t.push([n,o]);else t.push([n,i]);return t}toSortedArray(){let t=this[Ya].size,r=new Array(t);if(t<=32){if(t===0)return r;let n=this[Ya][Symbol.iterator](),i=n.next().value;r[0]=[i[0],i[1].value],Ose(i[1].value!==null);for(let o=1,a=0,l=0,c=0,u=0,f,m;o<t;++o){for(m=n.next().value,f=r[o]=[m[0],m[1].value],Ose(f[1]!==null),c=0,l=o;c<l;)u=c+(l-c>>1),r[u][0]<=f[0]?c=u+1:l=u;if(o!==u){for(a=o;a>c;)r[a]=r[--a];r[c]=f}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:i,1:{value:o}}of this[Ya])r[n++]=[i,o],Ose(o!==null);return r.sort(IRe)}}},Ph=class e{static{s(this,"Headers")}#e;#t;constructor(t=void 0){Zi.util.markAsUncloneable(this),t!==Cxt&&(this.#t=new Oq,this.#e="none",t!==void 0&&(t=Zi.converters.HeadersInit(t,"Headers contructor","init"),ERe(this,t)))}append(t,r){Zi.brandCheck(this,e),Zi.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return t=Zi.converters.ByteString(t,n,"name"),r=Zi.converters.ByteString(r,n,"value"),Use(this,t,r)}delete(t){if(Zi.brandCheck(this,e),Zi.argumentLengthCheck(arguments,1,"Headers.delete"),t=Zi.converters.ByteString(t,"Headers.delete","name"),!DR(t))throw Zi.errors.invalidArgument({prefix:"Headers.delete",value:t,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(t,!1)&&this.#t.delete(t,!1)}get(t){Zi.brandCheck(this,e),Zi.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(t=Zi.converters.ByteString(t,r,"name"),!DR(t))throw Zi.errors.invalidArgument({prefix:r,value:t,type:"header name"});return this.#t.get(t,!1)}has(t){Zi.brandCheck(this,e),Zi.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(t=Zi.converters.ByteString(t,r,"name"),!DR(t))throw Zi.errors.invalidArgument({prefix:r,value:t,type:"header name"});return this.#t.contains(t,!1)}set(t,r){Zi.brandCheck(this,e),Zi.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(t=Zi.converters.ByteString(t,n,"name"),r=Zi.converters.ByteString(r,n,"value"),r=bRe(r),DR(t)){if(!vRe(r))throw Zi.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw Zi.errors.invalidArgument({prefix:n,value:t,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(t,r,!1)}getSetCookie(){Zi.brandCheck(this,e);let t=this.#t.cookies;return t?[...t]:[]}get[Sf](){if(this.#t[Sf])return this.#t[Sf];let t=[],r=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[Sf]=r;for(let i=0;i<r.length;++i){let{0:o,1:a}=r[i];if(o==="set-cookie")for(let l=0;l<n.length;++l)t.push([o,n[l]]);else t.push([o,a])}return this.#t[Sf]=t}[Qq.inspect.custom](t,r){return r.depth??=t,`Headers ${Qq.formatWithOptions(r,this.#t.entries)}`}static getHeadersGuard(t){return t.#e}static setHeadersGuard(t,r){t.#e=r}static getHeadersList(t){return t.#t}static setHeadersList(t,r){t.#t=r}},{getHeadersGuard:TRe,setHeadersGuard:vxt,getHeadersList:qse,setHeadersList:bxt}=Ph;Reflect.deleteProperty(Ph,"getHeadersGuard");Reflect.deleteProperty(Ph,"setHeadersGuard");Reflect.deleteProperty(Ph,"getHeadersList");Reflect.deleteProperty(Ph,"setHeadersList");xxt("Headers",Ph,Sf,0,1);Object.defineProperties(Ph.prototype,{append:Y6,delete:Y6,get:Y6,has:Y6,set:Y6,getSetCookie:Y6,[Symbol.toStringTag]:{value:"Headers",configurable:!0},[Qq.inspect.custom]:{enumerable:!1}});Zi.converters.HeadersInit=function(e,t,r){if(Zi.util.Type(e)==="Object"){let n=Reflect.get(e,Symbol.iterator);if(!Qq.types.isProxy(e)&&n===Ph.prototype.entries)try{return qse(e).entriesList}catch{}return typeof n=="function"?Zi.converters["sequence<sequence<ByteString>>"](e,t,r,n.bind(e)):Zi.converters["record<ByteString, ByteString>"](e,t,r)}throw Zi.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})};wRe.exports={fill:ERe,compareHeaderName:IRe,Headers:Ph,HeadersList:Oq,getHeadersGuard:TRe,setHeadersGuard:vxt,setHeadersList:bxt,getHeadersList:qse}});var NR=H((Yjr,FRe)=>{"use strict";d();var{Headers:DRe,HeadersList:_Re,fill:Ext,getHeadersGuard:Ixt,setHeadersGuard:PRe,setHeadersList:NRe}=cb(),{extractBody:SRe,cloneBody:Txt,mixinBody:wxt,hasFinalizationRegistry:_xt,streamRegistry:Sxt,bodyUnusable:Rxt}=B6(),Wse=yi(),RRe=require("node:util"),{kEnumerableProperty:Rf}=Wse,{isValidReasonPhrase:kxt,isCancelled:Bxt,isAborted:Dxt,isBlobLike:Pxt,serializeJavascriptValueToJSONString:Nxt,isErrorLike:Lxt,isomorphicEncode:Fxt,environmentSettingsObject:Mxt}=Tf(),{redirectStatusSet:Qxt,nullBodyStatus:Oxt}=eR(),{kState:aa,kHeaders:qA}=iC(),{webidl:oi}=dc(),{FormData:Uxt}=sR(),{URLSerializer:kRe}=gu(),{kConstruct:qq}=Os(),Gse=require("node:assert"),{types:qxt}=require("node:util"),Wxt=new TextEncoder("utf-8"),ub=class e{static{s(this,"Response")}static error(){return PR(Wq(),"immutable")}static json(t,r={}){oi.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=oi.converters.ResponseInit(r));let n=Wxt.encode(Nxt(t)),i=SRe(n),o=PR(K6({}),"response");return BRe(o,r,{body:i[0],type:"application/json"}),o}static redirect(t,r=302){oi.argumentLengthCheck(arguments,1,"Response.redirect"),t=oi.converters.USVString(t),r=oi.converters["unsigned short"](r);let n;try{n=new URL(t,Mxt.settingsObject.baseUrl)}catch(a){throw new TypeError(`Failed to parse URL from ${t}`,{cause:a})}if(!Qxt.has(r))throw new RangeError(`Invalid status code ${r}`);let i=PR(K6({}),"immutable");i[aa].status=r;let o=Fxt(kRe(n));return i[aa].headersList.append("location",o,!0),i}constructor(t=null,r={}){if(oi.util.markAsUncloneable(this),t===qq)return;t!==null&&(t=oi.converters.BodyInit(t)),r=oi.converters.ResponseInit(r),this[aa]=K6({}),this[qA]=new DRe(qq),PRe(this[qA],"response"),NRe(this[qA],this[aa].headersList);let n=null;if(t!=null){let[i,o]=SRe(t);n={body:i,type:o}}BRe(this,r,n)}get type(){return oi.brandCheck(this,e),this[aa].type}get url(){oi.brandCheck(this,e);let t=this[aa].urlList,r=t[t.length-1]??null;return r===null?"":kRe(r,!0)}get redirected(){return oi.brandCheck(this,e),this[aa].urlList.length>1}get status(){return oi.brandCheck(this,e),this[aa].status}get ok(){return oi.brandCheck(this,e),this[aa].status>=200&&this[aa].status<=299}get statusText(){return oi.brandCheck(this,e),this[aa].statusText}get headers(){return oi.brandCheck(this,e),this[qA]}get body(){return oi.brandCheck(this,e),this[aa].body?this[aa].body.stream:null}get bodyUsed(){return oi.brandCheck(this,e),!!this[aa].body&&Wse.isDisturbed(this[aa].body.stream)}clone(){if(oi.brandCheck(this,e),Rxt(this))throw oi.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let t=Hse(this[aa]);return PR(t,Ixt(this[qA]))}[RRe.inspect.custom](t,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${RRe.formatWithOptions(r,n)}`}};wxt(ub);Object.defineProperties(ub.prototype,{type:Rf,url:Rf,status:Rf,ok:Rf,redirected:Rf,statusText:Rf,headers:Rf,clone:Rf,body:Rf,bodyUsed:Rf,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(ub,{json:Rf,redirect:Rf,error:Rf});function Hse(e){if(e.internalResponse)return LRe(Hse(e.internalResponse),e.type);let t=K6({...e,body:null});return e.body!=null&&(t.body=Txt(t,e.body)),t}s(Hse,"cloneResponse");function K6(e){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...e,headersList:e?.headersList?new _Re(e?.headersList):new _Re,urlList:e?.urlList?[...e.urlList]:[]}}s(K6,"makeResponse");function Wq(e){let t=Lxt(e);return K6({type:"error",status:0,error:t?e:new Error(e&&String(e)),aborted:e&&e.name==="AbortError"})}s(Wq,"makeNetworkError");function Gxt(e){return e.type==="error"&&e.status===0}s(Gxt,"isNetworkError");function Uq(e,t){return t={internalResponse:e,...t},new Proxy(e,{get(r,n){return n in t?t[n]:r[n]},set(r,n,i){return Gse(!(n in t)),r[n]=i,!0}})}s(Uq,"makeFilteredResponse");function LRe(e,t){if(t==="basic")return Uq(e,{type:"basic",headersList:e.headersList});if(t==="cors")return Uq(e,{type:"cors",headersList:e.headersList});if(t==="opaque")return Uq(e,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(t==="opaqueredirect")return Uq(e,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});Gse(!1)}s(LRe,"filterResponse");function Hxt(e,t=null){return Gse(Bxt(e)),Dxt(e)?Wq(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:t})):Wq(Object.assign(new DOMException("Request was cancelled."),{cause:t}))}s(Hxt,"makeAppropriateNetworkError");function BRe(e,t,r){if(t.status!==null&&(t.status<200||t.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in t&&t.statusText!=null&&!kxt(String(t.statusText)))throw new TypeError("Invalid statusText");if("status"in t&&t.status!=null&&(e[aa].status=t.status),"statusText"in t&&t.statusText!=null&&(e[aa].statusText=t.statusText),"headers"in t&&t.headers!=null&&Ext(e[qA],t.headers),r){if(Oxt.includes(e.status))throw oi.errors.exception({header:"Response constructor",message:`Invalid response status code ${e.status}`});e[aa].body=r.body,r.type!=null&&!e[aa].headersList.contains("content-type",!0)&&e[aa].headersList.append("content-type",r.type,!0)}}s(BRe,"initializeResponse");function PR(e,t){let r=new ub(qq);return r[aa]=e,r[qA]=new DRe(qq),NRe(r[qA],e.headersList),PRe(r[qA],t),_xt&&e.body?.stream&&Sxt.register(r,new WeakRef(e.body.stream)),r}s(PR,"fromInnerResponse");oi.converters.ReadableStream=oi.interfaceConverter(ReadableStream);oi.converters.FormData=oi.interfaceConverter(Uxt);oi.converters.URLSearchParams=oi.interfaceConverter(URLSearchParams);oi.converters.XMLHttpRequestBodyInit=function(e,t,r){return typeof e=="string"?oi.converters.USVString(e,t,r):Pxt(e)?oi.converters.Blob(e,t,r,{strict:!1}):ArrayBuffer.isView(e)||qxt.isArrayBuffer(e)?oi.converters.BufferSource(e,t,r):Wse.isFormDataLike(e)?oi.converters.FormData(e,t,r,{strict:!1}):e instanceof URLSearchParams?oi.converters.URLSearchParams(e,t,r):oi.converters.DOMString(e,t,r)};oi.converters.BodyInit=function(e,t,r){return e instanceof ReadableStream?oi.converters.ReadableStream(e,t,r):e?.[Symbol.asyncIterator]?e:oi.converters.XMLHttpRequestBodyInit(e,t,r)};oi.converters.ResponseInit=oi.dictionaryConverter([{key:"status",converter:oi.converters["unsigned short"],defaultValue:s(()=>200,"defaultValue")},{key:"statusText",converter:oi.converters.ByteString,defaultValue:s(()=>"","defaultValue")},{key:"headers",converter:oi.converters.HeadersInit}]);FRe.exports={isNetworkError:Gxt,makeNetworkError:Wq,makeResponse:K6,makeAppropriateNetworkError:Hxt,filterResponse:LRe,Response:ub,cloneResponse:Hse,fromInnerResponse:PR}});var URe=H((Xjr,ORe)=>{"use strict";d();var{kConnected:MRe,kSize:QRe}=Os(),jse=class{static{s(this,"CompatWeakRef")}constructor(t){this.value=t}deref(){return this.value[MRe]===0&&this.value[QRe]===0?void 0:this.value}},Vse=class{static{s(this,"CompatFinalizer")}constructor(t){this.finalizer=t}register(t,r){t.on&&t.on("disconnect",()=>{t[MRe]===0&&t[QRe]===0&&this.finalizer(r)})}unregister(t){}};ORe.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith("v18")?(process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"),{WeakRef:jse,FinalizationRegistry:Vse}):{WeakRef,FinalizationRegistry}}});var J6=H((tVr,tke)=>{"use strict";d();var{extractBody:jxt,mixinBody:Vxt,cloneBody:$xt,bodyUnusable:qRe}=B6(),{Headers:KRe,fill:zxt,HeadersList:Vq,setHeadersGuard:zse,getHeadersGuard:Yxt,setHeadersList:JRe,getHeadersList:WRe}=cb(),{FinalizationRegistry:Kxt}=URe()(),Hq=yi(),GRe=require("node:util"),{isValidHTTPToken:Jxt,sameOrigin:HRe,environmentSettingsObject:Gq}=Tf(),{forbiddenMethodsSet:Xxt,corsSafeListedMethodsSet:Zxt,referrerPolicy:evt,requestRedirect:tvt,requestMode:rvt,requestCredentials:nvt,requestCache:ivt,requestDuplex:ovt}=eR(),{kEnumerableProperty:Ka,normalizedMethodRecordsBase:svt,normalizedMethodRecords:avt}=Hq,{kHeaders:kf,kSignal:jq,kState:vs,kDispatcher:$se}=iC(),{webidl:En}=dc(),{URLSerializer:lvt}=gu(),{kConstruct:$q}=Os(),cvt=require("node:assert"),{getMaxListeners:jRe,setMaxListeners:VRe,getEventListeners:uvt,defaultMaxListeners:$Re}=require("node:events"),fvt=Symbol("abortController"),XRe=new Kxt(({signal:e,abort:t})=>{e.removeEventListener("abort",t)}),zq=new WeakMap;function zRe(e){return t;function t(){let r=e.deref();if(r!==void 0){XRe.unregister(t),this.removeEventListener("abort",t),r.abort(this.reason);let n=zq.get(r.signal);if(n!==void 0){if(n.size!==0){for(let i of n){let o=i.deref();o!==void 0&&o.abort(this.reason)}n.clear()}zq.delete(r.signal)}}}}s(zRe,"buildAbort");var YRe=!1,pC=class e{static{s(this,"Request")}constructor(t,r={}){if(En.util.markAsUncloneable(this),t===$q)return;let n="Request constructor";En.argumentLengthCheck(arguments,1,n),t=En.converters.RequestInfo(t,n,"input"),r=En.converters.RequestInit(r,n,"init");let i=null,o=null,a=Gq.settingsObject.baseUrl,l=null;if(typeof t=="string"){this[$se]=r.dispatcher;let b;try{b=new URL(t,a)}catch(E){throw new TypeError("Failed to parse URL from "+t,{cause:E})}if(b.username||b.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+t);i=Yq({urlList:[b]}),o="cors"}else this[$se]=r.dispatcher||t[$se],cvt(t instanceof e),i=t[vs],l=t[jq];let c=Gq.settingsObject.origin,u="client";if(i.window?.constructor?.name==="EnvironmentSettingsObject"&&HRe(i.window,c)&&(u=i.window),r.window!=null)throw new TypeError(`'window' option '${u}' must be null`);"window"in r&&(u="no-window"),i=Yq({method:i.method,headersList:i.headersList,unsafeRequest:i.unsafeRequest,client:Gq.settingsObject,window:u,priority:i.priority,origin:i.origin,referrer:i.referrer,referrerPolicy:i.referrerPolicy,mode:i.mode,credentials:i.credentials,cache:i.cache,redirect:i.redirect,integrity:i.integrity,keepalive:i.keepalive,reloadNavigation:i.reloadNavigation,historyNavigation:i.historyNavigation,urlList:[...i.urlList]});let f=Object.keys(r).length!==0;if(f&&(i.mode==="navigate"&&(i.mode="same-origin"),i.reloadNavigation=!1,i.historyNavigation=!1,i.origin="client",i.referrer="client",i.referrerPolicy="",i.url=i.urlList[i.urlList.length-1],i.urlList=[i.url]),r.referrer!==void 0){let b=r.referrer;if(b==="")i.referrer="no-referrer";else{let E;try{E=new URL(b,a)}catch(_){throw new TypeError(`Referrer "${b}" is not a valid URL.`,{cause:_})}E.protocol==="about:"&&E.hostname==="client"||c&&!HRe(E,Gq.settingsObject.baseUrl)?i.referrer="client":i.referrer=E}}r.referrerPolicy!==void 0&&(i.referrerPolicy=r.referrerPolicy);let m;if(r.mode!==void 0?m=r.mode:m=o,m==="navigate")throw En.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(m!=null&&(i.mode=m),r.credentials!==void 0&&(i.credentials=r.credentials),r.cache!==void 0&&(i.cache=r.cache),i.cache==="only-if-cached"&&i.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(i.redirect=r.redirect),r.integrity!=null&&(i.integrity=String(r.integrity)),r.keepalive!==void 0&&(i.keepalive=!!r.keepalive),r.method!==void 0){let b=r.method,E=avt[b];if(E!==void 0)i.method=E;else{if(!Jxt(b))throw new TypeError(`'${b}' is not a valid HTTP method.`);let _=b.toUpperCase();if(Xxt.has(_))throw new TypeError(`'${b}' HTTP method is unsupported.`);b=svt[_]??b,i.method=b}!YRe&&i.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),YRe=!0)}r.signal!==void 0&&(l=r.signal),this[vs]=i;let h=new AbortController;if(this[jq]=h.signal,l!=null){if(!l||typeof l.aborted!="boolean"||typeof l.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(l.aborted)h.abort(l.reason);else{this[fvt]=h;let b=new WeakRef(h),E=zRe(b);try{(typeof jRe=="function"&&jRe(l)===$Re||uvt(l,"abort").length>=$Re)&&VRe(1500,l)}catch{}Hq.addAbortListener(l,E),XRe.register(h,{signal:l,abort:E},E)}}if(this[kf]=new KRe($q),JRe(this[kf],i.headersList),zse(this[kf],"request"),m==="no-cors"){if(!Zxt.has(i.method))throw new TypeError(`'${i.method} is unsupported in no-cors mode.`);zse(this[kf],"request-no-cors")}if(f){let b=WRe(this[kf]),E=r.headers!==void 0?r.headers:new Vq(b);if(b.clear(),E instanceof Vq){for(let{name:_,value:k}of E.rawValues())b.append(_,k,!1);b.cookies=E.cookies}else zxt(this[kf],E)}let p=t instanceof e?t[vs].body:null;if((r.body!=null||p!=null)&&(i.method==="GET"||i.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let g=null;if(r.body!=null){let[b,E]=jxt(r.body,i.keepalive);g=b,E&&!WRe(this[kf]).contains("content-type",!0)&&this[kf].append("content-type",E)}let y=g??p;if(y!=null&&y.source==null){if(g!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(i.mode!=="same-origin"&&i.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');i.useCORSPreflightFlag=!0}let x=y;if(g==null&&p!=null){if(qRe(t))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let b=new TransformStream;p.stream.pipeThrough(b),x={source:p.source,length:p.length,stream:b.readable}}this[vs].body=x}get method(){return En.brandCheck(this,e),this[vs].method}get url(){return En.brandCheck(this,e),lvt(this[vs].url)}get headers(){return En.brandCheck(this,e),this[kf]}get destination(){return En.brandCheck(this,e),this[vs].destination}get referrer(){return En.brandCheck(this,e),this[vs].referrer==="no-referrer"?"":this[vs].referrer==="client"?"about:client":this[vs].referrer.toString()}get referrerPolicy(){return En.brandCheck(this,e),this[vs].referrerPolicy}get mode(){return En.brandCheck(this,e),this[vs].mode}get credentials(){return this[vs].credentials}get cache(){return En.brandCheck(this,e),this[vs].cache}get redirect(){return En.brandCheck(this,e),this[vs].redirect}get integrity(){return En.brandCheck(this,e),this[vs].integrity}get keepalive(){return En.brandCheck(this,e),this[vs].keepalive}get isReloadNavigation(){return En.brandCheck(this,e),this[vs].reloadNavigation}get isHistoryNavigation(){return En.brandCheck(this,e),this[vs].historyNavigation}get signal(){return En.brandCheck(this,e),this[jq]}get body(){return En.brandCheck(this,e),this[vs].body?this[vs].body.stream:null}get bodyUsed(){return En.brandCheck(this,e),!!this[vs].body&&Hq.isDisturbed(this[vs].body.stream)}get duplex(){return En.brandCheck(this,e),"half"}clone(){if(En.brandCheck(this,e),qRe(this))throw new TypeError("unusable");let t=ZRe(this[vs]),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=zq.get(this.signal);n===void 0&&(n=new Set,zq.set(this.signal,n));let i=new WeakRef(r);n.add(i),Hq.addAbortListener(r.signal,zRe(i))}return eke(t,r.signal,Yxt(this[kf]))}[GRe.inspect.custom](t,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${GRe.formatWithOptions(r,n)}`}};Vxt(pC);function Yq(e){return{method:e.method??"GET",localURLsOnly:e.localURLsOnly??!1,unsafeRequest:e.unsafeRequest??!1,body:e.body??null,client:e.client??null,reservedClient:e.reservedClient??null,replacesClientId:e.replacesClientId??"",window:e.window??"client",keepalive:e.keepalive??!1,serviceWorkers:e.serviceWorkers??"all",initiator:e.initiator??"",destination:e.destination??"",priority:e.priority??null,origin:e.origin??"client",policyContainer:e.policyContainer??"client",referrer:e.referrer??"client",referrerPolicy:e.referrerPolicy??"",mode:e.mode??"no-cors",useCORSPreflightFlag:e.useCORSPreflightFlag??!1,credentials:e.credentials??"same-origin",useCredentials:e.useCredentials??!1,cache:e.cache??"default",redirect:e.redirect??"follow",integrity:e.integrity??"",cryptoGraphicsNonceMetadata:e.cryptoGraphicsNonceMetadata??"",parserMetadata:e.parserMetadata??"",reloadNavigation:e.reloadNavigation??!1,historyNavigation:e.historyNavigation??!1,userActivation:e.userActivation??!1,taintedOrigin:e.taintedOrigin??!1,redirectCount:e.redirectCount??0,responseTainting:e.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:e.preventNoCacheCacheControlHeaderModification??!1,done:e.done??!1,timingAllowFailed:e.timingAllowFailed??!1,urlList:e.urlList,url:e.urlList[0],headersList:e.headersList?new Vq(e.headersList):new Vq}}s(Yq,"makeRequest");function ZRe(e){let t=Yq({...e,body:null});return e.body!=null&&(t.body=$xt(t,e.body)),t}s(ZRe,"cloneRequest");function eke(e,t,r){let n=new pC($q);return n[vs]=e,n[jq]=t,n[kf]=new KRe($q),JRe(n[kf],e.headersList),zse(n[kf],r),n}s(eke,"fromInnerRequest");Object.defineProperties(pC.prototype,{method:Ka,url:Ka,headers:Ka,redirect:Ka,clone:Ka,signal:Ka,duplex:Ka,destination:Ka,body:Ka,bodyUsed:Ka,isHistoryNavigation:Ka,isReloadNavigation:Ka,keepalive:Ka,integrity:Ka,cache:Ka,credentials:Ka,attribute:Ka,referrerPolicy:Ka,referrer:Ka,mode:Ka,[Symbol.toStringTag]:{value:"Request",configurable:!0}});En.converters.Request=En.interfaceConverter(pC);En.converters.RequestInfo=function(e,t,r){return typeof e=="string"?En.converters.USVString(e,t,r):e instanceof pC?En.converters.Request(e,t,r):En.converters.USVString(e,t,r)};En.converters.AbortSignal=En.interfaceConverter(AbortSignal);En.converters.RequestInit=En.dictionaryConverter([{key:"method",converter:En.converters.ByteString},{key:"headers",converter:En.converters.HeadersInit},{key:"body",converter:En.nullableConverter(En.converters.BodyInit)},{key:"referrer",converter:En.converters.USVString},{key:"referrerPolicy",converter:En.converters.DOMString,allowedValues:evt},{key:"mode",converter:En.converters.DOMString,allowedValues:rvt},{key:"credentials",converter:En.converters.DOMString,allowedValues:nvt},{key:"cache",converter:En.converters.DOMString,allowedValues:ivt},{key:"redirect",converter:En.converters.DOMString,allowedValues:tvt},{key:"integrity",converter:En.converters.DOMString},{key:"keepalive",converter:En.converters.boolean},{key:"signal",converter:En.nullableConverter(e=>En.converters.AbortSignal(e,"RequestInit","signal",{strict:!1}))},{key:"window",converter:En.converters.any},{key:"duplex",converter:En.converters.DOMString,allowedValues:ovt},{key:"dispatcher",converter:En.converters.any}]);tke.exports={Request:pC,makeRequest:Yq,fromInnerRequest:eke,cloneRequest:ZRe}});var FR=H((iVr,gke)=>{"use strict";d();var{makeNetworkError:Lo,makeAppropriateNetworkError:Kq,filterResponse:Yse,makeResponse:Jq,fromInnerResponse:dvt}=NR(),{HeadersList:rke}=cb(),{Request:mvt,cloneRequest:hvt}=J6(),gC=require("node:zlib"),{bytesMatch:pvt,makePolicyContainer:gvt,clonePolicyContainer:Avt,requestBadPort:yvt,TAOCheck:Cvt,appendRequestOriginHeader:xvt,responseLocationURL:vvt,requestCurrentURL:Rg,setRequestReferrerPolicyOnRedirect:bvt,tryUpgradeRequestToAPotentiallyTrustworthyURL:Evt,createOpaqueTimingInfo:eae,appendFetchMetadata:Ivt,corsCheck:Tvt,crossOriginResourcePolicyCheck:wvt,determineRequestsReferrer:_vt,coarsenedSharedCurrentTime:LR,createDeferredPromise:Svt,isBlobLike:Rvt,sameOrigin:Zse,isCancelled:fb,isAborted:nke,isErrorLike:kvt,fullyReadBody:Bvt,readableStreamClose:Dvt,isomorphicEncode:Xq,urlIsLocal:Pvt,urlIsHttpHttpsScheme:tae,urlHasHttpsScheme:Nvt,clampAndCoarsenConnectionTimingInfo:Lvt,simpleRangeHeaderValue:Fvt,buildContentRange:Mvt,createInflate:Qvt,extractMimeType:Ovt}=Tf(),{kState:ake,kDispatcher:Uvt}=iC(),db=require("node:assert"),{safelyExtractBody:rae,extractBody:ike}=B6(),{redirectStatusSet:lke,nullBodyStatus:cke,safeMethodsSet:qvt,requestBodyHeader:Wvt,subresourceSet:Gvt}=eR(),Hvt=require("node:events"),{Readable:jvt,pipeline:Vvt,finished:$vt}=require("node:stream"),{addAbortListener:zvt,isErrored:Yvt,isReadable:Zq,bufferToLowerCasedHeaderName:oke}=yi(),{dataURLProcessor:Kvt,serializeAMimeType:Jvt,minimizeSupportedMimeType:Xvt}=gu(),{getGlobalDispatcher:Zvt}=Fq(),{webidl:ebt}=dc(),{STATUS_CODES:tbt}=require("node:http"),rbt=["GET","HEAD"],nbt=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",Kse,eW=class extends Hvt{static{s(this,"Fetch")}constructor(t){super(),this.dispatcher=t,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(t){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(t),this.emit("terminated",t))}abort(t){this.state==="ongoing"&&(this.state="aborted",t||(t=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=t,this.connection?.destroy(t),this.emit("terminated",t))}};function ibt(e){uke(e,"fetch")}s(ibt,"handleFetchDone");function obt(e,t=void 0){ebt.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=Svt(),n;try{n=new mvt(e,t)}catch(f){return r.reject(f),r.promise}let i=n[ake];if(n.signal.aborted)return Jse(r,i,null,n.signal.reason),r.promise;i.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(i.serviceWorkers="none");let a=null,l=!1,c=null;return zvt(n.signal,()=>{l=!0,db(c!=null),c.abort(n.signal.reason);let f=a?.deref();Jse(r,i,f,n.signal.reason)}),c=dke({request:i,processResponseEndOfBody:ibt,processResponse:s(f=>{if(!l){if(f.aborted){Jse(r,i,a,c.serializedAbortReason);return}if(f.type==="error"){r.reject(new TypeError("fetch failed",{cause:f.error}));return}a=new WeakRef(dvt(f,"immutable")),r.resolve(a.deref()),r=null}},"processResponse"),dispatcher:n[Uvt]}),r.promise}s(obt,"fetch");function uke(e,t="other"){if(e.type==="error"&&e.aborted||!e.urlList?.length)return;let r=e.urlList[0],n=e.timingInfo,i=e.cacheState;tae(r)&&n!==null&&(e.timingAllowPassed||(n=eae({startTime:n.startTime}),i=""),n.endTime=LR(),e.timingInfo=n,fke(n,r.href,t,globalThis,i))}s(uke,"finalizeAndReportTiming");var fke=performance.markResourceTiming;function Jse(e,t,r,n){if(e&&e.reject(n),t.body!=null&&Zq(t.body?.stream)&&t.body.stream.cancel(n).catch(o=>{if(o.code!=="ERR_INVALID_STATE")throw o}),r==null)return;let i=r[ake];i.body!=null&&Zq(i.body?.stream)&&i.body.stream.cancel(n).catch(o=>{if(o.code!=="ERR_INVALID_STATE")throw o})}s(Jse,"abortFetch");function dke({request:e,processRequestBodyChunkLength:t,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:i,processResponseConsumeBody:o,useParallelQueue:a=!1,dispatcher:l=Zvt()}){db(l);let c=null,u=!1;e.client!=null&&(c=e.client.globalObject,u=e.client.crossOriginIsolatedCapability);let f=LR(u),m=eae({startTime:f}),h={controller:new eW(l),request:e,timingInfo:m,processRequestBodyChunkLength:t,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:o,processResponseEndOfBody:i,taskDestination:c,crossOriginIsolatedCapability:u};return db(!e.body||e.body.stream),e.window==="client"&&(e.window=e.client?.globalObject?.constructor?.name==="Window"?e.client:"no-window"),e.origin==="client"&&(e.origin=e.client.origin),e.policyContainer==="client"&&(e.client!=null?e.policyContainer=Avt(e.client.policyContainer):e.policyContainer=gvt()),e.headersList.contains("accept",!0)||e.headersList.append("accept","*/*",!0),e.headersList.contains("accept-language",!0)||e.headersList.append("accept-language","*",!0),e.priority,Gvt.has(e.destination),mke(h).catch(p=>{h.controller.terminate(p)}),h.controller}s(dke,"fetching");async function mke(e,t=!1){let r=e.request,n=null;if(r.localURLsOnly&&!Pvt(Rg(r))&&(n=Lo("local URLs only")),Evt(r),yvt(r)==="blocked"&&(n=Lo("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=_vt(r)),n===null&&(n=await(async()=>{let o=Rg(r);return Zse(o,r.url)&&r.responseTainting==="basic"||o.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await ske(e)):r.mode==="same-origin"?Lo('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?Lo('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await ske(e)):tae(Rg(r))?(r.responseTainting="cors",await hke(e)):Lo("URL scheme must be a HTTP(S) scheme")})()),t)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=Yse(n,"basic"):r.responseTainting==="cors"?n=Yse(n,"cors"):r.responseTainting==="opaque"?n=Yse(n,"opaque"):db(!1));let i=n.status===0?n:n.internalResponse;if(i.urlList.length===0&&i.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&i.status===206&&i.rangeRequested&&!r.headers.contains("range",!0)&&(n=i=Lo()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||cke.includes(i.status))&&(i.body=null,e.controller.dump=!0),r.integrity){let o=s(l=>Xse(e,Lo(l)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){o(n.error);return}let a=s(l=>{if(!pvt(l,r.integrity)){o("integrity mismatch");return}n.body=rae(l)[0],Xse(e,n)},"processBody");await Bvt(n.body,a,o)}else Xse(e,n)}s(mke,"mainFetch");function ske(e){if(fb(e)&&e.request.redirectCount===0)return Promise.resolve(Kq(e));let{request:t}=e,{protocol:r}=Rg(t);switch(r){case"about:":return Promise.resolve(Lo("about scheme is not supported"));case"blob:":{Kse||(Kse=require("node:buffer").resolveObjectURL);let n=Rg(t);if(n.search.length!==0)return Promise.resolve(Lo("NetworkError when attempting to fetch resource."));let i=Kse(n.toString());if(t.method!=="GET"||!Rvt(i))return Promise.resolve(Lo("invalid method"));let o=Jq(),a=i.size,l=Xq(`${a}`),c=i.type;if(t.headersList.contains("range",!0)){o.rangeRequested=!0;let u=t.headersList.get("range",!0),f=Fvt(u,!0);if(f==="failure")return Promise.resolve(Lo("failed to fetch the data URL"));let{rangeStartValue:m,rangeEndValue:h}=f;if(m===null)m=a-h,h=m+h-1;else{if(m>=a)return Promise.resolve(Lo("Range start is greater than the blob's size."));(h===null||h>=a)&&(h=a-1)}let p=i.slice(m,h,c),g=ike(p);o.body=g[0];let y=Xq(`${p.size}`),x=Mvt(m,h,a);o.status=206,o.statusText="Partial Content",o.headersList.set("content-length",y,!0),o.headersList.set("content-type",c,!0),o.headersList.set("content-range",x,!0)}else{let u=ike(i);o.statusText="OK",o.body=u[0],o.headersList.set("content-length",l,!0),o.headersList.set("content-type",c,!0)}return Promise.resolve(o)}case"data:":{let n=Rg(t),i=Kvt(n);if(i==="failure")return Promise.resolve(Lo("failed to fetch the data URL"));let o=Jvt(i.mimeType);return Promise.resolve(Jq({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:o}]],body:rae(i.body)[0]}))}case"file:":return Promise.resolve(Lo("not implemented... yet..."));case"http:":case"https:":return hke(e).catch(n=>Lo(n));default:return Promise.resolve(Lo("unknown scheme"))}}s(ske,"schemeFetch");function sbt(e,t){e.request.done=!0,e.processResponseDone!=null&&queueMicrotask(()=>e.processResponseDone(t))}s(sbt,"finalizeResponse");function Xse(e,t){let r=e.timingInfo,n=s(()=>{let o=Date.now();e.request.destination==="document"&&(e.controller.fullTimingInfo=r),e.controller.reportTimingSteps=()=>{if(e.request.url.protocol!=="https:")return;r.endTime=o;let l=t.cacheState,c=t.bodyInfo;t.timingAllowPassed||(r=eae(r),l="");let u=0;if(e.request.mode!=="navigator"||!t.hasCrossOriginRedirects){u=t.status;let f=Ovt(t.headersList);f!=="failure"&&(c.contentType=Xvt(f))}e.request.initiatorType!=null&&fke(r,e.request.url.href,e.request.initiatorType,globalThis,l,c,u)};let a=s(()=>{e.request.done=!0,e.processResponseEndOfBody!=null&&queueMicrotask(()=>e.processResponseEndOfBody(t)),e.request.initiatorType!=null&&e.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>a())},"processResponseEndOfBody");e.processResponse!=null&&queueMicrotask(()=>{e.processResponse(t),e.processResponse=null});let i=t.type==="error"?t:t.internalResponse??t;i.body==null?n():$vt(i.body.stream,()=>{n()})}s(Xse,"fetchFinale");async function hke(e){let t=e.request,r=null,n=null,i=e.timingInfo;if(t.serviceWorkers,r===null){if(t.redirect==="follow"&&(t.serviceWorkers="none"),n=r=await pke(e),t.responseTainting==="cors"&&Tvt(t,r)==="failure")return Lo("cors failure");Cvt(t,r)==="failure"&&(t.timingAllowFailed=!0)}return(t.responseTainting==="opaque"||r.type==="opaque")&&wvt(t.origin,t.client,t.destination,n)==="blocked"?Lo("blocked"):(lke.has(n.status)&&(t.redirect!=="manual"&&e.controller.connection.destroy(void 0,!1),t.redirect==="error"?r=Lo("unexpected redirect"):t.redirect==="manual"?r=n:t.redirect==="follow"?r=await abt(e,r):db(!1)),r.timingInfo=i,r)}s(hke,"httpFetch");function abt(e,t){let r=e.request,n=t.internalResponse?t.internalResponse:t,i;try{if(i=vvt(n,Rg(r).hash),i==null)return t}catch(a){return Promise.resolve(Lo(a))}if(!tae(i))return Promise.resolve(Lo("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(Lo("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(i.username||i.password)&&!Zse(r,i))return Promise.resolve(Lo('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(i.username||i.password))return Promise.resolve(Lo('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(Lo());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!rbt.includes(r.method)){r.method="GET",r.body=null;for(let a of Wvt)r.headersList.delete(a)}Zse(Rg(r),i)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(db(r.body.source!=null),r.body=rae(r.body.source)[0]);let o=e.timingInfo;return o.redirectEndTime=o.postRedirectStartTime=LR(e.crossOriginIsolatedCapability),o.redirectStartTime===0&&(o.redirectStartTime=o.startTime),r.urlList.push(i),bvt(r,n),mke(e,!0)}s(abt,"httpRedirectFetch");async function pke(e,t=!1,r=!1){let n=e.request,i=null,o=null,a=null,l=null,c=!1;n.window==="no-window"&&n.redirect==="error"?(i=e,o=n):(o=hvt(n),i={...e},i.request=o);let u=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",f=o.body?o.body.length:null,m=null;if(o.body==null&&["POST","PUT"].includes(o.method)&&(m="0"),f!=null&&(m=Xq(`${f}`)),m!=null&&o.headersList.append("content-length",m,!0),f!=null&&o.keepalive,o.referrer instanceof URL&&o.headersList.append("referer",Xq(o.referrer.href),!0),xvt(o),Ivt(o),o.headersList.contains("user-agent",!0)||o.headersList.append("user-agent",nbt),o.cache==="default"&&(o.headersList.contains("if-modified-since",!0)||o.headersList.contains("if-none-match",!0)||o.headersList.contains("if-unmodified-since",!0)||o.headersList.contains("if-match",!0)||o.headersList.contains("if-range",!0))&&(o.cache="no-store"),o.cache==="no-cache"&&!o.preventNoCacheCacheControlHeaderModification&&!o.headersList.contains("cache-control",!0)&&o.headersList.append("cache-control","max-age=0",!0),(o.cache==="no-store"||o.cache==="reload")&&(o.headersList.contains("pragma",!0)||o.headersList.append("pragma","no-cache",!0),o.headersList.contains("cache-control",!0)||o.headersList.append("cache-control","no-cache",!0)),o.headersList.contains("range",!0)&&o.headersList.append("accept-encoding","identity",!0),o.headersList.contains("accept-encoding",!0)||(Nvt(Rg(o))?o.headersList.append("accept-encoding","br, gzip, deflate",!0):o.headersList.append("accept-encoding","gzip, deflate",!0)),o.headersList.delete("host",!0),l==null&&(o.cache="no-store"),o.cache!=="no-store"&&o.cache,a==null){if(o.cache==="only-if-cached")return Lo("only if cached");let h=await lbt(i,u,r);!qvt.has(o.method)&&h.status>=200&&h.status<=399,c&&h.status,a==null&&(a=h)}if(a.urlList=[...o.urlList],o.headersList.contains("range",!0)&&(a.rangeRequested=!0),a.requestIncludesCredentials=u,a.status===407)return n.window==="no-window"?Lo():fb(e)?Kq(e):Lo("proxy authentication required");if(a.status===421&&!r&&(n.body==null||n.body.source!=null)){if(fb(e))return Kq(e);e.controller.connection.destroy(),a=await pke(e,t,!0)}return a}s(pke,"httpNetworkOrCacheFetch");async function lbt(e,t=!1,r=!1){db(!e.controller.connection||e.controller.connection.destroyed),e.controller.connection={abort:null,destroyed:!1,destroy(g,y=!0){this.destroyed||(this.destroyed=!0,y&&this.abort?.(g??new DOMException("The operation was aborted.","AbortError")))}};let n=e.request,i=null,o=e.timingInfo;null==null&&(n.cache="no-store");let l=r?"yes":"no";n.mode;let c=null;if(n.body==null&&e.processRequestEndOfBody)queueMicrotask(()=>e.processRequestEndOfBody());else if(n.body!=null){let g=s(async function*(b){fb(e)||(yield b,e.processRequestBodyChunkLength?.(b.byteLength))},"processBodyChunk"),y=s(()=>{fb(e)||e.processRequestEndOfBody&&e.processRequestEndOfBody()},"processEndOfBody"),x=s(b=>{fb(e)||(b.name==="AbortError"?e.controller.abort():e.controller.terminate(b))},"processBodyError");c=async function*(){try{for await(let b of n.body.stream)yield*g(b);y()}catch(b){x(b)}}()}try{let{body:g,status:y,statusText:x,headersList:b,socket:E}=await p({body:c});if(E)i=Jq({status:y,statusText:x,headersList:b,socket:E});else{let _=g[Symbol.asyncIterator]();e.controller.next=()=>_.next(),i=Jq({status:y,statusText:x,headersList:b})}}catch(g){return g.name==="AbortError"?(e.controller.connection.destroy(),Kq(e,g)):Lo(g)}let u=s(async()=>{await e.controller.resume()},"pullAlgorithm"),f=s(g=>{fb(e)||e.controller.abort(g)},"cancelAlgorithm"),m=new ReadableStream({async start(g){e.controller.controller=g},async pull(g){await u(g)},async cancel(g){await f(g)},type:"bytes"});i.body={stream:m,source:null,length:null},e.controller.onAborted=h,e.controller.on("terminated",h),e.controller.resume=async()=>{for(;;){let g,y;try{let{done:b,value:E}=await e.controller.next();if(nke(e))break;g=b?void 0:E}catch(b){e.controller.ended&&!o.encodedBodySize?g=void 0:(g=b,y=!0)}if(g===void 0){Dvt(e.controller.controller),sbt(e,i);return}if(o.decodedBodySize+=g?.byteLength??0,y){e.controller.terminate(g);return}let x=new Uint8Array(g);if(x.byteLength&&e.controller.controller.enqueue(x),Yvt(m)){e.controller.terminate();return}if(e.controller.controller.desiredSize<=0)return}};function h(g){nke(e)?(i.aborted=!0,Zq(m)&&e.controller.controller.error(e.controller.serializedAbortReason)):Zq(m)&&e.controller.controller.error(new TypeError("terminated",{cause:kvt(g)?g:void 0})),e.controller.connection.destroy()}return s(h,"onAborted"),i;function p({body:g}){let y=Rg(n),x=e.controller.dispatcher;return new Promise((b,E)=>x.dispatch({path:y.pathname+y.search,origin:y.origin,method:n.method,body:x.isMockActive?n.body&&(n.body.source||n.body.stream):g,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(_){let{connection:k}=e.controller;o.finalConnectionTimingInfo=Lvt(void 0,o.postRedirectStartTime,e.crossOriginIsolatedCapability),k.destroyed?_(new DOMException("The operation was aborted.","AbortError")):(e.controller.on("terminated",_),this.abort=k.abort=_),o.finalNetworkRequestStartTime=LR(e.crossOriginIsolatedCapability)},onResponseStarted(){o.finalNetworkResponseStartTime=LR(e.crossOriginIsolatedCapability)},onHeaders(_,k,B,N){if(_<200)return;let M=[],Z="",he=new rke;for(let z=0;z<k.length;z+=2)he.append(oke(k[z]),k[z+1].toString("latin1"),!0);let ee=he.get("content-encoding",!0);ee&&(M=ee.toLowerCase().split(",").map(z=>z.trim())),Z=he.get("location",!0),this.body=new jvt({read:B});let G=[],q=Z&&n.redirect==="follow"&&lke.has(_);if(M.length!==0&&n.method!=="HEAD"&&n.method!=="CONNECT"&&!cke.includes(_)&&!q)for(let z=M.length-1;z>=0;--z){let j=M[z];if(j==="x-gzip"||j==="gzip")G.push(gC.createGunzip({flush:gC.constants.Z_SYNC_FLUSH,finishFlush:gC.constants.Z_SYNC_FLUSH}));else if(j==="deflate")G.push(Qvt({flush:gC.constants.Z_SYNC_FLUSH,finishFlush:gC.constants.Z_SYNC_FLUSH}));else if(j==="br")G.push(gC.createBrotliDecompress({flush:gC.constants.BROTLI_OPERATION_FLUSH,finishFlush:gC.constants.BROTLI_OPERATION_FLUSH}));else{G.length=0;break}}let ie=this.onError.bind(this);return b({status:_,statusText:N,headersList:he,body:G.length?Vvt(this.body,...G,z=>{z&&this.onError(z)}).on("error",ie):this.body.on("error",ie)}),!0},onData(_){if(e.controller.dump)return;let k=_;return o.encodedBodySize+=k.byteLength,this.body.push(k)},onComplete(){this.abort&&e.controller.off("terminated",this.abort),e.controller.onAborted&&e.controller.off("terminated",e.controller.onAborted),e.controller.ended=!0,this.body.push(null)},onError(_){this.abort&&e.controller.off("terminated",this.abort),this.body?.destroy(_),e.controller.terminate(_),E(_)},onUpgrade(_,k,B){if(_!==101)return;let N=new rke;for(let M=0;M<k.length;M+=2)N.append(oke(k[M]),k[M+1].toString("latin1"),!0);return b({status:_,statusText:tbt[_],headersList:N,socket:B}),!0}}))}s(p,"dispatch")}s(lbt,"httpNetworkFetch");gke.exports={fetch:obt,Fetch:eW,fetching:dke,finalizeAndReportTiming:uke}});var nae=H((aVr,Ake)=>{"use strict";d();Ake.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var Cke=H((cVr,yke)=>{"use strict";d();var{webidl:Bf}=dc(),tW=Symbol("ProgressEvent state"),iae=class e extends Event{static{s(this,"ProgressEvent")}constructor(t,r={}){t=Bf.converters.DOMString(t,"ProgressEvent constructor","type"),r=Bf.converters.ProgressEventInit(r??{}),super(t,r),this[tW]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return Bf.brandCheck(this,e),this[tW].lengthComputable}get loaded(){return Bf.brandCheck(this,e),this[tW].loaded}get total(){return Bf.brandCheck(this,e),this[tW].total}};Bf.converters.ProgressEventInit=Bf.dictionaryConverter([{key:"lengthComputable",converter:Bf.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"loaded",converter:Bf.converters["unsigned long long"],defaultValue:s(()=>0,"defaultValue")},{key:"total",converter:Bf.converters["unsigned long long"],defaultValue:s(()=>0,"defaultValue")},{key:"bubbles",converter:Bf.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"cancelable",converter:Bf.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"composed",converter:Bf.converters.boolean,defaultValue:s(()=>!1,"defaultValue")}]);yke.exports={ProgressEvent:iae}});var vke=H((dVr,xke)=>{"use strict";d();function cbt(e){if(!e)return"failure";switch(e.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}s(cbt,"getEncoding");xke.exports={getEncoding:cbt}});var Rke=H((pVr,Ske)=>{"use strict";d();var{kState:X6,kError:oae,kResult:bke,kAborted:MR,kLastProgressEventFired:sae}=nae(),{ProgressEvent:ubt}=Cke(),{getEncoding:Eke}=vke(),{serializeAMimeType:fbt,parseMIMEType:Ike}=gu(),{types:dbt}=require("node:util"),{StringDecoder:Tke}=require("string_decoder"),{btoa:wke}=require("node:buffer"),mbt={enumerable:!0,writable:!1,configurable:!1};function hbt(e,t,r,n){if(e[X6]==="loading")throw new DOMException("Invalid state","InvalidStateError");e[X6]="loading",e[bke]=null,e[oae]=null;let o=t.stream().getReader(),a=[],l=o.read(),c=!0;(async()=>{for(;!e[MR];)try{let{done:u,value:f}=await l;if(c&&!e[MR]&&queueMicrotask(()=>{AC("loadstart",e)}),c=!1,!u&&dbt.isUint8Array(f))a.push(f),(e[sae]===void 0||Date.now()-e[sae]>=50)&&!e[MR]&&(e[sae]=Date.now(),queueMicrotask(()=>{AC("progress",e)})),l=o.read();else if(u){queueMicrotask(()=>{e[X6]="done";try{let m=pbt(a,r,t.type,n);if(e[MR])return;e[bke]=m,AC("load",e)}catch(m){e[oae]=m,AC("error",e)}e[X6]!=="loading"&&AC("loadend",e)});break}}catch(u){if(e[MR])return;queueMicrotask(()=>{e[X6]="done",e[oae]=u,AC("error",e),e[X6]!=="loading"&&AC("loadend",e)});break}})()}s(hbt,"readOperation");function AC(e,t){let r=new ubt(e,{bubbles:!1,cancelable:!1});t.dispatchEvent(r)}s(AC,"fireAProgressEvent");function pbt(e,t,r,n){switch(t){case"DataURL":{let i="data:",o=Ike(r||"application/octet-stream");o!=="failure"&&(i+=fbt(o)),i+=";base64,";let a=new Tke("latin1");for(let l of e)i+=wke(a.write(l));return i+=wke(a.end()),i}case"Text":{let i="failure";if(n&&(i=Eke(n)),i==="failure"&&r){let o=Ike(r);o!=="failure"&&(i=Eke(o.parameters.get("charset")))}return i==="failure"&&(i="UTF-8"),gbt(e,i)}case"ArrayBuffer":return _ke(e).buffer;case"BinaryString":{let i="",o=new Tke("latin1");for(let a of e)i+=o.write(a);return i+=o.end(),i}}}s(pbt,"packageData");function gbt(e,t){let r=_ke(e),n=Abt(r),i=0;n!==null&&(t=n,i=n==="UTF-8"?3:2);let o=r.slice(i);return new TextDecoder(t).decode(o)}s(gbt,"decode");function Abt(e){let[t,r,n]=e;return t===239&&r===187&&n===191?"UTF-8":t===254&&r===255?"UTF-16BE":t===255&&r===254?"UTF-16LE":null}s(Abt,"BOMSniffing");function _ke(e){let t=e.reduce((n,i)=>n+i.byteLength,0),r=0;return e.reduce((n,i)=>(n.set(i,r),r+=i.byteLength,n),new Uint8Array(t))}s(_ke,"combineByteSequences");Ske.exports={staticPropertyDescriptors:mbt,readOperation:hbt,fireAProgressEvent:AC}});var Pke=H((yVr,Dke)=>{"use strict";d();var{staticPropertyDescriptors:Z6,readOperation:rW,fireAProgressEvent:kke}=Rke(),{kState:mb,kError:Bke,kResult:nW,kEvents:Ao,kAborted:ybt}=nae(),{webidl:Qo}=dc(),{kEnumerableProperty:Cu}=yi(),Nh=class e extends EventTarget{static{s(this,"FileReader")}constructor(){super(),this[mb]="empty",this[nW]=null,this[Bke]=null,this[Ao]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(t){Qo.brandCheck(this,e),Qo.argumentLengthCheck(arguments,1,"FileReader.readAsArrayBuffer"),t=Qo.converters.Blob(t,{strict:!1}),rW(this,t,"ArrayBuffer")}readAsBinaryString(t){Qo.brandCheck(this,e),Qo.argumentLengthCheck(arguments,1,"FileReader.readAsBinaryString"),t=Qo.converters.Blob(t,{strict:!1}),rW(this,t,"BinaryString")}readAsText(t,r=void 0){Qo.brandCheck(this,e),Qo.argumentLengthCheck(arguments,1,"FileReader.readAsText"),t=Qo.converters.Blob(t,{strict:!1}),r!==void 0&&(r=Qo.converters.DOMString(r,"FileReader.readAsText","encoding")),rW(this,t,"Text",r)}readAsDataURL(t){Qo.brandCheck(this,e),Qo.argumentLengthCheck(arguments,1,"FileReader.readAsDataURL"),t=Qo.converters.Blob(t,{strict:!1}),rW(this,t,"DataURL")}abort(){if(this[mb]==="empty"||this[mb]==="done"){this[nW]=null;return}this[mb]==="loading"&&(this[mb]="done",this[nW]=null),this[ybt]=!0,kke("abort",this),this[mb]!=="loading"&&kke("loadend",this)}get readyState(){switch(Qo.brandCheck(this,e),this[mb]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return Qo.brandCheck(this,e),this[nW]}get error(){return Qo.brandCheck(this,e),this[Bke]}get onloadend(){return Qo.brandCheck(this,e),this[Ao].loadend}set onloadend(t){Qo.brandCheck(this,e),this[Ao].loadend&&this.removeEventListener("loadend",this[Ao].loadend),typeof t=="function"?(this[Ao].loadend=t,this.addEventListener("loadend",t)):this[Ao].loadend=null}get onerror(){return Qo.brandCheck(this,e),this[Ao].error}set onerror(t){Qo.brandCheck(this,e),this[Ao].error&&this.removeEventListener("error",this[Ao].error),typeof t=="function"?(this[Ao].error=t,this.addEventListener("error",t)):this[Ao].error=null}get onloadstart(){return Qo.brandCheck(this,e),this[Ao].loadstart}set onloadstart(t){Qo.brandCheck(this,e),this[Ao].loadstart&&this.removeEventListener("loadstart",this[Ao].loadstart),typeof t=="function"?(this[Ao].loadstart=t,this.addEventListener("loadstart",t)):this[Ao].loadstart=null}get onprogress(){return Qo.brandCheck(this,e),this[Ao].progress}set onprogress(t){Qo.brandCheck(this,e),this[Ao].progress&&this.removeEventListener("progress",this[Ao].progress),typeof t=="function"?(this[Ao].progress=t,this.addEventListener("progress",t)):this[Ao].progress=null}get onload(){return Qo.brandCheck(this,e),this[Ao].load}set onload(t){Qo.brandCheck(this,e),this[Ao].load&&this.removeEventListener("load",this[Ao].load),typeof t=="function"?(this[Ao].load=t,this.addEventListener("load",t)):this[Ao].load=null}get onabort(){return Qo.brandCheck(this,e),this[Ao].abort}set onabort(t){Qo.brandCheck(this,e),this[Ao].abort&&this.removeEventListener("abort",this[Ao].abort),typeof t=="function"?(this[Ao].abort=t,this.addEventListener("abort",t)):this[Ao].abort=null}};Nh.EMPTY=Nh.prototype.EMPTY=0;Nh.LOADING=Nh.prototype.LOADING=1;Nh.DONE=Nh.prototype.DONE=2;Object.defineProperties(Nh.prototype,{EMPTY:Z6,LOADING:Z6,DONE:Z6,readAsArrayBuffer:Cu,readAsBinaryString:Cu,readAsText:Cu,readAsDataURL:Cu,abort:Cu,readyState:Cu,result:Cu,error:Cu,onloadstart:Cu,onprogress:Cu,onload:Cu,onabort:Cu,onerror:Cu,onloadend:Cu,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Nh,{EMPTY:Z6,LOADING:Z6,DONE:Z6});Dke.exports={FileReader:Nh}});var iW=H((vVr,Nke)=>{"use strict";d();Nke.exports={kConstruct:Os().kConstruct}});var Mke=H((EVr,Fke)=>{"use strict";d();var Cbt=require("node:assert"),{URLSerializer:Lke}=gu(),{isValidHeaderName:xbt}=Tf();function vbt(e,t,r=!1){let n=Lke(e,r),i=Lke(t,r);return n===i}s(vbt,"urlEquals");function bbt(e){Cbt(e!==null);let t=[];for(let r of e.split(","))r=r.trim(),xbt(r)&&t.push(r);return t}s(bbt,"getFieldValues");Fke.exports={urlEquals:vbt,getFieldValues:bbt}});var Uke=H((wVr,Oke)=>{"use strict";d();var{kConstruct:Ebt}=iW(),{urlEquals:Ibt,getFieldValues:aae}=Mke(),{kEnumerableProperty:hb,isDisturbed:Tbt}=yi(),{webidl:on}=dc(),{Response:wbt,cloneResponse:_bt,fromInnerResponse:Sbt}=NR(),{Request:WA,fromInnerRequest:Rbt}=J6(),{kState:Lh}=iC(),{fetching:kbt}=FR(),{urlIsHttpHttpsScheme:oW,createDeferredPromise:e9,readAllBytes:Bbt}=Tf(),lae=require("node:assert"),sW=class e{static{s(this,"Cache")}#e;constructor(){arguments[0]!==Ebt&&on.illegalConstructor(),on.util.markAsUncloneable(this),this.#e=arguments[1]}async match(t,r={}){on.brandCheck(this,e);let n="Cache.match";on.argumentLengthCheck(arguments,1,n),t=on.converters.RequestInfo(t,n,"request"),r=on.converters.CacheQueryOptions(r,n,"options");let i=this.#r(t,r,1);if(i.length!==0)return i[0]}async matchAll(t=void 0,r={}){on.brandCheck(this,e);let n="Cache.matchAll";return t!==void 0&&(t=on.converters.RequestInfo(t,n,"request")),r=on.converters.CacheQueryOptions(r,n,"options"),this.#r(t,r)}async add(t){on.brandCheck(this,e);let r="Cache.add";on.argumentLengthCheck(arguments,1,r),t=on.converters.RequestInfo(t,r,"request");let n=[t];return await this.addAll(n)}async addAll(t){on.brandCheck(this,e);let r="Cache.addAll";on.argumentLengthCheck(arguments,1,r);let n=[],i=[];for(let h of t){if(h===void 0)throw on.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(h=on.converters.RequestInfo(h),typeof h=="string")continue;let p=h[Lh];if(!oW(p.url)||p.method!=="GET")throw on.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let o=[];for(let h of t){let p=new WA(h)[Lh];if(!oW(p.url))throw on.errors.exception({header:r,message:"Expected http/s scheme."});p.initiator="fetch",p.destination="subresource",i.push(p);let g=e9();o.push(kbt({request:p,processResponse(y){if(y.type==="error"||y.status===206||y.status<200||y.status>299)g.reject(on.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(y.headersList.contains("vary")){let x=aae(y.headersList.get("vary"));for(let b of x)if(b==="*"){g.reject(on.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let E of o)E.abort();return}}},processResponseEndOfBody(y){if(y.aborted){g.reject(new DOMException("aborted","AbortError"));return}g.resolve(y)}})),n.push(g.promise)}let l=await Promise.all(n),c=[],u=0;for(let h of l){let p={type:"put",request:i[u],response:h};c.push(p),u++}let f=e9(),m=null;try{this.#t(c)}catch(h){m=h}return queueMicrotask(()=>{m===null?f.resolve(void 0):f.reject(m)}),f.promise}async put(t,r){on.brandCheck(this,e);let n="Cache.put";on.argumentLengthCheck(arguments,2,n),t=on.converters.RequestInfo(t,n,"request"),r=on.converters.Response(r,n,"response");let i=null;if(t instanceof WA?i=t[Lh]:i=new WA(t)[Lh],!oW(i.url)||i.method!=="GET")throw on.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let o=r[Lh];if(o.status===206)throw on.errors.exception({header:n,message:"Got 206 status"});if(o.headersList.contains("vary")){let p=aae(o.headersList.get("vary"));for(let g of p)if(g==="*")throw on.errors.exception({header:n,message:"Got * vary field value"})}if(o.body&&(Tbt(o.body.stream)||o.body.stream.locked))throw on.errors.exception({header:n,message:"Response body is locked or disturbed"});let a=_bt(o),l=e9();if(o.body!=null){let g=o.body.stream.getReader();Bbt(g).then(l.resolve,l.reject)}else l.resolve(void 0);let c=[],u={type:"put",request:i,response:a};c.push(u);let f=await l.promise;a.body!=null&&(a.body.source=f);let m=e9(),h=null;try{this.#t(c)}catch(p){h=p}return queueMicrotask(()=>{h===null?m.resolve():m.reject(h)}),m.promise}async delete(t,r={}){on.brandCheck(this,e);let n="Cache.delete";on.argumentLengthCheck(arguments,1,n),t=on.converters.RequestInfo(t,n,"request"),r=on.converters.CacheQueryOptions(r,n,"options");let i=null;if(t instanceof WA){if(i=t[Lh],i.method!=="GET"&&!r.ignoreMethod)return!1}else lae(typeof t=="string"),i=new WA(t)[Lh];let o=[],a={type:"delete",request:i,options:r};o.push(a);let l=e9(),c=null,u;try{u=this.#t(o)}catch(f){c=f}return queueMicrotask(()=>{c===null?l.resolve(!!u?.length):l.reject(c)}),l.promise}async keys(t=void 0,r={}){on.brandCheck(this,e);let n="Cache.keys";t!==void 0&&(t=on.converters.RequestInfo(t,n,"request")),r=on.converters.CacheQueryOptions(r,n,"options");let i=null;if(t!==void 0)if(t instanceof WA){if(i=t[Lh],i.method!=="GET"&&!r.ignoreMethod)return[]}else typeof t=="string"&&(i=new WA(t)[Lh]);let o=e9(),a=[];if(t===void 0)for(let l of this.#e)a.push(l[0]);else{let l=this.#i(i,r);for(let c of l)a.push(c[0])}return queueMicrotask(()=>{let l=[];for(let c of a){let u=Rbt(c,new AbortController().signal,"immutable");l.push(u)}o.resolve(Object.freeze(l))}),o.promise}#t(t){let r=this.#e,n=[...r],i=[],o=[];try{for(let a of t){if(a.type!=="delete"&&a.type!=="put")throw on.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(a.type==="delete"&&a.response!=null)throw on.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#i(a.request,a.options,i).length)throw new DOMException("???","InvalidStateError");let l;if(a.type==="delete"){if(l=this.#i(a.request,a.options),l.length===0)return[];for(let c of l){let u=r.indexOf(c);lae(u!==-1),r.splice(u,1)}}else if(a.type==="put"){if(a.response==null)throw on.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let c=a.request;if(!oW(c.url))throw on.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(c.method!=="GET")throw on.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(a.options!=null)throw on.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});l=this.#i(a.request);for(let u of l){let f=r.indexOf(u);lae(f!==-1),r.splice(f,1)}r.push([a.request,a.response]),i.push([a.request,a.response])}o.push([a.request,a.response])}return o}catch(a){throw this.#e.length=0,this.#e=n,a}}#i(t,r,n){let i=[],o=n??this.#e;for(let a of o){let[l,c]=a;this.#n(t,l,c,r)&&i.push(a)}return i}#n(t,r,n=null,i){let o=new URL(t.url),a=new URL(r.url);if(i?.ignoreSearch&&(a.search="",o.search=""),!Ibt(o,a,!0))return!1;if(n==null||i?.ignoreVary||!n.headersList.contains("vary"))return!0;let l=aae(n.headersList.get("vary"));for(let c of l){if(c==="*")return!1;let u=r.headersList.get(c),f=t.headersList.get(c);if(u!==f)return!1}return!0}#r(t,r,n=1/0){let i=null;if(t!==void 0)if(t instanceof WA){if(i=t[Lh],i.method!=="GET"&&!r.ignoreMethod)return[]}else typeof t=="string"&&(i=new WA(t)[Lh]);let o=[];if(t===void 0)for(let l of this.#e)o.push(l[1]);else{let l=this.#i(i,r);for(let c of l)o.push(c[1])}let a=[];for(let l of o){let c=Sbt(l,"immutable");if(a.push(c.clone()),a.length>=n)break}return Object.freeze(a)}};Object.defineProperties(sW.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:hb,matchAll:hb,add:hb,addAll:hb,put:hb,delete:hb,keys:hb});var Qke=[{key:"ignoreSearch",converter:on.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:on.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"ignoreVary",converter:on.converters.boolean,defaultValue:s(()=>!1,"defaultValue")}];on.converters.CacheQueryOptions=on.dictionaryConverter(Qke);on.converters.MultiCacheQueryOptions=on.dictionaryConverter([...Qke,{key:"cacheName",converter:on.converters.DOMString}]);on.converters.Response=on.interfaceConverter(wbt);on.converters["sequence<RequestInfo>"]=on.sequenceConverter(on.converters.RequestInfo);Oke.exports={Cache:sW}});var Wke=H((RVr,qke)=>{"use strict";d();var{kConstruct:QR}=iW(),{Cache:aW}=Uke(),{webidl:$c}=dc(),{kEnumerableProperty:OR}=yi(),lW=class e{static{s(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==QR&&$c.illegalConstructor(),$c.util.markAsUncloneable(this)}async match(t,r={}){if($c.brandCheck(this,e),$c.argumentLengthCheck(arguments,1,"CacheStorage.match"),t=$c.converters.RequestInfo(t),r=$c.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new aW(QR,n).match(t,r)}}else for(let n of this.#e.values()){let o=await new aW(QR,n).match(t,r);if(o!==void 0)return o}}async has(t){$c.brandCheck(this,e);let r="CacheStorage.has";return $c.argumentLengthCheck(arguments,1,r),t=$c.converters.DOMString(t,r,"cacheName"),this.#e.has(t)}async open(t){$c.brandCheck(this,e);let r="CacheStorage.open";if($c.argumentLengthCheck(arguments,1,r),t=$c.converters.DOMString(t,r,"cacheName"),this.#e.has(t)){let i=this.#e.get(t);return new aW(QR,i)}let n=[];return this.#e.set(t,n),new aW(QR,n)}async delete(t){$c.brandCheck(this,e);let r="CacheStorage.delete";return $c.argumentLengthCheck(arguments,1,r),t=$c.converters.DOMString(t,r,"cacheName"),this.#e.delete(t)}async keys(){return $c.brandCheck(this,e),[...this.#e.keys()]}};Object.defineProperties(lW.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:OR,has:OR,open:OR,delete:OR,keys:OR});qke.exports={CacheStorage:lW}});var Hke=H((DVr,Gke)=>{"use strict";d();Gke.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var cae=H((NVr,Yke)=>{"use strict";d();function Dbt(e){for(let t=0;t<e.length;++t){let r=e.charCodeAt(t);if(r>=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}s(Dbt,"isCTLExcludingHtab");function jke(e){for(let t=0;t<e.length;++t){let r=e.charCodeAt(t);if(r<33||r>126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}s(jke,"validateCookieName");function Vke(e){let t=e.length,r=0;if(e[0]==='"'){if(t===1||e[t-1]!=='"')throw new Error("Invalid cookie value");--t,++r}for(;r<t;){let n=e.charCodeAt(r++);if(n<33||n>126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}s(Vke,"validateCookieValue");function $ke(e){for(let t=0;t<e.length;++t){let r=e.charCodeAt(t);if(r<32||r===127||r===59)throw new Error("Invalid cookie path")}}s($ke,"validateCookiePath");function Pbt(e){if(e.startsWith("-")||e.endsWith(".")||e.endsWith("-"))throw new Error("Invalid cookie domain")}s(Pbt,"validateCookieDomain");var Nbt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Lbt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],cW=Array(61).fill(0).map((e,t)=>t.toString().padStart(2,"0"));function zke(e){return typeof e=="number"&&(e=new Date(e)),`${Nbt[e.getUTCDay()]}, ${cW[e.getUTCDate()]} ${Lbt[e.getUTCMonth()]} ${e.getUTCFullYear()} ${cW[e.getUTCHours()]}:${cW[e.getUTCMinutes()]}:${cW[e.getUTCSeconds()]} GMT`}s(zke,"toIMFDate");function Fbt(e){if(e<0)throw new Error("Invalid cookie max-age")}s(Fbt,"validateCookieMaxAge");function Mbt(e){if(e.name.length===0)return null;jke(e.name),Vke(e.value);let t=[`${e.name}=${e.value}`];e.name.startsWith("__Secure-")&&(e.secure=!0),e.name.startsWith("__Host-")&&(e.secure=!0,e.domain=null,e.path="/"),e.secure&&t.push("Secure"),e.httpOnly&&t.push("HttpOnly"),typeof e.maxAge=="number"&&(Fbt(e.maxAge),t.push(`Max-Age=${e.maxAge}`)),e.domain&&(Pbt(e.domain),t.push(`Domain=${e.domain}`)),e.path&&($ke(e.path),t.push(`Path=${e.path}`)),e.expires&&e.expires.toString()!=="Invalid Date"&&t.push(`Expires=${zke(e.expires)}`),e.sameSite&&t.push(`SameSite=${e.sameSite}`);for(let r of e.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...i]=r.split("=");t.push(`${n.trim()}=${i.join("=")}`)}return t.join("; ")}s(Mbt,"stringify");Yke.exports={isCTLExcludingHtab:Dbt,validateCookieName:jke,validateCookiePath:$ke,validateCookieValue:Vke,toIMFDate:zke,stringify:Mbt}});var Jke=H((MVr,Kke)=>{"use strict";d();var{maxNameValuePairSize:Qbt,maxAttributeValueSize:Obt}=Hke(),{isCTLExcludingHtab:Ubt}=cae(),{collectASequenceOfCodePointsFast:uW}=gu(),qbt=require("node:assert");function Wbt(e){if(Ubt(e))return null;let t="",r="",n="",i="";if(e.includes(";")){let o={position:0};t=uW(";",e,o),r=e.slice(o.position)}else t=e;if(!t.includes("="))i=t;else{let o={position:0};n=uW("=",t,o),i=t.slice(o.position+1)}return n=n.trim(),i=i.trim(),n.length+i.length>Qbt?null:{name:n,value:i,...t9(r)}}s(Wbt,"parseSetCookie");function t9(e,t={}){if(e.length===0)return t;qbt(e[0]===";"),e=e.slice(1);let r="";e.includes(";")?(r=uW(";",e,{position:0}),e=e.slice(r.length)):(r=e,e="");let n="",i="";if(r.includes("=")){let a={position:0};n=uW("=",r,a),i=r.slice(a.position+1)}else n=r;if(n=n.trim(),i=i.trim(),i.length>Obt)return t9(e,t);let o=n.toLowerCase();if(o==="expires"){let a=new Date(i);t.expires=a}else if(o==="max-age"){let a=i.charCodeAt(0);if((a<48||a>57)&&i[0]!=="-"||!/^\d+$/.test(i))return t9(e,t);let l=Number(i);t.maxAge=l}else if(o==="domain"){let a=i;a[0]==="."&&(a=a.slice(1)),a=a.toLowerCase(),t.domain=a}else if(o==="path"){let a="";i.length===0||i[0]!=="/"?a="/":a=i,t.path=a}else if(o==="secure")t.secure=!0;else if(o==="httponly")t.httpOnly=!0;else if(o==="samesite"){let a="Default",l=i.toLowerCase();l.includes("none")&&(a="None"),l.includes("strict")&&(a="Strict"),l.includes("lax")&&(a="Lax"),t.sameSite=a}else t.unparsed??=[],t.unparsed.push(`${n}=${i}`);return t9(e,t)}s(t9,"parseUnparsedAttributes");Kke.exports={parseSetCookie:Wbt,parseUnparsedAttributes:t9}});var eBe=H((UVr,Zke)=>{"use strict";d();var{parseSetCookie:Gbt}=Jke(),{stringify:Hbt}=cae(),{webidl:Mi}=dc(),{Headers:fW}=cb();function jbt(e){Mi.argumentLengthCheck(arguments,1,"getCookies"),Mi.brandCheck(e,fW,{strict:!1});let t=e.get("cookie"),r={};if(!t)return r;for(let n of t.split(";")){let[i,...o]=n.split("=");r[i.trim()]=o.join("=")}return r}s(jbt,"getCookies");function Vbt(e,t,r){Mi.brandCheck(e,fW,{strict:!1});let n="deleteCookie";Mi.argumentLengthCheck(arguments,2,n),t=Mi.converters.DOMString(t,n,"name"),r=Mi.converters.DeleteCookieAttributes(r),Xke(e,{name:t,value:"",expires:new Date(0),...r})}s(Vbt,"deleteCookie");function $bt(e){Mi.argumentLengthCheck(arguments,1,"getSetCookies"),Mi.brandCheck(e,fW,{strict:!1});let t=e.getSetCookie();return t?t.map(r=>Gbt(r)):[]}s($bt,"getSetCookies");function Xke(e,t){Mi.argumentLengthCheck(arguments,2,"setCookie"),Mi.brandCheck(e,fW,{strict:!1}),t=Mi.converters.Cookie(t);let r=Hbt(t);r&&e.append("Set-Cookie",r)}s(Xke,"setCookie");Mi.converters.DeleteCookieAttributes=Mi.dictionaryConverter([{converter:Mi.nullableConverter(Mi.converters.DOMString),key:"path",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.nullableConverter(Mi.converters.DOMString),key:"domain",defaultValue:s(()=>null,"defaultValue")}]);Mi.converters.Cookie=Mi.dictionaryConverter([{converter:Mi.converters.DOMString,key:"name"},{converter:Mi.converters.DOMString,key:"value"},{converter:Mi.nullableConverter(e=>typeof e=="number"?Mi.converters["unsigned long long"](e):new Date(e)),key:"expires",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.nullableConverter(Mi.converters["long long"]),key:"maxAge",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.nullableConverter(Mi.converters.DOMString),key:"domain",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.nullableConverter(Mi.converters.DOMString),key:"path",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.nullableConverter(Mi.converters.boolean),key:"secure",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.nullableConverter(Mi.converters.boolean),key:"httpOnly",defaultValue:s(()=>null,"defaultValue")},{converter:Mi.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:Mi.sequenceConverter(Mi.converters.DOMString),key:"unparsed",defaultValue:s(()=>new Array(0),"defaultValue")}]);Zke.exports={getCookies:jbt,deleteCookie:Vbt,getSetCookies:$bt,setCookie:Xke}});var n9=H((GVr,rBe)=>{"use strict";d();var{webidl:tn}=dc(),{kEnumerableProperty:xu}=yi(),{kConstruct:tBe}=Os(),{MessagePort:zbt}=require("node:worker_threads"),r9=class e extends Event{static{s(this,"MessageEvent")}#e;constructor(t,r={}){if(t===tBe){super(arguments[1],arguments[2]),tn.util.markAsUncloneable(this);return}let n="MessageEvent constructor";tn.argumentLengthCheck(arguments,1,n),t=tn.converters.DOMString(t,n,"type"),r=tn.converters.MessageEventInit(r,n,"eventInitDict"),super(t,r),this.#e=r,tn.util.markAsUncloneable(this)}get data(){return tn.brandCheck(this,e),this.#e.data}get origin(){return tn.brandCheck(this,e),this.#e.origin}get lastEventId(){return tn.brandCheck(this,e),this.#e.lastEventId}get source(){return tn.brandCheck(this,e),this.#e.source}get ports(){return tn.brandCheck(this,e),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(t,r=!1,n=!1,i=null,o="",a="",l=null,c=[]){return tn.brandCheck(this,e),tn.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new e(t,{bubbles:r,cancelable:n,data:i,origin:o,lastEventId:a,source:l,ports:c})}static createFastMessageEvent(t,r){let n=new e(tBe,t,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:Ybt}=r9;delete r9.createFastMessageEvent;var dW=class e extends Event{static{s(this,"CloseEvent")}#e;constructor(t,r={}){let n="CloseEvent constructor";tn.argumentLengthCheck(arguments,1,n),t=tn.converters.DOMString(t,n,"type"),r=tn.converters.CloseEventInit(r),super(t,r),this.#e=r,tn.util.markAsUncloneable(this)}get wasClean(){return tn.brandCheck(this,e),this.#e.wasClean}get code(){return tn.brandCheck(this,e),this.#e.code}get reason(){return tn.brandCheck(this,e),this.#e.reason}},mW=class e extends Event{static{s(this,"ErrorEvent")}#e;constructor(t,r){let n="ErrorEvent constructor";tn.argumentLengthCheck(arguments,1,n),super(t,r),tn.util.markAsUncloneable(this),t=tn.converters.DOMString(t,n,"type"),r=tn.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return tn.brandCheck(this,e),this.#e.message}get filename(){return tn.brandCheck(this,e),this.#e.filename}get lineno(){return tn.brandCheck(this,e),this.#e.lineno}get colno(){return tn.brandCheck(this,e),this.#e.colno}get error(){return tn.brandCheck(this,e),this.#e.error}};Object.defineProperties(r9.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:xu,origin:xu,lastEventId:xu,source:xu,ports:xu,initMessageEvent:xu});Object.defineProperties(dW.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:xu,code:xu,wasClean:xu});Object.defineProperties(mW.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:xu,filename:xu,lineno:xu,colno:xu,error:xu});tn.converters.MessagePort=tn.interfaceConverter(zbt);tn.converters["sequence<MessagePort>"]=tn.sequenceConverter(tn.converters.MessagePort);var uae=[{key:"bubbles",converter:tn.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"cancelable",converter:tn.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"composed",converter:tn.converters.boolean,defaultValue:s(()=>!1,"defaultValue")}];tn.converters.MessageEventInit=tn.dictionaryConverter([...uae,{key:"data",converter:tn.converters.any,defaultValue:s(()=>null,"defaultValue")},{key:"origin",converter:tn.converters.USVString,defaultValue:s(()=>"","defaultValue")},{key:"lastEventId",converter:tn.converters.DOMString,defaultValue:s(()=>"","defaultValue")},{key:"source",converter:tn.nullableConverter(tn.converters.MessagePort),defaultValue:s(()=>null,"defaultValue")},{key:"ports",converter:tn.converters["sequence<MessagePort>"],defaultValue:s(()=>new Array(0),"defaultValue")}]);tn.converters.CloseEventInit=tn.dictionaryConverter([...uae,{key:"wasClean",converter:tn.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"code",converter:tn.converters["unsigned short"],defaultValue:s(()=>0,"defaultValue")},{key:"reason",converter:tn.converters.USVString,defaultValue:s(()=>"","defaultValue")}]);tn.converters.ErrorEventInit=tn.dictionaryConverter([...uae,{key:"message",converter:tn.converters.DOMString,defaultValue:s(()=>"","defaultValue")},{key:"filename",converter:tn.converters.USVString,defaultValue:s(()=>"","defaultValue")},{key:"lineno",converter:tn.converters["unsigned long"],defaultValue:s(()=>0,"defaultValue")},{key:"colno",converter:tn.converters["unsigned long"],defaultValue:s(()=>0,"defaultValue")},{key:"error",converter:tn.converters.any}]);rBe.exports={MessageEvent:r9,CloseEvent:dW,ErrorEvent:mW,createFastMessageEvent:Ybt}});var pb=H((VVr,nBe)=>{"use strict";d();var Kbt="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",Jbt={enumerable:!0,writable:!1,configurable:!1},Xbt={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},Zbt={NOT_SENT:0,PROCESSING:1,SENT:2},eEt={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},tEt=2**16-1,rEt={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},nEt=Buffer.allocUnsafe(0),iEt={string:1,typedArray:2,arrayBuffer:3,blob:4};nBe.exports={uid:Kbt,sentCloseFrameState:Zbt,staticPropertyDescriptors:Jbt,states:Xbt,opcodes:eEt,maxUnsigned16Bit:tEt,parserStates:rEt,emptyBuffer:nEt,sendHints:iEt}});var UR=H((zVr,iBe)=>{"use strict";d();iBe.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var GR=H((KVr,mBe)=>{"use strict";d();var{kReadyState:qR,kController:oEt,kResponse:sEt,kBinaryType:aEt,kWebSocketURL:lEt}=UR(),{states:WR,opcodes:yC}=pb(),{ErrorEvent:cEt,createFastMessageEvent:uEt}=n9(),{isUtf8:fEt}=require("node:buffer"),{collectASequenceOfCodePointsFast:dEt,removeHTTPWhitespace:oBe}=gu();function mEt(e){return e[qR]===WR.CONNECTING}s(mEt,"isConnecting");function hEt(e){return e[qR]===WR.OPEN}s(hEt,"isEstablished");function pEt(e){return e[qR]===WR.CLOSING}s(pEt,"isClosing");function gEt(e){return e[qR]===WR.CLOSED}s(gEt,"isClosed");function fae(e,t,r=(i,o)=>new Event(i,o),n={}){let i=r(e,n);t.dispatchEvent(i)}s(fae,"fireEvent");function AEt(e,t,r){if(e[qR]!==WR.OPEN)return;let n;if(t===yC.TEXT)try{n=dBe(r)}catch{aBe(e,"Received invalid UTF-8 in text frame.");return}else t===yC.BINARY&&(e[aEt]==="blob"?n=new Blob([r]):n=yEt(r));fae("message",e,uEt,{origin:e[lEt].origin,data:n})}s(AEt,"websocketMessageReceived");function yEt(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}s(yEt,"toArrayBuffer");function CEt(e){if(e.length===0)return!1;for(let t=0;t<e.length;++t){let r=e.charCodeAt(t);if(r<33||r>126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}s(CEt,"isValidSubprotocol");function xEt(e){return e>=1e3&&e<1015?e!==1004&&e!==1005&&e!==1006:e>=3e3&&e<=4999}s(xEt,"isValidStatusCode");function aBe(e,t){let{[oEt]:r,[sEt]:n}=e;r.abort(),n?.socket&&!n.socket.destroyed&&n.socket.destroy(),t&&fae("error",e,(i,o)=>new cEt(i,o),{error:new Error(t),message:t})}s(aBe,"failWebsocketConnection");function lBe(e){return e===yC.CLOSE||e===yC.PING||e===yC.PONG}s(lBe,"isControlFrame");function cBe(e){return e===yC.CONTINUATION}s(cBe,"isContinuationFrame");function uBe(e){return e===yC.TEXT||e===yC.BINARY}s(uBe,"isTextBinaryFrame");function vEt(e){return uBe(e)||cBe(e)||lBe(e)}s(vEt,"isValidOpcode");function bEt(e){let t={position:0},r=new Map;for(;t.position<e.length;){let n=dEt(";",e,t),[i,o=""]=n.split("=");r.set(oBe(i,!0,!1),oBe(o,!1,!0)),t.position++}return r}s(bEt,"parseExtensions");function EEt(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}s(EEt,"isValidClientWindowBits");var fBe=typeof process.versions.icu=="string",sBe=fBe?new TextDecoder("utf-8",{fatal:!0}):void 0,dBe=fBe?sBe.decode.bind(sBe):function(e){if(fEt(e))return e.toString("utf-8");throw new TypeError("Invalid utf-8 received.")};mBe.exports={isConnecting:mEt,isEstablished:hEt,isClosing:pEt,isClosed:gEt,fireEvent:fae,isValidSubprotocol:CEt,isValidStatusCode:xEt,failWebsocketConnection:aBe,websocketMessageReceived:AEt,utf8Decode:dBe,isControlFrame:lBe,isContinuationFrame:cBe,isTextBinaryFrame:uBe,isValidOpcode:vEt,parseExtensions:bEt,isValidClientWindowBits:EEt}});var pW=H((ZVr,hBe)=>{"use strict";d();var{maxUnsigned16Bit:IEt}=pb(),hW=16386,dae,HR=null,i9=hW;try{dae=require("node:crypto")}catch{dae={randomFillSync:s(function(t,r,n){for(let i=0;i<t.length;++i)t[i]=Math.random()*255|0;return t},"randomFillSync")}}function TEt(){return i9===hW&&(i9=0,dae.randomFillSync(HR??=Buffer.allocUnsafe(hW),0,hW)),[HR[i9++],HR[i9++],HR[i9++],HR[i9++]]}s(TEt,"generateMask");var mae=class{static{s(this,"WebsocketFrameSend")}constructor(t){this.frameData=t}createFrame(t){let r=this.frameData,n=TEt(),i=r?.byteLength??0,o=i,a=6;i>IEt?(a+=8,o=127):i>125&&(a+=2,o=126);let l=Buffer.allocUnsafe(i+a);l[0]=l[1]=0,l[0]|=128,l[0]=(l[0]&240)+t;l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],l[1]=o,o===126?l.writeUInt16BE(i,2):o===127&&(l[2]=l[3]=0,l.writeUIntBE(i,4,6)),l[1]|=128;for(let c=0;c<i;++c)l[a+c]=r[c]^n[c&3];return l}};hBe.exports={WebsocketFrameSend:mae}});var pae=H((r$r,vBe)=>{"use strict";d();var{uid:wEt,states:jR,sentCloseFrameState:gW,emptyBuffer:_Et,opcodes:SEt}=pb(),{kReadyState:VR,kSentClose:AW,kByteParser:gBe,kReceivedClose:pBe,kResponse:ABe}=UR(),{fireEvent:REt,failWebsocketConnection:CC,isClosing:kEt,isClosed:BEt,isEstablished:DEt,parseExtensions:PEt}=GR(),{channels:o9}=y6(),{CloseEvent:NEt}=n9(),{makeRequest:LEt}=J6(),{fetching:FEt}=FR(),{Headers:MEt,getHeadersList:QEt}=cb(),{getDecodeSplit:OEt}=Tf(),{WebsocketFrameSend:UEt}=pW(),hae;try{hae=require("node:crypto")}catch{}function qEt(e,t,r,n,i,o){let a=e;a.protocol=e.protocol==="ws:"?"http:":"https:";let l=LEt({urlList:[a],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(o.headers){let m=QEt(new MEt(o.headers));l.headersList=m}let c=hae.randomBytes(16).toString("base64");l.headersList.append("sec-websocket-key",c),l.headersList.append("sec-websocket-version","13");for(let m of t)l.headersList.append("sec-websocket-protocol",m);return l.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits"),FEt({request:l,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(m){if(m.type==="error"||m.status!==101){CC(n,"Received network error or non-101 status code.");return}if(t.length!==0&&!m.headersList.get("Sec-WebSocket-Protocol")){CC(n,"Server did not respond with sent protocols.");return}if(m.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){CC(n,'Server did not set Upgrade header to "websocket".');return}if(m.headersList.get("Connection")?.toLowerCase()!=="upgrade"){CC(n,'Server did not set Connection header to "upgrade".');return}let h=m.headersList.get("Sec-WebSocket-Accept"),p=hae.createHash("sha1").update(c+wEt).digest("base64");if(h!==p){CC(n,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let g=m.headersList.get("Sec-WebSocket-Extensions"),y;if(g!==null&&(y=PEt(g),!y.has("permessage-deflate"))){CC(n,"Sec-WebSocket-Extensions header does not match.");return}let x=m.headersList.get("Sec-WebSocket-Protocol");if(x!==null&&!OEt("sec-websocket-protocol",l.headersList).includes(x)){CC(n,"Protocol was not set in the opening handshake.");return}m.socket.on("data",yBe),m.socket.on("close",CBe),m.socket.on("error",xBe),o9.open.hasSubscribers&&o9.open.publish({address:m.socket.address(),protocol:x,extensions:g}),i(m,y)}})}s(qEt,"establishWebSocketConnection");function WEt(e,t,r,n){if(!(kEt(e)||BEt(e)))if(!DEt(e))CC(e,"Connection was closed before it was established."),e[VR]=jR.CLOSING;else if(e[AW]===gW.NOT_SENT){e[AW]=gW.PROCESSING;let i=new UEt;t!==void 0&&r===void 0?(i.frameData=Buffer.allocUnsafe(2),i.frameData.writeUInt16BE(t,0)):t!==void 0&&r!==void 0?(i.frameData=Buffer.allocUnsafe(2+n),i.frameData.writeUInt16BE(t,0),i.frameData.write(r,2,"utf-8")):i.frameData=_Et,e[ABe].socket.write(i.createFrame(SEt.CLOSE)),e[AW]=gW.SENT,e[VR]=jR.CLOSING}else e[VR]=jR.CLOSING}s(WEt,"closeWebSocketConnection");function yBe(e){this.ws[gBe].write(e)||this.pause()}s(yBe,"onSocketData");function CBe(){let{ws:e}=this,{[ABe]:t}=e;t.socket.off("data",yBe),t.socket.off("close",CBe),t.socket.off("error",xBe);let r=e[AW]===gW.SENT&&e[pBe],n=1005,i="",o=e[gBe].closingInfo;o&&!o.error?(n=o.code??1005,i=o.reason):e[pBe]||(n=1006),e[VR]=jR.CLOSED,REt("close",e,(a,l)=>new NEt(a,l),{wasClean:r,code:n,reason:i}),o9.close.hasSubscribers&&o9.close.publish({websocket:e,code:n,reason:i})}s(CBe,"onSocketClose");function xBe(e){let{ws:t}=this;t[VR]=jR.CLOSING,o9.socketError.hasSubscribers&&o9.socketError.publish(e),this.destroy()}s(xBe,"onSocketError");vBe.exports={establishWebSocketConnection:qEt,closeWebSocketConnection:WEt}});var EBe=H((o$r,bBe)=>{"use strict";d();var{createInflateRaw:GEt,Z_DEFAULT_WINDOWBITS:HEt}=require("node:zlib"),{isValidClientWindowBits:jEt}=GR(),VEt=Buffer.from([0,0,255,255]),yW=Symbol("kBuffer"),CW=Symbol("kLength"),gae=class{static{s(this,"PerMessageDeflate")}#e;#t={};constructor(t){this.#t.serverNoContextTakeover=t.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=t.get("server_max_window_bits")}decompress(t,r,n){if(!this.#e){let i=HEt;if(this.#t.serverMaxWindowBits){if(!jEt(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}i=Number.parseInt(this.#t.serverMaxWindowBits)}this.#e=GEt({windowBits:i}),this.#e[yW]=[],this.#e[CW]=0,this.#e.on("data",o=>{this.#e[yW].push(o),this.#e[CW]+=o.length}),this.#e.on("error",o=>{this.#e=null,n(o)})}this.#e.write(t),r&&this.#e.write(VEt),this.#e.flush(()=>{let i=Buffer.concat(this.#e[yW],this.#e[CW]);this.#e[yW].length=0,this.#e[CW]=0,n(null,i)})}};bBe.exports={PerMessageDeflate:gae}});var NBe=H((l$r,PBe)=>{"use strict";d();var{Writable:$Et}=require("node:stream"),zEt=require("node:assert"),{parserStates:vu,opcodes:s9,states:YEt,emptyBuffer:IBe,sentCloseFrameState:TBe}=pb(),{kReadyState:KEt,kSentClose:wBe,kResponse:_Be,kReceivedClose:SBe}=UR(),{channels:xW}=y6(),{isValidStatusCode:JEt,isValidOpcode:XEt,failWebsocketConnection:tm,websocketMessageReceived:RBe,utf8Decode:ZEt,isControlFrame:kBe,isTextBinaryFrame:Aae,isContinuationFrame:e4t}=GR(),{WebsocketFrameSend:BBe}=pW(),{closeWebSocketConnection:DBe}=pae(),{PerMessageDeflate:t4t}=EBe(),yae=class extends $Et{static{s(this,"ByteParser")}#e=[];#t=0;#i=!1;#n=vu.INFO;#r={};#o=[];#s;constructor(t,r){super(),this.ws=t,this.#s=r??new Map,this.#s.has("permessage-deflate")&&this.#s.set("permessage-deflate",new t4t(r))}_write(t,r,n){this.#e.push(t),this.#t+=t.length,this.#i=!0,this.run(n)}run(t){for(;this.#i;)if(this.#n===vu.INFO){if(this.#t<2)return t();let r=this.consume(2),n=(r[0]&128)!==0,i=r[0]&15,o=(r[1]&128)===128,a=!n&&i!==s9.CONTINUATION,l=r[1]&127,c=r[0]&64,u=r[0]&32,f=r[0]&16;if(!XEt(i))return tm(this.ws,"Invalid opcode received"),t();if(o)return tm(this.ws,"Frame cannot be masked"),t();if(c!==0&&!this.#s.has("permessage-deflate")){tm(this.ws,"Expected RSV1 to be clear.");return}if(u!==0||f!==0){tm(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(a&&!Aae(i)){tm(this.ws,"Invalid frame type was fragmented.");return}if(Aae(i)&&this.#o.length>0){tm(this.ws,"Expected continuation frame");return}if(this.#r.fragmented&&a){tm(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((l>125||a)&&kBe(i)){tm(this.ws,"Control frame either too large or fragmented");return}if(e4t(i)&&this.#o.length===0&&!this.#r.compressed){tm(this.ws,"Unexpected continuation frame");return}l<=125?(this.#r.payloadLength=l,this.#n=vu.READ_DATA):l===126?this.#n=vu.PAYLOADLENGTH_16:l===127&&(this.#n=vu.PAYLOADLENGTH_64),Aae(i)&&(this.#r.binaryType=i,this.#r.compressed=c!==0),this.#r.opcode=i,this.#r.masked=o,this.#r.fin=n,this.#r.fragmented=a}else if(this.#n===vu.PAYLOADLENGTH_16){if(this.#t<2)return t();let r=this.consume(2);this.#r.payloadLength=r.readUInt16BE(0),this.#n=vu.READ_DATA}else if(this.#n===vu.PAYLOADLENGTH_64){if(this.#t<8)return t();let r=this.consume(8),n=r.readUInt32BE(0);if(n>2**31-1){tm(this.ws,"Received payload length > 2^31 bytes.");return}let i=r.readUInt32BE(4);this.#r.payloadLength=(n<<8)+i,this.#n=vu.READ_DATA}else if(this.#n===vu.READ_DATA){if(this.#t<this.#r.payloadLength)return t();let r=this.consume(this.#r.payloadLength);if(kBe(this.#r.opcode))this.#i=this.parseControlFrame(r),this.#n=vu.INFO;else if(this.#r.compressed){this.#s.get("permessage-deflate").decompress(r,this.#r.fin,(n,i)=>{if(n){DBe(this.ws,1007,n.message,n.message.length);return}if(this.#o.push(i),!this.#r.fin){this.#n=vu.INFO,this.#i=!0,this.run(t);return}RBe(this.ws,this.#r.binaryType,Buffer.concat(this.#o)),this.#i=!0,this.#n=vu.INFO,this.#o.length=0,this.run(t)}),this.#i=!1;break}else{if(this.#o.push(r),!this.#r.fragmented&&this.#r.fin){let n=Buffer.concat(this.#o);RBe(this.ws,this.#r.binaryType,n),this.#o.length=0}this.#n=vu.INFO}}}consume(t){if(t>this.#t)throw new Error("Called consume() before buffers satiated.");if(t===0)return IBe;if(this.#e[0].length===t)return this.#t-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(t),n=0;for(;n!==t;){let i=this.#e[0],{length:o}=i;if(o+n===t){r.set(this.#e.shift(),n);break}else if(o+n>t){r.set(i.subarray(0,t-n),n),this.#e[0]=i.subarray(t-n);break}else r.set(this.#e.shift(),n),n+=i.length}return this.#t-=t,r}parseCloseBody(t){zEt(t.length!==1);let r;if(t.length>=2&&(r=t.readUInt16BE(0)),r!==void 0&&!JEt(r))return{code:1002,reason:"Invalid status code",error:!0};let n=t.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=ZEt(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(t){let{opcode:r,payloadLength:n}=this.#r;if(r===s9.CLOSE){if(n===1)return tm(this.ws,"Received close frame with a 1-byte body."),!1;if(this.#r.closeInfo=this.parseCloseBody(t),this.#r.closeInfo.error){let{code:i,reason:o}=this.#r.closeInfo;return DBe(this.ws,i,o,o.length),tm(this.ws,o),!1}if(this.ws[wBe]!==TBe.SENT){let i=IBe;this.#r.closeInfo.code&&(i=Buffer.allocUnsafe(2),i.writeUInt16BE(this.#r.closeInfo.code,0));let o=new BBe(i);this.ws[_Be].socket.write(o.createFrame(s9.CLOSE),a=>{a||(this.ws[wBe]=TBe.SENT)})}return this.ws[KEt]=YEt.CLOSING,this.ws[SBe]=!0,!1}else if(r===s9.PING){if(!this.ws[SBe]){let i=new BBe(t);this.ws[_Be].socket.write(i.createFrame(s9.PONG)),xW.ping.hasSubscribers&&xW.ping.publish({payload:t})}}else r===s9.PONG&&xW.pong.hasSubscribers&&xW.pong.publish({payload:t});return!0}get closingInfo(){return this.#r.closeInfo}};PBe.exports={ByteParser:yae}});var OBe=H((f$r,QBe)=>{"use strict";d();var{WebsocketFrameSend:r4t}=pW(),{opcodes:LBe,sendHints:a9}=pb(),n4t=koe(),FBe=Buffer[Symbol.species],Cae=class{static{s(this,"SendQueue")}#e=new n4t;#t=!1;#i;constructor(t){this.#i=t}add(t,r,n){if(n!==a9.blob){let o=MBe(t,n);if(!this.#t)this.#i.write(o,r);else{let a={promise:null,callback:r,frame:o};this.#e.push(a)}return}let i={promise:t.arrayBuffer().then(o=>{i.promise=null,i.frame=MBe(o,n)}),callback:r,frame:null};this.#e.push(i),this.#t||this.#n()}async#n(){this.#t=!0;let t=this.#e;for(;!t.isEmpty();){let r=t.shift();r.promise!==null&&await r.promise,this.#i.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function MBe(e,t){return new r4t(i4t(e,t)).createFrame(t===a9.string?LBe.TEXT:LBe.BINARY)}s(MBe,"createFrame");function i4t(e,t){switch(t){case a9.string:return Buffer.from(e);case a9.arrayBuffer:case a9.blob:return new FBe(e);case a9.typedArray:return new FBe(e.buffer,e.byteOffset,e.byteLength)}}s(i4t,"toBuffer");QBe.exports={SendQueue:Cae}});var zBe=H((h$r,$Be)=>{"use strict";d();var{webidl:Gn}=dc(),{URLSerializer:o4t}=gu(),{environmentSettingsObject:UBe}=Tf(),{staticPropertyDescriptors:xC,states:$R,sentCloseFrameState:s4t,sendHints:vW}=pb(),{kWebSocketURL:qBe,kReadyState:xae,kController:a4t,kBinaryType:bW,kResponse:WBe,kSentClose:l4t,kByteParser:c4t}=UR(),{isConnecting:u4t,isEstablished:f4t,isClosing:d4t,isValidSubprotocol:m4t,fireEvent:GBe}=GR(),{establishWebSocketConnection:h4t,closeWebSocketConnection:HBe}=pae(),{ByteParser:p4t}=NBe(),{kEnumerableProperty:rm,isBlobLike:jBe}=yi(),{getGlobalDispatcher:g4t}=Fq(),{types:VBe}=require("node:util"),{ErrorEvent:A4t,CloseEvent:y4t}=n9(),{SendQueue:C4t}=OBe(),Df=class e extends EventTarget{static{s(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#i="";#n="";#r;constructor(t,r=[]){super(),Gn.util.markAsUncloneable(this);let n="WebSocket constructor";Gn.argumentLengthCheck(arguments,1,n);let i=Gn.converters["DOMString or sequence<DOMString> or WebSocketInit"](r,n,"options");t=Gn.converters.USVString(t,n,"url"),r=i.protocols;let o=UBe.settingsObject.baseUrl,a;try{a=new URL(t,o)}catch(c){throw new DOMException(c,"SyntaxError")}if(a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),a.protocol!=="ws:"&&a.protocol!=="wss:")throw new DOMException(`Expected a ws: or wss: protocol, got ${a.protocol}`,"SyntaxError");if(a.hash||a.href.endsWith("#"))throw new DOMException("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(c=>c.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(c=>m4t(c)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[qBe]=new URL(a.href);let l=UBe.settingsObject;this[a4t]=h4t(a,r,l,this,(c,u)=>this.#o(c,u),i),this[xae]=e.CONNECTING,this[l4t]=s4t.NOT_SENT,this[bW]="blob"}close(t=void 0,r=void 0){Gn.brandCheck(this,e);let n="WebSocket.close";if(t!==void 0&&(t=Gn.converters["unsigned short"](t,n,"code",{clamp:!0})),r!==void 0&&(r=Gn.converters.USVString(r,n,"reason")),t!==void 0&&t!==1e3&&(t<3e3||t>4999))throw new DOMException("invalid code","InvalidAccessError");let i=0;if(r!==void 0&&(i=Buffer.byteLength(r),i>123))throw new DOMException(`Reason must be less than 123 bytes; received ${i}`,"SyntaxError");HBe(this,t,r,i)}send(t){Gn.brandCheck(this,e);let r="WebSocket.send";if(Gn.argumentLengthCheck(arguments,1,r),t=Gn.converters.WebSocketSendData(t,r,"data"),u4t(this))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!f4t(this)||d4t(this)))if(typeof t=="string"){let n=Buffer.byteLength(t);this.#t+=n,this.#r.add(t,()=>{this.#t-=n},vW.string)}else VBe.isArrayBuffer(t)?(this.#t+=t.byteLength,this.#r.add(t,()=>{this.#t-=t.byteLength},vW.arrayBuffer)):ArrayBuffer.isView(t)?(this.#t+=t.byteLength,this.#r.add(t,()=>{this.#t-=t.byteLength},vW.typedArray)):jBe(t)&&(this.#t+=t.size,this.#r.add(t,()=>{this.#t-=t.size},vW.blob))}get readyState(){return Gn.brandCheck(this,e),this[xae]}get bufferedAmount(){return Gn.brandCheck(this,e),this.#t}get url(){return Gn.brandCheck(this,e),o4t(this[qBe])}get extensions(){return Gn.brandCheck(this,e),this.#n}get protocol(){return Gn.brandCheck(this,e),this.#i}get onopen(){return Gn.brandCheck(this,e),this.#e.open}set onopen(t){Gn.brandCheck(this,e),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof t=="function"?(this.#e.open=t,this.addEventListener("open",t)):this.#e.open=null}get onerror(){return Gn.brandCheck(this,e),this.#e.error}set onerror(t){Gn.brandCheck(this,e),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof t=="function"?(this.#e.error=t,this.addEventListener("error",t)):this.#e.error=null}get onclose(){return Gn.brandCheck(this,e),this.#e.close}set onclose(t){Gn.brandCheck(this,e),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof t=="function"?(this.#e.close=t,this.addEventListener("close",t)):this.#e.close=null}get onmessage(){return Gn.brandCheck(this,e),this.#e.message}set onmessage(t){Gn.brandCheck(this,e),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof t=="function"?(this.#e.message=t,this.addEventListener("message",t)):this.#e.message=null}get binaryType(){return Gn.brandCheck(this,e),this[bW]}set binaryType(t){Gn.brandCheck(this,e),t!=="blob"&&t!=="arraybuffer"?this[bW]="blob":this[bW]=t}#o(t,r){this[WBe]=t;let n=new p4t(this,r);n.on("drain",x4t),n.on("error",v4t.bind(this)),t.socket.ws=this,this[c4t]=n,this.#r=new C4t(t.socket),this[xae]=$R.OPEN;let i=t.headersList.get("sec-websocket-extensions");i!==null&&(this.#n=i);let o=t.headersList.get("sec-websocket-protocol");o!==null&&(this.#i=o),GBe("open",this)}};Df.CONNECTING=Df.prototype.CONNECTING=$R.CONNECTING;Df.OPEN=Df.prototype.OPEN=$R.OPEN;Df.CLOSING=Df.prototype.CLOSING=$R.CLOSING;Df.CLOSED=Df.prototype.CLOSED=$R.CLOSED;Object.defineProperties(Df.prototype,{CONNECTING:xC,OPEN:xC,CLOSING:xC,CLOSED:xC,url:rm,readyState:rm,bufferedAmount:rm,onopen:rm,onerror:rm,onclose:rm,close:rm,onmessage:rm,binaryType:rm,send:rm,extensions:rm,protocol:rm,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Df,{CONNECTING:xC,OPEN:xC,CLOSING:xC,CLOSED:xC});Gn.converters["sequence<DOMString>"]=Gn.sequenceConverter(Gn.converters.DOMString);Gn.converters["DOMString or sequence<DOMString>"]=function(e,t,r){return Gn.util.Type(e)==="Object"&&Symbol.iterator in e?Gn.converters["sequence<DOMString>"](e):Gn.converters.DOMString(e,t,r)};Gn.converters.WebSocketInit=Gn.dictionaryConverter([{key:"protocols",converter:Gn.converters["DOMString or sequence<DOMString>"],defaultValue:s(()=>new Array(0),"defaultValue")},{key:"dispatcher",converter:Gn.converters.any,defaultValue:s(()=>g4t(),"defaultValue")},{key:"headers",converter:Gn.nullableConverter(Gn.converters.HeadersInit)}]);Gn.converters["DOMString or sequence<DOMString> or WebSocketInit"]=function(e){return Gn.util.Type(e)==="Object"&&!(Symbol.iterator in e)?Gn.converters.WebSocketInit(e):{protocols:Gn.converters["DOMString or sequence<DOMString>"](e)}};Gn.converters.WebSocketSendData=function(e){if(Gn.util.Type(e)==="Object"){if(jBe(e))return Gn.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||VBe.isArrayBuffer(e))return Gn.converters.BufferSource(e)}return Gn.converters.USVString(e)};function x4t(){this.ws[WBe].socket.resume()}s(x4t,"onParserDrain");function v4t(e){let t,r;e instanceof y4t?(t=e.reason,r=e.code):t=e.message,GBe("error",this,()=>new A4t("error",{error:e,message:t})),HBe(this,r)}s(v4t,"onParserError");$Be.exports={WebSocket:Df}});var vae=H((A$r,YBe)=>{"use strict";d();function b4t(e){return e.indexOf("\0")===-1}s(b4t,"isValidLastEventId");function E4t(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(e.charCodeAt(t)<48||e.charCodeAt(t)>57)return!1;return!0}s(E4t,"isASCIINumber");function I4t(e){return new Promise(t=>{setTimeout(t,e).unref()})}s(I4t,"delay");YBe.exports={isValidLastEventId:b4t,isASCIINumber:E4t,delay:I4t}});var ZBe=H((x$r,XBe)=>{"use strict";d();var{Transform:T4t}=require("node:stream"),{isASCIINumber:KBe,isValidLastEventId:JBe}=vae(),GA=[239,187,191],bae=10,EW=13,w4t=58,_4t=32,Eae=class extends T4t{static{s(this,"EventSourceStream")}state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(t={}){t.readableObjectMode=!0,super(t),this.state=t.eventSourceSettings||{},t.push&&(this.push=t.push)}_transform(t,r,n){if(t.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,t]):this.buffer=t,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===GA[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===GA[0]&&this.buffer[1]===GA[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===GA[0]&&this.buffer[1]===GA[1]&&this.buffer[2]===GA[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===GA[0]&&this.buffer[1]===GA[1]&&this.buffer[2]===GA[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos<this.buffer.length;){if(this.eventEndCheck){if(this.crlfCheck){if(this.buffer[this.pos]===bae){this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.crlfCheck=!1;continue}this.crlfCheck=!1}if(this.buffer[this.pos]===bae||this.buffer[this.pos]===EW){this.buffer[this.pos]===EW&&(this.crlfCheck=!0),this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,(this.event.data!==void 0||this.event.event||this.event.id||this.event.retry)&&this.processEvent(this.event),this.clearEvent();continue}this.eventEndCheck=!1;continue}if(this.buffer[this.pos]===bae||this.buffer[this.pos]===EW){this.buffer[this.pos]===EW&&(this.crlfCheck=!0),this.parseLine(this.buffer.subarray(0,this.pos),this.event),this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.eventEndCheck=!0;continue}this.pos++}n()}parseLine(t,r){if(t.length===0)return;let n=t.indexOf(w4t);if(n===0)return;let i="",o="";if(n!==-1){i=t.subarray(0,n).toString("utf8");let a=n+1;t[a]===_4t&&++a,o=t.subarray(a).toString("utf8")}else i=t.toString("utf8"),o="";switch(i){case"data":r[i]===void 0?r[i]=o:r[i]+=`
${o}`;break;case"retry":KBe(o)&&(r[i]=o);break;case"id":JBe(o)&&(r[i]=o);break;case"event":o.length>0&&(r[i]=o);break}}processEvent(t){t.retry&&KBe(t.retry)&&(this.state.reconnectionTime=parseInt(t.retry,10)),t.id&&JBe(t.id)&&(this.state.lastEventId=t.id),t.data!==void 0&&this.push({type:t.event||"message",options:{data:t.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};XBe.exports={EventSourceStream:Eae}});var aDe=H((E$r,sDe)=>{"use strict";d();var{pipeline:S4t}=require("node:stream"),{fetching:R4t}=FR(),{makeRequest:k4t}=J6(),{webidl:HA}=dc(),{EventSourceStream:B4t}=ZBe(),{parseMIMEType:D4t}=gu(),{createFastMessageEvent:P4t}=n9(),{isNetworkError:eDe}=NR(),{delay:N4t}=vae(),{kEnumerableProperty:gb}=yi(),{environmentSettingsObject:tDe}=Tf(),rDe=!1,nDe=3e3,zR=0,iDe=1,YR=2,L4t="anonymous",F4t="use-credentials",l9=class e extends EventTarget{static{s(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#i=!1;#n=zR;#r=null;#o=null;#s;#a;constructor(t,r={}){super(),HA.util.markAsUncloneable(this);let n="EventSource constructor";HA.argumentLengthCheck(arguments,1,n),rDe||(rDe=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),t=HA.converters.USVString(t,n,"url"),r=HA.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#s=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:nDe};let i=tDe,o;try{o=new URL(t,i.settingsObject.baseUrl),this.#a.origin=o.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=o.href;let a=L4t;r.withCredentials&&(a=F4t,this.#i=!0);let l={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};l.client=tDe.settingsObject,l.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],l.cache="no-store",l.initiator="other",l.urlList=[new URL(this.#t)],this.#r=k4t(l),this.#l()}get readyState(){return this.#n}get url(){return this.#t}get withCredentials(){return this.#i}#l(){if(this.#n===YR)return;this.#n=zR;let t={request:this.#r,dispatcher:this.#s},r=s(n=>{eDe(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");t.processResponseEndOfBody=r,t.processResponse=n=>{if(eDe(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let i=n.headersList.get("content-type",!0),o=i!==null?D4t(i):"failure",a=o!=="failure"&&o.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#n=iDe,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let l=new B4t({eventSourceSettings:this.#a,push:s(c=>{this.dispatchEvent(P4t(c.type,c.options))},"push")});S4t(n.body.stream,l,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#o=R4t(t)}async#c(){this.#n!==YR&&(this.#n=zR,this.dispatchEvent(new Event("error")),await N4t(this.#a.reconnectionTime),this.#n===zR&&(this.#a.lastEventId.length&&this.#r.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#l()))}close(){HA.brandCheck(this,e),this.#n!==YR&&(this.#n=YR,this.#o.abort(),this.#r=null)}get onopen(){return this.#e.open}set onopen(t){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof t=="function"?(this.#e.open=t,this.addEventListener("open",t)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(t){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof t=="function"?(this.#e.message=t,this.addEventListener("message",t)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(t){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof t=="function"?(this.#e.error=t,this.addEventListener("error",t)):this.#e.error=null}},oDe={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:zR,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:iDe,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:YR,writable:!1}};Object.defineProperties(l9,oDe);Object.defineProperties(l9.prototype,oDe);Object.defineProperties(l9.prototype,{close:gb,onerror:gb,onmessage:gb,onopen:gb,readyState:gb,url:gb,withCredentials:gb});HA.converters.EventSourceInitDict=HA.dictionaryConverter([{key:"withCredentials",converter:HA.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"dispatcher",converter:HA.converters.any}]);sDe.exports={EventSource:l9,defaultReconnectionTime:nDe}});var fDe=H((w$r,Dn)=>{"use strict";d();var M4t=CR(),lDe=JS(),Q4t=Q6(),O4t=p_e(),U4t=O6(),q4t=zoe(),W4t=D_e(),G4t=Q_e(),cDe=go(),TW=yi(),{InvalidArgumentError:IW}=cDe,c9=ISe(),H4t=ZS(),j4t=Rse(),V4t=oRe(),$4t=Dse(),z4t=gse(),Y4t=wq(),{getGlobalDispatcher:uDe,setGlobalDispatcher:K4t}=Fq(),J4t=Mq(),X4t=hq(),Z4t=pq();Object.assign(lDe.prototype,c9);Dn.exports.Dispatcher=lDe;Dn.exports.Client=M4t;Dn.exports.Pool=Q4t;Dn.exports.BalancedPool=O4t;Dn.exports.Agent=U4t;Dn.exports.ProxyAgent=q4t;Dn.exports.EnvHttpProxyAgent=W4t;Dn.exports.RetryAgent=G4t;Dn.exports.RetryHandler=Y4t;Dn.exports.DecoratorHandler=J4t;Dn.exports.RedirectHandler=X4t;Dn.exports.createRedirectInterceptor=Z4t;Dn.exports.interceptors={redirect:dRe(),retry:hRe(),dump:gRe(),dns:CRe()};Dn.exports.buildConnector=H4t;Dn.exports.errors=cDe;Dn.exports.util={parseHeaders:TW.parseHeaders,headerNameToString:TW.headerNameToString};function KR(e){return(t,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!t||typeof t!="string"&&typeof t!="object"&&!(t instanceof URL))throw new IW("invalid url");if(r!=null&&typeof r!="object")throw new IW("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new IW("invalid opts.path");let a=r.path;r.path.startsWith("/")||(a=`/${a}`),t=new URL(TW.parseOrigin(t).origin+a)}else r||(r=typeof t=="object"?t:{}),t=TW.parseURL(t);let{agent:i,dispatcher:o=uDe()}=r;if(i)throw new IW("unsupported opts.agent. Did you mean opts.client?");return e.call(o,{...r,origin:t.origin,path:t.search?`${t.pathname}${t.search}`:t.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}s(KR,"makeDispatcher");Dn.exports.setGlobalDispatcher=K4t;Dn.exports.getGlobalDispatcher=uDe;var eIt=FR().fetch;Dn.exports.fetch=s(async function(t,r=void 0){try{return await eIt(t,r)}catch(n){throw n&&typeof n=="object"&&Error.captureStackTrace(n),n}},"fetch");Dn.exports.Headers=cb().Headers;Dn.exports.Response=NR().Response;Dn.exports.Request=J6().Request;Dn.exports.FormData=sR().FormData;Dn.exports.File=globalThis.File??require("node:buffer").File;Dn.exports.FileReader=Pke().FileReader;var{setGlobalOrigin:tIt,getGlobalOrigin:rIt}=Yie();Dn.exports.setGlobalOrigin=tIt;Dn.exports.getGlobalOrigin=rIt;var{CacheStorage:nIt}=Wke(),{kConstruct:iIt}=iW();Dn.exports.caches=new nIt(iIt);var{deleteCookie:oIt,getCookies:sIt,getSetCookies:aIt,setCookie:lIt}=eBe();Dn.exports.deleteCookie=oIt;Dn.exports.getCookies=sIt;Dn.exports.getSetCookies=aIt;Dn.exports.setCookie=lIt;var{parseMIMEType:cIt,serializeAMimeType:uIt}=gu();Dn.exports.parseMIMEType=cIt;Dn.exports.serializeAMimeType=uIt;var{CloseEvent:fIt,ErrorEvent:dIt,MessageEvent:mIt}=n9();Dn.exports.WebSocket=zBe().WebSocket;Dn.exports.CloseEvent=fIt;Dn.exports.ErrorEvent=dIt;Dn.exports.MessageEvent=mIt;Dn.exports.request=KR(c9.request);Dn.exports.stream=KR(c9.stream);Dn.exports.pipeline=KR(c9.pipeline);Dn.exports.connect=KR(c9.connect);Dn.exports.upgrade=KR(c9.upgrade);Dn.exports.MockClient=j4t;Dn.exports.MockPool=$4t;Dn.exports.MockAgent=V4t;Dn.exports.mockErrors=z4t;var{EventSource:hIt}=aDe();Dn.exports.EventSource=hIt});var fi=H((R$r,dDe)=>{d();dDe.exports={options:{usePureJavaScript:!1}}});var pDe=H((B$r,hDe)=>{d();var Iae={};hDe.exports=Iae;var mDe={};Iae.encode=function(e,t,r){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(e instanceof Uint8Array))n=pIt(e,t);else{var i=0,o=t.length,a=t.charAt(0),l=[0];for(i=0;i<e.length;++i){for(var c=0,u=e[i];c<l.length;++c)u+=l[c]<<8,l[c]=u%o,u=u/o|0;for(;u>0;)l.push(u%o),u=u/o|0}for(i=0;e[i]===0&&i<e.length-1;++i)n+=a;for(i=l.length-1;i>=0;--i)n+=t[l[i]]}if(r){var f=new RegExp(".{1,"+r+"}","g");n=n.match(f).join(`\r
`)}return n};Iae.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var r=mDe[t];if(!r){r=mDe[t]=[];for(var n=0;n<t.length;++n)r[t.charCodeAt(n)]=n}e=e.replace(/\s/g,"");for(var i=t.length,o=t.charAt(0),a=[0],n=0;n<e.length;n++){var l=r[e.charCodeAt(n)];if(l===void 0)return;for(var c=0,u=l;c<a.length;++c)u+=a[c]*i,a[c]=u&255,u>>=8;for(;u>0;)a.push(u&255),u>>=8}for(var f=0;e[f]===o&&f<e.length-1;++f)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function pIt(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r<e.length();++r){for(var a=0,l=e.at(r);a<o.length;++a)l+=o[a]<<8,o[a]=l%n,l=l/n|0;for(;l>0;)o.push(l%n),l=l/n|0}var c="";for(r=0;e.at(r)===0&&r<e.length()-1;++r)c+=i;for(r=o.length-1;r>=0;--r)c+=t[o[r]];return c}s(pIt,"_encodeWithByteBuffer")});var lo=H((N$r,CDe)=>{d();var gDe=fi(),ADe=pDe(),Le=CDe.exports=gDe.util=gDe.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){Le.nextTick=process.nextTick,typeof setImmediate=="function"?Le.setImmediate=setImmediate:Le.setImmediate=Le.nextTick;return}if(typeof setImmediate=="function"){Le.setImmediate=function(){return setImmediate.apply(void 0,arguments)},Le.nextTick=function(l){return setImmediate(l)};return}if(Le.setImmediate=function(l){setTimeout(l,0)},typeof window<"u"&&typeof window.postMessage=="function"){let l=function(c){if(c.source===window&&c.data===e){c.stopPropagation();var u=t.slice();t.length=0,u.forEach(function(f){f()})}};var a=l;s(l,"handler");var e="forge.setImmediate",t=[];Le.setImmediate=function(c){t.push(c),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",l,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),n=!0,i=document.createElement("div"),t=[];new MutationObserver(function(){var c=t.slice();t.length=0,c.forEach(function(u){u()})}).observe(i,{attributes:!0});var o=Le.setImmediate;Le.setImmediate=function(c){Date.now()-r>15?(r=Date.now(),o(c)):(t.push(c),t.length===1&&i.setAttribute("a",n=!n))}}Le.nextTick=Le.setImmediate})();Le.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;Le.globalScope=function(){return Le.isNodejs?global:typeof self>"u"?window:self}();Le.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};Le.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};Le.isArrayBufferView=function(e){return e&&Le.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function JR(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}s(JR,"_checkBitsParam");Le.ByteBuffer=Tae;function Tae(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(Le.isArrayBuffer(e)||Le.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof Tae||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}s(Tae,"ByteStringBuffer");Le.ByteStringBuffer=Tae;var gIt=4096;Le.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>gIt&&(this.data.substr(0,1),this._constructedStringLength=0)};Le.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};Le.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};Le.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};Le.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this};Le.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};Le.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(Le.encodeUtf8(e))};Le.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};Le.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};Le.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};Le.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};Le.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};Le.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};Le.ByteStringBuffer.prototype.putInt=function(e,t){JR(t);var r="";do t-=8,r+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(r)};Le.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)};Le.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())};Le.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};Le.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e};Le.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e};Le.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e};Le.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e};Le.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e};Le.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e};Le.ByteStringBuffer.prototype.getInt=function(e){JR(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t};Le.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t};Le.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};Le.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};Le.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};Le.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};Le.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};Le.ByteStringBuffer.prototype.copy=function(){var e=Le.createBuffer(this.data);return e.read=this.read,e};Le.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};Le.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};Le.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};Le.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e};Le.ByteStringBuffer.prototype.toString=function(){return Le.decodeUtf8(this.bytes())};function AIt(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=Le.isArrayBuffer(e),n=Le.isArrayBufferView(e);if(r||n){r?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}s(AIt,"DataBuffer");Le.DataBuffer=AIt;Le.DataBuffer.prototype.length=function(){return this.write-this.read};Le.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};Le.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this};Le.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};Le.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this};Le.DataBuffer.prototype.putBytes=function(e,t){if(Le.isArrayBufferView(e)){var r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),n=r.byteLength-r.byteOffset;this.accommodate(n);var i=new Uint8Array(this.data.buffer,this.write);return i.set(r),this.write+=n,this}if(Le.isArrayBuffer(e)){var r=new Uint8Array(e);this.accommodate(r.byteLength);var i=new Uint8Array(this.data.buffer);return i.set(r,this.write),this.write+=r.byteLength,this}if(e instanceof Le.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&Le.isArrayBufferView(e.data)){var r=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(r.byteLength);var i=new Uint8Array(e.data.byteLength,this.write);return i.set(r),this.write+=r.byteLength,this}if(e instanceof Le.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var o;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),o=new Uint8Array(this.data.buffer,this.write),this.write+=Le.binary.hex.decode(e,o,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),o=new Uint8Array(this.data.buffer,this.write),this.write+=Le.binary.base64.decode(e,o,this.write),this;if(t==="utf8"&&(e=Le.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),o=new Uint8Array(this.data.buffer,this.write),this.write+=Le.binary.raw.decode(o),this;if(t==="utf16")return this.accommodate(e.length*2),o=new Uint16Array(this.data.buffer,this.write),this.write+=Le.text.utf16.encode(o),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)};Le.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this};Le.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")};Le.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this};Le.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};Le.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};Le.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};Le.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};Le.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};Le.DataBuffer.prototype.putInt=function(e,t){JR(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};Le.DataBuffer.prototype.putSignedInt=function(e,t){return JR(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)};Le.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};Le.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e};Le.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e};Le.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e};Le.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e};Le.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e};Le.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e};Le.DataBuffer.prototype.getInt=function(e){JR(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t};Le.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t};Le.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};Le.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};Le.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};Le.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};Le.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};Le.DataBuffer.prototype.copy=function(){return new Le.DataBuffer(this)};Le.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};Le.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};Le.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};Le.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e};Le.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return Le.binary.raw.encode(t);if(e==="hex")return Le.binary.hex.encode(t);if(e==="base64")return Le.binary.base64.encode(t);if(e==="utf8")return Le.text.utf8.decode(t);if(e==="utf16")return Le.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)};Le.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=Le.encodeUtf8(e)),new Le.ByteBuffer(e)};Le.fillString=function(e,t){for(var r="";t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return r};Le.xorBytes=function(e,t,r){for(var n="",i="",o="",a=0,l=0;r>0;--r,++a)i=e.charCodeAt(a)^t.charCodeAt(a),l>=10&&(n+=o,o="",l=0),o+=String.fromCharCode(i),++l;return n+=o,n};Le.hexToBytes=function(e){var t="",r=0;for(e.length&!0&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t};Le.bytesToHex=function(e){return Le.createBuffer(e).toHex()};Le.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var vC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bC=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],yDe="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Le.encode64=function(e,t){for(var r="",n="",i,o,a,l=0;l<e.length;)i=e.charCodeAt(l++),o=e.charCodeAt(l++),a=e.charCodeAt(l++),r+=vC.charAt(i>>2),r+=vC.charAt((i&3)<<4|o>>4),isNaN(o)?r+="==":(r+=vC.charAt((o&15)<<2|a>>6),r+=isNaN(a)?"=":vC.charAt(a&63)),t&&r.length>t&&(n+=r.substr(0,t)+`\r
`,r=r.substr(t));return n+=r,n};Le.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",r,n,i,o,a=0;a<e.length;)r=bC[e.charCodeAt(a++)-43],n=bC[e.charCodeAt(a++)-43],i=bC[e.charCodeAt(a++)-43],o=bC[e.charCodeAt(a++)-43],t+=String.fromCharCode(r<<2|n>>4),i!==64&&(t+=String.fromCharCode((n&15)<<4|i>>2),o!==64&&(t+=String.fromCharCode((i&3)<<6|o)));return t};Le.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};Le.decodeUtf8=function(e){return decodeURIComponent(escape(e))};Le.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:ADe.encode,decode:ADe.decode}};Le.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};Le.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length)),r=r||0;for(var i=r,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o);return t?i-r:n};Le.binary.hex.encode=Le.bytesToHex;Le.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2))),r=r||0;var i=0,o=r;for(e.length&1&&(i=1,n[o++]=parseInt(e[0],16));i<e.length;i+=2)n[o++]=parseInt(e.substr(i,2),16);return t?o-r:n};Le.binary.base64.encode=function(e,t){for(var r="",n="",i,o,a,l=0;l<e.byteLength;)i=e[l++],o=e[l++],a=e[l++],r+=vC.charAt(i>>2),r+=vC.charAt((i&3)<<4|o>>4),isNaN(o)?r+="==":(r+=vC.charAt((o&15)<<2|a>>6),r+=isNaN(a)?"=":vC.charAt(a&63)),t&&r.length>t&&(n+=r.substr(0,t)+`\r
`,r=r.substr(t));return n+=r,n};Le.binary.base64.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var i,o,a,l,c=0,u=r;c<e.length;)i=bC[e.charCodeAt(c++)-43],o=bC[e.charCodeAt(c++)-43],a=bC[e.charCodeAt(c++)-43],l=bC[e.charCodeAt(c++)-43],n[u++]=i<<2|o>>4,a!==64&&(n[u++]=(o&15)<<4|a>>2,l!==64&&(n[u++]=(a&3)<<6|l));return t?u-r:n.subarray(0,u)};Le.binary.base58.encode=function(e,t){return Le.binary.baseN.encode(e,yDe,t)};Le.binary.base58.decode=function(e,t){return Le.binary.baseN.decode(e,yDe,t)};Le.text={utf8:{},utf16:{}};Le.text.utf8.encode=function(e,t,r){e=Le.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length)),r=r||0;for(var i=r,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o);return t?i-r:n};Le.text.utf8.decode=function(e){return Le.decodeUtf8(String.fromCharCode.apply(null,e))};Le.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length*2));var i=new Uint16Array(n.buffer);r=r||0;for(var o=r,a=r,l=0;l<e.length;++l)i[a++]=e.charCodeAt(l),o+=2;return t?o-r:n};Le.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))};Le.deflate=function(e,t,r){if(t=Le.decode64(e.deflate(Le.encode64(t)).rval),r){var n=2,i=t.charCodeAt(1);i&32&&(n=6),t=t.substring(n,t.length-4)}return t};Le.inflate=function(e,t,r){var n=e.inflate(Le.encode64(t)).rval;return n===null?null:Le.decode64(n)};var wae=s(function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(r===null?n=e.removeItem(t):(r=Le.encode64(JSON.stringify(r)),n=e.setItem(t,r)),typeof n<"u"&&n.rval!==!0){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},"_setStorageObject"),_ae=s(function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(r.rval===null){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return r!==null&&(r=JSON.parse(Le.decode64(r))),r},"_getStorageObject"),yIt=s(function(e,t,r,n){var i=_ae(e,t);i===null&&(i={}),i[r]=n,wae(e,t,i)},"_setItem"),CIt=s(function(e,t,r){var n=_ae(e,t);return n!==null&&(n=r in n?n[r]:null),n},"_getItem"),xIt=s(function(e,t,r){var n=_ae(e,t);if(n!==null&&r in n){delete n[r];var i=!0;for(var o in n){i=!1;break}i&&(n=null),wae(e,t,n)}},"_removeItem"),vIt=s(function(e,t){wae(e,t,null)},"_clearItems"),wW=s(function(e,t,r){var n=null;typeof r>"u"&&(r=["web","flash"]);var i,o=!1,a=null;for(var l in r){i=r[l];try{if(i==="flash"||i==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");n=e.apply(this,t),o=i==="flash"}(i==="web"||i==="both")&&(t[0]=localStorage,n=e.apply(this,t),o=!0)}catch(c){a=c}if(o)break}if(!o)throw a;return n},"_callStorageFunction");Le.setItem=function(e,t,r,n,i){wW(yIt,arguments,i)};Le.getItem=function(e,t,r,n){return wW(CIt,arguments,n)};Le.removeItem=function(e,t,r,n){wW(xIt,arguments,n)};Le.clearItems=function(e,t,r){wW(vIt,arguments,r)};Le.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};Le.format=function(e){for(var t=/%./g,r,n,i=0,o=[],a=0;r=t.exec(e);){n=e.substring(a,t.lastIndex-2),n.length>0&&o.push(n),a=t.lastIndex;var l=r[0][1];switch(l){case"s":case"o":i<arguments.length?o.push(arguments[i+++1]):o.push("<?>");break;case"%":o.push("%");break;default:o.push("<%"+l+"?>")}}return o.push(e.substring(a)),o.join("")};Le.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,a=r===void 0?",":r,l=n===void 0?".":n,c=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",f=u.length>3?u.length%3:0;return c+(f?u.substr(0,f)+l:"")+u.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+l)+(o?a+Math.abs(i-u).toFixed(o).slice(2):"")};Le.formatSize=function(e){return e>=1073741824?e=Le.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=Le.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=Le.formatNumber(e/1024,0)+" KiB":e=Le.formatNumber(e,0)+" bytes",e};Le.bytesFromIP=function(e){return e.indexOf(".")!==-1?Le.bytesFromIPv4(e):e.indexOf(":")!==-1?Le.bytesFromIPv6(e):null};Le.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=Le.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()};Le.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(a){return a.length===0&&++t,!0});for(var r=(8-e.length+t)*2,n=Le.createBuffer(),i=0;i<8;++i){if(!e[i]||e[i].length===0){n.fillWithByte(0,r),r=0;continue}var o=Le.hexToBytes(e[i]);o.length<2&&n.putByte(0),n.putBytes(o)}return n.getBytes()};Le.bytesToIP=function(e){return e.length===4?Le.bytesToIPv4(e):e.length===16?Le.bytesToIPv6(e):null};Le.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")};Le.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var o=Le.bytesToHex(e[i]+e[i+1]);o[0]==="0"&&o!=="0";)o=o.substr(1);if(o==="0"){var a=r[r.length-1],l=t.length;!a||l!==a.end+1?r.push({start:l,end:l}):(a.end=l,a.end-a.start>r[n].end-r[n].start&&(n=r.length-1))}t.push(o)}if(r.length>0){var c=r[n];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),c.start===0&&t.unshift(""),c.end===7&&t.push(""))}return t.join(":")};Le.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in Le&&!e.update)return t(null,Le.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Le.cores=navigator.hardwareConcurrency,t(null,Le.cores);if(typeof Worker>"u")return Le.cores=1,t(null,Le.cores);if(typeof Blob>"u")return Le.cores=2,t(null,Le.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){for(var l=Date.now(),c=l+4;Date.now()<c;);self.postMessage({st:l,et:c})})}.toString(),")()"],{type:"application/javascript"}));n([],5,16);function n(a,l,c){if(l===0){var u=Math.floor(a.reduce(function(f,m){return f+m},0)/a.length);return Le.cores=Math.max(1,u),URL.revokeObjectURL(r),t(null,Le.cores)}i(c,function(f,m){a.push(o(c,m)),n(a,l-1,c)})}s(n,"sample");function i(a,l){for(var c=[],u=[],f=0;f<a;++f){var m=new Worker(r);m.addEventListener("message",function(h){if(u.push(h.data),u.length===a){for(var p=0;p<a;++p)c[p].terminate();l(null,u)}}),c.push(m)}for(var f=0;f<a;++f)c[f].postMessage(f)}s(i,"map");function o(a,l){for(var c=[],u=0;u<a;++u)for(var f=l[u],m=c[u]=[],h=0;h<a;++h)if(u!==h){var p=l[h];(f.st>p.st&&f.st<p.et||p.st>f.st&&p.st<f.et)&&m.push(h)}return c.reduce(function(g,y){return Math.max(g,y.length)},0)}s(o,"reduce")}});var _W=H((M$r,xDe)=>{d();var Fl=fi();lo();xDe.exports=Fl.cipher=Fl.cipher||{};Fl.cipher.algorithms=Fl.cipher.algorithms||{};Fl.cipher.createCipher=function(e,t){var r=e;if(typeof r=="string"&&(r=Fl.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new Fl.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})};Fl.cipher.createDecipher=function(e,t){var r=e;if(typeof r=="string"&&(r=Fl.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new Fl.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})};Fl.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),Fl.cipher.algorithms[e]=t};Fl.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in Fl.cipher.algorithms?Fl.cipher.algorithms[e]:null};var Sae=Fl.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};Sae.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=Fl.util.createBuffer(),this.output=e.output||Fl.util.createBuffer(),this.mode.start(t)};Sae.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};Sae.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return e(this.blockSize,r,!1)},this.mode.unpad=function(r){return e(this.blockSize,r,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var kae=H((O$r,vDe)=>{d();var Ml=fi();lo();Ml.cipher=Ml.cipher||{};var Ti=vDe.exports=Ml.cipher.modes=Ml.cipher.modes||{};Ti.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Ti.ecb.prototype.start=function(e){};Ti.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])};Ti.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])};Ti.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0};Ti.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return n>this.blockSize<<2?!1:(e.truncate(n),!0)};Ti.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Ti.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=SW(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Ti.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock};Ti.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)};Ti.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0};Ti.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return n>this.blockSize<<2?!1:(e.truncate(n),!0)};Ti.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Ml.util.createBuffer(),this._partialBytes=0};Ti.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=SW(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ti.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);return}var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(o>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Ti.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);return}var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Ti.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ml.util.createBuffer(),this._partialBytes=0};Ti.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=SW(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ti.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];return}var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Ti.ofb.prototype.decrypt=Ti.ofb.prototype.encrypt;Ti.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ml.util.createBuffer(),this._partialBytes=0};Ti.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=SW(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ti.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}RW(this._inBlock)};Ti.ctr.prototype.decrypt=Ti.ctr.prototype.encrypt;Ti.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Ml.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Ti.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=Ml.util.createBuffer(e.iv);this._cipherLength=0;var r;if("additionalData"in e?r=Ml.util.createBuffer(e.additionalData):r=Ml.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=Ml.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=t.length();if(n===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(Rae(n*8)))}this._inBlock=this._j0.slice(0),RW(this._inBlock),this._partialBytes=0,r=Ml.util.createBuffer(r),this._aDataLength=Rae(r.length()*8);var i=r.length()%this.blockSize;for(i&&r.fillWithByte(0,this.blockSize-i),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};Ti.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o<=0||r){if(r){var a=n%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),RW(this._inBlock)};Ti.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),RW(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize};Ti.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=Ml.util.createBuffer();var n=this._aDataLength.concat(Rae(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,n);var i=[];this.cipher.encrypt(this._j0,i);for(var o=0;o<this._ints;++o)this.tag.putInt32(this._s[o]^i[o]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r};Ti.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){var o=e[i/32|0]&1<<31-i%32;o&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r};Ti.gcm.prototype.pow=function(e,t){for(var r=e[3]&1,n=3;n>0;--n)t[n]=e[n]>>>1|(e[n-1]&1)<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)};Ti.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=r/8|0,i=e[n]>>>(7-r%8)*4&15,o=this._m[r][i];t[0]^=o[0],t[1]^=o[1],t[2]^=o[2],t[3]^=o[3]}return t};Ti.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)};Ti.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),a=0;a<i;++a){var l=[0,0,0,0],c=a/n|0,u=(n-1-a%n)*t;l[c]=1<<t-1<<u,o[a]=this.generateSubHashTable(this.multiply(l,e),t)}return o};Ti.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o<n;){for(var a=1;a<o;++a){var l=i[o],c=i[a];i[o+a]=[l[0]^c[0],l[1]^c[1],l[2]^c[2],l[3]^c[3]]}o*=2}for(i[0]=[0,0,0,0],o=n+1;o<r;++o){var u=i[o^n];i[o]=[e[0]^u[0],e[1]^u[1],e[2]^u[2],e[3]^u[3]]}return i};function SW(e,t){if(typeof e=="string"&&(e=Ml.util.createBuffer(e)),Ml.util.isArray(e)&&e.length>4){var r=e;e=Ml.util.createBuffer();for(var n=0;n<r.length;++n)e.putByte(r[n])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!Ml.util.isArray(e)){for(var i=[],o=t/4,n=0;n<o;++n)i.push(e.getInt32());e=i}return e}s(SW,"transformIV");function RW(e){e[e.length-1]=e[e.length-1]+1&4294967295}s(RW,"inc32");function Rae(e){return[e/4294967296|0,e&4294967295]}s(Rae,"from64To32")});var EC=H((W$r,TDe)=>{d();var ts=fi();_W();kae();lo();TDe.exports=ts.aes=ts.aes||{};ts.aes.startEncrypting=function(e,t,r,n){var i=kW({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i};ts.aes.createEncryptionCipher=function(e,t){return kW({key:e,output:null,decrypt:!1,mode:t})};ts.aes.startDecrypting=function(e,t,r,n){var i=kW({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i};ts.aes.createDecryptionCipher=function(e,t){return kW({key:e,output:null,decrypt:!0,mode:t})};ts.aes.Algorithm=function(e,t){Pae||EDe();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:s(function(n,i){return Dae(r._w,n,i,!1)},"encrypt"),decrypt:s(function(n,i){return Dae(r._w,n,i,!0)},"decrypt")}}),r._init=!1};ts.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,r;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=ts.util.createBuffer(t);else if(ts.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){r=t,t=ts.util.createBuffer();for(var n=0;n<r.length;++n)t.putByte(r[n])}if(!ts.util.isArray(t)){r=t,t=[];var i=r.length();if(i===16||i===24||i===32){i=i>>>2;for(var n=0;n<i;++n)t.push(r.getInt32())}}if(!ts.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var o=this.mode.name,a=["CFB","OFB","CTR","GCM"].indexOf(o)!==-1;this._w=IDe(t,e.decrypt&&!a),this._init=!0}};ts.aes._expandKey=function(e,t){return Pae||EDe(),IDe(e,t)};ts.aes._updateBlock=Dae;f9("AES-ECB",ts.cipher.modes.ecb);f9("AES-CBC",ts.cipher.modes.cbc);f9("AES-CFB",ts.cipher.modes.cfb);f9("AES-OFB",ts.cipher.modes.ofb);f9("AES-CTR",ts.cipher.modes.ctr);f9("AES-GCM",ts.cipher.modes.gcm);function f9(e,t){var r=s(function(){return new ts.aes.Algorithm(e,t)},"factory");ts.cipher.registerAlgorithm(e,r)}s(f9,"registerAlgorithm");var Pae=!1,u9=4,R0,Bae,bDe,Ab,Fh;function EDe(){Pae=!0,bDe=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;R0=new Array(256),Bae=new Array(256),Ab=new Array(4),Fh=new Array(4);for(var t=0;t<4;++t)Ab[t]=new Array(256),Fh[t]=new Array(256);for(var r=0,n=0,i,o,a,l,c,u,f,t=0;t<256;++t){l=n^n<<1^n<<2^n<<3^n<<4,l=l>>8^l&255^99,R0[r]=l,Bae[l]=r,c=e[l],i=e[r],o=e[i],a=e[o],u=c<<24^l<<16^l<<8^(l^c),f=(i^o^a)<<24^(r^a)<<16^(r^o^a)<<8^(r^i^a);for(var m=0;m<4;++m)Ab[m][r]=u,Fh[m][l]=f,u=u<<24|u>>>8,f=f<<24|f>>>8;r===0?r=n=1:(r=i^e[e[e[i^a]]],n^=e[e[n]])}}s(EDe,"initialize");function IDe(e,t){for(var r=e.slice(0),n,i=1,o=r.length,a=o+6+1,l=u9*a,c=o;c<l;++c)n=r[c-1],c%o===0?(n=R0[n>>>16&255]<<24^R0[n>>>8&255]<<16^R0[n&255]<<8^R0[n>>>24]^bDe[i]<<24,i++):o>6&&c%o===4&&(n=R0[n>>>24]<<24^R0[n>>>16&255]<<16^R0[n>>>8&255]<<8^R0[n&255]),r[c]=r[c-o]^n;if(t){var u,f=Fh[0],m=Fh[1],h=Fh[2],p=Fh[3],g=r.slice(0);l=r.length;for(var c=0,y=l-u9;c<l;c+=u9,y-=u9)if(c===0||c===l-u9)g[c]=r[y],g[c+1]=r[y+3],g[c+2]=r[y+2],g[c+3]=r[y+1];else for(var x=0;x<u9;++x)u=r[y+x],g[c+(3&-x)]=f[R0[u>>>24]]^m[R0[u>>>16&255]]^h[R0[u>>>8&255]]^p[R0[u&255]];r=g}return r}s(IDe,"_expandKey");function Dae(e,t,r,n){var i=e.length/4-1,o,a,l,c,u;n?(o=Fh[0],a=Fh[1],l=Fh[2],c=Fh[3],u=Bae):(o=Ab[0],a=Ab[1],l=Ab[2],c=Ab[3],u=R0);var f,m,h,p,g,y,x;f=t[0]^e[0],m=t[n?3:1]^e[1],h=t[2]^e[2],p=t[n?1:3]^e[3];for(var b=3,E=1;E<i;++E)g=o[f>>>24]^a[m>>>16&255]^l[h>>>8&255]^c[p&255]^e[++b],y=o[m>>>24]^a[h>>>16&255]^l[p>>>8&255]^c[f&255]^e[++b],x=o[h>>>24]^a[p>>>16&255]^l[f>>>8&255]^c[m&255]^e[++b],p=o[p>>>24]^a[f>>>16&255]^l[m>>>8&255]^c[h&255]^e[++b],f=g,m=y,h=x;r[0]=u[f>>>24]<<24^u[m>>>16&255]<<16^u[h>>>8&255]<<8^u[p&255]^e[++b],r[n?3:1]=u[m>>>24]<<24^u[h>>>16&255]<<16^u[p>>>8&255]<<8^u[f&255]^e[++b],r[2]=u[h>>>24]<<24^u[p>>>16&255]<<16^u[f>>>8&255]<<8^u[m&255]^e[++b],r[n?1:3]=u[p>>>24]<<24^u[f>>>16&255]<<16^u[m>>>8&255]<<8^u[h&255]^e[++b]}s(Dae,"_updateBlock");function kW(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="AES-"+t,n;e.decrypt?n=ts.cipher.createDecipher(r,e.key):n=ts.cipher.createCipher(r,e.key);var i=n.start;return n.start=function(o,a){var l=null;a instanceof ts.util.ByteBuffer&&(l=a,a={}),a=a||{},a.output=l,a.iv=o,i.call(n,a)},n}s(kW,"_createCipher")});var IC=H((j$r,wDe)=>{d();var XR=fi();XR.pki=XR.pki||{};var Nae=wDe.exports=XR.pki.oids=XR.oids=XR.oids||{};function Qt(e,t){Nae[e]=t,Nae[t]=e}s(Qt,"_IN");function bo(e,t){Nae[e]=t}s(bo,"_I_");Qt("1.2.840.113549.1.1.1","rsaEncryption");Qt("1.2.840.113549.1.1.4","md5WithRSAEncryption");Qt("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Qt("1.2.840.113549.1.1.7","RSAES-OAEP");Qt("1.2.840.113549.1.1.8","mgf1");Qt("1.2.840.113549.1.1.9","pSpecified");Qt("1.2.840.113549.1.1.10","RSASSA-PSS");Qt("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Qt("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Qt("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Qt("1.3.101.112","EdDSA25519");Qt("1.2.840.10040.4.3","dsa-with-sha1");Qt("1.3.14.3.2.7","desCBC");Qt("1.3.14.3.2.26","sha1");Qt("1.3.14.3.2.29","sha1WithRSASignature");Qt("2.16.840.1.101.3.4.2.1","sha256");Qt("2.16.840.1.101.3.4.2.2","sha384");Qt("2.16.840.1.101.3.4.2.3","sha512");Qt("2.16.840.1.101.3.4.2.4","sha224");Qt("2.16.840.1.101.3.4.2.5","sha512-224");Qt("2.16.840.1.101.3.4.2.6","sha512-256");Qt("1.2.840.113549.2.2","md2");Qt("1.2.840.113549.2.5","md5");Qt("1.2.840.113549.1.7.1","data");Qt("1.2.840.113549.1.7.2","signedData");Qt("1.2.840.113549.1.7.3","envelopedData");Qt("1.2.840.113549.1.7.4","signedAndEnvelopedData");Qt("1.2.840.113549.1.7.5","digestedData");Qt("1.2.840.113549.1.7.6","encryptedData");Qt("1.2.840.113549.1.9.1","emailAddress");Qt("1.2.840.113549.1.9.2","unstructuredName");Qt("1.2.840.113549.1.9.3","contentType");Qt("1.2.840.113549.1.9.4","messageDigest");Qt("1.2.840.113549.1.9.5","signingTime");Qt("1.2.840.113549.1.9.6","counterSignature");Qt("1.2.840.113549.1.9.7","challengePassword");Qt("1.2.840.113549.1.9.8","unstructuredAddress");Qt("1.2.840.113549.1.9.14","extensionRequest");Qt("1.2.840.113549.1.9.20","friendlyName");Qt("1.2.840.113549.1.9.21","localKeyId");Qt("1.2.840.113549.1.9.22.1","x509Certificate");Qt("1.2.840.113549.1.12.10.1.1","keyBag");Qt("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Qt("1.2.840.113549.1.12.10.1.3","certBag");Qt("1.2.840.113549.1.12.10.1.4","crlBag");Qt("1.2.840.113549.1.12.10.1.5","secretBag");Qt("1.2.840.113549.1.12.10.1.6","safeContentsBag");Qt("1.2.840.113549.1.5.13","pkcs5PBES2");Qt("1.2.840.113549.1.5.12","pkcs5PBKDF2");Qt("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Qt("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Qt("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Qt("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Qt("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Qt("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Qt("1.2.840.113549.2.7","hmacWithSHA1");Qt("1.2.840.113549.2.8","hmacWithSHA224");Qt("1.2.840.113549.2.9","hmacWithSHA256");Qt("1.2.840.113549.2.10","hmacWithSHA384");Qt("1.2.840.113549.2.11","hmacWithSHA512");Qt("1.2.840.113549.3.7","des-EDE3-CBC");Qt("2.16.840.1.101.3.4.1.2","aes128-CBC");Qt("2.16.840.1.101.3.4.1.22","aes192-CBC");Qt("2.16.840.1.101.3.4.1.42","aes256-CBC");Qt("2.5.4.3","commonName");Qt("2.5.4.4","surname");Qt("2.5.4.5","serialNumber");Qt("2.5.4.6","countryName");Qt("2.5.4.7","localityName");Qt("2.5.4.8","stateOrProvinceName");Qt("2.5.4.9","streetAddress");Qt("2.5.4.10","organizationName");Qt("2.5.4.11","organizationalUnitName");Qt("2.5.4.12","title");Qt("2.5.4.13","description");Qt("2.5.4.15","businessCategory");Qt("2.5.4.17","postalCode");Qt("2.5.4.42","givenName");Qt("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Qt("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Qt("2.16.840.1.113730.1.1","nsCertType");Qt("2.16.840.1.113730.1.13","nsComment");bo("2.5.29.1","authorityKeyIdentifier");bo("2.5.29.2","keyAttributes");bo("2.5.29.3","certificatePolicies");bo("2.5.29.4","keyUsageRestriction");bo("2.5.29.5","policyMapping");bo("2.5.29.6","subtreesConstraint");bo("2.5.29.7","subjectAltName");bo("2.5.29.8","issuerAltName");bo("2.5.29.9","subjectDirectoryAttributes");bo("2.5.29.10","basicConstraints");bo("2.5.29.11","nameConstraints");bo("2.5.29.12","policyConstraints");bo("2.5.29.13","basicConstraints");Qt("2.5.29.14","subjectKeyIdentifier");Qt("2.5.29.15","keyUsage");bo("2.5.29.16","privateKeyUsagePeriod");Qt("2.5.29.17","subjectAltName");Qt("2.5.29.18","issuerAltName");Qt("2.5.29.19","basicConstraints");bo("2.5.29.20","cRLNumber");bo("2.5.29.21","cRLReason");bo("2.5.29.22","expirationDate");bo("2.5.29.23","instructionCode");bo("2.5.29.24","invalidityDate");bo("2.5.29.25","cRLDistributionPoints");bo("2.5.29.26","issuingDistributionPoint");bo("2.5.29.27","deltaCRLIndicator");bo("2.5.29.28","issuingDistributionPoint");bo("2.5.29.29","certificateIssuer");bo("2.5.29.30","nameConstraints");Qt("2.5.29.31","cRLDistributionPoints");Qt("2.5.29.32","certificatePolicies");bo("2.5.29.33","policyMappings");bo("2.5.29.34","policyConstraints");Qt("2.5.29.35","authorityKeyIdentifier");bo("2.5.29.36","policyConstraints");Qt("2.5.29.37","extKeyUsage");bo("2.5.29.46","freshestCRL");bo("2.5.29.54","inhibitAnyPolicy");Qt("1.3.6.1.4.1.11129.2.4.2","timestampList");Qt("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Qt("1.3.6.1.5.5.7.3.1","serverAuth");Qt("1.3.6.1.5.5.7.3.2","clientAuth");Qt("1.3.6.1.5.5.7.3.3","codeSigning");Qt("1.3.6.1.5.5.7.3.4","emailProtection");Qt("1.3.6.1.5.5.7.3.8","timeStamping")});var Mh=H((z$r,SDe)=>{d();var bs=fi();lo();IC();var Ir=SDe.exports=bs.asn1=bs.asn1||{};Ir.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Ir.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};Ir.create=function(e,t,r,n,i){if(bs.util.isArray(n)){for(var o=[],a=0;a<n.length;++a)n[a]!==void 0&&o.push(n[a]);n=o}var l={tagClass:e,type:t,constructed:r,composed:r||bs.util.isArray(n),value:n};return i&&"bitStringContents"in i&&(l.bitStringContents=i.bitStringContents,l.original=Ir.copy(l)),l};Ir.copy=function(e,t){var r;if(bs.util.isArray(e)){r=[];for(var n=0;n<e.length;++n)r.push(Ir.copy(e[n],t));return r}return typeof e=="string"?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:Ir.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)};Ir.equals=function(e,t,r){if(bs.util.isArray(e)){if(!bs.util.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!Ir.equals(e[n],t[n]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var i=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&Ir.equals(e.value,t.value);return r&&r.includeBitStringContents&&(i=i&&e.bitStringContents===t.bitStringContents),i};Ir.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var r,n=t&128;return n?r=e.getInt((t&127)<<3):r=t,r}};function ZR(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}s(ZR,"_checkBufferLength");var bIt=s(function(e,t){var r=e.getByte();if(t--,r!==128){var n,i=r&128;if(!i)n=r;else{var o=r&127;ZR(e,t,o),n=e.getInt(o<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");Ir.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),typeof e=="string"&&(e=bs.util.createBuffer(e));var r=e.length(),n=BW(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var i=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw i.byteCount=r,i.remaining=e.length(),i}return n};function BW(e,t,r,n){var i;ZR(e,t,2);var o=e.getByte();t--;var a=o&192,l=o&31;i=e.length();var c=bIt(e,t);if(t-=i-e.length(),c!==void 0&&c>t){if(n.strict){var u=new Error("Too few bytes to read ASN.1 value.");throw u.available=e.length(),u.remaining=t,u.requested=c,u}c=t}var f,m,h=(o&32)===32;if(h)if(f=[],c===void 0)for(;;){if(ZR(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}i=e.length(),f.push(BW(e,t,r+1,n)),t-=i-e.length()}else for(;c>0;)i=e.length(),f.push(BW(e,c,r+1,n)),t-=i-e.length(),c-=i-e.length();if(f===void 0&&a===Ir.Class.UNIVERSAL&&l===Ir.Type.BITSTRING&&(m=e.bytes(c)),f===void 0&&n.decodeBitStrings&&a===Ir.Class.UNIVERSAL&&l===Ir.Type.BITSTRING&&c>1){var p=e.read,g=t,y=0;if(l===Ir.Type.BITSTRING&&(ZR(e,t,1),y=e.getByte(),t--),y===0)try{i=e.length();var x={strict:!0,decodeBitStrings:!0},b=BW(e,t,r+1,x),E=i-e.length();t-=E,l==Ir.Type.BITSTRING&&E++;var _=b.tagClass;E===c&&(_===Ir.Class.UNIVERSAL||_===Ir.Class.CONTEXT_SPECIFIC)&&(f=[b])}catch{}f===void 0&&(e.read=p,t=g)}if(f===void 0){if(c===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=t}if(l===Ir.Type.BMPSTRING)for(f="";c>0;c-=2)ZR(e,t,2),f+=String.fromCharCode(e.getInt16()),t-=2;else f=e.getBytes(c),t-=c}var k=m===void 0?null:{bitStringContents:m};return Ir.create(a,l,h,f,k)}s(BW,"_fromDer");Ir.toDer=function(e){var t=bs.util.createBuffer(),r=e.tagClass|e.type,n=bs.util.createBuffer(),i=!1;if("bitStringContents"in e&&(i=!0,e.original&&(i=Ir.equals(e,e.original))),i)n.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:n.putByte(0);for(var o=0;o<e.value.length;++o)e.value[o]!==void 0&&n.putBuffer(Ir.toDer(e.value[o]))}else if(e.type===Ir.Type.BMPSTRING)for(var o=0;o<e.value.length;++o)n.putInt16(e.value.charCodeAt(o));else e.type===Ir.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&(e.value.charCodeAt(1)&128)===0||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?n.putBytes(e.value.substr(1)):n.putBytes(e.value);if(t.putByte(r),n.length()<=127)t.putByte(n.length()&127);else{var a=n.length(),l="";do l+=String.fromCharCode(a&255),a=a>>>8;while(a>0);t.putByte(l.length|128);for(var o=l.length-1;o>=0;--o)t.putByte(l.charCodeAt(o))}return t.putBuffer(n),t};Ir.oidToDer=function(e){var t=e.split("."),r=bs.util.createBuffer();r.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var n,i,o,a,l=2;l<t.length;++l){n=!0,i=[],o=parseInt(t[l],10);do a=o&127,o=o>>>7,n||(a|=128),i.push(a),n=!1;while(o>0);for(var c=i.length-1;c>=0;--c)r.putByte(i[c])}return r};Ir.derToOid=function(e){var t;typeof e=="string"&&(e=bs.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var n=0;e.length()>0;)r=e.getByte(),n=n<<7,r&128?n+=r&127:(t+="."+(n+r),n=0);return t};Ir.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),l=0;if(e.length>11){var c=e.charAt(10),u=10;c!=="+"&&c!=="-"&&(l=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,l,0),u&&(c=e.charAt(u),c==="+"||c==="-")){var f=parseInt(e.substr(u+1,2),10),m=parseInt(e.substr(u+4,2),10),h=f*60+m;h*=6e4,c==="+"?t.setTime(+t-h):t.setTime(+t+h)}return t};Ir.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),l=parseInt(e.substr(12,2),10),c=0,u=0,f=!1;e.charAt(e.length-1)==="Z"&&(f=!0);var m=e.length-5,h=e.charAt(m);if(h==="+"||h==="-"){var p=parseInt(e.substr(m+1,2),10),g=parseInt(e.substr(m+4,2),10);u=p*60+g,u*=6e4,h==="+"&&(u*=-1),f=!0}return e.charAt(14)==="."&&(c=parseFloat(e.substr(14),10)*1e3),f?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,l,c),t.setTime(+t+u)):(t.setFullYear(r,n,i),t.setHours(o,a,l,c)),t};Ir.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z",t};Ir.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z",t};Ir.integerToDer=function(e){var t=bs.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r};Ir.derToInteger=function(e){typeof e=="string"&&(e=bs.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};Ir.validate=function(e,t,r,n){var i=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(i=!0,t.value&&bs.util.isArray(t.value))for(var o=0,a=0;i&&a<t.value.length;++a)i=t.value[a].optional||!1,e.value[o]&&(i=Ir.validate(e.value[o],t.value[a],r,n),i?++o:t.value[a].optional&&(i=!0)),!i&&n&&n.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(i&&r&&(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)){var l;if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{var c=e.bitStringContents.charCodeAt(0);if(c!==0)throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}}else n&&n.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else n&&(e.tagClass!==t.tagClass&&n.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&n.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return i};var _De=/[^\\u0000-\\u00ff]/;Ir.prettyPrint=function(e,t,r){var n="";t=t||0,r=r||2,t>0&&(n+=`
`);for(var i="",o=0;o<t*r;++o)i+=" ";switch(n+=i+"Tag: ",e.tagClass){case Ir.Class.UNIVERSAL:n+="Universal:";break;case Ir.Class.APPLICATION:n+="Application:";break;case Ir.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case Ir.Class.PRIVATE:n+="Private:";break}if(e.tagClass===Ir.Class.UNIVERSAL)switch(n+=e.type,e.type){case Ir.Type.NONE:n+=" (None)";break;case Ir.Type.BOOLEAN:n+=" (Boolean)";break;case Ir.Type.INTEGER:n+=" (Integer)";break;case Ir.Type.BITSTRING:n+=" (Bit string)";break;case Ir.Type.OCTETSTRING:n+=" (Octet string)";break;case Ir.Type.NULL:n+=" (Null)";break;case Ir.Type.OID:n+=" (Object Identifier)";break;case Ir.Type.ODESC:n+=" (Object Descriptor)";break;case Ir.Type.EXTERNAL:n+=" (External or Instance of)";break;case Ir.Type.REAL:n+=" (Real)";break;case Ir.Type.ENUMERATED:n+=" (Enumerated)";break;case Ir.Type.EMBEDDED:n+=" (Embedded PDV)";break;case Ir.Type.UTF8:n+=" (UTF8)";break;case Ir.Type.ROID:n+=" (Relative Object Identifier)";break;case Ir.Type.SEQUENCE:n+=" (Sequence)";break;case Ir.Type.SET:n+=" (Set)";break;case Ir.Type.PRINTABLESTRING:n+=" (Printable String)";break;case Ir.Type.IA5String:n+=" (IA5String (ASCII))";break;case Ir.Type.UTCTIME:n+=" (UTC time)";break;case Ir.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case Ir.Type.BMPSTRING:n+=" (BMP String)";break}else n+=e.type;if(n+=`
`,n+=i+"Constructed: "+e.constructed+`
`,e.composed){for(var a=0,l="",o=0;o<e.value.length;++o)e.value[o]!==void 0&&(a+=1,l+=Ir.prettyPrint(e.value[o],t+1,r),o+1<e.value.length&&(l+=","));n+=i+"Sub values: "+a+l}else{if(n+=i+"Value: ",e.type===Ir.Type.OID){var c=Ir.derToOid(e.value);n+=c,bs.pki&&bs.pki.oids&&c in bs.pki.oids&&(n+=" ("+bs.pki.oids[c]+") ")}if(e.type===Ir.Type.INTEGER)try{n+=Ir.derToInteger(e.value)}catch{n+="0x"+bs.util.bytesToHex(e.value)}else if(e.type===Ir.Type.BITSTRING){if(e.value.length>1?n+="0x"+bs.util.bytesToHex(e.value.slice(1)):n+="(none)",e.value.length>0){var u=e.value.charCodeAt(0);u==1?n+=" (1 unused bit shown)":u>1&&(n+=" ("+u+" unused bits shown)")}}else if(e.type===Ir.Type.OCTETSTRING)_De.test(e.value)||(n+="("+e.value+") "),n+="0x"+bs.util.bytesToHex(e.value);else if(e.type===Ir.Type.UTF8)try{n+=bs.util.decodeUtf8(e.value)}catch(f){if(f.message==="URI malformed")n+="0x"+bs.util.bytesToHex(e.value)+" (malformed UTF8)";else throw f}else e.type===Ir.Type.PRINTABLESTRING||e.type===Ir.Type.IA5String?n+=e.value:_De.test(e.value)?n+="0x"+bs.util.bytesToHex(e.value):e.value.length===0?n+="[null]":n+=e.value}return n}});var kg=H((J$r,RDe)=>{d();var DW=fi();RDe.exports=DW.md=DW.md||{};DW.md.algorithms=DW.md.algorithms||{}});var d9=H((Z$r,kDe)=>{d();var jA=fi();kg();lo();var EIt=kDe.exports=jA.hmac=jA.hmac||{};EIt.create=function(){var e=null,t=null,r=null,n=null,i={};return i.start=function(o,a){if(o!==null)if(typeof o=="string")if(o=o.toLowerCase(),o in jA.md.algorithms)t=jA.md.algorithms[o].create();else throw new Error('Unknown hash algorithm "'+o+'"');else t=o;if(a===null)a=e;else{if(typeof a=="string")a=jA.util.createBuffer(a);else if(jA.util.isArray(a)){var l=a;a=jA.util.createBuffer();for(var c=0;c<l.length;++c)a.putByte(l[c])}var u=a.length();u>t.blockLength&&(t.start(),t.update(a.bytes()),a=t.digest()),r=jA.util.createBuffer(),n=jA.util.createBuffer(),u=a.length();for(var c=0;c<u;++c){var l=a.at(c);r.putByte(54^l),n.putByte(92^l)}if(u<t.blockLength)for(var l=t.blockLength-u,c=0;c<l;++c)r.putByte(54),n.putByte(92);e=a,r=r.bytes(),n=n.bytes()}t.start(),t.update(r)},i.update=function(o){t.update(o)},i.getMac=function(){var o=t.digest().bytes();return t.start(),t.update(n),t.update(o),t.digest()},i.digest=i.getMac,i}});var NW=H((tzr,NDe)=>{d();var Bg=fi();kg();lo();var DDe=NDe.exports=Bg.md5=Bg.md5||{};Bg.md.md5=Bg.md.algorithms.md5=DDe;DDe.create=function(){PDe||IIt();var e=null,t=Bg.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,o=0;o<i;++o)n.fullMessageLength.push(0);return t=Bg.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n},n.start(),n.update=function(i,o){o==="utf8"&&(i=Bg.util.encodeUtf8(i));var a=i.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=a[1],a[1]=a[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(i),BDe(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var i=Bg.util.createBuffer();i.putBytes(t.bytes());var o=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=o&n.blockLength-1;i.putBytes(Lae.substr(0,n.blockLength-a));for(var l,c=0,u=n.fullMessageLength.length-1;u>=0;--u)l=n.fullMessageLength[u]*8+c,c=l/4294967296>>>0,i.putInt32Le(l>>>0);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};BDe(f,r,i);var m=Bg.util.createBuffer();return m.putInt32Le(f.h0),m.putInt32Le(f.h1),m.putInt32Le(f.h2),m.putInt32Le(f.h3),m},n};var Lae=null,PW=null,ek=null,m9=null,PDe=!1;function IIt(){Lae="\x80",Lae+=Bg.util.fillString("\0",64),PW=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],ek=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],m9=new Array(64);for(var e=0;e<64;++e)m9[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);PDe=!0}s(IIt,"_init");function BDe(e,t,r){for(var n,i,o,a,l,c,u,f,m=r.length();m>=64;){for(i=e.h0,o=e.h1,a=e.h2,l=e.h3,f=0;f<16;++f)t[f]=r.getInt32Le(),c=l^o&(a^l),n=i+c+m9[f]+t[f],u=ek[f],i=l,l=a,a=o,o+=n<<u|n>>>32-u;for(;f<32;++f)c=a^l&(o^a),n=i+c+m9[f]+t[PW[f]],u=ek[f],i=l,l=a,a=o,o+=n<<u|n>>>32-u;for(;f<48;++f)c=o^a^l,n=i+c+m9[f]+t[PW[f]],u=ek[f],i=l,l=a,a=o,o+=n<<u|n>>>32-u;for(;f<64;++f)c=a^(o|~l),n=i+c+m9[f]+t[PW[f]],u=ek[f],i=l,l=a,a=o,o+=n<<u|n>>>32-u;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+a|0,e.h3=e.h3+l|0,m-=64}}s(BDe,"_update")});var yb=H((izr,FDe)=>{d();var FW=fi();lo();var LDe=FDe.exports=FW.pem=FW.pem||{};LDe.encode=function(e,t){t=t||{};var r="-----BEGIN "+e.type+`-----\r
`,n;if(e.procType&&(n={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},r+=LW(n)),e.contentDomain&&(n={name:"Content-Domain",values:[e.contentDomain]},r+=LW(n)),e.dekInfo&&(n={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&n.values.push(e.dekInfo.parameters),r+=LW(n)),e.headers)for(var i=0;i<e.headers.length;++i)r+=LW(e.headers[i]);return e.procType&&(r+=`\r
`),r+=FW.util.encode64(e.body,t.maxline||64)+`\r
`,r+="-----END "+e.type+`-----\r
`,r};LDe.decode=function(e){for(var t=[],r=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,n=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,i=/\r?\n/,o;o=r.exec(e),!!o;){var a=o[1];a==="NEW CERTIFICATE REQUEST"&&(a="CERTIFICATE REQUEST");var l={type:a,procType:null,contentDomain:null,dekInfo:null,headers:[],body:FW.util.decode64(o[3])};if(t.push(l),!!o[2]){for(var c=o[2].split(i),u=0;o&&u<c.length;){for(var f=c[u].replace(/\s+$/,""),m=u+1;m<c.length;++m){var h=c[m];if(!/\s/.test(h[0]))break;f+=h,u=m}if(o=f.match(n),o){for(var p={name:o[1],values:[]},g=o[2].split(","),y=0;y<g.length;++y)p.values.push(TIt(g[y]));if(l.procType)if(!l.contentDomain&&p.name==="Content-Domain")l.contentDomain=g[0]||"";else if(!l.dekInfo&&p.name==="DEK-Info"){if(p.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');l.dekInfo={algorithm:g[0],parameters:g[1]||null}}else l.headers.push(p);else{if(p.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(p.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');l.procType={version:g[0],type:g[1]}}}++u}if(l.procType==="ENCRYPTED"&&!l.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function LW(e){for(var t=e.name+": ",r=[],n=s(function(c,u){return" "+u},"insertSpace"),i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+`\r
`;for(var o=0,a=-1,i=0;i<t.length;++i,++o)if(o>65&&a!==-1){var l=t[a];l===","?(++a,t=t.substr(0,a)+`\r
`+t.substr(a)):t=t.substr(0,a)+`\r
`+l+t.substr(a+1),o=i-a-1,a=-1,++i}else(t[i]===" "||t[i]===" "||t[i]===",")&&(a=i);return t}s(LW,"foldHeader");function TIt(e){return e.replace(/^\s+/,"")}s(TIt,"ltrim")});var tk=H((azr,QDe)=>{d();var Us=fi();_W();kae();lo();QDe.exports=Us.des=Us.des||{};Us.des.startEncrypting=function(e,t,r,n){var i=MW({key:e,output:r,decrypt:!1,mode:n||(t===null?"ECB":"CBC")});return i.start(t),i};Us.des.createEncryptionCipher=function(e,t){return MW({key:e,output:null,decrypt:!1,mode:t})};Us.des.startDecrypting=function(e,t,r,n){var i=MW({key:e,output:r,decrypt:!0,mode:n||(t===null?"ECB":"CBC")});return i.start(t),i};Us.des.createDecryptionCipher=function(e,t){return MW({key:e,output:null,decrypt:!0,mode:t})};Us.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:s(function(n,i){return MDe(r._keys,n,i,!1)},"encrypt"),decrypt:s(function(n,i){return MDe(r._keys,n,i,!0)},"decrypt")}}),r._init=!1};Us.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Us.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=NIt(t),this._init=!0}};Dg("DES-ECB",Us.cipher.modes.ecb);Dg("DES-CBC",Us.cipher.modes.cbc);Dg("DES-CFB",Us.cipher.modes.cfb);Dg("DES-OFB",Us.cipher.modes.ofb);Dg("DES-CTR",Us.cipher.modes.ctr);Dg("3DES-ECB",Us.cipher.modes.ecb);Dg("3DES-CBC",Us.cipher.modes.cbc);Dg("3DES-CFB",Us.cipher.modes.cfb);Dg("3DES-OFB",Us.cipher.modes.ofb);Dg("3DES-CTR",Us.cipher.modes.ctr);function Dg(e,t){var r=s(function(){return new Us.des.Algorithm(e,t)},"factory");Us.cipher.registerAlgorithm(e,r)}s(Dg,"registerAlgorithm");var wIt=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],_It=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],SIt=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],RIt=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],kIt=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],BIt=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],DIt=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],PIt=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function NIt(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],o=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],a=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],l=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],m=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],h=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],g=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length()>8?3:1,x=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],E=0,_,k=0;k<y;k++){var B=e.getInt32(),N=e.getInt32();_=(B>>>4^N)&252645135,N^=_,B^=_<<4,_=(N>>>-16^B)&65535,B^=_,N^=_<<-16,_=(B>>>2^N)&858993459,N^=_,B^=_<<2,_=(N>>>-16^B)&65535,B^=_,N^=_<<-16,_=(B>>>1^N)&1431655765,N^=_,B^=_<<1,_=(N>>>8^B)&16711935,B^=_,N^=_<<8,_=(B>>>1^N)&1431655765,N^=_,B^=_<<1,_=B<<8|N>>>20&240,B=N<<24|N<<8&16711680|N>>>8&65280|N>>>24&240,N=_;for(var M=0;M<b.length;++M){b[M]?(B=B<<2|B>>>26,N=N<<2|N>>>26):(B=B<<1|B>>>27,N=N<<1|N>>>27),B&=-15,N&=-15;var Z=t[B>>>28]|r[B>>>24&15]|n[B>>>20&15]|i[B>>>16&15]|o[B>>>12&15]|a[B>>>8&15]|l[B>>>4&15],he=c[N>>>28]|u[N>>>24&15]|f[N>>>20&15]|m[N>>>16&15]|h[N>>>12&15]|p[N>>>8&15]|g[N>>>4&15];_=(he>>>16^Z)&65535,x[E++]=Z^_,x[E++]=he^_<<16}}return x}s(NIt,"_createKeys");function MDe(e,t,r,n){var i=e.length===32?3:9,o;i===3?o=n?[30,-2,-2]:[0,32,2]:o=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var a,l=t[0],c=t[1];a=(l>>>4^c)&252645135,c^=a,l^=a<<4,a=(l>>>16^c)&65535,c^=a,l^=a<<16,a=(c>>>2^l)&858993459,l^=a,c^=a<<2,a=(c>>>8^l)&16711935,l^=a,c^=a<<8,a=(l>>>1^c)&1431655765,c^=a,l^=a<<1,l=l<<1|l>>>31,c=c<<1|c>>>31;for(var u=0;u<i;u+=3){for(var f=o[u+1],m=o[u+2],h=o[u];h!=f;h+=m){var p=c^e[h],g=(c>>>4|c<<28)^e[h+1];a=l,l=c,c=a^(_It[p>>>24&63]|RIt[p>>>16&63]|BIt[p>>>8&63]|PIt[p&63]|wIt[g>>>24&63]|SIt[g>>>16&63]|kIt[g>>>8&63]|DIt[g&63])}a=l,l=c,c=a}l=l>>>1|l<<31,c=c>>>1|c<<31,a=(l>>>1^c)&1431655765,c^=a,l^=a<<1,a=(c>>>8^l)&16711935,l^=a,c^=a<<8,a=(c>>>2^l)&858993459,l^=a,c^=a<<2,a=(l>>>16^c)&65535,c^=a,l^=a<<16,a=(l>>>4^c)&252645135,c^=a,l^=a<<4,r[0]=l,r[1]=c}s(MDe,"_updateBlock");function MW(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="DES-"+t,n;e.decrypt?n=Us.cipher.createDecipher(r,e.key):n=Us.cipher.createCipher(r,e.key);var i=n.start;return n.start=function(o,a){var l=null;a instanceof Us.util.ByteBuffer&&(l=a,a={}),a=a||{},a.output=l,a.iv=o,i.call(n,a)},n}s(MW,"_createCipher")});var QW=H((uzr,ODe)=>{d();var k0=fi();d9();kg();lo();var LIt=k0.pkcs5=k0.pkcs5||{},VA;k0.util.isNodejs&&!k0.options.usePureJavaScript&&(VA=require("crypto"));ODe.exports=k0.pbkdf2=LIt.pbkdf2=function(e,t,r,n,i,o){if(typeof i=="function"&&(o=i,i=null),k0.util.isNodejs&&!k0.options.usePureJavaScript&&VA.pbkdf2&&(i===null||typeof i!="object")&&(VA.pbkdf2Sync.length>4||!i||i==="sha1"))return typeof i!="string"&&(i="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),o?VA.pbkdf2Sync.length===4?VA.pbkdf2(e,t,r,n,function(_,k){if(_)return o(_);o(null,k.toString("binary"))}):VA.pbkdf2(e,t,r,n,i,function(_,k){if(_)return o(_);o(null,k.toString("binary"))}):VA.pbkdf2Sync.length===4?VA.pbkdf2Sync(e,t,r,n).toString("binary"):VA.pbkdf2Sync(e,t,r,n,i).toString("binary");if((typeof i>"u"||i===null)&&(i="sha1"),typeof i=="string"){if(!(i in k0.md.algorithms))throw new Error("Unknown hash algorithm: "+i);i=k0.md[i].create()}var a=i.digestLength;if(n>4294967295*a){var l=new Error("Derived key is too long.");if(o)return o(l);throw l}var c=Math.ceil(n/a),u=n-(c-1)*a,f=k0.hmac.create();f.start(i,e);var m="",h,p,g;if(!o){for(var y=1;y<=c;++y){f.start(null,null),f.update(t),f.update(k0.util.int32ToBytes(y)),h=g=f.digest().getBytes();for(var x=2;x<=r;++x)f.start(null,null),f.update(g),p=f.digest().getBytes(),h=k0.util.xorBytes(h,p,a),g=p;m+=y<c?h:h.substr(0,u)}return m}var y=1,x;function b(){if(y>c)return o(null,m);f.start(null,null),f.update(t),f.update(k0.util.int32ToBytes(y)),h=g=f.digest().getBytes(),x=2,E()}s(b,"outer");function E(){if(x<=r)return f.start(null,null),f.update(g),p=f.digest().getBytes(),h=k0.util.xorBytes(h,p,a),g=p,++x,k0.util.setImmediate(E);m+=y<c?h:h.substr(0,u),++y,b()}s(E,"inner"),b()}});var Mae=H((mzr,HDe)=>{d();var Pg=fi();kg();lo();var qDe=HDe.exports=Pg.sha256=Pg.sha256||{};Pg.md.sha256=Pg.md.algorithms.sha256=qDe;qDe.create=function(){WDe||FIt();var e=null,t=Pg.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,o=0;o<i;++o)n.fullMessageLength.push(0);return t=Pg.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(i,o){o==="utf8"&&(i=Pg.util.encodeUtf8(i));var a=i.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=a[1],a[1]=a[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(i),UDe(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var i=Pg.util.createBuffer();i.putBytes(t.bytes());var o=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=o&n.blockLength-1;i.putBytes(Fae.substr(0,n.blockLength-a));for(var l,c,u=n.fullMessageLength[0]*8,f=0;f<n.fullMessageLength.length-1;++f)l=n.fullMessageLength[f+1]*8,c=l/4294967296>>>0,u+=c,i.putInt32(u>>>0),u=l>>>0;i.putInt32(u);var m={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};UDe(m,r,i);var h=Pg.util.createBuffer();return h.putInt32(m.h0),h.putInt32(m.h1),h.putInt32(m.h2),h.putInt32(m.h3),h.putInt32(m.h4),h.putInt32(m.h5),h.putInt32(m.h6),h.putInt32(m.h7),h},n};var Fae=null,WDe=!1,GDe=null;function FIt(){Fae="\x80",Fae+=Pg.util.fillString("\0",64),GDe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],WDe=!0}s(FIt,"_init");function UDe(e,t,r){for(var n,i,o,a,l,c,u,f,m,h,p,g,y,x,b,E=r.length();E>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=t[u-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=t[u-15],i=(i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0;for(f=e.h0,m=e.h1,h=e.h2,p=e.h3,g=e.h4,y=e.h5,x=e.h6,b=e.h7,u=0;u<64;++u)a=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),l=x^g&(y^x),o=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),c=f&m|h&(f^m),n=b+a+l+GDe[u]+t[u],i=o+c,b=x,x=y,y=g,g=p+n>>>0,p=h,h=m,m=f,f=n+i>>>0;e.h0=e.h0+f|0,e.h1=e.h1+m|0,e.h2=e.h2+h|0,e.h3=e.h3+p|0,e.h4=e.h4+g|0,e.h5=e.h5+y|0,e.h6=e.h6+x|0,e.h7=e.h7+b|0,E-=64}}s(UDe,"_update")});var Qae=H((gzr,jDe)=>{d();var Ng=fi();lo();var OW=null;Ng.util.isNodejs&&!Ng.options.usePureJavaScript&&!process.versions["node-webkit"]&&(OW=require("crypto"));var MIt=jDe.exports=Ng.prng=Ng.prng||{};MIt.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,n=new Array(32),i=0;i<32;++i)n[i]=r.create();t.pools=n,t.pool=0,t.generate=function(u,f){if(!f)return t.generateSync(u);var m=t.plugin.cipher,h=t.plugin.increment,p=t.plugin.formatKey,g=t.plugin.formatSeed,y=Ng.util.createBuffer();t.key=null,x();function x(b){if(b)return f(b);if(y.length()>=u)return f(null,y.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Ng.util.nextTick(function(){o(x)});var E=m(t.key,t.seed);t.generated+=E.length,y.putBytes(E),t.key=p(m(t.key,h(t.seed))),t.seed=g(m(t.key,t.seed)),Ng.util.setImmediate(x)}s(x,"generate")},t.generateSync=function(u){var f=t.plugin.cipher,m=t.plugin.increment,h=t.plugin.formatKey,p=t.plugin.formatSeed;t.key=null;for(var g=Ng.util.createBuffer();g.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&a();var y=f(t.key,t.seed);t.generated+=y.length,g.putBytes(y),t.key=h(f(t.key,m(t.seed))),t.seed=p(f(t.key,t.seed))}return g.getBytes(u)};function o(u){if(t.pools[0].messageLength>=32)return l(),u();var f=32-t.pools[0].messageLength<<5;t.seedFile(f,function(m,h){if(m)return u(m);t.collect(h),l(),u()})}s(o,"_reseed");function a(){if(t.pools[0].messageLength>=32)return l();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),l()}s(a,"_reseedSync");function l(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var f=1,m=0;m<32;++m)t.reseeds%f===0&&(u.update(t.pools[m].digest().getBytes()),t.pools[m].start()),f=f<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var h=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(h),t.generated=0}s(l,"_seed");function c(u){var f=null,m=Ng.util.globalScope,h=m.crypto||m.msCrypto;h&&h.getRandomValues&&(f=s(function(B){return h.getRandomValues(B)},"getRandomValues"));var p=Ng.util.createBuffer();if(f)for(;p.length()<u;){var g=Math.max(1,Math.min(u-p.length(),65536)/4),y=new Uint32Array(Math.floor(g));try{f(y);for(var x=0;x<y.length;++x)p.putInt32(y[x])}catch(B){if(!(typeof QuotaExceededError<"u"&&B instanceof QuotaExceededError))throw B}}if(p.length()<u)for(var b,E,_,k=Math.floor(Math.random()*65536);p.length()<u;){E=16807*(k&65535),b=16807*(k>>16),E+=(b&32767)<<16,E+=b>>15,E=(E&2147483647)+(E>>31),k=E&4294967295;for(var x=0;x<3;++x)_=k>>>(x<<3),_^=Math.floor(Math.random()*256),p.putByte(_&255)}return p.getBytes(u)}return s(c,"defaultSeedFile"),OW?(t.seedFile=function(u,f){OW.randomBytes(u,function(m,h){if(m)return f(m);f(null,h.toString())})},t.seedFileSync=function(u){return OW.randomBytes(u).toString()}):(t.seedFile=function(u,f){try{f(null,c(u))}catch(m){f(m)}},t.seedFileSync=c),t.collect=function(u){for(var f=u.length,m=0;m<f;++m)t.pools[t.pool].update(u.substr(m,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,f){for(var m="",h=0;h<f;h+=8)m+=String.fromCharCode(u>>h&255);t.collect(m)},t.registerWorker=function(u){if(u===self)t.seedFile=function(m,h){function p(g){var y=g.data;y.forge&&y.forge.prng&&(self.removeEventListener("message",p),h(y.forge.prng.err,y.forge.prng.bytes))}s(p,"listener"),self.addEventListener("message",p),self.postMessage({forge:{prng:{needed:m}}})};else{var f=s(function(m){var h=m.data;h.forge&&h.forge.prng&&t.seedFile(h.forge.prng.needed,function(p,g){u.postMessage({forge:{prng:{err:p,bytes:g}}})})},"listener");u.addEventListener("message",f)}},t}});var nm=H((Czr,Oae)=>{d();var Ql=fi();EC();Mae();Qae();lo();(function(){if(Ql.random&&Ql.random.getBytes){Oae.exports=Ql.random;return}(function(e){var t={},r=new Array(4),n=Ql.util.createBuffer();t.formatKey=function(m){var h=Ql.util.createBuffer(m);return m=new Array(4),m[0]=h.getInt32(),m[1]=h.getInt32(),m[2]=h.getInt32(),m[3]=h.getInt32(),Ql.aes._expandKey(m,!1)},t.formatSeed=function(m){var h=Ql.util.createBuffer(m);return m=new Array(4),m[0]=h.getInt32(),m[1]=h.getInt32(),m[2]=h.getInt32(),m[3]=h.getInt32(),m},t.cipher=function(m,h){return Ql.aes._updateBlock(m,h,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},t.increment=function(m){return++m[3],m},t.md=Ql.md.sha256;function i(){var m=Ql.prng.create(t);return m.getBytes=function(h,p){return m.generate(h,p)},m.getBytesSync=function(h){return m.generate(h)},m}s(i,"spawnPrng");var o=i(),a=null,l=Ql.util.globalScope,c=l.crypto||l.msCrypto;if(c&&c.getRandomValues&&(a=s(function(m){return c.getRandomValues(m)},"getRandomValues")),Ql.options.usePureJavaScript||!Ql.util.isNodejs&&!a){if(typeof window>"u"||window.document,o.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var f in navigator)try{typeof navigator[f]=="string"&&(u+=navigator[f])}catch{}o.collect(u),u=null}e&&(e().mousemove(function(m){o.collectInt(m.clientX,16),o.collectInt(m.clientY,16)}),e().keypress(function(m){o.collectInt(m.charCode,8)}))}if(!Ql.random)Ql.random=o;else for(var f in o)Ql.random[f]=o[f];Ql.random.createInstance=i,Oae.exports=Ql.random})(typeof jQuery<"u"?jQuery:null)})()});var qae=H((bzr,zDe)=>{d();var bu=fi();lo();var Uae=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],VDe=[1,2,3,5],QIt=s(function(e,t){return e<<t&65535|(e&65535)>>16-t},"rol"),OIt=s(function(e,t){return(e&65535)>>t|e<<16-t&65535},"ror");zDe.exports=bu.rc2=bu.rc2||{};bu.rc2.expandKey=function(e,t){typeof e=="string"&&(e=bu.util.createBuffer(e)),t=t||128;var r=e,n=e.length(),i=t,o=Math.ceil(i/8),a=255>>(i&7),l;for(l=n;l<128;l++)r.putByte(Uae[r.at(l-1)+r.at(l-n)&255]);for(r.setAt(128-o,Uae[r.at(128-o)&a]),l=127-o;l>=0;l--)r.setAt(l,Uae[r.at(l+1)^r.at(l+o)]);return r};var $De=s(function(e,t,r){var n=!1,i=null,o=null,a=null,l,c,u,f,m=[];for(e=bu.rc2.expandKey(e,t),u=0;u<64;u++)m.push(e.getInt16Le());r?(l=s(function(g){for(u=0;u<4;u++)g[u]+=m[f]+(g[(u+3)%4]&g[(u+2)%4])+(~g[(u+3)%4]&g[(u+1)%4]),g[u]=QIt(g[u],VDe[u]),f++},"mixRound"),c=s(function(g){for(u=0;u<4;u++)g[u]+=m[g[(u+3)%4]&63]},"mashRound")):(l=s(function(g){for(u=3;u>=0;u--)g[u]=OIt(g[u],VDe[u]),g[u]-=m[f]+(g[(u+3)%4]&g[(u+2)%4])+(~g[(u+3)%4]&g[(u+1)%4]),f--},"mixRound"),c=s(function(g){for(u=3;u>=0;u--)g[u]-=m[g[(u+3)%4]&63]},"mashRound"));var h=s(function(g){var y=[];for(u=0;u<4;u++){var x=i.getInt16Le();a!==null&&(r?x^=a.getInt16Le():a.putInt16Le(x)),y.push(x&65535)}f=r?0:63;for(var b=0;b<g.length;b++)for(var E=0;E<g[b][0];E++)g[b][1](y);for(u=0;u<4;u++)a!==null&&(r?a.putInt16Le(y[u]):y[u]^=a.getInt16Le()),o.putInt16Le(y[u])},"runPlan"),p=null;return p={start:s(function(g,y){g&&typeof g=="string"&&(g=bu.util.createBuffer(g)),n=!1,i=bu.util.createBuffer(),o=y||new bu.util.createBuffer,a=g,p.output=o},"start"),update:s(function(g){for(n||i.putBuffer(g);i.length()>=8;)h([[5,l],[1,c],[6,l],[1,c],[5,l]])},"update"),finish:s(function(g){var y=!0;if(r)if(g)y=g(8,i,!r);else{var x=i.length()===8?8:8-i.length();i.fillWithByte(x,x)}if(y&&(n=!0,p.update()),!r&&(y=i.length()===0,y))if(g)y=g(8,o,!r);else{var b=o.length(),E=o.at(b-1);E>b?y=!1:o.truncate(E)}return y},"finish")},p},"createCipher");bu.rc2.startEncrypting=function(e,t,r){var n=bu.rc2.createEncryptionCipher(e,128);return n.start(t,r),n};bu.rc2.createEncryptionCipher=function(e,t){return $De(e,t,!0)};bu.rc2.startDecrypting=function(e,t,r){var n=bu.rc2.createDecryptionCipher(e,128);return n.start(t,r),n};bu.rc2.createDecryptionCipher=function(e,t){return $De(e,t,!1)}});var nk=H((Tzr,rPe)=>{d();var Wae=fi();rPe.exports=Wae.jsbn=Wae.jsbn||{};var $A,UIt=0xdeadbeefcafe,YDe=(UIt&16777215)==15715070;function Bt(e,t,r){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}s(Bt,"BigInteger");Wae.jsbn.BigInteger=Bt;function co(){return new Bt(null)}s(co,"nbi");function qIt(e,t,r,n,i,o){for(;--o>=0;){var a=t*this.data[e++]+r.data[n]+i;i=Math.floor(a/67108864),r.data[n++]=a&67108863}return i}s(qIt,"am1");function WIt(e,t,r,n,i,o){for(var a=t&32767,l=t>>15;--o>=0;){var c=this.data[e]&32767,u=this.data[e++]>>15,f=l*c+u*a;c=a*c+((f&32767)<<15)+r.data[n]+(i&1073741823),i=(c>>>30)+(f>>>15)+l*u+(i>>>30),r.data[n++]=c&1073741823}return i}s(WIt,"am2");function KDe(e,t,r,n,i,o){for(var a=t&16383,l=t>>14;--o>=0;){var c=this.data[e]&16383,u=this.data[e++]>>14,f=l*c+u*a;c=a*c+((f&16383)<<14)+r.data[n]+i,i=(c>>28)+(f>>14)+l*u,r.data[n++]=c&268435455}return i}s(KDe,"am3");typeof navigator>"u"?(Bt.prototype.am=KDe,$A=28):YDe&&navigator.appName=="Microsoft Internet Explorer"?(Bt.prototype.am=WIt,$A=30):YDe&&navigator.appName!="Netscape"?(Bt.prototype.am=qIt,$A=26):(Bt.prototype.am=KDe,$A=28);Bt.prototype.DB=$A;Bt.prototype.DM=(1<<$A)-1;Bt.prototype.DV=1<<$A;var Gae=52;Bt.prototype.FV=Math.pow(2,Gae);Bt.prototype.F1=Gae-$A;Bt.prototype.F2=2*$A-Gae;var GIt="0123456789abcdefghijklmnopqrstuvwxyz",UW=new Array,h9,im;h9=48;for(im=0;im<=9;++im)UW[h9++]=im;h9=97;for(im=10;im<36;++im)UW[h9++]=im;h9=65;for(im=10;im<36;++im)UW[h9++]=im;function JDe(e){return GIt.charAt(e)}s(JDe,"int2char");function XDe(e,t){var r=UW[e.charCodeAt(t)];return r??-1}s(XDe,"intAt");function HIt(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}s(HIt,"bnpCopyTo");function jIt(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}s(jIt,"bnpFromInt");function TC(e){var t=co();return t.fromInt(e),t}s(TC,"nbv");function VIt(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var a=r==8?e[n]&255:XDe(e,n);if(a<0){e.charAt(n)=="-"&&(i=!0);continue}i=!1,o==0?this.data[this.t++]=a:o+r>this.DB?(this.data[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this.data[this.t++]=a>>this.DB-o):this.data[this.t-1]|=a<<o,o+=r,o>=this.DB&&(o-=this.DB)}r==8&&(e[0]&128)!=0&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&Bt.ZERO.subTo(this,this)}s(VIt,"bnpFromString");function $It(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}s($It,"bnpClamp");function zIt(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,n,i=!1,o="",a=this.t,l=this.DB-a*this.DB%t;if(a-- >0)for(l<this.DB&&(n=this.data[a]>>l)>0&&(i=!0,o=JDe(n));a>=0;)l<t?(n=(this.data[a]&(1<<l)-1)<<t-l,n|=this.data[--a]>>(l+=this.DB-t)):(n=this.data[a]>>(l-=t)&r,l<=0&&(l+=this.DB,--a)),n>0&&(i=!0),i&&(o+=JDe(n));return i?o:"0"}s(zIt,"bnToString");function YIt(){var e=co();return Bt.ZERO.subTo(this,e),e}s(YIt,"bnNegate");function KIt(){return this.s<0?this.negate():this}s(KIt,"bnAbs");function JIt(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this.data[r]-e.data[r])!=0)return t;return 0}s(JIt,"bnCompareTo");function qW(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}s(qW,"nbits");function XIt(){return this.t<=0?0:this.DB*(this.t-1)+qW(this.data[this.t-1]^this.s&this.DM)}s(XIt,"bnBitLength");function ZIt(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s}s(ZIt,"bnpDLShiftTo");function e8t(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s}s(e8t,"bnpDRShiftTo");function t8t(e,t){var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,o=Math.floor(e/this.DB),a=this.s<<r&this.DM,l;for(l=this.t-1;l>=0;--l)t.data[l+o+1]=this.data[l]>>n|a,a=(this.data[l]&i)<<r;for(l=o-1;l>=0;--l)t.data[l]=0;t.data[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()}s(t8t,"bnpLShiftTo");function r8t(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var a=r+1;a<this.t;++a)t.data[a-r-1]|=(this.data[a]&o)<<i,t.data[a-r]=this.data[a]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}s(r8t,"bnpRShiftTo");function n8t(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()}s(n8t,"bnpSubTo");function i8t(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&Bt.ZERO.subTo(t,t)}s(i8t,"bnpMultiplyTo");function o8t(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()}s(o8t,"bnpSquareTo");function s8t(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t){t?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=co());var o=co(),a=this.s,l=e.s,c=this.DB-qW(n.data[n.t-1]);c>0?(n.lShiftTo(c,o),i.lShiftTo(c,r)):(n.copyTo(o),i.copyTo(r));var u=o.t,f=o.data[u-1];if(f!=0){var m=f*(1<<this.F1)+(u>1?o.data[u-2]>>this.F2:0),h=this.FV/m,p=(1<<this.F1)/m,g=1<<this.F2,y=r.t,x=y-u,b=t??co();for(o.dlShiftTo(x,b),r.compareTo(b)>=0&&(r.data[r.t++]=1,r.subTo(b,r)),Bt.ONE.dlShiftTo(u,b),b.subTo(o,o);o.t<u;)o.data[o.t++]=0;for(;--x>=0;){var E=r.data[--y]==f?this.DM:Math.floor(r.data[y]*h+(r.data[y-1]+g)*p);if((r.data[y]+=o.am(0,E,r,x,0,u))<E)for(o.dlShiftTo(x,b),r.subTo(b,r);r.data[y]<--E;)r.subTo(b,r)}t!=null&&(r.drShiftTo(u,t),a!=l&&Bt.ZERO.subTo(t,t)),r.t=u,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&Bt.ZERO.subTo(r,r)}}}s(s8t,"bnpDivRemTo");function a8t(e){var t=co();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Bt.ZERO)>0&&e.subTo(t,t),t}s(a8t,"bnMod");function Cb(e){this.m=e}s(Cb,"Classic");function l8t(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}s(l8t,"cConvert");function c8t(e){return e}s(c8t,"cRevert");function u8t(e){e.divRemTo(this.m,null,e)}s(u8t,"cReduce");function f8t(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(f8t,"cMulTo");function d8t(e,t){e.squareTo(t),this.reduce(t)}s(d8t,"cSqrTo");Cb.prototype.convert=l8t;Cb.prototype.revert=c8t;Cb.prototype.reduce=u8t;Cb.prototype.mulTo=f8t;Cb.prototype.sqrTo=d8t;function m8t(){if(this.t<1)return 0;var e=this.data[0];if((e&1)==0)return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}s(m8t,"bnpInvDigit");function xb(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}s(xb,"Montgomery");function h8t(e){var t=co();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Bt.ZERO)>0&&this.m.subTo(t,t),t}s(h8t,"montConvert");function p8t(e){var t=co();return e.copyTo(t),this.reduce(t),t}s(p8t,"montRevert");function g8t(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e.data[t]&32767,n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}s(g8t,"montReduce");function A8t(e,t){e.squareTo(t),this.reduce(t)}s(A8t,"montSqrTo");function y8t(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(y8t,"montMulTo");xb.prototype.convert=h8t;xb.prototype.revert=p8t;xb.prototype.reduce=g8t;xb.prototype.mulTo=y8t;xb.prototype.sqrTo=A8t;function C8t(){return(this.t>0?this.data[0]&1:this.s)==0}s(C8t,"bnpIsEven");function x8t(e,t){if(e>4294967295||e<1)return Bt.ONE;var r=co(),n=co(),i=t.convert(this),o=qW(e)-1;for(i.copyTo(r);--o>=0;)if(t.sqrTo(r,n),(e&1<<o)>0)t.mulTo(n,i,r);else{var a=r;r=n,n=a}return t.revert(r)}s(x8t,"bnpExp");function v8t(e,t){var r;return e<256||t.isEven()?r=new Cb(t):r=new xb(t),this.exp(e,r)}s(v8t,"bnModPowInt");Bt.prototype.copyTo=HIt;Bt.prototype.fromInt=jIt;Bt.prototype.fromString=VIt;Bt.prototype.clamp=$It;Bt.prototype.dlShiftTo=ZIt;Bt.prototype.drShiftTo=e8t;Bt.prototype.lShiftTo=t8t;Bt.prototype.rShiftTo=r8t;Bt.prototype.subTo=n8t;Bt.prototype.multiplyTo=i8t;Bt.prototype.squareTo=o8t;Bt.prototype.divRemTo=s8t;Bt.prototype.invDigit=m8t;Bt.prototype.isEven=C8t;Bt.prototype.exp=x8t;Bt.prototype.toString=zIt;Bt.prototype.negate=YIt;Bt.prototype.abs=KIt;Bt.prototype.compareTo=JIt;Bt.prototype.bitLength=XIt;Bt.prototype.mod=a8t;Bt.prototype.modPowInt=v8t;Bt.ZERO=TC(0);Bt.ONE=TC(1);function b8t(){var e=co();return this.copyTo(e),e}s(b8t,"bnClone");function E8t(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}s(E8t,"bnIntValue");function I8t(){return this.t==0?this.s:this.data[0]<<24>>24}s(I8t,"bnByteValue");function T8t(){return this.t==0?this.s:this.data[0]<<16>>16}s(T8t,"bnShortValue");function w8t(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}s(w8t,"bnpChunkSize");function _8t(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}s(_8t,"bnSigNum");function S8t(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=TC(r),i=co(),o=co(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a}s(S8t,"bnpToRadix");function R8t(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,o=0,a=0,l=0;l<e.length;++l){var c=XDe(e,l);if(c<0){e.charAt(l)=="-"&&this.signum()==0&&(i=!0);continue}a=t*a+c,++o>=r&&(this.dMultiply(n),this.dAddOffset(a,0),o=0,a=0)}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),i&&Bt.ZERO.subTo(this,this)}s(R8t,"bnpFromRadix");function k8t(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(Bt.ONE.shiftLeft(e-1),Hae,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(Bt.ONE.shiftLeft(e-1),this);else{var n=new Array,i=e&7;n.length=(e>>3)+1,t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}}s(k8t,"bnpFromNumber");function B8t(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,n,i=0;if(e-- >0)for(r<this.DB&&(n=this.data[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this.data[e]&(1<<r)-1)<<8-r,n|=this.data[--e]>>(r+=this.DB-8)):(n=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),(n&128)!=0&&(n|=-256),i==0&&(this.s&128)!=(n&128)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t}s(B8t,"bnToByteArray");function D8t(e){return this.compareTo(e)==0}s(D8t,"bnEquals");function P8t(e){return this.compareTo(e)<0?this:e}s(P8t,"bnMin");function N8t(e){return this.compareTo(e)>0?this:e}s(N8t,"bnMax");function L8t(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}s(L8t,"bnpBitwiseTo");function F8t(e,t){return e&t}s(F8t,"op_and");function M8t(e){var t=co();return this.bitwiseTo(e,F8t,t),t}s(M8t,"bnAnd");function Hae(e,t){return e|t}s(Hae,"op_or");function Q8t(e){var t=co();return this.bitwiseTo(e,Hae,t),t}s(Q8t,"bnOr");function ZDe(e,t){return e^t}s(ZDe,"op_xor");function O8t(e){var t=co();return this.bitwiseTo(e,ZDe,t),t}s(O8t,"bnXor");function ePe(e,t){return e&~t}s(ePe,"op_andnot");function U8t(e){var t=co();return this.bitwiseTo(e,ePe,t),t}s(U8t,"bnAndNot");function q8t(){for(var e=co(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}s(q8t,"bnNot");function W8t(e){var t=co();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}s(W8t,"bnShiftLeft");function G8t(e){var t=co();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}s(G8t,"bnShiftRight");function H8t(e){if(e==0)return-1;var t=0;return(e&65535)==0&&(e>>=16,t+=16),(e&255)==0&&(e>>=8,t+=8),(e&15)==0&&(e>>=4,t+=4),(e&3)==0&&(e>>=2,t+=2),(e&1)==0&&++t,t}s(H8t,"lbit");function j8t(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+H8t(this.data[e]);return this.s<0?this.t*this.DB:-1}s(j8t,"bnGetLowestSetBit");function V8t(e){for(var t=0;e!=0;)e&=e-1,++t;return t}s(V8t,"cbit");function $8t(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=V8t(this.data[r]^t);return e}s($8t,"bnBitCount");function z8t(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}s(z8t,"bnTestBit");function Y8t(e,t){var r=Bt.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}s(Y8t,"bnpChangeBit");function K8t(e){return this.changeBit(e,Hae)}s(K8t,"bnSetBit");function J8t(e){return this.changeBit(e,ePe)}s(J8t,"bnClearBit");function X8t(e){return this.changeBit(e,ZDe)}s(X8t,"bnFlipBit");function Z8t(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()}s(Z8t,"bnpAddTo");function e6t(e){var t=co();return this.addTo(e,t),t}s(e6t,"bnAdd");function t6t(e){var t=co();return this.subTo(e,t),t}s(t6t,"bnSubtract");function r6t(e){var t=co();return this.multiplyTo(e,t),t}s(r6t,"bnMultiply");function n6t(e){var t=co();return this.divRemTo(e,t,null),t}s(n6t,"bnDivide");function i6t(e){var t=co();return this.divRemTo(e,null,t),t}s(i6t,"bnRemainder");function o6t(e){var t=co(),r=co();return this.divRemTo(e,t,r),new Array(t,r)}s(o6t,"bnDivideAndRemainder");function s6t(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}s(s6t,"bnpDMultiply");function a6t(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}s(a6t,"bnpDAddOffset");function rk(){}s(rk,"NullExp");function tPe(e){return e}s(tPe,"nNop");function l6t(e,t,r){e.multiplyTo(t,r)}s(l6t,"nMulTo");function c6t(e,t){e.squareTo(t)}s(c6t,"nSqrTo");rk.prototype.convert=tPe;rk.prototype.revert=tPe;rk.prototype.mulTo=l6t;rk.prototype.sqrTo=c6t;function u6t(e){return this.exp(e,new rk)}s(u6t,"bnPow");function f6t(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r.data[n+this.t]=this.am(0,e.data[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e.data[n],r,n,0,t-n);r.clamp()}s(f6t,"bnpMultiplyLowerTo");function d6t(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)}s(d6t,"bnpMultiplyUpperTo");function p9(e){this.r2=co(),this.q3=co(),Bt.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}s(p9,"Barrett");function m6t(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=co();return e.copyTo(t),this.reduce(t),t}s(m6t,"barrettConvert");function h6t(e){return e}s(h6t,"barrettRevert");function p6t(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}s(p6t,"barrettReduce");function g6t(e,t){e.squareTo(t),this.reduce(t)}s(g6t,"barrettSqrTo");function A6t(e,t,r){e.multiplyTo(t,r),this.reduce(r)}s(A6t,"barrettMulTo");p9.prototype.convert=m6t;p9.prototype.revert=h6t;p9.prototype.reduce=p6t;p9.prototype.mulTo=A6t;p9.prototype.sqrTo=g6t;function y6t(e,t){var r=e.bitLength(),n,i=TC(1),o;if(r<=0)return i;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?o=new Cb(t):t.isEven()?o=new p9(t):o=new xb(t);var a=new Array,l=3,c=n-1,u=(1<<n)-1;if(a[1]=o.convert(this),n>1){var f=co();for(o.sqrTo(a[1],f);l<=u;)a[l]=co(),o.mulTo(f,a[l-2],a[l]),l+=2}var m=e.t-1,h,p=!0,g=co(),y;for(r=qW(e.data[m])-1;m>=0;){for(r>=c?h=e.data[m]>>r-c&u:(h=(e.data[m]&(1<<r+1)-1)<<c-r,m>0&&(h|=e.data[m-1]>>this.DB+r-c)),l=n;(h&1)==0;)h>>=1,--l;if((r-=l)<0&&(r+=this.DB,--m),p)a[h].copyTo(i),p=!1;else{for(;l>1;)o.sqrTo(i,g),o.sqrTo(g,i),l-=2;l>0?o.sqrTo(i,g):(y=i,i=g,g=y),o.mulTo(g,a[h],i)}for(;m>=0&&(e.data[m]&1<<r)==0;)o.sqrTo(i,g),y=i,i=g,g=y,--r<0&&(r=this.DB-1,--m)}return o.revert(i)}s(y6t,"bnModPow");function C6t(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}s(C6t,"bnGCD");function x6t(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r}s(x6t,"bnpModInt");function v6t(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return Bt.ZERO;for(var r=e.clone(),n=this.clone(),i=TC(1),o=TC(0),a=TC(0),l=TC(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!i.isEven()||!o.isEven())&&(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),t?((!a.isEven()||!l.isEven())&&(a.addTo(this,a),l.subTo(e,l)),a.rShiftTo(1,a)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(a,i),o.subTo(l,o)):(n.subTo(r,n),t&&a.subTo(i,a),l.subTo(o,l))}if(n.compareTo(Bt.ONE)!=0)return Bt.ZERO;if(l.compareTo(e)>=0)return l.subtract(e);if(l.signum()<0)l.addTo(e,l);else return l;return l.signum()<0?l.add(e):l}s(v6t,"bnModInverse");var Qh=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],b6t=(1<<26)/Qh[Qh.length-1];function E6t(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=Qh[Qh.length-1]){for(t=0;t<Qh.length;++t)if(r.data[0]==Qh[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Qh.length;){for(var n=Qh[t],i=t+1;i<Qh.length&&n<b6t;)n*=Qh[i++];for(n=r.modInt(n);t<i;)if(n%Qh[t++]==0)return!1}return r.millerRabin(e)}s(E6t,"bnIsProbablePrime");function I6t(e){var t=this.subtract(Bt.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n=t.shiftRight(r),i=T6t(),o,a=0;a<e;++a){do o=new Bt(this.bitLength(),i);while(o.compareTo(Bt.ONE)<=0||o.compareTo(t)>=0);var l=o.modPow(n,this);if(l.compareTo(Bt.ONE)!=0&&l.compareTo(t)!=0){for(var c=1;c++<r&&l.compareTo(t)!=0;)if(l=l.modPowInt(2,this),l.compareTo(Bt.ONE)==0)return!1;if(l.compareTo(t)!=0)return!1}}return!0}s(I6t,"bnpMillerRabin");function T6t(){return{nextBytes:s(function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)},"nextBytes")}}s(T6t,"bnGetPrng");Bt.prototype.chunkSize=w8t;Bt.prototype.toRadix=S8t;Bt.prototype.fromRadix=R8t;Bt.prototype.fromNumber=k8t;Bt.prototype.bitwiseTo=L8t;Bt.prototype.changeBit=Y8t;Bt.prototype.addTo=Z8t;Bt.prototype.dMultiply=s6t;Bt.prototype.dAddOffset=a6t;Bt.prototype.multiplyLowerTo=f6t;Bt.prototype.multiplyUpperTo=d6t;Bt.prototype.modInt=x6t;Bt.prototype.millerRabin=I6t;Bt.prototype.clone=b8t;Bt.prototype.intValue=E8t;Bt.prototype.byteValue=I8t;Bt.prototype.shortValue=T8t;Bt.prototype.signum=_8t;Bt.prototype.toByteArray=B8t;Bt.prototype.equals=D8t;Bt.prototype.min=P8t;Bt.prototype.max=N8t;Bt.prototype.and=M8t;Bt.prototype.or=Q8t;Bt.prototype.xor=O8t;Bt.prototype.andNot=U8t;Bt.prototype.not=q8t;Bt.prototype.shiftLeft=W8t;Bt.prototype.shiftRight=G8t;Bt.prototype.getLowestSetBit=j8t;Bt.prototype.bitCount=$8t;Bt.prototype.testBit=z8t;Bt.prototype.setBit=K8t;Bt.prototype.clearBit=J8t;Bt.prototype.flipBit=X8t;Bt.prototype.add=e6t;Bt.prototype.subtract=t6t;Bt.prototype.multiply=r6t;Bt.prototype.divide=n6t;Bt.prototype.remainder=i6t;Bt.prototype.divideAndRemainder=o6t;Bt.prototype.modPow=y6t;Bt.prototype.modInverse=v6t;Bt.prototype.pow=u6t;Bt.prototype.gcd=C6t;Bt.prototype.isProbablePrime=E6t});var g9=H((Szr,sPe)=>{d();var Lg=fi();kg();lo();var iPe=sPe.exports=Lg.sha1=Lg.sha1||{};Lg.md.sha1=Lg.md.algorithms.sha1=iPe;iPe.create=function(){oPe||w6t();var e=null,t=Lg.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,o=0;o<i;++o)n.fullMessageLength.push(0);return t=Lg.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(i,o){o==="utf8"&&(i=Lg.util.encodeUtf8(i));var a=i.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=a[1],a[1]=a[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(i),nPe(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var i=Lg.util.createBuffer();i.putBytes(t.bytes());var o=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=o&n.blockLength-1;i.putBytes(jae.substr(0,n.blockLength-a));for(var l,c,u=n.fullMessageLength[0]*8,f=0;f<n.fullMessageLength.length-1;++f)l=n.fullMessageLength[f+1]*8,c=l/4294967296>>>0,u+=c,i.putInt32(u>>>0),u=l>>>0;i.putInt32(u);var m={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};nPe(m,r,i);var h=Lg.util.createBuffer();return h.putInt32(m.h0),h.putInt32(m.h1),h.putInt32(m.h2),h.putInt32(m.h3),h.putInt32(m.h4),h},n};var jae=null,oPe=!1;function w6t(){jae="\x80",jae+=Lg.util.fillString("\0",64),oPe=!0}s(w6t,"_init");function nPe(e,t,r){for(var n,i,o,a,l,c,u,f,m=r.length();m>=64;){for(i=e.h0,o=e.h1,a=e.h2,l=e.h3,c=e.h4,f=0;f<16;++f)n=r.getInt32(),t[f]=n,u=l^o&(a^l),n=(i<<5|i>>>27)+u+c+1518500249+n,c=l,l=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;f<20;++f)n=t[f-3]^t[f-8]^t[f-14]^t[f-16],n=n<<1|n>>>31,t[f]=n,u=l^o&(a^l),n=(i<<5|i>>>27)+u+c+1518500249+n,c=l,l=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;f<32;++f)n=t[f-3]^t[f-8]^t[f-14]^t[f-16],n=n<<1|n>>>31,t[f]=n,u=o^a^l,n=(i<<5|i>>>27)+u+c+1859775393+n,c=l,l=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;f<40;++f)n=t[f-6]^t[f-16]^t[f-28]^t[f-32],n=n<<2|n>>>30,t[f]=n,u=o^a^l,n=(i<<5|i>>>27)+u+c+1859775393+n,c=l,l=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;f<60;++f)n=t[f-6]^t[f-16]^t[f-28]^t[f-32],n=n<<2|n>>>30,t[f]=n,u=o&a|l&(o^a),n=(i<<5|i>>>27)+u+c+2400959708+n,c=l,l=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;f<80;++f)n=t[f-6]^t[f-16]^t[f-28]^t[f-32],n=n<<2|n>>>30,t[f]=n,u=o^a^l,n=(i<<5|i>>>27)+u+c+3395469782+n,c=l,l=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+a|0,e.h3=e.h3+l|0,e.h4=e.h4+c|0,m-=64}}s(nPe,"_update")});var Vae=H((Bzr,lPe)=>{d();var Fg=fi();lo();nm();g9();var aPe=lPe.exports=Fg.pkcs1=Fg.pkcs1||{};aPe.encode_rsa_oaep=function(e,t,r){var n,i,o,a;typeof r=="string"?(n=r,i=arguments[3]||void 0,o=arguments[4]||void 0):r&&(n=r.label||void 0,i=r.seed||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(a=r.mgf1.md)),o?o.start():o=Fg.md.sha1.create(),a||(a=o);var l=Math.ceil(e.n.bitLength()/8),c=l-2*o.digestLength-2;if(t.length>c){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=c,u}n||(n=""),o.update(n,"raw");for(var f=o.digest(),m="",h=c-t.length,p=0;p<h;p++)m+="\0";var g=f.getBytes()+m+""+t;if(!i)i=Fg.random.getBytes(o.digestLength);else if(i.length!==o.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=i.length,u.digestLength=o.digestLength,u}var y=WW(i,l-o.digestLength-1,a),x=Fg.util.xorBytes(g,y,g.length),b=WW(x,o.digestLength,a),E=Fg.util.xorBytes(i,b,i.length);return"\0"+E+x};aPe.decode_rsa_oaep=function(e,t,r){var n,i,o;typeof r=="string"?(n=r,i=arguments[3]||void 0):r&&(n=r.label||void 0,i=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md));var a=Math.ceil(e.n.bitLength()/8);if(t.length!==a){var x=new Error("RSAES-OAEP encoded message length is invalid.");throw x.length=t.length,x.expectedLength=a,x}if(i===void 0?i=Fg.md.sha1.create():i.start(),o||(o=i),a<2*i.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),i.update(n,"raw");for(var l=i.digest().getBytes(),c=t.charAt(0),u=t.substring(1,i.digestLength+1),f=t.substring(1+i.digestLength),m=WW(f,i.digestLength,o),h=Fg.util.xorBytes(u,m,u.length),p=WW(h,a-i.digestLength-1,o),g=Fg.util.xorBytes(f,p,f.length),y=g.substring(0,i.digestLength),x=c!=="\0",b=0;b<i.digestLength;++b)x|=l.charAt(b)!==y.charAt(b);for(var E=1,_=i.digestLength,k=i.digestLength;k<g.length;k++){var B=g.charCodeAt(k),N=B&1^1,M=E?65534:0;x|=B&M,E=E&N,_+=E}if(x||g.charCodeAt(_)!==1)throw new Error("Invalid RSAES-OAEP padding.");return g.substring(_+1)};function WW(e,t,r){r||(r=Fg.md.sha1.create());for(var n="",i=Math.ceil(t/r.digestLength),o=0;o<i;++o){var a=String.fromCharCode(o>>24&255,o>>16&255,o>>8&255,o&255);r.start(),r.update(e+a),n+=r.digest().getBytes()}return n.substring(0,t)}s(WW,"rsa_mgf1")});var zae=H((Nzr,$ae)=>{d();var wC=fi();lo();nk();nm();(function(){if(wC.prime){$ae.exports=wC.prime;return}var e=$ae.exports=wC.prime=wC.prime||{},t=wC.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new t(null);n.fromInt(30);var i=s(function(m,h){return m|h},"op_or");e.generateProbablePrime=function(m,h,p){typeof h=="function"&&(p=h,h={}),h=h||{};var g=h.algorithm||"PRIMEINC";typeof g=="string"&&(g={name:g}),g.options=g.options||{};var y=h.prng||wC.random,x={nextBytes:s(function(b){for(var E=y.getBytesSync(b.length),_=0;_<b.length;++_)b[_]=E.charCodeAt(_)},"nextBytes")};if(g.name==="PRIMEINC")return o(m,x,g.options,p);throw new Error("Invalid prime generation algorithm: "+g.name)};function o(m,h,p,g){return"workers"in p?c(m,h,p,g):a(m,h,p,g)}s(o,"primeincFindPrime");function a(m,h,p,g){var y=u(m,h),x=0,b=f(y.bitLength());"millerRabinTests"in p&&(b=p.millerRabinTests);var E=10;"maxBlockTime"in p&&(E=p.maxBlockTime),l(y,m,h,x,b,E,g)}s(a,"primeincFindPrimeWithoutWorkers");function l(m,h,p,g,y,x,b){var E=+new Date;do{if(m.bitLength()>h&&(m=u(h,p)),m.isProbablePrime(y))return b(null,m);m.dAddOffset(r[g++%8],0)}while(x<0||+new Date-E<x);wC.util.setImmediate(function(){l(m,h,p,g,y,x,b)})}s(l,"_primeinc");function c(m,h,p,g){if(typeof Worker>"u")return a(m,h,p,g);var y=u(m,h),x=p.workers,b=p.workLoad||100,E=b*30/8,_=p.workerScript||"forge/prime.worker.js";if(x===-1)return wC.util.estimateCores(function(B,N){B&&(N=2),x=N-1,k()});k();function k(){x=Math.max(1,x);for(var B=[],N=0;N<x;++N)B[N]=new Worker(_);for(var M=x,N=0;N<x;++N)B[N].addEventListener("message",he);var Z=!1;function he(ee){if(!Z){--M;var G=ee.data;if(G.found){for(var q=0;q<B.length;++q)B[q].terminate();return Z=!0,g(null,new t(G.prime,16))}y.bitLength()>m&&(y=u(m,h));var ie=y.toString(16);ee.target.postMessage({hex:ie,workLoad:b}),y.dAddOffset(E,0)}}s(he,"workerMessage")}s(k,"generate")}s(c,"primeincFindPrimeWithWorkers");function u(m,h){var p=new t(m,h),g=m-1;return p.testBit(g)||p.bitwiseTo(t.ONE.shiftLeft(g),i,p),p.dAddOffset(31-p.mod(n).byteValue(),0),p}s(u,"generateRandom");function f(m){return m<=100?27:m<=150?18:m<=200?15:m<=250?12:m<=300?9:m<=350?8:m<=400?7:m<=500?6:m<=600?5:m<=800?4:m<=1250?3:2}s(f,"getMillerRabinTests")})()});var ik=H((Mzr,pPe)=>{d();var sn=fi();Mh();nk();IC();Vae();zae();nm();lo();typeof eo>"u"&&(eo=sn.jsbn.BigInteger);var eo,Yae=sn.util.isNodejs?require("crypto"):null,ze=sn.asn1,om=sn.util;sn.pki=sn.pki||{};pPe.exports=sn.pki.rsa=sn.rsa=sn.rsa||{};var Xn=sn.pki,_6t=[6,4,2,4,2,4,6,2],S6t={name:"PrivateKeyInfo",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ze.Class.UNIVERSAL,type:ze.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:ze.Class.UNIVERSAL,type:ze.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},R6t={name:"RSAPrivateKey",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},k6t={name:"RSAPublicKey",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:ze.Class.UNIVERSAL,type:ze.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},B6t=sn.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ze.Class.UNIVERSAL,type:ze.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:ze.Class.UNIVERSAL,type:ze.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},D6t={name:"DigestInfo",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:ze.Class.UNIVERSAL,type:ze.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:ze.Class.UNIVERSAL,type:ze.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:ze.Class.UNIVERSAL,type:ze.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:ze.Class.UNIVERSAL,type:ze.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},P6t=s(function(e){var t;if(e.algorithm in Xn.oids)t=Xn.oids[e.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}var n=ze.oidToDer(t).getBytes(),i=ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[]),o=ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[]);o.value.push(ze.create(ze.Class.UNIVERSAL,ze.Type.OID,!1,n)),o.value.push(ze.create(ze.Class.UNIVERSAL,ze.Type.NULL,!1,""));var a=ze.create(ze.Class.UNIVERSAL,ze.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(o),i.value.push(a),ze.toDer(i).getBytes()},"emsaPkcs1v15encode"),mPe=s(function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(eo.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(eo.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var n;do n=new eo(sn.util.bytesToHex(sn.random.getBytes(t.n.bitLength()/8)),16);while(n.compareTo(t.n)>=0||!n.gcd(t.n).equals(eo.ONE));e=e.multiply(n.modPow(t.e,t.n)).mod(t.n);for(var i=e.mod(t.p).modPow(t.dP,t.p),o=e.mod(t.q).modPow(t.dQ,t.q);i.compareTo(o)<0;)i=i.add(t.p);var a=i.subtract(o).multiply(t.qInv).mod(t.p).multiply(t.q).add(o);return a=a.multiply(n.modInverse(t.n)).mod(t.n),a},"_modPow");Xn.rsa.encrypt=function(e,t,r){var n=r,i,o=Math.ceil(t.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,i=hPe(e,t,r)):(i=sn.util.createBuffer(),i.putBytes(e));for(var a=new eo(i.toHex(),16),l=mPe(a,t,n),c=l.toString(16),u=sn.util.createBuffer(),f=o-Math.ceil(c.length/2);f>0;)u.putByte(0),--f;return u.putBytes(sn.util.hexToBytes(c)),u.getBytes()};Xn.rsa.decrypt=function(e,t,r,n){var i=Math.ceil(t.n.bitLength()/8);if(e.length!==i){var o=new Error("Encrypted message length is invalid.");throw o.length=e.length,o.expected=i,o}var a=new eo(sn.util.createBuffer(e).toHex(),16);if(a.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=mPe(a,t,r),c=l.toString(16),u=sn.util.createBuffer(),f=i-Math.ceil(c.length/2);f>0;)u.putByte(0),--f;return u.putBytes(sn.util.hexToBytes(c)),n!==!1?GW(u.getBytes(),t,r):u.getBytes()};Xn.rsa.createKeyPairGenerationState=function(e,t,r){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,r=r||{};var n=r.prng||sn.random,i={nextBytes:s(function(l){for(var c=n.getBytesSync(l.length),u=0;u<l.length;++u)l[u]=c.charCodeAt(u)},"nextBytes")},o=r.algorithm||"PRIMEINC",a;if(o==="PRIMEINC")a={algorithm:o,state:0,bits:e,rng:i,eInt:t||65537,e:new eo(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},a.e.fromInt(a.eInt);else throw new Error("Invalid key generation algorithm: "+o);return a};Xn.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new eo(null);r.fromInt(30);for(var n=0,i=s(function(m,h){return m|h},"op_or"),o=+new Date,a,l=0;e.keys===null&&(t<=0||l<t);){if(e.state===0){var c=e.p===null?e.pBits:e.qBits,u=c-1;e.pqState===0?(e.num=new eo(c,e.rng),e.num.testBit(u)||e.num.bitwiseTo(eo.ONE.shiftLeft(u),i,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),n=0,++e.pqState):e.pqState===1?e.num.bitLength()>c?e.pqState=0:e.num.isProbablePrime(L6t(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(_6t[n++%8],0):e.pqState===2?e.pqState=e.num.subtract(eo.ONE).gcd(e.e).compareTo(eo.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(eo.ONE),e.q1=e.q.subtract(eo.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(eo.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var f=e.e.modInverse(e.phi);e.keys={privateKey:Xn.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:Xn.rsa.setPublicKey(e.n,e.e)}}a=+new Date,l+=a-o,o=a}return e.keys!==null};Xn.rsa.generateKeyPair=function(e,t,r,n){if(arguments.length===1?typeof e=="object"?(r=e,e=void 0):typeof e=="function"&&(n=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(n=t,t=void 0):typeof t!="number"&&(r=t,t=void 0):(r=e,n=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=t,t=void 0)),r=r||{},e===void 0&&(e=r.bits||2048),t===void 0&&(t=r.e||65537),!sn.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(n){if(cPe("generateKeyPair"))return Yae.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(l,c,u){if(l)return n(l);n(null,{privateKey:Xn.privateKeyFromPem(u),publicKey:Xn.publicKeyFromPem(c)})});if(uPe("generateKey")&&uPe("exportKey"))return om.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:dPe(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(l){return om.globalScope.crypto.subtle.exportKey("pkcs8",l.privateKey)}).then(void 0,function(l){n(l)}).then(function(l){if(l){var c=Xn.privateKeyFromAsn1(ze.fromDer(sn.util.createBuffer(l)));n(null,{privateKey:c,publicKey:Xn.setRsaPublicKey(c.n,c.e)})}});if(fPe("generateKey")&&fPe("exportKey")){var i=om.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:dPe(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);i.oncomplete=function(l){var c=l.target.result,u=om.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);u.oncomplete=function(f){var m=f.target.result,h=Xn.privateKeyFromAsn1(ze.fromDer(sn.util.createBuffer(m)));n(null,{privateKey:h,publicKey:Xn.setRsaPublicKey(h.n,h.e)})},u.onerror=function(f){n(f)}},i.onerror=function(l){n(l)};return}}else if(cPe("generateKeyPairSync")){var o=Yae.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Xn.privateKeyFromPem(o.privateKey),publicKey:Xn.publicKeyFromPem(o.publicKey)}}}var a=Xn.rsa.createKeyPairGenerationState(e,t,r);if(!n)return Xn.rsa.stepKeyPairGenerationState(a,0),a.keys;N6t(a,r,n)};Xn.setRsaPublicKey=Xn.rsa.setPublicKey=function(e,t){var r={n:e,e:t};return r.encrypt=function(n,i,o){if(typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSAES-PKCS1-V1_5"),i==="RSAES-PKCS1-V1_5")i={encode:s(function(l,c,u){return hPe(l,c,2).getBytes()},"encode")};else if(i==="RSA-OAEP"||i==="RSAES-OAEP")i={encode:s(function(l,c){return sn.pkcs1.encode_rsa_oaep(c,l,o)},"encode")};else if(["RAW","NONE","NULL",null].indexOf(i)!==-1)i={encode:s(function(l){return l},"encode")};else if(typeof i=="string")throw new Error('Unsupported encryption scheme: "'+i+'".');var a=i.encode(n,r,!0);return Xn.rsa.encrypt(a,r,!0)},r.verify=function(n,i,o,a){typeof o=="string"?o=o.toUpperCase():o===void 0&&(o="RSASSA-PKCS1-V1_5"),a===void 0&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),o==="RSASSA-PKCS1-V1_5"?o={verify:s(function(c,u){u=GW(u,r,!0);var f=ze.fromDer(u,{parseAllBytes:a._parseAllDigestBytes}),m={},h=[];if(!ze.validate(f,D6t,m,h)){var p=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw p.errors=h,p}var g=ze.derToOid(m.algorithmIdentifier);if(!(g===sn.oids.md2||g===sn.oids.md5||g===sn.oids.sha1||g===sn.oids.sha224||g===sn.oids.sha256||g===sn.oids.sha384||g===sn.oids.sha512||g===sn.oids["sha512-224"]||g===sn.oids["sha512-256"])){var p=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw p.oid=g,p}if((g===sn.oids.md2||g===sn.oids.md5)&&!("parameters"in m))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return c===m.digest},"verify")}:(o==="NONE"||o==="NULL"||o===null)&&(o={verify:s(function(c,u){return u=GW(u,r,!0),c===u},"verify")});var l=Xn.rsa.decrypt(i,r,!0,!1);return o.verify(n,l,r.n.bitLength())},r};Xn.setRsaPrivateKey=Xn.rsa.setPrivateKey=function(e,t,r,n,i,o,a,l){var c={n:e,e:t,d:r,p:n,q:i,dP:o,dQ:a,qInv:l};return c.decrypt=function(u,f,m){typeof f=="string"?f=f.toUpperCase():f===void 0&&(f="RSAES-PKCS1-V1_5");var h=Xn.rsa.decrypt(u,c,!1,!1);if(f==="RSAES-PKCS1-V1_5")f={decode:GW};else if(f==="RSA-OAEP"||f==="RSAES-OAEP")f={decode:s(function(p,g){return sn.pkcs1.decode_rsa_oaep(g,p,m)},"decode")};else if(["RAW","NONE","NULL",null].indexOf(f)!==-1)f={decode:s(function(p){return p},"decode")};else throw new Error('Unsupported encryption scheme: "'+f+'".');return f.decode(h,c,!1)},c.sign=function(u,f){var m=!1;typeof f=="string"&&(f=f.toUpperCase()),f===void 0||f==="RSASSA-PKCS1-V1_5"?(f={encode:P6t},m=1):(f==="NONE"||f==="NULL"||f===null)&&(f={encode:s(function(){return u},"encode")},m=1);var h=f.encode(u,c.n.bitLength());return Xn.rsa.encrypt(h,c,m)},c};Xn.wrapRsaPrivateKey=function(e){return ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,ze.integerToDer(0).getBytes()),ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[ze.create(ze.Class.UNIVERSAL,ze.Type.OID,!1,ze.oidToDer(Xn.oids.rsaEncryption).getBytes()),ze.create(ze.Class.UNIVERSAL,ze.Type.NULL,!1,"")]),ze.create(ze.Class.UNIVERSAL,ze.Type.OCTETSTRING,!1,ze.toDer(e).getBytes())])};Xn.privateKeyFromAsn1=function(e){var t={},r=[];if(ze.validate(e,S6t,t,r)&&(e=ze.fromDer(sn.util.createBuffer(t.privateKey))),t={},r=[],!ze.validate(e,R6t,t,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var i,o,a,l,c,u,f,m;return i=sn.util.createBuffer(t.privateKeyModulus).toHex(),o=sn.util.createBuffer(t.privateKeyPublicExponent).toHex(),a=sn.util.createBuffer(t.privateKeyPrivateExponent).toHex(),l=sn.util.createBuffer(t.privateKeyPrime1).toHex(),c=sn.util.createBuffer(t.privateKeyPrime2).toHex(),u=sn.util.createBuffer(t.privateKeyExponent1).toHex(),f=sn.util.createBuffer(t.privateKeyExponent2).toHex(),m=sn.util.createBuffer(t.privateKeyCoefficient).toHex(),Xn.setRsaPrivateKey(new eo(i,16),new eo(o,16),new eo(a,16),new eo(l,16),new eo(c,16),new eo(u,16),new eo(f,16),new eo(m,16))};Xn.privateKeyToAsn1=Xn.privateKeyToRSAPrivateKey=function(e){return ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,ze.integerToDer(0).getBytes()),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.n)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.e)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.d)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.p)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.q)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.dP)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.dQ)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.qInv))])};Xn.publicKeyFromAsn1=function(e){var t={},r=[];if(ze.validate(e,B6t,t,r)){var n=ze.derToOid(t.publicKeyOid);if(n!==Xn.oids.rsaEncryption){var i=new Error("Cannot read public key. Unknown OID.");throw i.oid=n,i}e=t.rsaPublicKey}if(r=[],!ze.validate(e,k6t,t,r)){var i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw i.errors=r,i}var o=sn.util.createBuffer(t.publicKeyModulus).toHex(),a=sn.util.createBuffer(t.publicKeyExponent).toHex();return Xn.setRsaPublicKey(new eo(o,16),new eo(a,16))};Xn.publicKeyToAsn1=Xn.publicKeyToSubjectPublicKeyInfo=function(e){return ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[ze.create(ze.Class.UNIVERSAL,ze.Type.OID,!1,ze.oidToDer(Xn.oids.rsaEncryption).getBytes()),ze.create(ze.Class.UNIVERSAL,ze.Type.NULL,!1,"")]),ze.create(ze.Class.UNIVERSAL,ze.Type.BITSTRING,!1,[Xn.publicKeyToRSAPublicKey(e)])])};Xn.publicKeyToRSAPublicKey=function(e){return ze.create(ze.Class.UNIVERSAL,ze.Type.SEQUENCE,!0,[ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.n)),ze.create(ze.Class.UNIVERSAL,ze.Type.INTEGER,!1,Mg(e.e))])};function hPe(e,t,r){var n=sn.util.createBuffer(),i=Math.ceil(t.n.bitLength()/8);if(e.length>i-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=e.length,o.max=i-11,o}n.putByte(0),n.putByte(r);var a=i-3-e.length,l;if(r===0||r===1){l=r===0?0:255;for(var c=0;c<a;++c)n.putByte(l)}else for(;a>0;){for(var u=0,f=sn.random.getBytes(a),c=0;c<a;++c)l=f.charCodeAt(c),l===0?++u:n.putByte(l);a=u}return n.putByte(0),n.putBytes(e),n}s(hPe,"_encodePkcs1_v1_5");function GW(e,t,r,n){var i=Math.ceil(t.n.bitLength()/8),o=sn.util.createBuffer(e),a=o.getByte(),l=o.getByte();if(a!==0||r&&l!==0&&l!==1||!r&&l!=2||r&&l===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var c=0;if(l===0){c=i-3-n;for(var u=0;u<c;++u)if(o.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(l===1)for(c=0;o.length()>1;){if(o.getByte()!==255){--o.read;break}++c}else if(l===2)for(c=0;o.length()>1;){if(o.getByte()===0){--o.read;break}++c}var f=o.getByte();if(f!==0||c!==i-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}s(GW,"_decodePkcs1_v1_5");function N6t(e,t,r){typeof t=="function"&&(r=t,t={}),t=t||{};var n={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(n.prng=t.prng),i();function i(){o(e.pBits,function(l,c){if(l)return r(l);if(e.p=c,e.q!==null)return a(l,e.q);o(e.qBits,a)})}s(i,"generate");function o(l,c){sn.prime.generateProbablePrime(l,n,c)}s(o,"getPrime");function a(l,c){if(l)return r(l);if(e.q=c,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(eo.ONE).gcd(e.e).compareTo(eo.ONE)!==0){e.p=null,i();return}if(e.q.subtract(eo.ONE).gcd(e.e).compareTo(eo.ONE)!==0){e.q=null,o(e.qBits,a);return}if(e.p1=e.p.subtract(eo.ONE),e.q1=e.q.subtract(eo.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(eo.ONE)!==0){e.p=e.q=null,i();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,o(e.qBits,a);return}var f=e.e.modInverse(e.phi);e.keys={privateKey:Xn.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:Xn.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}s(a,"finish")}s(N6t,"_generateKeyPair");function Mg(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=sn.util.hexToBytes(t);return r.length>1&&(r.charCodeAt(0)===0&&(r.charCodeAt(1)&128)===0||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}s(Mg,"_bnToBytes");function L6t(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}s(L6t,"_getMillerRabinTests");function cPe(e){return sn.util.isNodejs&&typeof Yae[e]=="function"}s(cPe,"_detectNodeCrypto");function uPe(e){return typeof om.globalScope<"u"&&typeof om.globalScope.crypto=="object"&&typeof om.globalScope.crypto.subtle=="object"&&typeof om.globalScope.crypto.subtle[e]=="function"}s(uPe,"_detectSubtleCrypto");function fPe(e){return typeof om.globalScope<"u"&&typeof om.globalScope.msCrypto=="object"&&typeof om.globalScope.msCrypto.subtle=="object"&&typeof om.globalScope.msCrypto.subtle[e]=="function"}s(fPe,"_detectSubtleMsCrypto");function dPe(e){for(var t=sn.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}s(dPe,"_intToUint8Array")});var Kae=H((Uzr,xPe)=>{d();var kr=fi();EC();Mh();tk();kg();IC();QW();yb();nm();qae();ik();lo();typeof gPe>"u"&&(gPe=kr.jsbn.BigInteger);var gPe,ht=kr.asn1,si=kr.pki=kr.pki||{};xPe.exports=si.pbe=kr.pbe=kr.pbe||{};var vb=si.oids,F6t={name:"EncryptedPrivateKeyInfo",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},M6t={name:"PBES2Algorithms",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:ht.Class.UNIVERSAL,type:ht.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:ht.Class.UNIVERSAL,type:ht.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Q6t={name:"pkcs-12PbeParams",tagClass:ht.Class.UNIVERSAL,type:ht.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:ht.Class.UNIVERSAL,type:ht.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:ht.Class.UNIVERSAL,type:ht.Type.INTEGER,constructed:!1,capture:"iterations"}]};si.encryptPrivateKeyInfo=function(e,t,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=kr.random.getBytesSync(r.saltSize),i=r.count,o=ht.integerToDer(i),a,l,c;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var u,f,m;switch(r.algorithm){case"aes128":a=16,u=16,f=vb["aes128-CBC"],m=kr.aes.createEncryptionCipher;break;case"aes192":a=24,u=16,f=vb["aes192-CBC"],m=kr.aes.createEncryptionCipher;break;case"aes256":a=32,u=16,f=vb["aes256-CBC"],m=kr.aes.createEncryptionCipher;break;case"des":a=8,u=8,f=vb.desCBC,m=kr.des.createEncryptionCipher;break;default:var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=r.algorithm,h}var p="hmacWith"+r.prfAlgorithm.toUpperCase(),g=CPe(p),y=kr.pkcs5.pbkdf2(t,n,i,a,g),x=kr.random.getBytesSync(u),b=m(y);b.start(x),b.update(ht.toDer(e)),b.finish(),c=b.output.getBytes();var E=O6t(n,o,a,p);l=ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OID,!1,ht.oidToDer(vb.pkcs5PBES2).getBytes()),ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OID,!1,ht.oidToDer(vb.pkcs5PBKDF2).getBytes()),E]),ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OID,!1,ht.oidToDer(f).getBytes()),ht.create(ht.Class.UNIVERSAL,ht.Type.OCTETSTRING,!1,x)])])])}else if(r.algorithm==="3des"){a=24;var _=new kr.util.ByteBuffer(n),y=si.pbe.generatePkcs12Key(t,_,1,i,a),x=si.pbe.generatePkcs12Key(t,_,2,i,a),b=kr.des.createEncryptionCipher(y);b.start(x),b.update(ht.toDer(e)),b.finish(),c=b.output.getBytes(),l=ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OID,!1,ht.oidToDer(vb["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OCTETSTRING,!1,n),ht.create(ht.Class.UNIVERSAL,ht.Type.INTEGER,!1,o.getBytes())])])}else{var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=r.algorithm,h}var k=ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[l,ht.create(ht.Class.UNIVERSAL,ht.Type.OCTETSTRING,!1,c)]);return k};si.decryptPrivateKeyInfo=function(e,t){var r=null,n={},i=[];if(!ht.validate(e,F6t,n,i)){var o=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw o.errors=i,o}var a=ht.derToOid(n.encryptionOid),l=si.pbe.getCipher(a,n.encryptionParams,t),c=kr.util.createBuffer(n.encryptedData);return l.update(c),l.finish()&&(r=ht.fromDer(l.output)),r};si.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:ht.toDer(e).getBytes()};return kr.pem.encode(r,{maxline:t})};si.encryptedPrivateKeyFromPem=function(e){var t=kr.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return ht.fromDer(t.body)};si.encryptRsaPrivateKey=function(e,t,r){if(r=r||{},!r.legacy){var n=si.wrapRsaPrivateKey(si.privateKeyToAsn1(e));return n=si.encryptPrivateKeyInfo(n,t,r),si.encryptedPrivateKeyToPem(n)}var i,o,a,l;switch(r.algorithm){case"aes128":i="AES-128-CBC",a=16,o=kr.random.getBytesSync(16),l=kr.aes.createEncryptionCipher;break;case"aes192":i="AES-192-CBC",a=24,o=kr.random.getBytesSync(16),l=kr.aes.createEncryptionCipher;break;case"aes256":i="AES-256-CBC",a=32,o=kr.random.getBytesSync(16),l=kr.aes.createEncryptionCipher;break;case"3des":i="DES-EDE3-CBC",a=24,o=kr.random.getBytesSync(8),l=kr.des.createEncryptionCipher;break;case"des":i="DES-CBC",a=8,o=kr.random.getBytesSync(8),l=kr.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw c.algorithm=r.algorithm,c}var u=kr.pbe.opensslDeriveBytes(t,o.substr(0,8),a),f=l(u);f.start(o),f.update(ht.toDer(si.privateKeyToAsn1(e))),f.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:i,parameters:kr.util.bytesToHex(o).toUpperCase()},body:f.output.getBytes()};return kr.pem.encode(m)};si.decryptRsaPrivateKey=function(e,t){var r=null,n=kr.pem.decode(e)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var i=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw i.headerType=i,i}if(n.procType&&n.procType.type==="ENCRYPTED"){var o,a;switch(n.dekInfo.algorithm){case"DES-CBC":o=8,a=kr.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,a=kr.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,a=kr.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,a=kr.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,a=kr.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,a=s(function(m){return kr.rc2.createDecryptionCipher(m,40)},"cipherFn");break;case"RC2-64-CBC":o=8,a=s(function(m){return kr.rc2.createDecryptionCipher(m,64)},"cipherFn");break;case"RC2-128-CBC":o=16,a=s(function(m){return kr.rc2.createDecryptionCipher(m,128)},"cipherFn");break;default:var i=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw i.algorithm=n.dekInfo.algorithm,i}var l=kr.util.hexToBytes(n.dekInfo.parameters),c=kr.pbe.opensslDeriveBytes(t,l.substr(0,8),o),u=a(c);if(u.start(l),u.update(kr.util.createBuffer(n.body)),u.finish())r=u.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=si.decryptPrivateKeyInfo(ht.fromDer(r),t):r=ht.fromDer(r),r!==null&&(r=si.privateKeyFromAsn1(r)),r};si.pbe.generatePkcs12Key=function(e,t,r,n,i,o){var a,l;if(typeof o>"u"||o===null){if(!("sha1"in kr.md))throw new Error('"sha1" hash algorithm unavailable.');o=kr.md.sha1.create()}var c=o.digestLength,u=o.blockLength,f=new kr.util.ByteBuffer,m=new kr.util.ByteBuffer;if(e!=null){for(l=0;l<e.length;l++)m.putInt16(e.charCodeAt(l));m.putInt16(0)}var h=m.length(),p=t.length(),g=new kr.util.ByteBuffer;g.fillWithByte(r,u);var y=u*Math.ceil(p/u),x=new kr.util.ByteBuffer;for(l=0;l<y;l++)x.putByte(t.at(l%p));var b=u*Math.ceil(h/u),E=new kr.util.ByteBuffer;for(l=0;l<b;l++)E.putByte(m.at(l%h));var _=x;_.putBuffer(E);for(var k=Math.ceil(i/c),B=1;B<=k;B++){var N=new kr.util.ByteBuffer;N.putBytes(g.bytes()),N.putBytes(_.bytes());for(var M=0;M<n;M++)o.start(),o.update(N.getBytes()),N=o.digest();var Z=new kr.util.ByteBuffer;for(l=0;l<u;l++)Z.putByte(N.at(l%c));var he=Math.ceil(p/u)+Math.ceil(h/u),ee=new kr.util.ByteBuffer;for(a=0;a<he;a++){var G=new kr.util.ByteBuffer(_.getBytes(u)),q=511;for(l=Z.length()-1;l>=0;l--)q=q>>8,q+=Z.at(l)+G.at(l),G.setAt(l,q&255);ee.putBuffer(G)}_=ee,f.putBuffer(N)}return f.truncate(f.length()-i),f};si.pbe.getCipher=function(e,t,r){switch(e){case si.oids.pkcs5PBES2:return si.pbe.getCipherForPBES2(e,t,r);case si.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case si.oids["pbewithSHAAnd40BitRC2-CBC"]:return si.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};si.pbe.getCipherForPBES2=function(e,t,r){var n={},i=[];if(!ht.validate(t,M6t,n,i)){var o=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw o.errors=i,o}if(e=ht.derToOid(n.kdfOid),e!==si.oids.pkcs5PBKDF2){var o=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw o.oid=e,o.supportedOids=["pkcs5PBKDF2"],o}if(e=ht.derToOid(n.encOid),e!==si.oids["aes128-CBC"]&&e!==si.oids["aes192-CBC"]&&e!==si.oids["aes256-CBC"]&&e!==si.oids["des-EDE3-CBC"]&&e!==si.oids.desCBC){var o=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw o.oid=e,o.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],o}var a=n.kdfSalt,l=kr.util.createBuffer(n.kdfIterationCount);l=l.getInt(l.length()<<3);var c,u;switch(si.oids[e]){case"aes128-CBC":c=16,u=kr.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,u=kr.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,u=kr.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,u=kr.des.createDecryptionCipher;break;case"desCBC":c=8,u=kr.des.createDecryptionCipher;break}var f=yPe(n.prfOid),m=kr.pkcs5.pbkdf2(r,a,l,c,f),h=n.encIv,p=u(m);return p.start(h),p};si.pbe.getCipherForPKCS12PBE=function(e,t,r){var n={},i=[];if(!ht.validate(t,Q6t,n,i)){var o=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw o.errors=i,o}var a=kr.util.createBuffer(n.salt),l=kr.util.createBuffer(n.iterations);l=l.getInt(l.length()<<3);var c,u,f;switch(e){case si.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,u=8,f=kr.des.startDecrypting;break;case si.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,u=8,f=s(function(y,x){var b=kr.rc2.createDecryptionCipher(y,40);return b.start(x,null),b},"cipherFn");break;default:var o=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw o.oid=e,o}var m=yPe(n.prfOid),h=si.pbe.generatePkcs12Key(r,a,1,l,c,m);m.start();var p=si.pbe.generatePkcs12Key(r,a,2,l,u,m);return f(h,p)};si.pbe.opensslDeriveBytes=function(e,t,r,n){if(typeof n>"u"||n===null){if(!("md5"in kr.md))throw new Error('"md5" hash algorithm unavailable.');n=kr.md.md5.create()}t===null&&(t="");for(var i=[APe(n,e+t)],o=16,a=1;o<r;++a,o+=16)i.push(APe(n,i[a-1]+e+t));return i.join("").substr(0,r)};function APe(e,t){return e.start().update(t).digest().getBytes()}s(APe,"hash");function yPe(e){var t;if(!e)t="hmacWithSHA1";else if(t=si.oids[ht.derToOid(e)],!t){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}return CPe(t)}s(yPe,"prfOidToMessageDigest");function CPe(e){var t=kr.md;switch(e){case"hmacWithSHA224":t=kr.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}s(CPe,"prfAlgorithmToMessageDigest");function O6t(e,t,r,n){var i=ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OCTETSTRING,!1,e),ht.create(ht.Class.UNIVERSAL,ht.Type.INTEGER,!1,t.getBytes())]);return n!=="hmacWithSHA1"&&i.value.push(ht.create(ht.Class.UNIVERSAL,ht.Type.INTEGER,!1,kr.util.hexToBytes(r.toString(16))),ht.create(ht.Class.UNIVERSAL,ht.Type.SEQUENCE,!0,[ht.create(ht.Class.UNIVERSAL,ht.Type.OID,!1,ht.oidToDer(si.oids[n]).getBytes()),ht.create(ht.Class.UNIVERSAL,ht.Type.NULL,!1,"")])),i}s(O6t,"createPbkdf2Params")});var Jae=H((Gzr,EPe)=>{d();var A9=fi();Mh();lo();var wr=A9.asn1,y9=EPe.exports=A9.pkcs7asn1=A9.pkcs7asn1||{};A9.pkcs7=A9.pkcs7||{};A9.pkcs7.asn1=y9;var vPe={name:"ContentInfo",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:wr.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};y9.contentInfoValidator=vPe;var bPe={name:"EncryptedContentInfo",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:wr.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:wr.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};y9.envelopedDataValidator={name:"EnvelopedData",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(bPe)};y9.encryptedDataValidator={name:"EncryptedData",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1,capture:"version"}].concat(bPe)};var U6t={name:"SignerInfo",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:wr.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:wr.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:wr.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};y9.signedDataValidator={name:"SignedData",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},vPe,{name:"SignedData.Certificates",tagClass:wr.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:wr.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SET,capture:"signerInfos",optional:!0,value:[U6t]}]};y9.recipientInfoValidator={name:"RecipientInfo",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:wr.Class.UNIVERSAL,type:wr.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:wr.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:wr.Class.UNIVERSAL,type:wr.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var Xae=H((jzr,IPe)=>{d();var bb=fi();lo();bb.mgf=bb.mgf||{};var q6t=IPe.exports=bb.mgf.mgf1=bb.mgf1=bb.mgf1||{};q6t.create=function(e){var t={generate:s(function(r,n){for(var i=new bb.util.ByteBuffer,o=Math.ceil(n/e.digestLength),a=0;a<o;a++){var l=new bb.util.ByteBuffer;l.putInt32(a),e.start(),e.update(r+l.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-n),i.getBytes()},"generate")};return t}});var wPe=H((zzr,TPe)=>{d();var HW=fi();Xae();TPe.exports=HW.mgf=HW.mgf||{};HW.mgf.mgf1=HW.mgf1});var jW=H((Kzr,_Pe)=>{d();var Eb=fi();nm();lo();var W6t=_Pe.exports=Eb.pss=Eb.pss||{};W6t.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,r=e.mgf,n=t.digestLength,i=e.salt||null;typeof i=="string"&&(i=Eb.util.createBuffer(i));var o;if("saltLength"in e)o=e.saltLength;else if(i!==null)o=i.length();else throw new Error("Salt length not specified or specific salt not given.");if(i!==null&&i.length()!==o)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||Eb.random,l={};return l.encode=function(c,u){var f,m=u-1,h=Math.ceil(m/8),p=c.digest().getBytes();if(h<n+o+2)throw new Error("Message is too long to encrypt.");var g;i===null?g=a.getBytesSync(o):g=i.bytes();var y=new Eb.util.ByteBuffer;y.fillWithByte(0,8),y.putBytes(p),y.putBytes(g),t.start(),t.update(y.getBytes());var x=t.digest().getBytes(),b=new Eb.util.ByteBuffer;b.fillWithByte(0,h-o-n-2),b.putByte(1),b.putBytes(g);var E=b.getBytes(),_=h-n-1,k=r.generate(x,_),B="";for(f=0;f<_;f++)B+=String.fromCharCode(E.charCodeAt(f)^k.charCodeAt(f));var N=65280>>8*h-m&255;return B=String.fromCharCode(B.charCodeAt(0)&~N)+B.substr(1),B+x+"\xBC"},l.verify=function(c,u,f){var m,h=f-1,p=Math.ceil(h/8);if(u=u.substr(-p),p<n+o+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(p-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var g=p-n-1,y=u.substr(0,g),x=u.substr(g,n),b=65280>>8*p-h&255;if((y.charCodeAt(0)&b)!==0)throw new Error("Bits beyond keysize not zero as expected.");var E=r.generate(x,g),_="";for(m=0;m<g;m++)_+=String.fromCharCode(y.charCodeAt(m)^E.charCodeAt(m));_=String.fromCharCode(_.charCodeAt(0)&~b)+_.substr(1);var k=p-n-o-2;for(m=0;m<k;m++)if(_.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(_.charCodeAt(k)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var B=_.substr(-o),N=new Eb.util.ByteBuffer;N.fillWithByte(0,8),N.putBytes(c),N.putBytes(B),t.start(),t.update(N.getBytes());var M=t.digest().getBytes();return x===M},l}});var zW=H((Xzr,DPe)=>{d();var an=fi();EC();Mh();tk();kg();wPe();IC();yb();jW();ik();lo();var $=an.asn1,ar=DPe.exports=an.pki=an.pki||{},to=ar.oids,la={};la.CN=to.commonName;la.commonName="CN";la.C=to.countryName;la.countryName="C";la.L=to.localityName;la.localityName="L";la.ST=to.stateOrProvinceName;la.stateOrProvinceName="ST";la.O=to.organizationName;la.organizationName="O";la.OU=to.organizationalUnitName;la.organizationalUnitName="OU";la.E=to.emailAddress;la.emailAddress="E";var RPe=an.pki.rsa.publicKeyValidator,G6t={name:"Certificate",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:$.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:$.Class.UNIVERSAL,type:$.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:$.Class.UNIVERSAL,type:$.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:$.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:$.Class.UNIVERSAL,type:$.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:$.Class.UNIVERSAL,type:$.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:$.Class.UNIVERSAL,type:$.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:$.Class.UNIVERSAL,type:$.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},RPe,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:$.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:$.Class.UNIVERSAL,type:$.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:$.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:$.Class.UNIVERSAL,type:$.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:$.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:$.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:$.Class.UNIVERSAL,type:$.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},H6t={name:"rsapss",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:$.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:$.Class.UNIVERSAL,type:$.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:$.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:$.Class.UNIVERSAL,type:$.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:$.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:$.Class.UNIVERSAL,type:$.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:$.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:$.Class.UNIVERSAL,type:$.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},j6t={name:"CertificationRequestInfo",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:$.Class.UNIVERSAL,type:$.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},RPe,{name:"CertificationRequestInfo.attributes",tagClass:$.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:$.Class.UNIVERSAL,type:$.Type.SET,constructed:!0}]}]}]},V6t={name:"CertificationRequest",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[j6t,{name:"CertificationRequest.signatureAlgorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:$.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:$.Class.UNIVERSAL,type:$.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};ar.RDNAttributesAsArray=function(e,t){for(var r=[],n,i,o,a=0;a<e.value.length;++a){n=e.value[a];for(var l=0;l<n.value.length;++l)o={},i=n.value[l],o.type=$.derToOid(i.value[0].value),o.value=i.value[1].value,o.valueTagClass=i.value[1].type,o.type in to&&(o.name=to[o.type],o.name in la&&(o.shortName=la[o.name])),t&&(t.update(o.type),t.update(o.value)),r.push(o)}return r};ar.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],i=$.derToOid(n.value[0].value),o=n.value[1].value,a=0;a<o.length;++a){var l={};if(l.type=i,l.value=o[a].value,l.valueTagClass=o[a].type,l.type in to&&(l.name=to[l.type],l.name in la&&(l.shortName=la[l.name])),l.type===to.extensionRequest){l.extensions=[];for(var c=0;c<l.value.length;++c)l.extensions.push(ar.certificateExtensionFromAsn1(l.value[c]))}t.push(l)}return t};function _C(e,t){typeof t=="string"&&(t={shortName:t});for(var r=null,n,i=0;r===null&&i<e.attributes.length;++i)n=e.attributes[i],(t.type&&t.type===n.type||t.name&&t.name===n.name||t.shortName&&t.shortName===n.shortName)&&(r=n);return r}s(_C,"_getAttribute");var VW=s(function(e,t,r){var n={};if(e!==to["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:to.sha1},mgf:{algorithmOid:to.mgf1,hash:{algorithmOid:to.sha1}},saltLength:20});var i={},o=[];if(!$.validate(t,H6t,i,o)){var a=new Error("Cannot read RSASSA-PSS parameter block.");throw a.errors=o,a}return i.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=$.derToOid(i.hashOid)),i.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=$.derToOid(i.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=$.derToOid(i.maskGenHashOid)),i.saltLength!==void 0&&(n.saltLength=i.saltLength.charCodeAt(0)),n},"_readSignatureParameters"),$W=s(function(e){switch(to[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return an.md.sha1.create();case"md5WithRSAEncryption":return an.md.md5.create();case"sha256WithRSAEncryption":return an.md.sha256.create();case"sha384WithRSAEncryption":return an.md.sha384.create();case"sha512WithRSAEncryption":return an.md.sha512.create();case"RSASSA-PSS":return an.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},"_createSignatureDigest"),kPe=s(function(e){var t=e.certificate,r;switch(t.signatureOid){case to.sha1WithRSAEncryption:case to.sha1WithRSASignature:break;case to["RSASSA-PSS"]:var n,i;if(n=to[t.signatureParameters.mgf.hash.algorithmOid],n===void 0||an.md[n]===void 0){var o=new Error("Unsupported MGF hash function.");throw o.oid=t.signatureParameters.mgf.hash.algorithmOid,o.name=n,o}if(i=to[t.signatureParameters.mgf.algorithmOid],i===void 0||an.mgf[i]===void 0){var o=new Error("Unsupported MGF function.");throw o.oid=t.signatureParameters.mgf.algorithmOid,o.name=i,o}if(i=an.mgf[i].create(an.md[n].create()),n=to[t.signatureParameters.hash.algorithmOid],n===void 0||an.md[n]===void 0){var o=new Error("Unsupported RSASSA-PSS hash function.");throw o.oid=t.signatureParameters.hash.algorithmOid,o.name=n,o}r=an.pss.create(an.md[n].create(),i,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,r)},"_verifySignature");ar.certificateFromPem=function(e,t,r){var n=an.pem.decode(e)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var i=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw i.headerType=n.type,i}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var o=$.fromDer(n.body,r);return ar.certificateFromAsn1(o,t)};ar.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:$.toDer(ar.certificateToAsn1(e)).getBytes()};return an.pem.encode(r,{maxline:t})};ar.publicKeyFromPem=function(e){var t=an.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=$.fromDer(t.body);return ar.publicKeyFromAsn1(n)};ar.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:$.toDer(ar.publicKeyToAsn1(e)).getBytes()};return an.pem.encode(r,{maxline:t})};ar.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:$.toDer(ar.publicKeyToRSAPublicKey(e)).getBytes()};return an.pem.encode(r,{maxline:t})};ar.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||an.md.sha1.create(),n=t.type||"RSAPublicKey",i;switch(n){case"RSAPublicKey":i=$.toDer(ar.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":i=$.toDer(ar.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}r.start(),r.update(i);var o=r.digest();if(t.encoding==="hex"){var a=o.toHex();return t.delimiter?a.match(/.{2}/g).join(t.delimiter):a}else{if(t.encoding==="binary")return o.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return o};ar.certificationRequestFromPem=function(e,t,r){var n=an.pem.decode(e)[0];if(n.type!=="CERTIFICATE REQUEST"){var i=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw i.headerType=n.type,i}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var o=$.fromDer(n.body,r);return ar.certificationRequestFromAsn1(o,t)};ar.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:$.toDer(ar.certificationRequestToAsn1(e)).getBytes()};return an.pem.encode(r,{maxline:t})};ar.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return _C(e.issuer,t)},e.issuer.addField=function(t){sm([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return _C(e.subject,t)},e.subject.addField=function(t){sm([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){sm(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){sm(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)BPe(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var r=null,n,i=0;r===null&&i<e.extensions.length;++i)n=e.extensions[i],(t.id&&n.id===t.id||t.name&&n.name===t.name)&&(r=n);return r},e.sign=function(t,r){e.md=r||an.md.sha1.create();var n=to[e.md.algorithm+"WithRSAEncryption"];if(!n){var i=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=n,e.tbsCertificate=ar.getTBSCertificate(e);var o=$.toDer(e.tbsCertificate);e.md.update(o.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var n=t.issuer,i=e.subject,o=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw o.expectedIssuer=i.attributes,o.actualIssuer=n.attributes,o}var a=t.md;if(a===null){a=$W({signatureOid:t.signatureOid,type:"certificate"});var l=t.tbsCertificate||ar.getTBSCertificate(t),c=$.toDer(l);a.update(c.getBytes())}return a!==null&&(r=kPe({certificate:e,md:a,signature:t.signature})),r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){r=!0;for(var o,a,l=0;r&&l<n.attributes.length;++l)o=n.attributes[l],a=i.attributes[l],(o.type!==a.type||o.value!==a.value)&&(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return ar.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=to.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var n=e.extensions[r];if(n.id===t){var i=e.generateSubjectKeyIdentifier().getBytes();return an.util.hexToBytes(n.subjectKeyIdentifier)===i}}return!1},e};ar.certificateFromAsn1=function(e,t){var r={},n=[];if(!$.validate(e,G6t,r,n)){var i=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw i.errors=n,i}var o=$.derToOid(r.publicKeyOid);if(o!==ar.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=ar.createCertificate();a.version=r.certVersion?r.certVersion.charCodeAt(0):0;var l=an.util.createBuffer(r.certSerialNumber);a.serialNumber=l.toHex(),a.signatureOid=an.asn1.derToOid(r.certSignatureOid),a.signatureParameters=VW(a.signatureOid,r.certSignatureParams,!0),a.siginfo.algorithmOid=an.asn1.derToOid(r.certinfoSignatureOid),a.siginfo.parameters=VW(a.siginfo.algorithmOid,r.certinfoSignatureParams,!1),a.signature=r.certSignature;var c=[];if(r.certValidity1UTCTime!==void 0&&c.push($.utcTimeToDate(r.certValidity1UTCTime)),r.certValidity2GeneralizedTime!==void 0&&c.push($.generalizedTimeToDate(r.certValidity2GeneralizedTime)),r.certValidity3UTCTime!==void 0&&c.push($.utcTimeToDate(r.certValidity3UTCTime)),r.certValidity4GeneralizedTime!==void 0&&c.push($.generalizedTimeToDate(r.certValidity4GeneralizedTime)),c.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(c.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(a.validity.notBefore=c[0],a.validity.notAfter=c[1],a.tbsCertificate=r.tbsCertificate,t){a.md=$W({signatureOid:a.signatureOid,type:"certificate"});var u=$.toDer(a.tbsCertificate);a.md.update(u.getBytes())}var f=an.md.sha1.create(),m=$.toDer(r.certIssuer);f.update(m.getBytes()),a.issuer.getField=function(g){return _C(a.issuer,g)},a.issuer.addField=function(g){sm([g]),a.issuer.attributes.push(g)},a.issuer.attributes=ar.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(a.issuer.uniqueId=r.certIssuerUniqueId),a.issuer.hash=f.digest().toHex();var h=an.md.sha1.create(),p=$.toDer(r.certSubject);return h.update(p.getBytes()),a.subject.getField=function(g){return _C(a.subject,g)},a.subject.addField=function(g){sm([g]),a.subject.attributes.push(g)},a.subject.attributes=ar.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(a.subject.uniqueId=r.certSubjectUniqueId),a.subject.hash=h.digest().toHex(),r.certExtensions?a.extensions=ar.certificateExtensionsFromAsn1(r.certExtensions):a.extensions=[],a.publicKey=ar.publicKeyFromAsn1(r.subjectPublicKeyInfo),a};ar.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(ar.certificateExtensionFromAsn1(n.value[i]));return t};ar.certificateExtensionFromAsn1=function(e){var t={};if(t.id=$.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===$.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in to){if(t.name=to[t.id],t.name==="keyUsage"){var r=$.fromDer(t.value),n=0,i=0;r.value.length>1&&(n=r.value.charCodeAt(1),i=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(n&128)===128,t.nonRepudiation=(n&64)===64,t.keyEncipherment=(n&32)===32,t.dataEncipherment=(n&16)===16,t.keyAgreement=(n&8)===8,t.keyCertSign=(n&4)===4,t.cRLSign=(n&2)===2,t.encipherOnly=(n&1)===1,t.decipherOnly=(i&128)===128}else if(t.name==="basicConstraints"){var r=$.fromDer(t.value);r.value.length>0&&r.value[0].type===$.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var o=null;r.value.length>0&&r.value[0].type===$.Type.INTEGER?o=r.value[0].value:r.value.length>1&&(o=r.value[1].value),o!==null&&(t.pathLenConstraint=$.derToInteger(o))}else if(t.name==="extKeyUsage")for(var r=$.fromDer(t.value),a=0;a<r.value.length;++a){var l=$.derToOid(r.value[a].value);l in to?t[to[l]]=!0:t[l]=!0}else if(t.name==="nsCertType"){var r=$.fromDer(t.value),n=0;r.value.length>1&&(n=r.value.charCodeAt(1)),t.client=(n&128)===128,t.server=(n&64)===64,t.email=(n&32)===32,t.objsign=(n&16)===16,t.reserved=(n&8)===8,t.sslCA=(n&4)===4,t.emailCA=(n&2)===2,t.objCA=(n&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var c,r=$.fromDer(t.value),u=0;u<r.value.length;++u){c=r.value[u];var f={type:c.type,value:c.value};switch(t.altNames.push(f),c.type){case 1:case 2:case 6:break;case 7:f.ip=an.util.bytesToIP(c.value);break;case 8:f.oid=$.derToOid(c.value);break;default:}}}else if(t.name==="subjectKeyIdentifier"){var r=$.fromDer(t.value);t.subjectKeyIdentifier=an.util.bytesToHex(r.value)}}return t};ar.certificationRequestFromAsn1=function(e,t){var r={},n=[];if(!$.validate(e,V6t,r,n)){var i=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw i.errors=n,i}var o=$.derToOid(r.publicKeyOid);if(o!==ar.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=ar.createCertificationRequest();if(a.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,a.signatureOid=an.asn1.derToOid(r.csrSignatureOid),a.signatureParameters=VW(a.signatureOid,r.csrSignatureParams,!0),a.siginfo.algorithmOid=an.asn1.derToOid(r.csrSignatureOid),a.siginfo.parameters=VW(a.siginfo.algorithmOid,r.csrSignatureParams,!1),a.signature=r.csrSignature,a.certificationRequestInfo=r.certificationRequestInfo,t){a.md=$W({signatureOid:a.signatureOid,type:"certification request"});var l=$.toDer(a.certificationRequestInfo);a.md.update(l.getBytes())}var c=an.md.sha1.create();return a.subject.getField=function(u){return _C(a.subject,u)},a.subject.addField=function(u){sm([u]),a.subject.attributes.push(u)},a.subject.attributes=ar.RDNAttributesAsArray(r.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=ar.publicKeyFromAsn1(r.subjectPublicKeyInfo),a.getAttribute=function(u){return _C(a,u)},a.addAttribute=function(u){sm([u]),a.attributes.push(u)},a.attributes=ar.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),a};ar.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return _C(e.subject,t)},e.subject.addField=function(t){sm([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return _C(e,t)},e.addAttribute=function(t){sm([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){sm(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){sm(t),e.attributes=t},e.sign=function(t,r){e.md=r||an.md.sha1.create();var n=to[e.md.algorithm+"WithRSAEncryption"];if(!n){var i=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=n,e.certificationRequestInfo=ar.getCertificationRequestInfo(e);var o=$.toDer(e.certificationRequestInfo);e.md.update(o.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(r===null){r=$W({signatureOid:e.signatureOid,type:"certification request"});var n=e.certificationRequestInfo||ar.getCertificationRequestInfo(e),i=$.toDer(n);r.update(i.getBytes())}return r!==null&&(t=kPe({certificate:e,md:r,signature:e.signature})),t},e};function C9(e){for(var t=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]),r,n,i=e.attributes,o=0;o<i.length;++o){r=i[o];var a=r.value,l=$.Type.PRINTABLESTRING;"valueTagClass"in r&&(l=r.valueTagClass,l===$.Type.UTF8&&(a=an.util.encodeUtf8(a))),n=$.create($.Class.UNIVERSAL,$.Type.SET,!0,[$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(r.type).getBytes()),$.create($.Class.UNIVERSAL,l,!1,a)])]),t.value.push(n)}return t}s(C9,"_dnToAsn1");function sm(e){for(var t,r=0;r<e.length;++r){if(t=e[r],typeof t.name>"u"&&(t.type&&t.type in ar.oids?t.name=ar.oids[t.type]:t.shortName&&t.shortName in la&&(t.name=ar.oids[la[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in ar.oids)t.type=ar.oids[t.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=t,n}if(typeof t.shortName>"u"&&t.name&&t.name in la&&(t.shortName=la[t.name]),t.type===to.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=$.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var i=0;i<t.extensions.length;++i)t.value.push(ar.certificateExtensionToAsn1(BPe(t.extensions[i])))}if(typeof t.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=t,n}}}s(sm,"_fillMissingFields");function BPe(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in ar.oids&&(e.name=ar.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in ar.oids)e.id=ar.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var n=0,i=0,o=0;e.digitalSignature&&(i|=128,n=7),e.nonRepudiation&&(i|=64,n=6),e.keyEncipherment&&(i|=32,n=5),e.dataEncipherment&&(i|=16,n=4),e.keyAgreement&&(i|=8,n=3),e.keyCertSign&&(i|=4,n=2),e.cRLSign&&(i|=2,n=1),e.encipherOnly&&(i|=1,n=0),e.decipherOnly&&(o|=128,n=7);var a=String.fromCharCode(n);o!==0?a+=String.fromCharCode(i)+String.fromCharCode(o):i!==0&&(a+=String.fromCharCode(i)),e.value=$.create($.Class.UNIVERSAL,$.Type.BITSTRING,!1,a)}else if(e.name==="basicConstraints")e.value=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push($.create($.Class.UNIVERSAL,$.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in e&&e.value.value.push($.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,$.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]);var l=e.value.value;for(var c in e)e[c]===!0&&(c in to?l.push($.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(to[c]).getBytes())):c.indexOf(".")!==-1&&l.push($.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(c).getBytes())))}else if(e.name==="nsCertType"){var n=0,i=0;e.client&&(i|=128,n=7),e.server&&(i|=64,n=6),e.email&&(i|=32,n=5),e.objsign&&(i|=16,n=4),e.reserved&&(i|=8,n=3),e.sslCA&&(i|=4,n=2),e.emailCA&&(i|=2,n=1),e.objCA&&(i|=1,n=0);var a=String.fromCharCode(n);i!==0&&(a+=String.fromCharCode(i)),e.value=$.create($.Class.UNIVERSAL,$.Type.BITSTRING,!1,a)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]);for(var u,f=0;f<e.altNames.length;++f){u=e.altNames[f];var a=u.value;if(u.type===7&&u.ip){if(a=an.util.bytesFromIP(u.ip),a===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?a=$.oidToDer($.oidToDer(u.oid)):a=$.oidToDer(a));e.value.value.push($.create($.Class.CONTEXT_SPECIFIC,u.type,!1,a))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=$.create($.Class.UNIVERSAL,$.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var m=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=m.toHex(),e.value=$.create($.Class.UNIVERSAL,$.Type.OCTETSTRING,!1,m.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]);var l=e.value.value;if(e.keyIdentifier){var h=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;l.push($.create($.Class.CONTEXT_SPECIFIC,0,!1,h))}if(e.authorityCertIssuer){var p=[$.create($.Class.CONTEXT_SPECIFIC,4,!0,[C9(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];l.push($.create($.Class.CONTEXT_SPECIFIC,1,!0,p))}if(e.serialNumber){var g=an.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);l.push($.create($.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if(e.name==="cRLDistributionPoints"){e.value=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]);for(var l=e.value.value,y=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]),x=$.create($.Class.CONTEXT_SPECIFIC,0,!0,[]),u,f=0;f<e.altNames.length;++f){u=e.altNames[f];var a=u.value;if(u.type===7&&u.ip){if(a=an.util.bytesFromIP(u.ip),a===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?a=$.oidToDer($.oidToDer(u.oid)):a=$.oidToDer(a));x.value.push($.create($.Class.CONTEXT_SPECIFIC,u.type,!1,a))}y.value.push($.create($.Class.CONTEXT_SPECIFIC,0,!0,[x])),l.push(y)}if(typeof e.value>"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}s(BPe,"_fillMissingExtensionFields");function Zae(e,t){switch(e){case to["RSASSA-PSS"]:var r=[];return t.hash.algorithmOid!==void 0&&r.push($.create($.Class.CONTEXT_SPECIFIC,0,!0,[$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(t.hash.algorithmOid).getBytes()),$.create($.Class.UNIVERSAL,$.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push($.create($.Class.CONTEXT_SPECIFIC,1,!0,[$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(t.mgf.algorithmOid).getBytes()),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(t.mgf.hash.algorithmOid).getBytes()),$.create($.Class.UNIVERSAL,$.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push($.create($.Class.CONTEXT_SPECIFIC,2,!0,[$.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,$.integerToDer(t.saltLength).getBytes())])),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,r);default:return $.create($.Class.UNIVERSAL,$.Type.NULL,!1,"")}}s(Zae,"_signatureParametersToAsn1");function $6t(e){var t=$.create($.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,n=0;n<r.length;++n){var i=r[n],o=i.value,a=$.Type.UTF8;"valueTagClass"in i&&(a=i.valueTagClass),a===$.Type.UTF8&&(o=an.util.encodeUtf8(o));var l=!1;"valueConstructed"in i&&(l=i.valueConstructed);var c=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(i.type).getBytes()),$.create($.Class.UNIVERSAL,$.Type.SET,!0,[$.create($.Class.UNIVERSAL,a,l,o)])]);t.value.push(c)}return t}s($6t,"_CRIAttributesToAsn1");var z6t=new Date("1950-01-01T00:00:00Z"),Y6t=new Date("2050-01-01T00:00:00Z");function SPe(e){return e>=z6t&&e<Y6t?$.create($.Class.UNIVERSAL,$.Type.UTCTIME,!1,$.dateToUtcTime(e)):$.create($.Class.UNIVERSAL,$.Type.GENERALIZEDTIME,!1,$.dateToGeneralizedTime(e))}s(SPe,"_dateToAsn1");ar.getTBSCertificate=function(e){var t=SPe(e.validity.notBefore),r=SPe(e.validity.notAfter),n=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.CONTEXT_SPECIFIC,0,!0,[$.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,$.integerToDer(e.version).getBytes())]),$.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,an.util.hexToBytes(e.serialNumber)),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(e.siginfo.algorithmOid).getBytes()),Zae(e.siginfo.algorithmOid,e.siginfo.parameters)]),C9(e.issuer),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[t,r]),C9(e.subject),ar.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&n.value.push($.create($.Class.CONTEXT_SPECIFIC,1,!0,[$.create($.Class.UNIVERSAL,$.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&n.value.push($.create($.Class.CONTEXT_SPECIFIC,2,!0,[$.create($.Class.UNIVERSAL,$.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&n.value.push(ar.certificateExtensionsToAsn1(e.extensions)),n};ar.getCertificationRequestInfo=function(e){var t=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,$.integerToDer(e.version).getBytes()),C9(e.subject),ar.publicKeyToAsn1(e.publicKey),$6t(e)]);return t};ar.distinguishedNameToAsn1=function(e){return C9(e)};ar.certificateToAsn1=function(e){var t=e.tbsCertificate||ar.getTBSCertificate(e);return $.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[t,$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(e.signatureOid).getBytes()),Zae(e.signatureOid,e.signatureParameters)]),$.create($.Class.UNIVERSAL,$.Type.BITSTRING,!1,"\0"+e.signature)])};ar.certificateExtensionsToAsn1=function(e){var t=$.create($.Class.CONTEXT_SPECIFIC,3,!0,[]),r=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(ar.certificateExtensionToAsn1(e[n]));return t};ar.certificateExtensionToAsn1=function(e){var t=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[]);t.value.push($.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(e.id).getBytes())),e.critical&&t.value.push($.create($.Class.UNIVERSAL,$.Type.BOOLEAN,!1,"\xFF"));var r=e.value;return typeof e.value!="string"&&(r=$.toDer(r).getBytes()),t.value.push($.create($.Class.UNIVERSAL,$.Type.OCTETSTRING,!1,r)),t};ar.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||ar.getCertificationRequestInfo(e);return $.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[t,$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(e.signatureOid).getBytes()),Zae(e.signatureOid,e.signatureParameters)]),$.create($.Class.UNIVERSAL,$.Type.BITSTRING,!1,"\0"+e.signature)])};ar.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(a){var l=r(a.issuer);return l},t.addCertificate=function(a){if(typeof a=="string"&&(a=an.pki.certificateFromPem(a)),n(a.subject),!t.hasCertificate(a))if(a.subject.hash in t.certs){var l=t.certs[a.subject.hash];an.util.isArray(l)||(l=[l]),l.push(a),t.certs[a.subject.hash]=l}else t.certs[a.subject.hash]=a},t.hasCertificate=function(a){typeof a=="string"&&(a=an.pki.certificateFromPem(a));var l=r(a.subject);if(!l)return!1;an.util.isArray(l)||(l=[l]);for(var c=$.toDer(ar.certificateToAsn1(a)).getBytes(),u=0;u<l.length;++u){var f=$.toDer(ar.certificateToAsn1(l[u])).getBytes();if(c===f)return!0}return!1},t.listAllCertificates=function(){var a=[];for(var l in t.certs)if(t.certs.hasOwnProperty(l)){var c=t.certs[l];if(!an.util.isArray(c))a.push(c);else for(var u=0;u<c.length;++u)a.push(c[u])}return a},t.removeCertificate=function(a){var l;if(typeof a=="string"&&(a=an.pki.certificateFromPem(a)),n(a.subject),!t.hasCertificate(a))return null;var c=r(a.subject);if(!an.util.isArray(c))return l=t.certs[a.subject.hash],delete t.certs[a.subject.hash],l;for(var u=$.toDer(ar.certificateToAsn1(a)).getBytes(),f=0;f<c.length;++f){var m=$.toDer(ar.certificateToAsn1(c[f])).getBytes();u===m&&(l=c[f],c.splice(f,1))}return c.length===0&&delete t.certs[a.subject.hash],l};function r(a){return n(a),t.certs[a.hash]||null}s(r,"getBySubject");function n(a){if(!a.hash){var l=an.md.sha1.create();a.attributes=ar.RDNAttributesAsArray(C9(a),l),a.hash=l.digest().toHex()}}if(s(n,"ensureSubjectHasHash"),e)for(var i=0;i<e.length;++i){var o=e[i];t.addCertificate(o)}return t};ar.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};ar.verifyCertificateChain=function(e,t,r){typeof r=="function"&&(r={verify:r}),r=r||{},t=t.slice(0);var n=t.slice(0),i=r.validityCheckDate;typeof i>"u"&&(i=new Date);var o=!0,a=null,l=0;do{var c=t.shift(),u=null,f=!1;if(i&&(i<c.validity.notBefore||i>c.validity.notAfter)&&(a={message:"Certificate is not valid yet or has expired.",error:ar.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:i}),a===null){if(u=t[0]||e.getIssuer(c),u===null&&c.isIssuer(c)&&(f=!0,u=c),u){var m=u;an.util.isArray(m)||(m=[m]);for(var h=!1;!h&&m.length>0;){u=m.shift();try{h=u.verify(c)}catch{}}h||(a={message:"Certificate signature is invalid.",error:ar.certificateError.bad_certificate})}a===null&&(!u||f)&&!e.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:ar.certificateError.unknown_ca})}if(a===null&&u&&!c.isIssuer(u)&&(a={message:"Certificate issuer is invalid.",error:ar.certificateError.bad_certificate}),a===null)for(var p={keyUsage:!0,basicConstraints:!0},g=0;a===null&&g<c.extensions.length;++g){var y=c.extensions[g];y.critical&&!(y.name in p)&&(a={message:"Certificate has an unsupported critical extension.",error:ar.certificateError.unsupported_certificate})}if(a===null&&(!o||t.length===0&&(!u||f))){var x=c.getExtension("basicConstraints"),b=c.getExtension("keyUsage");if(b!==null&&(!b.keyCertSign||x===null)&&(a={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:ar.certificateError.bad_certificate}),a===null&&x!==null&&!x.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:ar.certificateError.bad_certificate}),a===null&&b!==null&&"pathLenConstraint"in x){var E=l-1;E>x.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:ar.certificateError.bad_certificate})}}var _=a===null?!0:a.error,k=r.verify?r.verify(_,l,n):_;if(k===!0)a=null;else throw _===!0&&(a={message:"The application rejected the certificate.",error:ar.certificateError.bad_certificate}),(k||k===0)&&(typeof k=="object"&&!an.util.isArray(k)?(k.message&&(a.message=k.message),k.error&&(a.error=k.error)):typeof k=="string"&&(a.error=k)),a;o=!1,++l}while(t.length>0);return!0}});var tle=H((tYr,NPe)=>{d();var rs=fi();Mh();d9();IC();Jae();Kae();nm();ik();g9();lo();zW();var _e=rs.asn1,wi=rs.pki,sk=NPe.exports=rs.pkcs12=rs.pkcs12||{},PPe={name:"ContentInfo",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:_e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},K6t={name:"PFX",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:_e.Class.UNIVERSAL,type:_e.Type.INTEGER,constructed:!1,capture:"version"},PPe,{name:"PFX.macData",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:_e.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:_e.Class.UNIVERSAL,type:_e.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},J6t={name:"SafeBag",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:_e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},X6t={name:"Attribute",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SET,constructed:!0,capture:"values"}]},Z6t={name:"CertBag",tagClass:_e.Class.UNIVERSAL,type:_e.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:_e.Class.UNIVERSAL,type:_e.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:_e.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:_e.Class.UNIVERSAL,type:_e.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function ok(e,t,r,n){for(var i=[],o=0;o<e.length;o++)for(var a=0;a<e[o].safeBags.length;a++){var l=e[o].safeBags[a];if(!(n!==void 0&&l.type!==n)){if(t===null){i.push(l);continue}l.attributes[t]!==void 0&&l.attributes[t].indexOf(r)>=0&&i.push(l)}}return i}s(ok,"_getBagsByAttribute");sk.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var n={},i=[];if(!_e.validate(e,K6t,n,i)){var o=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw o.errors=o,o}var a={version:n.version.charCodeAt(0),safeContents:[],getBags:s(function(x){var b={},E;return"localKeyId"in x?E=x.localKeyId:"localKeyIdHex"in x&&(E=rs.util.hexToBytes(x.localKeyIdHex)),E===void 0&&!("friendlyName"in x)&&"bagType"in x&&(b[x.bagType]=ok(a.safeContents,null,null,x.bagType)),E!==void 0&&(b.localKeyId=ok(a.safeContents,"localKeyId",E,x.bagType)),"friendlyName"in x&&(b.friendlyName=ok(a.safeContents,"friendlyName",x.friendlyName,x.bagType)),b},"getBags"),getBagsByFriendlyName:s(function(x,b){return ok(a.safeContents,"friendlyName",x,b)},"getBagsByFriendlyName"),getBagsByLocalKeyId:s(function(x,b){return ok(a.safeContents,"localKeyId",x,b)},"getBagsByLocalKeyId")};if(n.version.charCodeAt(0)!==3){var o=new Error("PKCS#12 PFX of version other than 3 not supported.");throw o.version=n.version.charCodeAt(0),o}if(_e.derToOid(n.contentType)!==wi.oids.data){var o=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw o.oid=_e.derToOid(n.contentType),o}var l=n.content.value[0];if(l.tagClass!==_e.Class.UNIVERSAL||l.type!==_e.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(l=ele(l),n.mac){var c=null,u=0,f=_e.derToOid(n.macAlgorithm);switch(f){case wi.oids.sha1:c=rs.md.sha1.create(),u=20;break;case wi.oids.sha256:c=rs.md.sha256.create(),u=32;break;case wi.oids.sha384:c=rs.md.sha384.create(),u=48;break;case wi.oids.sha512:c=rs.md.sha512.create(),u=64;break;case wi.oids.md5:c=rs.md.md5.create(),u=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+f);var m=new rs.util.ByteBuffer(n.macSalt),h="macIterations"in n?parseInt(rs.util.bytesToHex(n.macIterations),16):1,p=sk.generateKey(r,m,3,h,u,c),g=rs.hmac.create();g.start(c,p),g.update(l.value);var y=g.getMac();if(y.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return e9t(a,l.value,t,r),a};function ele(e){if(e.composed||e.constructed){for(var t=rs.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}s(ele,"_decodePkcs7Data");function e9t(e,t,r,n){if(t=_e.fromDer(t,r),t.tagClass!==_e.Class.UNIVERSAL||t.type!==_e.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var i=0;i<t.value.length;i++){var o=t.value[i],a={},l=[];if(!_e.validate(o,PPe,a,l)){var c=new Error("Cannot read ContentInfo.");throw c.errors=l,c}var u={encrypted:!1},f=null,m=a.content.value[0];switch(_e.derToOid(a.contentType)){case wi.oids.data:if(m.tagClass!==_e.Class.UNIVERSAL||m.type!==_e.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");f=ele(m).value;break;case wi.oids.encryptedData:f=t9t(m,n),u.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=_e.derToOid(a.contentType),c}u.safeBags=r9t(f,r,n),e.safeContents.push(u)}}s(e9t,"_decodeAuthenticatedSafe");function t9t(e,t){var r={},n=[];if(!_e.validate(e,rs.pkcs7.asn1.encryptedDataValidator,r,n)){var i=new Error("Cannot read EncryptedContentInfo.");throw i.errors=n,i}var o=_e.derToOid(r.contentType);if(o!==wi.oids.data){var i=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw i.oid=o,i}o=_e.derToOid(r.encAlgorithm);var a=wi.pbe.getCipher(o,r.encParameter,t),l=ele(r.encryptedContentAsn1),c=rs.util.createBuffer(l.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}s(t9t,"_decryptSafeContents");function r9t(e,t,r){if(!t&&e.length===0)return[];if(e=_e.fromDer(e,t),e.tagClass!==_e.Class.UNIVERSAL||e.type!==_e.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],i=0;i<e.value.length;i++){var o=e.value[i],a={},l=[];if(!_e.validate(o,J6t,a,l)){var c=new Error("Cannot read SafeBag.");throw c.errors=l,c}var u={type:_e.derToOid(a.bagId),attributes:n9t(a.bagAttributes)};n.push(u);var f,m,h=a.bagValue.value[0];switch(u.type){case wi.oids.pkcs8ShroudedKeyBag:if(h=wi.decryptPrivateKeyInfo(h,r),h===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case wi.oids.keyBag:try{u.key=wi.privateKeyFromAsn1(h)}catch{u.key=null,u.asn1=h}continue;case wi.oids.certBag:f=Z6t,m=s(function(){if(_e.derToOid(a.certId)!==wi.oids.x509Certificate){var g=new Error("Unsupported certificate type, only X.509 supported.");throw g.oid=_e.derToOid(a.certId),g}var y=_e.fromDer(a.cert,t);try{u.cert=wi.certificateFromAsn1(y,!0)}catch{u.cert=null,u.asn1=y}},"decoder");break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=u.type,c}if(f!==void 0&&!_e.validate(h,f,a,l)){var c=new Error("Cannot read PKCS#12 "+f.name);throw c.errors=l,c}m()}return n}s(r9t,"_decodeSafeContents");function n9t(e){var t={};if(e!==void 0)for(var r=0;r<e.length;++r){var n={},i=[];if(!_e.validate(e[r],X6t,n,i)){var o=new Error("Cannot read PKCS#12 BagAttribute.");throw o.errors=i,o}var a=_e.derToOid(n.oid);if(wi.oids[a]!==void 0){t[wi.oids[a]]=[];for(var l=0;l<n.values.length;++l)t[wi.oids[a]].push(n.values[l].value)}}return t}s(n9t,"_decodeBagAttributes");sk.toPkcs12Asn1=function(e,t,r,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var i=n.localKeyId,o;if(i!==null)i=rs.util.hexToBytes(i);else if(n.generateLocalKeyId)if(t){var a=rs.util.isArray(t)?t[0]:t;typeof a=="string"&&(a=wi.certificateFromPem(a));var l=rs.md.sha1.create();l.update(_e.toDer(wi.certificateToAsn1(a)).getBytes()),i=l.digest().getBytes()}else i=rs.random.getBytes(20);var c=[];i!==null&&c.push(_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.localKeyId).getBytes()),_e.create(_e.Class.UNIVERSAL,_e.Type.SET,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,i)])])),"friendlyName"in n&&c.push(_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.friendlyName).getBytes()),_e.create(_e.Class.UNIVERSAL,_e.Type.SET,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.BMPSTRING,!1,n.friendlyName)])])),c.length>0&&(o=_e.create(_e.Class.UNIVERSAL,_e.Type.SET,!0,c));var u=[],f=[];t!==null&&(rs.util.isArray(t)?f=t:f=[t]);for(var m=[],h=0;h<f.length;++h){t=f[h],typeof t=="string"&&(t=wi.certificateFromPem(t));var p=h===0?o:void 0,g=wi.certificateToAsn1(t),y=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.certBag).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.x509Certificate).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,_e.toDer(g).getBytes())])])]),p]);m.push(y)}if(m.length>0){var x=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,m),b=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.data).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,_e.toDer(x).getBytes())])]);u.push(b)}var E=null;if(e!==null){var _=wi.wrapRsaPrivateKey(wi.privateKeyToAsn1(e));r===null?E=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.keyBag).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[_]),o]):E=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.pkcs8ShroudedKeyBag).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[wi.encryptPrivateKeyInfo(_,r,n)]),o]);var k=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[E]),B=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.data).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,_e.toDer(k).getBytes())])]);u.push(B)}var N=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,u),M;if(n.useMac){var l=rs.md.sha1.create(),Z=new rs.util.ByteBuffer(rs.random.getBytes(n.saltSize)),he=n.count,e=sk.generateKey(r,Z,3,he,20),ee=rs.hmac.create();ee.start(l,e),ee.update(_e.toDer(N).getBytes());var G=ee.getMac();M=_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.sha1).getBytes()),_e.create(_e.Class.UNIVERSAL,_e.Type.NULL,!1,"")]),_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,G.getBytes())]),_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,Z.getBytes()),_e.create(_e.Class.UNIVERSAL,_e.Type.INTEGER,!1,_e.integerToDer(he).getBytes())])}return _e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.INTEGER,!1,_e.integerToDer(3).getBytes()),_e.create(_e.Class.UNIVERSAL,_e.Type.SEQUENCE,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OID,!1,_e.oidToDer(wi.oids.data).getBytes()),_e.create(_e.Class.CONTEXT_SPECIFIC,0,!0,[_e.create(_e.Class.UNIVERSAL,_e.Type.OCTETSTRING,!1,_e.toDer(N).getBytes())])]),M])};sk.generateKey=rs.pbe.generatePkcs12Key});var nle=H((iYr,LPe)=>{d();var SC=fi();Mh();IC();Kae();yb();QW();tle();jW();ik();lo();zW();var rle=SC.asn1,x9=LPe.exports=SC.pki=SC.pki||{};x9.pemToDer=function(e){var t=SC.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return SC.util.createBuffer(t.body)};x9.privateKeyFromPem=function(e){var t=SC.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=rle.fromDer(t.body);return x9.privateKeyFromAsn1(n)};x9.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:rle.toDer(x9.privateKeyToAsn1(e)).getBytes()};return SC.pem.encode(r,{maxline:t})};x9.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:rle.toDer(e).getBytes()};return SC.pem.encode(r,{maxline:t})}});var cle=H((sYr,GPe)=>{d();var Dt=fi();Mh();d9();NW();yb();nle();nm();g9();lo();var XW=s(function(e,t,r,n){var i=Dt.util.createBuffer(),o=e.length>>1,a=o+(e.length&1),l=e.substr(0,a),c=e.substr(o,a),u=Dt.util.createBuffer(),f=Dt.hmac.create();r=t+r;var m=Math.ceil(n/16),h=Math.ceil(n/20);f.start("MD5",l);var p=Dt.util.createBuffer();u.putBytes(r);for(var g=0;g<m;++g)f.start(null,null),f.update(u.getBytes()),u.putBuffer(f.digest()),f.start(null,null),f.update(u.bytes()+r),p.putBuffer(f.digest());f.start("SHA1",c);var y=Dt.util.createBuffer();u.clear(),u.putBytes(r);for(var g=0;g<h;++g)f.start(null,null),f.update(u.getBytes()),u.putBuffer(f.digest()),f.start(null,null),f.update(u.bytes()+r),y.putBuffer(f.digest());return i.putBytes(Dt.util.xorBytes(p.getBytes(),y.getBytes(),n)),i},"prf_TLS1"),i9t=s(function(e,t,r){var n=Dt.hmac.create();n.start("SHA1",e);var i=Dt.util.createBuffer();return i.putInt32(t[0]),i.putInt32(t[1]),i.putByte(r.type),i.putByte(r.version.major),i.putByte(r.version.minor),i.putInt16(r.length),i.putBytes(r.fragment.bytes()),n.update(i.getBytes()),n.digest().getBytes()},"hmac_sha1"),o9t=s(function(e,t,r){var n=!1;try{var i=e.deflate(t.fragment.getBytes());t.fragment=Dt.util.createBuffer(i),t.length=i.length,n=!0}catch{}return n},"deflate"),s9t=s(function(e,t,r){var n=!1;try{var i=e.inflate(t.fragment.getBytes());t.fragment=Dt.util.createBuffer(i),t.length=i.length,n=!0}catch{}return n},"inflate"),Pf=s(function(e,t){var r=0;switch(t){case 1:r=e.getByte();break;case 2:r=e.getInt16();break;case 3:r=e.getInt24();break;case 4:r=e.getInt32();break}return Dt.util.createBuffer(e.getBytes(r))},"readVector"),am=s(function(e,t,r){e.putInt(r.length(),t<<3),e.putBuffer(r)},"writeVector"),te={};te.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};te.SupportedVersions=[te.Versions.TLS_1_1,te.Versions.TLS_1_0];te.Version=te.SupportedVersions[0];te.MaxFragment=15360;te.ConnectionEnd={server:0,client:1};te.PRFAlgorithm={tls_prf_sha256:0};te.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};te.CipherType={stream:0,block:1,aead:2};te.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};te.CompressionMethod={none:0,deflate:1};te.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};te.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};te.Alert={};te.Alert.Level={warning:1,fatal:2};te.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};te.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};te.CipherSuites={};te.getCipherSuite=function(e){var t=null;for(var r in te.CipherSuites){var n=te.CipherSuites[r];if(n.id[0]===e.charCodeAt(0)&&n.id[1]===e.charCodeAt(1)){t=n;break}}return t};te.handleUnexpected=function(e,t){var r=!e.open&&e.entity===te.ConnectionEnd.client;r||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.unexpected_message}})};te.handleHelloRequest=function(e,t,r){!e.handshaking&&e.handshakes>0&&(te.queue(e,te.createAlert(e,{level:te.Alert.Level.warning,description:te.Alert.Description.no_renegotiation})),te.flush(e)),e.process()};te.parseHelloMessage=function(e,t,r){var n=null,i=e.entity===te.ConnectionEnd.client;if(r<38)e.error(e,{message:i?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.illegal_parameter}});else{var o=t.fragment,a=o.length();if(n={version:{major:o.getByte(),minor:o.getByte()},random:Dt.util.createBuffer(o.getBytes(32)),session_id:Pf(o,1),extensions:[]},i?(n.cipher_suite=o.getBytes(2),n.compression_method=o.getByte()):(n.cipher_suites=Pf(o,2),n.compression_methods=Pf(o,1)),a=r-(a-o.length()),a>0){for(var l=Pf(o,2);l.length()>0;)n.extensions.push({type:[l.getByte(),l.getByte()],data:Pf(l,2)});if(!i)for(var c=0;c<n.extensions.length;++c){var u=n.extensions[c];if(u.type[0]===0&&u.type[1]===0)for(var f=Pf(u.data,2);f.length()>0;){var m=f.getByte();if(m!==0)break;e.session.extensions.server_name.serverNameList.push(Pf(f,2).getBytes())}}}if(e.session.version&&(n.version.major!==e.session.version.major||n.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.protocol_version}});if(i)e.session.cipherSuite=te.getCipherSuite(n.cipher_suite);else for(var h=Dt.util.createBuffer(n.cipher_suites.bytes());h.length()>0&&(e.session.cipherSuite=te.getCipherSuite(h.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.handshake_failure},cipherSuite:Dt.util.bytesToHex(n.cipher_suite)});i?e.session.compressionMethod=n.compression_method:e.session.compressionMethod=te.CompressionMethod.none}return n};te.createSecurityParameters=function(e,t){var r=e.entity===te.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:te.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:te.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:o}};te.handleServerHello=function(e,t,r){var n=te.parseHelloMessage(e,t,r);if(!e.fail){if(n.version.minor<=e.version.minor)e.version.minor=n.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.protocol_version}});e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=QPe,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=l9t,e.session.resuming=!1,te.createSecurityParameters(e,n)),e.session.id=i,e.process()}};te.handleClientHello=function(e,t,r){var n=te.parseHelloMessage(e,t,r);if(!e.fail){var i=n.session_id.bytes(),o=null;if(e.sessionCache&&(o=e.sessionCache.getSession(i),o===null?i="":(o.version.major!==n.version.major||o.version.minor>n.version.minor)&&(o=null,i="")),i.length===0&&(i=Dt.random.getBytes(32)),e.session.id=i,e.session.clientHelloVersion=n.version,e.session.sp={},o)e.version=e.session.version=o.version,e.session.sp=o.sp;else{for(var a,l=1;l<te.SupportedVersions.length&&(a=te.SupportedVersions[l],!(a.minor<=n.version.minor));++l);e.version={major:a.major,minor:a.minor},e.session.version=e.version}o!==null?(e.expect=ale,e.session.resuming=!0,e.session.sp.client_random=n.random.bytes()):(e.expect=e.verifyClient!==!1?p9t:sle,e.session.resuming=!1,te.createSecurityParameters(e,n)),e.open=!0,te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createServerHello(e)})),e.session.resuming?(te.queue(e,te.createRecord(e,{type:te.ContentType.change_cipher_spec,data:te.createChangeCipherSpec()})),e.state.pending=te.createConnectionState(e),e.state.current.write=e.state.pending.write,te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createFinished(e)}))):(te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createCertificate(e)})),e.fail||(te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createServerKeyExchange(e)})),e.verifyClient!==!1&&te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createCertificateRequest(e)})),te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createServerHelloDone(e)})))),te.flush(e),e.process()}};te.handleCertificate=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_list:Pf(n,3)},o,a,l=[];try{for(;i.certificate_list.length()>0;)o=Pf(i.certificate_list,3),a=Dt.asn1.fromDer(o),o=Dt.pki.certificateFromAsn1(a,!0),l.push(o)}catch(u){return e.error(e,{message:"Could not parse certificate list.",cause:u,send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.bad_certificate}})}var c=e.entity===te.ConnectionEnd.client;(c||e.verifyClient===!0)&&l.length===0?e.error(e,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.illegal_parameter}}):l.length===0?e.expect=c?FPe:sle:(c?e.session.serverCertificate=l[0]:e.session.clientCertificate=l[0],te.verifyCertificateChain(e,l)&&(e.expect=c?FPe:sle)),e.process()};te.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.unsupported_certificate}});e.expect=c9t,e.process()};te.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.unsupported_certificate}});var n=t.fragment,i={enc_pre_master_secret:Pf(n,2).getBytes()},o=null;if(e.getPrivateKey)try{o=e.getPrivateKey(e,e.session.serverCertificate),o=Dt.pki.privateKeyFromPem(o)}catch(c){e.error(e,{message:"Could not get private key.",cause:c,send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.internal_error}})}if(o===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.internal_error}});try{var a=e.session.sp;a.pre_master_secret=o.decrypt(i.enc_pre_master_secret);var l=e.session.clientHelloVersion;if(l.major!==a.pre_master_secret.charCodeAt(0)||l.minor!==a.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{a.pre_master_secret=Dt.random.getBytes(48)}e.expect=ale,e.session.clientCertificate!==null&&(e.expect=g9t),e.process()};te.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:Pf(n,1),certificate_authorities:Pf(n,2)};e.session.certificateRequest=i,e.expect=u9t,e.process()};te.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.illegal_parameter}});var n=t.fragment;n.read-=4;var i=n.bytes();n.read+=4;var o={signature:Pf(n,2).getBytes()},a=Dt.util.createBuffer();a.putBuffer(e.session.md5.digest()),a.putBuffer(e.session.sha1.digest()),a=a.getBytes();try{var l=e.session.clientCertificate;if(!l.publicKey.verify(a,o.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(i),e.session.sha1.update(i)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.handshake_failure}})}e.expect=ale,e.process()};te.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.record_overflow}});if(e.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.insufficient_security}},i=0,o=e.verify(e,n.alert.description,i,[]);if(o!==!0)return(o||o===0)&&(typeof o=="object"&&!Dt.util.isArray(o)?(o.message&&(n.message=o.message),o.alert&&(n.alert.description=o.alert)):typeof o=="number"&&(n.alert.description=o)),e.error(e,n)}e.session.certificateRequest!==null&&(t=te.createRecord(e,{type:te.ContentType.handshake,data:te.createCertificate(e)}),te.queue(e,t)),t=te.createRecord(e,{type:te.ContentType.handshake,data:te.createClientKeyExchange(e)}),te.queue(e,t),e.expect=m9t;var a=s(function(l,c){l.session.certificateRequest!==null&&l.session.clientCertificate!==null&&te.queue(l,te.createRecord(l,{type:te.ContentType.handshake,data:te.createCertificateVerify(l,c)})),te.queue(l,te.createRecord(l,{type:te.ContentType.change_cipher_spec,data:te.createChangeCipherSpec()})),l.state.pending=te.createConnectionState(l),l.state.current.write=l.state.pending.write,te.queue(l,te.createRecord(l,{type:te.ContentType.handshake,data:te.createFinished(l)})),l.expect=QPe,te.flush(l),l.process()},"callback");if(e.session.certificateRequest===null||e.session.clientCertificate===null)return a(e,null);te.getClientSignature(e,a)};te.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.illegal_parameter}});var r=e.entity===te.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=te.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?f9t:A9t,e.process()};te.handleFinished=function(e,t,r){var n=t.fragment;n.read-=4;var i=n.bytes();n.read+=4;var o=t.fragment.getBytes();n=Dt.util.createBuffer(),n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest());var a=e.entity===te.ConnectionEnd.client,l=a?"server finished":"client finished",c=e.session.sp,u=12,f=XW;if(n=f(c.master_secret,l,n.getBytes(),u),n.getBytes()!==o)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.decrypt_error}});e.session.md5.update(i),e.session.sha1.update(i),(e.session.resuming&&a||!e.session.resuming&&!a)&&(te.queue(e,te.createRecord(e,{type:te.ContentType.change_cipher_spec,data:te.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,te.queue(e,te.createRecord(e,{type:te.ContentType.handshake,data:te.createFinished(e)}))),e.expect=a?d9t:y9t,e.handshaking=!1,++e.handshakes,e.peerCertificate=a?e.session.serverCertificate:e.session.clientCertificate,te.flush(e),e.isConnected=!0,e.connected(e),e.process()};te.handleAlert=function(e,t){var r=t.fragment,n={level:r.getByte(),description:r.getByte()},i;switch(n.description){case te.Alert.Description.close_notify:i="Connection closed.";break;case te.Alert.Description.unexpected_message:i="Unexpected message.";break;case te.Alert.Description.bad_record_mac:i="Bad record MAC.";break;case te.Alert.Description.decryption_failed:i="Decryption failed.";break;case te.Alert.Description.record_overflow:i="Record overflow.";break;case te.Alert.Description.decompression_failure:i="Decompression failed.";break;case te.Alert.Description.handshake_failure:i="Handshake failure.";break;case te.Alert.Description.bad_certificate:i="Bad certificate.";break;case te.Alert.Description.unsupported_certificate:i="Unsupported certificate.";break;case te.Alert.Description.certificate_revoked:i="Certificate revoked.";break;case te.Alert.Description.certificate_expired:i="Certificate expired.";break;case te.Alert.Description.certificate_unknown:i="Certificate unknown.";break;case te.Alert.Description.illegal_parameter:i="Illegal parameter.";break;case te.Alert.Description.unknown_ca:i="Unknown certificate authority.";break;case te.Alert.Description.access_denied:i="Access denied.";break;case te.Alert.Description.decode_error:i="Decode error.";break;case te.Alert.Description.decrypt_error:i="Decrypt error.";break;case te.Alert.Description.export_restriction:i="Export restriction.";break;case te.Alert.Description.protocol_version:i="Unsupported protocol version.";break;case te.Alert.Description.insufficient_security:i="Insufficient security.";break;case te.Alert.Description.internal_error:i="Internal error.";break;case te.Alert.Description.user_canceled:i="User canceled.";break;case te.Alert.Description.no_renegotiation:i="Renegotiation not supported.";break;default:i="Unknown error.";break}if(n.description===te.Alert.Description.close_notify)return e.close();e.error(e,{message:i,send:!1,origin:e.entity===te.ConnectionEnd.client?"server":"client",alert:n}),e.process()};te.handleHandshake=function(e,t){var r=t.fragment,n=r.getByte(),i=r.getInt24();if(i>r.length())return e.fragmented=t,t.fragment=Dt.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var o=r.bytes(i+4);r.read+=4,n in JW[e.entity][e.expect]?(e.entity===te.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:Dt.md.md5.create(),sha1:Dt.md.sha1.create()}),n!==te.HandshakeType.hello_request&&n!==te.HandshakeType.certificate_verify&&n!==te.HandshakeType.finished&&(e.session.md5.update(o),e.session.sha1.update(o)),JW[e.entity][e.expect][n](e,t,i)):te.handleUnexpected(e,t)};te.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};te.handleHeartbeat=function(e,t){var r=t.fragment,n=r.getByte(),i=r.getInt16(),o=r.getBytes(i);if(n===te.HeartbeatMessageType.heartbeat_request){if(e.handshaking||i>o.length)return e.process();te.queue(e,te.createRecord(e,{type:te.ContentType.heartbeat,data:te.createHeartbeat(te.HeartbeatMessageType.heartbeat_response,o)})),te.flush(e)}else if(n===te.HeartbeatMessageType.heartbeat_response){if(o!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,Dt.util.createBuffer(o))}e.process()};var a9t=0,l9t=1,FPe=2,c9t=3,u9t=4,QPe=5,f9t=6,d9t=7,m9t=8,h9t=0,p9t=1,sle=2,g9t=3,ale=4,A9t=5,y9t=6,X=te.handleUnexpected,OPe=te.handleChangeCipherSpec,mc=te.handleAlert,B0=te.handleHandshake,UPe=te.handleApplicationData,hc=te.handleHeartbeat,lle=[];lle[te.ConnectionEnd.client]=[[X,mc,B0,X,hc],[X,mc,B0,X,hc],[X,mc,B0,X,hc],[X,mc,B0,X,hc],[X,mc,B0,X,hc],[OPe,mc,X,X,hc],[X,mc,B0,X,hc],[X,mc,B0,UPe,hc],[X,mc,B0,X,hc]];lle[te.ConnectionEnd.server]=[[X,mc,B0,X,hc],[X,mc,B0,X,hc],[X,mc,B0,X,hc],[X,mc,B0,X,hc],[OPe,mc,X,X,hc],[X,mc,B0,X,hc],[X,mc,B0,UPe,hc],[X,mc,B0,X,hc]];var RC=te.handleHelloRequest,C9t=te.handleServerHello,qPe=te.handleCertificate,MPe=te.handleServerKeyExchange,ile=te.handleCertificateRequest,YW=te.handleServerHelloDone,WPe=te.handleFinished,JW=[];JW[te.ConnectionEnd.client]=[[X,X,C9t,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,qPe,MPe,ile,YW,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,X,MPe,ile,YW,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,X,X,ile,YW,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,X,X,X,YW,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,WPe],[RC,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X],[RC,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X]];var x9t=te.handleClientHello,v9t=te.handleClientKeyExchange,b9t=te.handleCertificateVerify;JW[te.ConnectionEnd.server]=[[X,x9t,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X],[X,X,X,X,X,X,X,X,X,X,X,qPe,X,X,X,X,X,X,X,X,X],[X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,v9t,X,X,X,X],[X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,b9t,X,X,X,X,X],[X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X],[X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,WPe],[X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X],[X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X]];te.generateKeys=function(e,t){var r=XW,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var i=2*t.mac_key_length+2*t.enc_key_length,o=e.version.major===te.Versions.TLS_1_0.major&&e.version.minor===te.Versions.TLS_1_0.minor;o&&(i+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",n,i),l={client_write_MAC_key:a.getBytes(t.mac_key_length),server_write_MAC_key:a.getBytes(t.mac_key_length),client_write_key:a.getBytes(t.enc_key_length),server_write_key:a.getBytes(t.enc_key_length)};return o&&(l.client_write_IV=a.getBytes(t.fixed_iv_length),l.server_write_IV=a.getBytes(t.fixed_iv_length)),l};te.createConnectionState=function(e){var t=e.entity===te.ConnectionEnd.client,r=s(function(){var o={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:s(function(a){return!0},"cipherFunction"),compressionState:null,compressFunction:s(function(a){return!0},"compressFunction"),updateSequenceNumber:s(function(){o.sequenceNumber[1]===4294967295?(o.sequenceNumber[1]=0,++o.sequenceNumber[0]):++o.sequenceNumber[1]},"updateSequenceNumber")};return o},"createMode"),n={read:r(),write:r()};if(n.read.update=function(o,a){return n.read.cipherFunction(a,n.read)?n.read.compressFunction(o,a,n.read)||o.error(o,{message:"Could not decompress record.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.decompression_failure}}):o.error(o,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.bad_record_mac}}),!o.fail},n.write.update=function(o,a){return n.write.compressFunction(o,a,n.write)?n.write.cipherFunction(a,n.write)||o.error(o,{message:"Could not encrypt record.",send:!1,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.internal_error}}):o.error(o,{message:"Could not compress record.",send:!1,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.internal_error}}),!o.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=te.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case te.CompressionMethod.none:break;case te.CompressionMethod.deflate:n.read.compressFunction=s9t,n.write.compressFunction=o9t;break;default:throw new Error("Unsupported compression algorithm.")}}return n};te.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,r=Dt.util.createBuffer();return r.putInt32(t),r.putBytes(Dt.random.getBytes(28)),r};te.createRecord=function(e,t){if(!t.data)return null;var r={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return r};te.createAlert=function(e,t){var r=Dt.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),te.createRecord(e,{type:te.ContentType.alert,data:r})};te.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=Dt.util.createBuffer(),r=0;r<e.cipherSuites.length;++r){var n=e.cipherSuites[r];t.putByte(n.id[0]),t.putByte(n.id[1])}var i=t.length(),o=Dt.util.createBuffer();o.putByte(te.CompressionMethod.none);var a=o.length(),l=Dt.util.createBuffer();if(e.virtualHost){var c=Dt.util.createBuffer();c.putByte(0),c.putByte(0);var u=Dt.util.createBuffer();u.putByte(0),am(u,2,Dt.util.createBuffer(e.virtualHost));var f=Dt.util.createBuffer();am(f,2,u),am(c,2,f),l.putBuffer(c)}var m=l.length();m>0&&(m+=2);var h=e.session.id,p=h.length+1+2+4+28+2+i+1+a+m,g=Dt.util.createBuffer();return g.putByte(te.HandshakeType.client_hello),g.putInt24(p),g.putByte(e.version.major),g.putByte(e.version.minor),g.putBytes(e.session.sp.client_random),am(g,1,Dt.util.createBuffer(h)),am(g,2,t),am(g,1,o),m>0&&am(g,2,l),g};te.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,n=Dt.util.createBuffer();return n.putByte(te.HandshakeType.server_hello),n.putInt24(r),n.putByte(e.version.major),n.putByte(e.version.minor),n.putBytes(e.session.sp.server_random),am(n,1,Dt.util.createBuffer(t)),n.putByte(e.session.cipherSuite.id[0]),n.putByte(e.session.cipherSuite.id[1]),n.putByte(e.session.compressionMethod),n};te.createCertificate=function(e){var t=e.entity===te.ConnectionEnd.client,r=null;if(e.getCertificate){var n;t?n=e.session.certificateRequest:n=e.session.extensions.server_name.serverNameList,r=e.getCertificate(e,n)}var i=Dt.util.createBuffer();if(r!==null)try{Dt.util.isArray(r)||(r=[r]);for(var o=null,a=0;a<r.length;++a){var l=Dt.pem.decode(r[a])[0];if(l.type!=="CERTIFICATE"&&l.type!=="X509 CERTIFICATE"&&l.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=l.type,c}if(l.procType&&l.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=Dt.util.createBuffer(l.body);o===null&&(o=Dt.asn1.fromDer(u.bytes(),!1));var f=Dt.util.createBuffer();am(f,3,u),i.putBuffer(f)}r=Dt.pki.certificateFromAsn1(o),t?e.session.clientCertificate=r:e.session.serverCertificate=r}catch(p){return e.error(e,{message:"Could not send certificate list.",cause:p,send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.bad_certificate}})}var m=3+i.length(),h=Dt.util.createBuffer();return h.putByte(te.HandshakeType.certificate),h.putInt24(m),am(h,3,i),h};te.createClientKeyExchange=function(e){var t=Dt.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(Dt.random.getBytes(46));var r=e.session.sp;r.pre_master_secret=t.getBytes();var n=e.session.serverCertificate.publicKey;t=n.encrypt(r.pre_master_secret);var i=t.length+2,o=Dt.util.createBuffer();return o.putByte(te.HandshakeType.client_key_exchange),o.putInt24(i),o.putInt16(t.length),o.putBytes(t),o};te.createServerKeyExchange=function(e){var t=0,r=Dt.util.createBuffer();return t>0&&(r.putByte(te.HandshakeType.server_key_exchange),r.putInt24(t)),r};te.getClientSignature=function(e,t){var r=Dt.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(n,i,o){var a=null;if(n.getPrivateKey)try{a=n.getPrivateKey(n,n.session.clientCertificate),a=Dt.pki.privateKeyFromPem(a)}catch(l){n.error(n,{message:"Could not get private key.",cause:l,send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.internal_error}})}a===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.internal_error}}):i=a.sign(i,null),o(n,i)},e.getSignature(e,r,t)};te.createCertificateVerify=function(e,t){var r=t.length+2,n=Dt.util.createBuffer();return n.putByte(te.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(t.length),n.putBytes(t),n};te.createCertificateRequest=function(e){var t=Dt.util.createBuffer();t.putByte(1);var r=Dt.util.createBuffer();for(var n in e.caStore.certs){var i=e.caStore.certs[n],o=Dt.pki.distinguishedNameToAsn1(i.subject),a=Dt.asn1.toDer(o);r.putInt16(a.length()),r.putBuffer(a)}var l=1+t.length()+2+r.length(),c=Dt.util.createBuffer();return c.putByte(te.HandshakeType.certificate_request),c.putInt24(l),am(c,1,t),am(c,2,r),c};te.createServerHelloDone=function(e){var t=Dt.util.createBuffer();return t.putByte(te.HandshakeType.server_hello_done),t.putInt24(0),t};te.createChangeCipherSpec=function(){var e=Dt.util.createBuffer();return e.putByte(1),e};te.createFinished=function(e){var t=Dt.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===te.ConnectionEnd.client,n=e.session.sp,i=12,o=XW,a=r?"client finished":"server finished";t=o(n.master_secret,a,t.getBytes(),i);var l=Dt.util.createBuffer();return l.putByte(te.HandshakeType.finished),l.putInt24(t.length()),l.putBuffer(t),l};te.createHeartbeat=function(e,t,r){typeof r>"u"&&(r=t.length);var n=Dt.util.createBuffer();n.putByte(e),n.putInt16(r),n.putBytes(t);var i=n.length(),o=Math.max(16,i-r-3);return n.putBytes(Dt.random.getBytes(o)),n};te.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===te.ContentType.handshake||t.type===te.ContentType.alert||t.type===te.ContentType.change_cipher_spec))){if(t.type===te.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var n;if(t.fragment.length()<=te.MaxFragment)n=[t];else{n=[];for(var i=t.fragment.bytes();i.length>te.MaxFragment;)n.push(te.createRecord(e,{type:t.type,data:Dt.util.createBuffer(i.slice(0,te.MaxFragment))})),i=i.slice(te.MaxFragment);i.length>0&&n.push(te.createRecord(e,{type:t.type,data:Dt.util.createBuffer(i)}))}for(var o=0;o<n.length&&!e.fail;++o){var a=n[o],l=e.state.current.write;l.update(e,a)&&e.records.push(a)}}};te.flush=function(e){for(var t=0;t<e.records.length;++t){var r=e.records[t];e.tlsData.putByte(r.type),e.tlsData.putByte(r.version.major),e.tlsData.putByte(r.version.minor),e.tlsData.putInt16(r.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var ole=s(function(e){switch(e){case!0:return!0;case Dt.pki.certificateError.bad_certificate:return te.Alert.Description.bad_certificate;case Dt.pki.certificateError.unsupported_certificate:return te.Alert.Description.unsupported_certificate;case Dt.pki.certificateError.certificate_revoked:return te.Alert.Description.certificate_revoked;case Dt.pki.certificateError.certificate_expired:return te.Alert.Description.certificate_expired;case Dt.pki.certificateError.certificate_unknown:return te.Alert.Description.certificate_unknown;case Dt.pki.certificateError.unknown_ca:return te.Alert.Description.unknown_ca;default:return te.Alert.Description.bad_certificate}},"_certErrorToAlertDesc"),E9t=s(function(e){switch(e){case!0:return!0;case te.Alert.Description.bad_certificate:return Dt.pki.certificateError.bad_certificate;case te.Alert.Description.unsupported_certificate:return Dt.pki.certificateError.unsupported_certificate;case te.Alert.Description.certificate_revoked:return Dt.pki.certificateError.certificate_revoked;case te.Alert.Description.certificate_expired:return Dt.pki.certificateError.certificate_expired;case te.Alert.Description.certificate_unknown:return Dt.pki.certificateError.certificate_unknown;case te.Alert.Description.unknown_ca:return Dt.pki.certificateError.unknown_ca;default:return Dt.pki.certificateError.bad_certificate}},"_alertDescToCertError");te.verifyCertificateChain=function(e,t){try{var r={};for(var n in e.verifyOptions)r[n]=e.verifyOptions[n];r.verify=function(o,a,l){var c=ole(o),u=e.verify(e,o,a,l);if(u!==!0){if(typeof u=="object"&&!Dt.util.isArray(u)){var f=new Error("The application rejected the certificate.");throw f.send=!0,f.alert={level:te.Alert.Level.fatal,description:te.Alert.Description.bad_certificate},u.message&&(f.message=u.message),u.alert&&(f.alert.description=u.alert),f}u!==o&&(u=E9t(u))}return u},Dt.pki.verifyCertificateChain(e.caStore,t,r)}catch(o){var i=o;(typeof i!="object"||Dt.util.isArray(i))&&(i={send:!0,alert:{level:te.Alert.Level.fatal,description:ole(o)}}),"send"in i||(i.send=!0),"alert"in i||(i.alert={level:te.Alert.Level.fatal,description:ole(i.error)}),e.error(e,i)}return!e.fail};te.createSessionCache=function(e,t){var r=null;if(e&&e.getSession&&e.setSession&&e.order)r=e;else{r={},r.cache=e||{},r.capacity=Math.max(t||100,1),r.order=[];for(var n in e)r.order.length<=t?r.order.push(n):delete e[n];r.getSession=function(i){var o=null,a=null;if(i?a=Dt.util.bytesToHex(i):r.order.length>0&&(a=r.order[0]),a!==null&&a in r.cache){o=r.cache[a],delete r.cache[a];for(var l in r.order)if(r.order[l]===a){r.order.splice(l,1);break}}return o},r.setSession=function(i,o){if(r.order.length===r.capacity){var a=r.order.shift();delete r.cache[a]}var a=Dt.util.bytesToHex(i);r.order.push(a),r.cache[a]=o}}return r};te.createConnection=function(e){var t=null;e.caStore?Dt.util.isArray(e.caStore)?t=Dt.pki.createCaStore(e.caStore):t=e.caStore:t=Dt.pki.createCaStore();var r=e.cipherSuites||null;if(r===null){r=[];for(var n in te.CipherSuites)r.push(te.CipherSuites[n])}var i=e.server?te.ConnectionEnd.server:te.ConnectionEnd.client,o=e.sessionCache?te.createSessionCache(e.sessionCache):null,a={version:{major:te.Version.major,minor:te.Version.minor},entity:i,sessionId:e.sessionId,caStore:t,sessionCache:o,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(f,m,h,p){return m},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:Dt.util.createBuffer(),tlsData:Dt.util.createBuffer(),data:Dt.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:s(function(f,m){m.origin=m.origin||(f.entity===te.ConnectionEnd.client?"client":"server"),m.send&&(te.queue(f,te.createAlert(f,m.alert)),te.flush(f));var h=m.fatal!==!1;h&&(f.fail=!0),e.error(f,m),h&&f.close(!1)},"error"),deflate:e.deflate||null,inflate:e.inflate||null};a.reset=function(f){a.version={major:te.Version.major,minor:te.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=a.entity===te.ConnectionEnd.client?a9t:h9t,a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(f||typeof f>"u"),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=te.createConnectionState(a)},a.reset();var l=s(function(f,m){var h=m.type-te.ContentType.change_cipher_spec,p=lle[f.entity][f.expect];h in p?p[h](f,m):te.handleUnexpected(f,m)},"_update"),c=s(function(f){var m=0,h=f.input,p=h.length();if(p<5)m=5-p;else{f.record={type:h.getByte(),version:{major:h.getByte(),minor:h.getByte()},length:h.getInt16(),fragment:Dt.util.createBuffer(),ready:!1};var g=f.record.version.major===f.version.major;g&&f.session&&f.session.version&&(g=f.record.version.minor===f.version.minor),g||f.error(f,{message:"Incompatible TLS version.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.protocol_version}})}return m},"_readRecordHeader"),u=s(function(f){var m=0,h=f.input,p=h.length();if(p<f.record.length)m=f.record.length-p;else{f.record.fragment.putBytes(h.getBytes(f.record.length)),h.compact();var g=f.state.current.read;g.update(f,f.record)&&(f.fragmented!==null&&(f.fragmented.type===f.record.type?(f.fragmented.fragment.putBuffer(f.record.fragment),f.record=f.fragmented):f.error(f,{message:"Invalid fragmented record.",send:!0,alert:{level:te.Alert.Level.fatal,description:te.Alert.Description.unexpected_message}})),f.record.ready=!0)}return m},"_readRecord");return a.handshake=function(f){if(a.entity!==te.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&a.handshakes===0&&(a.fail=!1),a.handshaking=!0,f=f||"";var m=null;f.length>0&&(a.sessionCache&&(m=a.sessionCache.getSession(f)),m===null&&(f="")),f.length===0&&a.sessionCache&&(m=a.sessionCache.getSession(),m!==null&&(f=m.id)),a.session={id:f,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:Dt.md.md5.create(),sha1:Dt.md.sha1.create()},m&&(a.version=m.version,a.session.sp=m.sp),a.session.sp.client_random=te.createRandom().getBytes(),a.open=!0,te.queue(a,te.createRecord(a,{type:te.ContentType.handshake,data:te.createClientHello(a)})),te.flush(a)}},a.process=function(f){var m=0;return f&&a.input.putBytes(f),a.fail||(a.record!==null&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),a.record===null&&(m=c(a)),!a.fail&&a.record!==null&&!a.record.ready&&(m=u(a)),!a.fail&&a.record!==null&&a.record.ready&&l(a,a.record)),m},a.prepare=function(f){return te.queue(a,te.createRecord(a,{type:te.ContentType.application_data,data:Dt.util.createBuffer(f)})),te.flush(a)},a.prepareHeartbeatRequest=function(f,m){return f instanceof Dt.util.ByteBuffer&&(f=f.bytes()),typeof m>"u"&&(m=f.length),a.expectedHeartbeatPayload=f,te.queue(a,te.createRecord(a,{type:te.ContentType.heartbeat,data:te.createHeartbeat(te.HeartbeatMessageType.heartbeat_request,f,m)})),te.flush(a)},a.close=function(f){if(!a.fail&&a.sessionCache&&a.session){var m={id:a.session.id,version:a.session.version,sp:a.session.sp};m.sp.keys=null,a.sessionCache.setSession(m.id,m)}a.open&&(a.open=!1,a.input.clear(),(a.isConnected||a.handshaking)&&(a.isConnected=a.handshaking=!1,te.queue(a,te.createAlert(a,{level:te.Alert.Level.warning,description:te.Alert.Description.close_notify})),te.flush(a)),a.closed(a)),a.reset(f)},a};GPe.exports=Dt.tls=Dt.tls||{};for(KW in te)typeof te[KW]!="function"&&(Dt.tls[KW]=te[KW]);var KW;Dt.tls.prf_tls1=XW;Dt.tls.hmac_sha1=i9t;Dt.tls.createSessionCache=te.createSessionCache;Dt.tls.createConnection=te.createConnection});var VPe=H((cYr,jPe)=>{d();var kC=fi();EC();cle();var lm=jPe.exports=kC.tls;lm.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:s(function(e){e.bulk_cipher_algorithm=lm.BulkCipherAlgorithm.aes,e.cipher_type=lm.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=lm.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},"initSecurityParameters"),initConnectionState:HPe};lm.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:s(function(e){e.bulk_cipher_algorithm=lm.BulkCipherAlgorithm.aes,e.cipher_type=lm.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=lm.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},"initSecurityParameters"),initConnectionState:HPe};function HPe(e,t,r){var n=t.entity===kC.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:kC.cipher.createDecipher("AES-CBC",n?r.keys.server_write_key:r.keys.client_write_key),iv:n?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:kC.cipher.createCipher("AES-CBC",n?r.keys.client_write_key:r.keys.server_write_key),iv:n?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=_9t,e.write.cipherFunction=I9t,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=lm.hmac_sha1}s(HPe,"initConnectionState");function I9t(e,t){var r=!1,n=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(n),t.updateSequenceNumber();var i;e.version.minor===lm.Versions.TLS_1_0.minor?i=t.cipherState.init?null:t.cipherState.iv:i=kC.random.getBytesSync(16),t.cipherState.init=!0;var o=t.cipherState.cipher;return o.start({iv:i}),e.version.minor>=lm.Versions.TLS_1_1.minor&&o.output.putBytes(i),o.update(e.fragment),o.finish(T9t)&&(e.fragment=o.output,e.length=e.fragment.length(),r=!0),r}s(I9t,"encrypt_aes_cbc_sha1");function T9t(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}s(T9t,"encrypt_aes_cbc_sha1_padding");function w9t(e,t,r){var n=!0;if(r){for(var i=t.length(),o=t.last(),a=i-1-o;a<i-1;++a)n=n&&t.at(a)==o;n&&t.truncate(o+1)}return n}s(w9t,"decrypt_aes_cbc_sha1_padding");function _9t(e,t){var r=!1,n;e.version.minor===lm.Versions.TLS_1_0.minor?n=t.cipherState.init?null:t.cipherState.iv:n=e.fragment.getBytes(16),t.cipherState.init=!0;var i=t.cipherState.cipher;i.start({iv:n}),i.update(e.fragment),r=i.finish(w9t);var o=t.macLength,a=kC.random.getBytesSync(o),l=i.output.length();l>=o?(e.fragment=i.output.getBytes(l-o),a=i.output.getBytes(o)):e.fragment=i.output.getBytes(),e.fragment=kC.util.createBuffer(e.fragment),e.length=e.fragment.length();var c=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),r=S9t(t.macKey,a,c)&&r,r}s(_9t,"decrypt_aes_cbc_sha1");function S9t(e,t,r){var n=kC.hmac.create();return n.start("SHA1",e),n.update(t),t=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),t===r}s(S9t,"compareMacs")});var dle=H((dYr,KPe)=>{d();var Es=fi();kg();lo();var ak=KPe.exports=Es.sha512=Es.sha512||{};Es.md.sha512=Es.md.algorithms.sha512=ak;var zPe=Es.sha384=Es.sha512.sha384=Es.sha512.sha384||{};zPe.create=function(){return ak.create("SHA-384")};Es.md.sha384=Es.md.algorithms.sha384=zPe;Es.sha512.sha256=Es.sha512.sha256||{create:s(function(){return ak.create("SHA-512/256")},"create")};Es.md["sha512/256"]=Es.md.algorithms["sha512/256"]=Es.sha512.sha256;Es.sha512.sha224=Es.sha512.sha224||{create:s(function(){return ak.create("SHA-512/224")},"create")};Es.md["sha512/224"]=Es.md.algorithms["sha512/224"]=Es.sha512.sha224;ak.create=function(e){if(YPe||R9t(),typeof e>"u"&&(e="SHA-512"),!(e in Ib))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Ib[e],r=null,n=Es.util.createBuffer(),i=new Array(80),o=0;o<80;++o)i[o]=new Array(2);var a=64;switch(e){case"SHA-384":a=48;break;case"SHA-512/256":a=32;break;case"SHA-512/224":a=28;break}var l={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:a,messageLength:0,fullMessageLength:null,messageLengthSize:16};return l.start=function(){l.messageLength=0,l.fullMessageLength=l.messageLength128=[];for(var c=l.messageLengthSize/4,u=0;u<c;++u)l.fullMessageLength.push(0);n=Es.util.createBuffer(),r=new Array(t.length);for(var u=0;u<t.length;++u)r[u]=t[u].slice(0);return l},l.start(),l.update=function(c,u){u==="utf8"&&(c=Es.util.encodeUtf8(c));var f=c.length;l.messageLength+=f,f=[f/4294967296>>>0,f>>>0];for(var m=l.fullMessageLength.length-1;m>=0;--m)l.fullMessageLength[m]+=f[1],f[1]=f[0]+(l.fullMessageLength[m]/4294967296>>>0),l.fullMessageLength[m]=l.fullMessageLength[m]>>>0,f[0]=f[1]/4294967296>>>0;return n.putBytes(c),$Pe(r,i,n),(n.read>2048||n.length()===0)&&n.compact(),l},l.digest=function(){var c=Es.util.createBuffer();c.putBytes(n.bytes());var u=l.fullMessageLength[l.fullMessageLength.length-1]+l.messageLengthSize,f=u&l.blockLength-1;c.putBytes(ule.substr(0,l.blockLength-f));for(var m,h,p=l.fullMessageLength[0]*8,g=0;g<l.fullMessageLength.length-1;++g)m=l.fullMessageLength[g+1]*8,h=m/4294967296>>>0,p+=h,c.putInt32(p>>>0),p=m>>>0;c.putInt32(p);for(var y=new Array(r.length),g=0;g<r.length;++g)y[g]=r[g].slice(0);$Pe(y,i,c);var x=Es.util.createBuffer(),b;e==="SHA-512"?b=y.length:e==="SHA-384"?b=y.length-2:b=y.length-4;for(var g=0;g<b;++g)x.putInt32(y[g][0]),(g!==b-1||e!=="SHA-512/224")&&x.putInt32(y[g][1]);return x},l};var ule=null,YPe=!1,fle=null,Ib=null;function R9t(){ule="\x80",ule+=Es.util.fillString("\0",128),fle=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Ib={},Ib["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Ib["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Ib["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Ib["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],YPe=!0}s(R9t,"_init");function $Pe(e,t,r){for(var n,i,o,a,l,c,u,f,m,h,p,g,y,x,b,E,_,k,B,N,M,Z,he,ee,G,q,ie,z,j,U,V,K,ae,re,le,ce=r.length();ce>=128;){for(j=0;j<16;++j)t[j][0]=r.getInt32()>>>0,t[j][1]=r.getInt32()>>>0;for(;j<80;++j)K=t[j-2],U=K[0],V=K[1],n=((U>>>19|V<<13)^(V>>>29|U<<3)^U>>>6)>>>0,i=((U<<13|V>>>19)^(V<<3|U>>>29)^(U<<26|V>>>6))>>>0,re=t[j-15],U=re[0],V=re[1],o=((U>>>1|V<<31)^(U>>>8|V<<24)^U>>>7)>>>0,a=((U<<31|V>>>1)^(U<<24|V>>>8)^(U<<25|V>>>7))>>>0,ae=t[j-7],le=t[j-16],V=i+ae[1]+a+le[1],t[j][0]=n+ae[0]+o+le[0]+(V/4294967296>>>0)>>>0,t[j][1]=V>>>0;for(y=e[0][0],x=e[0][1],b=e[1][0],E=e[1][1],_=e[2][0],k=e[2][1],B=e[3][0],N=e[3][1],M=e[4][0],Z=e[4][1],he=e[5][0],ee=e[5][1],G=e[6][0],q=e[6][1],ie=e[7][0],z=e[7][1],j=0;j<80;++j)u=((M>>>14|Z<<18)^(M>>>18|Z<<14)^(Z>>>9|M<<23))>>>0,f=((M<<18|Z>>>14)^(M<<14|Z>>>18)^(Z<<23|M>>>9))>>>0,m=(G^M&(he^G))>>>0,h=(q^Z&(ee^q))>>>0,l=((y>>>28|x<<4)^(x>>>2|y<<30)^(x>>>7|y<<25))>>>0,c=((y<<4|x>>>28)^(x<<30|y>>>2)^(x<<25|y>>>7))>>>0,p=(y&b|_&(y^b))>>>0,g=(x&E|k&(x^E))>>>0,V=z+f+h+fle[j][1]+t[j][1],n=ie+u+m+fle[j][0]+t[j][0]+(V/4294967296>>>0)>>>0,i=V>>>0,V=c+g,o=l+p+(V/4294967296>>>0)>>>0,a=V>>>0,ie=G,z=q,G=he,q=ee,he=M,ee=Z,V=N+i,M=B+n+(V/4294967296>>>0)>>>0,Z=V>>>0,B=_,N=k,_=b,k=E,b=y,E=x,V=i+a,y=n+o+(V/4294967296>>>0)>>>0,x=V>>>0;V=e[0][1]+x,e[0][0]=e[0][0]+y+(V/4294967296>>>0)>>>0,e[0][1]=V>>>0,V=e[1][1]+E,e[1][0]=e[1][0]+b+(V/4294967296>>>0)>>>0,e[1][1]=V>>>0,V=e[2][1]+k,e[2][0]=e[2][0]+_+(V/4294967296>>>0)>>>0,e[2][1]=V>>>0,V=e[3][1]+N,e[3][0]=e[3][0]+B+(V/4294967296>>>0)>>>0,e[3][1]=V>>>0,V=e[4][1]+Z,e[4][0]=e[4][0]+M+(V/4294967296>>>0)>>>0,e[4][1]=V>>>0,V=e[5][1]+ee,e[5][0]=e[5][0]+he+(V/4294967296>>>0)>>>0,e[5][1]=V>>>0,V=e[6][1]+q,e[6][0]=e[6][0]+G+(V/4294967296>>>0)>>>0,e[6][1]=V>>>0,V=e[7][1]+z,e[7][0]=e[7][0]+ie+(V/4294967296>>>0)>>>0,e[7][1]=V>>>0,ce-=128}}s($Pe,"_update")});var JPe=H(mle=>{d();var k9t=fi();Mh();var Ol=k9t.asn1;mle.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};mle.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Ol.Class.UNIVERSAL,type:Ol.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var uNe=H((AYr,cNe)=>{d();var pc=fi();nk();nm();dle();lo();var nNe=JPe(),B9t=nNe.publicKeyValidator,D9t=nNe.privateKeyValidator;typeof XPe>"u"&&(XPe=pc.jsbn.BigInteger);var XPe,gle=pc.util.ByteBuffer,Eu=typeof Buffer>"u"?Uint8Array:Buffer;pc.pki=pc.pki||{};cNe.exports=pc.pki.ed25519=pc.ed25519=pc.ed25519||{};var _i=pc.ed25519;_i.constants={};_i.constants.PUBLIC_KEY_BYTE_LENGTH=32;_i.constants.PRIVATE_KEY_BYTE_LENGTH=64;_i.constants.SEED_BYTE_LENGTH=32;_i.constants.SIGN_BYTE_LENGTH=64;_i.constants.HASH_BYTE_LENGTH=64;_i.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=pc.random.getBytesSync(_i.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==_i.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+_i.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=zA({message:t,encoding:"binary"});for(var r=new Eu(_i.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Eu(_i.constants.PRIVATE_KEY_BYTE_LENGTH),i=0;i<32;++i)n[i]=t[i];return F9t(r,n),{publicKey:r,privateKey:n}};_i.privateKeyFromAsn1=function(e){var t={},r=[],n=pc.asn1.validate(e,D9t,t,r);if(!n){var i=new Error("Invalid Key.");throw i.errors=r,i}var o=pc.asn1.derToOid(t.privateKeyOid),a=pc.oids.EdDSA25519;if(o!==a)throw new Error('Invalid OID "'+o+'"; OID must be "'+a+'".');var l=t.privateKey,c=zA({message:pc.asn1.fromDer(l).value,encoding:"binary"});return{privateKeyBytes:c}};_i.publicKeyFromAsn1=function(e){var t={},r=[],n=pc.asn1.validate(e,B9t,t,r);if(!n){var i=new Error("Invalid Key.");throw i.errors=r,i}var o=pc.asn1.derToOid(t.publicKeyOid),a=pc.oids.EdDSA25519;if(o!==a)throw new Error('Invalid OID "'+o+'"; OID must be "'+a+'".');var l=t.ed25519PublicKey;if(l.length!==_i.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return zA({message:l,encoding:"binary"})};_i.publicKeyFromPrivateKey=function(e){e=e||{};var t=zA({message:e.privateKey,encoding:"binary"});if(t.length!==_i.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+_i.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new Eu(_i.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<r.length;++n)r[n]=t[32+n];return r};_i.sign=function(e){e=e||{};var t=zA(e),r=zA({message:e.privateKey,encoding:"binary"});if(r.length===_i.constants.SEED_BYTE_LENGTH){var n=_i.generateKeyPair({seed:r});r=n.privateKey}else if(r.length!==_i.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+_i.constants.SEED_BYTE_LENGTH+" or "+_i.constants.PRIVATE_KEY_BYTE_LENGTH);var i=new Eu(_i.constants.SIGN_BYTE_LENGTH+t.length);M9t(i,t,t.length,r);for(var o=new Eu(_i.constants.SIGN_BYTE_LENGTH),a=0;a<o.length;++a)o[a]=i[a];return o};_i.verify=function(e){e=e||{};var t=zA(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=zA({message:e.signature,encoding:"binary"});if(r.length!==_i.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+_i.constants.SIGN_BYTE_LENGTH);var n=zA({message:e.publicKey,encoding:"binary"});if(n.length!==_i.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+_i.constants.PUBLIC_KEY_BYTE_LENGTH);var i=new Eu(_i.constants.SIGN_BYTE_LENGTH+t.length),o=new Eu(_i.constants.SIGN_BYTE_LENGTH+t.length),a;for(a=0;a<_i.constants.SIGN_BYTE_LENGTH;++a)i[a]=r[a];for(a=0;a<t.length;++a)i[a+_i.constants.SIGN_BYTE_LENGTH]=t[a];return Q9t(o,i,i.length,n)>=0};function zA(e){var t=e.message;if(t instanceof Uint8Array||t instanceof Eu)return t;var r=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,r);t=new gle(t,r)}else if(!(t instanceof gle))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new Eu(t.length()),i=0;i<n.length;++i)n[i]=t.at(i);return n}s(zA,"messageToNativeBuffer");var Ale=In(),ZW=In([1]),P9t=In([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),N9t=In([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),ZPe=In([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),eNe=In([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),hle=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),L9t=In([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function lk(e,t){var r=pc.md.sha512.create(),n=new gle(e);r.update(n.getBytes(t),"binary");var i=r.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(i,"binary");for(var o=new Eu(_i.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)o[a]=i.charCodeAt(a);return o}s(lk,"sha512");function F9t(e,t){var r=[In(),In(),In(),In()],n,i=lk(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,vle(r,i),xle(e,r),n=0;n<32;++n)t[n+32]=e[n];return 0}s(F9t,"crypto_sign_keypair");function M9t(e,t,r,n){var i,o,a=new Float64Array(64),l=[In(),In(),In(),In()],c=lk(n,32);c[0]&=248,c[31]&=127,c[31]|=64;var u=r+64;for(i=0;i<r;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=c[32+i];var f=lk(e.subarray(32),r+32);for(yle(f),vle(l,f),xle(e,l),i=32;i<64;++i)e[i]=n[i];var m=lk(e,r+64);for(yle(m),i=32;i<64;++i)a[i]=0;for(i=0;i<32;++i)a[i]=f[i];for(i=0;i<32;++i)for(o=0;o<32;o++)a[i+o]+=m[i]*c[o];return iNe(e.subarray(32),a),u}s(M9t,"crypto_sign");function Q9t(e,t,r,n){var i,o,a=new Eu(32),l=[In(),In(),In(),In()],c=[In(),In(),In(),In()];if(o=-1,r<64||O9t(c,n))return-1;for(i=0;i<r;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=n[i];var u=lk(e,r);if(yle(u),aNe(l,c,u),vle(c,t.subarray(32)),Cle(l,c),xle(a,l),r-=64,oNe(t,0,a,0)){for(i=0;i<r;++i)e[i]=0;return-1}for(i=0;i<r;++i)e[i]=t[i+64];return o=r,o}s(Q9t,"crypto_sign_open");function iNe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*hle[i-(n-32)],r=t[i]+128>>8,t[i]-=r*256;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*hle[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*hle[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=t[n]&255}s(iNe,"modL");function yle(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;iNe(e,t)}s(yle,"reduce");function Cle(e,t){var r=In(),n=In(),i=In(),o=In(),a=In(),l=In(),c=In(),u=In(),f=In();b9(r,e[1],e[0]),b9(f,t[1],t[0]),Ho(r,r,f),v9(n,e[0],e[1]),v9(f,t[0],t[1]),Ho(n,n,f),Ho(i,e[3],t[3]),Ho(i,i,N9t),Ho(o,e[2],t[2]),v9(o,o,o),b9(a,n,r),b9(l,o,i),v9(c,o,i),v9(u,n,r),Ho(e[0],a,l),Ho(e[1],u,c),Ho(e[2],c,l),Ho(e[3],a,u)}s(Cle,"add");function tNe(e,t,r){for(var n=0;n<4;++n)lNe(e[n],t[n],r)}s(tNe,"cswap");function xle(e,t){var r=In(),n=In(),i=In();G9t(i,t[2]),Ho(r,t[0],i),Ho(n,t[1],i),eG(e,n),e[31]^=sNe(r)<<7}s(xle,"pack");function eG(e,t){var r,n,i,o=In(),a=In();for(r=0;r<16;++r)a[r]=t[r];for(ple(a),ple(a),ple(a),n=0;n<2;++n){for(o[0]=a[0]-65517,r=1;r<15;++r)o[r]=a[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=a[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,lNe(a,o,1-i)}for(r=0;r<16;r++)e[2*r]=a[r]&255,e[2*r+1]=a[r]>>8}s(eG,"pack25519");function O9t(e,t){var r=In(),n=In(),i=In(),o=In(),a=In(),l=In(),c=In();return BC(e[2],ZW),U9t(e[1],t),Tb(i,e[1]),Ho(o,i,P9t),b9(i,i,e[2]),v9(o,e[2],o),Tb(a,o),Tb(l,a),Ho(c,l,a),Ho(r,c,i),Ho(r,r,o),q9t(r,r),Ho(r,r,i),Ho(r,r,o),Ho(r,r,o),Ho(e[0],r,o),Tb(n,e[0]),Ho(n,n,o),rNe(n,i)&&Ho(e[0],e[0],L9t),Tb(n,e[0]),Ho(n,n,o),rNe(n,i)?-1:(sNe(e[0])===t[31]>>7&&b9(e[0],Ale,e[0]),Ho(e[3],e[0],e[1]),0)}s(O9t,"unpackneg");function U9t(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}s(U9t,"unpack25519");function q9t(e,t){var r=In(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=250;n>=0;--n)Tb(r,r),n!==1&&Ho(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}s(q9t,"pow2523");function rNe(e,t){var r=new Eu(32),n=new Eu(32);return eG(r,e),eG(n,t),oNe(r,0,n,0)}s(rNe,"neq25519");function oNe(e,t,r,n){return W9t(e,t,r,n,32)}s(oNe,"crypto_verify_32");function W9t(e,t,r,n,i){var o,a=0;for(o=0;o<i;++o)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}s(W9t,"vn");function sNe(e){var t=new Eu(32);return eG(t,e),t[0]&1}s(sNe,"par25519");function aNe(e,t,r){var n,i;for(BC(e[0],Ale),BC(e[1],ZW),BC(e[2],ZW),BC(e[3],Ale),i=255;i>=0;--i)n=r[i/8|0]>>(i&7)&1,tNe(e,t,n),Cle(t,e),Cle(e,e),tNe(e,t,n)}s(aNe,"scalarmult");function vle(e,t){var r=[In(),In(),In(),In()];BC(r[0],ZPe),BC(r[1],eNe),BC(r[2],ZW),Ho(r[3],ZPe,eNe),aNe(e,r,t)}s(vle,"scalarbase");function BC(e,t){var r;for(r=0;r<16;r++)e[r]=t[r]|0}s(BC,"set25519");function G9t(e,t){var r=In(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=253;n>=0;--n)Tb(r,r),n!==2&&n!==4&&Ho(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}s(G9t,"inv25519");function ple(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-n*65536;e[0]+=n-1+37*(n-1)}s(ple,"car25519");function lNe(e,t,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}s(lNe,"sel25519");function In(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;++t)r[t]=e[t];return r}s(In,"gf");function v9(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]+r[n]}s(v9,"A");function b9(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]-r[n]}s(b9,"Z");function Tb(e,t){Ho(e,t,t)}s(Tb,"S");function Ho(e,t,r){var n,i,o=0,a=0,l=0,c=0,u=0,f=0,m=0,h=0,p=0,g=0,y=0,x=0,b=0,E=0,_=0,k=0,B=0,N=0,M=0,Z=0,he=0,ee=0,G=0,q=0,ie=0,z=0,j=0,U=0,V=0,K=0,ae=0,re=r[0],le=r[1],ce=r[2],De=r[3],be=r[4],qe=r[5],Re=r[6],Xe=r[7],ft=r[8],at=r[9],lt=r[10],oe=r[11],Ne=r[12],Ae=r[13],Ge=r[14],Y=r[15];n=t[0],o+=n*re,a+=n*le,l+=n*ce,c+=n*De,u+=n*be,f+=n*qe,m+=n*Re,h+=n*Xe,p+=n*ft,g+=n*at,y+=n*lt,x+=n*oe,b+=n*Ne,E+=n*Ae,_+=n*Ge,k+=n*Y,n=t[1],a+=n*re,l+=n*le,c+=n*ce,u+=n*De,f+=n*be,m+=n*qe,h+=n*Re,p+=n*Xe,g+=n*ft,y+=n*at,x+=n*lt,b+=n*oe,E+=n*Ne,_+=n*Ae,k+=n*Ge,B+=n*Y,n=t[2],l+=n*re,c+=n*le,u+=n*ce,f+=n*De,m+=n*be,h+=n*qe,p+=n*Re,g+=n*Xe,y+=n*ft,x+=n*at,b+=n*lt,E+=n*oe,_+=n*Ne,k+=n*Ae,B+=n*Ge,N+=n*Y,n=t[3],c+=n*re,u+=n*le,f+=n*ce,m+=n*De,h+=n*be,p+=n*qe,g+=n*Re,y+=n*Xe,x+=n*ft,b+=n*at,E+=n*lt,_+=n*oe,k+=n*Ne,B+=n*Ae,N+=n*Ge,M+=n*Y,n=t[4],u+=n*re,f+=n*le,m+=n*ce,h+=n*De,p+=n*be,g+=n*qe,y+=n*Re,x+=n*Xe,b+=n*ft,E+=n*at,_+=n*lt,k+=n*oe,B+=n*Ne,N+=n*Ae,M+=n*Ge,Z+=n*Y,n=t[5],f+=n*re,m+=n*le,h+=n*ce,p+=n*De,g+=n*be,y+=n*qe,x+=n*Re,b+=n*Xe,E+=n*ft,_+=n*at,k+=n*lt,B+=n*oe,N+=n*Ne,M+=n*Ae,Z+=n*Ge,he+=n*Y,n=t[6],m+=n*re,h+=n*le,p+=n*ce,g+=n*De,y+=n*be,x+=n*qe,b+=n*Re,E+=n*Xe,_+=n*ft,k+=n*at,B+=n*lt,N+=n*oe,M+=n*Ne,Z+=n*Ae,he+=n*Ge,ee+=n*Y,n=t[7],h+=n*re,p+=n*le,g+=n*ce,y+=n*De,x+=n*be,b+=n*qe,E+=n*Re,_+=n*Xe,k+=n*ft,B+=n*at,N+=n*lt,M+=n*oe,Z+=n*Ne,he+=n*Ae,ee+=n*Ge,G+=n*Y,n=t[8],p+=n*re,g+=n*le,y+=n*ce,x+=n*De,b+=n*be,E+=n*qe,_+=n*Re,k+=n*Xe,B+=n*ft,N+=n*at,M+=n*lt,Z+=n*oe,he+=n*Ne,ee+=n*Ae,G+=n*Ge,q+=n*Y,n=t[9],g+=n*re,y+=n*le,x+=n*ce,b+=n*De,E+=n*be,_+=n*qe,k+=n*Re,B+=n*Xe,N+=n*ft,M+=n*at,Z+=n*lt,he+=n*oe,ee+=n*Ne,G+=n*Ae,q+=n*Ge,ie+=n*Y,n=t[10],y+=n*re,x+=n*le,b+=n*ce,E+=n*De,_+=n*be,k+=n*qe,B+=n*Re,N+=n*Xe,M+=n*ft,Z+=n*at,he+=n*lt,ee+=n*oe,G+=n*Ne,q+=n*Ae,ie+=n*Ge,z+=n*Y,n=t[11],x+=n*re,b+=n*le,E+=n*ce,_+=n*De,k+=n*be,B+=n*qe,N+=n*Re,M+=n*Xe,Z+=n*ft,he+=n*at,ee+=n*lt,G+=n*oe,q+=n*Ne,ie+=n*Ae,z+=n*Ge,j+=n*Y,n=t[12],b+=n*re,E+=n*le,_+=n*ce,k+=n*De,B+=n*be,N+=n*qe,M+=n*Re,Z+=n*Xe,he+=n*ft,ee+=n*at,G+=n*lt,q+=n*oe,ie+=n*Ne,z+=n*Ae,j+=n*Ge,U+=n*Y,n=t[13],E+=n*re,_+=n*le,k+=n*ce,B+=n*De,N+=n*be,M+=n*qe,Z+=n*Re,he+=n*Xe,ee+=n*ft,G+=n*at,q+=n*lt,ie+=n*oe,z+=n*Ne,j+=n*Ae,U+=n*Ge,V+=n*Y,n=t[14],_+=n*re,k+=n*le,B+=n*ce,N+=n*De,M+=n*be,Z+=n*qe,he+=n*Re,ee+=n*Xe,G+=n*ft,q+=n*at,ie+=n*lt,z+=n*oe,j+=n*Ne,U+=n*Ae,V+=n*Ge,K+=n*Y,n=t[15],k+=n*re,B+=n*le,N+=n*ce,M+=n*De,Z+=n*be,he+=n*qe,ee+=n*Re,G+=n*Xe,q+=n*ft,ie+=n*at,z+=n*lt,j+=n*oe,U+=n*Ne,V+=n*Ae,K+=n*Ge,ae+=n*Y,o+=38*B,a+=38*N,l+=38*M,c+=38*Z,u+=38*he,f+=38*ee,m+=38*G,h+=38*q,p+=38*ie,g+=38*z,y+=38*j,x+=38*U,b+=38*V,E+=38*K,_+=38*ae,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=l+i+65535,i=Math.floor(n/65536),l=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=g+i+65535,i=Math.floor(n/65536),g=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=x+i+65535,i=Math.floor(n/65536),x=n-i*65536,n=b+i+65535,i=Math.floor(n/65536),b=n-i*65536,n=E+i+65535,i=Math.floor(n/65536),E=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=k+i+65535,i=Math.floor(n/65536),k=n-i*65536,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=l+i+65535,i=Math.floor(n/65536),l=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=g+i+65535,i=Math.floor(n/65536),g=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=x+i+65535,i=Math.floor(n/65536),x=n-i*65536,n=b+i+65535,i=Math.floor(n/65536),b=n-i*65536,n=E+i+65535,i=Math.floor(n/65536),E=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=k+i+65535,i=Math.floor(n/65536),k=n-i*65536,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=l,e[3]=c,e[4]=u,e[5]=f,e[6]=m,e[7]=h,e[8]=p,e[9]=g,e[10]=y,e[11]=x,e[12]=b,e[13]=E,e[14]=_,e[15]=k}s(Ho,"M")});var hNe=H((xYr,mNe)=>{d();var Nf=fi();lo();nm();nk();mNe.exports=Nf.kem=Nf.kem||{};var fNe=Nf.jsbn.BigInteger;Nf.kem.rsa={};Nf.kem.rsa.create=function(e,t){t=t||{};var r=t.prng||Nf.random,n={};return n.encrypt=function(i,o){var a=Math.ceil(i.n.bitLength()/8),l;do l=new fNe(Nf.util.bytesToHex(r.getBytesSync(a)),16).mod(i.n);while(l.compareTo(fNe.ONE)<=0);l=Nf.util.hexToBytes(l.toString(16));var c=a-l.length;c>0&&(l=Nf.util.fillString("\0",c)+l);var u=i.encrypt(l,"NONE"),f=e.generate(l,o);return{encapsulation:u,key:f}},n.decrypt=function(i,o,a){var l=i.decrypt(o,"NONE");return e.generate(l,a)},n};Nf.kem.kdf1=function(e,t){dNe(this,e,0,t||e.digestLength)};Nf.kem.kdf2=function(e,t){dNe(this,e,1,t||e.digestLength)};function dNe(e,t,r,n){e.generate=function(i,o){for(var a=new Nf.util.ByteBuffer,l=Math.ceil(o/n)+r,c=new Nf.util.ByteBuffer,u=r;u<l;++u){c.putInt32(u),t.start(),t.update(i+c.getBytes());var f=t.digest();a.putBytes(f.getBytes(n))}return a.truncate(a.length()-o),a.getBytes()}}s(dNe,"_createKDF")});var yNe=H((EYr,ANe)=>{d();var Qi=fi();lo();ANe.exports=Qi.log=Qi.log||{};Qi.log.levels=["none","error","warning","info","debug","verbose","max"];var tG={},Ile=[],uk=null;Qi.log.LEVEL_LOCKED=2;Qi.log.NO_LEVEL_CHECK=4;Qi.log.INTERPOLATE=8;for(Qg=0;Qg<Qi.log.levels.length;++Qg)ble=Qi.log.levels[Qg],tG[ble]={index:Qg,name:ble.toUpperCase()};var ble,Qg;Qi.log.logMessage=function(e){for(var t=tG[e.level].index,r=0;r<Ile.length;++r){var n=Ile[r];if(n.flags&Qi.log.NO_LEVEL_CHECK)n.f(e);else{var i=tG[n.level].index;t<=i&&n.f(n,e)}}};Qi.log.prepareStandard=function(e){"standard"in e||(e.standard=tG[e.level].name+" ["+e.category+"] "+e.message)};Qi.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=Qi.util.format.apply(this,t)}};Qi.log.prepareStandardFull=function(e){"standardFull"in e||(Qi.log.prepareStandard(e),e.standardFull=e.standard)};for(Ele=["error","warning","info","debug","verbose"],Qg=0;Qg<Ele.length;++Qg)(function(t){Qi.log[t]=function(r,n){var i=Array.prototype.slice.call(arguments).slice(2),o={timestamp:new Date,level:t,category:r,message:n,arguments:i};Qi.log.logMessage(o)}})(Ele[Qg]);var Ele,Qg;Qi.log.makeLogger=function(e){var t={flags:0,f:e};return Qi.log.setLevel(t,"none"),t};Qi.log.setLevel=function(e,t){var r=!1;if(e&&!(e.flags&Qi.log.LEVEL_LOCKED))for(var n=0;n<Qi.log.levels.length;++n){var i=Qi.log.levels[n];if(t==i){e.level=t,r=!0;break}}return r};Qi.log.lock=function(e,t){typeof t>"u"||t?e.flags|=Qi.log.LEVEL_LOCKED:e.flags&=~Qi.log.LEVEL_LOCKED};Qi.log.addLogger=function(e){Ile.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(pNe={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},fk=s(function(e,t){Qi.log.prepareStandard(t);var r=pNe[t.level],n=[t.standard];n=n.concat(t.arguments.slice()),r.apply(console,n)},"f"),E9=Qi.log.makeLogger(fk)):(fk=s(function(t,r){Qi.log.prepareStandardFull(r),console.log(r.standardFull)},"f"),E9=Qi.log.makeLogger(fk)),Qi.log.setLevel(E9,"debug"),Qi.log.addLogger(E9),uk=E9):console={log:s(function(){},"log")};var E9,pNe,fk;uk!==null&&typeof window<"u"&&window.location&&(ck=new URL(window.location.href).searchParams,ck.has("console.level")&&Qi.log.setLevel(uk,ck.get("console.level").slice(-1)[0]),ck.has("console.lock")&&(gNe=ck.get("console.lock").slice(-1)[0],gNe=="true"&&Qi.log.lock(uk)));var ck,gNe;Qi.log.consoleLogger=uk});var xNe=H((wYr,CNe)=>{d();CNe.exports=kg();NW();g9();Mae();dle()});var ENe=H((SYr,bNe)=>{d();var Ar=fi();EC();Mh();tk();IC();yb();Jae();nm();lo();zW();var Pe=Ar.asn1,D0=bNe.exports=Ar.pkcs7=Ar.pkcs7||{};D0.messageFromPem=function(e){var t=Ar.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=Pe.fromDer(t.body);return D0.messageFromAsn1(n)};D0.messageToPem=function(e,t){var r={type:"PKCS7",body:Pe.toDer(e.toAsn1()).getBytes()};return Ar.pem.encode(r,{maxline:t})};D0.messageFromAsn1=function(e){var t={},r=[];if(!Pe.validate(e,D0.asn1.contentInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var i=Pe.derToOid(t.contentType),o;switch(i){case Ar.pki.oids.envelopedData:o=D0.createEnvelopedData();break;case Ar.pki.oids.encryptedData:o=D0.createEncryptedData();break;case Ar.pki.oids.signedData:o=D0.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+i+" is not (yet) supported.")}return o.fromAsn1(t.content.value[0]),o};D0.createSignedData=function(){var e=null;return e={type:Ar.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:s(function(n){if(wle(e,n,D0.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var i=e.rawCapture.certificates.value,o=0;o<i.length;++o)e.certificates.push(Ar.pki.certificateFromAsn1(i[o]))},"fromAsn1"),toAsn1:s(function(){e.contentInfo||e.sign();for(var n=[],i=0;i<e.certificates.length;++i)n.push(Ar.pki.certificateToAsn1(e.certificates[i]));var o=[],a=Pe.create(Pe.Class.CONTEXT_SPECIFIC,0,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.INTEGER,!1,Pe.integerToDer(e.version).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return n.length>0&&a.value[0].value.push(Pe.create(Pe.Class.CONTEXT_SPECIFIC,0,!0,n)),o.length>0&&a.value[0].value.push(Pe.create(Pe.Class.CONTEXT_SPECIFIC,1,!0,o)),a.value[0].value.push(Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SET,!0,e.signerInfos)),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.type).getBytes()),a])},"toAsn1"),addSigner:s(function(n){var i=n.issuer,o=n.serialNumber;if(n.certificate){var a=n.certificate;typeof a=="string"&&(a=Ar.pki.certificateFromPem(a)),i=a.issuer.attributes,o=a.serialNumber}var l=n.key;if(!l)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof l=="string"&&(l=Ar.pki.privateKeyFromPem(l));var c=n.digestAlgorithm||Ar.pki.oids.sha1;switch(c){case Ar.pki.oids.sha1:case Ar.pki.oids.sha256:case Ar.pki.oids.sha384:case Ar.pki.oids.sha512:case Ar.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var u=n.authenticatedAttributes||[];if(u.length>0){for(var f=!1,m=!1,h=0;h<u.length;++h){var p=u[h];if(!f&&p.type===Ar.pki.oids.contentType){if(f=!0,m)break;continue}if(!m&&p.type===Ar.pki.oids.messageDigest){if(m=!0,f)break;continue}}if(!f||!m)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:l,version:1,issuer:i,serialNumber:o,digestAlgorithm:c,signatureAlgorithm:Ar.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},"addSigner"),sign:s(function(n){if(n=n||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(Ar.pki.oids.data).getBytes())]),"content"in e)){var i;e.content instanceof Ar.util.ByteBuffer?i=e.content.bytes():typeof e.content=="string"&&(i=Ar.util.encodeUtf8(e.content)),n.detached?e.detachedContent=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,i):e.contentInfo.value.push(Pe.create(Pe.Class.CONTEXT_SPECIFIC,0,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,i)]))}if(e.signers.length!==0){var o=t();r(o)}},"sign"),verify:s(function(){throw new Error("PKCS#7 signature verification not yet implemented.")},"verify"),addCertificate:s(function(n){typeof n=="string"&&(n=Ar.pki.certificateFromPem(n)),e.certificates.push(n)},"addCertificate"),addCertificateRevokationList:s(function(n){throw new Error("PKCS#7 CRL support not yet implemented.")},"addCertificateRevokationList")},e;function t(){for(var n={},i=0;i<e.signers.length;++i){var o=e.signers[i],a=o.digestAlgorithm;a in n||(n[a]=Ar.md[Ar.pki.oids[a]].create()),o.authenticatedAttributes.length===0?o.md=n[a]:o.md=Ar.md[Ar.pki.oids[a]].create()}e.digestAlgorithmIdentifiers=[];for(var a in n)e.digestAlgorithmIdentifiers.push(Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(a).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.NULL,!1,"")]));return n}s(t,"addDigestAlgorithmIds");function r(n){var i;if(e.detachedContent?i=e.detachedContent:(i=e.contentInfo.value[1],i=i.value[0]),!i)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var o=Pe.derToOid(e.contentInfo.value[0].value),a=Pe.toDer(i);a.getByte(),Pe.getBerValueLength(a),a=a.getBytes();for(var l in n)n[l].start().update(a);for(var c=new Date,u=0;u<e.signers.length;++u){var f=e.signers[u];if(f.authenticatedAttributes.length===0){if(o!==Ar.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{f.authenticatedAttributesAsn1=Pe.create(Pe.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SET,!0,[]),h=0;h<f.authenticatedAttributes.length;++h){var p=f.authenticatedAttributes[h];p.type===Ar.pki.oids.messageDigest?p.value=n[f.digestAlgorithm].digest():p.type===Ar.pki.oids.signingTime&&(p.value||(p.value=c)),m.value.push(Tle(p)),f.authenticatedAttributesAsn1.value.push(Tle(p))}a=Pe.toDer(m).getBytes(),f.md.start().update(a)}f.signature=f.key.sign(f.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=Y9t(e.signers)}s(r,"addSignerInfos")};D0.createEncryptedData=function(){var e=null;return e={type:Ar.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:Ar.pki.oids["aes256-CBC"]},fromAsn1:s(function(t){wle(e,t,D0.asn1.encryptedDataValidator)},"fromAsn1"),decrypt:s(function(t){t!==void 0&&(e.encryptedContent.key=t),vNe(e)},"decrypt")},e};D0.createEnvelopedData=function(){var e=null;return e={type:Ar.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:Ar.pki.oids["aes256-CBC"]},fromAsn1:s(function(t){var r=wle(e,t,D0.asn1.envelopedDataValidator);e.recipients=V9t(r.recipientInfos.value)},"fromAsn1"),toAsn1:s(function(){return Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.type).getBytes()),Pe.create(Pe.Class.CONTEXT_SPECIFIC,0,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.INTEGER,!1,Pe.integerToDer(e.version).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SET,!0,$9t(e.recipients)),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,K9t(e.encryptedContent))])])])},"toAsn1"),findRecipient:s(function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var i=e.recipients[n],o=i.issuer;if(i.serialNumber===t.serialNumber&&o.length===r.length){for(var a=!0,l=0;l<r.length;++l)if(o[l].type!==r[l].type||o[l].value!==r[l].value){a=!1;break}if(a)return i}}return null},"findRecipient"),decrypt:s(function(t,r){if(e.encryptedContent.key===void 0&&t!==void 0&&r!==void 0)switch(t.encryptedContent.algorithm){case Ar.pki.oids.rsaEncryption:case Ar.pki.oids.desCBC:var n=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=Ar.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}vNe(e)},"decrypt"),addRecipient:s(function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:Ar.pki.oids.rsaEncryption,key:t.publicKey}})},"addRecipient"),encrypt:s(function(t,r){if(e.encryptedContent.content===void 0){r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var n,i,o;switch(r){case Ar.pki.oids["aes128-CBC"]:n=16,i=16,o=Ar.aes.createEncryptionCipher;break;case Ar.pki.oids["aes192-CBC"]:n=24,i=16,o=Ar.aes.createEncryptionCipher;break;case Ar.pki.oids["aes256-CBC"]:n=32,i=16,o=Ar.aes.createEncryptionCipher;break;case Ar.pki.oids["des-EDE3-CBC"]:n=24,i=8,o=Ar.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(t===void 0)t=Ar.util.createBuffer(Ar.random.getBytes(n));else if(t.length()!=n)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+n+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=Ar.util.createBuffer(Ar.random.getBytes(i));var a=o(t);if(a.start(e.encryptedContent.parameter.copy()),a.update(e.content),!a.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=a.output}for(var l=0;l<e.recipients.length;++l){var c=e.recipients[l];if(c.encryptedContent.content===void 0)switch(c.encryptedContent.algorithm){case Ar.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}},"encrypt")},e};function H9t(e){var t={},r=[];if(!Pe.validate(e,D0.asn1.recipientInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=r,n}return{version:t.version.charCodeAt(0),issuer:Ar.pki.RDNAttributesAsArray(t.issuer),serialNumber:Ar.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:Pe.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}s(H9t,"_recipientFromAsn1");function j9t(e){return Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.INTEGER,!1,Pe.integerToDer(e.version).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Ar.pki.distinguishedNameToAsn1({attributes:e.issuer}),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.INTEGER,!1,Ar.util.hexToBytes(e.serialNumber))]),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.encryptedContent.algorithm).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.NULL,!1,"")]),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,e.encryptedContent.content)])}s(j9t,"_recipientToAsn1");function V9t(e){for(var t=[],r=0;r<e.length;++r)t.push(H9t(e[r]));return t}s(V9t,"_recipientsFromAsn1");function $9t(e){for(var t=[],r=0;r<e.length;++r)t.push(j9t(e[r]));return t}s($9t,"_recipientsToAsn1");function z9t(e){var t=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.INTEGER,!1,Pe.integerToDer(e.version).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Ar.pki.distinguishedNameToAsn1({attributes:e.issuer}),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.INTEGER,!1,Ar.util.hexToBytes(e.serialNumber))]),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.digestAlgorithm).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.signatureAlgorithm).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.NULL,!1,"")])),t.value.push(Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=Pe.create(Pe.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<e.unauthenticatedAttributes.length;++n){var i=e.unauthenticatedAttributes[n];r.values.push(Tle(i))}t.value.push(r)}return t}s(z9t,"_signerToAsn1");function Y9t(e){for(var t=[],r=0;r<e.length;++r)t.push(z9t(e[r]));return t}s(Y9t,"_signersToAsn1");function Tle(e){var t;if(e.type===Ar.pki.oids.contentType)t=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.value).getBytes());else if(e.type===Ar.pki.oids.messageDigest)t=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===Ar.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),i=e.value;if(typeof i=="string"){var o=Date.parse(i);isNaN(o)?i.length===13?i=Pe.utcTimeToDate(i):i=Pe.generalizedTimeToDate(i):i=new Date(o)}i>=r&&i<n?t=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.UTCTIME,!1,Pe.dateToUtcTime(i)):t=Pe.create(Pe.Class.UNIVERSAL,Pe.Type.GENERALIZEDTIME,!1,Pe.dateToGeneralizedTime(i))}return Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.type).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SET,!0,[t])])}s(Tle,"_attributeToAsn1");function K9t(e){return[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(Ar.pki.oids.data).getBytes()),Pe.create(Pe.Class.UNIVERSAL,Pe.Type.SEQUENCE,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OID,!1,Pe.oidToDer(e.algorithm).getBytes()),e.parameter?Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),Pe.create(Pe.Class.CONTEXT_SPECIFIC,0,!0,[Pe.create(Pe.Class.UNIVERSAL,Pe.Type.OCTETSTRING,!1,e.content.getBytes())])]}s(K9t,"_encryptedContentToAsn1");function wle(e,t,r){var n={},i=[];if(!Pe.validate(t,r,n,i)){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw o.errors=o,o}var a=Pe.derToOid(n.contentType);if(a!==Ar.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var l="";if(Ar.util.isArray(n.encryptedContent))for(var c=0;c<n.encryptedContent.length;++c){if(n.encryptedContent[c].type!==Pe.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");l+=n.encryptedContent[c].value}else l=n.encryptedContent;e.encryptedContent={algorithm:Pe.derToOid(n.encAlgorithm),parameter:Ar.util.createBuffer(n.encParameter.value),content:Ar.util.createBuffer(l)}}if(n.content){var l="";if(Ar.util.isArray(n.content))for(var c=0;c<n.content.length;++c){if(n.content[c].type!==Pe.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");l+=n.content[c].value}else l=n.content;e.content=Ar.util.createBuffer(l)}return e.version=n.version.charCodeAt(0),e.rawCapture=n,n}s(wle,"_fromAsn1");function vNe(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case Ar.pki.oids["aes128-CBC"]:case Ar.pki.oids["aes192-CBC"]:case Ar.pki.oids["aes256-CBC"]:t=Ar.aes.createDecryptionCipher(e.encryptedContent.key);break;case Ar.pki.oids.desCBC:case Ar.pki.oids["des-EDE3-CBC"]:t=Ar.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}s(vNe,"_decryptContent")});var TNe=H((BYr,INe)=>{d();var Ja=fi();EC();d9();NW();g9();lo();var nG=INe.exports=Ja.ssh=Ja.ssh||{};nG.privateKeyToPutty=function(e,t,r){r=r||"",t=t||"";var n="ssh-rsa",i=t===""?"none":"aes256-cbc",o="PuTTY-User-Key-File-2: "+n+`\r
`;o+="Encryption: "+i+`\r
`,o+="Comment: "+r+`\r
`;var a=Ja.util.createBuffer();I9(a,n),Og(a,e.e),Og(a,e.n);var l=Ja.util.encode64(a.bytes(),64),c=Math.floor(l.length/66)+1;o+="Public-Lines: "+c+`\r
`,o+=l;var u=Ja.util.createBuffer();Og(u,e.d),Og(u,e.p),Og(u,e.q),Og(u,e.qInv);var f;if(!t)f=Ja.util.encode64(u.bytes(),64);else{var m=u.length()+16-1;m-=m%16;var h=rG(u.bytes());h.truncate(h.length()-m+u.length()),u.putBuffer(h);var p=Ja.util.createBuffer();p.putBuffer(rG("\0\0\0\0",t)),p.putBuffer(rG("\0\0\0",t));var g=Ja.aes.createEncryptionCipher(p.truncate(8),"CBC");g.start(Ja.util.createBuffer().fillWithByte(0,16)),g.update(u.copy()),g.finish();var y=g.output;y.truncate(16),f=Ja.util.encode64(y.bytes(),64)}c=Math.floor(f.length/66)+1,o+=`\r
Private-Lines: `+c+`\r
`,o+=f;var x=rG("putty-private-key-file-mac-key",t),b=Ja.util.createBuffer();I9(b,n),I9(b,i),I9(b,r),b.putInt32(a.length()),b.putBuffer(a),b.putInt32(u.length()),b.putBuffer(u);var E=Ja.hmac.create();return E.start("sha1",x),E.update(b.bytes()),o+=`\r
Private-MAC: `+E.digest().toHex()+`\r
`,o};nG.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var n=Ja.util.createBuffer();return I9(n,r),Og(n,e.e),Og(n,e.n),r+" "+Ja.util.encode64(n.bytes())+" "+t};nG.privateKeyToOpenSSH=function(e,t){return t?Ja.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Ja.pki.privateKeyToPem(e)};nG.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||Ja.md.md5.create(),n="ssh-rsa",i=Ja.util.createBuffer();I9(i,n),Og(i,e.e),Og(i,e.n),r.start(),r.update(i.getBytes());var o=r.digest();if(t.encoding==="hex"){var a=o.toHex();return t.delimiter?a.match(/.{2}/g).join(t.delimiter):a}else{if(t.encoding==="binary")return o.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return o};function Og(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var n=Ja.util.hexToBytes(r);e.putInt32(n.length),e.putBytes(n)}s(Og,"_addBigIntegerToBuffer");function I9(e,t){e.putInt32(t.length),e.putString(t)}s(I9,"_addStringToBuffer");function rG(){for(var e=Ja.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}s(rG,"_sha1")});var _Ne=H((NYr,wNe)=>{d();wNe.exports=fi();EC();VPe();Mh();_W();tk();uNe();d9();hNe();yNe();xNe();Xae();QW();yb();Vae();tle();ENe();nle();zae();Qae();jW();nm();qae();TNe();cle();lo()});var kNe=H(wb=>{"use strict";d();Object.defineProperty(wb,"__esModule",{value:!0});wb.convert=wb.Format=void 0;var dk=_Ne(),DC;(function(e){e.der="der",e.pem="pem",e.txt="txt",e.asn1="asn1",e.x509="x509",e.fingerprint="fingerprint"})(DC=wb.Format||(wb.Format={}));function SNe(e){var t=dk.pki.pemToDer(e),r=dk.asn1,n=r.fromDer(t.data.toString("binary")).value[0].value,i=n[0],o=i.tagClass===r.Class.CONTEXT_SPECIFIC&&i.type===0&&i.constructed,a=n.slice(o);return{serial:a[0],issuer:a[2],valid:a[3],subject:a[4]}}s(SNe,"myASN");function J9t(e){var t=SNe(e),r=t.subject.value.map(function(i){return i.value[0].value[1].value}).join("/"),n=t.valid.value.map(function(i){return i.value}).join(" - ");return["Subject ".concat(r),"Valid ".concat(n),String(e)].join(`
`)}s(J9t,"txtFormat");function RNe(e,t){switch(t){case DC.der:return dk.pki.pemToDer(e);case DC.pem:return e;case DC.txt:return J9t(e);case DC.asn1:return SNe(e);case DC.fingerprint:var r=dk.md.sha1.create(),n=RNe(e,DC.der);return r.update(n.getBytes()),r.digest().toHex();case DC.x509:return dk.pki.certificateFromPem(e);default:throw new Error("unknown format ".concat(t))}}s(RNe,"convert");wb.convert=RNe});var FNe=H(Iu=>{"use strict";d();var PC=Iu&&Iu.__assign||function(){return PC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},PC.apply(this,arguments)},iG=Iu&&Iu.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.convert=Iu.Format=Iu.addToGlobalAgent=Iu.get=void 0;var _le=require("https"),X9t=require("tls"),BNe=require("child_process"),DNe=fDe(),YA=kNe();Object.defineProperty(Iu,"Format",{enumerable:!0,get:s(function(){return YA.Format},"get")});Object.defineProperty(Iu,"convert",{enumerable:!0,get:s(function(){return YA.convert},"get")});var PNe=process.platform==="darwin",NNe=_le.globalAgent,sG={keychain:"all",unique:!0,excludeBundled:!0,format:YA.Format.pem};function LNe(e){if(e===void 0&&(e=sG),!PNe)return[];e=PC(PC({},sG),e);var t=/(?=-----BEGIN\sCERTIFICATE-----)/g,r=["find-certificate","-a","-p"],n=[];if(e.keychain==="all"||e.keychain==="SystemRootCertificates"){var i="/System/Library/Keychains/SystemRootCertificates.keychain",o=(0,BNe.spawnSync)("/usr/bin/security",r.concat(i)).stdout.toString().split(t).map(function(u){return u.trim()});n=iG(iG([],n,!0),o,!0)}if(e.keychain==="all"||e.keychain==="current"){var a=(0,BNe.spawnSync)("/usr/bin/security",r).stdout.toString().split(t).map(function(u){return u.trim()});n=iG(iG([],n,!0),a,!0)}if(e.unique||e.excludeBundled){var l=n.map(function(u){return(0,YA.convert)(u,YA.Format.fingerprint)}),c=e.excludeBundled?X9t.rootCertificates.map(function(u){return(0,YA.convert)(u,YA.Format.fingerprint)}):[];n=n.filter(function(u,f){var m=l[f];return!(e.unique&&f!==l.indexOf(m)||e.excludeBundled&&c.includes(m))})}return n.map(function(u){return(0,YA.convert)(u,e.format)})}s(LNe,"get");Iu.get=LNe;var oG=NNe.options.ca,Z9t=s(function(e){if(e===void 0&&(e=sG),!!PNe){var t;Array.isArray(oG)?t=Array.from(oG):t=typeof oG<"u"?[oG]:[],LNe(PC(PC(PC({},sG),e),{format:YA.Format.pem,excludeBundled:!1})).forEach(function(r){return t.push(r)}),NNe.options.ca=t,_le.Agent=function(r){return function(n){var i=typeof n<"u"?PC({},n):{};return typeof i.ca>"u"&&(i.ca=t),r.call(this,i)}}(_le.Agent),(0,DNe.setGlobalDispatcher)(new DNe.Agent({connect:{ca:t}}))}},"addToGlobalAgent");Iu.addToGlobalAgent=Z9t});var MNe=H((WYr,Sle)=>{d();function eTt(){let{X509Certificate:e}=require("crypto"),{join:t}=require("path");var r=typeof __webpack_require__=="function"?__non_webpack_require__:require;let n=r(t(__dirname,"crypt32.node")),i=[],o=new n.Crypt32;try{let a;for(;a=o.next();){let l=new e(a);i.push(l.toString())}}finally{o.done()}return Array.from(new Set(i))}s(eTt,"all");process.platform!=="win32"?Sle.exports.all=()=>[]:Sle.exports.all=eTt});var VNe=H((YYr,jNe)=>{"use strict";d();function HNe(e,t,r){let n=t[r];if(e==null&&n.required===!1)return;if(e==null)throw new TypeError(`Required parameter \`${n.name}\` missing`);let i=typeof e;if(n.type&&i!==n.type){if(n.required===!1&&t.slice(r).some(o=>o.type===i))return!1;throw new TypeError(`Invalid type for parameter \`${n.name}\`, expected \`${n.type}\` but found \`${typeof e}\``)}return!0}s(HNe,"validateParameter");function rTt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}s(rTt,"hasOwnProperty");function nTt(e,t){return function(){let r=Array.prototype.slice.call(arguments),n=[];for(let o=0,a=0;o<t.length;++o,++a){let l=t[o],c=r[a];rTt(l,"default")&&c==null&&(c=l.default),l.type==="object"&&l.default!=null&&(c=Object.assign({},l.default,c)),l.name==="options"&&(typeof c=="function"||c==null)&&(c={}),HNe(c,t,o)?n.push(c):a--}if(typeof arguments[arguments.length-1]!="function")return new Promise((o,a)=>{n.push((l,c)=>{if(l)return a(l);o(c)}),e.apply(this,n)});e.apply(this,n)}}s(nTt,"defineOperation");jNe.exports={defineOperation:nTt,validateParameter:HNe}});var Mle=H((XYr,YNe)=>{"use strict";d();var _9=dte()("kerberos"),w9=_9.KerberosClient,$Ne=_9.KerberosServer,NC=VNe().defineOperation,iTt=1,oTt=2,sTt=4,aTt=8,lTt=16,cTt=32,uTt=64,fTt=128,dTt=256,zNe=0,mTt=9,hTt=6;w9.prototype.step=NC(w9.prototype.step,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);w9.prototype.wrap=NC(w9.prototype.wrap,[{name:"challenge",type:"string"},{name:"options",type:"object"},{name:"callback",type:"function",required:!1}]);w9.prototype.unwrap=NC(w9.prototype.unwrap,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);$Ne.prototype.step=NC($Ne.prototype.step,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);var pTt=NC(_9.checkPassword,[{name:"username",type:"string"},{name:"password",type:"string"},{name:"service",type:"string"},{name:"defaultRealm",type:"string",required:!1},{name:"callback",type:"function",required:!1}]),gTt=NC(_9.principalDetails,[{name:"service",type:"string"},{name:"hostname",type:"string"},{name:"callback",type:"function",required:!1}]),ATt=NC(_9.initializeClient,[{name:"service",type:"string"},{name:"options",type:"object",default:{mechOID:zNe}},{name:"callback",type:"function",required:!1}]),yTt=NC(_9.initializeServer,[{name:"service",type:"string"},{name:"callback",type:"function",required:!1}]);YNe.exports={initializeClient:ATt,initializeServer:yTt,principalDetails:gTt,checkPassword:pTt,GSS_C_DELEG_FLAG:iTt,GSS_C_MUTUAL_FLAG:oTt,GSS_C_REPLAY_FLAG:sTt,GSS_C_SEQUENCE_FLAG:aTt,GSS_C_CONF_FLAG:lTt,GSS_C_INTEG_FLAG:cTt,GSS_C_ANON_FLAG:uTt,GSS_C_PROT_READY_FLAG:fTt,GSS_C_TRANS_FLAG:dTt,GSS_C_NO_OID:zNe,GSS_MECH_OID_KRB5:mTt,GSS_MECH_OID_SPNEGO:hTt}});var KNe=H((eKr,CTt)=>{CTt.exports={name:"kerberos",version:"2.2.0",description:"Kerberos library for Node.js",main:"lib/index.js",files:["lib","src","binding.gyp","HISTORY.md","README.md"],repository:{type:"git",url:"https://github.com/mongodb-js/kerberos.git"},keywords:["kerberos","security","authentication"],author:{name:"The MongoDB NodeJS Team",email:"dbx-node@mongodb.com"},bugs:{url:"https://jira.mongodb.org/projects/NODE/issues/"},dependencies:{bindings:"^1.5.0","node-addon-api":"^6.1.0","prebuild-install":"^7.1.2"},devDependencies:{"@types/node":"^22.2.0",chai:"^4.4.1","chai-string":"^1.5.0",chalk:"^4.1.2","clang-format":"^1.8.0","dmd-clear":"^0.1.2",eslint:"^9.9.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jsdoc-to-markdown":"^8.0.3",mocha:"^10.7.3",mongodb:"^6.8.0","node-gyp":"^10.1.0",prebuild:"^13.0.0",prettier:"^3.3.3",request:"^2.88.2"},overrides:{prebuild:{"node-gyp":"$node-gyp"}},scripts:{install:"prebuild-install --runtime napi || node-gyp rebuild","format-cxx":"clang-format -i 'src/**/*'","format-js":"ESLINT_USE_FLAT_CONFIG=false eslint lib test --fix","check:lint":"ESLINT_USE_FLAT_CONFIG=false eslint lib test",precommit:"check-clang-format",docs:"jsdoc2md --template etc/README.hbs --plugin dmd-clear --files lib/kerberos.js > README.md",test:"mocha test",prebuild:"prebuild --runtime napi --strip --verbose --all"},engines:{node:">=12.9.0"},binary:{napi_versions:[4]},license:"Apache-2.0",readmeFilename:"README.md"}});var XNe=H((tKr,JNe)=>{"use strict";d();var xTt=require("dns"),vTt=Mle(),Qle=class{static{s(this,"MongoAuthProcess")}constructor(t,r,n,i){i=i||{},this.host=t,this.port=r,this.serviceName=n||i.gssapiServiceName||"mongodb",this.canonicalizeHostName=typeof i.gssapiCanonicalizeHostName=="boolean"?i.gssapiCanonicalizeHostName:!1,this._transition=bTt(this),this.retries=10}init(t,r,n){let i=this;this.username=t,this.password=r;function o(a,l,c){if(!a)return c();xTt.resolveCname(l,(u,f)=>{if(u)return c(u);Array.isArray(f)&&f.length>0&&(i.host=f[0]),c()})}s(o,"performGssapiCanonicalizeHostName"),o(this.canonicalizeHostName,this.host,a=>{if(a)return n(a);let l={};r!=null&&Object.assign(l,{user:t,password:r});let c=process.platform==="win32"?`${this.serviceName}/${this.host}`:`${this.serviceName}@${this.host}`;vTt.initializeClient(c,l,(u,f)=>{if(u)return n(u,null);i.client=f,n(null,f)})})}transition(t,r){if(this._transition==null)return r(new Error("Transition finished"));this._transition(t,r)}};function bTt(e){return(t,r)=>{e.client.step("",(n,i)=>{if(n)return r(n);e._transition=ETt(e),r(null,i)})}}s(bTt,"firstTransition");function ETt(e){return(t,r)=>{e.client.step(t,(n,i)=>{if(n&&e.retries===0)return r(n);if(n)return e.retries=e.retries-1,e.transition(t,r);e._transition=ITt(e),r(null,i||"")})}}s(ETt,"secondTransition");function ITt(e){return(t,r)=>{e.client.unwrap(t,(n,i)=>{if(n)return r(n,!1);e.client.wrap(i,{user:e.username},(o,a)=>{if(o)return r(o,!1);e._transition=TTt(e),r(null,a)})})}}s(ITt,"thirdTransition");function TTt(e){return(t,r)=>{e._transition=null,r(null,!0)}}s(TTt,"fourthTransition");JNe.exports={MongoAuthProcess:Qle}});var eLe=H((iKr,mk)=>{"use strict";d();var ZNe=Mle();mk.exports=ZNe;mk.exports.Kerberos=ZNe;mk.exports.version=KNe().version;mk.exports.processes={MongoAuthProcess:XNe().MongoAuthProcess}});var RLe=H(ece=>{"use strict";d();Object.defineProperty(ece,"__esModule",{value:!0});ece.assertNever=swt;function swt(e,t=`unexpected value ${e}`){throw new Error(`Unreachable: ${t}`)}s(swt,"assertNever")});var vk=H(ZA=>{"use strict";d();Object.defineProperty(ZA,"__esModule",{value:!0});ZA.ChatCompletionContentPartOpaque=ZA.ChatCompletionContentPartKind=ZA.ChatRole=void 0;var awt=RLe(),wG;(function(e){e[e.System=0]="System",e[e.User=1]="User",e[e.Assistant=2]="Assistant",e[e.Tool=3]="Tool"})(wG||(ZA.ChatRole=wG={}));(function(e){function t(r){switch(r){case e.System:return"system";case e.User:return"user";case e.Assistant:return"assistant";case e.Tool:return"tool";default:(0,awt.assertNever)(r,`unknown chat role ${r}}`)}}s(t,"display"),e.display=t})(wG||(ZA.ChatRole=wG={}));var kLe;(function(e){e[e.Image=0]="Image",e[e.Text=1]="Text",e[e.Opaque=2]="Opaque",e[e.CacheBreakpoint=3]="CacheBreakpoint"})(kLe||(ZA.ChatCompletionContentPartKind=kLe={}));var BLe;(function(e){function t(r,n){return!r.scope||(r.scope&n)!==0}s(t,"usableIn"),e.usableIn=t})(BLe||(ZA.ChatCompletionContentPartOpaque=BLe={}))});var tce=H(Vg=>{"use strict";d();Object.defineProperty(Vg,"__esModule",{value:!0});Vg.BaseTokensPerName=Vg.BaseTokensPerMessage=Vg.BaseTokensPerCompletion=Vg.ChatRole=void 0;var DLe;(function(e){e.System="system",e.User="user",e.Assistant="assistant",e.Function="function",e.Tool="tool"})(DLe||(Vg.ChatRole=DLe={}));Vg.BaseTokensPerCompletion=3;Vg.BaseTokensPerMessage=3;Vg.BaseTokensPerName=1});var NLe=H(SG=>{"use strict";d();Object.defineProperty(SG,"__esModule",{value:!0});SG.toOpenAiChatMessage=PLe;SG.toOpenAIChatMessages=uwt;var e2=vk(),_G=tce(),lwt=WC();function rce(e){return e.filter(t=>t.type===e2.ChatCompletionContentPartKind.Text).map(t=>t.text).join("")}s(rce,"onlyStringContent");function cwt(e){let t=e.map(r=>{if(r.type===e2.ChatCompletionContentPartKind.Text)return{type:"text",text:r.text};if(r.type===e2.ChatCompletionContentPartKind.Image)return{image_url:r.imageUrl,type:"image_url"};if(r.type===e2.ChatCompletionContentPartKind.Opaque&&e2.ChatCompletionContentPartOpaque.usableIn(r,lwt.OutputMode.OpenAI))return r}).filter(r=>!!r);return t.every(r=>r.type==="text")?t.map(r=>r.text).join(""):t}s(cwt,"stringAndImageContent");function PLe(e){switch(e.role){case e2.ChatRole.System:return{role:_G.ChatRole.System,content:rce(e.content),name:e.name};case e2.ChatRole.User:return{role:_G.ChatRole.User,content:cwt(e.content),name:e.name};case e2.ChatRole.Assistant:return{role:_G.ChatRole.Assistant,content:rce(e.content),name:e.name,tool_calls:e.toolCalls?.map(t=>({id:t.id,function:t.function,type:"function"}))};case e2.ChatRole.Tool:return{role:_G.ChatRole.Tool,content:rce(e.content),tool_call_id:e.toolCallId};default:return}}s(PLe,"toOpenAiChatMessage");function uwt(e){return e.map(PLe).filter(t=>!!t)}s(uwt,"toOpenAIChatMessages")});var FLe=H(BG=>{"use strict";d();Object.defineProperty(BG,"__esModule",{value:!0});BG.toVsCodeChatMessage=LLe;BG.toVsCodeChatMessages=fwt;var kG=vk();function RG(e){return e.filter(t=>t.type===kG.ChatCompletionContentPartKind.Text).map(t=>t.text).join("")}s(RG,"onlyStringContent");var GC;function LLe(e){switch(GC??=require("vscode"),e.role){case kG.ChatRole.Assistant:let t=GC.LanguageModelChatMessage.Assistant(RG(e.content),e.name);return e.toolCalls&&(t.content=[new GC.LanguageModelTextPart(RG(e.content)),...e.toolCalls.map(r=>{let n;try{n=JSON.parse(r.function.arguments)}catch{throw new Error("Invalid JSON in tool call arguments for tool call: "+r.id)}return new GC.LanguageModelToolCallPart(r.id,r.function.name,n)})]),t;case kG.ChatRole.User:return GC.LanguageModelChatMessage.User(RG(e.content),e.name);case kG.ChatRole.Tool:{let r=GC.LanguageModelChatMessage.User("");return r.content=[new GC.LanguageModelToolResultPart(e.toolCallId,[new GC.LanguageModelTextPart(RG(e.content))])],r}default:return}}s(LLe,"toVsCodeChatMessage");function fwt(e){return e.map(LLe).filter(t=>!!t)}s(fwt,"toVsCodeChatMessages")});var WC=H(Uh=>{"use strict";d();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.OutputMode=Uh.Raw=Uh.OpenAI=void 0;Uh.toMode=nce;Uh.toVSCode=dwt;Uh.toOpenAI=mwt;var MLe=NLe(),QLe=FLe();Uh.OpenAI=tce();Uh.Raw=vk();var Bb;(function(e){e[e.Raw=1]="Raw",e[e.OpenAI=2]="OpenAI",e[e.VSCode=4]="VSCode"})(Bb||(Uh.OutputMode=Bb={}));function nce(e,t){switch(e){case Bb.Raw:return t;case Bb.VSCode:return t instanceof Array?(0,QLe.toVsCodeChatMessages)(t):(0,QLe.toVsCodeChatMessage)(t);case Bb.OpenAI:return t instanceof Array?(0,MLe.toOpenAIChatMessages)(t):(0,MLe.toOpenAiChatMessage)(t);default:throw new Error(`Unknown output mode: ${e}`)}}s(nce,"toMode");function dwt(e){return nce(Bb.VSCode,e)}s(dwt,"toVSCode");function mwt(e){return nce(Bb.OpenAI,e)}s(mwt,"toOpenAI")});var ice=H(bk=>{"use strict";d();Object.defineProperty(bk,"__esModule",{value:!0});bk.jsonRetainedProps=void 0;bk.forEachNode=OLe;bk.jsonRetainedProps=Object.keys({flexBasis:1,flexGrow:1,flexReserve:1,passPriority:1,priority:1});function OLe(e,t){if(t(e),e.type===1)for(let r of e.children)OLe(r,t)}s(OLe,"forEachNode")});var ULe=H(oce=>{"use strict";d();Object.defineProperty(oce,"__esModule",{value:!0});oce.once=hwt;function hwt(e){let t,r=!1,n=s((...i)=>(r||(t=e(...i),r=!0),t),"wrappedFunction");return n.clear=()=>{r=!1},n}s(hwt,"once")});var cce=H(Kc=>{"use strict";d();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.BudgetExceededError=Kc.MaterializedChatMessageImage=Kc.MaterializedChatMessageBreakpoint=Kc.MaterializedChatMessageOpaque=Kc.MaterializedChatMessage=Kc.MaterializedChatMessageTextChunk=Kc.GenericMaterializedContainer=void 0;var P9=ULe(),Of=WC(),t2=class e{static{s(this,"GenericMaterializedContainer")}parent;id;name;priority;metadata;flags;children;keepWithId;constructor(t,r,n,i,o,a,l){if(this.parent=t,this.id=r,this.name=n,this.priority=i,this.metadata=a,this.flags=l,this.children=o(this),l&8){if(this.children.length!==2)throw new Error("Invalid number of children for EmptyAlternate flag");let[c,u]=this.children;u.isEmpty?this.children=[c]:this.children=[u]}}has(t){return!!(this.flags&t)}async tokenCount(t){let r=0;return await Promise.all(this.children.map(async n=>{let i=jC(n)?await n.tokenCount(t):await n.upperBoundTokenCount(t);r+=i})),r}async upperBoundTokenCount(t){let r=0;return await Promise.all(this.children.map(async n=>{let i=await n.upperBoundTokenCount(t);r+=i})),r}replaceNode(t,r){return YLe(t,this.children,r)}allMetadata(){return zLe(this)}findById(t){return lce(t,this)}get isEmpty(){return!this.children.some(t=>!t.isEmpty)}onChunksChange(){this.parent?.onChunksChange()}*toChatMessages(){for(let t of this.children)pwt(t),t instanceof e?yield*t.toChatMessages():!t.isEmpty&&t instanceof Wh&&(yield t.toChatMessage())}async baseMessageTokenCount(t){let r=0;return await Promise.all(this.children.map(async n=>{if(n instanceof Wh||n instanceof e){let i=await n.baseMessageTokenCount(t);r+=i}})),r}removeLowestPriorityChild(){let t=[];return ace(this,t),t}};Kc.GenericMaterializedContainer=t2;var Ek=class{static{s(this,"MaterializedChatMessageTextChunk")}parent;text;priority;metadata;lineBreakBefore;constructor(t,r,n,i=[],o){this.parent=t,this.text=r,this.priority=n,this.metadata=i,this.lineBreakBefore=o}upperBoundTokenCount(t){return this._upperBound(t)}_upperBound=(0,P9.once)(async t=>await t.tokenLength({type:Of.Raw.ChatCompletionContentPartKind.Text,text:this.text})+(this.lineBreakBefore!==0?1:0));get isEmpty(){return!/\S/.test(this.text)}};Kc.MaterializedChatMessageTextChunk=Ek;var Wh=class{static{s(this,"MaterializedChatMessage")}parent;id;role;name;toolCalls;toolCallId;priority;metadata;children;constructor(t,r,n,i,o,a,l,c,u){this.parent=t,this.id=r,this.role=n,this.name=i,this.toolCalls=o,this.toolCallId=a,this.priority=l,this.metadata=c,this.children=u(this)}async tokenCount(t){return this._tokenCount(t)}async upperBoundTokenCount(t){return this._upperBound(t)}get text(){return this._text()}get isEmpty(){return!this.toolCalls?.length&&!this.children.some(t=>!t.isEmpty)}replaceNode(t,r){let n=YLe(t,this.children,r);return n&&this.onChunksChange(),n}removeLowestPriorityChild(){let t=[];return ace(this,t),t}onChunksChange(){this._tokenCount.clear(),this._upperBound.clear(),this._text.clear(),this.parent?.onChunksChange()}findById(t){return lce(t,this)}_tokenCount=(0,P9.once)(async t=>{let r=this.toChatMessage();return t.countMessageTokens((0,Of.toMode)(t.mode,r))});_upperBound=(0,P9.once)(async t=>{let r=await this.baseMessageTokenCount(t);return await Promise.all(this.children.map(async n=>{let i=await n.upperBoundTokenCount(t);r+=i})),r});baseMessageTokenCount=(0,P9.once)(t=>{let r=this.toChatMessage();return r.content=r.content.map(n=>n.type===Of.Raw.ChatCompletionContentPartKind.Text?{...n,text:""}:n.type===Of.Raw.ChatCompletionContentPartKind.Image?void 0:n).filter(n=>!!n),t.countMessageTokens((0,Of.toMode)(t.mode,r))});_text=(0,P9.once)(()=>{let t=[];for(let{content:r,isTextSibling:n}of VLe(this)){if(r instanceof Db||r instanceof HC){t.push(r);continue}if(r instanceof qh){t.at(-1)instanceof qh?t[t.length-1]=r:t.push(r);continue}if(r.lineBreakBefore===1||r.lineBreakBefore===2&&!n){let i=t[t.length-1];typeof i=="string"&&i&&!i.endsWith(`
`)&&(t[t.length-1]=i+`
`)}typeof t[t.length-1]=="string"?t[t.length-1]+=r.text:t.push(r.text)}return t});toChatMessage(){let t=this.text.map(r=>{if(typeof r=="string")return{type:Of.Raw.ChatCompletionContentPartKind.Text,text:r};if(r instanceof Db)return{type:Of.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:KLe(r.src),detail:r.detail}};if(r instanceof HC)return r.value;if(r instanceof qh)return r.part;throw new Error("Unexpected element type")});if(this.role===Of.Raw.ChatRole.System)return{role:this.role,content:t,...this.name?{name:this.name}:{}};if(this.role===Of.Raw.ChatRole.Assistant){let r={role:this.role,content:t};return this.name&&(r.name=this.name),this.toolCalls?.length&&(r.toolCalls=this.toolCalls.map(n=>({function:n.function,id:n.id,type:n.type}))),r}else return this.role===Of.Raw.ChatRole.User?{role:this.role,content:t,...this.name?{name:this.name}:{}}:this.role===Of.Raw.ChatRole.Tool?{role:this.role,content:t,toolCallId:this.toolCallId}:{role:this.role,content:t,name:this.name}}};Kc.MaterializedChatMessage=Wh;var HC=class{static{s(this,"MaterializedChatMessageOpaque")}parent;part;metadata=[];priority=Number.MAX_SAFE_INTEGER;get value(){return this.part.value}constructor(t,r){this.parent=t,this.part=r}upperBoundTokenCount(t){return this.part.tokenUsage&&Of.Raw.ChatCompletionContentPartOpaque.usableIn(this.part,t.mode)?this.part.tokenUsage:0}isEmpty=!1};Kc.MaterializedChatMessageOpaque=HC;var qh=class{static{s(this,"MaterializedChatMessageBreakpoint")}parent;part;metadata=[];priority=Number.MAX_SAFE_INTEGER;constructor(t,r){this.parent=t,this.part=r}upperBoundTokenCount(t){return 0}isEmpty=!1};Kc.MaterializedChatMessageBreakpoint=qh;var Db=class{static{s(this,"MaterializedChatMessageImage")}parent;id;src;priority;metadata;lineBreakBefore;detail;constructor(t,r,n,i,o=[],a,l){this.parent=t,this.id=r,this.src=n,this.priority=i,this.metadata=o,this.lineBreakBefore=a,this.detail=l}upperBoundTokenCount(t){return this._upperBound(t)}_upperBound=(0,P9.once)(async t=>t.tokenLength({type:Of.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:KLe(this.src),detail:this.detail}}));isEmpty=!1};Kc.MaterializedChatMessageImage=Db;function jC(e){return e instanceof t2||e instanceof Wh}s(jC,"isContainerType");function jLe(e){return e instanceof Ek||e instanceof Db||e instanceof HC||e instanceof qh}s(jLe,"isContentType");function pwt(e){if(!jC(e))throw new Error(`Cannot have a text node outside a ChatMessage. Text: "${e.text}"`)}s(pwt,"assertContainerOrChatMessage");function*VLe(e,t=!1){for(let r of e.children)r instanceof Ek?(yield{content:r,isTextSibling:t},t=!0):r instanceof Db||r instanceof HC||r instanceof qh?yield{content:r,isTextSibling:!1}:r instanceof HC?yield{content:r,isTextSibling:!0}:(r&&(yield*VLe(r,t)),t=!1)}s(VLe,"contentChunks");function gwt(e,t){let r;function n(i,o){if(jLe(i))(!r||i.priority<r.node.priority)&&(r={chain:o.slice(),node:i});else{o.push(i);for(let a of i.children)n(a,o);o.pop()}}if(s(n,"findLowestInTree"),n(e,[]),!r)throw new Error("No lowest priority node found");Ik(r.node,t)}s(gwt,"removeLowestPriorityLegacy");var qLe=new WeakMap;function $Le(e){let t=qLe.get(e);if(t!==void 0)return t;let r=!1;return e instanceof qh?r=!0:e instanceof Wh?r=e.children.some(n=>n instanceof qh):e instanceof t2&&(r=e.children.some($Le)),qLe.set(e,r),r}s($Le,"hasCachePoint");function Awt(e){if(e instanceof Wh)return!0;for(let t=e.parent;t;t=t.parent)if(t instanceof Wh)return!1;return!0}s(Awt,"shouldLookForCachePointInNode");function ace(e,t){let r;if(e instanceof t2&&e.has(1)){gwt(e,t);return}let n=Awt(e),i=e.children.map((o,a)=>({chain:[e],index:a}));for(let o=0;o<i.length;o++){let{chain:a,index:l}=i[o],c=a[a.length-1].children[l];if(!(n&&$Le(c)&&(r=void 0,c instanceof qh))){if(c instanceof t2&&c.has(4)){let u=[...a,c];i.splice(o+1,0,...c.children.map((f,m)=>({chain:u,index:m})))}else if(!r||c.priority<r.value.priority)r={chain:a,index:l,value:c};else if(c.priority===r.value.priority){r.lowestNested??=WLe(r.value);let u=WLe(c);u<r.lowestNested&&(r={chain:a,index:l,value:c,lowestNested:u})}}}if(!r)throw new DG(e);jLe(r.value)||r.value instanceof t2&&r.value.has(2)||jC(r.value)&&!r.value.children.length?Ik(r.value,t):ace(r.value,t)}s(ace,"removeLowestPriorityChild");var DG=class extends Error{static{s(this,"BudgetExceededError")}constructor(t){let r=[t];for(;r[0].parent;)r.unshift(r[0].parent);let n=r.map(i=>i instanceof Wh?i.role:i.name||"(anonymous)");super(`No lowest priority node found (path: ${n.join(" -> ")})`)}};Kc.BudgetExceededError=DG;function WLe(e){if(!jC(e))return-1;let t=Number.MAX_SAFE_INTEGER;for(let r of e.children)t=Math.min(t,r.priority);return t}s(WLe,"getLowestPriorityAmongChildren");function*zLe(e){yield*e.metadata;for(let t of e.children)jC(t)?yield*zLe(t):yield*t.metadata}s(zLe,"allMetadata");function YLe(e,t,r){for(let n=0;n<t.length;n++){let i=t[n];if(jC(i)){if(i.id===e){let a=t[n];return r.parent=i.parent,t[n]=r,a}let o=i.replaceNode(e,r);if(o)return o}}}s(YLe,"replaceNode");function*GLe(e){let t=[e];for(;t.length>0;){let r=t.pop();yield r,jC(r)&&t.push(...r.children)}}s(GLe,"forEachNode");function ywt(e){let t=e;for(;t.parent;)t=t.parent;return t}s(ywt,"getRoot");function HLe(e){return e instanceof t2&&e.keepWithId!==void 0}s(HLe,"isKeepWith");var sce=new Set;function Cwt(e,t){let r=new Set;for(let n of GLe(e))HLe(n)&&!sce.has(n.keepWithId)&&r.add(n.keepWithId);if(r.size===0)return!1;for(let n of r)sce.add(n);try{let n=ywt(e);for(let i of GLe(n))HLe(i)&&r.has(i.keepWithId)?Ik(i,t):i instanceof Wh&&i.toolCalls&&(i.toolCalls=xwt(i.toolCalls,o=>!(o.keepWith&&r.has(o.keepWith.id))),i.isEmpty&&Ik(i,t))}finally{for(let n of r)sce.delete(n)}}s(Cwt,"removeOtherKeepWiths");function lce(e,t){if(t.id===e)return t;for(let r of t.children)if(jC(r)){let n=lce(e,r);if(n)return n}}s(lce,"findNodeById");function Ik(e,t){let r=e.parent;if(!r)return;let n=r.children.indexOf(e);n!==-1&&(r.children.splice(n,1),t.push(e),Cwt(e,t),r.isEmpty?Ik(r,t):r.onChunksChange())}s(Ik,"removeNode");function KLe(e){let t={"/9j/":"image/jpeg",iVBOR:"image/png",R0lGOD:"image/gif",UklGR:"image/webp"};for(let r of Object.keys(t))if(e.startsWith(r))return`data:${t[r]};base64,${e}`;return e}s(KLe,"getEncodedBase64");function xwt(e,t){for(let r=0;r<e.length;r++){if(t(e[r]))continue;let n=e.slice(0,r);for(let i=r+1;i<e.length;i++)t(e[i])&&n.push(e[i]);return n}return e}s(xwt,"filterIfDifferent")});var XLe=H(()=>{"use strict";d();function vwt(e,t,...r){return{ctor:e,props:t,children:r.flat()}}s(vwt,"_vscpp");function JLe(){throw new Error("This should not be invoked!")}s(JLe,"_vscppf");JLe.isFragment=!0;globalThis.vscpp=vwt;globalThis.vscppf=JLe});var fce=H(PG=>{"use strict";d();Object.defineProperty(PG,"__esModule",{value:!0});PG.PromptElement=void 0;XLe();var uce=class{static{s(this,"PromptElement")}props;get priority(){return this.props.priority??Number.MAX_SAFE_INTEGER}get insertLineBreakBefore(){return!0}constructor(t){this.props=t}};PG.PromptElement=uce});var vce=H(Oi=>{"use strict";d();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.LogicalWrapper=Oi.IfEmpty=Oi.AbstractKeepWith=Oi.TokenLimit=Oi.Expandable=Oi.Chunk=Oi.LegacyPrioritization=Oi.ToolResult=Oi.PrioritizedList=Oi.Image=Oi.TextChunk=Oi.ToolMessage=Oi.AssistantMessage=Oi.UserMessage=Oi.SystemMessage=Oi.BaseChatMessage=void 0;Oi.isChatMessagePromptElement=bwt;Oi.useKeepWith=wwt;var wk=Gh(),fm=fce();function bwt(e){return e instanceof NG||e instanceof LG||e instanceof FG}s(bwt,"isChatMessagePromptElement");var Pb=class extends fm.PromptElement{static{s(this,"BaseChatMessage")}render(){return vscpp(vscppf,null,this.props.children)}};Oi.BaseChatMessage=Pb;var NG=class extends Pb{static{s(this,"SystemMessage")}constructor(t){t.role=wk.Raw.ChatRole.System,super(t)}};Oi.SystemMessage=NG;var LG=class extends Pb{static{s(this,"UserMessage")}constructor(t){t.role=wk.Raw.ChatRole.User,super(t)}};Oi.UserMessage=LG;var FG=class extends Pb{static{s(this,"AssistantMessage")}constructor(t){t.role=wk.Raw.ChatRole.Assistant,super(t)}};Oi.AssistantMessage=FG;var Ewt=/\s+/g,dce=class extends Pb{static{s(this,"ToolMessage")}constructor(t){t.role=wk.Raw.ChatRole.Tool,super(t)}};Oi.ToolMessage=dce;var MG=class extends fm.PromptElement{static{s(this,"TextChunk")}async prepare(t,r,n){let i=this.props.breakOnWhitespace?Ewt:this.props.breakOn;if(!i)return vscpp(vscppf,null,this.props.children);let o="",a=[];for(let c of this.props.children||[])if(c&&typeof c=="object"){if(typeof c.ctor!="string")throw new Error("TextChunk children must be text literals or intrinsic attributes.");c.ctor==="br"?o+=`
`:a.push(c)}else c!=null&&(o+=c);let l=await Iwt(t,i,o,n);return vscpp(vscppf,null,a,l)}render(t){return t}};Oi.TextChunk=MG;async function Iwt(e,t,r,n){if(t instanceof RegExp){if(!t.global)throw new Error(`\`breakOn\` expression must have the global flag set (got ${t})`);t.lastIndex=0}let i="",o=-1;for(;o<r.length;){let a;typeof t=="string"?a=r.indexOf(t,o===-1?0:o+t.length):a=t.exec(r)?.index??-1,a===-1&&(a=r.length);let l=i+r.slice(Math.max(0,o),a);if(await e.countTokens({type:wk.Raw.ChatCompletionContentPartKind.Text,text:l},n)>e.tokenBudget)return i;i=l,o=a}return i}s(Iwt,"getTextContentBelowBudget");var mce=class extends fm.PromptElement{static{s(this,"Image")}constructor(t){super(t)}render(){return vscpp(vscppf,null,this.props.children)}};Oi.Image=mce;var hce=class extends fm.PromptElement{static{s(this,"PrioritizedList")}render(){let{children:t,priority:r=0,descending:n}=this.props;if(t)return vscpp(vscppf,null,t.map((i,o)=>{if(!i)return;let a=n?r-o:r-t.length+o;return typeof i!="object"?vscpp(MG,{priority:a},i):(i.props??={},i.props.priority=a,i)}))}};Oi.PrioritizedList=hce;var pce=class extends fm.PromptElement{static{s(this,"ToolResult")}render(){return vscpp(vscppf,null,this.props.data.content.map(t=>{if(t&&typeof t.value=="string")return t.value;if(t&&t.value&&typeof t.value.node=="object")return vscpp("elementJSON",{data:t.value})}))}};Oi.ToolResult=pce;var gce=class extends fm.PromptElement{static{s(this,"LegacyPrioritization")}render(){return vscpp(vscppf,null,this.props.children)}};Oi.LegacyPrioritization=gce;var Ace=class extends fm.PromptElement{static{s(this,"Chunk")}render(){return vscpp(vscppf,null,this.props.children)}};Oi.Chunk=Ace;var yce=class extends fm.PromptElement{static{s(this,"Expandable")}async render(t,r){return vscpp(vscppf,null,await this.props.value(r))}};Oi.Expandable=yce;var Cce=class extends fm.PromptElement{static{s(this,"TokenLimit")}render(){return vscpp(vscppf,null,this.props.children)}};Oi.TokenLimit=Cce;var QG=class extends fm.PromptElement{static{s(this,"AbstractKeepWith")}};Oi.AbstractKeepWith=QG;var Twt=0;function wwt(){let e=Twt++;return class extends QG{static{s(this,"KeepWith")}static id=e;id=e;render(){return vscpp(vscppf,null,this.props.children)}}}s(wwt,"useKeepWith");var xce=class extends fm.PromptElement{static{s(this,"IfEmpty")}render(){return vscpp(vscppf,null,vscpp(Tk,null,this.props.alt),vscpp(Tk,{flexGrow:1},this.props.children))}};Oi.IfEmpty=xce;var Tk=class extends fm.PromptElement{static{s(this,"LogicalWrapper")}render(){return vscpp(vscppf,null,this.props.children)}};Oi.LogicalWrapper=Tk});var eFe=H(_k=>{"use strict";d();Object.defineProperty(_k,"__esModule",{value:!0});_k.localize=_wt;_k.localize2=Swt;_k.getConfiguredDefaultLocale=Rwt;function ZLe(e,t){let r;return t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){let o=i[0];return typeof t[o]<"u"?t[o]:n}),r}s(ZLe,"_format");function _wt(e,t,...r){return ZLe(t,r)}s(_wt,"localize");function Swt(e,t,...r){let n=ZLe(t,r);return{original:n,value:n}}s(Swt,"localize2");function Rwt(e){}s(Rwt,"getConfiguredDefaultLocale")});var Tce=H(rr=>{"use strict";d();Object.defineProperty(rr,"__esModule",{value:!0});rr.isAndroid=rr.isEdge=rr.isSafari=rr.isFirefox=rr.isChrome=rr.OS=rr.setTimeout0=rr.setTimeout0IsFaster=rr.translationsConfigFile=rr.platformLocale=rr.locale=rr.Language=rr.language=rr.userAgent=rr.platform=rr.isCI=rr.isMobile=rr.isIOS=rr.webWorkerOrigin=rr.isWebWorker=rr.isWeb=rr.isElectron=rr.isNative=rr.isLinuxSnap=rr.isLinux=rr.isMacintosh=rr.isWindows=rr.LANGUAGE_DEFAULT=void 0;rr.PlatformToString=Bwt;rr.isLittleEndian=Dwt;rr.isBigSurOrNewer=Pwt;var tFe=eFe();rr.LANGUAGE_DEFAULT="en";var kk=!1,Bk=!1,Rk=!1,oFe=!1,sFe=!1,Ece=!1,aFe=!1,Ice=!1,lFe=!1,cFe=!1,Sk,OG=rr.LANGUAGE_DEFAULT,bce=rr.LANGUAGE_DEFAULT,uFe,r2,n2=globalThis,Uf;typeof n2.vscode<"u"&&typeof n2.vscode.process<"u"?Uf=n2.vscode.process:typeof process<"u"&&(Uf=process);var fFe=typeof Uf?.versions?.electron=="string",kwt=fFe&&Uf?.type==="renderer";if(typeof Uf=="object"){kk=Uf.platform==="win32",Bk=Uf.platform==="darwin",Rk=Uf.platform==="linux",oFe=Rk&&!!Uf.env.SNAP&&!!Uf.env.SNAP_REVISION,aFe=fFe,lFe=!!Uf.env.CI||!!Uf.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Sk=rr.LANGUAGE_DEFAULT,OG=rr.LANGUAGE_DEFAULT;let e=Uf.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e),r=t.availableLanguages["*"];Sk=t.locale,bce=t.osLocale,OG=r||rr.LANGUAGE_DEFAULT,uFe=t._translationsConfigFile}catch{}sFe=!0}else typeof navigator=="object"&&!kwt?(r2=navigator.userAgent,kk=r2.indexOf("Windows")>=0,Bk=r2.indexOf("Macintosh")>=0,Ice=(r2.indexOf("Macintosh")>=0||r2.indexOf("iPad")>=0||r2.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Rk=r2.indexOf("Linux")>=0,cFe=r2?.indexOf("Mobi")>=0,Ece=!0,Sk=tFe.getConfiguredDefaultLocale(tFe.localize({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||rr.LANGUAGE_DEFAULT,OG=Sk,bce=navigator.language):console.error("Unable to resolve platform.");function Bwt(e){switch(e){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}s(Bwt,"PlatformToString");var UG=0;Bk?UG=1:kk?UG=3:Rk&&(UG=2);rr.isWindows=kk;rr.isMacintosh=Bk;rr.isLinux=Rk;rr.isLinuxSnap=oFe;rr.isNative=sFe;rr.isElectron=aFe;rr.isWeb=Ece;rr.isWebWorker=Ece&&typeof n2.importScripts=="function";rr.webWorkerOrigin=rr.isWebWorker?n2.origin:void 0;rr.isIOS=Ice;rr.isMobile=cFe;rr.isCI=lFe;rr.platform=UG;rr.userAgent=r2;rr.language=OG;var rFe;(function(e){function t(){return rr.language}s(t,"value"),e.value=t;function r(){return rr.language.length===2?rr.language==="en":rr.language.length>=3?rr.language[0]==="e"&&rr.language[1]==="n"&&rr.language[2]==="-":!1}s(r,"isDefaultVariant"),e.isDefaultVariant=r;function n(){return rr.language==="en"}s(n,"isDefault"),e.isDefault=n})(rFe||(rr.Language=rFe={}));rr.locale=Sk;rr.platformLocale=bce;rr.translationsConfigFile=uFe;rr.setTimeout0IsFaster=typeof n2.postMessage=="function"&&!n2.importScripts;rr.setTimeout0=(()=>{if(rr.setTimeout0IsFaster){let e=[];n2.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){let o=e[n];if(o.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),o.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),n2.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();rr.OS=Bk||Ice?2:kk?1:3;var nFe=!0,iFe=!1;function Dwt(){if(!iFe){iFe=!0;let e=new Uint8Array(2);e[0]=1,e[1]=2,nFe=new Uint16Array(e.buffer)[0]===513}return nFe}s(Dwt,"isLittleEndian");rr.isChrome=!!(rr.userAgent&&rr.userAgent.indexOf("Chrome")>=0);rr.isFirefox=!!(rr.userAgent&&rr.userAgent.indexOf("Firefox")>=0);rr.isSafari=!!(!rr.isChrome&&rr.userAgent&&rr.userAgent.indexOf("Safari")>=0);rr.isEdge=!!(rr.userAgent&&rr.userAgent.indexOf("Edg/")>=0);rr.isAndroid=!!(rr.userAgent&&rr.userAgent.indexOf("Android")>=0);function Pwt(e){return parseFloat(e)>=20}s(Pwt,"isBigSurOrNewer")});var mFe=H($g=>{"use strict";d();Object.defineProperty($g,"__esModule",{value:!0});$g.arch=$g.platform=$g.env=$g.cwd=void 0;var dFe=Tce(),Nb,wce=globalThis.vscode;if(typeof wce<"u"&&typeof wce.process<"u"){let e=wce.process;Nb={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"?Nb={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Nb={get platform(){return dFe.isWindows?"win32":dFe.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};$g.cwd=Nb.cwd;$g.env=Nb.env;$g.platform=Nb.platform;$g.arch=Nb.arch});var pFe=H(Sr=>{"use strict";d();Object.defineProperty(Sr,"__esModule",{value:!0});Sr.delimiter=Sr.sep=Sr.toNamespacedPath=Sr.parse=Sr.format=Sr.extname=Sr.basename=Sr.dirname=Sr.relative=Sr.resolve=Sr.join=Sr.isAbsolute=Sr.normalize=Sr.posix=Sr.win32=void 0;var N9=mFe(),Nwt=65,Lwt=97,Fwt=90,Mwt=122,zC=46,ql=47,Tu=92,VC=58,Qwt=63,qG=class extends Error{static{s(this,"ErrorInvalidArgType")}code;constructor(t,r,n){let i;typeof r=="string"&&r.indexOf("not ")===0?(i="must not be",r=r.replace(/^not /,"")):i="must be";let o=t.indexOf(".")!==-1?"property":"argument",a=`The "${t}" ${o} ${i} of type ${r}`;a+=`. Received type ${typeof n}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}};function Owt(e,t){if(e===null||typeof e!="object")throw new qG(t,"Object",e)}s(Owt,"validateObject");function ua(e,t){if(typeof e!="string")throw new qG(t,"string",e)}s(ua,"validateString");var wu=N9.platform==="win32";function ai(e){return e===ql||e===Tu}s(ai,"isPathSeparator");function _ce(e){return e===ql}s(_ce,"isPosixPathSeparator");function $C(e){return e>=Nwt&&e<=Fwt||e>=Lwt&&e<=Mwt}s($C,"isWindowsDeviceRoot");function WG(e,t,r,n){let i="",o=0,a=-1,l=0,c=0;for(let u=0;u<=e.length;++u){if(u<e.length)c=e.charCodeAt(u);else{if(n(c))break;c=ql}if(n(c)){if(!(a===u-1||l===1))if(l===2){if(i.length<2||o!==2||i.charCodeAt(i.length-1)!==zC||i.charCodeAt(i.length-2)!==zC){if(i.length>2){let f=i.lastIndexOf(r);f===-1?(i="",o=0):(i=i.slice(0,f),o=i.length-1-i.lastIndexOf(r)),a=u,l=0;continue}else if(i.length!==0){i="",o=0,a=u,l=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",o=2)}else i.length>0?i+=`${r}${e.slice(a+1,u)}`:i=e.slice(a+1,u),o=u-a-1;a=u,l=0}else c===zC&&l!==-1?++l:l=-1}return i}s(WG,"normalizeString");function hFe(e,t){Owt(t,"pathObject");let r=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}s(hFe,"_format");Sr.win32={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let o;if(i>=0){if(o=e[i],ua(o,"path"),o.length===0)continue}else t.length===0?o=N9.cwd():(o=N9.env[`=${t}`]||N9.cwd(),(o===void 0||o.slice(0,2).toLowerCase()!==t.toLowerCase()&&o.charCodeAt(2)===Tu)&&(o=`${t}\\`));let a=o.length,l=0,c="",u=!1,f=o.charCodeAt(0);if(a===1)ai(f)&&(l=1,u=!0);else if(ai(f))if(u=!0,ai(o.charCodeAt(1))){let m=2,h=m;for(;m<a&&!ai(o.charCodeAt(m));)m++;if(m<a&&m!==h){let p=o.slice(h,m);for(h=m;m<a&&ai(o.charCodeAt(m));)m++;if(m<a&&m!==h){for(h=m;m<a&&!ai(o.charCodeAt(m));)m++;(m===a||m!==h)&&(c=`\\\\${p}\\${o.slice(h,m)}`,l=m)}}}else l=1;else $C(f)&&o.charCodeAt(1)===VC&&(c=o.slice(0,2),l=2,a>2&&ai(o.charCodeAt(2))&&(u=!0,l=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(n){if(t.length>0)break}else if(r=`${o.slice(l)}\\${r}`,n=u,u&&t.length>0)break}return r=WG(r,!n,"\\",ai),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){ua(e,"path");let t=e.length;if(t===0)return".";let r=0,n,i=!1,o=e.charCodeAt(0);if(t===1)return _ce(o)?"\\":e;if(ai(o))if(i=!0,ai(e.charCodeAt(1))){let l=2,c=l;for(;l<t&&!ai(e.charCodeAt(l));)l++;if(l<t&&l!==c){let u=e.slice(c,l);for(c=l;l<t&&ai(e.charCodeAt(l));)l++;if(l<t&&l!==c){for(c=l;l<t&&!ai(e.charCodeAt(l));)l++;if(l===t)return`\\\\${u}\\${e.slice(c)}\\`;l!==c&&(n=`\\\\${u}\\${e.slice(c,l)}`,r=l)}}}else r=1;else $C(o)&&e.charCodeAt(1)===VC&&(n=e.slice(0,2),r=2,t>2&&ai(e.charCodeAt(2))&&(i=!0,r=3));let a=r<t?WG(e.slice(r),!i,"\\",ai):"";return a.length===0&&!i&&(a="."),a.length>0&&ai(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){ua(e,"path");let t=e.length;if(t===0)return!1;let r=e.charCodeAt(0);return ai(r)||t>2&&$C(r)&&e.charCodeAt(1)===VC&&ai(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let o=0;o<e.length;++o){let a=e[o];ua(a,"path"),a.length>0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&ai(r.charCodeAt(0))){++i;let o=r.length;o>1&&ai(r.charCodeAt(1))&&(++i,o>2&&(ai(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&ai(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return Sr.win32.normalize(t)},relative(e,t){if(ua(e,"from"),ua(t,"to"),e===t)return"";let r=Sr.win32.resolve(e),n=Sr.win32.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;i<e.length&&e.charCodeAt(i)===Tu;)i++;let o=e.length;for(;o-1>i&&e.charCodeAt(o-1)===Tu;)o--;let a=o-i,l=0;for(;l<t.length&&t.charCodeAt(l)===Tu;)l++;let c=t.length;for(;c-1>l&&t.charCodeAt(c-1)===Tu;)c--;let u=c-l,f=a<u?a:u,m=-1,h=0;for(;h<f;h++){let g=e.charCodeAt(i+h);if(g!==t.charCodeAt(l+h))break;g===Tu&&(m=h)}if(h!==f){if(m===-1)return n}else{if(u>f){if(t.charCodeAt(l+h)===Tu)return n.slice(l+h+1);if(h===2)return n.slice(l+h)}a>f&&(e.charCodeAt(i+h)===Tu?m=h:h===2&&(m=3)),m===-1&&(m=0)}let p="";for(h=i+m+1;h<=o;++h)(h===o||e.charCodeAt(h)===Tu)&&(p+=p.length===0?"..":"\\..");return l+=m,p.length>0?`${p}${n.slice(l,c)}`:(n.charCodeAt(l)===Tu&&++l,n.slice(l,c))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=Sr.win32.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Tu){if(t.charCodeAt(1)===Tu){let r=t.charCodeAt(2);if(r!==Qwt&&r!==zC)return`\\\\?\\UNC\\${t.slice(2)}`}}else if($C(t.charCodeAt(0))&&t.charCodeAt(1)===VC&&t.charCodeAt(2)===Tu)return`\\\\?\\${t}`;return e},dirname(e){ua(e,"path");let t=e.length;if(t===0)return".";let r=-1,n=0,i=e.charCodeAt(0);if(t===1)return ai(i)?e:".";if(ai(i)){if(r=n=1,ai(e.charCodeAt(1))){let l=2,c=l;for(;l<t&&!ai(e.charCodeAt(l));)l++;if(l<t&&l!==c){for(c=l;l<t&&ai(e.charCodeAt(l));)l++;if(l<t&&l!==c){for(c=l;l<t&&!ai(e.charCodeAt(l));)l++;if(l===t)return e;l!==c&&(r=n=l+1)}}}}else $C(i)&&e.charCodeAt(1)===VC&&(r=t>2&&ai(e.charCodeAt(2))?3:2,n=r);let o=-1,a=!0;for(let l=t-1;l>=n;--l)if(ai(e.charCodeAt(l))){if(!a){o=l;break}}else a=!1;if(o===-1){if(r===-1)return".";o=r}return e.slice(0,o)},basename(e,t){t!==void 0&&ua(t,"ext"),ua(e,"path");let r=0,n=-1,i=!0,o;if(e.length>=2&&$C(e.charCodeAt(0))&&e.charCodeAt(1)===VC&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(o=e.length-1;o>=r;--o){let c=e.charCodeAt(o);if(ai(c)){if(!i){r=o+1;break}}else l===-1&&(i=!1,l=o+1),a>=0&&(c===t.charCodeAt(a)?--a===-1&&(n=o):(a=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=r;--o)if(ai(e.charCodeAt(o))){if(!i){r=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname(e){ua(e,"path");let t=0,r=-1,n=0,i=-1,o=!0,a=0;e.length>=2&&e.charCodeAt(1)===VC&&$C(e.charCodeAt(0))&&(t=n=2);for(let l=e.length-1;l>=t;--l){let c=e.charCodeAt(l);if(ai(c)){if(!o){n=l+1;break}continue}i===-1&&(o=!1,i=l+1),c===zC?r===-1?r=l:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:hFe.bind(null,"\\"),parse(e){ua(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let r=e.length,n=0,i=e.charCodeAt(0);if(r===1)return ai(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ai(i)){if(n=1,ai(e.charCodeAt(1))){let m=2,h=m;for(;m<r&&!ai(e.charCodeAt(m));)m++;if(m<r&&m!==h){for(h=m;m<r&&ai(e.charCodeAt(m));)m++;if(m<r&&m!==h){for(h=m;m<r&&!ai(e.charCodeAt(m));)m++;m===r?n=m:m!==h&&(n=m+1)}}}}else if($C(i)&&e.charCodeAt(1)===VC){if(r<=2)return t.root=t.dir=e,t;if(n=2,ai(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let o=-1,a=n,l=-1,c=!0,u=e.length-1,f=0;for(;u>=n;--u){if(i=e.charCodeAt(u),ai(i)){if(!c){a=u+1;break}continue}l===-1&&(c=!1,l=u+1),i===zC?o===-1?o=u:f!==1&&(f=1):o!==-1&&(f=-1)}return l!==-1&&(o===-1||f===0||f===1&&o===l-1&&o===a+1?t.base=t.name=e.slice(a,l):(t.name=e.slice(a,o),t.base=e.slice(a,l),t.ext=e.slice(o,l))),a>0&&a!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null};var Uwt=(()=>{if(wu){let e=/\\/g;return()=>{let t=N9.cwd().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>N9.cwd()})();Sr.posix={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let i=n>=0?e[n]:Uwt();ua(i,"path"),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===ql)}return t=WG(t,!r,"/",_ce),r?`/${t}`:t.length>0?t:"."},normalize(e){if(ua(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===ql,r=e.charCodeAt(e.length-1)===ql;return e=WG(e,!t,"/",_ce),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return ua(e,"path"),e.length>0&&e.charCodeAt(0)===ql},join(...e){if(e.length===0)return".";let t;for(let r=0;r<e.length;++r){let n=e[r];ua(n,"path"),n.length>0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":Sr.posix.normalize(t)},relative(e,t){if(ua(e,"from"),ua(t,"to"),e===t||(e=Sr.posix.resolve(e),t=Sr.posix.resolve(t),e===t))return"";let r=1,n=e.length,i=n-r,o=1,a=t.length-o,l=i<a?i:a,c=-1,u=0;for(;u<l;u++){let m=e.charCodeAt(r+u);if(m!==t.charCodeAt(o+u))break;m===ql&&(c=u)}if(u===l)if(a>l){if(t.charCodeAt(o+u)===ql)return t.slice(o+u+1);if(u===0)return t.slice(o+u)}else i>l&&(e.charCodeAt(r+u)===ql?c=u:u===0&&(c=0));let f="";for(u=r+c+1;u<=n;++u)(u===n||e.charCodeAt(u)===ql)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(o+c)}`},toNamespacedPath(e){return e},dirname(e){if(ua(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===ql,r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===ql){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&ua(t,"ext"),ua(e,"path");let r=0,n=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){let c=e.charCodeAt(o);if(c===ql){if(!i){r=o+1;break}}else l===-1&&(i=!1,l=o+1),a>=0&&(c===t.charCodeAt(a)?--a===-1&&(n=o):(a=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===ql){if(!i){r=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname(e){ua(e,"path");let t=-1,r=0,n=-1,i=!0,o=0;for(let a=e.length-1;a>=0;--a){let l=e.charCodeAt(a);if(l===ql){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),l===zC?t===-1?t=a:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||n===-1||o===0||o===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:hFe.bind(null,"/"),parse(e){ua(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let r=e.charCodeAt(0)===ql,n;r?(t.root="/",n=1):n=0;let i=-1,o=0,a=-1,l=!0,c=e.length-1,u=0;for(;c>=n;--c){let f=e.charCodeAt(c);if(f===ql){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),f===zC?i===-1?i=c:u!==1&&(u=1):i!==-1&&(u=-1)}if(a!==-1){let f=o===0&&r?1:o;i===-1||u===0||u===1&&i===a-1&&i===o+1?t.base=t.name=e.slice(f,a):(t.name=e.slice(f,i),t.base=e.slice(f,a),t.ext=e.slice(i,a))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Sr.posix.win32=Sr.win32.win32=Sr.win32;Sr.posix.posix=Sr.win32.posix=Sr.posix;Sr.normalize=wu?Sr.win32.normalize:Sr.posix.normalize;Sr.isAbsolute=wu?Sr.win32.isAbsolute:Sr.posix.isAbsolute;Sr.join=wu?Sr.win32.join:Sr.posix.join;Sr.resolve=wu?Sr.win32.resolve:Sr.posix.resolve;Sr.relative=wu?Sr.win32.relative:Sr.posix.relative;Sr.dirname=wu?Sr.win32.dirname:Sr.posix.dirname;Sr.basename=wu?Sr.win32.basename:Sr.posix.basename;Sr.extname=wu?Sr.win32.extname:Sr.posix.extname;Sr.format=wu?Sr.win32.format:Sr.posix.format;Sr.parse=wu?Sr.win32.parse:Sr.posix.parse;Sr.toNamespacedPath=wu?Sr.win32.toNamespacedPath:Sr.posix.toNamespacedPath;Sr.sep=wu?Sr.win32.sep:Sr.posix.sep;Sr.delimiter=wu?Sr.win32.delimiter:Sr.posix.delimiter});var bFe=H(L9=>{"use strict";d();Object.defineProperty(L9,"__esModule",{value:!0});L9.URI=void 0;L9.isUriComponents=zwt;L9.uriToFsPath=VG;var gFe=pFe(),HG=Tce(),qwt=/^\w[\w\d+.-]*$/,Wwt=/^\//,Gwt=/^\/\//;function Hwt(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!qwt.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Wwt.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Gwt.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(Hwt,"_validateUri");function jwt(e,t){return!e&&!t?"file":e}s(jwt,"_schemeFix");function Vwt(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Hh&&(t=Hh+t):t=Hh;break}return t}s(Vwt,"_referenceResolution");var jo="",Hh="/",$wt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,jG=class e{static{s(this,"URI")}static isUri(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}scheme;authority;path;query;fragment;constructor(t,r,n,i,o,a=!1){typeof t=="object"?(this.scheme=t.scheme||jo,this.authority=t.authority||jo,this.path=t.path||jo,this.query=t.query||jo,this.fragment=t.fragment||jo):(this.scheme=jwt(t,a),this.authority=r||jo,this.path=Vwt(this.scheme,n||jo),this.query=i||jo,this.fragment=o||jo,Hwt(this,a))}get fsPath(){return VG(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:o,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=jo),n===void 0?n=this.authority:n===null&&(n=jo),i===void 0?i=this.path:i===null&&(i=jo),o===void 0?o=this.query:o===null&&(o=jo),a===void 0?a=this.fragment:a===null&&(a=jo),r===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&a===this.fragment?this:new YC(r,n,i,o,a)}static parse(t,r=!1){let n=$wt.exec(t);return n?new YC(n[2]||jo,GG(n[4]||jo),GG(n[5]||jo),GG(n[7]||jo),GG(n[9]||jo),r):new YC(jo,jo,jo,jo,jo)}static file(t){let r=jo;if(HG.isWindows&&(t=t.replace(/\\/g,Hh)),t[0]===Hh&&t[1]===Hh){let n=t.indexOf(Hh,2);n===-1?(r=t.substring(2),t=Hh):(r=t.substring(2,n),t=t.substring(n)||Hh)}return new YC("file",r,t,jo,jo)}static from(t,r){return new YC(t.scheme,t.authority,t.path,t.query,t.fragment,r)}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return HG.isWindows&&t.scheme==="file"?n=e.file(gFe.win32.join(VG(t,!0),...r)).path:n=gFe.posix.join(t.path,...r),t.with({path:n})}toString(t=!1){return Sce(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let r=new YC(t);return r._formatted=t.external??null,r._fsPath=t._sep===CFe?t.fsPath??null:null,r}}else return t}};L9.URI=jG;function zwt(e){return!e||typeof e!="object"?!1:typeof e.scheme=="string"&&(typeof e.authority=="string"||typeof e.authority>"u")&&(typeof e.path=="string"||typeof e.path>"u")&&(typeof e.query=="string"||typeof e.query>"u")&&(typeof e.fragment=="string"||typeof e.fragment>"u")}s(zwt,"isUriComponents");var CFe=HG.isWindows?1:void 0,YC=class extends jG{static{s(this,"Uri")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=VG(this,!1)),this._fsPath}toString(t=!1){return t?Sce(this,!0):(this._formatted||(this._formatted=Sce(this,!1)),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=CFe),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}},xFe={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function AFe(e,t,r){let n,i=-1;for(let o=0;o<e.length;o++){let a=e.charCodeAt(o);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||r&&a===91||r&&a===93||r&&a===58)i!==-1&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n!==void 0&&(n+=e.charAt(o));else{n===void 0&&(n=e.substr(0,o));let l=xFe[a];l!==void 0?(i!==-1&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=l):i===-1&&(i=o)}}return i!==-1&&(n+=encodeURIComponent(e.substring(i))),n!==void 0?n:e}s(AFe,"encodeURIComponentFast");function Ywt(e){let t;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=xFe[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}s(Ywt,"encodeURIComponentMinimal");function VG(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,HG.isWindows&&(r=r.replace(/\//g,"\\")),r}s(VG,"uriToFsPath");function Sce(e,t){let r=t?Ywt:AFe,n="",{scheme:i,authority:o,path:a,query:l,fragment:c}=e;if(i&&(n+=i,n+=":"),(o||i==="file")&&(n+=Hh,n+=Hh),o){let u=o.indexOf("@");if(u!==-1){let f=o.substr(0,u);o=o.substr(u+1),u=f.lastIndexOf(":"),u===-1?n+=r(f,!1,!1):(n+=r(f.substr(0,u),!1,!1),n+=":",n+=r(f.substr(u+1),!1,!0)),n+="@"}o=o.toLowerCase(),u=o.lastIndexOf(":"),u===-1?n+=r(o,!1,!0):(n+=r(o.substr(0,u),!1,!0),n+=o.substr(u))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){let u=a.charCodeAt(1);u>=65&&u<=90&&(a=`/${String.fromCharCode(u+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){let u=a.charCodeAt(0);u>=65&&u<=90&&(a=`${String.fromCharCode(u+32)}:${a.substr(2)}`)}n+=r(a,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),c&&(n+="#",n+=t?c:AFe(c,!1,!1)),n}s(Sce,"_asFormatted");function vFe(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+vFe(e.substr(3)):e}}s(vFe,"decodeURIComponentGraceful");var yFe=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function GG(e){return e.match(yFe)?e.replace(yFe,t=>vFe(t)):e}s(GG,"percentDecode")});var Bce=H(KC=>{"use strict";d();Object.defineProperty(KC,"__esModule",{value:!0});KC.PromptReference=KC.ChatResponseReferencePartStatusKind=KC.PromptMetadata=void 0;var Dk=bFe(),Rce=class{static{s(this,"PromptMetadata")}_marker;toString(){return Object.getPrototypeOf(this).constructor.name}};KC.PromptMetadata=Rce;var EFe;(function(e){e[e.Complete=1]="Complete",e[e.Partial=2]="Partial",e[e.Omitted=3]="Omitted"})(EFe||(KC.ChatResponseReferencePartStatusKind=EFe={}));var kce=class e{static{s(this,"PromptReference")}anchor;iconPath;options;static fromJSON(t){let r=s(n=>"scheme"in n?Dk.URI.from(n):{uri:Dk.URI.from(n.uri),range:n.range},"uriOrLocation");return new e("variableName"in t.anchor?{variableName:t.anchor.variableName,value:t.anchor.value&&r(t.anchor.value)}:r(t.anchor),t.iconPath&&("scheme"in t.iconPath?Dk.URI.from(t.iconPath):"light"in t.iconPath?{light:Dk.URI.from(t.iconPath.light),dark:Dk.URI.from(t.iconPath.dark)}:t.iconPath),t.options)}constructor(t,r,n){this.anchor=t,this.iconPath=r,this.options=n}toJSON(){return{anchor:this.anchor,iconPath:this.iconPath,options:this.options}}};KC.PromptReference=kce});var Uce=H(M9=>{"use strict";d();Object.defineProperty(M9,"__esModule",{value:!0});M9.PromptRenderer=M9.MetadataMap=void 0;var Kwt=ice(),Pk=cce(),F9=WC(),Ba=vce(),Oce=Bce(),IFe;(function(e){e.empty={get:s(()=>{},"get"),getAll:s(()=>[],"getAll")}})(IFe||(M9.MetadataMap=IFe={}));var Pce=class{static{s(this,"PromptRenderer")}_endpoint;_ctor;_props;_tokenizer;_usedContext=[];_ignoredFiles=[];_growables=[];_root=new zG(null,0);_tokenLimits=[];tracer=void 0;constructor(t,r,n,i){this._endpoint=t,this._ctor=r,this._props=n,this._tokenizer=i}getIgnoredFiles(){return Array.from(new Set(this._ignoredFiles))}getUsedContext(){return this._usedContext}createElement(t){return new t.ctor(t.props)}async _processPromptPieces(t,r,n,i){let o=new Map;for(let[c,u]of r.entries()){if(Array.isArray(u.children)&&(u.props=u.props??{},u.props.children=u.children),!u.ctor){let g=SFe(u.path);throw new Error(`Invalid ChatMessage child! Child must be a TSX component that extends PromptElement at ${g}`)}let f=this.createElement(u),m;f instanceof Ba.TokenLimit&&(m=u.props.max,this._tokenLimits.push({limit:m,id:u.node.id})),u.node.setObj(f);let h=u.props.flexGrow??1/0,p=o.get(h);p||(p=[],o.set(h,p)),p.push({element:u,promptElementInstance:f,tokenLimit:m})}if(o.size===0)return;let a=[...o.entries()].sort(([c],[u])=>u-c).map(([c,u])=>u),l=s(c=>{let u=0;for(let f=c+1;f<a.length;f++)for(let{element:m}of a[f]){if(!m.props.flexReserve)continue;let h=typeof m.props.flexReserve=="string"?Math.floor(t.remainingTokenBudget/Number(m.props.flexReserve.slice(1))):m.props.flexReserve;u+=h}return t.consume(u),u},"setReserved");for(let[c,u]of a.entries()){let f=l(c),m=0;for(let{element:x}of u)m+=x.props.flexBasis??1;let h=0,p=u.map(x=>{if(x.tokenLimit===void 0)return!1;let b=x.element.props.flexBasis??1,E=b/m;return Math.floor(t.remainingTokenBudget*E)<x.tokenLimit?!1:(m-=b,h+=x.tokenLimit,!0)}),g=u.map((x,b)=>{let E=(x.element.props.flexBasis??1)/m;return{tokenBudget:p[b]?x.tokenLimit:Math.floor((t.remainingTokenBudget-h)*E),endpoint:t.endpoint,countTokens:s((_,k)=>this._tokenizer.tokenLength(typeof _=="string"?{type:F9.Raw.ChatCompletionContentPartKind.Text,text:_}:_,k),"countTokens")}});t.consume(-f),this.tracer?.addRenderEpoch?.({inNode:u[0].element.node.parent?.id,flexValue:u[0].element.props.flexGrow??0,tokenBudget:t.remainingTokenBudget,reservedTokens:f,elements:u.map((x,b)=>({id:x.element.node.id,tokenBudget:g[b].tokenBudget}))}),await Promise.all(u.map(async({element:x,promptElementInstance:b},E)=>{let _=await wFe(x,()=>b.prepare?.(g[E],n,i));x.node.setState(_)}));let y=await Promise.all(u.map(async({element:x,promptElementInstance:b},E)=>{let _=g[E];return await wFe(x,()=>b.render(x.node.getState(),_,n,i))}));for(let[x,{element:b,promptElementInstance:E}]of u.entries()){let _=g[x],k=y[x];if(!k)continue;let B=await this._processPromptRenderPiece(new Lb(_.tokenBudget,this._endpoint),b,E,k,n,i);E instanceof Ba.Expandable&&this._growables.push({initialConsume:B,elem:b.node}),t.consume(B)}}}async _processPromptRenderPiece(t,r,n,i,o,a){let l=_Fe(i),c=new Lb(t.tokenBudget,this._endpoint),{tokensConsumed:u}=await Jwt(this._tokenizer,r,n,l);return c.consume(u),await this._handlePromptChildren(r,l,c,o,a),c.consumed}async renderElementJSON(t){return await this._processPromptPieces(new Lb(this._endpoint.modelMaxPromptTokens,this._endpoint),[{node:this._root,ctor:this._ctor,props:this._props,children:[],path:[this._ctor]}],void 0,t),{node:this._root.toJSON()}}async render(t,r){let n=await this.renderRaw(t,r);return{...n,messages:(0,F9.toMode)(this._tokenizer.mode,n.messages)}}async renderRaw(t,r){await this._processPromptPieces(new Lb(this._endpoint.modelMaxPromptTokens,this._endpoint),[{node:this._root,ctor:this._ctor,props:this._props,children:[],path:[this._ctor]}],t,r);let{container:n,allMetadata:i,removed:o}=await this._getFinalElementTree(this._endpoint.modelMaxPromptTokens,r);this.tracer?.didMaterializeTree?.({budget:this._endpoint.modelMaxPromptTokens,renderedTree:{container:n,removed:o,budget:this._endpoint.modelMaxPromptTokens},tokenizer:this._tokenizer,renderTree:s(h=>this._getFinalElementTree(h,void 0).then(p=>({...p,budget:h})),"renderTree")});let a=[...n.toChatMessages()],l=await n.tokenCount(this._tokenizer),c=[...n.allMetadata()],u=new Set,f=c.map(h=>{if(!(h instanceof zg))return;let p=h.reference,g="variableName"in p.anchor;if(g&&!u.has(p.anchor.variableName))return u.add(p.anchor.variableName),p;if(!g)return p}).filter(YG),m=i.map(h=>{if(!(h instanceof zg)||c.includes(h))return;let p=h.reference,g="variableName"in p.anchor;if(g&&!u.has(p.anchor.variableName))return u.add(p.anchor.variableName),p;if(!g)return p}).filter(YG);return{metadata:{get:s(h=>c.find(p=>p instanceof h),"get"),getAll:s(h=>c.filter(p=>p instanceof h),"getAll")},messages:a,hasIgnoredFiles:this._ignoredFiles.length>0,tokenCount:l,references:f,omittedReferences:m}}async _getFinalElementTree(t,r){let n=this._root.materialize(),i=[...n.allMetadata()],o=[{limit:t,id:this._root.id},...this._tokenLimits],a=0;for(let l=o.length-1;l>=0;l--){let c=o[l];if(c.limit>t)continue;let u=n.findById(c.id);if(!u)continue;let f=await u.tokenCount(this._tokenizer);if(f<c.limit&&!await this._grow(u,f,c.limit,r))continue;let m=await u.tokenCount(this._tokenizer);for(;m>c.limit;){let h=await u.baseMessageTokenCount(this._tokenizer);do for(let p of u.removeLowestPriorityChild()){a++;let g=p.upperBoundTokenCount(this._tokenizer);m-=typeof g=="number"?g:await g}while(m-h>c.limit);m=await u.tokenCount(this._tokenizer)}}return{container:n,allMetadata:i,removed:a}}async _grow(t,r,n,i){if(!this._growables.length)return!1;for(let o of this._growables){if(!t.findById(o.elem.id))continue;let a=o.elem.getObj();if(!(a instanceof Ba.Expandable))throw new Error("unreachable: expected growable");let l=new zG(null,0,o.elem.id),c=new Lb(n-r+o.initialConsume,this._endpoint),u=await this._processPromptRenderPiece(c,{node:l,ctor:this._ctor,props:{},children:[],path:[this._ctor]},a,await a.render(void 0,{tokenBudget:c.tokenBudget,endpoint:this._endpoint,countTokens:s((h,p)=>this._tokenizer.tokenLength(typeof h=="string"?{type:F9.Raw.ChatCompletionContentPartKind.Text,text:h}:h,p),"countTokens")}),void 0,i),f=l.materialize();if(!t.replaceNode(o.elem.id,f))throw new Error("unreachable: could not find old element to replace");if(r-=o.initialConsume,r+=u,r>=n)break}return!0}_handlePromptChildren(t,r,n,i,o){if(t.ctor===Ba.TextChunk){this._handleExtrinsicTextChunkChildren(t.node,t.node,t.props,r);return}let a=[];for(let l of r){if(l.kind==="literal"){t.node.appendStringChild(l.value,t.props.priority??Number.MAX_SAFE_INTEGER);continue}if(l.kind==="intrinsic"){this._handleIntrinsic(t.node,l.name,{priority:t.props.priority??Number.MAX_SAFE_INTEGER,...l.props},$G(l.children));continue}let c=t.node.createChild();a.push({node:c,ctor:l.ctor,props:l.props,children:l.children,path:[...t.path,l.ctor]})}return this._processPromptPieces(n,a,i,o)}_handleIntrinsic(t,r,n,i,o){switch(r){case"meta":return this._handleIntrinsicMeta(t,n,i);case"br":return this._handleIntrinsicLineBreak(t,n,i,n.priority,o);case"usedContext":return this._handleIntrinsicUsedContext(t,n,i);case"references":return this._handleIntrinsicReferences(t,n,i);case"ignoredFiles":return this._handleIntrinsicIgnoredFiles(t,n,i);case"elementJSON":return this._handleIntrinsicElementJSON(t,n.data);case"cacheBreakpoint":return this._handleIntrinsicCacheBreakpoint(t,n,i,o)}throw new Error(`Unknown intrinsic element ${r}!`)}_handleIntrinsicCacheBreakpoint(t,r,n,i){if(n.length>0)throw new Error("<cacheBreakpoint /> must not have children!");t.addCacheBreakpoint(r,i)}_handleIntrinsicMeta(t,r,n){if(n.length>0)throw new Error("<meta /> must not have children!");r.local?t.addMetadata(r.value):this._root.addMetadata(r.value)}_handleIntrinsicLineBreak(t,r,n,i,o){if(n.length>0)throw new Error("<br /> must not have children!");t.appendLineBreak(i??Number.MAX_SAFE_INTEGER,o)}_handleIntrinsicElementJSON(t,r){let n=t.appendPieceJSON(r.node);if(this.tracer?.includeInEpoch)for(let i of n.elements())this.tracer.includeInEpoch({id:i.id,tokenBudget:0})}_handleIntrinsicUsedContext(t,r,n){if(n.length>0)throw new Error("<usedContext /> must not have children!");this._usedContext.push(...r.value)}_handleIntrinsicReferences(t,r,n){if(n.length>0)throw new Error("<reference /> must not have children!");for(let i of r.value)t.addMetadata(new zg(i))}_handleIntrinsicIgnoredFiles(t,r,n){if(n.length>0)throw new Error("<ignoredFiles /> must not have children!");this._ignoredFiles.push(...r.value)}_handleExtrinsicTextChunkChildren(t,r,n,i){let o=[],a=[];for(let l of i){if(l.kind==="extrinsic")throw new Error("TextChunk cannot have extrinsic children!");if(l.kind==="literal"&&o.push(l.value),l.kind==="intrinsic")if(l.name==="br")o.push(`
`);else if(l.name==="references")for(let c of l.props.value)a.push(new zg(c));else this._handleIntrinsic(t,l.name,l.props,$G(l.children),r.childIndex)}t.appendStringChild(o.join(""),n?.priority??Number.MAX_SAFE_INTEGER,a,r.childIndex,!0)}};M9.PromptRenderer=Pce;async function Jwt(e,t,r,n){let i=0;if((0,Ba.isChatMessagePromptElement)(r)){let o={role:t.props.role,content:[],...t.props.name?{name:t.props.name}:void 0,...t.props.toolCalls?{toolCalls:t.props.toolCalls}:void 0,...t.props.toolCallId?{toolCallId:t.props.toolCallId}:void 0};i+=await e.countMessageTokens((0,F9.toMode)(e.mode,o))}for(let o of n)o.kind==="literal"&&(i+=await e.tokenLength({type:F9.Raw.ChatCompletionContentPartKind.Text,text:o.value}));return{tokensConsumed:i}}s(Jwt,"computeTokensConsumedByLiterals");function _Fe(e,t=[]){return typeof e>"u"||typeof e=="boolean"?[]:(typeof e=="string"||typeof e=="number"?t.push(new Fce(String(e))):Xwt(e)?$G(e.children,t):Zwt(e)?$G(e,t):typeof e.ctor=="string"?t.push(new Nce(e.ctor,e.props,e.children)):t.push(new Lce(e.ctor,e.props,e.children)),t)}s(_Fe,"flattenAndReduce");function $G(e,t=[]){for(let r of e)_Fe(r,t);return t}s($G,"flattenAndReduceArr");var Nce=class{static{s(this,"IntrinsicPromptPiece")}name;props;children;kind="intrinsic";constructor(t,r,n){this.name=t,this.props=r,this.children=n}},Lce=class{static{s(this,"ExtrinsicPromptPiece")}ctor;props;children;kind="extrinsic";constructor(t,r,n){this.ctor=t,this.props=r,this.children=n}},Fce=class{static{s(this,"LiteralPromptPiece")}value;priority;kind="literal";constructor(t,r){this.value=t,this.priority=r}},Lb=class{static{s(this,"PromptSizingContext")}tokenBudget;endpoint;_consumed=0;constructor(t,r){this.tokenBudget=t,this.endpoint=r}get consumed(){return this._consumed>this.tokenBudget?this.tokenBudget:this._consumed}get remainingTokenBudget(){return Math.max(0,this.tokenBudget-this._consumed)}consume(t){this._consumed+=t}},zG=class e{static{s(this,"PromptTreeElement")}parent;childIndex;id;static _nextId=0;static fromJSON(t,r,n){let i=new e(null,t);switch(i._metadata=r.references?.map(o=>new zg(Oce.PromptReference.fromJSON(o)))??[],i._children=r.children.map((o,a)=>{switch(o.type){case 1:return e.fromJSON(a,o,n);case 2:return Nk.fromJSON(i,a,o);default:}}).filter(YG),r.ctor){case 1:i._objFlags=r.flags??0,i._obj=new Ba.BaseChatMessage(r.props);break;case 2:{if(r.keepWithId!==void 0){let o=n.get(r.keepWithId);o||(o=(0,Ba.useKeepWith)(),n.set(r.keepWithId,o)),i._obj=new o(r.props||{})}else i._obj=new Ba.LogicalWrapper(r.props||{});i._objFlags=r.flags??0;break}case 3:i._obj=new Ba.Image(r.props);break;default:}return i}kind=1;_obj=null;_state=void 0;_children=[];_metadata=[];_objFlags=0;constructor(t=null,r,n=e._nextId++){this.parent=t,this.childIndex=r,this.id=n}setObj(t){this._obj=t,this._obj instanceof Ba.LegacyPrioritization&&(this._objFlags|=1),this._obj instanceof Ba.Chunk&&(this._objFlags|=2),this._obj instanceof Ba.IfEmpty&&(this._objFlags|=8),this._obj.props.passPriority&&(this._objFlags|=4)}getObj(){return this._obj}setState(t){this._state=t}getState(){return this._state}createChild(){let t=new e(this,this._children.length);return this._children.push(t),t}appendPieceJSON(t){let r=e.fromJSON(this._children.length,t,new Map);return this._children.push(r),r}appendStringChild(t,r,n,i=this._children.length,o=!1){this._children.push(new Nk(this,i,t,r,n,o))}appendLineBreak(t,r=this._children.length){this._children.push(new Nk(this,r,`
`,t))}toJSON(){let t={type:1,ctor:2,ctorName:this._obj?.constructor.name,children:this._children.slice().sort((r,n)=>r.childIndex-n.childIndex).map(r=>r.toJSON()).filter(YG),props:{},references:this._metadata.filter(r=>r instanceof zg).map(r=>r.reference.toJSON())};if(this._obj&&(t.props=Dce(this._obj.props,Kwt.jsonRetainedProps)),this._obj instanceof Ba.BaseChatMessage)t.ctor=1,Object.assign(t.props,Dce(this._obj.props,["role","name","toolCalls","toolCallId"]));else{if(this._obj instanceof Ba.Image)return{...t,ctor:3,props:{...t.props,...Dce(this._obj.props,["src","detail"])}};this._obj instanceof Ba.AbstractKeepWith&&(t.keepWithId=this._obj.id)}return this._objFlags!==0&&(t.flags=this._objFlags),t}materialize(t){if(this._children.sort((r,n)=>r.childIndex-n.childIndex),this._obj instanceof Ba.Image)return new Pk.MaterializedChatMessageImage(t,this.id,this._obj.props.src,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,0,this._obj.props.detail??void 0);if(this._obj instanceof Ba.BaseChatMessage){if(this._obj.props.role===void 0||typeof this._obj.props.role!="number")throw new Error("Invalid ChatMessage!");return new Pk.MaterializedChatMessage(t,this.id,this._obj.props.role,this._obj.props.name,this._obj instanceof Ba.AssistantMessage?this._obj.props.toolCalls:void 0,this._obj instanceof Ba.ToolMessage?this._obj.props.toolCallId:void 0,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,r=>this._children.map(n=>n.materialize(r)))}else{let r=new Pk.GenericMaterializedContainer(t,this.id,this._obj?.constructor.name,this._obj?.props.priority??(this._obj?.props.passPriority?0:Number.MAX_SAFE_INTEGER),n=>this._children.map(i=>i.materialize(n)),this._metadata,this._objFlags);return this._obj instanceof Ba.AbstractKeepWith&&(r.keepWithId=this._obj.id),r}}addMetadata(t){this._metadata.push(t)}addCacheBreakpoint(t,r=this._children.length){if(!(this._obj instanceof Ba.BaseChatMessage))throw new Error("Cache breakpoints may only be direct children of chat messages");this._children.push(new Mce({type:F9.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:t.type},r))}*elements(){yield this;for(let t of this._children)t instanceof e&&(yield*t.elements())}},Mce=class{static{s(this,"PromptCacheBreakpoint")}part;childIndex;constructor(t,r){this.part=t,this.childIndex=r}toJSON(){}materialize(t){return new Pk.MaterializedChatMessageBreakpoint(t,this.part)}},Nk=class e{static{s(this,"PromptText")}parent;childIndex;text;priority;metadata;lineBreakBefore;static fromJSON(t,r,n){return new e(t,r,n.text,n.priority,n.references?.map(i=>new zg(Oce.PromptReference.fromJSON(i))),n.lineBreakBefore)}kind=2;constructor(t,r,n,i,o,a=!1){this.parent=t,this.childIndex=r,this.text=n,this.priority=i,this.metadata=o,this.lineBreakBefore=a}collectLeafs(t){t.push(this)}materialize(t){let r=this.lineBreakBefore?1:this.childIndex===0?2:0;return new Pk.MaterializedChatMessageTextChunk(t,this.text,this.priority??Number.MAX_SAFE_INTEGER,this.metadata||[],r)}toJSON(){return{type:2,priority:this.priority,text:this.text,references:this.metadata?.filter(t=>t instanceof zg).map(t=>t.reference.toJSON()),lineBreakBefore:this.lineBreakBefore}}};function Xwt(e){return(typeof e.ctor=="function"&&e.ctor.isFragment)??!1}s(Xwt,"isFragmentCtor");function YG(e){return e!==void 0}s(YG,"isDefined");var Qce=class extends Oce.PromptMetadata{static{s(this,"InternalMetadata")}},zg=class extends Qce{static{s(this,"ReferenceMetadata")}reference;constructor(t){super(),this.reference=t}};function Zwt(e){return!!e&&typeof e[Symbol.iterator]=="function"}s(Zwt,"isIterable");function Dce(e,t){let r={};for(let n of t)e.hasOwnProperty(n)&&(r[n]=e[n]);return r}s(Dce,"pickProps");function SFe(e){return e.map(t=>typeof t=="string"?t:t?t.name||"<anonymous>":String(t)).join(" > ")}s(SFe,"atPath");var TFe=new WeakSet;async function wFe(e,t){try{return await t()}catch(r){throw r instanceof Error&&!TFe.has(r)&&r.constructor.name!=="CancellationError"&&(TFe.add(r),r.message+=` (at tsx element ${SFe(e.path)})`),r}}s(wFe,"annotateError")});var RFe=H(KG=>{"use strict";d();Object.defineProperty(KG,"__esModule",{value:!0});KG.VSCodeTokenizer=void 0;var qce=WC(),Wce=class{static{s(this,"VSCodeTokenizer")}countTokens;mode=qce.OutputMode.VSCode;constructor(t,r){if(this.countTokens=t,r!==qce.OutputMode.VSCode)throw new Error("`mode` must be set to vscode when using vscode.LanguageModelChat as the tokenizer")}async tokenLength(t,r){return t.type===qce.Raw.ChatCompletionContentPartKind.Text?this.countTokens(t.text,r):Promise.resolve(0)}async countMessageTokens(t){return this.countTokens(t)}};KG.VSCodeTokenizer=Wce});var kFe=H(Q9=>{"use strict";d();Object.defineProperty(Q9,"__esModule",{value:!0});Q9.tracerCss=Q9.tracerSrc=void 0;Q9.tracerSrc='"use strict";(()=>{var $,m,se,Ue,w,re,le,q,X,G,K,Ae,D={},ce=[],Re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,J=Array.isArray;function E(t,e){for(var n in e)t[n]=e[n];return t}function ue(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function l(t,e,n){var o,r,_,c={};for(_ in e)_=="key"?o=e[_]:_=="ref"?r=e[_]:c[_]=e[_];if(arguments.length>2&&(c.children=arguments.length>3?$.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(_ in t.defaultProps)c[_]===void 0&&(c[_]=t.defaultProps[_]);return R(t,c,o,r,null)}function R(t,e,n,o,r){var _={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++se,__i:-1,__u:0};return r==null&&m.vnode!=null&&m.vnode(_),_}function N(t){return t.children}function B(t,e){this.props=t,this.context=e}function I(t,e){if(e==null)return t.__?I(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?I(t):null}function de(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return de(t)}}function ie(t){(!t.__d&&(t.__d=!0)&&w.push(t)&&!O.__r++||re!==m.debounceRendering)&&((re=m.debounceRendering)||le)(O)}function O(){var t,e,n,o,r,_,c,a;for(w.sort(q);t=w.shift();)t.__d&&(e=w.length,o=void 0,_=(r=(n=t).__v).__e,c=[],a=[],n.__P&&((o=E({},r)).__v=r.__v+1,m.vnode&&m.vnode(o),Q(n.__P,o,r,n.__n,n.__P.namespaceURI,32&r.__u?[_]:null,c,_??I(r),!!(32&r.__u),a),o.__v=r.__v,o.__.__k[o.__i]=o,me(c,o,a),o.__e!=_&&de(o)),w.length>e&&w.sort(q));O.__r=0}function pe(t,e,n,o,r,_,c,a,u,s,p){var i,f,d,b,x,C=o&&o.__k||ce,h=e.length;for(n.__d=u,Be(n,e,C),u=n.__d,i=0;i<h;i++)(d=n.__k[i])!=null&&(f=d.__i===-1?D:C[d.__i]||D,d.__i=i,Q(t,d,f,r,_,c,a,u,s,p),b=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&Y(f.ref,null,d),p.push(d.ref,d.__c||b,d)),x==null&&b!=null&&(x=b),65536&d.__u||f.__k===d.__k?u=fe(d,u,t):typeof d.type=="function"&&d.__d!==void 0?u=d.__d:b&&(u=b.nextSibling),d.__d=void 0,d.__u&=-196609);n.__d=u,n.__e=x}function Be(t,e,n){var o,r,_,c,a,u=e.length,s=n.length,p=s,i=0;for(t.__k=[],o=0;o<u;o++)(r=e[o])!=null&&typeof r!="boolean"&&typeof r!="function"?(c=o+i,(r=t.__k[o]=typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?R(null,r,null,null,null):J(r)?R(N,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?R(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=t,r.__b=t.__b+1,_=null,(a=r.__i=Oe(r,n,c,p))!==-1&&(p--,(_=n[a])&&(_.__u|=131072)),_==null||_.__v===null?(a==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):a!==c&&(a==c-1?i--:a==c+1?i++:(a>c?i--:i++,r.__u|=65536))):r=t.__k[o]=null;if(p)for(o=0;o<s;o++)(_=n[o])!=null&&!(131072&_.__u)&&(_.__e==t.__d&&(t.__d=I(_)),he(_,_))}function fe(t,e,n){var o,r;if(typeof t.type=="function"){for(o=t.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=t,e=fe(o[r],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=I(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function Oe(t,e,n,o){var r=t.key,_=t.type,c=n-1,a=n+1,u=e[n];if(u===null||u&&r==u.key&&_===u.type&&!(131072&u.__u))return n;if(o>(u!=null&&!(131072&u.__u)?1:0))for(;c>=0||a<e.length;){if(c>=0){if((u=e[c])&&!(131072&u.__u)&&r==u.key&&_===u.type)return c;c--}if(a<e.length){if((u=e[a])&&!(131072&u.__u)&&r==u.key&&_===u.type)return a;a++}}return-1}function _e(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Re.test(e)?n:n+"px"}function A(t,e,n,o,r){var _;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||_e(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||_e(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")_=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+_]=n,n?o?n.u=o.u:(n.u=X,t.addEventListener(e,_?K:G,_)):t.removeEventListener(e,_?K:G,_);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ae(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=X++;else if(e.t<n.u)return;return n(m.event?m.event(e):e)}}}function Q(t,e,n,o,r,_,c,a,u,s){var p,i,f,d,b,x,C,h,v,H,M,P,F,oe,z,j,k=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),_=[a=e.__e=n.__e]),(p=m.__b)&&p(e);e:if(typeof k=="function")try{if(h=e.props,v="prototype"in k&&k.prototype.render,H=(p=k.contextType)&&o[p.__c],M=p?H?H.props.value:p.__:o,n.__c?C=(i=e.__c=n.__c).__=i.__E:(v?e.__c=i=new k(h,M):(e.__c=i=new B(h,M),i.constructor=k,i.render=We),H&&H.sub(i),i.props=h,i.state||(i.state={}),i.context=M,i.__n=o,f=i.__d=!0,i.__h=[],i._sb=[]),v&&i.__s==null&&(i.__s=i.state),v&&k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=E({},i.__s)),E(i.__s,k.getDerivedStateFromProps(h,i.__s))),d=i.props,b=i.state,i.__v=e,f)v&&k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),v&&i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(v&&k.getDerivedStateFromProps==null&&h!==d&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,M),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,M)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(i.props=h,i.state=i.__s,i.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(U){U&&(U.__=e)}),P=0;P<i._sb.length;P++)i.__h.push(i._sb[P]);i._sb=[],i.__h.length&&c.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,M),v&&i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(d,b,x)})}if(i.context=M,i.props=h,i.__P=t,i.__e=!1,F=m.__r,oe=0,v){for(i.state=i.__s,i.__d=!1,F&&F(e),p=i.render(i.props,i.state,i.context),z=0;z<i._sb.length;z++)i.__h.push(i._sb[z]);i._sb=[]}else do i.__d=!1,F&&F(e),p=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++oe<25);i.state=i.__s,i.getChildContext!=null&&(o=E(E({},o),i.getChildContext())),v&&!f&&i.getSnapshotBeforeUpdate!=null&&(x=i.getSnapshotBeforeUpdate(d,b)),pe(t,J(j=p!=null&&p.type===N&&p.key==null?p.props.children:p)?j:[j],e,n,o,r,_,c,a,u,s),i.base=e.__e,e.__u&=-161,i.__h.length&&c.push(i),C&&(i.__E=i.__=null)}catch(U){if(e.__v=null,u||_!=null){for(e.__u|=u?160:32;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;_[_.indexOf(a)]=null,e.__e=a}else e.__e=n.__e,e.__k=n.__k;m.__e(U,e,n)}else _==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=$e(n.__e,e,n,o,r,_,c,u,s);(p=m.diffed)&&p(e)}function me(t,e,n){e.__d=void 0;for(var o=0;o<n.length;o++)Y(n[o],n[++o],n[++o]);m.__c&&m.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(_){_.call(r)})}catch(_){m.__e(_,r.__v)}})}function $e(t,e,n,o,r,_,c,a,u){var s,p,i,f,d,b,x,C=n.props,h=e.props,v=e.type;if(v==="svg"?r="http://www.w3.org/2000/svg":v==="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),_!=null){for(s=0;s<_.length;s++)if((d=_[s])&&"setAttribute"in d==!!v&&(v?d.localName===v:d.nodeType===3)){t=d,_[s]=null;break}}if(t==null){if(v===null)return document.createTextNode(h);t=document.createElementNS(r,v,h.is&&h),a&&(m.__m&&m.__m(e,_),a=!1),_=null}if(v===null)C===h||a&&t.data===h||(t.data=h);else{if(_=_&&$.call(t.childNodes),C=n.props||D,!a&&_!=null)for(C={},s=0;s<t.attributes.length;s++)C[(d=t.attributes[s]).name]=d.value;for(s in C)if(d=C[s],s!="children"){if(s=="dangerouslySetInnerHTML")i=d;else if(!(s in h)){if(s=="value"&&"defaultValue"in h||s=="checked"&&"defaultChecked"in h)continue;A(t,s,null,d,r)}}for(s in h)d=h[s],s=="children"?f=d:s=="dangerouslySetInnerHTML"?p=d:s=="value"?b=d:s=="checked"?x=d:a&&typeof d!="function"||C[s]===d||A(t,s,d,C[s],r);if(p)a||i&&(p.__html===i.__html||p.__html===t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(i&&(t.innerHTML=""),pe(t,J(f)?f:[f],e,n,o,v==="foreignObject"?"http://www.w3.org/1999/xhtml":r,_,c,_?_[0]:n.__k&&I(n,0),a,u),_!=null)for(s=_.length;s--;)ue(_[s]);a||(s="value",v==="progress"&&b==null?t.removeAttribute("value"):b!==void 0&&(b!==t[s]||v==="progress"&&!b||v==="option"&&b!==C[s])&&A(t,s,b,C[s],r),s="checked",x!==void 0&&x!==t[s]&&A(t,s,x,C[s],r))}return t}function Y(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){m.__e(r,n)}}function he(t,e,n){var o,r;if(m.unmount&&m.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||Y(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(_){m.__e(_,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&he(o[r],e,n||typeof t.type!="function");n||ue(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function We(t,e,n){return this.constructor(t,n)}function ve(t,e,n){var o,r,_,c;m.__&&m.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,_=[],c=[],Q(e,t=(!o&&n||e).__k=l(N,null,[t]),r||D,D,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?$.call(e.childNodes):null,_,!o&&n?n:r?r.__e:e.firstChild,o,c),me(_,t,c)}$=ce.slice,m={__e:function(t,e,n,o){for(var r,_,c;e=e.__;)if((r=e.__c)&&!r.__)try{if((_=r.constructor)&&_.getDerivedStateFromError!=null&&(r.setState(_.getDerivedStateFromError(t)),c=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),c=r.__d),c)return r.__E=r}catch(a){t=a}throw t}},se=0,Ue=function(t){return t!=null&&t.constructor==null},B.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=E({},this.state),typeof t=="function"&&(t=t(E({},n),this.props)),t&&E(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),ie(this))},B.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ie(this))},B.prototype.render=N,w=[],le=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,q=function(t,e){return t.__v.__b-e.__v.__b},O.__r=0,X=0,G=ae(!1),K=ae(!0),Ae=0;var L,g,Z,ge,V=0,Ee=[],y=m,be=y.__b,ye=y.__r,Ce=y.diffed,xe=y.__c,ke=y.unmount,Te=y.__;function te(t,e){y.__h&&y.__h(g,t,V||e),V=0;var n=g.__H||(g.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function S(t){return V=1,Ve(Ne,t)}function Ve(t,e,n){var o=te(L++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Ne(void 0,e),function(a){var u=o.__N?o.__N[0]:o.__[0],s=o.t(u,a);u!==s&&(o.__N=[s,o.__[1]],o.__c.setState({}))}],o.__c=g,!g.u)){var r=function(a,u,s){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!_||_.call(this,a,u,s);var i=!1;return p.forEach(function(f){if(f.__N){var d=f.__[0];f.__=f.__N,f.__N=void 0,d!==f.__[0]&&(i=!0)}}),!(!i&&o.__c.props===a)&&(!_||_.call(this,a,u,s))};g.u=!0;var _=g.shouldComponentUpdate,c=g.componentWillUpdate;g.componentWillUpdate=function(a,u,s){if(this.__e){var p=_;_=void 0,r(a,u,s),_=p}c&&c.call(this,a,u,s)},g.shouldComponentUpdate=r}return o.__N||o.__}function Se(t,e){var n=te(L++,3);!y.__s&&Ie(n.__H,e)&&(n.__=t,n.i=e,g.__H.__h.push(n))}function we(t){return V=5,je(function(){return{current:t}},[])}function je(t,e){var n=te(L++,7);return Ie(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function qe(){for(var t;t=Ee.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(W),t.__H.__h.forEach(ee),t.__H.__h=[]}catch(e){t.__H.__h=[],y.__e(e,t.__v)}}y.__b=function(t){g=null,be&&be(t)},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Te&&Te(t,e)},y.__r=function(t){ye&&ye(t),L=0;var e=(g=t.__c).__H;e&&(Z===g?(e.__h=[],g.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(W),e.__h.forEach(ee),e.__h=[],L=0)),Z=g},y.diffed=function(t){Ce&&Ce(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ee.push(e)!==1&&ge===y.requestAnimationFrame||((ge=y.requestAnimationFrame)||Ge)(qe)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Z=g=null},y.__c=function(t,e){e.some(function(n){try{n.__h.forEach(W),n.__h=n.__h.filter(function(o){return!o.__||ee(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],y.__e(o,n.__v)}}),xe&&xe(t,e)},y.unmount=function(t){ke&&ke(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{W(o)}catch(r){e=r}}),n.__H=void 0,e&&y.__e(e,n.__v))};var Me=typeof requestAnimationFrame=="function";function Ge(t){var e,n=function(){clearTimeout(o),Me&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);Me&&(e=requestAnimationFrame(n))}function W(t){var e=g,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),g=e}function ee(t){var e=g;t.__c=t.__(),g=e}function Ie(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Ne(t,e){return typeof e=="function"?e(t):e}function He(t,e){let n=we(void 0),o=(...r)=>{n.current&&clearTimeout(n.current),n.current=window.setTimeout(()=>{t(...r)},e)};return Se(()=>()=>{n.current&&clearTimeout(n.current)},[]),o}var Ke=new Intl.NumberFormat("en-US"),T=({value:t})=>l(N,null,Ke.format(t));var ne=[{bg:"#c1e7ff",fg:"#000"},{bg:"#abd2ec",fg:"#000"},{bg:"#94bed9",fg:"#000"},{bg:"#7faac6",fg:"#000"},{bg:"#6996b3",fg:"#fff"},{bg:"#5383a1",fg:"#fff"},{bg:"#3d708f",fg:"#fff"},{bg:"#255e7e",fg:"#fff"}],Xe=({scoreBy:t,nodes:e,epoch:n})=>{if(e.length===0)return null;let o=t;if(t.field!=="tokens"){let r=e[0][t.field],_=e[0][t.field];for(let c=1;c<e.length;c++)r=Math.max(r,e[c][t.field]),_=Math.max(_,e[c][t.field]);o={field:t.field,max:r,min:_}}return l("div",{className:"node-children"},e.map((r,_)=>r.type===2?l(Je,{scoreBy:o,key:_,node:r}):l(Le,{scoreBy:o,key:_,node:r,epoch:n})))},Fe=({node:t})=>l("div",{className:"node-stats"},"Used Tokens: ",l(T,{value:t.tokens})," / ","Priority:"," ",t.priority===Number.MAX_SAFE_INTEGER?"MAX":l(T,{value:t.priority})),De=({scoreBy:t,node:e,children:n,...o})=>{let r=0;if(t.max!==t.min){let _=(e[t.field]-t.min)/(t.max-t.min);r=Math.round((ne.length-1)*_)}return l("div",{...o,className:`node ${o.className||""}`,style:{backgroundColor:ne[r].bg,color:ne[r].fg}},n)},Je=({scoreBy:t,node:e})=>l(De,{node:e,scoreBy:t,tabIndex:0,className:"node-text"},l(Fe,{node:e}),l("div",{className:"node-content"},e.value)),Le=({scoreBy:t,node:e,epoch:n})=>{let[o,r]=S(!1),_=EPOCHS.findIndex(i=>i.elements.some(f=>f.id===e.id));if(_===void 0)throw new Error(`epoch not found for ${e.id}`);let c=EPOCHS[_],a=EPOCHS.at(n),u=c.elements.find(i=>i.id===e.id).tokenBudget,s=e.type===1?e.name||e.role.slice(0,1).toUpperCase()+e.role.slice(1)+"Message":e.name,p=_===n?"new-in-epoch":n<_?"before-epoch":"";return l(De,{node:e,scoreBy:t,className:p},l(Fe,{node:e}),l("div",{className:"node-content node-toggler",onClick:()=>r(i=>!i)},l("span",null,a?.inNode===e.id?"\\u{1F3C3} ":"",`<${s}>`),l("span",{className:"indicator"},o?"[+]":"[-]")),n===_&&l("div",{className:"node-stats"},"Token Budget: ",l(T,{value:u})),a?.inNode===e.id&&l("div",{className:"node-stats"},"Rendering flexGrow=",a.flexValue,l("br",null),l("br",null),"Splitting"," ",a.reservedTokens?`${a.tokenBudget} - ${a.reservedTokens} (reserved) = `:"",l(T,{value:a.tokenBudget})," tokens among ",a.elements.length," ","elements"),!o&&l(Xe,{nodes:e.children,scoreBy:t,epoch:n}))},Pe=({scoreBy:t,node:e,epoch:n})=>{let o;return t==="tokens"?o={field:"tokens",max:e.tokens,min:0}:o={field:"priority",max:e.priority,min:e.priority},l(Le,{scoreBy:o,node:e,epoch:n})};var ze=({label:t,value:e,onChange:n,min:o,max:r})=>{let _=a=>{n(a.target.valueAsNumber)},c=`number-slider-${Math.random()}`;return l("div",{className:"controls-slider"},l("label",{htmlFor:c},t),l("input",{id:c,type:"range",min:o,max:r,value:e,onInput:_}),l("input",{type:"number",min:o,value:e,onInput:_,onChange:_}))},Qe=({scoreBy:t,onScoreByChange:e})=>{let n=o=>{let r=o.target.value;e(r)};return l("div",{className:"controls-scoreby"},"Visualize by",l("label",null,l("input",{type:"radio",name:"scoreBy",value:"tokens",checked:t==="tokens",onChange:n}),"Tokens"),l("label",null,l("input",{type:"radio",name:"scoreBy",value:"priority",checked:t==="priority",onChange:n}),"Priority"))},Ye=()=>{let[t,e]=S(DEFAULT_TOKENS),[n,o]=S(EPOCHS.length),[r,_]=S(DEFAULT_MODEL),[c,a]=S("tokens"),[u,s]=S("epoch"),p=He(async f=>{if(f===DEFAULT_TOKENS)return DEFAULT_MODEL;let b=await(await fetch(`${SERVER_ADDRESS}regen?n=${f}`)).json();_(b)},100),i=f=>{e(f),p(f),o(EPOCHS.length)};return l("div",{className:"app"},l("div",{className:"controls"},l("div",{className:"tabs"},l("div",{className:`tab ${u==="epoch"?"active":""}`,onClick:()=>s("epoch")},"View Order"),l("div",{className:`tab ${u==="tokens"?"active":""}`,onClick:()=>s("tokens")},"Change Token Budget")),l("div",{className:`tab-content ${u==="epoch"?"active":""}`},l(ze,{label:"Render Epoch",value:n,onChange:o,min:0,max:EPOCHS.length})),l("div",{className:`tab-content ${u==="tokens"?"active":""}`},l(ze,{label:"Token Budget",value:t,onChange:i,min:0,max:DEFAULT_TOKENS*2}))),l("div",{className:"control-description"},u==="tokens"?l("p",null,"Token changes here will prune elements and re-render Expandable ones, but the entire prompt is not being re-rendered"):l("p",null,"Changing the render epoch lets you see the order in which elements are rendered and how the token budget is allocated."),l("div",{className:"controls-stats"},l("span",null,"Used ",l(T,{value:r.container.tokens}),"/",l(T,{value:r.budget})," tokens"),l("span",null,"Removed ",l(T,{value:r.removed})," nodes"),l(Qe,{scoreBy:c,onScoreByChange:a}))),l(Pe,{node:r.container,scoreBy:c,epoch:n}))};ve(l(Ye,null),document.body);})();\n';Q9.tracerCss=`body{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,system-ui,Ubuntu,Droid Sans,sans-serif;background:#fff;margin:0}.render-pass{border-left:2px solid #ccc;&:hover{border-left-color:#000}}.literals li{white-space:pre;font-family:SF Mono,Monaco,Menlo,Consolas,Ubuntu Mono,Liberation Mono,DejaVu Sans Mono,Courier New,monospace}.render-flex,.render-element{padding-left:10px}.node{border:1px solid rgba(255,255,255,.5);margin:3px 10px;padding:3px 10px;border-radius:4px;width:fit-content;&.new-in-epoch{box-shadow:0 0 3px 2px red}&.before-epoch{pointer-events:none;filter:grayscale(1);color:#777!important;.node{color:#777!important}}&:last-child{margin-bottom:0}}.node-content{font-weight:700}.node-children{margin-left:20px;border-left:2px dashed rgba(255,255,255,.5);padding-left:10px}.node-toggler{cursor:pointer;display:flex;align-items:center;justify-content:space-between;.indicator{font-size:.7em}}.node-text{width:400px;&:focus,&:focus-within{outline:1px solid orange;.node-content{white-space:normal}}.node-content{font-weight:400;font-size:.8em;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}.node-stats{font-family:SF Mono,Monaco,Menlo,Consolas,Ubuntu Mono,Liberation Mono,DejaVu Sans Mono,Courier New,monospace;font-size:.8em}.control-description{padding:10px;p{font-size:.9em;max-width:500px;margin-top:0}}.controls{display:flex;flex-direction:column;gap:10px;position:sticky;top:0;padding:10px;background:#fff;border-bottom:1px solid #ccc;z-index:1}.controls-slider{display:flex;align-items:center;gap:10px}.controls-stats{display:flex;gap:20px;list-style:none;padding:0;margin-top:0}.controls-scoreby{display:flex;gap:10px}.tabs{display:flex;border-bottom:1px solid #ccc;margin-bottom:10px}.tab{padding:10px;cursor:pointer;border:1px solid transparent;border-bottom:none}.tab.active{border-color:#ccc;border-bottom:1px solid #fff;background-color:#f9f9f9}.tab-content{display:none}.tab-content.active{display:block}
`});var LFe=H(XG=>{"use strict";d();Object.defineProperty(XG,"__esModule",{value:!0});XG.HTMLTracer=void 0;var BFe=kFe(),Fb=cce(),e7t=WC(),Gce=class{static{s(this,"HTMLTracer")}traceData;epochs=[];addRenderEpoch(t){this.epochs.push(t)}includeInEpoch(t){this.epochs[this.epochs.length-1].elements.push(t)}didMaterializeTree(t){this.traceData=t}async serveHTML(){return Hce.create({epochs:this.epochs,traceData:PFe(this.traceData)})}serveRouter(t){return new JG({baseAddress:t,epochs:this.epochs,traceData:PFe(this.traceData)})}};XG.HTMLTracer=Gce;var JG=class{static{s(this,"RequestRouter")}opts;serverToken=crypto.randomUUID();constructor(t){this.opts=t}route(t,r){let n=t,i=r,o=new URL(n.url||"/","http://localhost"),a=`/${this.serverToken}`;switch(o.pathname){case a:case`${a}/`:this.onRoot(o,n,i);break;case`${a}/regen`:this.onRegen(o,n,i);break;default:return!1}return!0}get address(){return this.opts.baseAddress+"/"+this.serverToken}async getHTML(){let{traceData:t,epochs:r}=this.opts;return`<body>
<style>${BFe.tracerCss}</style>
<script>
const DEFAULT_TOKENS = ${JSON.stringify(t.budget)};
const EPOCHS = ${JSON.stringify(r)};
const DEFAULT_MODEL = ${JSON.stringify(await DFe(t.tokenizer,t.renderedTree))};
const SERVER_ADDRESS = ${JSON.stringify(this.opts.baseAddress+"/"+this.serverToken+"/")};
${BFe.tracerSrc}
</script>
</body>`}async onRegen(t,r,n){let{traceData:i}=this.opts,o=Number(t.searchParams.get("n")||i.budget),a=await i.renderTree(o),l=await DFe(i.tokenizer,a),c=JSON.stringify(l);n.setHeader("Content-Type","application/json"),n.setHeader("Content-Length",Buffer.byteLength(c)),n.end(c)}onRoot(t,r,n){this.getHTML().then(i=>{n.setHeader("Content-Type","text/html"),n.setHeader("Content-Length",Buffer.byteLength(i)),n.end(i)})}},Hce=class e extends JG{static{s(this,"RequestServer")}server;static async create(t){let{createServer:r}=await Promise.resolve().then(()=>require("http")),n=r((a,l)=>{try{o.route(a,l)||(l.statusCode=404,l.end("Not Found"))}catch(c){l.statusCode=500,l.end(String(c))}}),i=await new Promise((a,l)=>{n.listen(0,"127.0.0.1",()=>a(n.address().port)).on("error",l)}),o=new e({...t,baseAddress:`http://127.0.0.1:${i}`},n);return o}constructor(t,r){super(t),this.server=r}dispose(){this.server.closeAllConnections(),this.server.close()}};async function DFe(e,t){return{container:await NFe(e,t.container,!1),removed:t.removed,budget:t.budget}}s(DFe,"serializeRenderData");async function NFe(e,t,r){let n={metadata:t.metadata.map(r7t),priority:t.priority};if(t instanceof Fb.MaterializedChatMessageTextChunk)return{...n,type:2,value:t.text,tokens:await t.upperBoundTokenCount(e)};if(t instanceof Fb.MaterializedChatMessageImage)return{...n,name:t.id.toString(),id:t.id,type:3,value:t.src,tokens:await t.upperBoundTokenCount(e)};if(t instanceof Fb.MaterializedChatMessageOpaque||t instanceof Fb.MaterializedChatMessageBreakpoint)return;{let i={...n,id:t.id,name:t.name,children:(await Promise.all(t.children.map(o=>NFe(e,o,r||t instanceof Fb.MaterializedChatMessage)))).filter(o=>!!o),tokens:r?await t.upperBoundTokenCount(e):await t.tokenCount(e)};if(t instanceof Fb.GenericMaterializedContainer)return{...i,type:0};if(t instanceof Fb.MaterializedChatMessage){let o=t.text.filter(a=>typeof a=="string").join("").trim();return{...i,type:1,role:e7t.Raw.ChatRole.display(t.role),text:o}}}t7t(t)}s(NFe,"serializeMaterialized");function t7t(e){throw new Error("unreachable")}s(t7t,"assertNever");function r7t(e){return{name:e.constructor.name,value:JSON.stringify(e)}}s(r7t,"serializeMetadata");var PFe=s(e=>{if(e===void 0)throw new Error("Prompt must be rendered before calling HTMLTRacer.serveHTML");return e},"mustGet")});var MFe=H(FFe=>{"use strict";d();Object.defineProperty(FFe,"__esModule",{value:!0})});var OFe=H(QFe=>{"use strict";d();Object.defineProperty(QFe,"__esModule",{value:!0})});var qFe=H(UFe=>{"use strict";d();Object.defineProperty(UFe,"__esModule",{value:!0})});var Gh=H(Ts=>{"use strict";d();var n7t=Ts&&Ts.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Mb=Ts&&Ts.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&n7t(t,e,r)};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.contentType=Ts.PromptRenderer=Ts.MetadataMap=Ts.PromptElement=Ts.JSONTree=void 0;Ts.renderPrompt=s7t;Ts.renderElementJSON=a7t;var jce=WC(),WFe=Uce(),i7t=RFe();Mb(LFe(),Ts);Ts.JSONTree=ice();Mb(WC(),Ts);Mb(vce(),Ts);Mb(Bce(),Ts);Mb(MFe(),Ts);Mb(OFe(),Ts);Mb(qFe(),Ts);var o7t=fce();Object.defineProperty(Ts,"PromptElement",{enumerable:!0,get:s(function(){return o7t.PromptElement},"get")});var GFe=Uce();Object.defineProperty(Ts,"MetadataMap",{enumerable:!0,get:s(function(){return GFe.MetadataMap},"get")});Object.defineProperty(Ts,"PromptRenderer",{enumerable:!0,get:s(function(){return GFe.PromptRenderer},"get")});async function s7t(e,t,r,n,i,o,a=jce.OutputMode.VSCode){let l="countTokens"in n?new i7t.VSCodeTokenizer((m,h)=>n.countTokens(m,h),a):n,c=new WFe.PromptRenderer(r,e,t,l),u=await c.render(i,o),f=c.getUsedContext();return{...u,usedContext:f}}s(s7t,"renderPrompt");Ts.contentType="application/vnd.codechat.prompt+json.1";function a7t(e,t,r,n){return new WFe.PromptRenderer({modelMaxPromptTokens:r?.tokenBudget??Number.MAX_SAFE_INTEGER},e,t,{mode:jce.OutputMode.Raw,countMessageTokens(o){throw new Error("Tools may only return text, not messages.")},tokenLength(o,a){return o.type===jce.Raw.ChatCompletionContentPartKind.Text?Promise.resolve(r?.countTokens(o.text,a)??Promise.resolve(1)):Promise.resolve(1)}}).renderElementJSON(n)}s(a7t,"renderElementJSON")});var dB=H((y5n,qQe)=>{d();var pSt="2.0.0",gSt=Number.MAX_SAFE_INTEGER||9007199254740991,ASt=16,ySt=250,CSt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];qQe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ASt,MAX_SAFE_BUILD_LENGTH:ySt,MAX_SAFE_INTEGER:gSt,RELEASE_TYPES:CSt,SEMVER_SPEC_VERSION:pSt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var mB=H((x5n,WQe)=>{d();var xSt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};WQe.exports=xSt});var dT=H((a1,GQe)=>{d();var{MAX_SAFE_COMPONENT_LENGTH:due,MAX_SAFE_BUILD_LENGTH:vSt,MAX_LENGTH:bSt}=dB(),ESt=mB();a1=GQe.exports={};var ISt=a1.re=[],TSt=a1.safeRe=[],Nr=a1.src=[],wSt=a1.safeSrc=[],Lr=a1.t={},_St=0,mue="[a-zA-Z0-9-]",SSt=[["\\s",1],["\\d",bSt],[mue,vSt]],RSt=s(e=>{for(let[t,r]of SSt)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},"makeSafeRegex"),Zn=s((e,t,r)=>{let n=RSt(t),i=_St++;ESt(e,i,t),Lr[e]=i,Nr[i]=t,wSt[i]=n,ISt[i]=new RegExp(t,r?"g":void 0),TSt[i]=new RegExp(n,r?"g":void 0)},"createToken");Zn("NUMERICIDENTIFIER","0|[1-9]\\d*");Zn("NUMERICIDENTIFIERLOOSE","\\d+");Zn("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${mue}*`);Zn("MAINVERSION",`(${Nr[Lr.NUMERICIDENTIFIER]})\\.(${Nr[Lr.NUMERICIDENTIFIER]})\\.(${Nr[Lr.NUMERICIDENTIFIER]})`);Zn("MAINVERSIONLOOSE",`(${Nr[Lr.NUMERICIDENTIFIERLOOSE]})\\.(${Nr[Lr.NUMERICIDENTIFIERLOOSE]})\\.(${Nr[Lr.NUMERICIDENTIFIERLOOSE]})`);Zn("PRERELEASEIDENTIFIER",`(?:${Nr[Lr.NUMERICIDENTIFIER]}|${Nr[Lr.NONNUMERICIDENTIFIER]})`);Zn("PRERELEASEIDENTIFIERLOOSE",`(?:${Nr[Lr.NUMERICIDENTIFIERLOOSE]}|${Nr[Lr.NONNUMERICIDENTIFIER]})`);Zn("PRERELEASE",`(?:-(${Nr[Lr.PRERELEASEIDENTIFIER]}(?:\\.${Nr[Lr.PRERELEASEIDENTIFIER]})*))`);Zn("PRERELEASELOOSE",`(?:-?(${Nr[Lr.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Nr[Lr.PRERELEASEIDENTIFIERLOOSE]})*))`);Zn("BUILDIDENTIFIER",`${mue}+`);Zn("BUILD",`(?:\\+(${Nr[Lr.BUILDIDENTIFIER]}(?:\\.${Nr[Lr.BUILDIDENTIFIER]})*))`);Zn("FULLPLAIN",`v?${Nr[Lr.MAINVERSION]}${Nr[Lr.PRERELEASE]}?${Nr[Lr.BUILD]}?`);Zn("FULL",`^${Nr[Lr.FULLPLAIN]}$`);Zn("LOOSEPLAIN",`[v=\\s]*${Nr[Lr.MAINVERSIONLOOSE]}${Nr[Lr.PRERELEASELOOSE]}?${Nr[Lr.BUILD]}?`);Zn("LOOSE",`^${Nr[Lr.LOOSEPLAIN]}$`);Zn("GTLT","((?:<|>)?=?)");Zn("XRANGEIDENTIFIERLOOSE",`${Nr[Lr.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Zn("XRANGEIDENTIFIER",`${Nr[Lr.NUMERICIDENTIFIER]}|x|X|\\*`);Zn("XRANGEPLAIN",`[v=\\s]*(${Nr[Lr.XRANGEIDENTIFIER]})(?:\\.(${Nr[Lr.XRANGEIDENTIFIER]})(?:\\.(${Nr[Lr.XRANGEIDENTIFIER]})(?:${Nr[Lr.PRERELEASE]})?${Nr[Lr.BUILD]}?)?)?`);Zn("XRANGEPLAINLOOSE",`[v=\\s]*(${Nr[Lr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Nr[Lr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Nr[Lr.XRANGEIDENTIFIERLOOSE]})(?:${Nr[Lr.PRERELEASELOOSE]})?${Nr[Lr.BUILD]}?)?)?`);Zn("XRANGE",`^${Nr[Lr.GTLT]}\\s*${Nr[Lr.XRANGEPLAIN]}$`);Zn("XRANGELOOSE",`^${Nr[Lr.GTLT]}\\s*${Nr[Lr.XRANGEPLAINLOOSE]}$`);Zn("COERCEPLAIN",`(^|[^\\d])(\\d{1,${due}})(?:\\.(\\d{1,${due}}))?(?:\\.(\\d{1,${due}}))?`);Zn("COERCE",`${Nr[Lr.COERCEPLAIN]}(?:$|[^\\d])`);Zn("COERCEFULL",Nr[Lr.COERCEPLAIN]+`(?:${Nr[Lr.PRERELEASE]})?(?:${Nr[Lr.BUILD]})?(?:$|[^\\d])`);Zn("COERCERTL",Nr[Lr.COERCE],!0);Zn("COERCERTLFULL",Nr[Lr.COERCEFULL],!0);Zn("LONETILDE","(?:~>?)");Zn("TILDETRIM",`(\\s*)${Nr[Lr.LONETILDE]}\\s+`,!0);a1.tildeTrimReplace="$1~";Zn("TILDE",`^${Nr[Lr.LONETILDE]}${Nr[Lr.XRANGEPLAIN]}$`);Zn("TILDELOOSE",`^${Nr[Lr.LONETILDE]}${Nr[Lr.XRANGEPLAINLOOSE]}$`);Zn("LONECARET","(?:\\^)");Zn("CARETTRIM",`(\\s*)${Nr[Lr.LONECARET]}\\s+`,!0);a1.caretTrimReplace="$1^";Zn("CARET",`^${Nr[Lr.LONECARET]}${Nr[Lr.XRANGEPLAIN]}$`);Zn("CARETLOOSE",`^${Nr[Lr.LONECARET]}${Nr[Lr.XRANGEPLAINLOOSE]}$`);Zn("COMPARATORLOOSE",`^${Nr[Lr.GTLT]}\\s*(${Nr[Lr.LOOSEPLAIN]})$|^$`);Zn("COMPARATOR",`^${Nr[Lr.GTLT]}\\s*(${Nr[Lr.FULLPLAIN]})$|^$`);Zn("COMPARATORTRIM",`(\\s*)${Nr[Lr.GTLT]}\\s*(${Nr[Lr.LOOSEPLAIN]}|${Nr[Lr.XRANGEPLAIN]})`,!0);a1.comparatorTrimReplace="$1$2$3";Zn("HYPHENRANGE",`^\\s*(${Nr[Lr.XRANGEPLAIN]})\\s+-\\s+(${Nr[Lr.XRANGEPLAIN]})\\s*$`);Zn("HYPHENRANGELOOSE",`^\\s*(${Nr[Lr.XRANGEPLAINLOOSE]})\\s+-\\s+(${Nr[Lr.XRANGEPLAINLOOSE]})\\s*$`);Zn("STAR","(<|>)?=?\\s*\\*");Zn("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Zn("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Tj=H((I5n,HQe)=>{d();var kSt=Object.freeze({loose:!0}),BSt=Object.freeze({}),DSt=s(e=>e?typeof e!="object"?kSt:e:BSt,"parseOptions");HQe.exports=DSt});var hue=H((_5n,$Qe)=>{d();var jQe=/^[0-9]+$/,VQe=s((e,t)=>{let r=jQe.test(e),n=jQe.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},"compareIdentifiers"),PSt=s((e,t)=>VQe(t,e),"rcompareIdentifiers");$Qe.exports={compareIdentifiers:VQe,rcompareIdentifiers:PSt}});var e0=H((k5n,JQe)=>{d();var wj=mB(),{MAX_LENGTH:zQe,MAX_SAFE_INTEGER:_j}=dB(),{safeRe:YQe,safeSrc:KQe,t:Sj}=dT(),NSt=Tj(),{compareIdentifiers:mT}=hue(),pue=class e{static{s(this,"SemVer")}constructor(t,r){if(r=NSt(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>zQe)throw new TypeError(`version is longer than ${zQe} characters`);wj("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?YQe[Sj.LOOSE]:YQe[Sj.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>_j||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_j||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_j||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<_j)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(wj("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),mT(this.major,t.major)||mT(this.minor,t.minor)||mT(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=t.prerelease[r];if(wj("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return mT(n,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],i=t.build[r];if(wj("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return mT(n,i)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=new RegExp(`^${this.options.loose?KQe[Sj.PRERELEASELOOSE]:KQe[Sj.PRERELEASE]}$`),o=`-${r}`.match(i);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),mT(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};JQe.exports=pue});var iE=H((P5n,ZQe)=>{d();var XQe=e0(),LSt=s((e,t,r=!1)=>{if(e instanceof XQe)return e;try{return new XQe(e,t)}catch(n){if(!r)return null;throw n}},"parse");ZQe.exports=LSt});var tOe=H((F5n,eOe)=>{d();var FSt=iE(),MSt=s((e,t)=>{let r=FSt(e,t);return r?r.version:null},"valid");eOe.exports=MSt});var nOe=H((O5n,rOe)=>{d();var QSt=iE(),OSt=s((e,t)=>{let r=QSt(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},"clean");rOe.exports=OSt});var sOe=H((W5n,oOe)=>{d();var iOe=e0(),USt=s((e,t,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new iOe(e instanceof iOe?e.version:e,r).inc(t,n,i).version}catch{return null}},"inc");oOe.exports=USt});var cOe=H((j5n,lOe)=>{d();var aOe=iE(),qSt=s((e,t)=>{let r=aOe(e,null,!0),n=aOe(t,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,a=o?r:n,l=o?n:r,c=!!a.prerelease.length;if(!!l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(l.compareMain(a)===0)return l.minor&&!l.patch?"minor":"patch"}let f=c?"pre":"";return r.major!==n.major?f+"major":r.minor!==n.minor?f+"minor":r.patch!==n.patch?f+"patch":"prerelease"},"diff");lOe.exports=qSt});var fOe=H((z5n,uOe)=>{d();var WSt=e0(),GSt=s((e,t)=>new WSt(e,t).major,"major");uOe.exports=GSt});var mOe=H((J5n,dOe)=>{d();var HSt=e0(),jSt=s((e,t)=>new HSt(e,t).minor,"minor");dOe.exports=jSt});var pOe=H((eCn,hOe)=>{d();var VSt=e0(),$St=s((e,t)=>new VSt(e,t).patch,"patch");hOe.exports=$St});var AOe=H((nCn,gOe)=>{d();var zSt=iE(),YSt=s((e,t)=>{let r=zSt(e,t);return r&&r.prerelease.length?r.prerelease:null},"prerelease");gOe.exports=YSt});var pm=H((sCn,COe)=>{d();var yOe=e0(),KSt=s((e,t,r)=>new yOe(e,r).compare(new yOe(t,r)),"compare");COe.exports=KSt});var vOe=H((cCn,xOe)=>{d();var JSt=pm(),XSt=s((e,t,r)=>JSt(t,e,r),"rcompare");xOe.exports=XSt});var EOe=H((dCn,bOe)=>{d();var ZSt=pm(),eRt=s((e,t)=>ZSt(e,t,!0),"compareLoose");bOe.exports=eRt});var Rj=H((pCn,TOe)=>{d();var IOe=e0(),tRt=s((e,t,r)=>{let n=new IOe(e,r),i=new IOe(t,r);return n.compare(i)||n.compareBuild(i)},"compareBuild");TOe.exports=tRt});var _Oe=H((yCn,wOe)=>{d();var rRt=Rj(),nRt=s((e,t)=>e.sort((r,n)=>rRt(r,n,t)),"sort");wOe.exports=nRt});var ROe=H((vCn,SOe)=>{d();var iRt=Rj(),oRt=s((e,t)=>e.sort((r,n)=>iRt(n,r,t)),"rsort");SOe.exports=oRt});var hB=H((ICn,kOe)=>{d();var sRt=pm(),aRt=s((e,t,r)=>sRt(e,t,r)>0,"gt");kOe.exports=aRt});var kj=H((_Cn,BOe)=>{d();var lRt=pm(),cRt=s((e,t,r)=>lRt(e,t,r)<0,"lt");BOe.exports=cRt});var gue=H((kCn,DOe)=>{d();var uRt=pm(),fRt=s((e,t,r)=>uRt(e,t,r)===0,"eq");DOe.exports=fRt});var Aue=H((PCn,POe)=>{d();var dRt=pm(),mRt=s((e,t,r)=>dRt(e,t,r)!==0,"neq");POe.exports=mRt});var Bj=H((FCn,NOe)=>{d();var hRt=pm(),pRt=s((e,t,r)=>hRt(e,t,r)>=0,"gte");NOe.exports=pRt});var Dj=H((OCn,LOe)=>{d();var gRt=pm(),ARt=s((e,t,r)=>gRt(e,t,r)<=0,"lte");LOe.exports=ARt});var yue=H((WCn,FOe)=>{d();var yRt=gue(),CRt=Aue(),xRt=hB(),vRt=Bj(),bRt=kj(),ERt=Dj(),IRt=s((e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return yRt(e,r,n);case"!=":return CRt(e,r,n);case">":return xRt(e,r,n);case">=":return vRt(e,r,n);case"<":return bRt(e,r,n);case"<=":return ERt(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}},"cmp");FOe.exports=IRt});var QOe=H((jCn,MOe)=>{d();var TRt=e0(),wRt=iE(),{safeRe:Pj,t:Nj}=dT(),_Rt=s((e,t)=>{if(e instanceof TRt)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Pj[Nj.COERCEFULL]:Pj[Nj.COERCE]);else{let c=t.includePrerelease?Pj[Nj.COERCERTLFULL]:Pj[Nj.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",a=t.includePrerelease&&r[5]?`-${r[5]}`:"",l=t.includePrerelease&&r[6]?`+${r[6]}`:"";return wRt(`${n}.${i}.${o}${a}${l}`,t)},"coerce");MOe.exports=_Rt});var UOe=H((zCn,OOe)=>{d();var Cue=class{static{s(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(t,r)}return this}};OOe.exports=Cue});var gm=H((JCn,HOe)=>{d();var SRt=/\s+/g,xue=class e{static{s(this,"Range")}constructor(t,r){if(r=kRt(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof vue)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(SRt," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!WOe(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&MRt(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&LRt)|(this.options.loose&&FRt))+":"+t,i=qOe.get(n);if(i)return i;let o=this.options.loose,a=o?Bu[P0.HYPHENRANGELOOSE]:Bu[P0.HYPHENRANGE];t=t.replace(a,$Rt(this.options.includePrerelease)),ws("hyphen replace",t),t=t.replace(Bu[P0.COMPARATORTRIM],DRt),ws("comparator trim",t),t=t.replace(Bu[P0.TILDETRIM],PRt),ws("tilde trim",t),t=t.replace(Bu[P0.CARETTRIM],NRt),ws("caret trim",t);let l=t.split(" ").map(m=>QRt(m,this.options)).join(" ").split(/\s+/).map(m=>VRt(m,this.options));o&&(l=l.filter(m=>(ws("loose invalid filter",m,this.options),!!m.match(Bu[P0.COMPARATORLOOSE])))),ws("range list",l);let c=new Map,u=l.map(m=>new vue(m,this.options));for(let m of u){if(WOe(m))return[m];c.set(m.value,m)}c.size>1&&c.has("")&&c.delete("");let f=[...c.values()];return qOe.set(n,f),f}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>GOe(n,r)&&t.set.some(i=>GOe(i,r)&&n.every(o=>i.every(a=>o.intersects(a,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new BRt(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(zRt(this.set[r],t,this.options))return!0;return!1}};HOe.exports=xue;var RRt=UOe(),qOe=new RRt,kRt=Tj(),vue=pB(),ws=mB(),BRt=e0(),{safeRe:Bu,t:P0,comparatorTrimReplace:DRt,tildeTrimReplace:PRt,caretTrimReplace:NRt}=dT(),{FLAG_INCLUDE_PRERELEASE:LRt,FLAG_LOOSE:FRt}=dB(),WOe=s(e=>e.value==="<0.0.0-0","isNullSet"),MRt=s(e=>e.value==="","isAny"),GOe=s((e,t)=>{let r=!0,n=e.slice(),i=n.pop();for(;r&&n.length;)r=n.every(o=>i.intersects(o,t)),i=n.pop();return r},"isSatisfiable"),QRt=s((e,t)=>(ws("comp",e,t),e=qRt(e,t),ws("caret",e),e=ORt(e,t),ws("tildes",e),e=GRt(e,t),ws("xrange",e),e=jRt(e,t),ws("stars",e),e),"parseComparator"),N0=s(e=>!e||e.toLowerCase()==="x"||e==="*","isX"),ORt=s((e,t)=>e.trim().split(/\s+/).map(r=>URt(r,t)).join(" "),"replaceTildes"),URt=s((e,t)=>{let r=t.loose?Bu[P0.TILDELOOSE]:Bu[P0.TILDE];return e.replace(r,(n,i,o,a,l)=>{ws("tilde",e,n,i,o,a,l);let c;return N0(i)?c="":N0(o)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:N0(a)?c=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:l?(ws("replaceTilde pr",l),c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`):c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`,ws("tilde return",c),c})},"replaceTilde"),qRt=s((e,t)=>e.trim().split(/\s+/).map(r=>WRt(r,t)).join(" "),"replaceCarets"),WRt=s((e,t)=>{ws("caret",e,t);let r=t.loose?Bu[P0.CARETLOOSE]:Bu[P0.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,a,l,c)=>{ws("caret",e,i,o,a,l,c);let u;return N0(o)?u="":N0(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:N0(l)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:c?(ws("replaceCaret pr",c),o==="0"?a==="0"?u=`>=${o}.${a}.${l}-${c} <${o}.${a}.${+l+1}-0`:u=`>=${o}.${a}.${l}-${c} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${l}-${c} <${+o+1}.0.0-0`):(ws("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${l}${n} <${o}.${a}.${+l+1}-0`:u=`>=${o}.${a}.${l}${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${l} <${+o+1}.0.0-0`),ws("caret return",u),u})},"replaceCaret"),GRt=s((e,t)=>(ws("replaceXRanges",e,t),e.split(/\s+/).map(r=>HRt(r,t)).join(" ")),"replaceXRanges"),HRt=s((e,t)=>{e=e.trim();let r=t.loose?Bu[P0.XRANGELOOSE]:Bu[P0.XRANGE];return e.replace(r,(n,i,o,a,l,c)=>{ws("xRange",e,n,i,o,a,l,c);let u=N0(o),f=u||N0(a),m=f||N0(l),h=m;return i==="="&&h&&(i=""),c=t.includePrerelease?"-0":"",u?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&h?(f&&(a=0),l=0,i===">"?(i=">=",f?(o=+o+1,a=0,l=0):(a=+a+1,l=0)):i==="<="&&(i="<",f?o=+o+1:a=+a+1),i==="<"&&(c="-0"),n=`${i+o}.${a}.${l}${c}`):f?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:m&&(n=`>=${o}.${a}.0${c} <${o}.${+a+1}.0-0`),ws("xRange return",n),n})},"replaceXRange"),jRt=s((e,t)=>(ws("replaceStars",e,t),e.trim().replace(Bu[P0.STAR],"")),"replaceStars"),VRt=s((e,t)=>(ws("replaceGTE0",e,t),e.trim().replace(Bu[t.includePrerelease?P0.GTE0PRE:P0.GTE0],"")),"replaceGTE0"),$Rt=s(e=>(t,r,n,i,o,a,l,c,u,f,m,h)=>(N0(n)?r="":N0(i)?r=`>=${n}.0.0${e?"-0":""}`:N0(o)?r=`>=${n}.${i}.0${e?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,N0(u)?c="":N0(f)?c=`<${+u+1}.0.0-0`:N0(m)?c=`<${u}.${+f+1}.0-0`:h?c=`<=${u}.${f}.${m}-${h}`:e?c=`<${u}.${f}.${+m+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),"hyphenReplace"),zRt=s((e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(ws(e[n].semver),e[n].semver!==vue.ANY&&e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},"testSet")});var pB=H((e3n,KOe)=>{d();var gB=Symbol("SemVer ANY"),Iue=class e{static{s(this,"Comparator")}static get ANY(){return gB}constructor(t,r){if(r=jOe(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Eue("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===gB?this.value="":this.value=this.operator+this.semver.version,Eue("comp",this)}parse(t){let r=this.options.loose?VOe[$Oe.COMPARATORLOOSE]:VOe[$Oe.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new zOe(n[2],this.options.loose):this.semver=gB}toString(){return this.value}test(t){if(Eue("Comparator.test",t,this.options.loose),this.semver===gB||t===gB)return!0;if(typeof t=="string")try{t=new zOe(t,this.options)}catch{return!1}return bue(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new YOe(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new YOe(this.value,r).test(t.semver):(r=jOe(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||bue(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||bue(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};KOe.exports=Iue;var jOe=Tj(),{safeRe:VOe,t:$Oe}=dT(),bue=yue(),Eue=mB(),zOe=e0(),YOe=gm()});var AB=H((n3n,JOe)=>{d();var YRt=gm(),KRt=s((e,t,r)=>{try{t=new YRt(t,r)}catch{return!1}return t.test(e)},"satisfies");JOe.exports=KRt});var ZOe=H((s3n,XOe)=>{d();var JRt=gm(),XRt=s((e,t)=>new JRt(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");XOe.exports=XRt});var tUe=H((c3n,eUe)=>{d();var ZRt=e0(),ekt=gm(),tkt=s((e,t,r)=>{let n=null,i=null,o=null;try{o=new ekt(t,r)}catch{return null}return e.forEach(a=>{o.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new ZRt(n,r))}),n},"maxSatisfying");eUe.exports=tkt});var nUe=H((d3n,rUe)=>{d();var rkt=e0(),nkt=gm(),ikt=s((e,t,r)=>{let n=null,i=null,o=null;try{o=new nkt(t,r)}catch{return null}return e.forEach(a=>{o.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new rkt(n,r))}),n},"minSatisfying");rUe.exports=ikt});var sUe=H((p3n,oUe)=>{d();var Tue=e0(),okt=gm(),iUe=hB(),skt=s((e,t)=>{e=new okt(e,t);let r=new Tue("0.0.0");if(e.test(r)||(r=new Tue("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],o=null;i.forEach(a=>{let l=new Tue(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!o||iUe(l,o))&&(o=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||iUe(r,o))&&(r=o)}return r&&e.test(r)?r:null},"minVersion");oUe.exports=skt});var lUe=H((y3n,aUe)=>{d();var akt=gm(),lkt=s((e,t)=>{try{return new akt(e,t).range||"*"}catch{return null}},"validRange");aUe.exports=lkt});var Lj=H((v3n,dUe)=>{d();var ckt=e0(),fUe=pB(),{ANY:ukt}=fUe,fkt=gm(),dkt=AB(),cUe=hB(),uUe=kj(),mkt=Dj(),hkt=Bj(),pkt=s((e,t,r,n)=>{e=new ckt(e,n),t=new fkt(t,n);let i,o,a,l,c;switch(r){case">":i=cUe,o=mkt,a=uUe,l=">",c=">=";break;case"<":i=uUe,o=hkt,a=cUe,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(dkt(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let f=t.set[u],m=null,h=null;if(f.forEach(p=>{p.semver===ukt&&(p=new fUe(">=0.0.0")),m=m||p,h=h||p,i(p.semver,m.semver,n)?m=p:a(p.semver,h.semver,n)&&(h=p)}),m.operator===l||m.operator===c||(!h.operator||h.operator===l)&&o(e,h.semver))return!1;if(h.operator===c&&a(e,h.semver))return!1}return!0},"outside");dUe.exports=pkt});var hUe=H((I3n,mUe)=>{d();var gkt=Lj(),Akt=s((e,t,r)=>gkt(e,t,">",r),"gtr");mUe.exports=Akt});var gUe=H((_3n,pUe)=>{d();var ykt=Lj(),Ckt=s((e,t,r)=>ykt(e,t,"<",r),"ltr");pUe.exports=Ckt});var CUe=H((k3n,yUe)=>{d();var AUe=gm(),xkt=s((e,t,r)=>(e=new AUe(e,r),t=new AUe(t,r),e.intersects(t,r)),"intersects");yUe.exports=xkt});var vUe=H((P3n,xUe)=>{d();var vkt=AB(),bkt=pm();xUe.exports=(e,t,r)=>{let n=[],i=null,o=null,a=e.sort((f,m)=>bkt(f,m,r));for(let f of a)vkt(f,t,r)?(o=f,i||(i=f)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let l=[];for(let[f,m]of n)f===m?l.push(f):!m&&f===a[0]?l.push("*"):m?f===a[0]?l.push(`<=${m}`):l.push(`${f} - ${m}`):l.push(`>=${f}`);let c=l.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var _Ue=H((L3n,wUe)=>{d();var bUe=gm(),_ue=pB(),{ANY:wue}=_ue,yB=AB(),Sue=pm(),Ekt=s((e,t,r={})=>{if(e===t)return!0;e=new bUe(e,r),t=new bUe(t,r);let n=!1;e:for(let i of e.set){for(let o of t.set){let a=Tkt(i,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),Ikt=[new _ue(">=0.0.0-0")],EUe=[new _ue(">=0.0.0")],Tkt=s((e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===wue){if(t.length===1&&t[0].semver===wue)return!0;r.includePrerelease?e=Ikt:e=EUe}if(t.length===1&&t[0].semver===wue){if(r.includePrerelease)return!0;t=EUe}let n=new Set,i,o;for(let p of e)p.operator===">"||p.operator===">="?i=IUe(i,p,r):p.operator==="<"||p.operator==="<="?o=TUe(o,p,r):n.add(p.semver);if(n.size>1)return null;let a;if(i&&o){if(a=Sue(i.semver,o.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(i&&!yB(p,String(i),r)||o&&!yB(p,String(o),r))return null;for(let g of t)if(!yB(p,String(g),r))return!1;return!0}let l,c,u,f,m=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;m&&m.prerelease.length===1&&o.operator==="<"&&m.prerelease[0]===0&&(m=!1);for(let p of t){if(f=f||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",i){if(h&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===h.major&&p.semver.minor===h.minor&&p.semver.patch===h.patch&&(h=!1),p.operator===">"||p.operator===">="){if(l=IUe(i,p,r),l===p&&l!==i)return!1}else if(i.operator===">="&&!yB(i.semver,String(p),r))return!1}if(o){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator==="<"||p.operator==="<="){if(c=TUe(o,p,r),c===p&&c!==o)return!1}else if(o.operator==="<="&&!yB(o.semver,String(p),r))return!1}if(!p.operator&&(o||i)&&a!==0)return!1}return!(i&&u&&!o&&a!==0||o&&f&&!i&&a!==0||h||m)},"simpleSubset"),IUe=s((e,t,r)=>{if(!e)return t;let n=Sue(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},"higherGT"),TUe=s((e,t,r)=>{if(!e)return t;let n=Sue(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e},"lowerLT");wUe.exports=Ekt});var kue=H((Q3n,kUe)=>{d();var Rue=dT(),SUe=dB(),wkt=e0(),RUe=hue(),_kt=iE(),Skt=tOe(),Rkt=nOe(),kkt=sOe(),Bkt=cOe(),Dkt=fOe(),Pkt=mOe(),Nkt=pOe(),Lkt=AOe(),Fkt=pm(),Mkt=vOe(),Qkt=EOe(),Okt=Rj(),Ukt=_Oe(),qkt=ROe(),Wkt=hB(),Gkt=kj(),Hkt=gue(),jkt=Aue(),Vkt=Bj(),$kt=Dj(),zkt=yue(),Ykt=QOe(),Kkt=pB(),Jkt=gm(),Xkt=AB(),Zkt=ZOe(),eBt=tUe(),tBt=nUe(),rBt=sUe(),nBt=lUe(),iBt=Lj(),oBt=hUe(),sBt=gUe(),aBt=CUe(),lBt=vUe(),cBt=_Ue();kUe.exports={parse:_kt,valid:Skt,clean:Rkt,inc:kkt,diff:Bkt,major:Dkt,minor:Pkt,patch:Nkt,prerelease:Lkt,compare:Fkt,rcompare:Mkt,compareLoose:Qkt,compareBuild:Okt,sort:Ukt,rsort:qkt,gt:Wkt,lt:Gkt,eq:Hkt,neq:jkt,gte:Vkt,lte:$kt,cmp:zkt,coerce:Ykt,Comparator:Kkt,Range:Jkt,satisfies:Xkt,toComparators:Zkt,maxSatisfying:eBt,minSatisfying:tBt,minVersion:rBt,validRange:nBt,outside:iBt,gtr:oBt,ltr:sBt,intersects:aBt,simplifyRange:lBt,subset:cBt,SemVer:wkt,re:Rue.re,src:Rue.src,tokens:Rue.t,SEMVER_SPEC_VERSION:SUe.SEMVER_SPEC_VERSION,RELEASE_TYPES:SUe.RELEASE_TYPES,compareIdentifiers:RUe.compareIdentifiers,rcompareIdentifiers:RUe.rcompareIdentifiers}});var $f=H(vB=>{"use strict";d();Object.defineProperty(vB,"__esModule",{value:!0});vB.dedent=void 0;function KUe(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Array.from(typeof e=="string"?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(l,c){var u=c.match(/\n([\t ]+|(?!\s).)/g);return u?l.concat(u.map(function(f){var m,h;return(h=(m=f.match(/[\t ]/g))===null||m===void 0?void 0:m.length)!==null&&h!==void 0?h:0})):l},[]);if(i.length){var o=new RegExp(`
[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(l){return l.replace(o,`
`)})}n[0]=n[0].replace(/^\r?\n/,"");var a=n[0];return t.forEach(function(l,c){var u=a.match(/(?:^|\n)( *)$/),f=u?u[1]:"",m=l;typeof l=="string"&&l.includes(`
`)&&(m=String(l).split(`
`).map(function(h,p){return p===0?h:""+f+h}).join(`
`)),a+=m+n[c+1]}),a}s(KUe,"dedent");vB.dedent=KUe;vB.default=KUe});var iqe=H(Hue=>{"use strict";d();Object.defineProperty(Hue,"__esModule",{value:!0});Hue.workerFile=`
const { parentPort } = require('worker_threads')
parentPort.on('message', async worker => {
const response = {
error: null,
data: null
}
try {
eval(worker)
// __executor__ is defined in worker
response.data = await __executor__()
parentPort.postMessage(response)
} catch (err) {
response.data = null
response.error = {
message: err.message,
stack: err.stack
}
try {
parentPort.postMessage(response)
} catch (err) {
console.error(err)
}
}
})
`});var uqe=H(Vue=>{"use strict";d();Object.defineProperty(Vue,"__esModule",{value:!0});var oqe=require("worker_threads"),SBt=require("v8"),RBt=require("os"),sqe=iqe(),Hj="ready",aqe="spawning",kBt="busy",jj="off",lqe=RBt.cpus().length,cqe=process.version.replace("v","").split("."),BBt=parseInt(cqe[0]),DBt=parseInt(cqe[1]),jue=class{static{s(this,"WorkerPool")}constructor(){this.maxWorkers=lqe,this.taskQueue=[],this.workers=[]}resurrect(t){let r=new oqe.Worker(sqe.workerFile,{eval:!0});t.status=aqe,t.worker=r,r.once("online",()=>process.nextTick(()=>{t.status=Hj,r.removeAllListeners(),this.tick()})),r.once("error",n=>{console.error(n),t.status=jj,r.removeAllListeners(),this.tick()})}tick(){if(this.workers.filter(({status:c})=>c===jj).forEach(c=>this.resurrect(c)),this.taskQueue.length===0)return;let t;for(let c=0;c<this.workers.length;c++)if(this.workers[c].status===Hj){t=this.workers[c];break}if(typeof t>"u")return;let r=this.taskQueue.shift();t.status=kBt;let{worker:n}=t,{handler:i,config:o,resolve:a,reject:l}=r;try{let c="";for(let h in o.ctx){if(!o.ctx.hasOwnProperty(h))continue;let p;switch(typeof o.ctx[h]){case"string":p=`'${o.ctx[h]}'`;break;case"object":p=JSON.stringify(o.ctx[h]);break;default:p=o.ctx[h]}c+=`let ${h} = ${p}
`}let u=SBt.serialize(o.data),f=JSON.stringify(u),m=`
async function __executor__() {
const v8 = require('v8')
${c}
const dataParsed = JSON.parse('${f}')
const dataBuffer = Buffer.from(dataParsed.data)
const dataDeserialized = v8.deserialize(dataBuffer)
return await (${i.toString()})(dataDeserialized)
}
`;n.once("message",h=>{if(this.free(n),typeof h.error>"u"||h.error===null)return a(h.data);let p=new Error(h.error.message);p.stack=h.error.stack,l(p)}),n.once("error",h=>{t.status=jj,l(h),this.tick()}),n.postMessage(m)}catch(c){this.free(n),l(c)}}enqueue({handler:t,config:r,resolve:n,reject:i}){this.taskQueue.push({handler:t,config:r,resolve:n,reject:i}),this.tick()}free(t){for(let r=0;r<this.workers.length;r++)if(t.threadId===this.workers[r].worker.threadId){this.workers[r].status=Hj,this.workers[r].worker.removeAllListeners(),this.tick();break}}setup(t={}){return this.maxWorkers=t.maxWorkers>0?t.maxWorkers:lqe,this.maxWorkers>10&&console.warn(`Worker pool has more than 10 workers.
You should also increase the Max Listeners of Node.js (https://nodejs.org/docs/latest/api/events.html#events_emitter_setmaxlisteners_n)
Otherwise, limit them with start({maxWorkers: 10})`),new Promise((r,n)=>{let i=0,o=0;for(let a=0;a<this.maxWorkers;a++){let l=new oqe.Worker(sqe.workerFile,{eval:!0});this.workers.push({status:aqe,worker:l}),l.once("online",(c=>()=>{process.nextTick(()=>{this.workers[c].status=Hj,this.workers[c].worker.removeAllListeners(),i++,i>0&&i+o===this.maxWorkers&&r()})})(a)),l.once("error",(c=>u=>{this.workers[c].status=jj,this.workers[c].worker.removeAllListeners(),o++,o===this.maxWorkers&&n(u)})(a))}})}async teardown(){if(BBt>=12&&DBt>=5){let t=[];for(let{worker:r}of this.workers)t.push(r.terminate());await Promise.all(t),this.workers=[]}else await new Promise(r=>{let n=0;for(let i=0;i<this.workers.length;i++)this.workers[i].worker.terminate(()=>{n++,n===this.workers.length&&(this.workers=[],r())})})}};Vue.default=new jue});var Vj=H(oE=>{"use strict";d();var PBt=oE&&oE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oE,"__esModule",{value:!0});var bB=PBt(uqe()),NBt=`job needs a function.
Try with:
> job(() => {...}, config)`,LBt=`job needs an object as ctx.
Try with:
> job(() => {...}, {ctx: {...}})`;function FBt(e,t={ctx:{},data:{}}){return new Promise((r,n)=>{if(typeof e!="function")return n(new Error(NBt));if(t.ctx=t.ctx||{},t.data=t.data||{},typeof t.ctx!="object")return n(new Error(LBt));bB.default.enqueue({handler:e,config:t,resolve:r,reject:n})})}s(FBt,"job");oE.job=FBt;oE.stop=bB.default.teardown.bind(bB.default);oE.start=bB.default.setup.bind(bB.default)});var _qe=H(sE=>{"use strict";d();var d1=sE&&sE.__classPrivateFieldGet||function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},rfe=sE&&sE.__classPrivateFieldSet||function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},x2,A3;Object.defineProperty(sE,"__esModule",{value:!0});var nfe=class{static{s(this,"AwaitLock")}constructor(){x2.set(this,!1),A3.set(this,new Set)}get acquired(){return d1(this,x2,"f")}acquireAsync({timeout:t}={}){if(!d1(this,x2,"f"))return rfe(this,x2,!0,"f"),Promise.resolve();if(t==null)return new Promise(i=>{d1(this,A3,"f").add(i)});let r,n;return Promise.race([new Promise(i=>{r=s(()=>{clearTimeout(n),i()},"resolver"),d1(this,A3,"f").add(r)}),new Promise((i,o)=>{n=setTimeout(()=>{d1(this,A3,"f").delete(r),o(new Error("Timed out waiting for lock"))},t)})])}tryAcquire(){return d1(this,x2,"f")?!1:(rfe(this,x2,!0,"f"),!0)}release(){if(!d1(this,x2,"f"))throw new Error("Cannot release an unacquired lock");if(d1(this,A3,"f").size>0){let[t]=d1(this,A3,"f");d1(this,A3,"f").delete(t),t()}else rfe(this,x2,!1,"f")}};sE.default=nfe;x2=new WeakMap,A3=new WeakMap});var QHe=H((wHn,MHe)=>{d();var MT=1e3,QT=MT*60,OT=QT*60,pE=OT*24,fQt=pE*7,dQt=pE*365.25;MHe.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return mQt(e);if(r==="number"&&isFinite(e))return t.long?pQt(e):hQt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function mQt(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*dQt;case"weeks":case"week":case"w":return r*fQt;case"days":case"day":case"d":return r*pE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*OT;case"minutes":case"minute":case"mins":case"min":case"m":return r*QT;case"seconds":case"second":case"secs":case"sec":case"s":return r*MT;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}s(mQt,"parse");function hQt(e){var t=Math.abs(e);return t>=pE?Math.round(e/pE)+"d":t>=OT?Math.round(e/OT)+"h":t>=QT?Math.round(e/QT)+"m":t>=MT?Math.round(e/MT)+"s":e+"ms"}s(hQt,"fmtShort");function pQt(e){var t=Math.abs(e);return t>=pE?T$(e,t,pE,"day"):t>=OT?T$(e,t,OT,"hour"):t>=QT?T$(e,t,QT,"minute"):t>=MT?T$(e,t,MT,"second"):e+" ms"}s(pQt,"fmtLong");function T$(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}s(T$,"plural")});var Lde=H((RHn,OHe)=>{d();function gQt(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=QHe(),r.destroy=u,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let m=0;for(let h=0;h<f.length;h++)m=(m<<5)-m+f.charCodeAt(h),m|=0;return r.colors[Math.abs(m)%r.colors.length]}s(t,"selectColor"),r.selectColor=t;function r(f){let m,h=null,p,g;function y(...x){if(!y.enabled)return;let b=y,E=Number(new Date),_=E-(m||E);b.diff=_,b.prev=m,b.curr=E,m=E,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let k=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(N,M)=>{if(N==="%%")return"%";k++;let Z=r.formatters[M];if(typeof Z=="function"){let he=x[k];N=Z.call(b,he),x.splice(k,1),k--}return N}),r.formatArgs.call(b,x),(b.log||r.log).apply(b,x)}return s(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:s(()=>h!==null?h:(p!==r.namespaces&&(p=r.namespaces,g=r.enabled(f)),g),"get"),set:s(x=>{h=x},"set")}),typeof r.init=="function"&&r.init(y),y}s(r,"createDebug");function n(f,m){let h=r(this.namespace+(typeof m>"u"?":":m)+f);return h.log=this.log,h}s(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let m,h=(typeof f=="string"?f:"").split(/[\s,]+/),p=h.length;for(m=0;m<p;m++)h[m]&&(f=h[m].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}s(i,"enable");function o(){let f=[...r.names.map(l),...r.skips.map(l).map(m=>"-"+m)].join(",");return r.enable(""),f}s(o,"disable");function a(f){if(f[f.length-1]==="*")return!0;let m,h;for(m=0,h=r.skips.length;m<h;m++)if(r.skips[m].test(f))return!1;for(m=0,h=r.names.length;m<h;m++)if(r.names[m].test(f))return!0;return!1}s(a,"enabled");function l(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}s(l,"toNamespace");function c(f){return f instanceof Error?f.stack||f.message:f}s(c,"coerce");function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(u,"destroy"),r.enable(r.load()),r}s(gQt,"setup");OHe.exports=gQt});var UHe=H((Yf,w$)=>{d();Yf.formatArgs=yQt;Yf.save=CQt;Yf.load=xQt;Yf.useColors=AQt;Yf.storage=vQt();Yf.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Yf.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function AQt(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(AQt,"useColors");function yQt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+w$.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}s(yQt,"formatArgs");Yf.log=console.debug||console.log||(()=>{});function CQt(e){try{e?Yf.storage.setItem("debug",e):Yf.storage.removeItem("debug")}catch{}}s(CQt,"save");function xQt(){let e;try{e=Yf.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}s(xQt,"load");function vQt(){try{return localStorage}catch{}}s(vQt,"localstorage");w$.exports=Lde()(Yf);var{formatters:bQt}=w$.exports;bQt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var WHe=H((NHn,qHe)=>{"use strict";d();qHe.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var jHe=H((FHn,HHe)=>{"use strict";d();var EQt=require("os"),GHe=require("tty"),vm=WHe(),{env:zl}=process,T3;vm("no-color")||vm("no-colors")||vm("color=false")||vm("color=never")?T3=0:(vm("color")||vm("colors")||vm("color=true")||vm("color=always"))&&(T3=1);"FORCE_COLOR"in zl&&(zl.FORCE_COLOR==="true"?T3=1:zl.FORCE_COLOR==="false"?T3=0:T3=zl.FORCE_COLOR.length===0?1:Math.min(parseInt(zl.FORCE_COLOR,10),3));function Fde(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}s(Fde,"translateLevel");function Mde(e,t){if(T3===0)return 0;if(vm("color=16m")||vm("color=full")||vm("color=truecolor"))return 3;if(vm("color=256"))return 2;if(e&&!t&&T3===void 0)return 0;let r=T3||0;if(zl.TERM==="dumb")return r;if(process.platform==="win32"){let n=EQt.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in zl)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in zl)||zl.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in zl)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(zl.TEAMCITY_VERSION)?1:0;if(zl.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in zl){let n=parseInt((zl.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(zl.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(zl.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(zl.TERM)||"COLORTERM"in zl?1:r}s(Mde,"supportsColor");function IQt(e){let t=Mde(e,e&&e.isTTY);return Fde(t)}s(IQt,"getSupportLevel");HHe.exports={supportsColor:IQt,stdout:Fde(Mde(!0,GHe.isatty(1))),stderr:Fde(Mde(!0,GHe.isatty(2)))}});var $He=H((Ec,S$)=>{d();var TQt=require("tty"),_$=require("util");Ec.init=DQt;Ec.log=RQt;Ec.formatArgs=_Qt;Ec.save=kQt;Ec.load=BQt;Ec.useColors=wQt;Ec.destroy=_$.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ec.colors=[6,2,3,4,5,1];try{let e=jHe();e&&(e.stderr||e).level>=2&&(Ec.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ec.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function wQt(){return"colors"in Ec.inspectOpts?!!Ec.inspectOpts.colors:TQt.isatty(process.stderr.fd)}s(wQt,"useColors");function _Qt(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
`).join(`
`+o),e.push(i+"m+"+S$.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=SQt()+t+" "+e[0]}s(_Qt,"formatArgs");function SQt(){return Ec.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(SQt,"getDate");function RQt(...e){return process.stderr.write(_$.format(...e)+`
`)}s(RQt,"log");function kQt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}s(kQt,"save");function BQt(){return process.env.DEBUG}s(BQt,"load");function DQt(e){e.inspectOpts={};let t=Object.keys(Ec.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Ec.inspectOpts[t[r]]}s(DQt,"init");S$.exports=Lde()(Ec);var{formatters:VHe}=S$.exports;VHe.o=function(e){return this.inspectOpts.colors=this.useColors,_$.inspect(e,this.inspectOpts).split(`
`).map(t=>t.trim()).join(" ")};VHe.O=function(e){return this.inspectOpts.colors=this.useColors,_$.inspect(e,this.inspectOpts)}});var gE=H((qHn,Qde)=>{d();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Qde.exports=UHe():Qde.exports=$He()});var Hde=H((jHn,JHe)=>{d();var zB=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,PQt=typeof AbortController=="function",R$=PQt?AbortController:class{static{s(this,"AbortController")}constructor(){this.signal=new zHe}abort(){this.signal.dispatchEvent("abort")}},NQt=typeof AbortSignal=="function",LQt=typeof R$.AbortSignal=="function",zHe=NQt?AbortSignal:LQt?R$.AbortController:class{static{s(this,"AbortSignal")}constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;let r={type:t,target:this};this.onabort(r),this._listeners.forEach(n=>n(r),this)}}onabort(){}addEventListener(t,r){t==="abort"&&this._listeners.push(r)}removeEventListener(t,r){t==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},Wde=new Set,Ode=s((e,t)=>{let r=`LRU_CACHE_OPTION_${e}`;k$(r)&&Gde(r,`${e} option`,`options.${t}`,qT)},"deprecatedOption"),Ude=s((e,t)=>{let r=`LRU_CACHE_METHOD_${e}`;if(k$(r)){let{prototype:n}=qT,{get:i}=Object.getOwnPropertyDescriptor(n,e);Gde(r,`${e} method`,`cache.${t}()`,i)}},"deprecatedMethod"),FQt=s((e,t)=>{let r=`LRU_CACHE_PROPERTY_${e}`;if(k$(r)){let{prototype:n}=qT,{get:i}=Object.getOwnPropertyDescriptor(n,e);Gde(r,`${e} property`,`cache.${t}`,i)}},"deprecatedProperty"),YHe=s((...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},"emitWarning"),k$=s(e=>!Wde.has(e),"shouldWarn"),Gde=s((e,t,r,n)=>{Wde.add(e);let i=`The ${t} is deprecated. Please use ${r} instead.`;YHe(i,"DeprecationWarning",e,n)},"warn"),AE=s(e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),"isPosInt"),KHe=s(e=>AE(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?UT:null:null,"getUintArray"),UT=class extends Array{static{s(this,"ZeroArray")}constructor(t){super(t),this.fill(0)}},qde=class{static{s(this,"Stack")}constructor(t){if(t===0)return[];let r=KHe(t);this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},qT=class e{static{s(this,"LRUCache")}constructor(t={}){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:c,dispose:u,disposeAfter:f,noDisposeOnSet:m,noUpdateTTL:h,maxSize:p=0,sizeCalculation:g,fetchMethod:y,fetchContext:x,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:E}=t,{length:_,maxAge:k,stale:B}=t instanceof e?{}:t;if(r!==0&&!AE(r))throw new TypeError("max option must be a nonnegative integer");let N=r?KHe(r):Array;if(!N)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=p,this.sizeCalculation=g||_,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&x!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new N(r),this.prev=new N(r),this.head=0,this.tail=0,this.free=new qde(r),this.initialFill=1,this.size=0,typeof u=="function"&&(this.dispose=u),typeof f=="function"?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!b,this.maxSize!==0){if(!AE(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!B,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=AE(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||k||0,this.ttl){if(!AE(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let M="LRU_CACHE_UNBOUNDED";k$(M)&&(Wde.add(M),YHe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,e))}B&&Ode("stale","allowStale"),k&&Ode("maxAge","ttl"),_&&Ode("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new UT(this.max),this.starts=new UT(this.max),this.setItemTTL=(n,i,o=zB.now())=>{if(this.starts[n]=i!==0?o:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);a.unref&&a.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?zB.now():0};let t=0,r=s(()=>{let n=zB.now();if(this.ttlResolution>0){t=n;let i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return n},"getNow");this.getRemainingTTL=n=>{let i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(t||r())-this.starts[n]>this.ttls[n]}updateItemAge(t){}setItemTTL(t,r,n){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new UT(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,r,n,i)=>{if(!AE(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,t),!AE(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return n},this.addItemSize=(t,r)=>{this.sizes[t]=r;let n=this.maxSize-this.sizes[t];for(;this.calculatedSize>n;)this.evict(!0);this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,r){}requireSize(t,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(let t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(let t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(let t of this.indexes())yield this.keyList[t]}*rkeys(){for(let t of this.rindexes())yield this.keyList[t]}*values(){for(let t of this.indexes())yield this.valList[t]}*rvalues(){for(let t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,r={}){for(let n of this.indexes())if(t(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],r)}forEach(t,r=this){for(let n of this.indexes())t.call(r,this.valList[n],this.keyList[n],this)}rforEach(t,r=this){for(let n of this.rindexes())t.call(r,this.valList[n],this.keyList[n],this)}get prune(){return Ude("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),t=!0);return t}dump(){let t=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],i=this.valList[r],a={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){a.ttl=this.ttls[r];let l=zB.now()-this.starts[r];a.start=Math.floor(Date.now()-l)}this.sizes&&(a.size=this.sizes[r]),t.unshift([n,a])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=zB.now()-i}this.set(r,n.value,n)}}dispose(t,r,n){}set(t,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL}={}){if(a=this.requireSize(t,r,a,l),this.maxSize&&a>this.maxSize)return this;let u=this.size===0?void 0:this.keyMap.get(t);if(u===void 0)u=this.newIndex(),this.keyList[u]=t,this.valList[u]=r,this.keyMap.set(t,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,a),c=!1;else{let f=this.valList[u];r!==f&&(this.isBackgroundFetch(f)?f.__abortController.abort():o||(this.dispose(f,t,"set"),this.disposeAfter&&this.disposed.push([f,t,"set"])),this.removeItemSize(u),this.valList[u]=r,this.addItemSize(u,a)),this.moveToTail(u)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(u,n,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let t=this.valList[this.head];return this.evict(!0),t}}evict(t){let r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),t&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(t,{updateAgeOnHas:r=this.updateAgeOnHas}={}){let n=this.keyMap.get(t);return n!==void 0&&!this.isStale(n)?(r&&this.updateItemAge(n),!0):!1}peek(t,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(t);if(n!==void 0&&(r||!this.isStale(n))){let i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,r,n,i){let o=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(o))return o;let a=new R$,l={signal:a.signal,options:n,context:i},c=s(h=>(a.signal.aborted||this.set(t,h,l.options),h),"cb"),u=s(h=>{if(this.valList[r]===m&&(!n.noDeleteOnFetchRejection||m.__staleWhileFetching===void 0?this.delete(t):this.valList[r]=m.__staleWhileFetching),m.__returned===m)throw h},"eb"),f=s(h=>h(this.fetchMethod(t,o,l)),"pcall"),m=new Promise(f).then(c,u);return m.__abortController=a,m.__staleWhileFetching=o,m.__returned=null,r===void 0?(this.set(t,m,l.options),r=this.keyMap.get(t)):this.valList[r]=m,m}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:m=this.fetchContext,forceRefresh:h=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i});let p={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:f},g=this.keyMap.get(t);if(g===void 0){let y=this.backgroundFetch(t,g,p,m);return y.__returned=y}else{let y=this.valList[g];if(this.isBackgroundFetch(y))return r&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!h&&!this.isStale(g))return this.moveToTail(g),n&&this.updateItemAge(g),y;let x=this.backgroundFetch(t,g,p,m);return r&&x.__staleWhileFetching!==void 0?x.__staleWhileFetching:x.__returned=x}}get(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){let o=this.keyMap.get(t);if(o!==void 0){let a=this.valList[o],l=this.isBackgroundFetch(a);return this.isStale(o)?l?r?a.__staleWhileFetching:void 0:(i||this.delete(t),r?a:void 0):l?void 0:(this.moveToTail(o),n&&this.updateItemAge(o),a)}}connect(t,r){this.prev[r]=t,this.next[t]=r}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return Ude("del","delete"),this.delete}delete(t){let r=!1;if(this.size!==0){let n=this.keyMap.get(t);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,t,"delete"),this.disposeAfter&&this.disposed.push([i,t,"delete"])),this.keyMap.delete(t),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let t of this.rindexes({allowStale:!0})){let r=this.valList[t];if(this.isBackgroundFetch(r))r.__abortController.abort();else{let n=this.keyList[t];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Ude("reset","clear"),this.clear}get length(){return FQt("length","size"),this.size}static get AbortController(){return R$}static get AbortSignal(){return zHe}};JHe.exports=qT});var $de=H((zHn,XHe)=>{"use strict";d();var YB=class extends Error{static{s(this,"FetchBaseError")}constructor(t,r,n){super(t),this.type=r,this._name=n}get name(){return this._name}get[Symbol.toStringTag](){return this._name}},jde=class extends YB{static{s(this,"FetchError")}constructor(t,r,n){super(t,r,"FetchError"),n&&(this.code=n.code,this.errno=n.errno,this.erroredSysCall=n.syscall)}},Vde=class extends YB{static{s(this,"AbortError")}constructor(t,r="aborted"){super(t,r,"AbortError")}};XHe.exports={FetchBaseError:YB,FetchError:jde,AbortError:Vde}});var S2=H((JHn,eje)=>{"use strict";d();var{constants:{MAX_LENGTH:MQt}}=require("buffer"),{pipeline:B$,PassThrough:QQt}=require("stream"),{promisify:OQt}=require("util"),{createGunzip:UQt,createInflate:qQt,createBrotliDecompress:WQt,constants:{Z_SYNC_FLUSH:ZHe}}=require("zlib"),GQt=gE()("helix-fetch:utils"),HQt=OQt(B$),jQt=s((e,t)=>e===204||e===304||+t["content-length"]==0?!1:/^\s*(?:(x-)?deflate|(x-)?gzip|br)\s*$/.test(t["content-encoding"]),"canDecode"),VQt=s((e,t,r,n)=>{if(!jQt(e,t))return r;let i=s(o=>{o&&(GQt(`encountered error while decoding stream: ${o}`),n(o))},"cb");switch(t["content-encoding"].trim()){case"gzip":case"x-gzip":return B$(r,UQt({flush:ZHe,finishFlush:ZHe}),i);case"deflate":case"x-deflate":return B$(r,qQt(),i);case"br":return B$(r,WQt(),i);default:return r}},"decodeStream"),$Qt=s(e=>{if(!e||typeof e!="object"||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},"isPlainObject"),D$=s((e,t)=>{if(Buffer.isBuffer(e))return e.length;switch(typeof e){case"string":return e.length*2;case"boolean":return 4;case"number":return 8;case"symbol":return Symbol.keyFor(e)?Symbol.keyFor(e).length*2:(e.toString().length-8)*2;case"object":return Array.isArray(e)?zQt(e,t):YQt(e,t);default:return 0}},"calcSize"),zQt=s((e,t)=>(t.add(e),e.map(r=>t.has(r)?0:D$(r,t)).reduce((r,n)=>r+n,0)),"calcArraySize"),YQt=s((e,t)=>{if(e==null)return 0;t.add(e);let r=0,n=[];for(let i in e)n.push(i);return n.push(...Object.getOwnPropertySymbols(e)),n.forEach(i=>{if(r+=D$(i,t),typeof e[i]=="object"&&e[i]!==null){if(t.has(e[i]))return;t.add(e[i])}r+=D$(e[i],t)}),r},"calcObjectSize"),KQt=s(e=>D$(e,new WeakSet),"sizeof"),JQt=s(async e=>{let t=new QQt,r=0,n=[];return t.on("data",i=>{if(r+i.length>MQt)throw new Error("Buffer.constants.MAX_SIZE exceeded");n.push(i),r+=i.length}),await HQt(e,t),Buffer.concat(n,r)},"streamToBuffer");eje.exports={decodeStream:VQt,isPlainObject:$Qt,sizeof:KQt,streamToBuffer:JQt}});var N$=H((ejn,ije)=>{"use strict";d();var{PassThrough:tje,Readable:R2}=require("stream"),{types:{isAnyArrayBuffer:nje}}=require("util"),{FetchError:XQt,FetchBaseError:ZQt}=$de(),{streamToBuffer:eOt}=S2(),tOt=Buffer.alloc(0),bm=Symbol("Body internals"),rOt=s(e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),"toArrayBuffer"),rje=s(async e=>{if(e[bm].disturbed)throw new TypeError("Already read");if(e[bm].error)throw new TypeError(`Stream had error: ${e[bm].error.message}`);e[bm].disturbed=!0;let{stream:t}=e[bm];return t===null?tOt:eOt(t)},"consume"),P$=class{static{s(this,"Body")}constructor(t){let r;t==null?r=null:t instanceof URLSearchParams?r=R2.from(t.toString()):t instanceof R2?r=t:Buffer.isBuffer(t)?r=R2.from(t):nje(t)?r=R2.from(Buffer.from(t)):typeof t=="string"||t instanceof String?r=R2.from(t):r=R2.from(String(t)),this[bm]={stream:r,disturbed:!1,error:null},t instanceof R2&&r.on("error",n=>{let i=n instanceof ZQt?n:new XQt(`Invalid response body while trying to fetch ${this.url}: ${n.message}`,"system",n);this[bm].error=i})}get body(){return this[bm].stream}get bodyUsed(){return this[bm].disturbed}async buffer(){return rje(this)}async arrayBuffer(){return rOt(await this.buffer())}async text(){return(await rje(this)).toString()}async json(){return JSON.parse(await this.text())}};Object.defineProperties(P$.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var nOt=s(e=>{if(e[bm].disturbed)throw new TypeError("Cannot clone: already read");let{stream:t}=e[bm],r=t;if(t instanceof R2){r=new tje;let n=new tje;t.pipe(r),t.pipe(n),e[bm].stream=n}return r},"cloneStream"),iOt=s(e=>e===null?null:typeof e=="string"?"text/plain; charset=utf-8":e instanceof URLSearchParams?"application/x-www-form-urlencoded; charset=utf-8":Buffer.isBuffer(e)||nje(e)||e instanceof R2?null:"text/plain; charset=utf-8","guessContentType");ije.exports={Body:P$,cloneStream:nOt,guessContentType:iOt}});var WT=H((njn,lje)=>{"use strict";d();var{validateHeaderName:oje,validateHeaderValue:sje}=require("http"),{isPlainObject:oOt}=S2(),k2=Symbol("Headers internals"),KB=s(e=>{let t=typeof e!="string"?String(e):e;if(typeof oje=="function")oje(t);else if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let r=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),r}return t.toLowerCase()},"normalizeName"),aje=s((e,t)=>{let r=typeof e!="string"?String(e):e;if(typeof sje=="function")sje(t,r);else if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){let n=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}return r},"normalizeValue"),L$=class e{static{s(this,"Headers")}constructor(t={}){if(this[k2]={map:new Map},t instanceof e)t.forEach((r,n)=>{this.append(n,r)});else if(Array.isArray(t))t.forEach(([r,n])=>{this.append(r,n)});else if(oOt(t))for(let[r,n]of Object.entries(t))this.append(r,n)}set(t,r){this[k2].map.set(KB(t),aje(r,t))}has(t){return this[k2].map.has(KB(t))}get(t){let r=this[k2].map.get(KB(t));return r===void 0?null:r}append(t,r){let n=KB(t),i=aje(r,t),o=this[k2].map.get(n);this[k2].map.set(n,o?`${o}, ${i}`:i)}delete(t){this[k2].map.delete(KB(t))}forEach(t,r){for(let n of this.keys())t.call(r,this.get(n),n)}keys(){return Array.from(this[k2].map.keys()).sort()}*values(){for(let t of this.keys())yield this.get(t)}*entries(){for(let t of this.keys())yield[t,this.get(t)]}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.constructor.name}plain(){return Object.fromEntries(this[k2].map)}};Object.defineProperties(L$.prototype,["append","delete","entries","forEach","get","has","keys","set","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));lje.exports={Headers:L$}});var zde=H((sjn,cje)=>{"use strict";d();var{EventEmitter:sOt}=require("events"),op=Symbol("AbortSignal internals"),GT=class{static{s(this,"AbortSignal")}constructor(){this[op]={eventEmitter:new sOt,onabort:null,aborted:!1}}get aborted(){return this[op].aborted}get onabort(){return this[op].onabort}set onabort(t){this[op].onabort=t}get[Symbol.toStringTag](){return this.constructor.name}removeEventListener(t,r){this[op].eventEmitter.removeListener(t,r)}addEventListener(t,r){this[op].eventEmitter.on(t,r)}dispatchEvent(t){let r={type:t,target:this},n=`on${t}`;typeof this[op][n]=="function"&&this[n](r),this[op].eventEmitter.emit(t,r)}fire(){this[op].aborted=!0,this.dispatchEvent("abort")}};Object.defineProperties(GT.prototype,{addEventListener:{enumerable:!0},removeEventListener:{enumerable:!0},dispatchEvent:{enumerable:!0},aborted:{enumerable:!0},onabort:{enumerable:!0}});var M$=class extends GT{static{s(this,"TimeoutSignal")}constructor(t){if(!Number.isInteger(t))throw new TypeError(`Expected an integer, got ${typeof t}`);super(),this[op].timerId=setTimeout(()=>{this.fire()},t)}clear(){clearTimeout(this[op].timerId)}};Object.defineProperties(M$.prototype,{clear:{enumerable:!0}});var F$=Symbol("AbortController internals"),Q$=class{static{s(this,"AbortController")}constructor(){this[F$]={signal:new GT}}get signal(){return this[F$].signal}get[Symbol.toStringTag](){return this.constructor.name}abort(){this[F$].signal.aborted||this[F$].signal.fire()}};Object.defineProperties(Q$.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});cje.exports={AbortController:Q$,AbortSignal:GT,TimeoutSignal:M$}});var JB=H((cjn,dje)=>{"use strict";d();var{randomBytes:aOt}=require("crypto"),{Readable:lOt}=require("stream"),Kde=s(e=>typeof e=="object"&&["arrayBuffer","stream","text","slice","constructor"].map(t=>typeof e[t]).filter(t=>t!=="function").length===0&&typeof e.type=="string"&&typeof e.size=="number"&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),"isBlob"),cOt=s(e=>e!=null&&typeof e=="object"&&["append","delete","get","getAll","has","set","keys","values","entries","constructor"].map(t=>typeof e[t]).filter(t=>t!=="function").length===0&&e[Symbol.toStringTag]==="FormData","isFormData"),uje=s(e=>`--${e}--\r
\r
`,"getFooter"),fje=s((e,t,r)=>{let n="";return n+=`--${e}\r
`,n+=`Content-Disposition: form-data; name="${t}"`,Kde(r)&&(n+=`; filename="${r.name}"\r
`,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}\r
\r
`},"getHeader");async function*uOt(e,t){for(let[r,n]of e)yield fje(t,r,n),Kde(n)?yield*n.stream():yield n,yield`\r
`;yield uje(t)}s(uOt,"formDataIterator");var fOt=s((e,t)=>{let r=0;for(let[n,i]of e)r+=Buffer.byteLength(fje(t,n,i)),r+=Kde(i)?i.size:Buffer.byteLength(String(i)),r+=Buffer.byteLength(`\r
`);return r+=Buffer.byteLength(uje(t)),r},"getFormDataLength"),Yde=class{static{s(this,"FormDataSerializer")}constructor(t){this.fd=t,this.boundary=aOt(8).toString("hex")}length(){return typeof this._length>"u"&&(this._length=fOt(this.fd,this.boundary)),this._length}contentType(){return`multipart/form-data; boundary=${this.boundary}`}stream(){return lOt.from(uOt(this.fd,this.boundary))}};dje.exports={isFormData:cOt,FormDataSerializer:Yde}});var hje=H((djn,mje)=>{"use strict";d();var{AbortSignal:dOt}=zde(),{Body:mOt,cloneStream:hOt,guessContentType:pOt}=N$(),{Headers:gOt}=WT(),{isPlainObject:AOt}=S2(),{isFormData:yOt,FormDataSerializer:COt}=JB(),xOt=20,w3=Symbol("Request internals"),O$=class e extends mOt{static{s(this,"Request")}constructor(t,r={}){let n=t instanceof e?t:null,i=n?new URL(n.url):new URL(t),o=r.method||n&&n.method||"GET";if(o=o.toUpperCase(),(r.body!=null||n&&n.body!==null)&&["GET","HEAD"].includes(o))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body||(n&&n.body?hOt(n):null),l=new gOt(r.headers||n&&n.headers||{});if(yOt(a)&&!l.has("content-type")){let m=new COt(a);a=m.stream(),l.set("content-type",m.contentType()),!l.has("transfer-encoding")&&!l.has("content-length")&&l.set("content-length",m.length())}if(!l.has("content-type"))if(AOt(a))a=JSON.stringify(a),l.set("content-type","application/json");else{let m=pOt(a);m&&l.set("content-type",m)}super(a);let c=n?n.signal:null;if("signal"in r&&(c=r.signal),c&&!(c instanceof dOt))throw new TypeError("signal needs to be an instance of AbortSignal");let u=r.redirect||n&&n.redirect||"follow";if(!["follow","error","manual"].includes(u))throw new TypeError(`'${u}' is not a valid redirect option`);let f=r.cache||n&&n.cache||"default";if(!["default","no-store","reload","no-cache","force-cache","only-if-cached"].includes(f))throw new TypeError(`'${f}' is not a valid cache option`);this[w3]={init:{...r},method:o,redirect:u,cache:f,headers:l,parsedURL:i,signal:c},r.follow===void 0?!n||n.follow===void 0?this.follow=xOt:this.follow=n.follow:this.follow=r.follow,this.counter=r.counter||n&&n.counter||0,r.compress===void 0?!n||n.compress===void 0?this.compress=!0:this.compress=n.compress:this.compress=r.compress,r.decode===void 0?!n||n.decode===void 0?this.decode=!0:this.decode=n.decode:this.decode=r.decode}get method(){return this[w3].method}get url(){return this[w3].parsedURL.toString()}get headers(){return this[w3].headers}get redirect(){return this[w3].redirect}get cache(){return this[w3].cache}get signal(){return this[w3].signal}clone(){return new e(this)}get init(){return this[w3].init}get[Symbol.toStringTag](){return this.constructor.name}};Object.defineProperties(O$.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},cache:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});mje.exports={Request:O$}});var Jde=H((pjn,pje)=>{"use strict";d();var{Body:vOt,cloneStream:bOt,guessContentType:EOt}=N$(),{Headers:IOt}=WT(),{isPlainObject:TOt}=S2(),{isFormData:wOt,FormDataSerializer:_Ot}=JB(),sp=Symbol("Response internals"),U$=class e extends vOt{static{s(this,"Response")}constructor(t=null,r={}){let n=new IOt(r.headers),i=t;if(wOt(i)&&!n.has("content-type")){let o=new _Ot(i);i=o.stream(),n.set("content-type",o.contentType()),!n.has("transfer-encoding")&&!n.has("content-length")&&n.set("content-length",o.length())}if(i!==null&&!n.has("content-type"))if(TOt(i))i=JSON.stringify(i),n.set("content-type","application/json");else{let o=EOt(i);o&&n.set("content-type",o)}super(i),this[sp]={url:r.url,status:r.status||200,statusText:r.statusText||"",headers:n,httpVersion:r.httpVersion,decoded:r.decoded,counter:r.counter}}get url(){return this[sp].url||""}get status(){return this[sp].status}get statusText(){return this[sp].statusText}get ok(){return this[sp].status>=200&&this[sp].status<300}get redirected(){return this[sp].counter>0}get headers(){return this[sp].headers}get httpVersion(){return this[sp].httpVersion}get decoded(){return this[sp].decoded}static redirect(t,r=302){if(![301,302,303,307,308].includes(r))throw new RangeError("Invalid status code");return new e(null,{headers:{location:new URL(t).toString()},status:r})}clone(){if(this.bodyUsed)throw new TypeError("Cannot clone: already read");return new e(bOt(this),{...this[sp]})}get[Symbol.toStringTag](){return this.constructor.name}};Object.defineProperties(U$.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});pje.exports={Response:U$}});var Aje=H((Cjn,gje)=>{"use strict";d();var SOt=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),ROt=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),kOt=new Set([500,502,503,504]),BOt={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},DOt={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function yE(e){let t=parseInt(e,10);return isFinite(t)?t:0}s(yE,"toNumberOrZero");function POt(e){return e?kOt.has(e.status):!0}s(POt,"isErrorResponse");function Xde(e){let t={};if(!e)return t;let r=e.trim().split(/,/);for(let n of r){let[i,o]=n.split(/=/,2);t[i.trim()]=o===void 0?!0:o.trim().replace(/^"|"$/g,"")}return t}s(Xde,"parseCacheControl");function NOt(e){let t=[];for(let r in e){let n=e[r];t.push(n===!0?r:r+"="+n)}if(t.length)return t.join(", ")}s(NOt,"formatCacheControl");gje.exports=class{static{s(this,"CachePolicy")}constructor(t,r,{shared:n,cacheHeuristic:i,immutableMinTimeToLive:o,ignoreCargoCult:a,_fromObject:l}={}){if(l){this._fromObject(l);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(t),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=o!==void 0?o:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=Xde(r.headers["cache-control"]),this._method="method"in t?t.method:"GET",this._url=t.url,this._host=t.headers.host,this._noAuthorization=!t.headers.authorization,this._reqHeaders=r.headers.vary?t.headers:null,this._reqcc=Xde(t.headers["cache-control"]),a&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":NOt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&ROt.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||SOt.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(t){if(!t||!t.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(t){this._assertRequestHasHeaders(t);let r=Xde(t.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(t.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(t,!1)}_requestMatches(t,r){return(!this._url||this._url===t.url)&&this._host===t.headers.host&&(!t.method||this._method===t.method||r&&t.method==="HEAD")&&this._varyMatches(t)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(t){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(t.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(t){let r={};for(let n in t)BOt[n]||(r[n]=t[n]);if(t.connection){let n=t.connection.trim().split(/\s*,\s*/);for(let i of n)delete r[i]}if(r.warning){let n=r.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let t=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(t.warning=(t.warning?`${t.warning}, `:"")+'113 - "rfc7234 5.5.4"'),t.age=`${Math.round(r)}`,t.date=new Date(this.now()).toUTCString(),t}date(){let t=Date.parse(this._resHeaders.date);return isFinite(t)?t:this._responseTime}age(){let t=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return t+r}_ageValue(){return yE(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return yE(this._rescc["s-maxage"])}if(this._rescc["max-age"])return yE(this._rescc["max-age"]);let t=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(t,(n-r)/1e3)}if(this._resHeaders["last-modified"]){let n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(t,(r-n)/1e3*this._cacheHeuristic)}return t}timeToLive(){let t=this.maxAge()-this.age(),r=t+yE(this._rescc["stale-if-error"]),n=t+yE(this._rescc["stale-while-revalidate"]);return Math.max(0,t,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+yE(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+yE(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(t){return new this(void 0,void 0,{_fromObject:t})}_fromObject(t){if(this._responseTime)throw Error("Reinitialized");if(!t||t.v!==1)throw Error("Invalid serialization");this._responseTime=t.t,this._isShared=t.sh,this._cacheHeuristic=t.ch,this._immutableMinTtl=t.imm!==void 0?t.imm:24*3600*1e3,this._status=t.st,this._resHeaders=t.resh,this._rescc=t.rescc,this._method=t.m,this._url=t.u,this._host=t.h,this._noAuthorization=t.a,this._reqHeaders=t.reqh,this._reqcc=t.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(t){this._assertRequestHasHeaders(t);let r=this._copyWithoutHopByHopHeaders(t.headers);if(delete r["if-range"],!this._requestMatches(t,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let i=r["if-none-match"].split(/,/).filter(o=>!/^\s*W\//.test(o));i.length?r["if-none-match"]=i.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(t,r){if(this._assertRequestHasHeaders(t),this._useStaleIfError()&&POt(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(t,r),modified:r.status!=304,matches:!1};let i={};for(let a in this._resHeaders)i[a]=a in r.headers&&!DOt[a]?r.headers[a]:this._resHeaders[a];let o=Object.assign({},r,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(t,o,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var vje=H((bjn,xje)=>{"use strict";d();var LOt=Aje(),{Headers:FOt}=WT(),yje=s(e=>({url:e.url,method:e.method,headers:e.headers.plain()}),"convertRequest"),Cje=s(e=>({status:e.status,headers:e.headers.plain()}),"convertResponse"),Zde=class{static{s(this,"CachePolicyWrapper")}constructor(t,r,n){this.policy=new LOt(yje(t),Cje(r),n)}storable(){return this.policy.storable()}satisfiesWithoutRevalidation(t){return this.policy.satisfiesWithoutRevalidation(yje(t))}responseHeaders(t){return new FOt(this.policy.responseHeaders(Cje(t)))}timeToLive(){return this.policy.timeToLive()}};xje.exports=Zde});var Ije=H((Tjn,Eje)=>{"use strict";d();var{Readable:MOt}=require("stream"),{Headers:bje}=WT(),{Response:QOt}=Jde(),_3=Symbol("CacheableResponse internals"),OOt=s(e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),"toArrayBuffer"),eme=class e extends QOt{static{s(this,"CacheableResponse")}constructor(t,r){super(t,r);let n=new bje(r.headers);this[_3]={headers:n,bufferedBody:t}}get headers(){return this[_3].headers}set headers(t){if(t instanceof bje)this[_3].headers=t;else throw new TypeError("instance of Headers expected")}get body(){return MOt.from(this[_3].bufferedBody)}get bodyUsed(){return!1}async buffer(){return this[_3].bufferedBody}async arrayBuffer(){return OOt(this[_3].bufferedBody)}async text(){return this[_3].bufferedBody.toString()}async json(){return JSON.parse(await this.text())}clone(){let{url:t,status:r,statusText:n,headers:i,httpVersion:o,decoded:a,counter:l}=this;return new e(this[_3].bufferedBody,{url:t,status:r,statusText:n,headers:i,httpVersion:o,decoded:a,counter:l})}get[Symbol.toStringTag](){return this.constructor.name}},UOt=s(async e=>{let t=await e.buffer(),{url:r,status:n,statusText:i,headers:o,httpVersion:a,decoded:l,counter:c}=e;return new eme(t,{url:r,status:n,statusText:i,headers:o,httpVersion:a,decoded:l,counter:c})},"cacheableResponse");Eje.exports={cacheableResponse:UOt}});var q$=H((Sjn,Tje)=>{"use strict";d();var tme=class extends Error{static{s(this,"RequestAbortedError")}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};Tje.exports={RequestAbortedError:tme}});var kje=H((Bjn,Rje)=>{"use strict";d();var _je=require("http"),Sje=require("https"),{Readable:qOt}=require("stream"),B2=gE()("helix-fetch:h1"),{RequestAbortedError:wje}=q$(),{decodeStream:WOt}=S2(),GOt=s((e,t)=>{let{h1:r,options:{h1:n,rejectUnauthorized:i}}=e;return t==="https:"?r.httpsAgent?r.httpsAgent:n||typeof i=="boolean"?(r.httpsAgent=new Sje.Agent(typeof i=="boolean"?{...n||{},rejectUnauthorized:i}:n),r.httpsAgent):void 0:r.httpAgent?r.httpAgent:n?(r.httpAgent=new _je.Agent(n),r.httpAgent):void 0},"getAgent"),HOt=s(e=>{e.h1={}},"setupContext"),jOt=s(async({h1:e})=>{e.httpAgent&&(B2("resetContext: destroying httpAgent"),e.httpAgent.destroy(),delete e.httpAgent),e.httpsAgent&&(B2("resetContext: destroying httpsAgent"),e.httpsAgent.destroy(),delete e.httpsAgent)},"resetContext"),VOt=s((e,t,r)=>{let{statusCode:n,statusMessage:i,httpVersion:o,httpVersionMajor:a,httpVersionMinor:l,headers:c}=e,u=t?WOt(n,c,e,r):e;return{statusCode:n,statusText:i,httpVersion:o,httpVersionMajor:a,httpVersionMinor:l,headers:c,readable:u,decoded:!!(t&&u!==e)}},"createResponse"),$Ot=s(async(e,t,r)=>{let{request:n}=t.protocol==="https:"?Sje:_je,i=GOt(e,t.protocol),o={...r,agent:i},{socket:a,body:l}=o;return a&&(delete o.socket,a.assigned||(a.assigned=!0,i?o.agent=new Proxy(i,{get:s((c,u)=>u==="createConnection"&&!a.inUse?(f,m)=>{B2(`agent reusing socket #${a.id} (${a.servername})`),a.inUse=!0,m(null,a)}:c[u],"get")}):o.createConnection=(c,u)=>{B2(`reusing socket #${a.id} (${a.servername})`),a.inUse=!0,u(null,a)})),new Promise((c,u)=>{B2(`${o.method} ${t.href}`);let f,{signal:m}=o,h=s(()=>{m.removeEventListener("abort",h),a&&!a.inUse&&(B2(`discarding redundant socket used for ALPN: #${a.id} ${a.servername}`),a.destroy()),u(new wje),f&&f.abort()},"onAbortSignal");if(m){if(m.aborted){u(new wje);return}m.addEventListener("abort",h)}f=n(t,o),f.once("response",p=>{m&&m.removeEventListener("abort",h),a&&!a.inUse&&(B2(`discarding redundant socket used for ALPN: #${a.id} ${a.servername}`),a.destroy()),c(VOt(p,o.decode,u))}),f.once("error",p=>{m&&m.removeEventListener("abort",h),a&&!a.inUse&&(B2(`discarding redundant socket used for ALPN: #${a.id} ${a.servername}`),a.destroy()),f.aborted||(B2(`${o.method} ${t.href} failed with: ${p.message}`),f.abort(),u(p))}),l instanceof qOt?l.pipe(f):(l&&f.write(l),f.end())})},"h1Request");Rje.exports={request:$Ot,setupContext:HOt,resetContext:jOt}});var Nje=H((Njn,Pje)=>{"use strict";d();var{connect:zOt,constants:YOt}=require("http2"),{Readable:KOt}=require("stream"),Ss=gE()("helix-fetch:h2"),{RequestAbortedError:Bje}=q$(),{decodeStream:JOt}=S2(),{NGHTTP2_CANCEL:XB}=YOt,XOt=5*60*1e3,ZOt=5e3,eUt=s(e=>{e.h2={sessionCache:{}}},"setupContext"),tUt=s(async({h2:e})=>Promise.all(Object.values(e.sessionCache).map(t=>new Promise(r=>{t.on("close",r),Ss(`resetContext: destroying session (socket #${t.socket&&t.socket.id}, ${t.socket&&t.socket.servername})`),t.destroy()}))),"resetContext"),Dje=s((e,t,r,n=()=>{})=>{let i={...e},o=i[":status"];delete i[":status"];let a=r?JOt(o,e,t,n):t;return{statusCode:o,statusText:"",httpVersion:"2.0",httpVersionMajor:2,httpVersionMinor:0,headers:i,readable:a,decoded:!!(r&&a!==t)}},"createResponse"),rUt=s((e,t,r,n,i,o)=>{let{options:{h2:{pushPromiseHandler:a,pushHandler:l,pushedStreamIdleTimeout:c=ZOt}}}=e,u=i[":path"],f=`${t}${u}`;Ss(`received PUSH_PROMISE: ${f}, stream #${n.id}, headers: ${JSON.stringify(i)}, flags: ${o}`),a&&a(f,i,s(()=>{n.close(XB)},"rejectPush")),n.on("push",(m,h)=>{Ss(`received push headers for ${t}${u}, stream #${n.id}, headers: ${JSON.stringify(m)}, flags: ${h}`),n.setTimeout(c,()=>{Ss(`closing pushed stream #${n.id} after ${c} ms of inactivity`),n.close(XB)}),l&&l(f,i,Dje(m,n,r))}),n.on("aborted",()=>{Ss(`pushed stream #${n.id} aborted`)}),n.on("error",m=>{Ss(`pushed stream #${n.id} encountered error: ${m}`)}),n.on("frameError",(m,h,p)=>{Ss(`pushed stream #${n.id} encountered frameError: type: ${m}, code: ${h}, id: ${p}`)})},"handlePush"),nUt=s(async(e,t,r)=>{let{origin:n,pathname:i,search:o,hash:a}=t,l=`${i}${o}${a}`,{options:{h2:c={}},h2:{sessionCache:u}}=e,{idleSessionTimeout:f=XOt,pushPromiseHandler:m,pushHandler:h}=c,p={...r},{method:g,headers:y,socket:x,body:b,decode:E}=p;return x&&delete p.socket,y.host&&(y[":authority"]=y.host,delete y.host),new Promise((_,k)=>{let B=u[n];if(!B||B.closed||B.destroyed){let ee=!(e.options.rejectUnauthorized===!1||c.rejectUnauthorized===!1),G={...c,rejectUnauthorized:ee};x&&!x.inUse&&(G.createConnection=()=>(Ss(`reusing socket #${x.id} (${x.servername})`),x.inUse=!0,x)),B=zOt(n,{...G,settings:{enablePush:!!(m||h)}}),B.setMaxListeners(1e3),B.setTimeout(f,()=>{Ss(`closing session ${n} after ${f} ms of inactivity`),B.close()}),B.once("connect",()=>{Ss(`session ${n} established`),Ss(`caching session ${n}`),u[n]=B}),B.on("localSettings",ie=>{Ss(`session ${n} localSettings: ${JSON.stringify(ie)}`)}),B.on("remoteSettings",ie=>{Ss(`session ${n} remoteSettings: ${JSON.stringify(ie)}`)}),B.once("close",()=>{Ss(`session ${n} closed`),u[n]===B&&(Ss(`discarding cached session ${n}`),delete u[n])}),B.once("error",ie=>{Ss(`session ${n} encountered error: ${ie}`),u[n]===B&&(Ss(`discarding cached session ${n}`),delete u[n])}),B.on("frameError",(ie,z,j)=>{Ss(`session ${n} encountered frameError: type: ${ie}, code: ${z}, id: ${j}`)}),B.once("goaway",(ie,z,j)=>{Ss(`session ${n} received GOAWAY frame: errorCode: ${ie}, lastStreamID: ${z}, opaqueData: ${j?j.toString():void 0}`)}),B.on("stream",(ie,z,j)=>{rUt(e,n,E,ie,z,j)})}else x&&x.id!==B.socket.id&&!x.inUse&&(Ss(`discarding redundant socket used for ALPN: #${x.id} ${x.servername}`),x.destroy());Ss(`${g} ${t.host}${l}`);let N,{signal:M}=p,Z=s(()=>{M.removeEventListener("abort",Z),k(new Bje),N&&N.close(XB)},"onAbortSignal");if(M){if(M.aborted){k(new Bje);return}M.addEventListener("abort",Z)}let he=s(ee=>{Ss(`session ${n} encountered error during ${p.method} ${t.href}: ${ee}`),k(ee)},"onSessionError");B.once("error",he),N=B.request({":method":g,":path":l,...y}),N.once("response",ee=>{B.off("error",he),M&&M.removeEventListener("abort",Z),_(Dje(ee,N,p.decode,k))}),N.once("error",ee=>{B.off("error",he),M&&M.removeEventListener("abort",Z),N.rstCode!==XB&&(Ss(`${p.method} ${t.href} failed with: ${ee.message}`),N.close(XB),k(ee))}),N.once("frameError",(ee,G,q)=>{B.off("error",he),Ss(`encountered frameError during ${p.method} ${t.href}: type: ${ee}, code: ${G}, id: ${q}`)}),N.on("push",(ee,G)=>{Ss(`received 'push' event: headers: ${JSON.stringify(ee)}, flags: ${G}`)}),b instanceof KOt?b.pipe(N):(b&&N.write(b),N.end())})},"request");Pje.exports={request:nUt,setupContext:eUt,resetContext:tUt}});var Fje=H((Mjn,Lje)=>{"use strict";d();var{EventEmitter:iUt}=require("events"),oUt=s(()=>{let e={},t=new iUt;return t.setMaxListeners(0),{acquire:s(r=>new Promise(n=>{if(!e[r]){e[r]=!0,n();return}let i=s(o=>{e[r]||(e[r]=!0,t.removeListener(r,i),n(o))},"tryAcquire");t.on(r,i)}),"acquire"),release:s((r,n)=>{Reflect.deleteProperty(e,r),setImmediate(()=>t.emit(r,n))},"release")}},"lock");Lje.exports=oUt});var Mje=H((Ujn,sUt)=>{sUt.exports={name:"@adobe/helix-fetch",version:"3.1.1",description:"Light-weight Fetch implementation transparently supporting both HTTP/1(.1) and HTTP/2",main:"src/index.js",scripts:{test:"nyc mocha",lint:"./node_modules/.bin/eslint .","semantic-release":"semantic-release"},mocha:{timeout:"5000",recursive:"true",reporter:"mocha-multi-reporters","reporter-options":"configFile=.mocha-multi.json"},engines:{node:">=12.0"},types:"src/index.d.ts",exports:{import:"./src/index.mjs",require:"./src/index.js"},repository:{type:"git",url:"https://github.com/adobe/helix-fetch"},author:"",license:"Apache-2.0",bugs:{url:"https://github.com/adobe/helix-fetch/issues"},homepage:"https://github.com/adobe/helix-fetch#readme",keywords:["fetch","whatwg","Fetch API","http","https","http2","h2","promise","async","request","RFC 7234","7234","caching","cache"],dependencies:{debug:"4.3.4","http-cache-semantics":"^4.1.1","lru-cache":"7.13.1"},devDependencies:{"@adobe/eslint-config-helix":"1.3.2","@semantic-release/changelog":"6.0.1","@semantic-release/git":"10.0.1",chai:"4.3.6","chai-as-promised":"7.1.1","chai-bytes":"0.1.2","chai-iterator":"3.0.2",eslint:"8.21.0","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","formdata-node":"4.3.3","lint-staged":"13.0.3",mocha:"10.0.0","mocha-multi-reporters":"1.5.1",nock:"13.2.9",nyc:"15.1.0","parse-cache-control":"1.0.1",pem:"1.14.6",proxy:"^1.0.2","semantic-release":"19.0.3",sinon:"14.0.0","stream-buffers":"3.0.2",tunnel:"^0.0.6"},"lint-staged":{"*.js":"eslint"},config:{commitizen:{path:"node_modules/cz-conventional-changelog"},ghooks:{"pre-commit":"npx lint-staged"}}}});var Wje=H((qjn,qje)=>{"use strict";d();var{Readable:aUt}=require("stream"),lUt=require("tls"),{types:{isAnyArrayBuffer:cUt}}=require("util"),uUt=Hde(),rme=gE()("helix-fetch:core"),{RequestAbortedError:W$}=q$(),nme=kje(),G$=Nje(),fUt=Fje(),{isPlainObject:dUt}=S2(),{isFormData:mUt,FormDataSerializer:hUt}=JB(),{version:pUt}=Mje(),ime="h2",ome="h2c",sme="http/1.0",CE="http/1.1",gUt=100,AUt=60*60*1e3,yUt=[ime,CE,sme],CUt=`helix-fetch/${pUt}`,xUt={method:"GET",compress:!0,decode:!0},Qje=0,Oje=fUt(),Uje=s((e,t)=>new Promise((r,n)=>{let{signal:i}=t,o,a=s(()=>{i.removeEventListener("abort",a);let u=new W$;n(u),o&&o.destroy(u)},"onAbortSignal");if(i){if(i.aborted){n(new W$);return}i.addEventListener("abort",a)}let l=+e.port||443,c=s(u=>{i&&i.removeEventListener("abort",a),u instanceof W$||(rme(`connecting to ${e.hostname}:${l} failed with: ${u.message}`),n(u))},"onError");o=lUt.connect(l,e.hostname,t),o.once("secureConnect",()=>{i&&i.removeEventListener("abort",a),o.off("error",c),Qje+=1,o.id=Qje,o.secureConnecting=!1,rme(`established TLS connection: #${o.id} (${o.servername})`),r(o)}),o.once("error",c)}),"connectTLS"),vUt=s(async(e,t)=>{let r=await Oje.acquire(e.origin);try{return r||(r=await Uje(e,t)),r}finally{Oje.release(e.origin,r)}},"connect"),bUt=s(async(e,t,r)=>{let n=`${t.protocol}//${t.host}`,i=e.alpnCache.get(n);if(i)return{protocol:i};switch(t.protocol){case"http:":return i=CE,e.alpnCache.set(n,i),{protocol:i};case"http2:":return i=ome,e.alpnCache.set(n,i),{protocol:i};case"https:":break;default:throw new TypeError(`unsupported protocol: ${t.protocol}`)}let{options:{rejectUnauthorized:o,h1:a={},h2:l={}}}=e,c=!(o===!1||a.rejectUnauthorized===!1||l.rejectUnauthorized===!1),u={servername:t.hostname,ALPNProtocols:e.alpnProtocols,signal:r,rejectUnauthorized:c};e.options.ca&&(u.ca=e.options.ca);let f=await vUt(t,u);return i=f.alpnProtocol,i||(i=CE),e.alpnCache.set(n,i),{protocol:i,socket:f}},"determineProtocol"),EUt=s(e=>{let t={};return Object.keys(e).forEach(r=>{t[r.toLowerCase()]=e[r]}),t},"sanitizeHeaders"),IUt=s(async(e,t,r,n)=>{let i=t.protocol==="https:",o;t.port?o=t.port:i?o=443:o=80;let a={...r,host:t.host,hostname:t.hostname,port:o},l=await e(a);if(i){let u={...a,ALPNProtocols:n};u.socket=l,u.servername=a.host;let f=await Uje(t,u);return{protocol:f.alpnProtocol||CE,socket:f}}return{protocol:l.alpnProtocol||CE,socket:l}},"getProtocolAndSocketFromFactory"),TUt=s(async(e,t,r)=>{let n=new URL(t),i={...xUt,...r||{}};typeof i.method=="string"&&(i.method=i.method.toUpperCase()),i.headers=EUt(i.headers||{}),i.headers.host===void 0&&(i.headers.host=n.host),e.userAgent&&i.headers["user-agent"]===void 0&&(i.headers["user-agent"]=e.userAgent);let o;if(i.body instanceof URLSearchParams)o="application/x-www-form-urlencoded; charset=utf-8",i.body=i.body.toString();else if(mUt(i.body)){let u=new hUt(i.body);o=u.contentType(),i.body=u.stream(),i.headers["transfer-encoding"]===void 0&&i.headers["content-length"]===void 0&&(i.headers["content-length"]=String(u.length()))}else typeof i.body=="string"||i.body instanceof String?o="text/plain; charset=utf-8":dUt(i.body)?(i.body=JSON.stringify(i.body),o="application/json"):cUt(i.body)&&(i.body=Buffer.from(i.body));i.headers["content-type"]===void 0&&o!==void 0&&(i.headers["content-type"]=o),i.body!=null&&(i.body instanceof aUt||(!(typeof i.body=="string"||i.body instanceof String)&&!Buffer.isBuffer(i.body)&&(i.body=String(i.body)),i.headers["transfer-encoding"]===void 0&&i.headers["content-length"]===void 0&&(i.headers["content-length"]=String(Buffer.isBuffer(i.body)?i.body.length:Buffer.byteLength(i.body,"utf-8"))))),i.headers.accept===void 0&&(i.headers.accept="*/*"),i.body==null&&["POST","PUT"].includes(i.method)&&(i.headers["content-length"]="0"),i.compress&&i.headers["accept-encoding"]===void 0&&(i.headers["accept-encoding"]="gzip,deflate,br");let{signal:a}=i,{protocol:l,socket:c=null}=e.socketFactory?await IUt(e.socketFactory,n,i,e.alpnProtocols):await bUt(e,n,a);switch(rme(`${n.host} -> ${l}`),l){case ime:try{return await G$.request(e,n,c?{...i,socket:c}:i)}catch(u){let{code:f,message:m}=u;throw f==="ERR_HTTP2_ERROR"&&m==="Protocol error"&&e.alpnCache.delete(`${n.protocol}//${n.host}`),u}case ome:return G$.request(e,new URL(`http://${n.host}${n.pathname}${n.hash}${n.search}`),c?{...i,socket:c}:i);case sme:case CE:return nme.request(e,n,c?{...i,socket:c}:i);default:throw new TypeError(`unsupported protocol: ${l}`)}},"request"),wUt=s(async e=>(e.alpnCache.clear(),Promise.all([nme.resetContext(e),G$.resetContext(e)])),"resetContext"),_Ut=s(e=>{let{options:{alpnProtocols:t=yUt,alpnCacheTTL:r=AUt,alpnCacheSize:n=gUt,userAgent:i=CUt,socketFactory:o}}=e;e.alpnProtocols=t,e.alpnCache=new uUt({max:n,ttl:r}),e.userAgent=i,e.socketFactory=o,nme.setupContext(e),G$.setupContext(e)},"setupContext");qje.exports={request:TUt,setupContext:_Ut,resetContext:wUt,RequestAbortedError:W$,ALPN_HTTP2:ime,ALPN_HTTP2C:ome,ALPN_HTTP1_1:CE,ALPN_HTTP1_0:sme}});var Hje=H((Hjn,Gje)=>{"use strict";d();var SUt=gE()("helix-fetch:core"),{request:RUt,setupContext:kUt,resetContext:BUt,RequestAbortedError:DUt,ALPN_HTTP2:PUt,ALPN_HTTP2C:NUt,ALPN_HTTP1_1:LUt,ALPN_HTTP1_0:FUt}=Wje(),ame=class e{static{s(this,"RequestContext")}constructor(t){this.options={...t||{}},kUt(this)}api(){return{request:s(async(t,r)=>this.request(t,r),"request"),context:s((t={})=>new e(t).api(),"context"),setCA:s(t=>this.setCA(t),"setCA"),reset:s(async()=>this.reset(),"reset"),RequestAbortedError:DUt,ALPN_HTTP2:PUt,ALPN_HTTP2C:NUt,ALPN_HTTP1_1:LUt,ALPN_HTTP1_0:FUt}}async request(t,r){return RUt(this,t,r)}setCA(t){this.options.ca=t}async reset(){return SUt("resetting context"),BUt(this)}};Gje.exports=new ame().api()});var Yje=H(($jn,zje)=>{"use strict";d();var{EventEmitter:MUt}=require("events"),{Readable:ZB}=require("stream"),lme=gE()("helix-fetch"),QUt=Hde(),{Body:OUt}=N$(),{Headers:dme}=WT(),{Request:xE}=hje(),{Response:ume}=Jde(),{FetchBaseError:UUt,FetchError:eD,AbortError:H$}=$de(),{AbortController:qUt,AbortSignal:WUt,TimeoutSignal:GUt}=zde(),HUt=vje(),{cacheableResponse:jUt}=Ije(),{sizeof:VUt}=S2(),{isFormData:$Ut}=JB(),{context:zUt,RequestAbortedError:YUt}=Hje(),jje=["GET","HEAD"],KUt=500,JUt=100*1024*1024,cme="push",Vje=s(async(e,t,r)=>{let{request:n}=e.context,i=t instanceof xE&&typeof r>"u"?t:new xE(t,r),{method:o,body:a,signal:l,compress:c,decode:u,follow:f,redirect:m,init:{body:h}}=i,p;if(l&&l.aborted){let B=new H$("The operation was aborted.");throw i.init.body instanceof ZB&&i.init.body.destroy(B),B}try{p=await n(i.url,{...r,method:o,headers:i.headers.plain(),body:h&&!(h instanceof ZB)&&!$Ut(h)?h:a,compress:c,decode:u,follow:f,redirect:m,signal:l})}catch(B){throw h instanceof ZB&&h.destroy(B),B instanceof TypeError?B:B instanceof YUt?new H$("The operation was aborted."):new eD(B.message,"system",B)}let g=s(()=>{l.removeEventListener("abort",g);let B=new H$("The operation was aborted.");i.init.body instanceof ZB&&i.init.body.destroy(B),p.readable.emit("error",B)},"abortHandler");l&&l.addEventListener("abort",g);let{statusCode:y,statusText:x,httpVersion:b,headers:E,readable:_,decoded:k}=p;if([301,302,303,307,308].includes(y)){let{location:B}=E,N=B==null?null:new URL(B,i.url);switch(i.redirect){case"manual":break;case"error":throw l&&l.removeEventListener("abort",g),new eD(`uri requested responds with a redirect, redirect mode is set to 'error': ${i.url}`,"no-redirect");case"follow":{if(N===null)break;if(i.counter>=i.follow)throw l&&l.removeEventListener("abort",g),new eD(`maximum redirect reached at: ${i.url}`,"max-redirect");let M={headers:new dme(i.headers),follow:i.follow,compress:i.compress,decode:i.decode,counter:i.counter+1,method:i.method,body:i.body,signal:i.signal};if(y!==303&&i.body&&i.init.body instanceof ZB)throw l&&l.removeEventListener("abort",g),new eD("Cannot follow redirect with body being a readable stream","unsupported-redirect");return(y===303||(y===301||y===302)&&i.method==="POST")&&(M.method="GET",M.body=void 0,M.headers.delete("content-length")),l&&l.removeEventListener("abort",g),Vje(e,new xE(N,M))}default:}}return l&&(_.once("end",()=>{l.removeEventListener("abort",g)}),_.once("error",()=>{l.removeEventListener("abort",g)})),new ume(_,{url:i.url,status:y,statusText:x,headers:E,httpVersion:b,decoded:k,counter:i.counter})},"fetch"),$je=s(async(e,t,r)=>{if(e.options.maxCacheSize===0||!jje.includes(t.method))return r;let n=new HUt(t,r,{shared:!1});if(n.storable()){let i=await jUt(r);return e.cache.set(t.url,{policy:n,response:i},n.timeToLive()),i}else return r},"cacheResponse"),XUt=s(async(e,t,r)=>{let n=new xE(t,r);if(e.options.maxCacheSize!==0&&jje.includes(n.method)&&!["no-store","reload"].includes(n.cache)){let{policy:a,response:l}=e.cache.get(n.url)||{};if(a&&a.satisfiesWithoutRevalidation(n)){l.headers=new dme(a.responseHeaders(l));let c=l.clone();return c.fromCache=!0,c}}let o=await Vje(e,n);return n.cache!=="no-store"?$je(e,n,o):o},"cachingFetch"),ZUt=s((e,t={})=>{let r=new URL(e);if(typeof t!="object"||Array.isArray(t))throw new TypeError("qs: object expected");return Object.entries(t).forEach(([n,i])=>{Array.isArray(i)?i.forEach(o=>r.searchParams.append(n,o)):r.searchParams.append(n,i)}),r.href},"createUrl"),eqt=s(e=>new GUt(e),"timeoutSignal"),fme=class e{static{s(this,"FetchContext")}constructor(t){this.options={...t};let{maxCacheSize:r}=this.options,n=typeof r=="number"&&r>=0?r:JUt,i=KUt;n===0&&(n=1,i=1);let o=s(({response:l},c)=>VUt(l),"sizeCalculation");this.cache=new QUt({max:i,maxSize:n,sizeCalculation:o}),this.eventEmitter=new MUt,this.options.h2=this.options.h2||{},typeof this.options.h2.enablePush>"u"&&(this.options.h2.enablePush=!0);let{enablePush:a}=this.options.h2;a&&(this.options.h2.pushPromiseHandler=(l,c,u)=>{let f={...c};Object.keys(f).filter(m=>m.startsWith(":")).forEach(m=>delete f[m]),this.pushPromiseHandler(l,f,u)},this.options.h2.pushHandler=(l,c,u)=>{let f={...c};Object.keys(f).filter(b=>b.startsWith(":")).forEach(b=>delete f[b]);let{statusCode:m,statusText:h,httpVersion:p,headers:g,readable:y,decoded:x}=u;this.pushHandler(l,f,new ume(y,{url:l,status:m,statusText:h,headers:g,httpVersion:p,decoded:x}))}),this.context=zUt(this.options)}api(){return{fetch:s(async(t,r)=>this.fetch(t,r),"fetch"),Body:OUt,Headers:dme,Request:xE,Response:ume,AbortController:qUt,AbortSignal:WUt,FetchBaseError:UUt,FetchError:eD,AbortError:H$,context:s((t={})=>new e(t).api(),"context"),setCA:s(t=>this.setCA(t),"setCA"),noCache:s((t={})=>new e({...t,maxCacheSize:0}).api(),"noCache"),h1:s((t={})=>new e({...t,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),"h1"),keepAlive:s((t={})=>new e({...t,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),"keepAlive"),h1NoCache:s((t={})=>new e({...t,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),"h1NoCache"),keepAliveNoCache:s((t={})=>new e({...t,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),"keepAliveNoCache"),reset:s(async()=>this.context.reset(),"reset"),onPush:s(t=>this.onPush(t),"onPush"),offPush:s(t=>this.offPush(t),"offPush"),createUrl:ZUt,timeoutSignal:eqt,clearCache:s(()=>this.clearCache(),"clearCache"),cacheStats:s(()=>this.cacheStats(),"cacheStats"),ALPN_HTTP2:this.context.ALPN_HTTP2,ALPN_HTTP2C:this.context.ALPN_HTTP2C,ALPN_HTTP1_1:this.context.ALPN_HTTP1_1,ALPN_HTTP1_0:this.context.ALPN_HTTP1_0}}async fetch(t,r){return XUt(this,t,r)}setCA(t){this.options.ca=t,this.context.setCA(t)}onPush(t){return this.eventEmitter.on(cme,t)}offPush(t){return this.eventEmitter.off(cme,t)}clearCache(){this.cache.clear()}cacheStats(){return{size:this.cache.calculatedSize,count:this.cache.size}}pushPromiseHandler(t,r,n){lme(`received server push promise: ${t}, headers: ${JSON.stringify(r)}`);let i=new xE(t,{headers:r}),{policy:o}=this.cache.get(t)||{};o&&o.satisfiesWithoutRevalidation(i)&&(lme(`already cached, reject push promise: ${t}, headers: ${JSON.stringify(r)}`),n())}async pushHandler(t,r,n){lme(`caching resource pushed by server: ${t}, reqHeaders: ${JSON.stringify(r)}, status: ${n.status}, respHeaders: ${JSON.stringify(n.headers)}`);let i=await $je(this,new xE(t,{headers:r}),n);this.eventEmitter.emit(cme,t,i)}};zje.exports=new fme().api()});var Jje=H((Kjn,Kje)=>{"use strict";d();Kje.exports=Yje()});var q$e=H((isi,U$e)=>{d();U$e.exports=O$e;O$e.sync=sHt;var M$e=require("fs");function oHt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(oHt,"checkPathExt");function Q$e(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:oHt(t,r)}s(Q$e,"checkStat");function O$e(e,t,r){M$e.stat(e,function(n,i){r(n,n?!1:Q$e(i,e,t))})}s(O$e,"isexe");function sHt(e,t){return Q$e(M$e.statSync(e),e,t)}s(sHt,"sync")});var V$e=H((asi,j$e)=>{d();j$e.exports=G$e;G$e.sync=aHt;var W$e=require("fs");function G$e(e,t,r){W$e.stat(e,function(n,i){r(n,n?!1:H$e(i,t))})}s(G$e,"isexe");function aHt(e,t){return H$e(W$e.statSync(e),t)}s(aHt,"sync");function H$e(e,t){return e.isFile()&&lHt(e,t)}s(H$e,"checkStat");function lHt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),l=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),f=l|c,m=r&u||r&c&&i===a||r&l&&n===o||r&f&&o===0;return m}s(lHt,"checkMode")});var z$e=H((fsi,$$e)=>{d();var usi=require("fs"),qz;process.platform==="win32"||global.TESTING_WINDOWS?qz=q$e():qz=V$e();$$e.exports=Kme;Kme.sync=cHt;function Kme(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){Kme(e,t||{},function(o,a){o?i(o):n(a)})})}qz(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(Kme,"isexe");function cHt(e,t){try{return qz.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(cHt,"sync")});var tze=H((hsi,eze)=>{d();var ow=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Y$e=require("path"),uHt=ow?";":":",K$e=z$e(),J$e=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),X$e=s((e,t)=>{let r=t.colon||uHt,n=e.match(/\//)||ow&&e.match(/\\/)?[""]:[...ow?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=ow?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=ow?i.split(r):[""];return ow&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Z$e=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=X$e(e,t),a=[],l=s(u=>new Promise((f,m)=>{if(u===n.length)return t.all&&a.length?f(a):m(J$e(e));let h=n[u],p=/^".*"$/.test(h)?h.slice(1,-1):h,g=Y$e.join(p,e),y=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,u,0))}),"step"),c=s((u,f,m)=>new Promise((h,p)=>{if(m===i.length)return h(l(f+1));let g=i[m];K$e(u+g,{pathExt:o},(y,x)=>{if(!y&&x)if(t.all)a.push(u+g);else return h(u+g);return h(c(u,f,m+1))})}),"subStep");return r?l(0).then(u=>r(null,u),r):l(0)},"which"),fHt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=X$e(e,t),o=[];for(let a=0;a<r.length;a++){let l=r[a],c=/^".*"$/.test(l)?l.slice(1,-1):l,u=Y$e.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let m=0;m<n.length;m++){let h=f+n[m];try{if(K$e.sync(h,{pathExt:i}))if(t.all)o.push(h);else return h}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw J$e(e)},"whichSync");eze.exports=Z$e;Z$e.sync=fHt});var nze=H((Asi,Jme)=>{"use strict";d();var rze=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");Jme.exports=rze;Jme.exports.default=rze});var aze=H((xsi,sze)=>{"use strict";d();var ize=require("path"),dHt=tze(),mHt=nze();function oze(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=dHt.sync(e.command,{path:r[mHt({env:r})],pathExt:t?ize.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=ize.resolve(i?e.options.cwd:"",a)),a}s(oze,"resolveCommandAttempt");function hHt(e){return oze(e)||oze(e,!0)}s(hHt,"resolveCommand");sze.exports=hHt});var lze=H((Esi,Zme)=>{"use strict";d();var Xme=/([()\][%!^"`<>&|;, *?])/g;function pHt(e){return e=e.replace(Xme,"^$1"),e}s(pHt,"escapeCommand");function gHt(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Xme,"^$1"),t&&(e=e.replace(Xme,"^$1")),e}s(gHt,"escapeArgument");Zme.exports.command=pHt;Zme.exports.argument=gHt});var uze=H((wsi,cze)=>{"use strict";d();cze.exports=/^#!(.*)/});var dze=H((Ssi,fze)=>{"use strict";d();var AHt=uze();fze.exports=(e="")=>{let t=e.match(AHt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var hze=H((ksi,mze)=>{"use strict";d();var ehe=require("fs"),yHt=dze();function CHt(e){let r=Buffer.alloc(150),n;try{n=ehe.openSync(e,"r"),ehe.readSync(n,r,0,150,0),ehe.closeSync(n)}catch{}return yHt(r.toString())}s(CHt,"readShebang");mze.exports=CHt});var yze=H((Psi,Aze)=>{"use strict";d();var xHt=require("path"),pze=aze(),gze=lze(),vHt=hze(),bHt=process.platform==="win32",EHt=/\.(?:com|exe)$/i,IHt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function THt(e){e.file=pze(e);let t=e.file&&vHt(e.file);return t?(e.args.unshift(e.file),e.command=t,pze(e)):e.file}s(THt,"detectShebang");function wHt(e){if(!bHt)return e;let t=THt(e),r=!EHt.test(t);if(e.options.forceShell||r){let n=IHt.test(t);e.command=xHt.normalize(e.command),e.command=gze.command(e.command),e.args=e.args.map(o=>gze.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(wHt,"parseNonShell");function _Ht(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:wHt(n)}s(_Ht,"parse");Aze.exports=_Ht});var vze=H((Fsi,xze)=>{"use strict";d();var the=process.platform==="win32";function rhe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(rhe,"notFoundError");function SHt(e,t){if(!the)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Cze(i,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(SHt,"hookChildProcess");function Cze(e,t){return the&&e===1&&!t.file?rhe(t.original,"spawn"):null}s(Cze,"verifyENOENT");function RHt(e,t){return the&&e===1&&!t.file?rhe(t.original,"spawnSync"):null}s(RHt,"verifyENOENTSync");xze.exports={hookChildProcess:SHt,verifyENOENT:Cze,verifyENOENTSync:RHt,notFoundError:rhe}});var Ize=H((Osi,sw)=>{"use strict";d();var bze=require("child_process"),nhe=yze(),ihe=vze();function Eze(e,t,r){let n=nhe(e,t,r),i=bze.spawn(n.command,n.args,n.options);return ihe.hookChildProcess(i,n),i}s(Eze,"spawn");function kHt(e,t,r){let n=nhe(e,t,r),i=bze.spawnSync(n.command,n.args,n.options);return i.error=i.error||ihe.verifyENOENTSync(i.status,n),i}s(kHt,"spawnSync");sw.exports=Eze;sw.exports.spawn=Eze;sw.exports.sync=kHt;sw.exports._parse=nhe;sw.exports._enoent=ihe});var tjt={};K1(tjt,{getTokenizer:()=>Do,getTokenizerAsync:()=>Oxe,main:()=>cYe});module.exports=NKe(tjt);d();d();age().install();d();d();var U7="github.copilot";d();d();var Hp=class{static{s(this,"Clock")}now(){return new Date}};d();var ON=Ze(n5());function dJ(e){return(0,ON.SHA256)(ON.enc.Utf16.parse(e.prefix+e.suffix)).toString()}s(dJ,"keyForPrompt");var un=class{constructor(t=10){this.valueMap=new Map;this.lruKeys=[];this.sizeLimit=t}static{s(this,"LRUCacheMap")}set(t,r){let n;return this.valueMap.has(t)?n=t:this.lruKeys.length>=this.sizeLimit&&(n=this.lruKeys[0]),n!==void 0&&this.delete(n),this.valueMap.set(t,r),this.touchKeyInLRU(t),this}get(t){if(this.valueMap.has(t)){let r=this.valueMap.get(t);return this.touchKeyInLRU(t),r}}delete(t){return this.has(t)?this.deleteKey(t):!1}clear(){this.valueMap.clear(),this.lruKeys=[]}get size(){return this.valueMap.size}keys(){return this.lruKeys.slice().values()}values(){return new Map(this.valueMap).values()}entries(){return new Map(this.valueMap).entries()}[Symbol.iterator](){return this.entries()}has(t){return this.valueMap.has(t)}forEach(t,r){new Map(this.valueMap).forEach(t,r)}get[Symbol.toStringTag](){return"LRUCacheMap"}peek(t){return this.valueMap.get(t)}deleteKey(t){let r=!1;return this.removeKeyFromLRU(t),this.valueMap.get(t)!==void 0&&(r=this.valueMap.delete(t)),r}removeKeyFromLRU(t){let r=this.lruKeys.indexOf(t);r!==-1&&this.lruKeys.splice(r,1)}touchKeyInLRU(t){this.removeKeyFromLRU(t),this.lruKeys.push(t)}};d();d();d();d();var as=class extends Error{static{s(this,"CopilotAuthError")}constructor(t,r){super(t,{cause:r}),this.name="CopilotAuthError"}};d();var pd="X-Copilot-RelatedPluginVersion-",W7=(U=>(U.Market="X-MSEdge-Market",U.CorpNet="X-FD-Corpnet",U.Build="X-VSCode-Build",U.ApplicationVersion="X-VSCode-AppVersion",U.TargetPopulation="X-VSCode-TargetPopulation",U.ClientId="X-MSEdge-ClientId",U.ExtensionName="X-VSCode-ExtensionName",U.ExtensionVersion="X-VSCode-ExtensionVersion",U.ExtensionRelease="X-VSCode-ExtensionRelease",U.Language="X-VSCode-Language",U.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",U.CopilotEngine="X-Copilot-Engine",U.CopilotOverrideEngine="X-Copilot-OverrideEngine",U.CopilotRepository="X-Copilot-Repository",U.CopilotFileType="X-Copilot-FileType",U.CopilotUserKind="X-Copilot-UserKind",U.CopilotDogfood="X-Copilot-Dogfood",U.CopilotCustomModel="X-Copilot-CustomModel",U.CopilotOrgs="X-Copilot-Orgs",U.CopilotCustomModelNames="X-Copilot-CustomModelNames",U.CopilotTrackingId="X-Copilot-CopilotTrackingId",U.CopilotClientVersion="X-Copilot-ClientVersion",U.CopilotRelatedPluginVersionCppTools=pd+"msvscodecpptools",U.CopilotRelatedPluginVersionCMakeTools=pd+"msvscodecmaketools",U.CopilotRelatedPluginVersionMakefileTools=pd+"msvscodemakefiletools",U.CopilotRelatedPluginVersionCSharpDevKit=pd+"msdotnettoolscsdevkit",U.CopilotRelatedPluginVersionPython=pd+"mspythonpython",U.CopilotRelatedPluginVersionPylance=pd+"mspythonvscodepylance",U.CopilotRelatedPluginVersionJavaPack=pd+"vscjavavscodejavapack",U.CopilotRelatedPluginVersionTypescript=pd+"vscodetypescriptlanguagefeatures",U.CopilotRelatedPluginVersionTypescriptNext=pd+"msvscodevscodetypescriptnext",U.CopilotRelatedPluginVersionCSharp=pd+"msdotnettoolscsharp",U))(W7||{});var CJe={"X-Copilot-ClientTimeBucket":"timeBucket","X-Copilot-OverrideEngine":"engine","X-Copilot-Repository":"repo","X-Copilot-FileType":"fileType","X-Copilot-UserKind":"userKind"},Fx=class e{constructor(t){this.filters=t;for(let[r,n]of Object.entries(this.filters))n===""&&delete this.filters[r]}static{s(this,"FilterSettings")}extends(t){for(let[r,n]of Object.entries(t.filters))if(this.filters[r]!==n)return!1;return!0}addToTelemetry(t){for(let[r,n]of Object.entries(this.filters)){let i=CJe[r];i!==void 0&&(t.properties[i]=n)}}stringify(){let t=Object.keys(this.filters);return t.sort(),t.map(r=>`${r}:${this.filters[r]}`).join(";")}toHeaders(){return{...this.filters}}withChange(t,r){return new e({...this.filters,[t]:r})}};d();var fn=class{static{s(this,"Fetcher")}#e;set rejectUnauthorized(t){this.#e=t}get rejectUnauthorized(){return this.#e}},G7=class extends Error{static{s(this,"HttpTimeoutError")}constructor(t,r){super(t,{cause:r}),this.name="HttpTimeoutError"}};function kc(e){return!e||typeof e!="object"?!1:e instanceof G7||"name"in e&&e.name==="AbortError"||"code"in e&&e.code==="ABORT_ERR"}s(kc,"isAbortError");var uI=class extends SyntaxError{constructor(r,n){super(r);this.code=n;this.name="JsonParseError"}static{s(this,"JsonParseError")}},Mx=class extends Error{static{s(this,"FetchResponseError")}constructor(t){super(`HTTP ${t.status} ${t.statusText}`),this.name="FetchResponseError",this.code=`HTTP${t.status}`}},xJe=new Set(["ECONNABORTED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ENOTCONN","ENOTFOUND","ETIMEDOUT","ERR_HTTP2_STREAM_ERROR","ERR_SSL_BAD_DECRYPT","ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC","ERR_SSL_INVALID_LIBRARY_(0)","ERR_SSL_SSLV3_ALERT_BAD_RECORD_MAC","ERR_SSL_WRONG_VERSION_NUMBER","ERR_STREAM_PREMATURE_CLOSE","ERR_TLS_CERT_ALTNAME_INVALID"]);function H7(e,t=!0){return e instanceof Error?t&&"cause"in e&&H7(e.cause,!1)?!0:e.name==="EditorFetcherError"||e.name==="FetchError"||e instanceof uI||e instanceof Mx||e?.message?.startsWith("net::")||xJe.has(e.code??""):!1}s(H7,"isNetworkError");var i5=class{constructor(t,r,n,i,o){this.status=t;this.statusText=r;this.headers=n;this.getText=i;this.getBody=o;this.ok=this.status>=200&&this.status<300;this.clientError=this.status>=400&&this.status<500}static{s(this,"Response")}async text(){return this.getText()}async json(){let t=await this.text(),r=this.headers.get("content-type");if(!r||!r.includes("json"))throw new uI(`Response content-type is ${r??"missing"} (status=${this.status})`,`ContentType=${r}`);try{return JSON.parse(t)}catch(n){if(n instanceof SyntaxError){let i=n.message.match(/^(.*?) in JSON at position (\d+)(?: \(line \d+ column \d+\))?$/);if(i&&parseInt(i[2],10)==t.length||n.message==="Unexpected end of JSON input"){let o=new TextEncoder().encode(t).length,a=this.headers.get("content-length");throw a===null?new uI(`Response body truncated: actualLength=${o}`,"Truncated"):new uI(`Response body truncated: actualLength=${o}, headerLength=${a}`,"Truncated")}}throw n}}body(){return this.getBody()}};function Qx(e,t,r,n,i,o,a,l,c){let u={...l,Authorization:`Bearer ${r}`,"X-Request-Id":i,"Openai-Organization":"github-copilot","VScode-SessionId":e.get(Ds).sessionId,"VScode-MachineId":e.get(Ds).machineId,...Vu(e),"X-GitHub-Api-Version":Vm};n&&(u["OpenAI-Intent"]=n);let f={method:"POST",headers:u,json:o,timeout:c},m=e.get(fn);if(a){let p=m.makeAbortController();a.onCancellationRequested(()=>{jt(e,"networking.cancelRequest",dn.createAndMarkAsIssued({headerRequestId:i})),p.abort()}),f.signal=p.signal}return m.fetch(t,f).catch(p=>{if(vJe(p))return jt(e,"networking.disconnectAll"),m.disconnectAll().then(()=>m.fetch(t,f));throw p})}s(Qx,"postRequest");function vJe(e){return e instanceof Error?e.message=="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in e?e.code=="ECONNRESET"||e.code=="ETIMEDOUT"||e.code=="ERR_HTTP2_INVALID_SESSION":!1:!1}s(vJe,"isInterruptedNetworkError");d();d();d();d();d();d();d();var Bc={};K1(Bc,{HasPropertyKey:()=>UN,IsArray:()=>Ca,IsAsyncIterator:()=>mJ,IsBigInt:()=>j7,IsBoolean:()=>Z1,IsDate:()=>Ox,IsFunction:()=>hJ,IsIterator:()=>pJ,IsNull:()=>gJ,IsNumber:()=>$u,IsObject:()=>wo,IsRegExp:()=>V7,IsString:()=>qo,IsSymbol:()=>AJ,IsUint8Array:()=>eA,IsUndefined:()=>xa});d();function UN(e,t){return t in e}s(UN,"HasPropertyKey");function mJ(e){return wo(e)&&!Ca(e)&&!eA(e)&&Symbol.asyncIterator in e}s(mJ,"IsAsyncIterator");function Ca(e){return Array.isArray(e)}s(Ca,"IsArray");function j7(e){return typeof e=="bigint"}s(j7,"IsBigInt");function Z1(e){return typeof e=="boolean"}s(Z1,"IsBoolean");function Ox(e){return e instanceof globalThis.Date}s(Ox,"IsDate");function hJ(e){return typeof e=="function"}s(hJ,"IsFunction");function pJ(e){return wo(e)&&!Ca(e)&&!eA(e)&&Symbol.iterator in e}s(pJ,"IsIterator");function gJ(e){return e===null}s(gJ,"IsNull");function $u(e){return typeof e=="number"}s($u,"IsNumber");function wo(e){return typeof e=="object"&&e!==null}s(wo,"IsObject");function V7(e){return e instanceof globalThis.RegExp}s(V7,"IsRegExp");function qo(e){return typeof e=="string"}s(qo,"IsString");function AJ(e){return typeof e=="symbol"}s(AJ,"IsSymbol");function eA(e){return e instanceof globalThis.Uint8Array}s(eA,"IsUint8Array");function xa(e){return e===void 0}s(xa,"IsUndefined");function bJe(e){return e.map(t=>qN(t))}s(bJe,"ArrayType");function EJe(e){return new Date(e.getTime())}s(EJe,"DateType");function IJe(e){return new Uint8Array(e)}s(IJe,"Uint8ArrayType");function TJe(e){return new RegExp(e.source,e.flags)}s(TJe,"RegExpType");function wJe(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=qN(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=qN(e[r]);return t}s(wJe,"ObjectType");function qN(e){return Ca(e)?bJe(e):Ox(e)?EJe(e):eA(e)?IJe(e):V7(e)?TJe(e):wo(e)?wJe(e):e}s(qN,"Visit");function ls(e){return qN(e)}s(ls,"Clone");function fI(e,t){return t===void 0?ls(e):ls({...t,...e})}s(fI,"CloneType");d();d();d();function WN(e){return ui(e)&&globalThis.Symbol.asyncIterator in e}s(WN,"IsAsyncIterator");function GN(e){return ui(e)&&globalThis.Symbol.iterator in e}s(GN,"IsIterator");function yJ(e){return ui(e)&&(globalThis.Object.getPrototypeOf(e)===Object.prototype||globalThis.Object.getPrototypeOf(e)===null)}s(yJ,"IsStandardObject");function HN(e){return e instanceof globalThis.Promise}s(HN,"IsPromise");function d0(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}s(d0,"IsDate");function p1e(e){return e instanceof globalThis.Map}s(p1e,"IsMap");function g1e(e){return e instanceof globalThis.Set}s(g1e,"IsSet");function gd(e){return globalThis.ArrayBuffer.isView(e)}s(gd,"IsTypedArray");function dI(e){return e instanceof globalThis.Uint8Array}s(dI,"IsUint8Array");function yn(e,t){return t in e}s(yn,"HasPropertyKey");function ui(e){return e!==null&&typeof e=="object"}s(ui,"IsObject");function Cn(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}s(Cn,"IsArray");function cs(e){return e===void 0}s(cs,"IsUndefined");function tA(e){return e===null}s(tA,"IsNull");function jp(e){return typeof e=="boolean"}s(jp,"IsBoolean");function Xr(e){return typeof e=="number"}s(Xr,"IsNumber");function jN(e){return globalThis.Number.isInteger(e)}s(jN,"IsInteger");function tc(e){return typeof e=="bigint"}s(tc,"IsBigInt");function Ui(e){return typeof e=="string"}s(Ui,"IsString");function o5(e){return typeof e=="function"}s(o5,"IsFunction");function rA(e){return typeof e=="symbol"}s(rA,"IsSymbol");function zu(e){return tc(e)||jp(e)||tA(e)||Xr(e)||Ui(e)||rA(e)||cs(e)}s(zu,"IsValueType");var Yo;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(a,l){return e.ExactOptionalPropertyTypes?l in a:a[l]!==void 0}s(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){let l=ui(a);return e.AllowArrayObject?l:l&&!Cn(a)}s(r,"IsObjectLike"),e.IsObjectLike=r;function n(a){return r(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}s(n,"IsRecordLike"),e.IsRecordLike=n;function i(a){return e.AllowNaN?Xr(a):Number.isFinite(a)}s(i,"IsNumberLike"),e.IsNumberLike=i;function o(a){let l=cs(a);return e.AllowNullVoid?l||a===null:l}s(o,"IsVoidLike"),e.IsVoidLike=o})(Yo||(Yo={}));d();function _Je(e){return globalThis.Object.freeze(e).map(t=>$7(t))}s(_Je,"ImmutableArray");function SJe(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=$7(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=$7(e[r]);return globalThis.Object.freeze(t)}s(SJe,"ImmutableObject");function $7(e){return Ca(e)?_Je(e):Ox(e)?e:eA(e)?e:V7(e)?e:wo(e)?SJe(e):e}s($7,"Immutable");function ut(e,t){let r=t!==void 0?{...t,...e}:e;switch(Yo.InstanceMode){case"freeze":return $7(r);case"clone":return ls(r);default:return r}}s(ut,"CreateType");d();var xn=class extends Error{static{s(this,"TypeBoxError")}constructor(t){super(t)}};d();d();d();var Ps=Symbol.for("TypeBox.Transform"),$m=Symbol.for("TypeBox.Readonly"),rc=Symbol.for("TypeBox.Optional"),Ad=Symbol.for("TypeBox.Hint"),ot=Symbol.for("TypeBox.Kind");function mI(e){return wo(e)&&e[$m]==="Readonly"}s(mI,"IsReadonly");function Y0(e){return wo(e)&&e[rc]==="Optional"}s(Y0,"IsOptional");function CJ(e){return Bi(e,"Any")}s(CJ,"IsAny");function xJ(e){return Bi(e,"Argument")}s(xJ,"IsArgument");function zm(e){return Bi(e,"Array")}s(zm,"IsArray");function Ux(e){return Bi(e,"AsyncIterator")}s(Ux,"IsAsyncIterator");function qx(e){return Bi(e,"BigInt")}s(qx,"IsBigInt");function nA(e){return Bi(e,"Boolean")}s(nA,"IsBoolean");function Ym(e){return Bi(e,"Computed")}s(Ym,"IsComputed");function Km(e){return Bi(e,"Constructor")}s(Km,"IsConstructor");function RJe(e){return Bi(e,"Date")}s(RJe,"IsDate");function Jm(e){return Bi(e,"Function")}s(Jm,"IsFunction");function Xm(e){return Bi(e,"Integer")}s(Xm,"IsInteger");function $s(e){return Bi(e,"Intersect")}s($s,"IsIntersect");function Wx(e){return Bi(e,"Iterator")}s(Wx,"IsIterator");function Bi(e,t){return wo(e)&&ot in e&&e[ot]===t}s(Bi,"IsKindOf");function VN(e){return Z1(e)||$u(e)||qo(e)}s(VN,"IsLiteralValue");function Yu(e){return Bi(e,"Literal")}s(Yu,"IsLiteral");function Ku(e){return Bi(e,"MappedKey")}s(Ku,"IsMappedKey");function us(e){return Bi(e,"MappedResult")}s(us,"IsMappedResult");function s5(e){return Bi(e,"Never")}s(s5,"IsNever");function kJe(e){return Bi(e,"Not")}s(kJe,"IsNot");function z7(e){return Bi(e,"Null")}s(z7,"IsNull");function Zm(e){return Bi(e,"Number")}s(Zm,"IsNumber");function va(e){return Bi(e,"Object")}s(va,"IsObject");function Gx(e){return Bi(e,"Promise")}s(Gx,"IsPromise");function Hx(e){return Bi(e,"Record")}s(Hx,"IsRecord");function ra(e){return Bi(e,"Ref")}s(ra,"IsRef");function vJ(e){return Bi(e,"RegExp")}s(vJ,"IsRegExp");function iA(e){return Bi(e,"String")}s(iA,"IsString");function Y7(e){return Bi(e,"Symbol")}s(Y7,"IsSymbol");function Ju(e){return Bi(e,"TemplateLiteral")}s(Ju,"IsTemplateLiteral");function BJe(e){return Bi(e,"This")}s(BJe,"IsThis");function oo(e){return wo(e)&&Ps in e}s(oo,"IsTransform");function Xu(e){return Bi(e,"Tuple")}s(Xu,"IsTuple");function oA(e){return Bi(e,"Undefined")}s(oA,"IsUndefined");function qi(e){return Bi(e,"Union")}s(qi,"IsUnion");function DJe(e){return Bi(e,"Uint8Array")}s(DJe,"IsUint8Array");function PJe(e){return Bi(e,"Unknown")}s(PJe,"IsUnknown");function NJe(e){return Bi(e,"Unsafe")}s(NJe,"IsUnsafe");function LJe(e){return Bi(e,"Void")}s(LJe,"IsVoid");function a5(e){return wo(e)&&ot in e&&qo(e[ot])}s(a5,"IsKind");function Ns(e){return CJ(e)||xJ(e)||zm(e)||nA(e)||qx(e)||Ux(e)||Ym(e)||Km(e)||RJe(e)||Jm(e)||Xm(e)||$s(e)||Wx(e)||Yu(e)||Ku(e)||us(e)||s5(e)||kJe(e)||z7(e)||Zm(e)||va(e)||Gx(e)||Hx(e)||ra(e)||vJ(e)||iA(e)||Y7(e)||Ju(e)||BJe(e)||Xu(e)||oA(e)||qi(e)||DJe(e)||PJe(e)||NJe(e)||LJe(e)||a5(e)}s(Ns,"IsSchema");var Qe={};K1(Qe,{IsAny:()=>x1e,IsArgument:()=>v1e,IsArray:()=>b1e,IsAsyncIterator:()=>E1e,IsBigInt:()=>I1e,IsBoolean:()=>T1e,IsComputed:()=>w1e,IsConstructor:()=>_1e,IsDate:()=>S1e,IsFunction:()=>R1e,IsImport:()=>qJe,IsInteger:()=>k1e,IsIntersect:()=>B1e,IsIterator:()=>D1e,IsKind:()=>iAe,IsKindOf:()=>Ai,IsLiteral:()=>J7,IsLiteralBoolean:()=>WJe,IsLiteralNumber:()=>N1e,IsLiteralString:()=>P1e,IsLiteralValue:()=>L1e,IsMappedKey:()=>F1e,IsMappedResult:()=>M1e,IsNever:()=>Q1e,IsNot:()=>O1e,IsNull:()=>U1e,IsNumber:()=>q1e,IsObject:()=>W1e,IsOptional:()=>UJe,IsPromise:()=>G1e,IsProperties:()=>$N,IsReadonly:()=>OJe,IsRecord:()=>H1e,IsRecursive:()=>GJe,IsRef:()=>j1e,IsRegExp:()=>V1e,IsSchema:()=>ds,IsString:()=>$1e,IsSymbol:()=>z1e,IsTemplateLiteral:()=>Y1e,IsThis:()=>K1e,IsTransform:()=>J1e,IsTuple:()=>X1e,IsUint8Array:()=>eAe,IsUndefined:()=>Z1e,IsUnion:()=>TJ,IsUnionLiteral:()=>HJe,IsUnknown:()=>tAe,IsUnsafe:()=>rAe,IsVoid:()=>nAe,TypeGuardUnknownTypeError:()=>bJ});d();var bJ=class extends xn{static{s(this,"TypeGuardUnknownTypeError")}},FJe=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function A1e(e){try{return new RegExp(e),!0}catch{return!1}}s(A1e,"IsPattern");function EJ(e){if(!qo(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}s(EJ,"IsControlCharacterFree");function y1e(e){return IJ(e)||ds(e)}s(y1e,"IsAdditionalProperties");function K7(e){return xa(e)||j7(e)}s(K7,"IsOptionalBigInt");function Wo(e){return xa(e)||$u(e)}s(Wo,"IsOptionalNumber");function IJ(e){return xa(e)||Z1(e)}s(IJ,"IsOptionalBoolean");function _o(e){return xa(e)||qo(e)}s(_o,"IsOptionalString");function MJe(e){return xa(e)||qo(e)&&EJ(e)&&A1e(e)}s(MJe,"IsOptionalPattern");function QJe(e){return xa(e)||qo(e)&&EJ(e)}s(QJe,"IsOptionalFormat");function C1e(e){return xa(e)||ds(e)}s(C1e,"IsOptionalSchema");function OJe(e){return wo(e)&&e[$m]==="Readonly"}s(OJe,"IsReadonly");function UJe(e){return wo(e)&&e[rc]==="Optional"}s(UJe,"IsOptional");function x1e(e){return Ai(e,"Any")&&_o(e.$id)}s(x1e,"IsAny");function v1e(e){return Ai(e,"Argument")&&$u(e.index)}s(v1e,"IsArgument");function b1e(e){return Ai(e,"Array")&&e.type==="array"&&_o(e.$id)&&ds(e.items)&&Wo(e.minItems)&&Wo(e.maxItems)&&IJ(e.uniqueItems)&&C1e(e.contains)&&Wo(e.minContains)&&Wo(e.maxContains)}s(b1e,"IsArray");function E1e(e){return Ai(e,"AsyncIterator")&&e.type==="AsyncIterator"&&_o(e.$id)&&ds(e.items)}s(E1e,"IsAsyncIterator");function I1e(e){return Ai(e,"BigInt")&&e.type==="bigint"&&_o(e.$id)&&K7(e.exclusiveMaximum)&&K7(e.exclusiveMinimum)&&K7(e.maximum)&&K7(e.minimum)&&K7(e.multipleOf)}s(I1e,"IsBigInt");function T1e(e){return Ai(e,"Boolean")&&e.type==="boolean"&&_o(e.$id)}s(T1e,"IsBoolean");function w1e(e){return Ai(e,"Computed")&&qo(e.target)&&Ca(e.parameters)&&e.parameters.every(t=>ds(t))}s(w1e,"IsComputed");function _1e(e){return Ai(e,"Constructor")&&e.type==="Constructor"&&_o(e.$id)&&Ca(e.parameters)&&e.parameters.every(t=>ds(t))&&ds(e.returns)}s(_1e,"IsConstructor");function S1e(e){return Ai(e,"Date")&&e.type==="Date"&&_o(e.$id)&&Wo(e.exclusiveMaximumTimestamp)&&Wo(e.exclusiveMinimumTimestamp)&&Wo(e.maximumTimestamp)&&Wo(e.minimumTimestamp)&&Wo(e.multipleOfTimestamp)}s(S1e,"IsDate");function R1e(e){return Ai(e,"Function")&&e.type==="Function"&&_o(e.$id)&&Ca(e.parameters)&&e.parameters.every(t=>ds(t))&&ds(e.returns)}s(R1e,"IsFunction");function qJe(e){return Ai(e,"Import")&&UN(e,"$defs")&&wo(e.$defs)&&$N(e.$defs)&&UN(e,"$ref")&&qo(e.$ref)&&e.$ref in e.$defs}s(qJe,"IsImport");function k1e(e){return Ai(e,"Integer")&&e.type==="integer"&&_o(e.$id)&&Wo(e.exclusiveMaximum)&&Wo(e.exclusiveMinimum)&&Wo(e.maximum)&&Wo(e.minimum)&&Wo(e.multipleOf)}s(k1e,"IsInteger");function $N(e){return wo(e)&&Object.entries(e).every(([t,r])=>EJ(t)&&ds(r))}s($N,"IsProperties");function B1e(e){return Ai(e,"Intersect")&&!(qo(e.type)&&e.type!=="object")&&Ca(e.allOf)&&e.allOf.every(t=>ds(t)&&!J1e(t))&&_o(e.type)&&(IJ(e.unevaluatedProperties)||C1e(e.unevaluatedProperties))&&_o(e.$id)}s(B1e,"IsIntersect");function D1e(e){return Ai(e,"Iterator")&&e.type==="Iterator"&&_o(e.$id)&&ds(e.items)}s(D1e,"IsIterator");function Ai(e,t){return wo(e)&&ot in e&&e[ot]===t}s(Ai,"IsKindOf");function P1e(e){return J7(e)&&qo(e.const)}s(P1e,"IsLiteralString");function N1e(e){return J7(e)&&$u(e.const)}s(N1e,"IsLiteralNumber");function WJe(e){return J7(e)&&Z1(e.const)}s(WJe,"IsLiteralBoolean");function J7(e){return Ai(e,"Literal")&&_o(e.$id)&&L1e(e.const)}s(J7,"IsLiteral");function L1e(e){return Z1(e)||$u(e)||qo(e)}s(L1e,"IsLiteralValue");function F1e(e){return Ai(e,"MappedKey")&&Ca(e.keys)&&e.keys.every(t=>$u(t)||qo(t))}s(F1e,"IsMappedKey");function M1e(e){return Ai(e,"MappedResult")&&$N(e.properties)}s(M1e,"IsMappedResult");function Q1e(e){return Ai(e,"Never")&&wo(e.not)&&Object.getOwnPropertyNames(e.not).length===0}s(Q1e,"IsNever");function O1e(e){return Ai(e,"Not")&&ds(e.not)}s(O1e,"IsNot");function U1e(e){return Ai(e,"Null")&&e.type==="null"&&_o(e.$id)}s(U1e,"IsNull");function q1e(e){return Ai(e,"Number")&&e.type==="number"&&_o(e.$id)&&Wo(e.exclusiveMaximum)&&Wo(e.exclusiveMinimum)&&Wo(e.maximum)&&Wo(e.minimum)&&Wo(e.multipleOf)}s(q1e,"IsNumber");function W1e(e){return Ai(e,"Object")&&e.type==="object"&&_o(e.$id)&&$N(e.properties)&&y1e(e.additionalProperties)&&Wo(e.minProperties)&&Wo(e.maxProperties)}s(W1e,"IsObject");function G1e(e){return Ai(e,"Promise")&&e.type==="Promise"&&_o(e.$id)&&ds(e.item)}s(G1e,"IsPromise");function H1e(e){return Ai(e,"Record")&&e.type==="object"&&_o(e.$id)&&y1e(e.additionalProperties)&&wo(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&A1e(r[0])&&wo(t.patternProperties)&&ds(t.patternProperties[r[0]])})(e)}s(H1e,"IsRecord");function GJe(e){return wo(e)&&Ad in e&&e[Ad]==="Recursive"}s(GJe,"IsRecursive");function j1e(e){return Ai(e,"Ref")&&_o(e.$id)&&qo(e.$ref)}s(j1e,"IsRef");function V1e(e){return Ai(e,"RegExp")&&_o(e.$id)&&qo(e.source)&&qo(e.flags)&&Wo(e.maxLength)&&Wo(e.minLength)}s(V1e,"IsRegExp");function $1e(e){return Ai(e,"String")&&e.type==="string"&&_o(e.$id)&&Wo(e.minLength)&&Wo(e.maxLength)&&MJe(e.pattern)&&QJe(e.format)}s($1e,"IsString");function z1e(e){return Ai(e,"Symbol")&&e.type==="symbol"&&_o(e.$id)}s(z1e,"IsSymbol");function Y1e(e){return Ai(e,"TemplateLiteral")&&e.type==="string"&&qo(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}s(Y1e,"IsTemplateLiteral");function K1e(e){return Ai(e,"This")&&_o(e.$id)&&qo(e.$ref)}s(K1e,"IsThis");function J1e(e){return wo(e)&&Ps in e}s(J1e,"IsTransform");function X1e(e){return Ai(e,"Tuple")&&e.type==="array"&&_o(e.$id)&&$u(e.minItems)&&$u(e.maxItems)&&e.minItems===e.maxItems&&(xa(e.items)&&xa(e.additionalItems)&&e.minItems===0||Ca(e.items)&&e.items.every(t=>ds(t)))}s(X1e,"IsTuple");function Z1e(e){return Ai(e,"Undefined")&&e.type==="undefined"&&_o(e.$id)}s(Z1e,"IsUndefined");function HJe(e){return TJ(e)&&e.anyOf.every(t=>P1e(t)||N1e(t))}s(HJe,"IsUnionLiteral");function TJ(e){return Ai(e,"Union")&&_o(e.$id)&&wo(e)&&Ca(e.anyOf)&&e.anyOf.every(t=>ds(t))}s(TJ,"IsUnion");function eAe(e){return Ai(e,"Uint8Array")&&e.type==="Uint8Array"&&_o(e.$id)&&Wo(e.minByteLength)&&Wo(e.maxByteLength)}s(eAe,"IsUint8Array");function tAe(e){return Ai(e,"Unknown")&&_o(e.$id)}s(tAe,"IsUnknown");function rAe(e){return Ai(e,"Unsafe")}s(rAe,"IsUnsafe");function nAe(e){return Ai(e,"Void")&&e.type==="void"&&_o(e.$id)}s(nAe,"IsVoid");function iAe(e){return wo(e)&&ot in e&&qo(e[ot])&&!FJe.includes(e[ot])}s(iAe,"IsKind");function ds(e){return wo(e)&&(x1e(e)||v1e(e)||b1e(e)||T1e(e)||I1e(e)||E1e(e)||w1e(e)||_1e(e)||S1e(e)||R1e(e)||k1e(e)||B1e(e)||D1e(e)||J7(e)||F1e(e)||M1e(e)||Q1e(e)||O1e(e)||U1e(e)||q1e(e)||W1e(e)||G1e(e)||H1e(e)||j1e(e)||V1e(e)||$1e(e)||z1e(e)||Y1e(e)||K1e(e)||X1e(e)||Z1e(e)||TJ(e)||eAe(e)||tAe(e)||rAe(e)||nAe(e)||iAe(e))}s(ds,"IsSchema");d();var wJ="(true|false)",X7="(0|[1-9][0-9]*)",_J="(.*)",jJe="(?!.*)",czt=`^${wJ}$`,Vp=`^${X7}$`,$p=`^${_J}$`,oAe=`^${jJe}$`;d();var eh={};K1(eh,{Clear:()=>$Je,Delete:()=>zJe,Entries:()=>VJe,Get:()=>JJe,Has:()=>YJe,Set:()=>KJe});d();var hI=new Map;function VJe(){return new Map(hI)}s(VJe,"Entries");function $Je(){return hI.clear()}s($Je,"Clear");function zJe(e){return hI.delete(e)}s(zJe,"Delete");function YJe(e){return hI.has(e)}s(YJe,"Has");function KJe(e,t){hI.set(e,t)}s(KJe,"Set");function JJe(e){return hI.get(e)}s(JJe,"Get");var m0={};K1(m0,{Clear:()=>ZJe,Delete:()=>eXe,Entries:()=>XJe,Get:()=>nXe,Has:()=>tXe,Set:()=>rXe});d();var pI=new Map;function XJe(){return new Map(pI)}s(XJe,"Entries");function ZJe(){return pI.clear()}s(ZJe,"Clear");function eXe(e){return pI.delete(e)}s(eXe,"Delete");function tXe(e){return pI.has(e)}s(tXe,"Has");function rXe(e,t){pI.set(e,t)}s(rXe,"Set");function nXe(e){return pI.get(e)}s(nXe,"Get");d();function sAe(e,t){return e.includes(t)}s(sAe,"SetIncludes");function aAe(e){return[...new Set(e)]}s(aAe,"SetDistinct");function iXe(e,t){return e.filter(r=>t.includes(r))}s(iXe,"SetIntersect");function oXe(e,t){return e.reduce((r,n)=>iXe(r,n),t)}s(oXe,"SetIntersectManyResolve");function lAe(e){return e.length===1?e[0]:e.length>1?oXe(e.slice(1),e[0]):[]}s(lAe,"SetIntersectMany");function cAe(e){let t=[];for(let r of e)t.push(...r);return t}s(cAe,"SetUnionMany");d();function l5(e){return ut({[ot]:"Any"},e)}s(l5,"Any");d();function gI(e,t){return ut({[ot]:"Array",type:"array",items:e},t)}s(gI,"Array");d();function uAe(e){return ut({[ot]:"Argument",index:e})}s(uAe,"Argument");d();function AI(e,t){return ut({[ot]:"AsyncIterator",type:"AsyncIterator",items:e},t)}s(AI,"AsyncIterator");d();d();function Ko(e,t,r){return ut({[ot]:"Computed",target:e,parameters:t},r)}s(Ko,"Computed");d();d();function sXe(e,t){let{[t]:r,...n}=e;return n}s(sXe,"DiscardKey");function zs(e,t){return t.reduce((r,n)=>sXe(r,n),e)}s(zs,"Discard");d();function ni(e){return ut({[ot]:"Never",not:{}},e)}s(ni,"Never");d();d();function zi(e){return ut({[ot]:"MappedResult",properties:e})}s(zi,"MappedResult");d();d();function yI(e,t,r){return ut({[ot]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}s(yI,"Constructor");d();function zp(e,t,r){return ut({[ot]:"Function",type:"Function",parameters:e,returns:t},r)}s(zp,"Function");d();d();d();d();function Z7(e,t){return ut({[ot]:"Union",anyOf:e},t)}s(Z7,"UnionCreate");function aXe(e){return e.some(t=>Y0(t))}s(aXe,"IsUnionOptional");function fAe(e){return e.map(t=>Y0(t)?lXe(t):t)}s(fAe,"RemoveOptionalFromRest");function lXe(e){return zs(e,[rc])}s(lXe,"RemoveOptionalFromType");function cXe(e,t){return aXe(e)?Dc(Z7(fAe(e),t)):Z7(fAe(e),t)}s(cXe,"ResolveUnion");function Yp(e,t){return e.length===1?ut(e[0],t):e.length===0?ni(t):cXe(e,t)}s(Yp,"UnionEvaluated");d();function so(e,t){return e.length===0?ni(t):e.length===1?ut(e[0],t):Z7(e,t)}s(so,"Union");d();d();d();var zN=class extends xn{static{s(this,"TemplateLiteralParserError")}};function uXe(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}s(uXe,"Unescape");function SJ(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}s(SJ,"IsNonEscaped");function aA(e,t){return SJ(e,t,"(")}s(aA,"IsOpenParen");function e_(e,t){return SJ(e,t,")")}s(e_,"IsCloseParen");function dAe(e,t){return SJ(e,t,"|")}s(dAe,"IsSeparator");function fXe(e){if(!(aA(e,0)&&e_(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(aA(e,r)&&(t+=1),e_(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}s(fXe,"IsGroup");function dXe(e){return e.slice(1,e.length-1)}s(dXe,"InGroup");function mXe(e){let t=0;for(let r=0;r<e.length;r++)if(aA(e,r)&&(t+=1),e_(e,r)&&(t-=1),dAe(e,r)&&t===0)return!0;return!1}s(mXe,"IsPrecedenceOr");function hXe(e){for(let t=0;t<e.length;t++)if(aA(e,t))return!0;return!1}s(hXe,"IsPrecedenceAnd");function pXe(e){let[t,r]=[0,0],n=[];for(let o=0;o<e.length;o++)if(aA(e,o)&&(t+=1),e_(e,o)&&(t-=1),dAe(e,o)&&t===0){let a=e.slice(r,o);a.length>0&&n.push(CI(a)),r=o+1}let i=e.slice(r);return i.length>0&&n.push(CI(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}s(pXe,"Or");function gXe(e){function t(i,o){if(!aA(i,o))throw new zN("TemplateLiteralParser: Index must point to open parens");let a=0;for(let l=o;l<i.length;l++)if(aA(i,l)&&(a+=1),e_(i,l)&&(a-=1),a===0)return[o,l];throw new zN("TemplateLiteralParser: Unclosed group parens in expression")}s(t,"Group");function r(i,o){for(let a=o;a<i.length;a++)if(aA(i,a))return[o,a];return[o,i.length]}s(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(aA(e,i)){let[o,a]=t(e,i),l=e.slice(o,a+1);n.push(CI(l)),i=a}else{let[o,a]=r(e,i),l=e.slice(o,a);l.length>0&&n.push(CI(l)),i=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}s(gXe,"And");function CI(e){return fXe(e)?CI(dXe(e)):mXe(e)?pXe(e):hXe(e)?gXe(e):{type:"const",const:uXe(e)}}s(CI,"TemplateLiteralParse");function xI(e){return CI(e.slice(1,e.length-1))}s(xI,"TemplateLiteralParseExact");var RJ=class extends xn{static{s(this,"TemplateLiteralFiniteError")}};function AXe(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}s(AXe,"IsNumberExpression");function yXe(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}s(yXe,"IsBooleanExpression");function CXe(e){return e.type==="const"&&e.const===".*"}s(CXe,"IsStringExpression");function jx(e){return AXe(e)||CXe(e)?!1:yXe(e)?!0:e.type==="and"?e.expr.every(t=>jx(t)):e.type==="or"?e.expr.every(t=>jx(t)):e.type==="const"?!0:(()=>{throw new RJ("Unknown expression type")})()}s(jx,"IsTemplateLiteralExpressionFinite");function YN(e){let t=xI(e.pattern);return jx(t)}s(YN,"IsTemplateLiteralFinite");d();var kJ=class extends xn{static{s(this,"TemplateLiteralGenerateError")}};function*mAe(e){if(e.length===1)return yield*e[0];for(let t of e[0])for(let r of mAe(e.slice(1)))yield`${t}${r}`}s(mAe,"GenerateReduce");function*xXe(e){return yield*mAe(e.expr.map(t=>[...t_(t)]))}s(xXe,"GenerateAnd");function*vXe(e){for(let t of e.expr)yield*t_(t)}s(vXe,"GenerateOr");function*bXe(e){return yield e.const}s(bXe,"GenerateConst");function*t_(e){return e.type==="and"?yield*xXe(e):e.type==="or"?yield*vXe(e):e.type==="const"?yield*bXe(e):(()=>{throw new kJ("Unknown expression")})()}s(t_,"TemplateLiteralExpressionGenerate");function vI(e){let t=xI(e.pattern);return jx(t)?[...t_(t)]:[]}s(vI,"TemplateLiteralGenerate");d();d();function Di(e,t){return ut({[ot]:"Literal",const:e,type:typeof e},t)}s(Di,"Literal");d();function KN(e){return ut({[ot]:"Boolean",type:"boolean"},e)}s(KN,"Boolean");d();function bI(e){return ut({[ot]:"BigInt",type:"bigint"},e)}s(bI,"BigInt");d();function yd(e){return ut({[ot]:"Number",type:"number"},e)}s(yd,"Number");d();function h0(e){return ut({[ot]:"String",type:"string"},e)}s(h0,"String");function*EXe(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield KN():t==="number"?yield yd():t==="bigint"?yield bI():t==="string"?yield h0():yield(()=>{let r=t.split("|").map(n=>Di(n.trim()));return r.length===0?ni():r.length===1?r[0]:Yp(r)})()}s(EXe,"FromUnion");function*IXe(e){if(e[1]!=="{"){let t=Di("$"),r=BJ(e.slice(1));return yield*[t,...r]}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=EXe(e.slice(2,t)),n=BJ(e.slice(t+1));return yield*[...r,...n]}yield Di(e)}s(IXe,"FromTerminal");function*BJ(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=Di(e.slice(0,t)),n=IXe(e.slice(t));return yield*[r,...n]}yield Di(e)}s(BJ,"FromSyntax");function hAe(e){return[...BJ(e)]}s(hAe,"TemplateLiteralSyntax");d();var DJ=class extends xn{static{s(this,"TemplateLiteralPatternError")}};function TXe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(TXe,"Escape");function pAe(e,t){return Ju(e)?e.pattern.slice(1,e.pattern.length-1):qi(e)?`(${e.anyOf.map(r=>pAe(r,t)).join("|")})`:Zm(e)?`${t}${X7}`:Xm(e)?`${t}${X7}`:qx(e)?`${t}${X7}`:iA(e)?`${t}${_J}`:Yu(e)?`${t}${TXe(e.const.toString())}`:nA(e)?`${t}${wJ}`:(()=>{throw new DJ(`Unexpected Kind '${e[ot]}'`)})()}s(pAe,"Visit");function PJ(e){return`^${e.map(t=>pAe(t,"")).join("")}$`}s(PJ,"TemplateLiteralPattern");d();function Vx(e){let r=vI(e).map(n=>Di(n));return Yp(r)}s(Vx,"TemplateLiteralToUnion");d();function JN(e,t){let r=qo(e)?PJ(hAe(e)):PJ(e);return ut({[ot]:"TemplateLiteral",type:"string",pattern:r},t)}s(JN,"TemplateLiteral");function wXe(e){return vI(e).map(r=>r.toString())}s(wXe,"FromTemplateLiteral");function _Xe(e){let t=[];for(let r of e)t.push(...K0(r));return t}s(_Xe,"FromUnion");function SXe(e){return[e.toString()]}s(SXe,"FromLiteral");function K0(e){return[...new Set(Ju(e)?wXe(e):qi(e)?_Xe(e.anyOf):Yu(e)?SXe(e.const):Zm(e)?["[number]"]:Xm(e)?["[number]"]:[])]}s(K0,"IndexPropertyKeys");d();function RXe(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=c5(e,K0(t[i]),r);return n}s(RXe,"FromProperties");function kXe(e,t,r){return RXe(e,t.properties,r)}s(kXe,"FromMappedResult");function gAe(e,t,r){let n=kXe(e,t,r);return zi(n)}s(gAe,"IndexFromMappedResult");function yAe(e,t){return e.map(r=>CAe(r,t))}s(yAe,"FromRest");function BXe(e){return e.filter(t=>!s5(t))}s(BXe,"FromIntersectRest");function DXe(e,t){return XN(BXe(yAe(e,t)))}s(DXe,"FromIntersect");function PXe(e){return e.some(t=>s5(t))?[]:e}s(PXe,"FromUnionRest");function NXe(e,t){return Yp(PXe(yAe(e,t)))}s(NXe,"FromUnion");function LXe(e,t){return t in e?e[t]:t==="[number]"?Yp(e):ni()}s(LXe,"FromTuple");function FXe(e,t){return t==="[number]"?e:ni()}s(FXe,"FromArray");function MXe(e,t){return t in e?e[t]:ni()}s(MXe,"FromProperty");function CAe(e,t){return $s(e)?DXe(e.allOf,t):qi(e)?NXe(e.anyOf,t):Xu(e)?LXe(e.items??[],t):zm(e)?FXe(e.items,t):va(e)?MXe(e.properties,t):ni()}s(CAe,"IndexFromPropertyKey");function r_(e,t){return t.map(r=>CAe(e,r))}s(r_,"IndexFromPropertyKeys");function AAe(e,t){return Yp(r_(e,t))}s(AAe,"FromSchema");function c5(e,t,r){if(ra(e)||ra(t)){let n="Index types using Ref parameters require both Type and Key to be of TSchema";if(!Ns(e)||!Ns(t))throw new xn(n);return Ko("Index",[e,t])}return us(t)?gAe(e,t,r):Ku(t)?xAe(e,t,r):ut(Ns(t)?AAe(e,K0(t)):AAe(e,t),r)}s(c5,"Index");function QXe(e,t,r){return{[t]:c5(e,[t],ls(r))}}s(QXe,"MappedIndexPropertyKey");function OXe(e,t,r){return t.reduce((n,i)=>({...n,...QXe(e,i,r)}),{})}s(OXe,"MappedIndexPropertyKeys");function UXe(e,t,r){return OXe(e,t.keys,r)}s(UXe,"MappedIndexProperties");function xAe(e,t,r){let n=UXe(e,t,r);return zi(n)}s(xAe,"IndexFromMappedKey");d();function EI(e,t){return ut({[ot]:"Iterator",type:"Iterator",items:e},t)}s(EI,"Iterator");d();function qXe(e){let t=[];for(let r in e)Y0(e[r])||t.push(r);return t}s(qXe,"RequiredKeys");function WXe(e,t){let r=qXe(e),n=r.length>0?{[ot]:"Object",type:"object",properties:e,required:r}:{[ot]:"Object",type:"object",properties:e};return ut(n,t)}s(WXe,"_Object");var ao=WXe;d();function ZN(e,t){return ut({[ot]:"Promise",type:"Promise",item:e},t)}s(ZN,"Promise");d();d();function GXe(e){return ut(zs(e,[$m]))}s(GXe,"RemoveReadonly");function HXe(e){return ut({...e,[$m]:"Readonly"})}s(HXe,"AddReadonly");function jXe(e,t){return t===!1?GXe(e):HXe(e)}s(jXe,"ReadonlyWithFlag");function J0(e,t){let r=t??!0;return us(e)?vAe(e,r):jXe(e,r)}s(J0,"Readonly");function VXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=J0(e[n],t);return r}s(VXe,"FromProperties");function $Xe(e,t){return VXe(e.properties,t)}s($Xe,"FromMappedResult");function vAe(e,t){let r=$Xe(e,t);return zi(r)}s(vAe,"ReadonlyFromMappedResult");d();function Cd(e,t){return ut(e.length>0?{[ot]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[ot]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}s(Cd,"Tuple");function bAe(e,t){return e in t?xd(e,t[e]):zi(t)}s(bAe,"FromMappedResult");function zXe(e){return{[e]:Di(e)}}s(zXe,"MappedKeyToKnownMappedResultProperties");function YXe(e){let t={};for(let r of e)t[r]=Di(r);return t}s(YXe,"MappedKeyToUnknownMappedResultProperties");function KXe(e,t){return sAe(t,e)?zXe(e):YXe(t)}s(KXe,"MappedKeyToMappedResultProperties");function JXe(e,t){let r=KXe(e,t);return bAe(e,r)}s(JXe,"FromMappedKey");function n_(e,t){return t.map(r=>xd(e,r))}s(n_,"FromRest");function XXe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=xd(e,t[n]);return r}s(XXe,"FromProperties");function xd(e,t){let r={...t};return Y0(t)?Dc(xd(e,zs(t,[rc]))):mI(t)?J0(xd(e,zs(t,[$m]))):us(t)?bAe(e,t.properties):Ku(t)?JXe(e,t.keys):Km(t)?yI(n_(e,t.parameters),xd(e,t.returns),r):Jm(t)?zp(n_(e,t.parameters),xd(e,t.returns),r):Ux(t)?AI(xd(e,t.items),r):Wx(t)?EI(xd(e,t.items),r):$s(t)?Pc(n_(e,t.allOf),r):qi(t)?so(n_(e,t.anyOf),r):Xu(t)?Cd(n_(e,t.items??[]),r):va(t)?ao(XXe(e,t.properties),r):zm(t)?gI(xd(e,t.items),r):Gx(t)?ZN(xd(e,t.item),r):t}s(xd,"FromSchemaType");function ZXe(e,t){let r={};for(let n of e)r[n]=xd(n,t);return r}s(ZXe,"MappedFunctionReturnType");function EAe(e,t,r){let n=Ns(e)?K0(e):e,i=t({[ot]:"MappedKey",keys:n}),o=ZXe(n,i);return ao(o,r)}s(EAe,"Mapped");d();function eZe(e){return ut(zs(e,[rc]))}s(eZe,"RemoveOptional");function tZe(e){return ut({...e,[rc]:"Optional"})}s(tZe,"AddOptional");function rZe(e,t){return t===!1?eZe(e):tZe(e)}s(rZe,"OptionalWithFlag");function Dc(e,t){let r=t??!0;return us(e)?IAe(e,r):rZe(e,r)}s(Dc,"Optional");function nZe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Dc(e[n],t);return r}s(nZe,"FromProperties");function iZe(e,t){return nZe(e.properties,t)}s(iZe,"FromMappedResult");function IAe(e,t){let r=iZe(e,t);return zi(r)}s(IAe,"OptionalFromMappedResult");d();function i_(e,t={}){let r=e.every(i=>va(i)),n=Ns(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return ut(t.unevaluatedProperties===!1||Ns(t.unevaluatedProperties)||r?{...n,[ot]:"Intersect",type:"object",allOf:e}:{...n,[ot]:"Intersect",allOf:e},t)}s(i_,"IntersectCreate");function oZe(e){return e.every(t=>Y0(t))}s(oZe,"IsIntersectOptional");function sZe(e){return zs(e,[rc])}s(sZe,"RemoveOptionalFromType");function TAe(e){return e.map(t=>Y0(t)?sZe(t):t)}s(TAe,"RemoveOptionalFromRest");function aZe(e,t){return oZe(e)?Dc(i_(TAe(e),t)):i_(TAe(e),t)}s(aZe,"ResolveIntersect");function XN(e,t={}){if(e.length===1)return ut(e[0],t);if(e.length===0)return ni(t);if(e.some(r=>oo(r)))throw new Error("Cannot intersect transform types");return aZe(e,t)}s(XN,"IntersectEvaluated");d();function Pc(e,t){if(e.length===1)return ut(e[0],t);if(e.length===0)return ni(t);if(e.some(r=>oo(r)))throw new Error("Cannot intersect transform types");return i_(e,t)}s(Pc,"Intersect");d();function vd(...e){let[t,r]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof t!="string")throw new xn("Ref: $ref must be a string");return ut({[ot]:"Ref",$ref:t},r)}s(vd,"Ref");function lZe(e,t){return Ko("Awaited",[Ko(e,t)])}s(lZe,"FromComputed");function cZe(e){return Ko("Awaited",[vd(e)])}s(cZe,"FromRef");function uZe(e){return Pc(wAe(e))}s(uZe,"FromIntersect");function fZe(e){return so(wAe(e))}s(fZe,"FromUnion");function dZe(e){return II(e)}s(dZe,"FromPromise");function wAe(e){return e.map(t=>II(t))}s(wAe,"FromRest");function II(e,t){return ut(Ym(e)?lZe(e.target,e.parameters):$s(e)?uZe(e.allOf):qi(e)?fZe(e.anyOf):Gx(e)?dZe(e.item):ra(e)?cZe(e.$ref):e,t)}s(II,"Awaited");d();d();d();d();function _Ae(e){let t=[];for(let r of e)t.push(X0(r));return t}s(_Ae,"FromRest");function mZe(e){let t=_Ae(e);return cAe(t)}s(mZe,"FromIntersect");function hZe(e){let t=_Ae(e);return lAe(t)}s(hZe,"FromUnion");function pZe(e){return e.map((t,r)=>r.toString())}s(pZe,"FromTuple");function gZe(e){return["[number]"]}s(gZe,"FromArray");function AZe(e){return globalThis.Object.getOwnPropertyNames(e)}s(AZe,"FromProperties");function yZe(e){return NJ?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}s(yZe,"FromPatternProperties");function X0(e){return $s(e)?mZe(e.allOf):qi(e)?hZe(e.anyOf):Xu(e)?pZe(e.items??[]):zm(e)?gZe(e.items):va(e)?AZe(e.properties):Hx(e)?yZe(e.patternProperties):[]}s(X0,"KeyOfPropertyKeys");var NJ=!1;function lA(e){NJ=!0;let t=X0(e);return NJ=!1,`^(${t.map(n=>`(${n})`).join("|")})$`}s(lA,"KeyOfPattern");function CZe(e,t){return Ko("KeyOf",[Ko(e,t)])}s(CZe,"FromComputed");function xZe(e){return Ko("KeyOf",[vd(e)])}s(xZe,"FromRef");function vZe(e,t){let r=X0(e),n=bZe(r),i=Yp(n);return ut(i,t)}s(vZe,"KeyOfFromType");function bZe(e){return e.map(t=>t==="[number]"?yd():Di(t))}s(bZe,"KeyOfPropertyKeysToRest");function TI(e,t){return Ym(e)?CZe(e.target,e.parameters):ra(e)?xZe(e.$ref):us(e)?SAe(e,t):vZe(e,t)}s(TI,"KeyOf");function EZe(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=TI(e[n],ls(t));return r}s(EZe,"FromProperties");function IZe(e,t){return EZe(e.properties,t)}s(IZe,"FromMappedResult");function SAe(e,t){let r=IZe(e,t);return zi(r)}s(SAe,"KeyOfFromMappedResult");d();function eL(e){let t=X0(e),r=r_(e,t);return t.map((n,i)=>[t[i],r[i]])}s(eL,"KeyOfPropertyEntries");function TZe(e){let t=[];for(let r of e)t.push(...X0(r));return aAe(t)}s(TZe,"CompositeKeys");function wZe(e){return e.filter(t=>!s5(t))}s(wZe,"FilterNever");function _Ze(e,t){let r=[];for(let n of e)r.push(...r_(n,[t]));return wZe(r)}s(_Ze,"CompositeProperty");function SZe(e,t){let r={};for(let n of t)r[n]=XN(_Ze(e,n));return r}s(SZe,"CompositeProperties");function RAe(e,t){let r=TZe(e),n=SZe(e,r);return ao(n,t)}s(RAe,"Composite");d();d();function tL(e){return ut({[ot]:"Date",type:"Date"},e)}s(tL,"Date");d();function rL(e){return ut({[ot]:"Null",type:"null"},e)}s(rL,"Null");d();function nL(e){return ut({[ot]:"Symbol",type:"symbol"},e)}s(nL,"Symbol");d();function iL(e){return ut({[ot]:"Undefined",type:"undefined"},e)}s(iL,"Undefined");d();function oL(e){return ut({[ot]:"Uint8Array",type:"Uint8Array"},e)}s(oL,"Uint8Array");d();function th(e){return ut({[ot]:"Unknown"},e)}s(th,"Unknown");function RZe(e){return e.map(t=>LJ(t,!1))}s(RZe,"FromArray");function kZe(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=J0(LJ(e[r],!1));return t}s(kZe,"FromProperties");function sL(e,t){return t===!0?e:J0(e)}s(sL,"ConditionalReadonly");function LJ(e,t){return mJ(e)?sL(l5(),t):pJ(e)?sL(l5(),t):Ca(e)?J0(Cd(RZe(e))):eA(e)?oL():Ox(e)?tL():wo(e)?sL(ao(kZe(e)),t):hJ(e)?sL(zp([],th()),t):xa(e)?iL():gJ(e)?rL():AJ(e)?nL():j7(e)?bI():$u(e)?Di(e):Z1(e)?Di(e):qo(e)?Di(e):ao({})}s(LJ,"FromValue");function kAe(e,t){return ut(LJ(e,!0),t)}s(kAe,"Const");d();function BAe(e,t){return Km(e)?Cd(e.parameters,t):ni(t)}s(BAe,"ConstructorParameters");d();function DAe(e,t){if(xa(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(o=>isNaN(o)).map(o=>e[o]),i=[...new Set(r)].map(o=>Di(o));return so(i,{...t,[Ad]:"Enum"})}s(DAe,"Enum");d();d();d();var MJ=class extends xn{static{s(this,"ExtendsResolverError")}},dt;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(dt||(dt={}));function bd(e){return e===dt.False?e:dt.True}s(bd,"IntoBooleanResult");function wI(e){throw new MJ(e)}s(wI,"Throw");function Oa(e){return Qe.IsNever(e)||Qe.IsIntersect(e)||Qe.IsUnion(e)||Qe.IsUnknown(e)||Qe.IsAny(e)}s(Oa,"IsStructuralRight");function Ua(e,t){return Qe.IsNever(t)?OAe(e,t):Qe.IsIntersect(t)?aL(e,t):Qe.IsUnion(t)?qJ(e,t):Qe.IsUnknown(t)?GAe(e,t):Qe.IsAny(t)?UJ(e,t):wI("StructuralRight")}s(Ua,"StructuralRight");function UJ(e,t){return dt.True}s(UJ,"FromAnyRight");function BZe(e,t){return Qe.IsIntersect(t)?aL(e,t):Qe.IsUnion(t)&&t.anyOf.some(r=>Qe.IsAny(r)||Qe.IsUnknown(r))?dt.True:Qe.IsUnion(t)?dt.Union:Qe.IsUnknown(t)||Qe.IsAny(t)?dt.True:dt.Union}s(BZe,"FromAny");function DZe(e,t){return Qe.IsUnknown(e)?dt.False:Qe.IsAny(e)?dt.Union:Qe.IsNever(e)?dt.True:dt.False}s(DZe,"FromArrayRight");function PZe(e,t){return Qe.IsObject(t)&&lL(t)?dt.True:Oa(t)?Ua(e,t):Qe.IsArray(t)?bd(So(e.items,t.items)):dt.False}s(PZe,"FromArray");function NZe(e,t){return Oa(t)?Ua(e,t):Qe.IsAsyncIterator(t)?bd(So(e.items,t.items)):dt.False}s(NZe,"FromAsyncIterator");function LZe(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsBigInt(t)?dt.True:dt.False}s(LZe,"FromBigInt");function MAe(e,t){return Qe.IsLiteralBoolean(e)||Qe.IsBoolean(e)?dt.True:dt.False}s(MAe,"FromBooleanRight");function FZe(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsBoolean(t)?dt.True:dt.False}s(FZe,"FromBoolean");function MZe(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsConstructor(t)?e.parameters.length>t.parameters.length?dt.False:e.parameters.every((r,n)=>bd(So(t.parameters[n],r))===dt.True)?bd(So(e.returns,t.returns)):dt.False:dt.False}s(MZe,"FromConstructor");function QZe(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsDate(t)?dt.True:dt.False}s(QZe,"FromDate");function OZe(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsFunction(t)?e.parameters.length>t.parameters.length?dt.False:e.parameters.every((r,n)=>bd(So(t.parameters[n],r))===dt.True)?bd(So(e.returns,t.returns)):dt.False:dt.False}s(OZe,"FromFunction");function QAe(e,t){return Qe.IsLiteral(e)&&Bc.IsNumber(e.const)||Qe.IsNumber(e)||Qe.IsInteger(e)?dt.True:dt.False}s(QAe,"FromIntegerRight");function UZe(e,t){return Qe.IsInteger(t)||Qe.IsNumber(t)?dt.True:Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):dt.False}s(UZe,"FromInteger");function aL(e,t){return t.allOf.every(r=>So(e,r)===dt.True)?dt.True:dt.False}s(aL,"FromIntersectRight");function qZe(e,t){return e.allOf.some(r=>So(r,t)===dt.True)?dt.True:dt.False}s(qZe,"FromIntersect");function WZe(e,t){return Oa(t)?Ua(e,t):Qe.IsIterator(t)?bd(So(e.items,t.items)):dt.False}s(WZe,"FromIterator");function GZe(e,t){return Qe.IsLiteral(t)&&t.const===e.const?dt.True:Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsString(t)?WAe(e,t):Qe.IsNumber(t)?UAe(e,t):Qe.IsInteger(t)?QAe(e,t):Qe.IsBoolean(t)?MAe(e,t):dt.False}s(GZe,"FromLiteral");function OAe(e,t){return dt.False}s(OAe,"FromNeverRight");function HZe(e,t){return dt.True}s(HZe,"FromNever");function PAe(e){let[t,r]=[e,0];for(;Qe.IsNot(t);)t=t.not,r+=1;return r%2===0?t:th()}s(PAe,"UnwrapTNot");function jZe(e,t){return Qe.IsNot(e)?So(PAe(e),t):Qe.IsNot(t)?So(e,PAe(t)):wI("Invalid fallthrough for Not")}s(jZe,"FromNot");function VZe(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsNull(t)?dt.True:dt.False}s(VZe,"FromNull");function UAe(e,t){return Qe.IsLiteralNumber(e)||Qe.IsNumber(e)||Qe.IsInteger(e)?dt.True:dt.False}s(UAe,"FromNumberRight");function $Ze(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsInteger(t)||Qe.IsNumber(t)?dt.True:dt.False}s($Ze,"FromNumber");function Z0(e,t){return Object.getOwnPropertyNames(e.properties).length===t}s(Z0,"IsObjectPropertyCount");function NAe(e){return lL(e)}s(NAe,"IsObjectStringLike");function LAe(e){return Z0(e,0)||Z0(e,1)&&"description"in e.properties&&Qe.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(Qe.IsString(e.properties.description.anyOf[0])&&Qe.IsUndefined(e.properties.description.anyOf[1])||Qe.IsString(e.properties.description.anyOf[1])&&Qe.IsUndefined(e.properties.description.anyOf[0]))}s(LAe,"IsObjectSymbolLike");function FJ(e){return Z0(e,0)}s(FJ,"IsObjectNumberLike");function FAe(e){return Z0(e,0)}s(FAe,"IsObjectBooleanLike");function zZe(e){return Z0(e,0)}s(zZe,"IsObjectBigIntLike");function YZe(e){return Z0(e,0)}s(YZe,"IsObjectDateLike");function KZe(e){return lL(e)}s(KZe,"IsObjectUint8ArrayLike");function JZe(e){let t=yd();return Z0(e,0)||Z0(e,1)&&"length"in e.properties&&bd(So(e.properties.length,t))===dt.True}s(JZe,"IsObjectFunctionLike");function XZe(e){return Z0(e,0)}s(XZe,"IsObjectConstructorLike");function lL(e){let t=yd();return Z0(e,0)||Z0(e,1)&&"length"in e.properties&&bd(So(e.properties.length,t))===dt.True}s(lL,"IsObjectArrayLike");function ZZe(e){let t=zp([l5()],l5());return Z0(e,0)||Z0(e,1)&&"then"in e.properties&&bd(So(e.properties.then,t))===dt.True}s(ZZe,"IsObjectPromiseLike");function qAe(e,t){return So(e,t)===dt.False||Qe.IsOptional(e)&&!Qe.IsOptional(t)?dt.False:dt.True}s(qAe,"Property");function Nc(e,t){return Qe.IsUnknown(e)?dt.False:Qe.IsAny(e)?dt.Union:Qe.IsNever(e)||Qe.IsLiteralString(e)&&NAe(t)||Qe.IsLiteralNumber(e)&&FJ(t)||Qe.IsLiteralBoolean(e)&&FAe(t)||Qe.IsSymbol(e)&&LAe(t)||Qe.IsBigInt(e)&&zZe(t)||Qe.IsString(e)&&NAe(t)||Qe.IsSymbol(e)&&LAe(t)||Qe.IsNumber(e)&&FJ(t)||Qe.IsInteger(e)&&FJ(t)||Qe.IsBoolean(e)&&FAe(t)||Qe.IsUint8Array(e)&&KZe(t)||Qe.IsDate(e)&&YZe(t)||Qe.IsConstructor(e)&&XZe(t)||Qe.IsFunction(e)&&JZe(t)?dt.True:Qe.IsRecord(e)&&Qe.IsString(QJ(e))?t[Ad]==="Record"?dt.True:dt.False:Qe.IsRecord(e)&&Qe.IsNumber(QJ(e))?Z0(t,0)?dt.True:dt.False:dt.False}s(Nc,"FromObjectRight");function eet(e,t){return Oa(t)?Ua(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!Qe.IsOptional(t.properties[r]))return dt.False;if(Qe.IsOptional(t.properties[r]))return dt.True;if(qAe(e.properties[r],t.properties[r])===dt.False)return dt.False}return dt.True})():dt.False}s(eet,"FromObject");function tet(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)&&ZZe(t)?dt.True:Qe.IsPromise(t)?bd(So(e.item,t.item)):dt.False}s(tet,"FromPromise");function QJ(e){return Vp in e.patternProperties?yd():$p in e.patternProperties?h0():wI("Unknown record key pattern")}s(QJ,"RecordKey");function OJ(e){return Vp in e.patternProperties?e.patternProperties[Vp]:$p in e.patternProperties?e.patternProperties[$p]:wI("Unable to get record value schema")}s(OJ,"RecordValue");function Ed(e,t){let[r,n]=[QJ(t),OJ(t)];return Qe.IsLiteralString(e)&&Qe.IsNumber(r)&&bd(So(e,n))===dt.True?dt.True:Qe.IsUint8Array(e)&&Qe.IsNumber(r)||Qe.IsString(e)&&Qe.IsNumber(r)||Qe.IsArray(e)&&Qe.IsNumber(r)?So(e,n):Qe.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(qAe(n,e.properties[i])===dt.False)return dt.False;return dt.True})():dt.False}s(Ed,"FromRecordRight");function ret(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?So(OJ(e),OJ(t)):dt.False}s(ret,"FromRecord");function net(e,t){let r=Qe.IsRegExp(e)?h0():e,n=Qe.IsRegExp(t)?h0():t;return So(r,n)}s(net,"FromRegExp");function WAe(e,t){return Qe.IsLiteral(e)&&Bc.IsString(e.const)||Qe.IsString(e)?dt.True:dt.False}s(WAe,"FromStringRight");function iet(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsString(t)?dt.True:dt.False}s(iet,"FromString");function oet(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsSymbol(t)?dt.True:dt.False}s(oet,"FromSymbol");function set(e,t){return Qe.IsTemplateLiteral(e)?So(Vx(e),t):Qe.IsTemplateLiteral(t)?So(e,Vx(t)):wI("Invalid fallthrough for TemplateLiteral")}s(set,"FromTemplateLiteral");function aet(e,t){return Qe.IsArray(t)&&e.items!==void 0&&e.items.every(r=>So(r,t.items)===dt.True)}s(aet,"IsArrayOfTuple");function cet(e,t){return Qe.IsNever(e)?dt.True:Qe.IsUnknown(e)?dt.False:Qe.IsAny(e)?dt.Union:dt.False}s(cet,"FromTupleRight");function uet(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)&&lL(t)||Qe.IsArray(t)&&aet(e,t)?dt.True:Qe.IsTuple(t)?Bc.IsUndefined(e.items)&&!Bc.IsUndefined(t.items)||!Bc.IsUndefined(e.items)&&Bc.IsUndefined(t.items)?dt.False:Bc.IsUndefined(e.items)&&!Bc.IsUndefined(t.items)||e.items.every((r,n)=>So(r,t.items[n])===dt.True)?dt.True:dt.False:dt.False}s(uet,"FromTuple");function fet(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsUint8Array(t)?dt.True:dt.False}s(fet,"FromUint8Array");function det(e,t){return Oa(t)?Ua(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsRecord(t)?Ed(e,t):Qe.IsVoid(t)?pet(e,t):Qe.IsUndefined(t)?dt.True:dt.False}s(det,"FromUndefined");function qJ(e,t){return t.anyOf.some(r=>So(e,r)===dt.True)?dt.True:dt.False}s(qJ,"FromUnionRight");function met(e,t){return e.anyOf.every(r=>So(r,t)===dt.True)?dt.True:dt.False}s(met,"FromUnion");function GAe(e,t){return dt.True}s(GAe,"FromUnknownRight");function het(e,t){return Qe.IsNever(t)?OAe(e,t):Qe.IsIntersect(t)?aL(e,t):Qe.IsUnion(t)?qJ(e,t):Qe.IsAny(t)?UJ(e,t):Qe.IsString(t)?WAe(e,t):Qe.IsNumber(t)?UAe(e,t):Qe.IsInteger(t)?QAe(e,t):Qe.IsBoolean(t)?MAe(e,t):Qe.IsArray(t)?DZe(e,t):Qe.IsTuple(t)?cet(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsUnknown(t)?dt.True:dt.False}s(het,"FromUnknown");function pet(e,t){return Qe.IsUndefined(e)||Qe.IsUndefined(e)?dt.True:dt.False}s(pet,"FromVoidRight");function get(e,t){return Qe.IsIntersect(t)?aL(e,t):Qe.IsUnion(t)?qJ(e,t):Qe.IsUnknown(t)?GAe(e,t):Qe.IsAny(t)?UJ(e,t):Qe.IsObject(t)?Nc(e,t):Qe.IsVoid(t)?dt.True:dt.False}s(get,"FromVoid");function So(e,t){return Qe.IsTemplateLiteral(e)||Qe.IsTemplateLiteral(t)?set(e,t):Qe.IsRegExp(e)||Qe.IsRegExp(t)?net(e,t):Qe.IsNot(e)||Qe.IsNot(t)?jZe(e,t):Qe.IsAny(e)?BZe(e,t):Qe.IsArray(e)?PZe(e,t):Qe.IsBigInt(e)?LZe(e,t):Qe.IsBoolean(e)?FZe(e,t):Qe.IsAsyncIterator(e)?NZe(e,t):Qe.IsConstructor(e)?MZe(e,t):Qe.IsDate(e)?QZe(e,t):Qe.IsFunction(e)?OZe(e,t):Qe.IsInteger(e)?UZe(e,t):Qe.IsIntersect(e)?qZe(e,t):Qe.IsIterator(e)?WZe(e,t):Qe.IsLiteral(e)?GZe(e,t):Qe.IsNever(e)?HZe(e,t):Qe.IsNull(e)?VZe(e,t):Qe.IsNumber(e)?$Ze(e,t):Qe.IsObject(e)?eet(e,t):Qe.IsRecord(e)?ret(e,t):Qe.IsString(e)?iet(e,t):Qe.IsSymbol(e)?oet(e,t):Qe.IsTuple(e)?uet(e,t):Qe.IsPromise(e)?tet(e,t):Qe.IsUint8Array(e)?fet(e,t):Qe.IsUndefined(e)?det(e,t):Qe.IsUnion(e)?met(e,t):Qe.IsUnknown(e)?het(e,t):Qe.IsVoid(e)?get(e,t):wI(`Unknown left type operand '${e[ot]}'`)}s(So,"Visit");function u5(e,t){return So(e,t)}s(u5,"ExtendsCheck");d();d();d();function Aet(e,t,r,n,i){let o={};for(let a of globalThis.Object.getOwnPropertyNames(e))o[a]=_I(e[a],t,r,n,ls(i));return o}s(Aet,"FromProperties");function yet(e,t,r,n,i){return Aet(e.properties,t,r,n,i)}s(yet,"FromMappedResult");function HAe(e,t,r,n,i){let o=yet(e,t,r,n,i);return zi(o)}s(HAe,"ExtendsFromMappedResult");function Cet(e,t,r,n){let i=u5(e,t);return i===dt.Union?so([r,n]):i===dt.True?r:n}s(Cet,"ExtendsResolve");function _I(e,t,r,n,i){return us(e)?HAe(e,t,r,n,i):Ku(e)?ut(jAe(e,t,r,n,i)):ut(Cet(e,t,r,n),i)}s(_I,"Extends");function xet(e,t,r,n,i){return{[e]:_I(Di(e),t,r,n,ls(i))}}s(xet,"FromPropertyKey");function vet(e,t,r,n,i){return e.reduce((o,a)=>({...o,...xet(a,t,r,n,i)}),{})}s(vet,"FromPropertyKeys");function bet(e,t,r,n,i){return vet(e.keys,t,r,n,i)}s(bet,"FromMappedKey");function jAe(e,t,r,n,i){let o=bet(e,t,r,n,i);return zi(o)}s(jAe,"ExtendsFromMappedKey");d();function Eet(e){return e.allOf.every(t=>cA(t))}s(Eet,"Intersect");function Iet(e){return e.anyOf.some(t=>cA(t))}s(Iet,"Union");function Tet(e){return!cA(e.not)}s(Tet,"Not");function cA(e){return e[ot]==="Intersect"?Eet(e):e[ot]==="Union"?Iet(e):e[ot]==="Not"?Tet(e):e[ot]==="Undefined"}s(cA,"ExtendsUndefinedCheck");d();function VAe(e,t){return SI(Vx(e),t)}s(VAe,"ExcludeFromTemplateLiteral");function wet(e,t){let r=e.filter(n=>u5(n,t)===dt.False);return r.length===1?r[0]:so(r)}s(wet,"ExcludeRest");function SI(e,t,r={}){return Ju(e)?ut(VAe(e,t),r):us(e)?ut($Ae(e,t),r):ut(qi(e)?wet(e.anyOf,t):u5(e,t)!==dt.False?ni():e,r)}s(SI,"Exclude");function _et(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=SI(e[n],t);return r}s(_et,"FromProperties");function Ret(e,t){return _et(e.properties,t)}s(Ret,"FromMappedResult");function $Ae(e,t){let r=Ret(e,t);return zi(r)}s($Ae,"ExcludeFromMappedResult");d();d();d();function zAe(e,t){return RI(Vx(e),t)}s(zAe,"ExtractFromTemplateLiteral");function ket(e,t){let r=e.filter(n=>u5(n,t)!==dt.False);return r.length===1?r[0]:so(r)}s(ket,"ExtractRest");function RI(e,t,r){return Ju(e)?ut(zAe(e,t),r):us(e)?ut(YAe(e,t),r):ut(qi(e)?ket(e.anyOf,t):u5(e,t)!==dt.False?e:ni(),r)}s(RI,"Extract");function Bet(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=RI(e[n],t);return r}s(Bet,"FromProperties");function Det(e,t){return Bet(e.properties,t)}s(Det,"FromMappedResult");function YAe(e,t){let r=Det(e,t);return zi(r)}s(YAe,"ExtractFromMappedResult");d();function KAe(e,t){return Km(e)?ut(e.returns,t):ni(t)}s(KAe,"InstanceType");d();d();function cL(e){return J0(Dc(e))}s(cL,"ReadonlyOptional");d();function $x(e,t,r){return ut({[ot]:"Record",type:"object",patternProperties:{[e]:t}},r)}s($x,"RecordCreateFromPattern");function WJ(e,t,r){let n={};for(let i of e)n[i]=t;return ao(n,{...r,[Ad]:"Record"})}s(WJ,"RecordCreateFromKeys");function Pet(e,t,r){return YN(e)?WJ(K0(e),t,r):$x(e.pattern,t,r)}s(Pet,"FromTemplateLiteralKey");function Net(e,t,r){return WJ(K0(so(e)),t,r)}s(Net,"FromUnionKey");function Let(e,t,r){return WJ([e.toString()],t,r)}s(Let,"FromLiteralKey");function Fet(e,t,r){return $x(e.source,t,r)}s(Fet,"FromRegExpKey");function Met(e,t,r){let n=xa(e.pattern)?$p:e.pattern;return $x(n,t,r)}s(Met,"FromStringKey");function Qet(e,t,r){return $x($p,t,r)}s(Qet,"FromAnyKey");function Oet(e,t,r){return $x(oAe,t,r)}s(Oet,"FromNeverKey");function Uet(e,t,r){return ao({true:t,false:t},r)}s(Uet,"FromBooleanKey");function qet(e,t,r){return $x(Vp,t,r)}s(qet,"FromIntegerKey");function Wet(e,t,r){return $x(Vp,t,r)}s(Wet,"FromNumberKey");function uL(e,t,r={}){return qi(e)?Net(e.anyOf,t,r):Ju(e)?Pet(e,t,r):Yu(e)?Let(e.const,t,r):nA(e)?Uet(e,t,r):Xm(e)?qet(e,t,r):Zm(e)?Wet(e,t,r):vJ(e)?Fet(e,t,r):iA(e)?Met(e,t,r):CJ(e)?Qet(e,t,r):s5(e)?Oet(e,t,r):ni(r)}s(uL,"Record");function fL(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}s(fL,"RecordPattern");function JAe(e){let t=fL(e);return t===$p?h0():t===Vp?yd():h0({pattern:t})}s(JAe,"RecordKey");function dL(e){return e.patternProperties[fL(e)]}s(dL,"RecordValue");function Get(e,t){return t.parameters=o_(e,t.parameters),t.returns=rh(e,t.returns),t}s(Get,"FromConstructor");function Het(e,t){return t.parameters=o_(e,t.parameters),t.returns=rh(e,t.returns),t}s(Het,"FromFunction");function jet(e,t){return t.allOf=o_(e,t.allOf),t}s(jet,"FromIntersect");function Vet(e,t){return t.anyOf=o_(e,t.anyOf),t}s(Vet,"FromUnion");function $et(e,t){return xa(t.items)||(t.items=o_(e,t.items)),t}s($et,"FromTuple");function zet(e,t){return t.items=rh(e,t.items),t}s(zet,"FromArray");function Yet(e,t){return t.items=rh(e,t.items),t}s(Yet,"FromAsyncIterator");function Ket(e,t){return t.items=rh(e,t.items),t}s(Ket,"FromIterator");function Jet(e,t){return t.item=rh(e,t.item),t}s(Jet,"FromPromise");function Xet(e,t){let r=rtt(e,t.properties);return{...t,...ao(r)}}s(Xet,"FromObject");function Zet(e,t){let r=rh(e,JAe(t)),n=rh(e,dL(t)),i=uL(r,n);return{...t,...i}}s(Zet,"FromRecord");function ett(e,t){return t.index in e?e[t.index]:th()}s(ett,"FromArgument");function ttt(e,t){let r=mI(t),n=Y0(t),i=rh(e,t);return r&&n?cL(i):r&&!n?J0(i):!r&&n?Dc(i):i}s(ttt,"FromProperty");function rtt(e,t){return globalThis.Object.getOwnPropertyNames(t).reduce((r,n)=>({...r,[n]:ttt(e,t[n])}),{})}s(rtt,"FromProperties");function o_(e,t){return t.map(r=>rh(e,r))}s(o_,"FromTypes");function rh(e,t){return Km(t)?Get(e,t):Jm(t)?Het(e,t):$s(t)?jet(e,t):qi(t)?Vet(e,t):Xu(t)?$et(e,t):zm(t)?zet(e,t):Ux(t)?Yet(e,t):Wx(t)?Ket(e,t):Gx(t)?Jet(e,t):va(t)?Xet(e,t):Hx(t)?Zet(e,t):xJ(t)?ett(e,t):t}s(rh,"FromType");function XAe(e,t){return rh(t,fI(e))}s(XAe,"Instantiate");d();function ZAe(e){return ut({[ot]:"Integer",type:"integer"},e)}s(ZAe,"Integer");d();d();d();function ntt(e,t,r){return{[e]:nh(Di(e),t,ls(r))}}s(ntt,"MappedIntrinsicPropertyKey");function itt(e,t,r){return e.reduce((i,o)=>({...i,...ntt(o,t,r)}),{})}s(itt,"MappedIntrinsicPropertyKeys");function ott(e,t,r){return itt(e.keys,t,r)}s(ott,"MappedIntrinsicProperties");function e2e(e,t,r){let n=ott(e,t,r);return zi(n)}s(e2e,"IntrinsicFromMappedKey");function stt(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}s(stt,"ApplyUncapitalize");function att(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}s(att,"ApplyCapitalize");function ltt(e){return e.toUpperCase()}s(ltt,"ApplyUppercase");function ctt(e){return e.toLowerCase()}s(ctt,"ApplyLowercase");function utt(e,t,r){let n=xI(e.pattern);if(!jx(n))return{...e,pattern:t2e(e.pattern,t)};let a=[...t_(n)].map(u=>Di(u)),l=r2e(a,t),c=so(l);return JN([c],r)}s(utt,"FromTemplateLiteral");function t2e(e,t){return typeof e=="string"?t==="Uncapitalize"?stt(e):t==="Capitalize"?att(e):t==="Uppercase"?ltt(e):t==="Lowercase"?ctt(e):e:e.toString()}s(t2e,"FromLiteralValue");function r2e(e,t){return e.map(r=>nh(r,t))}s(r2e,"FromRest");function nh(e,t,r={}){return Ku(e)?e2e(e,t,r):Ju(e)?utt(e,t,r):qi(e)?so(r2e(e.anyOf,t),r):Yu(e)?Di(t2e(e.const,t),r):ut(e,r)}s(nh,"Intrinsic");function n2e(e,t={}){return nh(e,"Capitalize",t)}s(n2e,"Capitalize");d();function i2e(e,t={}){return nh(e,"Lowercase",t)}s(i2e,"Lowercase");d();function o2e(e,t={}){return nh(e,"Uncapitalize",t)}s(o2e,"Uncapitalize");d();function s2e(e,t={}){return nh(e,"Uppercase",t)}s(s2e,"Uppercase");d();d();d();d();d();function ftt(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=f5(e[i],t,ls(r));return n}s(ftt,"FromProperties");function dtt(e,t,r){return ftt(e.properties,t,r)}s(dtt,"FromMappedResult");function a2e(e,t,r){let n=dtt(e,t,r);return zi(n)}s(a2e,"OmitFromMappedResult");function mtt(e,t){return e.map(r=>GJ(r,t))}s(mtt,"FromIntersect");function htt(e,t){return e.map(r=>GJ(r,t))}s(htt,"FromUnion");function ptt(e,t){let{[t]:r,...n}=e;return n}s(ptt,"FromProperty");function gtt(e,t){return t.reduce((r,n)=>ptt(r,n),e)}s(gtt,"FromProperties");function Att(e,t){let r=zs(e,[Ps,"$id","required","properties"]),n=gtt(e.properties,t);return ao(n,r)}s(Att,"FromObject");function ytt(e){let t=e.reduce((r,n)=>VN(n)?[...r,Di(n)]:r,[]);return so(t)}s(ytt,"UnionFromPropertyKeys");function GJ(e,t){return $s(e)?Pc(mtt(e.allOf,t)):qi(e)?so(htt(e.anyOf,t)):va(e)?Att(e,t):ao({})}s(GJ,"OmitResolve");function f5(e,t,r){let n=Ca(t)?ytt(t):t,i=Ns(t)?K0(t):t,o=ra(e),a=ra(t);return us(e)?a2e(e,i,r):Ku(t)?l2e(e,t,r):o&&a?Ko("Omit",[e,n],r):!o&&a?Ko("Omit",[e,n],r):o&&!a?Ko("Omit",[e,n],r):ut({...GJ(e,i),...r})}s(f5,"Omit");function Ctt(e,t,r){return{[t]:f5(e,[t],ls(r))}}s(Ctt,"FromPropertyKey");function xtt(e,t,r){return t.reduce((n,i)=>({...n,...Ctt(e,i,r)}),{})}s(xtt,"FromPropertyKeys");function vtt(e,t,r){return xtt(e,t.keys,r)}s(vtt,"FromMappedKey");function l2e(e,t,r){let n=vtt(e,t,r);return zi(n)}s(l2e,"OmitFromMappedKey");d();d();d();function btt(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=d5(e[i],t,ls(r));return n}s(btt,"FromProperties");function Ett(e,t,r){return btt(e.properties,t,r)}s(Ett,"FromMappedResult");function c2e(e,t,r){let n=Ett(e,t,r);return zi(n)}s(c2e,"PickFromMappedResult");function Itt(e,t){return e.map(r=>HJ(r,t))}s(Itt,"FromIntersect");function Ttt(e,t){return e.map(r=>HJ(r,t))}s(Ttt,"FromUnion");function wtt(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}s(wtt,"FromProperties");function _tt(e,t){let r=zs(e,[Ps,"$id","required","properties"]),n=wtt(e.properties,t);return ao(n,r)}s(_tt,"FromObject");function Stt(e){let t=e.reduce((r,n)=>VN(n)?[...r,Di(n)]:r,[]);return so(t)}s(Stt,"UnionFromPropertyKeys");function HJ(e,t){return $s(e)?Pc(Itt(e.allOf,t)):qi(e)?so(Ttt(e.anyOf,t)):va(e)?_tt(e,t):ao({})}s(HJ,"PickResolve");function d5(e,t,r){let n=Ca(t)?Stt(t):t,i=Ns(t)?K0(t):t,o=ra(e),a=ra(t);return us(e)?c2e(e,i,r):Ku(t)?u2e(e,t,r):o&&a?Ko("Pick",[e,n],r):!o&&a?Ko("Pick",[e,n],r):o&&!a?Ko("Pick",[e,n],r):ut({...HJ(e,i),...r})}s(d5,"Pick");function Rtt(e,t,r){return{[t]:d5(e,[t],ls(r))}}s(Rtt,"FromPropertyKey");function ktt(e,t,r){return t.reduce((n,i)=>({...n,...Rtt(e,i,r)}),{})}s(ktt,"FromPropertyKeys");function Btt(e,t,r){return ktt(e,t.keys,r)}s(Btt,"FromMappedKey");function u2e(e,t,r){let n=Btt(e,t,r);return zi(n)}s(u2e,"PickFromMappedKey");d();d();function Dtt(e,t){return Ko("Partial",[Ko(e,t)])}s(Dtt,"FromComputed");function Ptt(e){return Ko("Partial",[vd(e)])}s(Ptt,"FromRef");function Ntt(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Dc(e[r]);return t}s(Ntt,"FromProperties");function Ltt(e){let t=zs(e,[Ps,"$id","required","properties"]),r=Ntt(e.properties);return ao(r,t)}s(Ltt,"FromObject");function f2e(e){return e.map(t=>d2e(t))}s(f2e,"FromRest");function d2e(e){return Ym(e)?Dtt(e.target,e.parameters):ra(e)?Ptt(e.$ref):$s(e)?Pc(f2e(e.allOf)):qi(e)?so(f2e(e.anyOf)):va(e)?Ltt(e):qx(e)||nA(e)||Xm(e)||Yu(e)||z7(e)||Zm(e)||iA(e)||Y7(e)||oA(e)?e:ao({})}s(d2e,"PartialResolve");function kI(e,t){return us(e)?m2e(e,t):ut({...d2e(e),...t})}s(kI,"Partial");function Ftt(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=kI(e[n],ls(t));return r}s(Ftt,"FromProperties");function Mtt(e,t){return Ftt(e.properties,t)}s(Mtt,"FromMappedResult");function m2e(e,t){let r=Mtt(e,t);return zi(r)}s(m2e,"PartialFromMappedResult");d();d();function Qtt(e,t){return Ko("Required",[Ko(e,t)])}s(Qtt,"FromComputed");function Ott(e){return Ko("Required",[vd(e)])}s(Ott,"FromRef");function Utt(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=zs(e[r],[rc]);return t}s(Utt,"FromProperties");function qtt(e){let t=zs(e,[Ps,"$id","required","properties"]),r=Utt(e.properties);return ao(r,t)}s(qtt,"FromObject");function h2e(e){return e.map(t=>p2e(t))}s(h2e,"FromRest");function p2e(e){return Ym(e)?Qtt(e.target,e.parameters):ra(e)?Ott(e.$ref):$s(e)?Pc(h2e(e.allOf)):qi(e)?so(h2e(e.anyOf)):va(e)?qtt(e):qx(e)||nA(e)||Xm(e)||Yu(e)||z7(e)||Zm(e)||iA(e)||Y7(e)||oA(e)?e:ao({})}s(p2e,"RequiredResolve");function BI(e,t){return us(e)?g2e(e,t):ut({...p2e(e),...t})}s(BI,"Required");function Wtt(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=BI(e[n],t);return r}s(Wtt,"FromProperties");function Gtt(e,t){return Wtt(e.properties,t)}s(Gtt,"FromMappedResult");function g2e(e,t){let r=Gtt(e,t);return zi(r)}s(g2e,"RequiredFromMappedResult");function Htt(e,t){return t.map(r=>ra(r)?jJ(e,r.$ref):Zu(e,r))}s(Htt,"DereferenceParameters");function jJ(e,t){return t in e?ra(e[t])?jJ(e,e[t].$ref):Zu(e,e[t]):ni()}s(jJ,"Dereference");function jtt(e){return II(e[0])}s(jtt,"FromAwaited");function Vtt(e){return c5(e[0],e[1])}s(Vtt,"FromIndex");function $tt(e){return TI(e[0])}s($tt,"FromKeyOf");function ztt(e){return kI(e[0])}s(ztt,"FromPartial");function Ytt(e){return f5(e[0],e[1])}s(Ytt,"FromOmit");function Ktt(e){return d5(e[0],e[1])}s(Ktt,"FromPick");function Jtt(e){return BI(e[0])}s(Jtt,"FromRequired");function Xtt(e,t,r){let n=Htt(e,r);return t==="Awaited"?jtt(n):t==="Index"?Vtt(n):t==="KeyOf"?$tt(n):t==="Partial"?ztt(n):t==="Omit"?Ytt(n):t==="Pick"?Ktt(n):t==="Required"?Jtt(n):ni()}s(Xtt,"FromComputed");function Ztt(e,t){return gI(Zu(e,t))}s(Ztt,"FromArray");function ert(e,t){return AI(Zu(e,t))}s(ert,"FromAsyncIterator");function trt(e,t,r){return yI(s_(e,t),Zu(e,r))}s(trt,"FromConstructor");function rrt(e,t,r){return zp(s_(e,t),Zu(e,r))}s(rrt,"FromFunction");function nrt(e,t){return Pc(s_(e,t))}s(nrt,"FromIntersect");function irt(e,t){return EI(Zu(e,t))}s(irt,"FromIterator");function ort(e,t){return ao(globalThis.Object.keys(t).reduce((r,n)=>({...r,[n]:Zu(e,t[n])}),{}))}s(ort,"FromObject");function srt(e,t){let[r,n]=[Zu(e,dL(t)),fL(t)],i=fI(t);return i.patternProperties[n]=r,i}s(srt,"FromRecord");function art(e,t){return ra(t)?{...jJ(e,t.$ref),[Ps]:t[Ps]}:t}s(art,"FromTransform");function lrt(e,t){return Cd(s_(e,t))}s(lrt,"FromTuple");function crt(e,t){return so(s_(e,t))}s(crt,"FromUnion");function s_(e,t){return t.map(r=>Zu(e,r))}s(s_,"FromTypes");function Zu(e,t){return Y0(t)?ut(Zu(e,zs(t,[rc])),t):mI(t)?ut(Zu(e,zs(t,[$m])),t):oo(t)?ut(art(e,t),t):zm(t)?ut(Ztt(e,t.items),t):Ux(t)?ut(ert(e,t.items),t):Ym(t)?ut(Xtt(e,t.target,t.parameters)):Km(t)?ut(trt(e,t.parameters,t.returns),t):Jm(t)?ut(rrt(e,t.parameters,t.returns),t):$s(t)?ut(nrt(e,t.allOf),t):Wx(t)?ut(irt(e,t.items),t):va(t)?ut(ort(e,t.properties),t):Hx(t)?ut(srt(e,t)):Xu(t)?ut(lrt(e,t.items||[]),t):qi(t)?ut(crt(e,t.anyOf),t):t}s(Zu,"FromType");function urt(e,t){return t in e?Zu(e,e[t]):ni()}s(urt,"ComputeType");function A2e(e){return globalThis.Object.getOwnPropertyNames(e).reduce((t,r)=>({...t,[r]:urt(e,r)}),{})}s(A2e,"ComputeModuleProperties");var VJ=class{static{s(this,"TModule")}constructor(t){let r=A2e(t),n=this.WithIdentifiers(r);this.$defs=n}Import(t,r){let n={...this.$defs,[t]:ut(this.$defs[t],r)};return ut({[ot]:"Import",$defs:n,$ref:t})}WithIdentifiers(t){return globalThis.Object.getOwnPropertyNames(t).reduce((r,n)=>({...r,[n]:{...t[n],$id:n}}),{})}};function y2e(e){return new VJ(e)}s(y2e,"Module");d();function C2e(e,t){return ut({[ot]:"Not",not:e},t)}s(C2e,"Not");d();function x2e(e,t){return Jm(e)?Cd(e.parameters,t):ni()}s(x2e,"Parameters");d();var frt=0;function v2e(e,t={}){xa(t.$id)&&(t.$id=`T${frt++}`);let r=fI(e({[ot]:"This",$ref:`${t.$id}`}));return r.$id=t.$id,ut({[Ad]:"Recursive",...r},t)}s(v2e,"Recursive");d();function b2e(e,t){let r=qo(e)?new globalThis.RegExp(e):e;return ut({[ot]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}s(b2e,"RegExp");d();function drt(e){return $s(e)?e.allOf:qi(e)?e.anyOf:Xu(e)?e.items??[]:[]}s(drt,"RestResolve");function E2e(e){return drt(e)}s(E2e,"Rest");d();function I2e(e,t){return Jm(e)?ut(e.returns,t):ni(t)}s(I2e,"ReturnType");d();var $J=class{static{s(this,"TransformDecodeBuilder")}constructor(t){this.schema=t}Decode(t){return new zJ(this.schema,t)}},zJ=class{static{s(this,"TransformEncodeBuilder")}constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let o={Encode:s(a=>r[Ps].Encode(t(a)),"Encode"),Decode:s(a=>this.decode(r[Ps].Decode(a)),"Decode")};return{...r,[Ps]:o}}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return{...r,[Ps]:n}}Encode(t){return oo(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};function T2e(e){return new $J(e)}s(T2e,"Transform");d();function w2e(e={}){return ut({[ot]:e[ot]??"Unsafe"},e)}s(w2e,"Unsafe");d();function _2e(e){return ut({[ot]:"Void",type:"void"},e)}s(_2e,"Void");d();var YJ={};K1(YJ,{Any:()=>l5,Argument:()=>uAe,Array:()=>gI,AsyncIterator:()=>AI,Awaited:()=>II,BigInt:()=>bI,Boolean:()=>KN,Capitalize:()=>n2e,Composite:()=>RAe,Const:()=>kAe,Constructor:()=>yI,ConstructorParameters:()=>BAe,Date:()=>tL,Enum:()=>DAe,Exclude:()=>SI,Extends:()=>_I,Extract:()=>RI,Function:()=>zp,Index:()=>c5,InstanceType:()=>KAe,Instantiate:()=>XAe,Integer:()=>ZAe,Intersect:()=>Pc,Iterator:()=>EI,KeyOf:()=>TI,Literal:()=>Di,Lowercase:()=>i2e,Mapped:()=>EAe,Module:()=>y2e,Never:()=>ni,Not:()=>C2e,Null:()=>rL,Number:()=>yd,Object:()=>ao,Omit:()=>f5,Optional:()=>Dc,Parameters:()=>x2e,Partial:()=>kI,Pick:()=>d5,Promise:()=>ZN,Readonly:()=>J0,ReadonlyOptional:()=>cL,Record:()=>uL,Recursive:()=>v2e,Ref:()=>vd,RegExp:()=>b2e,Required:()=>BI,Rest:()=>E2e,ReturnType:()=>I2e,String:()=>h0,Symbol:()=>nL,TemplateLiteral:()=>JN,Transform:()=>T2e,Tuple:()=>Cd,Uint8Array:()=>oL,Uncapitalize:()=>o2e,Undefined:()=>iL,Union:()=>so,Unknown:()=>th,Unsafe:()=>w2e,Uppercase:()=>s2e,Void:()=>_2e});d();var I=YJ;var n3e=Ze(ii()),i3e=I.Object({accessToken:I.Optional(I.String({minLength:1})),handle:I.Optional(I.String({minLength:1})),githubAppId:I.Optional(I.String({minLength:1}))}),EZ;(r=>(r.method="github/didChangeAuth",r.type=new n3e.ProtocolNotificationType(r.method)))(EZ||={});d();var o3e=Ze(ii()),IZ;(r=>(r.method="copilot/ipCodeCitation",r.type=new o3e.NotificationType(r.method)))(IZ||={});d();var s3e=Ze(ii()),ZL;(r=>(r.method="context/update",r.type=new s3e.ProtocolRequestType(r.method)))(ZL||={});d();d();var b5="Cancelled";d();var Mn=Ze(ii()),g_=I.String(),iu=I.Object({uri:g_}),Zx=I.Intersect([iu,I.Object({version:I.Optional(I.Integer())})]),$0r=I.Required(Zx),wl=I.Object({line:I.Integer({minimum:0}),character:I.Integer({minimum:0})}),ba=I.Object({start:wl,end:wl}),TZ=I.Union([I.Integer(),I.String()]),z0r=I.Object({isCancellationRequested:I.Boolean(),onCancellationRequested:I.Any()});d();var a3e=Ze(ii()),wZ;(r=>(r.method="textDocument/didFocus",r.type=new a3e.ProtocolNotificationType(r.method)))(wZ||={});d();var gnt=I.Object({didChangeFeatureFlags:I.Boolean(),fetch:I.Boolean(),ipCodeCitation:I.Boolean(),redirectedTelemetry:I.Boolean(),related:I.Boolean(),token:I.Boolean(),watchedFiles:I.Boolean()}),Ant=I.Object({name:I.String(),version:I.String(),readableName:I.Optional(I.String())}),l3e=I.Object({name:I.String(),version:I.Optional(I.String()),readableName:I.Optional(I.String())}),c3e=I.Object({editorInfo:I.Optional(l3e),editorPluginInfo:I.Optional(l3e),relatedPluginInfo:I.Optional(I.Array(Ant)),copilotIntegrationId:I.Optional(I.String()),copilotCapabilities:I.Optional(I.Partial(gnt)),githubAppId:I.Optional(I.String())});d();var A_=Ze(ii());var eF=(r=>(r[r.Invoked=1]="Invoked",r[r.Automatic=2]="Automatic",r))(eF||{}),ynt=I.Enum(eF),Cnt=I.Object({triggerKind:ynt,selectedCompletionInfo:I.Optional(I.Object({text:I.String(),range:ba,tooltipSignature:I.Optional(I.String())}))}),u3e=I.Object({textDocument:Zx,position:wl,formattingOptions:I.Optional(I.Object({tabSize:I.Optional(I.Union([I.Integer({minimum:1}),I.String()])),insertSpaces:I.Optional(I.Union([I.Boolean(),I.String()]))})),context:Cnt,data:I.Optional(I.Unknown())}),_Z;(r=>(r.method="textDocument/inlineCompletion",r.type=new A_.ProtocolRequestType(r.method)))(_Z||={});var f3e=I.Object({command:I.Object({arguments:I.Tuple([I.String({minLength:1})])})}),d3e=I.Object({item:f3e}),SZ;(r=>(r.method="textDocument/didShowCompletion",r.type=new A_.ProtocolNotificationType(r.method)))(SZ||={});var m3e=I.Object({item:f3e,acceptedLength:I.Integer({minimum:1})}),RZ;(r=>(r.method="textDocument/didPartiallyAcceptCompletion",r.type=new A_.ProtocolNotificationType(r.method)))(RZ||={});d();var h3e=Ze(ii()),kZ;(r=>(r.method="textDocument/inlineCompletionPrompt",r.type=new h3e.ProtocolRequestType(r.method)))(kZ||={});d();var p3e=Ze(ii()),g3e=I.Object({textDocument:Zx,position:wl}),xnt=I.Object({command:I.Object({arguments:I.Tuple([I.String({minLength:1})])})}),A3e=I.Object({item:xnt}),BZ;(r=>(r.method="textDocument/didShowInlineEdit",r.type=new p3e.ProtocolNotificationType(r.method)))(BZ||={});d();var tF=Ze(ii());var y3e=I.Object({textDocument:Zx,position:wl,partialResultToken:I.Optional(TZ),workDoneToken:I.Optional(TZ)}),rF;(n=>(n.method="textDocument/copilotPanelCompletion",n.type=new tF.ProtocolRequestType(n.method),n.partialResult=new tF.ProgressType))(rF||={});d();var C3e=Ze(ii()),DZ;(r=>(r.method="copilot/related",r.type=new C3e.ProtocolRequestType(r.method)))(DZ||={});d();var x3e=Ze(ii()),PZ;(r=>(r.method="statusNotification",r.type=new x3e.ProtocolNotificationType(r.method)))(PZ||={});var v3e=Ze(require("events"));var nF="CopilotToken",Zp=class{static{s(this,"CopilotTokenNotifier")}#e=new v3e.default;#t;constructor(){this.#e.setMaxListeners(20)}emitToken(t){if(t.token!==this.#t?.token)return this.#t=t,this.#e.emit(nF,t)}onToken(t){return this.#e.on(nF,t),Mn.Disposable.create(()=>this.#e.off(nF,t))}};function Ks(e,t){let r=rf(e,t,`event.${nF}`);return e.get(Zp).onToken(r)}s(Ks,"onCopilotToken");function y_(e,t){return e.get(Zp).emitToken(t)}s(y_,"emitCopilotToken");var ic=class{static{s(this,"TelemetryUserConfig")}constructor(t,r,n,i){this.trackingId=r,this.optedIn=n??!1,this.ftFlag=i??"",this.setupUpdateOnToken(t)}setupUpdateOnToken(t){Ks(t,r=>{let n=r.getTokenValue("rt")==="1",i=r.getTokenValue("ft")??"",o=r.getTokenValue("tid"),a=r.organization_list,l=r.enterprise_list,c=r.getTokenValue("sku");o!==void 0&&(this.trackingId=o,this.organizationsList=a?.toString(),this.enterpriseList=l?.toString(),this.sku=c,this.optedIn=n,this.ftFlag=i)})}};var iF=Ze(n5()),oF=Ze(require("os"));var vnt=/^(\s+at)?(.*?)(@|\s\(|\s)([^(\n]+?)(:\d+)?(:\d+)?(\)?)$/;function bnt(e){let t={type:e.name,value:e.message},r=e.stack?.replace(/^.*?:\d+\n.*\n *\^?\n\n/,"");if(r?.startsWith(e.toString()+`
`)){t.stacktrace=[];for(let n of r.slice(e.toString().length+1).split(/\n/).reverse()){let i=n.match(vnt),o={filename:"",function:""};i&&(o.function=i[2]?.trim()?.replace(/^[^.]{1,2}(\.|$)/,"_$1")??o.function,o.filename=(i[4]?.trim()??o.filename).replace(/^\.\/dist\//,"/github-copilot/dist/"),i[5]&&i[5]!==":0"&&(o.lineno=i[5].slice(1)),i[6]&&i[5]!==":0"&&(o.colno=i[6].slice(1)),o.in_app=!/[[<:]|(?:^|\/)node_modules\//.test(o.filename)),t.stacktrace.push(o)}}return t}s(bnt,"buildExceptionDetail");function NZ(e,t){let r=e.get(gn),n=r.getEditorInfo(),i=e.get(ic),o={"#editor":n.devName??n.name,"#editor_version":eg({name:n.devName??n.name,version:n.version}),"#plugin":r.getEditorPluginInfo().name,"#plugin_version":eg(r.getEditorPluginInfo()),"#session_id":e.get(Ds).sessionId,"#machine_id":e.get(Ds).machineId,"#architecture":oF.arch(),"#os_platform":oF.platform(),...t};return i.trackingId&&(o.user=i.trackingId,o["#tracking_id"]=i.trackingId),o}s(NZ,"buildContext");function b3e(e,t){let r=e.get(po),n=e.get(gn).getEditorInfo(),i=typeof process<"u"?process.versions.node:"web",o={app:"copilot-client",rollup_id:"auto",platform:"node",release:r.getBuildType()!=="dev"?`copilot-client@${r.getVersion()}`:void 0,deployed_to:r.getBuildType(),catalog_service:n.name==="vscode"?"CopilotCompletionsVSCode":"CopilotLanguageServer",context:NZ(e,{"#node_version":i}),sensitive_context:{}},a=[];o.exception_detail=[];let l=0,c=t;for(;c instanceof Error&&l<10;){let f=bnt(c);o.exception_detail.unshift(f),a.unshift([c,f]),l+=1,c=c.cause}let u=[];for(let[f,m]of a)if(m.stacktrace&&m.stacktrace.length>0){u.push(`${m.type}: ${f.code??""}`);let h=[...m.stacktrace].reverse();for(let p of h)if(p.filename?.startsWith("/github-copilot/"))return o;for(let p of h)if(p.in_app){u.push(`${p.filename?.replace(/^\.\//,"")}:${p.lineno}:${p.colno}`);break}u.push(`${h[0].filename?.replace(/^\.\//,"")}`)}else return o;return o.exception_detail.length>0&&(o.rollup_id=(0,iF.SHA256)(iF.enc.Utf16.parse(u.join(`
`))).toString()),o}s(b3e,"buildPayload");d();var C_=class{static{s(this,"FailingTelemetryReporter")}sendTelemetryEvent(t,r,n){throw new Error("Telemetry disabled")}sendTelemetryErrorEvent(t,r,n,i){throw new Error("Telemetry disabled")}dispose(){return Promise.resolve()}hackOptOutListener(){}};d();var tg=class{constructor(t=5){this.perTenMinutes=t;this.cache=new un}static{s(this,"ExceptionRateLimiter")}isThrottled(t){let r=Date.now(),n=this.cache.get(t)||new Array(this.perTenMinutes).fill(0);return r-n[0]<6e5?!0:(n.push(r),n.shift(),this.cache.set(t,n),!1)}};d();var wd=class e{constructor(t){this.flags=t}static{s(this,"RuntimeMode")}static fromEnvironment(t,r=process.argv,n=process.env){return new e({debug:T3e(r,n),verboseLogging:Int(r,n),testMode:t,simulation:Ent(n)})}};function sh(e){return e.get(wd).flags.testMode}s(sh,"isRunningInTest");function JI(e){return sh(e)}s(JI,"shouldFailForDebugPurposes");function x_(e){return e.get(wd).flags.debug}s(x_,"isDebugEnabled");function I3e(e){return e.get(wd).flags.verboseLogging}s(I3e,"isVerboseLoggingEnabled");function T3e(e,t){return e.includes("--debug")||LZ(t,"DEBUG")}s(T3e,"determineDebugFlag");function Ent(e){return LZ(e,"SIMULATION")}s(Ent,"determineSimulationFlag");function aF(e){return e.get(wd).flags.simulation}s(aF,"isRunningInSimulation");function Int(e,t){return t.COPILOT_AGENT_VERBOSE==="1"||t.COPILOT_AGENT_VERBOSE?.toLowerCase()==="true"||LZ(t,"VERBOSE")||T3e(e,t)}s(Int,"determineVerboseLoggingEnabled");function LZ(e,t){for(let r of["GH_COPILOT_","GITHUB_COPILOT_"]){let n=e[`${r}${t}`];if(n)return n==="1"||n?.toLowerCase()==="true"}return!1}s(LZ,"determineEnvFlagEnabled");d();var Ro=class{constructor(){this.promises=new Set}static{s(this,"PromiseQueue")}register(t){this.promises.add(t),t.finally(()=>this.promises.delete(t))}async flush(){await Promise.allSettled(this.promises)}};d();var S3e=require("os"),R3e=Ze(require("path"));function v_(e){return e.replace(/(file:\/\/)([^\s<>]+)/gi,"$1[redacted]").replace(/(^|[\s|:=(<'"`])((?:\/(?=[^/])|\\|[a-zA-Z]:[\\/])[^\s:)>'"`]+)/g,"$1[redacted]")}s(v_,"redactPaths");var Tnt=new Set(["Maximum call stack size exceeded","Set maximum size exceeded","Invalid arguments"]),wnt=[/^[\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}.]+ is not a function[ \w]*$/u,/^Cannot read properties of undefined \(reading '[\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]+'\)$/u];function MZ(e){if(Tnt.has(e))return e;for(let t of wnt)if(t.test(e))return e;return v_(e).replace(/\bDNS:(?:\*\.)?[\w.-]+/gi,"DNS:[redacted]")}s(MZ,"redactMessage");function lF(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(lF,"escapeForRegExp");var _nt=new RegExp("(?<=^|[\\s|(\"'`]|file://)"+lF((0,S3e.homedir)())+"(?=$|[\\\\/:\"'`])","gi");function FZ(e){return e.replace(_nt,"~")}s(FZ,"redactHomeDir");var k3e="[\\\\/]?([^:)]*)(?=:\\d)",w3e=new RegExp(lF(R3e.sep),"g"),_3e=new RegExp(lF(__dirname.replace(/[\\/]lib[\\/]src[\\/]util$|[\\/]dist$/,""))+k3e,"gi");function QZ(e,t,r=!1,n=[]){let i=new Error(t(e));i.name=e.name,typeof e.syscall=="string"&&(i.syscall=e.syscall),typeof e.code=="string"&&(i.code=e.code),typeof e.errno=="number"&&(i.errno=e.errno),i.stack=void 0;let o=e.stack?.replace(/^.*?:\d+\n.*\n *\^?\n\n/,""),a;for(let l of[e.toString(),`${e.name}: ${e.message}`])if(o?.startsWith(l+`
`)){a=o.slice(l.length+1).split(/\n/);break}if(a){i.stack=i.toString();for(let l of a)if(_3e.test(l))i.stack+=`
${v_(l.replace(_3e,(c,u)=>"./"+u.replace(w3e,"/")))}`;else if(/[ (]node:|[ (]wasm:\/\/wasm\/| \(<anonymous>\)$/.test(l))i.stack+=`
${v_(l)}`;else{let c=!1;for(let{prefix:u,path:f}of n){let m=new RegExp(lF(f.replace(/[\\/]$/,""))+k3e,"gi");if(m.test(l)){i.stack+=`
${v_(l.replace(m,(h,p)=>u+p.replace(w3e,"/")))}`,c=!0;break}}if(c)continue;r?i.stack+=`
${FZ(l)}`:i.stack+=`
at [redacted]:0:0`}}else r&&o&&(i.stack=FZ(o));return e.cause instanceof Error&&(i.cause=QZ(e.cause,t,r,n)),i}s(QZ,"cloneError");function B3e(e){let t=e.message;return typeof e.path=="string"&&e.path.length>0&&(t=t.replaceAll(e.path,"<path>")),t}s(B3e,"errorMessageWithoutPath");function D3e(e,t){return QZ(e,s(function(n){return FZ(B3e(n))},"prepareMessage"),!0,t)}s(D3e,"prepareErrorForRestrictedTelemetry");function P3e(e,t,r=!1){return QZ(e,s(function(i){if(r)return MZ(B3e(i));let o="[redacted]";return typeof i.code=="string"&&(o=i.code+" "+o),typeof i.syscall=="string"?o=v_(i.syscall)+" "+o:"erroredSysCall"in i&&typeof i.erroredSysCall=="string"&&(o=i.erroredSysCall+" "+o),o},"prepareMessage"),!1,t)}s(P3e,"redactError");d();d();function Snt(e){switch(e.errorType){case nt.ArrayContains:return"Expected array to contain at least one matching value";case nt.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case nt.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case nt.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case nt.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case nt.ArrayUniqueItems:return"Expected array elements to be unique";case nt.Array:return"Expected array";case nt.AsyncIterator:return"Expected AsyncIterator";case nt.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case nt.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case nt.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case nt.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case nt.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case nt.BigInt:return"Expected bigint";case nt.Boolean:return"Expected boolean";case nt.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case nt.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case nt.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case nt.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case nt.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case nt.Date:return"Expected Date";case nt.Function:return"Expected function";case nt.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case nt.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case nt.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case nt.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case nt.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case nt.Integer:return"Expected integer";case nt.IntersectUnevaluatedProperties:return"Unexpected property";case nt.Intersect:return"Expected all values to match";case nt.Iterator:return"Expected Iterator";case nt.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case nt.Never:return"Never";case nt.Not:return"Value should not match";case nt.Null:return"Expected null";case nt.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case nt.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case nt.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case nt.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case nt.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case nt.Number:return"Expected number";case nt.Object:return"Expected object";case nt.ObjectAdditionalProperties:return"Unexpected property";case nt.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case nt.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case nt.ObjectRequiredProperty:return"Expected required property";case nt.Promise:return"Expected Promise";case nt.RegExp:return"Expected string to match regular expression";case nt.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case nt.StringFormat:return`Expected string to match '${e.schema.format}' format`;case nt.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case nt.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case nt.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case nt.String:return"Expected string";case nt.Symbol:return"Expected symbol";case nt.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case nt.Tuple:return"Expected tuple";case nt.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case nt.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case nt.Uint8Array:return"Expected Uint8Array";case nt.Undefined:return"Expected undefined";case nt.Union:return"Expected union value";case nt.Void:return"Expected void";case nt.Kind:return`Expected kind '${e.schema[ot]}'`;default:return"Unknown error type"}}s(Snt,"DefaultErrorFunction");var Rnt=Snt;function N3e(){return Rnt}s(N3e,"GetErrorFunction");d();var OZ=class extends xn{static{s(this,"TypeDereferenceError")}constructor(t){super(`Unable to dereference schema with $id '${t.$ref}'`),this.schema=t}};function knt(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new OZ(e);return Yi(r,t)}s(knt,"Resolve");function _l(e,t){return!Ui(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}s(_l,"Pushref");function Yi(e,t){return e[ot]==="This"||e[ot]==="Ref"?knt(e,t):e}s(Yi,"Deref");d();var UZ=class extends xn{static{s(this,"ValueHashError")}constructor(t){super("Unable to hash value"),this.value=t}},nf;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(nf||(nf={}));var XI=BigInt("14695981039346656037"),[Bnt,Dnt]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Pnt=Array.from({length:256}).map((e,t)=>BigInt(t)),L3e=new Float64Array(1),F3e=new DataView(L3e.buffer),M3e=new Uint8Array(L3e.buffer);function*Nnt(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}s(Nnt,"NumberToBytes");function Lnt(e){Qc(nf.Array);for(let t of e)ZI(t)}s(Lnt,"ArrayType");function Fnt(e){Qc(nf.Boolean),Qc(e?1:0)}s(Fnt,"BooleanType");function Mnt(e){Qc(nf.BigInt),F3e.setBigInt64(0,e);for(let t of M3e)Qc(t)}s(Mnt,"BigIntType");function Qnt(e){Qc(nf.Date),ZI(e.getTime())}s(Qnt,"DateType");function Ont(e){Qc(nf.Null)}s(Ont,"NullType");function Unt(e){Qc(nf.Number),F3e.setFloat64(0,e);for(let t of M3e)Qc(t)}s(Unt,"NumberType");function qnt(e){Qc(nf.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())ZI(t),ZI(e[t])}s(qnt,"ObjectType");function Wnt(e){Qc(nf.String);for(let t=0;t<e.length;t++)for(let r of Nnt(e.charCodeAt(t)))Qc(r)}s(Wnt,"StringType");function Gnt(e){Qc(nf.Symbol),ZI(e.description)}s(Gnt,"SymbolType");function Hnt(e){Qc(nf.Uint8Array);for(let t=0;t<e.length;t++)Qc(e[t])}s(Hnt,"Uint8ArrayType");function jnt(e){return Qc(nf.Undefined)}s(jnt,"UndefinedType");function ZI(e){if(Cn(e))return Lnt(e);if(jp(e))return Fnt(e);if(tc(e))return Mnt(e);if(d0(e))return Qnt(e);if(tA(e))return Ont(e);if(Xr(e))return Unt(e);if(ui(e))return qnt(e);if(Ui(e))return Wnt(e);if(rA(e))return Gnt(e);if(dI(e))return Hnt(e);if(cs(e))return jnt(e);throw new UZ(e)}s(ZI,"Visit");function Qc(e){XI=XI^Pnt[e],XI=XI*Bnt%Dnt}s(Qc,"FNV1A64");function E5(e){return XI=BigInt("14695981039346656037"),ZI(e),XI}s(E5,"Hash");d();var qZ=class extends xn{static{s(this,"ValueCheckUnknownTypeError")}constructor(t){super("Unknown type"),this.schema=t}};function Vnt(e){return e[ot]==="Any"||e[ot]==="Unknown"}s(Vnt,"IsAnyOrUnknown");function Ei(e){return e!==void 0}s(Ei,"IsDefined");function $nt(e,t,r){return!0}s($nt,"FromAny");function znt(e,t,r){return!0}s(znt,"FromArgument");function Ynt(e,t,r){if(!Cn(r)||Ei(e.minItems)&&!(r.length>=e.minItems)||Ei(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(o=>Sl(e.items,t,o))||e.uniqueItems===!0&&!function(){let o=new Set;for(let a of r){let l=E5(a);if(o.has(l))return!1;o.add(l)}return!0}())return!1;if(!(Ei(e.contains)||Xr(e.minContains)||Xr(e.maxContains)))return!0;let n=Ei(e.contains)?e.contains:ni(),i=r.reduce((o,a)=>Sl(n,t,a)?o+1:o,0);return!(i===0||Xr(e.minContains)&&i<e.minContains||Xr(e.maxContains)&&i>e.maxContains)}s(Ynt,"FromArray");function Knt(e,t,r){return WN(r)}s(Knt,"FromAsyncIterator");function Jnt(e,t,r){return!(!tc(r)||Ei(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Ei(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Ei(e.maximum)&&!(r<=e.maximum)||Ei(e.minimum)&&!(r>=e.minimum)||Ei(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}s(Jnt,"FromBigInt");function Xnt(e,t,r){return jp(r)}s(Xnt,"FromBoolean");function Znt(e,t,r){return Sl(e.returns,t,r.prototype)}s(Znt,"FromConstructor");function eit(e,t,r){return!(!d0(r)||Ei(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||Ei(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||Ei(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||Ei(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||Ei(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}s(eit,"FromDate");function tit(e,t,r){return o5(r)}s(tit,"FromFunction");function rit(e,t,r){let n=globalThis.Object.values(e.$defs),i=e.$defs[e.$ref];return Sl(i,[...t,...n],r)}s(rit,"FromImport");function nit(e,t,r){return!(!jN(r)||Ei(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Ei(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Ei(e.maximum)&&!(r<=e.maximum)||Ei(e.minimum)&&!(r>=e.minimum)||Ei(e.multipleOf)&&r%e.multipleOf!==0)}s(nit,"FromInteger");function iit(e,t,r){let n=e.allOf.every(i=>Sl(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(lA(e)),o=Object.getOwnPropertyNames(r).every(a=>i.test(a));return n&&o}else if(Ns(e.unevaluatedProperties)){let i=new RegExp(lA(e)),o=Object.getOwnPropertyNames(r).every(a=>i.test(a)||Sl(e.unevaluatedProperties,t,r[a]));return n&&o}else return n}s(iit,"FromIntersect");function oit(e,t,r){return GN(r)}s(oit,"FromIterator");function sit(e,t,r){return r===e.const}s(sit,"FromLiteral");function ait(e,t,r){return!1}s(ait,"FromNever");function lit(e,t,r){return!Sl(e.not,t,r)}s(lit,"FromNot");function cit(e,t,r){return tA(r)}s(cit,"FromNull");function uit(e,t,r){return!(!Yo.IsNumberLike(r)||Ei(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Ei(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Ei(e.minimum)&&!(r>=e.minimum)||Ei(e.maximum)&&!(r<=e.maximum)||Ei(e.multipleOf)&&r%e.multipleOf!==0)}s(uit,"FromNumber");function fit(e,t,r){if(!Yo.IsObjectLike(r)||Ei(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Ei(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let o=e.properties[i];if(e.required&&e.required.includes(i)){if(!Sl(o,t,r[i])||(cA(o)||Vnt(o))&&!(i in r))return!1}else if(Yo.IsExactOptionalProperty(r,i)&&!Sl(o,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(o=>n.includes(o))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(o=>n.includes(o)||Sl(e.additionalProperties,t,r[o])):!0}s(fit,"FromObject");function dit(e,t,r){return HN(r)}s(dit,"FromPromise");function mit(e,t,r){if(!Yo.IsRecordLike(r)||Ei(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Ei(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],o=new RegExp(n),a=Object.entries(r).every(([u,f])=>o.test(u)?Sl(i,t,f):!0),l=typeof e.additionalProperties=="object"?Object.entries(r).every(([u,f])=>o.test(u)?!0:Sl(e.additionalProperties,t,f)):!0,c=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(u=>o.test(u)):!0;return a&&l&&c}s(mit,"FromRecord");function hit(e,t,r){return Sl(Yi(e,t),t,r)}s(hit,"FromRef");function pit(e,t,r){let n=new RegExp(e.source,e.flags);return Ei(e.minLength)&&!(r.length>=e.minLength)||Ei(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}s(pit,"FromRegExp");function git(e,t,r){return!Ui(r)||Ei(e.minLength)&&!(r.length>=e.minLength)||Ei(e.maxLength)&&!(r.length<=e.maxLength)||Ei(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:Ei(e.format)?eh.Has(e.format)?eh.Get(e.format)(r):!1:!0}s(git,"FromString");function Ait(e,t,r){return rA(r)}s(Ait,"FromSymbol");function yit(e,t,r){return Ui(r)&&new RegExp(e.pattern).test(r)}s(yit,"FromTemplateLiteral");function Cit(e,t,r){return Sl(Yi(e,t),t,r)}s(Cit,"FromThis");function xit(e,t,r){if(!Cn(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!Sl(e.items[n],t,r[n]))return!1;return!0}s(xit,"FromTuple");function vit(e,t,r){return cs(r)}s(vit,"FromUndefined");function bit(e,t,r){return e.anyOf.some(n=>Sl(n,t,r))}s(bit,"FromUnion");function Eit(e,t,r){return!(!dI(r)||Ei(e.maxByteLength)&&!(r.length<=e.maxByteLength)||Ei(e.minByteLength)&&!(r.length>=e.minByteLength))}s(Eit,"FromUint8Array");function Iit(e,t,r){return!0}s(Iit,"FromUnknown");function Tit(e,t,r){return Yo.IsVoidLike(r)}s(Tit,"FromVoid");function wit(e,t,r){return m0.Has(e[ot])?m0.Get(e[ot])(e,r):!1}s(wit,"FromKind");function Sl(e,t,r){let n=Ei(e.$id)?_l(e,t):t,i=e;switch(i[ot]){case"Any":return $nt(i,n,r);case"Argument":return znt(i,n,r);case"Array":return Ynt(i,n,r);case"AsyncIterator":return Knt(i,n,r);case"BigInt":return Jnt(i,n,r);case"Boolean":return Xnt(i,n,r);case"Constructor":return Znt(i,n,r);case"Date":return eit(i,n,r);case"Function":return tit(i,n,r);case"Import":return rit(i,n,r);case"Integer":return nit(i,n,r);case"Intersect":return iit(i,n,r);case"Iterator":return oit(i,n,r);case"Literal":return sit(i,n,r);case"Never":return ait(i,n,r);case"Not":return lit(i,n,r);case"Null":return cit(i,n,r);case"Number":return uit(i,n,r);case"Object":return fit(i,n,r);case"Promise":return dit(i,n,r);case"Record":return mit(i,n,r);case"Ref":return hit(i,n,r);case"RegExp":return pit(i,n,r);case"String":return git(i,n,r);case"Symbol":return Ait(i,n,r);case"TemplateLiteral":return yit(i,n,r);case"This":return Cit(i,n,r);case"Tuple":return xit(i,n,r);case"Undefined":return vit(i,n,r);case"Union":return bit(i,n,r);case"Uint8Array":return Eit(i,n,r);case"Unknown":return Iit(i,n,r);case"Void":return Tit(i,n,r);default:if(!m0.Has(i[ot]))throw new qZ(i);return wit(i,n,r)}}s(Sl,"Visit");function mi(...e){return e.length===3?Sl(e[0],e[1],e[2]):Sl(e[0],[],e[1])}s(mi,"Check");var nt;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(nt||(nt={}));var WZ=class extends xn{static{s(this,"ValueErrorsUnknownTypeError")}constructor(t){super("Unknown type"),this.schema=t}};function dA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}s(dA,"EscapeKey");function Ii(e){return e!==void 0}s(Ii,"IsDefined");var I5=class{static{s(this,"ValueErrorIterator")}constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};function br(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:N3e()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}s(br,"Create");function*_it(e,t,r,n){}s(_it,"FromAny");function*Sit(e,t,r,n){}s(Sit,"FromArgument");function*Rit(e,t,r,n){if(!Cn(n))return yield br(nt.Array,e,r,n);Ii(e.minItems)&&!(n.length>=e.minItems)&&(yield br(nt.ArrayMinItems,e,r,n)),Ii(e.maxItems)&&!(n.length<=e.maxItems)&&(yield br(nt.ArrayMaxItems,e,r,n));for(let a=0;a<n.length;a++)yield*Rl(e.items,t,`${r}/${a}`,n[a]);if(e.uniqueItems===!0&&!function(){let a=new Set;for(let l of n){let c=E5(l);if(a.has(c))return!1;a.add(c)}return!0}()&&(yield br(nt.ArrayUniqueItems,e,r,n)),!(Ii(e.contains)||Ii(e.minContains)||Ii(e.maxContains)))return;let i=Ii(e.contains)?e.contains:ni(),o=n.reduce((a,l,c)=>Rl(i,t,`${r}${c}`,l).next().done===!0?a+1:a,0);o===0&&(yield br(nt.ArrayContains,e,r,n)),Xr(e.minContains)&&o<e.minContains&&(yield br(nt.ArrayMinContains,e,r,n)),Xr(e.maxContains)&&o>e.maxContains&&(yield br(nt.ArrayMaxContains,e,r,n))}s(Rit,"FromArray");function*kit(e,t,r,n){WN(n)||(yield br(nt.AsyncIterator,e,r,n))}s(kit,"FromAsyncIterator");function*Bit(e,t,r,n){if(!tc(n))return yield br(nt.BigInt,e,r,n);Ii(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield br(nt.BigIntExclusiveMaximum,e,r,n)),Ii(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield br(nt.BigIntExclusiveMinimum,e,r,n)),Ii(e.maximum)&&!(n<=e.maximum)&&(yield br(nt.BigIntMaximum,e,r,n)),Ii(e.minimum)&&!(n>=e.minimum)&&(yield br(nt.BigIntMinimum,e,r,n)),Ii(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield br(nt.BigIntMultipleOf,e,r,n))}s(Bit,"FromBigInt");function*Dit(e,t,r,n){jp(n)||(yield br(nt.Boolean,e,r,n))}s(Dit,"FromBoolean");function*Pit(e,t,r,n){yield*Rl(e.returns,t,r,n.prototype)}s(Pit,"FromConstructor");function*Nit(e,t,r,n){if(!d0(n))return yield br(nt.Date,e,r,n);Ii(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield br(nt.DateExclusiveMaximumTimestamp,e,r,n)),Ii(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield br(nt.DateExclusiveMinimumTimestamp,e,r,n)),Ii(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield br(nt.DateMaximumTimestamp,e,r,n)),Ii(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield br(nt.DateMinimumTimestamp,e,r,n)),Ii(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield br(nt.DateMultipleOfTimestamp,e,r,n))}s(Nit,"FromDate");function*Lit(e,t,r,n){o5(n)||(yield br(nt.Function,e,r,n))}s(Lit,"FromFunction");function*Fit(e,t,r,n){let i=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];yield*Rl(o,[...t,...i],r,n)}s(Fit,"FromImport");function*Mit(e,t,r,n){if(!jN(n))return yield br(nt.Integer,e,r,n);Ii(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield br(nt.IntegerExclusiveMaximum,e,r,n)),Ii(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield br(nt.IntegerExclusiveMinimum,e,r,n)),Ii(e.maximum)&&!(n<=e.maximum)&&(yield br(nt.IntegerMaximum,e,r,n)),Ii(e.minimum)&&!(n>=e.minimum)&&(yield br(nt.IntegerMinimum,e,r,n)),Ii(e.multipleOf)&&n%e.multipleOf!==0&&(yield br(nt.IntegerMultipleOf,e,r,n))}s(Mit,"FromInteger");function*Qit(e,t,r,n){let i=!1;for(let o of e.allOf)for(let a of Rl(o,t,r,n))i=!0,yield a;if(i)return yield br(nt.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let o=new RegExp(lA(e));for(let a of Object.getOwnPropertyNames(n))o.test(a)||(yield br(nt.IntersectUnevaluatedProperties,e,`${r}/${a}`,n))}if(typeof e.unevaluatedProperties=="object"){let o=new RegExp(lA(e));for(let a of Object.getOwnPropertyNames(n))if(!o.test(a)){let l=Rl(e.unevaluatedProperties,t,`${r}/${a}`,n[a]).next();l.done||(yield l.value)}}}s(Qit,"FromIntersect");function*Oit(e,t,r,n){GN(n)||(yield br(nt.Iterator,e,r,n))}s(Oit,"FromIterator");function*Uit(e,t,r,n){n!==e.const&&(yield br(nt.Literal,e,r,n))}s(Uit,"FromLiteral");function*qit(e,t,r,n){yield br(nt.Never,e,r,n)}s(qit,"FromNever");function*Wit(e,t,r,n){Rl(e.not,t,r,n).next().done===!0&&(yield br(nt.Not,e,r,n))}s(Wit,"FromNot");function*Git(e,t,r,n){tA(n)||(yield br(nt.Null,e,r,n))}s(Git,"FromNull");function*Hit(e,t,r,n){if(!Yo.IsNumberLike(n))return yield br(nt.Number,e,r,n);Ii(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield br(nt.NumberExclusiveMaximum,e,r,n)),Ii(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield br(nt.NumberExclusiveMinimum,e,r,n)),Ii(e.maximum)&&!(n<=e.maximum)&&(yield br(nt.NumberMaximum,e,r,n)),Ii(e.minimum)&&!(n>=e.minimum)&&(yield br(nt.NumberMinimum,e,r,n)),Ii(e.multipleOf)&&n%e.multipleOf!==0&&(yield br(nt.NumberMultipleOf,e,r,n))}s(Hit,"FromNumber");function*jit(e,t,r,n){if(!Yo.IsObjectLike(n))return yield br(nt.Object,e,r,n);Ii(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield br(nt.ObjectMinProperties,e,r,n)),Ii(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield br(nt.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],o=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(n);for(let l of i)a.includes(l)||(yield br(nt.ObjectRequiredProperty,e.properties[l],`${r}/${dA(l)}`,void 0));if(e.additionalProperties===!1)for(let l of a)o.includes(l)||(yield br(nt.ObjectAdditionalProperties,e,`${r}/${dA(l)}`,n[l]));if(typeof e.additionalProperties=="object")for(let l of a)o.includes(l)||(yield*Rl(e.additionalProperties,t,`${r}/${dA(l)}`,n[l]));for(let l of o){let c=e.properties[l];e.required&&e.required.includes(l)?(yield*Rl(c,t,`${r}/${dA(l)}`,n[l]),cA(e)&&!(l in n)&&(yield br(nt.ObjectRequiredProperty,c,`${r}/${dA(l)}`,void 0))):Yo.IsExactOptionalProperty(n,l)&&(yield*Rl(c,t,`${r}/${dA(l)}`,n[l]))}}s(jit,"FromObject");function*Vit(e,t,r,n){HN(n)||(yield br(nt.Promise,e,r,n))}s(Vit,"FromPromise");function*$it(e,t,r,n){if(!Yo.IsRecordLike(n))return yield br(nt.Object,e,r,n);Ii(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield br(nt.ObjectMinProperties,e,r,n)),Ii(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield br(nt.ObjectMaxProperties,e,r,n));let[i,o]=Object.entries(e.patternProperties)[0],a=new RegExp(i);for(let[l,c]of Object.entries(n))a.test(l)&&(yield*Rl(o,t,`${r}/${dA(l)}`,c));if(typeof e.additionalProperties=="object")for(let[l,c]of Object.entries(n))a.test(l)||(yield*Rl(e.additionalProperties,t,`${r}/${dA(l)}`,c));if(e.additionalProperties===!1){for(let[l,c]of Object.entries(n))if(!a.test(l))return yield br(nt.ObjectAdditionalProperties,e,`${r}/${dA(l)}`,c)}}s($it,"FromRecord");function*zit(e,t,r,n){yield*Rl(Yi(e,t),t,r,n)}s(zit,"FromRef");function*Yit(e,t,r,n){if(!Ui(n))return yield br(nt.String,e,r,n);if(Ii(e.minLength)&&!(n.length>=e.minLength)&&(yield br(nt.StringMinLength,e,r,n)),Ii(e.maxLength)&&!(n.length<=e.maxLength)&&(yield br(nt.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield br(nt.RegExp,e,r,n)}s(Yit,"FromRegExp");function*Kit(e,t,r,n){if(!Ui(n))return yield br(nt.String,e,r,n);Ii(e.minLength)&&!(n.length>=e.minLength)&&(yield br(nt.StringMinLength,e,r,n)),Ii(e.maxLength)&&!(n.length<=e.maxLength)&&(yield br(nt.StringMaxLength,e,r,n)),Ui(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield br(nt.StringPattern,e,r,n))),Ui(e.format)&&(eh.Has(e.format)?eh.Get(e.format)(n)||(yield br(nt.StringFormat,e,r,n)):yield br(nt.StringFormatUnknown,e,r,n))}s(Kit,"FromString");function*Jit(e,t,r,n){rA(n)||(yield br(nt.Symbol,e,r,n))}s(Jit,"FromSymbol");function*Xit(e,t,r,n){if(!Ui(n))return yield br(nt.String,e,r,n);new RegExp(e.pattern).test(n)||(yield br(nt.StringPattern,e,r,n))}s(Xit,"FromTemplateLiteral");function*Zit(e,t,r,n){yield*Rl(Yi(e,t),t,r,n)}s(Zit,"FromThis");function*eot(e,t,r,n){if(!Cn(n))return yield br(nt.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield br(nt.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield br(nt.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*Rl(e.items[i],t,`${r}/${i}`,n[i])}s(eot,"FromTuple");function*tot(e,t,r,n){cs(n)||(yield br(nt.Undefined,e,r,n))}s(tot,"FromUndefined");function*rot(e,t,r,n){if(mi(e,t,n))return;let i=e.anyOf.map(o=>new I5(Rl(o,t,r,n)));yield br(nt.Union,e,r,n,i)}s(rot,"FromUnion");function*not(e,t,r,n){if(!dI(n))return yield br(nt.Uint8Array,e,r,n);Ii(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield br(nt.Uint8ArrayMaxByteLength,e,r,n)),Ii(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield br(nt.Uint8ArrayMinByteLength,e,r,n))}s(not,"FromUint8Array");function*iot(e,t,r,n){}s(iot,"FromUnknown");function*oot(e,t,r,n){Yo.IsVoidLike(n)||(yield br(nt.Void,e,r,n))}s(oot,"FromVoid");function*sot(e,t,r,n){m0.Get(e[ot])(e,n)||(yield br(nt.Kind,e,r,n))}s(sot,"FromKind");function*Rl(e,t,r,n){let i=Ii(e.$id)?[...t,e]:t,o=e;switch(o[ot]){case"Any":return yield*_it(o,i,r,n);case"Argument":return yield*Sit(o,i,r,n);case"Array":return yield*Rit(o,i,r,n);case"AsyncIterator":return yield*kit(o,i,r,n);case"BigInt":return yield*Bit(o,i,r,n);case"Boolean":return yield*Dit(o,i,r,n);case"Constructor":return yield*Pit(o,i,r,n);case"Date":return yield*Nit(o,i,r,n);case"Function":return yield*Lit(o,i,r,n);case"Import":return yield*Fit(o,i,r,n);case"Integer":return yield*Mit(o,i,r,n);case"Intersect":return yield*Qit(o,i,r,n);case"Iterator":return yield*Oit(o,i,r,n);case"Literal":return yield*Uit(o,i,r,n);case"Never":return yield*qit(o,i,r,n);case"Not":return yield*Wit(o,i,r,n);case"Null":return yield*Git(o,i,r,n);case"Number":return yield*Hit(o,i,r,n);case"Object":return yield*jit(o,i,r,n);case"Promise":return yield*Vit(o,i,r,n);case"Record":return yield*$it(o,i,r,n);case"Ref":return yield*zit(o,i,r,n);case"RegExp":return yield*Yit(o,i,r,n);case"String":return yield*Kit(o,i,r,n);case"Symbol":return yield*Jit(o,i,r,n);case"TemplateLiteral":return yield*Xit(o,i,r,n);case"This":return yield*Zit(o,i,r,n);case"Tuple":return yield*eot(o,i,r,n);case"Undefined":return yield*tot(o,i,r,n);case"Union":return yield*rot(o,i,r,n);case"Uint8Array":return yield*not(o,i,r,n);case"Unknown":return yield*iot(o,i,r,n);case"Void":return yield*oot(o,i,r,n);default:if(!m0.Has(o[ot]))throw new WZ(e);return yield*sot(o,i,r,n)}}s(Rl,"Visit");function rg(...e){let t=e.length===3?Rl(e[0],e[1],"",e[2]):Rl(e[0],[],"",e[1]);return new I5(t)}s(rg,"Errors");d();d();var e8=class extends xn{static{s(this,"TransformDecodeCheckError")}constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}},GZ=class extends xn{static{s(this,"TransformDecodeError")}constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};function Fs(e,t,r){try{return oo(e)?e[Ps].Decode(r):r}catch(n){throw new GZ(e,t,r,n)}}s(Fs,"Default");function aot(e,t,r,n){return Cn(n)?Fs(e,r,n.map((i,o)=>ah(e.items,t,`${r}/${o}`,i))):Fs(e,r,n)}s(aot,"FromArray");function lot(e,t,r,n){if(!ui(n)||zu(n))return Fs(e,r,n);let i=eL(e),o=i.map(f=>f[0]),a={...n};for(let[f,m]of i)f in a&&(a[f]=ah(m,t,`${r}/${f}`,a[f]));if(!oo(e.unevaluatedProperties))return Fs(e,r,a);let l=Object.getOwnPropertyNames(a),c=e.unevaluatedProperties,u={...a};for(let f of l)o.includes(f)||(u[f]=Fs(c,`${r}/${f}`,u[f]));return Fs(e,r,u)}s(lot,"FromIntersect");function cot(e,t,r,n){let i=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref],a=ah(o,[...t,...i],r,n);return Fs(e,r,a)}s(cot,"FromImport");function uot(e,t,r,n){return Fs(e,r,ah(e.not,t,r,n))}s(uot,"FromNot");function fot(e,t,r,n){if(!ui(n))return Fs(e,r,n);let i=X0(e),o={...n};for(let u of i)yn(o,u)&&(cs(o[u])&&(!oA(e.properties[u])||Yo.IsExactOptionalProperty(o,u))||(o[u]=ah(e.properties[u],t,`${r}/${u}`,o[u])));if(!Ns(e.additionalProperties))return Fs(e,r,o);let a=Object.getOwnPropertyNames(o),l=e.additionalProperties,c={...o};for(let u of a)i.includes(u)||(c[u]=Fs(l,`${r}/${u}`,c[u]));return Fs(e,r,c)}s(fot,"FromObject");function dot(e,t,r,n){if(!ui(n))return Fs(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],o=new RegExp(i),a={...n};for(let f of Object.getOwnPropertyNames(n))o.test(f)&&(a[f]=ah(e.patternProperties[i],t,`${r}/${f}`,a[f]));if(!Ns(e.additionalProperties))return Fs(e,r,a);let l=Object.getOwnPropertyNames(a),c=e.additionalProperties,u={...a};for(let f of l)o.test(f)||(u[f]=Fs(c,`${r}/${f}`,u[f]));return Fs(e,r,u)}s(dot,"FromRecord");function mot(e,t,r,n){let i=Yi(e,t);return Fs(e,r,ah(i,t,r,n))}s(mot,"FromRef");function hot(e,t,r,n){let i=Yi(e,t);return Fs(e,r,ah(i,t,r,n))}s(hot,"FromThis");function pot(e,t,r,n){return Cn(n)&&Cn(e.items)?Fs(e,r,e.items.map((i,o)=>ah(i,t,`${r}/${o}`,n[o]))):Fs(e,r,n)}s(pot,"FromTuple");function got(e,t,r,n){for(let i of e.anyOf){if(!mi(i,t,n))continue;let o=ah(i,t,r,n);return Fs(e,r,o)}return Fs(e,r,n)}s(got,"FromUnion");function ah(e,t,r,n){let i=_l(e,t),o=e;switch(e[ot]){case"Array":return aot(o,i,r,n);case"Import":return cot(o,i,r,n);case"Intersect":return lot(o,i,r,n);case"Not":return uot(o,i,r,n);case"Object":return fot(o,i,r,n);case"Record":return dot(o,i,r,n);case"Ref":return mot(o,i,r,n);case"Symbol":return Fs(o,r,n);case"This":return hot(o,i,r,n);case"Tuple":return pot(o,i,r,n);case"Union":return got(o,i,r,n);default:return Fs(o,r,n)}}s(ah,"Visit");function t8(e,t,r){return ah(e,t,"",r)}s(t8,"TransformDecode");d();var r8=class extends xn{static{s(this,"TransformEncodeCheckError")}constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}},HZ=class extends xn{static{s(this,"TransformEncodeError")}constructor(t,r,n,i){super(`${i instanceof Error?i.message:"Unknown error"}`),this.schema=t,this.path=r,this.value=n,this.error=i}};function oc(e,t,r){try{return oo(e)?e[Ps].Encode(r):r}catch(n){throw new HZ(e,t,r,n)}}s(oc,"Default");function Aot(e,t,r,n){let i=oc(e,r,n);return Cn(i)?i.map((o,a)=>lh(e.items,t,`${r}/${a}`,o)):i}s(Aot,"FromArray");function yot(e,t,r,n){let i=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref],a=oc(e,r,n);return lh(o,[...t,...i],r,a)}s(yot,"FromImport");function Cot(e,t,r,n){let i=oc(e,r,n);if(!ui(n)||zu(n))return i;let o=eL(e),a=o.map(m=>m[0]),l={...i};for(let[m,h]of o)m in l&&(l[m]=lh(h,t,`${r}/${m}`,l[m]));if(!oo(e.unevaluatedProperties))return l;let c=Object.getOwnPropertyNames(l),u=e.unevaluatedProperties,f={...l};for(let m of c)a.includes(m)||(f[m]=oc(u,`${r}/${m}`,f[m]));return f}s(Cot,"FromIntersect");function xot(e,t,r,n){return oc(e.not,r,oc(e,r,n))}s(xot,"FromNot");function vot(e,t,r,n){let i=oc(e,r,n);if(!ui(i))return i;let o=X0(e),a={...i};for(let f of o)yn(a,f)&&(cs(a[f])&&(!oA(e.properties[f])||Yo.IsExactOptionalProperty(a,f))||(a[f]=lh(e.properties[f],t,`${r}/${f}`,a[f])));if(!Ns(e.additionalProperties))return a;let l=Object.getOwnPropertyNames(a),c=e.additionalProperties,u={...a};for(let f of l)o.includes(f)||(u[f]=oc(c,`${r}/${f}`,u[f]));return u}s(vot,"FromObject");function bot(e,t,r,n){let i=oc(e,r,n);if(!ui(n))return i;let o=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(o),l={...i};for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(l[m]=lh(e.patternProperties[o],t,`${r}/${m}`,l[m]));if(!Ns(e.additionalProperties))return l;let c=Object.getOwnPropertyNames(l),u=e.additionalProperties,f={...l};for(let m of c)a.test(m)||(f[m]=oc(u,`${r}/${m}`,f[m]));return f}s(bot,"FromRecord");function Eot(e,t,r,n){let i=Yi(e,t),o=lh(i,t,r,n);return oc(e,r,o)}s(Eot,"FromRef");function Iot(e,t,r,n){let i=Yi(e,t),o=lh(i,t,r,n);return oc(e,r,o)}s(Iot,"FromThis");function Tot(e,t,r,n){let i=oc(e,r,n);return Cn(e.items)?e.items.map((o,a)=>lh(o,t,`${r}/${a}`,i[a])):[]}s(Tot,"FromTuple");function wot(e,t,r,n){for(let i of e.anyOf){if(!mi(i,t,n))continue;let o=lh(i,t,r,n);return oc(e,r,o)}for(let i of e.anyOf){let o=lh(i,t,r,n);if(mi(e,t,o))return oc(e,r,o)}return oc(e,r,n)}s(wot,"FromUnion");function lh(e,t,r,n){let i=_l(e,t),o=e;switch(e[ot]){case"Array":return Aot(o,i,r,n);case"Import":return yot(o,i,r,n);case"Intersect":return Cot(o,i,r,n);case"Not":return xot(o,i,r,n);case"Object":return vot(o,i,r,n);case"Record":return bot(o,i,r,n);case"Ref":return Eot(o,i,r,n);case"This":return Iot(o,i,r,n);case"Tuple":return Tot(o,i,r,n);case"Union":return wot(o,i,r,n);default:return oc(o,r,n)}}s(lh,"Visit");function n8(e,t,r){return lh(e,t,"",r)}s(n8,"TransformEncode");d();function _ot(e,t){return oo(e)||al(e.items,t)}s(_ot,"FromArray");function Sot(e,t){return oo(e)||al(e.items,t)}s(Sot,"FromAsyncIterator");function Rot(e,t){return oo(e)||al(e.returns,t)||e.parameters.some(r=>al(r,t))}s(Rot,"FromConstructor");function kot(e,t){return oo(e)||al(e.returns,t)||e.parameters.some(r=>al(r,t))}s(kot,"FromFunction");function Bot(e,t){return oo(e)||oo(e.unevaluatedProperties)||e.allOf.some(r=>al(r,t))}s(Bot,"FromIntersect");function Dot(e,t){let r=globalThis.Object.getOwnPropertyNames(e.$defs).reduce((i,o)=>[...i,e.$defs[o]],[]),n=e.$defs[e.$ref];return oo(e)||al(n,[...r,...t])}s(Dot,"FromImport");function Pot(e,t){return oo(e)||al(e.items,t)}s(Pot,"FromIterator");function Not(e,t){return oo(e)||al(e.not,t)}s(Not,"FromNot");function Lot(e,t){return oo(e)||Object.values(e.properties).some(r=>al(r,t))||Ns(e.additionalProperties)&&al(e.additionalProperties,t)}s(Lot,"FromObject");function Fot(e,t){return oo(e)||al(e.item,t)}s(Fot,"FromPromise");function Mot(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return oo(e)||al(n,t)||Ns(e.additionalProperties)&&oo(e.additionalProperties)}s(Mot,"FromRecord");function Qot(e,t){return oo(e)?!0:al(Yi(e,t),t)}s(Qot,"FromRef");function Oot(e,t){return oo(e)?!0:al(Yi(e,t),t)}s(Oot,"FromThis");function Uot(e,t){return oo(e)||!cs(e.items)&&e.items.some(r=>al(r,t))}s(Uot,"FromTuple");function qot(e,t){return oo(e)||e.anyOf.some(r=>al(r,t))}s(qot,"FromUnion");function al(e,t){let r=_l(e,t),n=e;if(e.$id&&jZ.has(e.$id))return!1;switch(e.$id&&jZ.add(e.$id),e[ot]){case"Array":return _ot(n,r);case"AsyncIterator":return Sot(n,r);case"Constructor":return Rot(n,r);case"Function":return kot(n,r);case"Import":return Dot(n,r);case"Intersect":return Bot(n,r);case"Iterator":return Pot(n,r);case"Not":return Not(n,r);case"Object":return Lot(n,r);case"Promise":return Fot(n,r);case"Record":return Mot(n,r);case"Ref":return Qot(n,r);case"This":return Oot(n,r);case"Tuple":return Uot(n,r);case"Union":return qot(n,r);default:return oo(e)}}s(al,"Visit");var jZ=new Set;function mA(e,t){return jZ.clear(),al(e,t)}s(mA,"HasTransform");var VZ=class{static{s(this,"TypeCheck")}constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=mA(t,r)}Code(){return this.code}Schema(){return this.schema}References(){return this.references}Errors(t){return rg(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new e8(this.schema,t,this.Errors(t).First());return this.hasTransform?t8(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?n8(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new r8(this.schema,t,this.Errors(t).First());return r}},hA;(function(e){function t(o){return o===36}s(t,"DollarSign"),e.DollarSign=t;function r(o){return o===95}s(r,"IsUnderscore"),e.IsUnderscore=r;function n(o){return o>=65&&o<=90||o>=97&&o<=122}s(n,"IsAlpha"),e.IsAlpha=n;function i(o){return o>=48&&o<=57}s(i,"IsNumeric"),e.IsNumeric=i})(hA||(hA={}));var cF;(function(e){function t(o){return o.length===0?!1:hA.IsNumeric(o.charCodeAt(0))}s(t,"IsFirstCharacterNumeric");function r(o){if(t(o))return!1;for(let a=0;a<o.length;a++){let l=o.charCodeAt(a);if(!(hA.IsAlpha(l)||hA.IsNumeric(l)||hA.DollarSign(l)||hA.IsUnderscore(l)))return!1}return!0}s(r,"IsAccessor");function n(o){return o.replace(/'/g,"\\'")}s(n,"EscapeHyphen");function i(o,a){return r(a)?`${o}.${a}`:`${o}['${n(a)}']`}s(i,"Encode"),e.Encode=i})(cF||(cF={}));var $Z;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let o=r.charCodeAt(i);hA.IsNumeric(o)||hA.IsAlpha(o)?n.push(r.charAt(i)):n.push(`_${o}_`)}return n.join("").replace(/__/g,"_")}s(t,"Encode"),e.Encode=t})($Z||($Z={}));var zZ;(function(e){function t(r){return r.replace(/'/g,"\\'")}s(t,"Escape"),e.Escape=t})(zZ||(zZ={}));var YZ=class extends xn{static{s(this,"TypeCompilerUnknownTypeError")}constructor(t){super("Unknown type"),this.schema=t}},uF=class extends xn{static{s(this,"TypeCompilerTypeGuardError")}constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}},ev;(function(e){function t(a,l,c){return Yo.ExactOptionalPropertyTypes?`('${l}' in ${a} ? ${c} : true)`:`(${cF.Encode(a,l)} !== undefined ? ${c} : true)`}s(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){return Yo.AllowArrayObject?`(typeof ${a} === 'object' && ${a} !== null)`:`(typeof ${a} === 'object' && ${a} !== null && !Array.isArray(${a}))`}s(r,"IsObjectLike"),e.IsObjectLike=r;function n(a){return Yo.AllowArrayObject?`(typeof ${a} === 'object' && ${a} !== null && !(${a} instanceof Date) && !(${a} instanceof Uint8Array))`:`(typeof ${a} === 'object' && ${a} !== null && !Array.isArray(${a}) && !(${a} instanceof Date) && !(${a} instanceof Uint8Array))`}s(n,"IsRecordLike"),e.IsRecordLike=n;function i(a){return Yo.AllowNaN?`typeof ${a} === 'number'`:`Number.isFinite(${a})`}s(i,"IsNumberLike"),e.IsNumberLike=i;function o(a){return Yo.AllowNullVoid?`(${a} === undefined || ${a} === null)`:`${a} === undefined`}s(o,"IsVoidLike"),e.IsVoidLike=o})(ev||(ev={}));var hs;(function(e){function t(oe){return oe[ot]==="Any"||oe[ot]==="Unknown"}s(t,"IsAnyOrUnknown");function*r(oe,Ne,Ae){yield"true"}s(r,"FromAny");function*n(oe,Ne,Ae){yield"true"}s(n,"FromArgument");function*i(oe,Ne,Ae){yield`Array.isArray(${Ae})`;let[Ge,Y]=[Re("value","any"),Re("acc","number")];Xr(oe.maxItems)&&(yield`${Ae}.length <= ${oe.maxItems}`),Xr(oe.minItems)&&(yield`${Ae}.length >= ${oe.minItems}`);let ne=ce(oe.items,Ne,"value");if(yield`${Ae}.every((${Ge}) => ${ne})`,ds(oe.contains)||Xr(oe.minContains)||Xr(oe.maxContains)){let Fe=ds(oe.contains)?oe.contains:ni(),Se=ce(Fe,Ne,"value"),Ce=Xr(oe.minContains)?[`(count >= ${oe.minContains})`]:[],Ue=Xr(oe.maxContains)?[`(count <= ${oe.maxContains})`]:[],Ve=`const count = value.reduce((${Y}, ${Ge}) => ${Se} ? acc + 1 : acc, 0)`,tt=["(count > 0)",...Ce,...Ue].join(" && ");yield`((${Ge}) => { ${Ve}; return ${tt}})(${Ae})`}oe.uniqueItems===!0&&(yield`((${Ge}) => { const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true } )(${Ae})`)}s(i,"FromArray");function*o(oe,Ne,Ae){yield`(typeof value === 'object' && Symbol.asyncIterator in ${Ae})`}s(o,"FromAsyncIterator");function*a(oe,Ne,Ae){yield`(typeof ${Ae} === 'bigint')`,tc(oe.exclusiveMaximum)&&(yield`${Ae} < BigInt(${oe.exclusiveMaximum})`),tc(oe.exclusiveMinimum)&&(yield`${Ae} > BigInt(${oe.exclusiveMinimum})`),tc(oe.maximum)&&(yield`${Ae} <= BigInt(${oe.maximum})`),tc(oe.minimum)&&(yield`${Ae} >= BigInt(${oe.minimum})`),tc(oe.multipleOf)&&(yield`(${Ae} % BigInt(${oe.multipleOf})) === 0`)}s(a,"FromBigInt");function*l(oe,Ne,Ae){yield`(typeof ${Ae} === 'boolean')`}s(l,"FromBoolean");function*c(oe,Ne,Ae){yield*re(oe.returns,Ne,`${Ae}.prototype`)}s(c,"FromConstructor");function*u(oe,Ne,Ae){yield`(${Ae} instanceof Date) && Number.isFinite(${Ae}.getTime())`,Xr(oe.exclusiveMaximumTimestamp)&&(yield`${Ae}.getTime() < ${oe.exclusiveMaximumTimestamp}`),Xr(oe.exclusiveMinimumTimestamp)&&(yield`${Ae}.getTime() > ${oe.exclusiveMinimumTimestamp}`),Xr(oe.maximumTimestamp)&&(yield`${Ae}.getTime() <= ${oe.maximumTimestamp}`),Xr(oe.minimumTimestamp)&&(yield`${Ae}.getTime() >= ${oe.minimumTimestamp}`),Xr(oe.multipleOfTimestamp)&&(yield`(${Ae}.getTime() % ${oe.multipleOfTimestamp}) === 0`)}s(u,"FromDate");function*f(oe,Ne,Ae){yield`(typeof ${Ae} === 'function')`}s(f,"FromFunction");function*m(oe,Ne,Ae){let Ge=globalThis.Object.getOwnPropertyNames(oe.$defs).reduce((Y,ne)=>[...Y,oe.$defs[ne]],[]);yield*re(vd(oe.$ref),[...Ne,...Ge],Ae)}s(m,"FromImport");function*h(oe,Ne,Ae){yield`Number.isInteger(${Ae})`,Xr(oe.exclusiveMaximum)&&(yield`${Ae} < ${oe.exclusiveMaximum}`),Xr(oe.exclusiveMinimum)&&(yield`${Ae} > ${oe.exclusiveMinimum}`),Xr(oe.maximum)&&(yield`${Ae} <= ${oe.maximum}`),Xr(oe.minimum)&&(yield`${Ae} >= ${oe.minimum}`),Xr(oe.multipleOf)&&(yield`(${Ae} % ${oe.multipleOf}) === 0`)}s(h,"FromInteger");function*p(oe,Ne,Ae){let Ge=oe.allOf.map(Y=>ce(Y,Ne,Ae)).join(" && ");if(oe.unevaluatedProperties===!1){let Y=be(`${new RegExp(lA(oe))};`),ne=`Object.getOwnPropertyNames(${Ae}).every(key => ${Y}.test(key))`;yield`(${Ge} && ${ne})`}else if(ds(oe.unevaluatedProperties)){let Y=be(`${new RegExp(lA(oe))};`),ne=`Object.getOwnPropertyNames(${Ae}).every(key => ${Y}.test(key) || ${ce(oe.unevaluatedProperties,Ne,`${Ae}[key]`)})`;yield`(${Ge} && ${ne})`}else yield`(${Ge})`}s(p,"FromIntersect");function*g(oe,Ne,Ae){yield`(typeof value === 'object' && Symbol.iterator in ${Ae})`}s(g,"FromIterator");function*y(oe,Ne,Ae){typeof oe.const=="number"||typeof oe.const=="boolean"?yield`(${Ae} === ${oe.const})`:yield`(${Ae} === '${zZ.Escape(oe.const)}')`}s(y,"FromLiteral");function*x(oe,Ne,Ae){yield"false"}s(x,"FromNever");function*b(oe,Ne,Ae){yield`(!${ce(oe.not,Ne,Ae)})`}s(b,"FromNot");function*E(oe,Ne,Ae){yield`(${Ae} === null)`}s(E,"FromNull");function*_(oe,Ne,Ae){yield ev.IsNumberLike(Ae),Xr(oe.exclusiveMaximum)&&(yield`${Ae} < ${oe.exclusiveMaximum}`),Xr(oe.exclusiveMinimum)&&(yield`${Ae} > ${oe.exclusiveMinimum}`),Xr(oe.maximum)&&(yield`${Ae} <= ${oe.maximum}`),Xr(oe.minimum)&&(yield`${Ae} >= ${oe.minimum}`),Xr(oe.multipleOf)&&(yield`(${Ae} % ${oe.multipleOf}) === 0`)}s(_,"FromNumber");function*k(oe,Ne,Ae){yield ev.IsObjectLike(Ae),Xr(oe.minProperties)&&(yield`Object.getOwnPropertyNames(${Ae}).length >= ${oe.minProperties}`),Xr(oe.maxProperties)&&(yield`Object.getOwnPropertyNames(${Ae}).length <= ${oe.maxProperties}`);let Ge=Object.getOwnPropertyNames(oe.properties);for(let Y of Ge){let ne=cF.Encode(Ae,Y),Fe=oe.properties[Y];if(oe.required&&oe.required.includes(Y))yield*re(Fe,Ne,ne),(cA(Fe)||t(Fe))&&(yield`('${Y}' in ${Ae})`);else{let Se=ce(Fe,Ne,ne);yield ev.IsExactOptionalProperty(Ae,Y,Se)}}if(oe.additionalProperties===!1)if(oe.required&&oe.required.length===Ge.length)yield`Object.getOwnPropertyNames(${Ae}).length === ${Ge.length}`;else{let Y=`[${Ge.map(ne=>`'${ne}'`).join(", ")}]`;yield`Object.getOwnPropertyNames(${Ae}).every(key => ${Y}.includes(key))`}if(typeof oe.additionalProperties=="object"){let Y=ce(oe.additionalProperties,Ne,`${Ae}[key]`),ne=`[${Ge.map(Fe=>`'${Fe}'`).join(", ")}]`;yield`(Object.getOwnPropertyNames(${Ae}).every(key => ${ne}.includes(key) || ${Y}))`}}s(k,"FromObject");function*B(oe,Ne,Ae){yield`${Ae} instanceof Promise`}s(B,"FromPromise");function*N(oe,Ne,Ae){yield ev.IsRecordLike(Ae),Xr(oe.minProperties)&&(yield`Object.getOwnPropertyNames(${Ae}).length >= ${oe.minProperties}`),Xr(oe.maxProperties)&&(yield`Object.getOwnPropertyNames(${Ae}).length <= ${oe.maxProperties}`);let[Ge,Y]=Object.entries(oe.patternProperties)[0],ne=be(`${new RegExp(Ge)}`),Fe=ce(Y,Ne,"value"),Se=ds(oe.additionalProperties)?ce(oe.additionalProperties,Ne,Ae):oe.additionalProperties===!1?"false":"true",Ce=`(${ne}.test(key) ? ${Fe} : ${Se})`;yield`(Object.entries(${Ae}).every(([key, value]) => ${Ce}))`}s(N,"FromRecord");function*M(oe,Ne,Ae){let Ge=Yi(oe,Ne);if(le.functions.has(oe.$ref))return yield`${De(oe.$ref)}(${Ae})`;yield*re(Ge,Ne,Ae)}s(M,"FromRef");function*Z(oe,Ne,Ae){let Ge=be(`${new RegExp(oe.source,oe.flags)};`);yield`(typeof ${Ae} === 'string')`,Xr(oe.maxLength)&&(yield`${Ae}.length <= ${oe.maxLength}`),Xr(oe.minLength)&&(yield`${Ae}.length >= ${oe.minLength}`),yield`${Ge}.test(${Ae})`}s(Z,"FromRegExp");function*he(oe,Ne,Ae){yield`(typeof ${Ae} === 'string')`,Xr(oe.maxLength)&&(yield`${Ae}.length <= ${oe.maxLength}`),Xr(oe.minLength)&&(yield`${Ae}.length >= ${oe.minLength}`),oe.pattern!==void 0&&(yield`${be(`${new RegExp(oe.pattern)};`)}.test(${Ae})`),oe.format!==void 0&&(yield`format('${oe.format}', ${Ae})`)}s(he,"FromString");function*ee(oe,Ne,Ae){yield`(typeof ${Ae} === 'symbol')`}s(ee,"FromSymbol");function*G(oe,Ne,Ae){yield`(typeof ${Ae} === 'string')`,yield`${be(`${new RegExp(oe.pattern)};`)}.test(${Ae})`}s(G,"FromTemplateLiteral");function*q(oe,Ne,Ae){yield`${De(oe.$ref)}(${Ae})`}s(q,"FromThis");function*ie(oe,Ne,Ae){if(yield`Array.isArray(${Ae})`,oe.items===void 0)return yield`${Ae}.length === 0`;yield`(${Ae}.length === ${oe.maxItems})`;for(let Ge=0;Ge<oe.items.length;Ge++)yield`${ce(oe.items[Ge],Ne,`${Ae}[${Ge}]`)}`}s(ie,"FromTuple");function*z(oe,Ne,Ae){yield`${Ae} === undefined`}s(z,"FromUndefined");function*j(oe,Ne,Ae){yield`(${oe.anyOf.map(Y=>ce(Y,Ne,Ae)).join(" || ")})`}s(j,"FromUnion");function*U(oe,Ne,Ae){yield`${Ae} instanceof Uint8Array`,Xr(oe.maxByteLength)&&(yield`(${Ae}.length <= ${oe.maxByteLength})`),Xr(oe.minByteLength)&&(yield`(${Ae}.length >= ${oe.minByteLength})`)}s(U,"FromUint8Array");function*V(oe,Ne,Ae){yield"true"}s(V,"FromUnknown");function*K(oe,Ne,Ae){yield ev.IsVoidLike(Ae)}s(K,"FromVoid");function*ae(oe,Ne,Ae){let Ge=le.instances.size;le.instances.set(Ge,oe),yield`kind('${oe[ot]}', ${Ge}, ${Ae})`}s(ae,"FromKind");function*re(oe,Ne,Ae,Ge=!0){let Y=Ui(oe.$id)?[...Ne,oe]:Ne,ne=oe;if(Ge&&Ui(oe.$id)){let Fe=De(oe.$id);if(le.functions.has(Fe))return yield`${Fe}(${Ae})`;{le.functions.set(Fe,"<deferred>");let Se=qe(Fe,oe,Ne,"value",!1);return le.functions.set(Fe,Se),yield`${Fe}(${Ae})`}}switch(ne[ot]){case"Any":return yield*r(ne,Y,Ae);case"Argument":return yield*n(ne,Y,Ae);case"Array":return yield*i(ne,Y,Ae);case"AsyncIterator":return yield*o(ne,Y,Ae);case"BigInt":return yield*a(ne,Y,Ae);case"Boolean":return yield*l(ne,Y,Ae);case"Constructor":return yield*c(ne,Y,Ae);case"Date":return yield*u(ne,Y,Ae);case"Function":return yield*f(ne,Y,Ae);case"Import":return yield*m(ne,Y,Ae);case"Integer":return yield*h(ne,Y,Ae);case"Intersect":return yield*p(ne,Y,Ae);case"Iterator":return yield*g(ne,Y,Ae);case"Literal":return yield*y(ne,Y,Ae);case"Never":return yield*x(ne,Y,Ae);case"Not":return yield*b(ne,Y,Ae);case"Null":return yield*E(ne,Y,Ae);case"Number":return yield*_(ne,Y,Ae);case"Object":return yield*k(ne,Y,Ae);case"Promise":return yield*B(ne,Y,Ae);case"Record":return yield*N(ne,Y,Ae);case"Ref":return yield*M(ne,Y,Ae);case"RegExp":return yield*Z(ne,Y,Ae);case"String":return yield*he(ne,Y,Ae);case"Symbol":return yield*ee(ne,Y,Ae);case"TemplateLiteral":return yield*G(ne,Y,Ae);case"This":return yield*q(ne,Y,Ae);case"Tuple":return yield*ie(ne,Y,Ae);case"Undefined":return yield*z(ne,Y,Ae);case"Union":return yield*j(ne,Y,Ae);case"Uint8Array":return yield*U(ne,Y,Ae);case"Unknown":return yield*V(ne,Y,Ae);case"Void":return yield*K(ne,Y,Ae);default:if(!m0.Has(ne[ot]))throw new YZ(oe);return yield*ae(ne,Y,Ae)}}s(re,"Visit");let le={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function ce(oe,Ne,Ae,Ge=!0){return`(${[...re(oe,Ne,Ae,Ge)].join(" && ")})`}s(ce,"CreateExpression");function De(oe){return`check_${$Z.Encode(oe)}`}s(De,"CreateFunctionName");function be(oe){let Ne=`local_${le.variables.size}`;return le.variables.set(Ne,`const ${Ne} = ${oe}`),Ne}s(be,"CreateVariable");function qe(oe,Ne,Ae,Ge,Y=!0){let[ne,Fe]=[`
`,Ve=>"".padStart(Ve," ")],Se=Re("value","any"),Ce=Xe("boolean"),Ue=[...re(Ne,Ae,Ge,Y)].map(Ve=>`${Fe(4)}${Ve}`).join(` &&${ne}`);return`function ${oe}(${Se})${Ce} {${ne}${Fe(2)}return (${ne}${Ue}${ne}${Fe(2)})
}`}s(qe,"CreateFunction");function Re(oe,Ne){let Ae=le.language==="typescript"?`: ${Ne}`:"";return`${oe}${Ae}`}s(Re,"CreateParameter");function Xe(oe){return le.language==="typescript"?`: ${oe}`:""}s(Xe,"CreateReturns");function ft(oe,Ne,Ae){let Ge=qe("check",oe,Ne,"value"),Y=Re("value","any"),ne=Xe("boolean"),Fe=[...le.functions.values()],Se=[...le.variables.values()],Ce=Ui(oe.$id)?`return function check(${Y})${ne} {
return ${De(oe.$id)}(value)
}`:`return ${Ge}`;return[...Se,...Fe,Ce].join(`
`)}s(ft,"Build");function at(...oe){let Ne={language:"javascript"},[Ae,Ge,Y]=oe.length===2&&Cn(oe[1])?[oe[0],oe[1],Ne]:oe.length===2&&!Cn(oe[1])?[oe[0],[],oe[1]]:oe.length===3?[oe[0],oe[1],oe[2]]:oe.length===1?[oe[0],[],Ne]:[null,[],Ne];if(le.language=Y.language,le.variables.clear(),le.functions.clear(),le.instances.clear(),!ds(Ae))throw new uF(Ae);for(let ne of Ge)if(!ds(ne))throw new uF(ne);return ft(Ae,Ge,Y)}s(at,"Code"),e.Code=at;function lt(oe,Ne=[]){let Ae=at(oe,Ne,{language:"javascript"}),Ge=globalThis.Function("kind","format","hash",Ae),Y=new Map(le.instances);function ne(Ue,Ve,tt){if(!m0.Has(Ue)||!Y.has(Ve))return!1;let Ct=m0.Get(Ue),Pt=Y.get(Ve);return Ct(Pt,tt)}s(ne,"typeRegistryFunction");function Fe(Ue,Ve){return eh.Has(Ue)?eh.Get(Ue)(Ve):!1}s(Fe,"formatRegistryFunction");function Se(Ue){return E5(Ue)}s(Se,"hashFunction");let Ce=Ge(ne,Fe,Se);return new VZ(oe,Ne,Ce,Ae)}s(lt,"Compile"),e.Compile=lt})(hs||(hs={}));var mF=Ze(n5());d();d();var sc=[];for(let e=0;e<256;++e)sc.push((e+256).toString(16).slice(1));function Q3e(e,t=0){return(sc[e[t+0]]+sc[e[t+1]]+sc[e[t+2]]+sc[e[t+3]]+"-"+sc[e[t+4]]+sc[e[t+5]]+"-"+sc[e[t+6]]+sc[e[t+7]]+"-"+sc[e[t+8]]+sc[e[t+9]]+"-"+sc[e[t+10]]+sc[e[t+11]]+sc[e[t+12]]+sc[e[t+13]]+sc[e[t+14]]+sc[e[t+15]]).toLowerCase()}s(Q3e,"unsafeStringify");d();var O3e=require("crypto");var dF=new Uint8Array(256),fF=dF.length;function KZ(){return fF>dF.length-16&&((0,O3e.randomFillSync)(dF),fF=0),dF.slice(fF,fF+=16)}s(KZ,"rng");d();d();var U3e=require("crypto"),JZ={randomUUID:U3e.randomUUID};function Wot(e,t,r){if(JZ.randomUUID&&!t&&!e)return JZ.randomUUID();e=e||{};let n=e.random??e.rng?.()??KZ();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Q3e(n)}s(Wot,"v4");var _r=Wot;var hF=Ze(ii());function i8(e){return e===1}s(i8,"isRestricted");var Got=["engine.prompt","engine.completion","ghostText.capturedAfterAccepted","ghostText.capturedAfterRejected"],b_=8192,Hot=21;var Ms=class{static{s(this,"TelemetryReporters")}getReporter(t,r=0){return i8(r)?this.getRestrictedReporter(t):this.reporter}getRestrictedReporter(t){if(pF(t))return this.reporterRestricted;if(JI(t))return new C_}getFTReporter(t){if(W3e(t))return this.reporterFT;if(JI(t))return new C_}setReporter(t){this.reporter=t}setRestrictedReporter(t){this.reporterRestricted=t}setFTReporter(t){this.reporterFT=t}async deactivate(){let t=Promise.resolve();this.reporter&&(t=this.reporter.dispose(),this.reporter=void 0);let r=Promise.resolve();this.reporterRestricted&&(r=this.reporterRestricted.dispose(),this.reporterRestricted=void 0);let n=Promise.resolve();this.reporterFT&&(n=this.reporterFT.dispose(),this.reporterFT=void 0),await Promise.all([t,r,n])}},jot=I.Object({},{additionalProperties:I.String()}),Vot=I.Object({meanLogProb:I.Optional(I.Number()),meanAlternativeLogProb:I.Optional(I.Number())},{additionalProperties:I.Number()}),$ot=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function zot(e){return $ot.has(e.code??"")||e.name==="RangeError"&&e.message==="WebAssembly.Memory(): could not allocate memory"}s(zot,"isOomError");function Yot(e){return H7(e)?"network":zot(e)||e.code==="EMFILE"||e.code==="ENFILE"||e.syscall==="uv_cwd"&&(e.code==="ENOENT"||e.code=="EIO")||e.code==="CopilotPromptLoadFailure"||`${e.code}`.startsWith("CopilotPromptWorkerExit")?"local":"exception"}s(Yot,"getErrorType");var dn=class e{static{s(this,"TelemetryData")}static{this.validateTelemetryProperties=hs.Compile(jot)}static{this.validateTelemetryMeasurements=hs.Compile(Vot)}static{this.keysExemptedFromSanitization=["abexp.assignmentcontext","VSCode.ABExp.Features"]}constructor(t,r,n){this.properties=t,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(t,r){return new e(t||{},r||{},ia())}extendedBy(t,r){let n={...this.properties,...t},i={...this.measurements,...r},o=new e(n,i,this.issuedTime);return o.displayedTime=this.displayedTime,o}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=ia())}async extendWithExpTelemetry(t){let{filters:r,exp:n}=await t.get(or).getFallbackExpAndFilters();n.addToTelemetry(this),r.addToTelemetry(this)}extendWithEditorAgnosticFields(t){this.properties.editor_version=eg(t.get(gn).getEditorInfo()),this.properties.editor_plugin_version=eg(t.get(gn).getEditorPluginInfo());let r=t.get(Ds);this.properties.client_machineid=r.machineId,this.properties.client_sessionid=r.sessionId,this.properties.copilot_version=`copilot/${rv(t)}`,typeof process<"u"&&(this.properties.runtime_version=`node/${process.versions.node}`);let n=t.get(gn);this.properties.common_extname=n.getEditorPluginInfo().name,this.properties.common_extversion=n.getEditorPluginInfo().version,this.properties.common_vscodeversion=eg(n.getEditorInfo());let i=t.get(fn);this.properties.fetcher=i.name;let o=i.proxySettings;this.properties.proxy_enabled=o?"true":"false",this.properties.proxy_auth=o?.proxyAuth?"true":"false",this.properties.proxy_kerberos_spn=o?.kerberosServicePrincipal?"true":"false",this.properties.reject_unauthorized=i.rejectUnauthorized?"true":"false"}extendWithConfigProperties(t){let r=$3e(t);r["copilot.build"]=z3e(t),r["copilot.buildType"]=Sd(t),this.properties={...this.properties,...r}}extendWithRequestId(t){let r={completionId:t.completionId,created:t.created.toString(),headerRequestId:t.headerRequestId,serverExperiments:t.serverExperiments,deploymentId:t.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetryHack=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromPropertiesHack(t,r){if(i8(t))return r;let n={};for(let i in r)e.keysToRemoveFromStandardTelemetryHack.includes(i)||(n[i]=r[i]);return n}sanitizeKeys(){this.properties=e.sanitizeKeys(this.properties),this.measurements=e.sanitizeKeys(this.measurements);for(let t in this.measurements)isNaN(this.measurements[t])&&delete this.measurements[t]}multiplexProperties(){this.properties=e.multiplexProperties(this.properties)}static sanitizeKeys(t){t=t||{};let r={};for(let n in t){let i=e.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[i]=t[n]}return r}static multiplexProperties(t){let r={...t};for(let n in t){let i=t[n],o=i?.length??0;if(o>b_){let a=0,l=0;for(;o>0&&l<Hot;){l+=1;let c=n;l>1&&(c=n+"_"+(l<10?"0":"")+l);let u=a+b_;o<b_&&(u=a+o),r[c]=i.slice(a,u),o-=b_,a+=b_}}}return r}updateMeasurements(t){let r=t-this.issuedTime;if(this.measurements.timeSinceIssuedMs=r,this.displayedTime!==void 0){let n=t-this.displayedTime;this.measurements.timeSinceDisplayedMs=n}this.measurements.current_time===void 0&&(this.measurements.current_time=Xot(t))}validateData(t,r){let n;if(e.validateTelemetryProperties.Check(this.properties)||(n={problem:"properties",error:JSON.stringify([...e.validateTelemetryProperties.Errors(this.properties)])}),!e.validateTelemetryMeasurements.Check(this.measurements)){let i=JSON.stringify([...e.validateTelemetryMeasurements.Errors(this.measurements)]);n===void 0?n={problem:"measurements",error:i}:(n.problem="both",n.error+=`; ${i}`)}if(n===void 0)return!0;if(JI(t))throw new Error(`Invalid telemetry data: ${n.problem} ${n.error} properties=${JSON.stringify(this.properties)} measurements=${JSON.stringify(this.measurements)}`);return tv(t,"invalidTelemetryData",e.createAndMarkAsIssued({properties:JSON.stringify(this.properties),measurements:JSON.stringify(this.measurements),problem:n.problem,validationError:n.error}),r),i8(r)&&tv(t,"invalidTelemetryData_in_secure",e.createAndMarkAsIssued({problem:n.problem,requestId:this.properties.requestId??"unknown"}),0),!1}async makeReadyForSending(t,r,n,i){this.extendWithConfigProperties(t),this.extendWithEditorAgnosticFields(t),this.sanitizeKeys(),this.multiplexProperties(),n==="IncludeExp"&&await this.extendWithExpTelemetry(t),this.updateMeasurements(i),this.validateData(t,r)||(this.properties.telemetry_failed_validation="true"),Object.assign(this.properties,G3e(t))}},ng=class e extends dn{static{s(this,"TelemetryWithExp")}constructor(t,r,n,i){super(t,r,n),this.filtersAndExp=i}extendedBy(t,r){let n={...this.properties,...t},i={...this.measurements,...r},o=new e(n,i,this.issuedTime,this.filtersAndExp);return o.displayedTime=this.displayedTime,o}async extendWithExpTelemetry(t){this.filtersAndExp.exp.addToTelemetry(this),this.filtersAndExp.filters.addToTelemetry(this)}static createEmptyConfigForTesting(){return new e({},{},0,{filters:new Fx({}),exp:_d.createEmptyConfig()})}};function E_(e,t,r,n){e.get(Ms).getReporter(e,t)?.sendTelemetryEvent(r,dn.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}s(E_,"sendTelemetryEvent");function Kot(e,t,r,n){e.get(Ms).getReporter(e,t)?.sendTelemetryErrorEvent(r,dn.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}s(Kot,"sendTelemetryErrorEvent");function Jot(e,t,r,n){e.get(Ms).getFTReporter(e)?.sendTelemetryEvent(r,dn.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}s(Jot,"sendFTTelemetryEvent");function o8(e){return e.isFimEnabled?{promptPrefixCharLen:e.prefix.length,promptSuffixCharLen:e.suffix.length}:{promptCharLen:e.prefix.length}}s(o8,"telemetrizePromptLength");function ia(){return performance.now()}s(ia,"now");function Xot(e){return Math.floor(e/1e3)}s(Xot,"nowSeconds");function pF(e){return e.get(ic).optedIn}s(pF,"shouldSendRestricted");function W3e(e){return e.get(ic).ftFlag!==""}s(W3e,"shouldSendFinetuningTelemetry");function jt(e,t,r,n){return e.get(Ro).register(Zot(e,t,ia(),r?.extendedBy(),n))}s(jt,"telemetry");async function Zot(e,t,r,n,i=0){let o=n||dn.createAndMarkAsIssued({},{});await o.makeReadyForSending(e,i??!1,"IncludeExp",r),(!i8(i)||pF(e))&&E_(e,i,t,o),i8(i)&&Got.includes(t)&&W3e(e)&&Jot(e,i,t,o)}s(Zot,"_telemetry");function gF(e,t){return e.get(Ro).register(est(e,t,ia()))}s(gF,"telemetryExpProblem");async function est(e,t,r){let n="expProblem",i=dn.createAndMarkAsIssued(t,{});await i.makeReadyForSending(e,0,"SkipExp",r),E_(e,0,n,i)}s(est,"_telemetryExpProblem");function ZZ(e,t,r,n){return e.get(Ro).register(tst(e,t,r,n))}s(ZZ,"telemetryRaw");async function tst(e,t,r,n){let i={...r,...G3e(e)};E_(e,0,t,{properties:i,measurements:n})}s(tst,"_telemetryRaw");function G3e(e){let t=e.get(gn),r={unique_id:_r(),common_extname:t.getEditorPluginInfo().name,common_extversion:t.getEditorPluginInfo().version,common_vscodeversion:eg(t.getEditorInfo())},n=e.get(ic);return n.trackingId&&(r.copilot_trackingId=n.trackingId),n.organizationsList&&(r.organizations_list=n.organizationsList),n.enterpriseList&&(r.enterprise_list=n.enterpriseList),n.sku&&(r.sku=n.sku),r}s(G3e,"createRequiredProperties");var XZ=class extends Error{static{s(this,"CopilotNonError")}constructor(t){let r;try{r=JSON.stringify(t)}catch{r=String(t)}super(r),this.name="CopilotNonError",this.code=(0,mF.SHA256)(mF.enc.Utf16.parse(this.message)).toString().slice(0,16)}};function Ea(e,t,r,n,i){return e.get(Ro).register(H3e(e,t,ia(),r,{...n},i))}s(Ea,"telemetryException");async function H3e(e,t,r,n,i,o){let a;if(t instanceof Error){if(a=t,a.name==="Canceled"&&a.message==="Canceled"||a.name==="CodeExpectedError"||kc(a)||a instanceof as||a instanceof hF.ConnectionError||a instanceof hF.ResponseError)return}else{if(a=new XZ(t),t&&typeof t=="object"&&t.name==="ExitStatus")return;if(a.stack?.startsWith(`${a}
`)){let y=a.stack.slice(`${a}
`.length).split(`
`);/^\s*(?:at )?(?:\w+\.)*_telemetryException\b/.test(y[0]??"")&&y.shift(),/^\s*(?:at )?(?:\w+\.)*telemetryException\b/.test(y[0]??"")&&y.shift(),a.stack=`${a}
${y.join(`
`)}`}}let l=e.get(gn).getEditorInfo(),c;l.root&&(c=[{prefix:`${l.name}:`,path:l.root}]);let u=pF(e),f=P3e(a,c,u),m=Yot(a),h=m==="exception",p=dn.createAndMarkAsIssued({origin:n??"",type:a.name,code:`${a.code??""}`,reason:f.stack||f.toString(),message:f.message,...i});if(await p.makeReadyForSending(e,0,"IncludeExp",r),o?.exception_detail)for(let y of o.exception_detail)y.value&&(u?y.value=MZ(y.value):y.value="[redacted]");if(o??=b3e(e,f),o.context={...o.context,"copilot_event.unique_id":p.properties.unique_id,"#restricted_telemetry":u?"true":"false"},n&&(o.context["#origin"]=n,o.transaction=n),o.rollup_id!=="auto"&&(p.properties.errno=o.rollup_id),o.created_at=new Date(p.issuedTime).toISOString(),u){let y=D3e(a,c),x=dn.createAndMarkAsIssued({origin:n??"",type:a.name,code:`${a.code??""}`,reason:y.stack||y.toString(),message:y.message,...i});o.rollup_id!=="auto"&&(x.properties.errno=o.rollup_id),await x.makeReadyForSending(e,1,"IncludeExp",r),x.properties.unique_id=p.properties.unique_id,p.properties.restricted_unique_id=x.properties.unique_id,E_(e,1,`error.${m}`,x)}let g=o.rollup_id==="auto"?a.stack??"":o.rollup_id;h&&!e.get(tg).isThrottled(g)&&(p.properties.failbot_payload=JSON.stringify(o)),E_(e,0,`error.${m}`,p)}s(H3e,"_telemetryException");function rf(e,t,r,n){let i=s(async(...o)=>{try{await t(...o)}catch(a){await H3e(e,a,ia(),r,n)}},"wrapped");return(...o)=>e.get(Ro).register(i(...o))}s(rf,"telemetryCatch");function tv(e,t,r,n){return e.get(Ro).register(rst(e,t,ia(),r?.extendedBy(),n))}s(tv,"telemetryError");async function rst(e,t,r,n,i=0){if(i8(i)&&!pF(e))return;let o=n||dn.createAndMarkAsIssued({},{});await o.makeReadyForSending(e,i,"IncludeExp",r),Kot(e,i,t,o)}s(rst,"_telemetryError");function j3e(e,t,r,n,i){let o=dn.createAndMarkAsIssued({completionTextJson:JSON.stringify(t),choiceIndex:i.toString()});if(r.logprobs)for(let[a,l]of Object.entries(r.logprobs))o.properties["logprobs_"+a]=JSON.stringify(l)??"unset";return o.extendWithRequestId(n),jt(e,"engine.completion",o,1)}s(j3e,"logEngineCompletion");function V3e(e,t,r){let n={};if(t.isFimEnabled?n={promptPrefixJson:JSON.stringify(t.prefix),promptSuffixJson:JSON.stringify(t.suffix)}:n={promptJson:JSON.stringify(t.prefix)},t.context){let o=r.properties["request.option.extra"]?JSON.parse(r.properties["request.option.extra"]):{};o.context=t.context,n["request.option.extra"]=JSON.stringify(o)}let i=r.extendedBy(n);return jt(e,"engine.prompt",i,1)}s(V3e,"logEnginePrompt");var _d=class e{static{s(this,"ExpConfig")}constructor(t,r,n){this.variables=t,this.assignmentContext=r,this.features=n}static createFallbackConfig(t,r){return gF(t,{reason:r}),this.createEmptyConfig()}static createEmptyConfig(){return new e({},"","")}addToTelemetry(t){t.properties["VSCode.ABExp.Features"]=this.features,t.properties["abexp.assignmentcontext"]=this.assignmentContext}};d();d();d();var J3e=require("os"),yF=require("path");d();var Y3e;(()=>{"use strict";var e={975:G=>{function q(j){if(typeof j!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(j))}s(q,"e");function ie(j,U){for(var V,K="",ae=0,re=-1,le=0,ce=0;ce<=j.length;++ce){if(ce<j.length)V=j.charCodeAt(ce);else{if(V===47)break;V=47}if(V===47){if(!(re===ce-1||le===1))if(re!==ce-1&&le===2){if(K.length<2||ae!==2||K.charCodeAt(K.length-1)!==46||K.charCodeAt(K.length-2)!==46){if(K.length>2){var De=K.lastIndexOf("/");if(De!==K.length-1){De===-1?(K="",ae=0):ae=(K=K.slice(0,De)).length-1-K.lastIndexOf("/"),re=ce,le=0;continue}}else if(K.length===2||K.length===1){K="",ae=0,re=ce,le=0;continue}}U&&(K.length>0?K+="/..":K="..",ae=2)}else K.length>0?K+="/"+j.slice(re+1,ce):K=j.slice(re+1,ce),ae=ce-re-1;re=ce,le=0}else V===46&&le!==-1?++le:le=-1}return K}s(ie,"r");var z={resolve:s(function(){for(var j,U="",V=!1,K=arguments.length-1;K>=-1&&!V;K--){var ae;K>=0?ae=arguments[K]:(j===void 0&&(j=process.cwd()),ae=j),q(ae),ae.length!==0&&(U=ae+"/"+U,V=ae.charCodeAt(0)===47)}return U=ie(U,!V),V?U.length>0?"/"+U:"/":U.length>0?U:"."},"resolve"),normalize:s(function(j){if(q(j),j.length===0)return".";var U=j.charCodeAt(0)===47,V=j.charCodeAt(j.length-1)===47;return(j=ie(j,!U)).length!==0||U||(j="."),j.length>0&&V&&(j+="/"),U?"/"+j:j},"normalize"),isAbsolute:s(function(j){return q(j),j.length>0&&j.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var j,U=0;U<arguments.length;++U){var V=arguments[U];q(V),V.length>0&&(j===void 0?j=V:j+="/"+V)}return j===void 0?".":z.normalize(j)},"join"),relative:s(function(j,U){if(q(j),q(U),j===U||(j=z.resolve(j))===(U=z.resolve(U)))return"";for(var V=1;V<j.length&&j.charCodeAt(V)===47;++V);for(var K=j.length,ae=K-V,re=1;re<U.length&&U.charCodeAt(re)===47;++re);for(var le=U.length-re,ce=ae<le?ae:le,De=-1,be=0;be<=ce;++be){if(be===ce){if(le>ce){if(U.charCodeAt(re+be)===47)return U.slice(re+be+1);if(be===0)return U.slice(re+be)}else ae>ce&&(j.charCodeAt(V+be)===47?De=be:be===0&&(De=0));break}var qe=j.charCodeAt(V+be);if(qe!==U.charCodeAt(re+be))break;qe===47&&(De=be)}var Re="";for(be=V+De+1;be<=K;++be)be!==K&&j.charCodeAt(be)!==47||(Re.length===0?Re+="..":Re+="/..");return Re.length>0?Re+U.slice(re+De):(re+=De,U.charCodeAt(re)===47&&++re,U.slice(re))},"relative"),_makeLong:s(function(j){return j},"_makeLong"),dirname:s(function(j){if(q(j),j.length===0)return".";for(var U=j.charCodeAt(0),V=U===47,K=-1,ae=!0,re=j.length-1;re>=1;--re)if((U=j.charCodeAt(re))===47){if(!ae){K=re;break}}else ae=!1;return K===-1?V?"/":".":V&&K===1?"//":j.slice(0,K)},"dirname"),basename:s(function(j,U){if(U!==void 0&&typeof U!="string")throw new TypeError('"ext" argument must be a string');q(j);var V,K=0,ae=-1,re=!0;if(U!==void 0&&U.length>0&&U.length<=j.length){if(U.length===j.length&&U===j)return"";var le=U.length-1,ce=-1;for(V=j.length-1;V>=0;--V){var De=j.charCodeAt(V);if(De===47){if(!re){K=V+1;break}}else ce===-1&&(re=!1,ce=V+1),le>=0&&(De===U.charCodeAt(le)?--le==-1&&(ae=V):(le=-1,ae=ce))}return K===ae?ae=ce:ae===-1&&(ae=j.length),j.slice(K,ae)}for(V=j.length-1;V>=0;--V)if(j.charCodeAt(V)===47){if(!re){K=V+1;break}}else ae===-1&&(re=!1,ae=V+1);return ae===-1?"":j.slice(K,ae)},"basename"),extname:s(function(j){q(j);for(var U=-1,V=0,K=-1,ae=!0,re=0,le=j.length-1;le>=0;--le){var ce=j.charCodeAt(le);if(ce!==47)K===-1&&(ae=!1,K=le+1),ce===46?U===-1?U=le:re!==1&&(re=1):U!==-1&&(re=-1);else if(!ae){V=le+1;break}}return U===-1||K===-1||re===0||re===1&&U===K-1&&U===V+1?"":j.slice(U,K)},"extname"),format:s(function(j){if(j===null||typeof j!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof j);return function(U,V){var K=V.dir||V.root,ae=V.base||(V.name||"")+(V.ext||"");return K?K===V.root?K+ae:K+"/"+ae:ae}(0,j)},"format"),parse:s(function(j){q(j);var U={root:"",dir:"",base:"",ext:"",name:""};if(j.length===0)return U;var V,K=j.charCodeAt(0),ae=K===47;ae?(U.root="/",V=1):V=0;for(var re=-1,le=0,ce=-1,De=!0,be=j.length-1,qe=0;be>=V;--be)if((K=j.charCodeAt(be))!==47)ce===-1&&(De=!1,ce=be+1),K===46?re===-1?re=be:qe!==1&&(qe=1):re!==-1&&(qe=-1);else if(!De){le=be+1;break}return re===-1||ce===-1||qe===0||qe===1&&re===ce-1&&re===le+1?ce!==-1&&(U.base=U.name=le===0&&ae?j.slice(1,ce):j.slice(le,ce)):(le===0&&ae?(U.name=j.slice(1,re),U.base=j.slice(1,ce)):(U.name=j.slice(le,re),U.base=j.slice(le,ce)),U.ext=j.slice(re,ce)),le>0?U.dir=j.slice(0,le-1):ae&&(U.dir="/"),U},"parse"),sep:"/",delimiter:":",win32:null,posix:null};z.posix=z,G.exports=z}},t={};function r(G){var q=t[G];if(q!==void 0)return q.exports;var ie=t[G]={exports:{}};return e[G](ie,ie.exports,r),ie.exports}s(r,"r"),r.d=(G,q)=>{for(var ie in q)r.o(q,ie)&&!r.o(G,ie)&&Object.defineProperty(G,ie,{enumerable:!0,get:q[ie]})},r.o=(G,q)=>Object.prototype.hasOwnProperty.call(G,q),r.r=G=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(G,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(G,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:s(()=>h,"URI"),Utils:s(()=>ee,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function c(G,q){if(!G.scheme&&q)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${G.authority}", path: "${G.path}", query: "${G.query}", fragment: "${G.fragment}"}`);if(G.scheme&&!o.test(G.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(G.path){if(G.authority){if(!a.test(G.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(G.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(c,"a");let u="",f="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static{s(this,"l")}static isUri(q){return q instanceof h||!!q&&typeof q.authority=="string"&&typeof q.fragment=="string"&&typeof q.path=="string"&&typeof q.query=="string"&&typeof q.scheme=="string"&&typeof q.fsPath=="string"&&typeof q.with=="function"&&typeof q.toString=="function"}scheme;authority;path;query;fragment;constructor(q,ie,z,j,U,V=!1){typeof q=="object"?(this.scheme=q.scheme||u,this.authority=q.authority||u,this.path=q.path||u,this.query=q.query||u,this.fragment=q.fragment||u):(this.scheme=function(K,ae){return K||ae?K:"file"}(q,V),this.authority=ie||u,this.path=function(K,ae){switch(K){case"https":case"http":case"file":ae?ae[0]!==f&&(ae=f+ae):ae=f}return ae}(this.scheme,z||u),this.query=j||u,this.fragment=U||u,c(this,V))}get fsPath(){return E(this,!1)}with(q){if(!q)return this;let{scheme:ie,authority:z,path:j,query:U,fragment:V}=q;return ie===void 0?ie=this.scheme:ie===null&&(ie=u),z===void 0?z=this.authority:z===null&&(z=u),j===void 0?j=this.path:j===null&&(j=u),U===void 0?U=this.query:U===null&&(U=u),V===void 0?V=this.fragment:V===null&&(V=u),ie===this.scheme&&z===this.authority&&j===this.path&&U===this.query&&V===this.fragment?this:new g(ie,z,j,U,V)}static parse(q,ie=!1){let z=m.exec(q);return z?new g(z[2]||u,N(z[4]||u),N(z[5]||u),N(z[7]||u),N(z[9]||u),ie):new g(u,u,u,u,u)}static file(q){let ie=u;if(i&&(q=q.replace(/\\/g,f)),q[0]===f&&q[1]===f){let z=q.indexOf(f,2);z===-1?(ie=q.substring(2),q=f):(ie=q.substring(2,z),q=q.substring(z)||f)}return new g("file",ie,q,u,u)}static from(q){let ie=new g(q.scheme,q.authority,q.path,q.query,q.fragment);return c(ie,!0),ie}toString(q=!1){return _(this,q)}toJSON(){return this}static revive(q){if(q){if(q instanceof h)return q;{let ie=new g(q);return ie._formatted=q.external,ie._fsPath=q._sep===p?q.fsPath:null,ie}}return q}}let p=i?1:void 0;class g extends h{static{s(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=E(this,!1)),this._fsPath}toString(q=!1){return q?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){let q={$mid:1};return this._fsPath&&(q.fsPath=this._fsPath,q._sep=p),this._formatted&&(q.external=this._formatted),this.path&&(q.path=this.path),this.scheme&&(q.scheme=this.scheme),this.authority&&(q.authority=this.authority),this.query&&(q.query=this.query),this.fragment&&(q.fragment=this.fragment),q}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function x(G,q,ie){let z,j=-1;for(let U=0;U<G.length;U++){let V=G.charCodeAt(U);if(V>=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||q&&V===47||ie&&V===91||ie&&V===93||ie&&V===58)j!==-1&&(z+=encodeURIComponent(G.substring(j,U)),j=-1),z!==void 0&&(z+=G.charAt(U));else{z===void 0&&(z=G.substr(0,U));let K=y[V];K!==void 0?(j!==-1&&(z+=encodeURIComponent(G.substring(j,U)),j=-1),z+=K):j===-1&&(j=U)}}return j!==-1&&(z+=encodeURIComponent(G.substring(j))),z!==void 0?z:G}s(x,"m");function b(G){let q;for(let ie=0;ie<G.length;ie++){let z=G.charCodeAt(ie);z===35||z===63?(q===void 0&&(q=G.substr(0,ie)),q+=y[z]):q!==void 0&&(q+=G[ie])}return q!==void 0?q:G}s(b,"y");function E(G,q){let ie;return ie=G.authority&&G.path.length>1&&G.scheme==="file"?`//${G.authority}${G.path}`:G.path.charCodeAt(0)===47&&(G.path.charCodeAt(1)>=65&&G.path.charCodeAt(1)<=90||G.path.charCodeAt(1)>=97&&G.path.charCodeAt(1)<=122)&&G.path.charCodeAt(2)===58?q?G.path.substr(1):G.path[1].toLowerCase()+G.path.substr(2):G.path,i&&(ie=ie.replace(/\//g,"\\")),ie}s(E,"v");function _(G,q){let ie=q?b:x,z="",{scheme:j,authority:U,path:V,query:K,fragment:ae}=G;if(j&&(z+=j,z+=":"),(U||j==="file")&&(z+=f,z+=f),U){let re=U.indexOf("@");if(re!==-1){let le=U.substr(0,re);U=U.substr(re+1),re=le.lastIndexOf(":"),re===-1?z+=ie(le,!1,!1):(z+=ie(le.substr(0,re),!1,!1),z+=":",z+=ie(le.substr(re+1),!1,!0)),z+="@"}U=U.toLowerCase(),re=U.lastIndexOf(":"),re===-1?z+=ie(U,!1,!0):(z+=ie(U.substr(0,re),!1,!0),z+=U.substr(re))}if(V){if(V.length>=3&&V.charCodeAt(0)===47&&V.charCodeAt(2)===58){let re=V.charCodeAt(1);re>=65&&re<=90&&(V=`/${String.fromCharCode(re+32)}:${V.substr(3)}`)}else if(V.length>=2&&V.charCodeAt(1)===58){let re=V.charCodeAt(0);re>=65&&re<=90&&(V=`${String.fromCharCode(re+32)}:${V.substr(2)}`)}z+=ie(V,!0,!1)}return K&&(z+="?",z+=ie(K,!1,!1)),ae&&(z+="#",z+=q?ae:x(ae,!1,!1)),z}s(_,"b");function k(G){try{return decodeURIComponent(G)}catch{return G.length>3?G.substr(0,3)+k(G.substr(3)):G}}s(k,"C");let B=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(G){return G.match(B)?G.replace(B,q=>k(q)):G}s(N,"w");var M=r(975);let Z=M.posix||M,he="/";var ee;(function(G){G.joinPath=function(q,...ie){return q.with({path:Z.join(q.path,...ie)})},G.resolvePath=function(q,...ie){let z=q.path,j=!1;z[0]!==he&&(z=he+z,j=!0);let U=Z.resolve(z,...ie);return j&&U[0]===he&&!q.authority&&(U=U.substring(1)),q.with({path:U})},G.dirname=function(q){if(q.path.length===0||q.path===he)return q;let ie=Z.dirname(q.path);return ie.length===1&&ie.charCodeAt(0)===46&&(ie=""),q.with({path:ie})},G.basename=function(q){return Z.basename(q.path)},G.extname=function(q){return Z.extname(q.path)}})(ee||(ee={})),Y3e=n})();var{URI:T5,Utils:AF}=Y3e;function X3e(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substring(0,3)+X3e(e.substring(3)):e}}s(X3e,"decodeURIComponentGraceful");var K3e=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function eee(e){return e.match(K3e)?e.replace(K3e,t=>X3e(t)):e}s(eee,"percentDecode");function ll(e){if(/^[A-Za-z][A-Za-z0-9+.-]+:/.test(e))throw new Error("Path must not contain a scheme");if(!e)throw new Error("Path must not be empty");return T5.file(e).toString()}s(ll,"makeFsUri");function s8(e){if(typeof e!="string"&&(e=e.uri),/^[A-Za-z]:\\/.test(e))throw new Error(`Could not parse <${e}>: Windows-style path`);try{let t=e.match(/^(?:([^:/?#]+?:)?\/\/)(\/\/.*)$/);return t?T5.parse(t[1]+t[2],!0):T5.parse(e,!0)}catch(t){throw new Error(`Could not parse <${e}>`,{cause:t})}}s(s8,"parseUri");function Z3e(e){return s8(e),e}s(Z3e,"validateUri");function ac(e){try{return s8(e).toString()}catch{return e}}s(ac,"normalizeUri");var exe=new Set(["file","notebook","vscode-notebook","vscode-notebook-cell"]);function Wa(e){let t=s8(e);if(!exe.has(t.scheme))throw new Error(`Unsupported scheme: ${t.scheme}`);if((0,J3e.platform)()==="win32"){let r=t.path;return t.authority?r=`//${t.authority}${t.path}`:/^\/[A-Za-z]:/.test(r)&&(r=r.substring(1)),(0,yF.normalize)(r)}else{if(t.authority)throw new Error("Unsupported remote file path");return t.path}}s(Wa,"fsPath");function Xo(e){try{return Wa(e)}catch{return}}s(Xo,"getFsPath");function txe(e){let t=Xo(e);if(t)return T5.file(t).toString()}s(txe,"getFsUri");function nv(e,...t){let r,n=Xo(e);return n?r=ll((0,yF.resolve)(n,...t)):r=AF.resolvePath(s8(e),...t.map(i=>rxe(i))).toString(),typeof e=="string"?r:{uri:r}}s(nv,"resolveFilePath");function Bo(e,...t){let r=AF.joinPath(s8(e),...t.map(rxe)).toString();return typeof e=="string"?r:{uri:r}}s(Bo,"joinPath");function rxe(e){return nst(e)?e.replaceAll("\\","/"):e}s(rxe,"pathToURIPath");function nst(e){return/^[^/\\]*\\/.test(e)}s(nst,"isWinPath");function Pi(e){return eee((typeof e=="string"?e:e.uri).replace(/[#?].*$/,"").replace(/\/$/,"").replace(/^.*[/:]/,""))}s(Pi,"basename");function of(e){let t=AF.dirname(s8(e)),r;return exe.has(t.scheme)&&t.scheme!=="file"?r=t.with({scheme:"file",fragment:""}).toString():r=t.toString(),typeof e=="string"?r:{uri:r}}s(of,"dirname");var ps=class{static{s(this,"NetworkConfiguration")}},CF={api:"https://api.githubcopilot.com",proxy:"https://copilot-proxy.githubusercontent.com",telemetry:"https://copilot-telemetry.githubusercontent.com","origin-tracker":"https://origin-tracker.githubusercontent.com"};function tee(e,t,r){if(r&&sh(e)){for(let n of r){let i=Vn(e,n);if(i)return i}return}for(let n of t){let i=Vn(e,n);if(i)return i}}s(tee,"urlConfigOverride");function ist(e,t){switch(t){case"api":return tee(e,[Rt.DebugOverrideCapiUrl,Rt.DebugOverrideCapiUrlLegacy],[Rt.DebugTestOverrideCapiUrl,Rt.DebugTestOverrideCapiUrlLegacy]);case"proxy":return tee(e,[Rt.DebugOverrideProxyUrl,Rt.DebugOverrideProxyUrlLegacy],[Rt.DebugTestOverrideProxyUrl,Rt.DebugTestOverrideProxyUrlLegacy]);case"origin-tracker":if(!xF(e))return tee(e,[Rt.DebugSnippyOverrideUrl])}}s(ist,"getEndpointOverrideUrl");function a8(e,t,r,...n){let i=ist(e,r)??(t.envelope.endpoints??CF)[r];return Bo(i,...n)}s(a8,"getEndpointUrl");var ch=class{static{s(this,"ExpConfigMaker")}},I_=class extends ch{constructor(r="",n={}){super();this.overrideTASUrl=r;this.defaultFilters=n}static{s(this,"ExpConfigFromTAS")}async fetchExperiments(r,n){let i=r.get(fn),o=Object.keys(n).length===0?this.defaultFilters:n,a=this.overrideTASUrl.length===0?r.get(ps).getExperimentationUrl():this.overrideTASUrl,l;try{l=await i.fetch(a,{method:"GET",headers:o,timeout:5e3})}catch(m){return _d.createFallbackConfig(r,`Error fetching ExP config: ${String(m)}`)}if(!l.ok)return _d.createFallbackConfig(r,`ExP responded with ${l.status}`);let c;try{c=await l.json()}catch(m){if(m instanceof SyntaxError)return Ea(r,m,"fetchExperiments"),_d.createFallbackConfig(r,"ExP responded with invalid JSON");throw m}let u=c.Configs.find(m=>m.Id==="vscode")??{Id:"vscode",Parameters:{}},f=Object.entries(u.Parameters).map(([m,h])=>m+(h?"":"cf"));return new _d(u.Parameters,c.AssignmentContext,f.join(";"))}},vF=class extends ch{static{s(this,"ExpConfigNone")}fetchExperiments(t,r){return Promise.resolve(_d.createEmptyConfig())}};d();d();var bF=class{constructor(t){this.prefix=t}static{s(this,"GranularityImplementation")}getCurrentAndUpComingValues(t){let r=this.getValue(t),n=this.getUpcomingValues(t);return[r,n]}},ree=class extends bF{static{s(this,"ConstantGranularity")}getValue(t){return this.prefix}getUpcomingValues(t){return[]}},nxe=s(e=>new ree(e),"DEFAULT_GRANULARITY"),EF=class extends bF{constructor(r,n=.5,i=new Date().setUTCHours(0,0,0,0)){super(r);this.prefix=r;this.fetchBeforeFactor=n;this.anchor=i}static{s(this,"TimeBucketGranularity")}setTimePeriod(r){isNaN(r)?this.timePeriodLengthMs=void 0:this.timePeriodLengthMs=r}setByCallBuckets(r){isNaN(r)?this.numByCallBuckets=void 0:this.numByCallBuckets=r}getValue(r){return this.prefix+this.getTimePeriodBucketString(r)+(this.numByCallBuckets?this.timeHash(r):"")}getTimePeriodBucketString(r){return this.timePeriodLengthMs?this.dateToTimePartString(r):""}getUpcomingValues(r){let n=[],i=this.getUpcomingTimePeriodBucketStrings(r),o=this.getUpcomingByCallBucketStrings();for(let a of i)for(let l of o)n.push(this.prefix+a+l);return n}getUpcomingTimePeriodBucketStrings(r){if(this.timePeriodLengthMs===void 0)return[""];if((r.getTime()-this.anchor)%this.timePeriodLengthMs<this.fetchBeforeFactor*this.timePeriodLengthMs)return[this.getTimePeriodBucketString(r)];{let n=new Date(r.getTime()+this.timePeriodLengthMs);return[this.getTimePeriodBucketString(r),this.getTimePeriodBucketString(n)]}}getUpcomingByCallBucketStrings(){return this.numByCallBuckets===void 0?[""]:Array.from(Array(this.numByCallBuckets).keys()).map(r=>r.toString())}timeHash(r){return this.numByCallBuckets==null?0:7883*(r.getTime()%this.numByCallBuckets)%this.numByCallBuckets}dateToTimePartString(r){return this.timePeriodLengthMs==null?"":Math.floor((r.getTime()-this.anchor)/this.timePeriodLengthMs).toString()}};var ixe="X-Copilot-ClientTimeBucket",IF=class{constructor(t,r){this.specs=new Map;this.prefix=t,this.clock=r,this.defaultGranularity=nxe(t)}static{s(this,"GranularityDirectory")}selectGranularity(t){for(let[r,n]of this.specs.entries())if(t.extends(r))return n;return this.defaultGranularity}update(t,r,n){if(r=r>1?r:NaN,n=n>0?n:NaN,isNaN(r)&&isNaN(n))this.specs.delete(t);else{let i=new EF(this.prefix);isNaN(r)||i.setByCallBuckets(r),isNaN(n)||i.setTimePeriod(n*3600*1e3),this.specs.set(t,i)}}extendFilters(t){let r=this.selectGranularity(t),[n,i]=r.getCurrentAndUpComingValues(this.clock.now());return{newFilterSettings:t.withChange(ixe,n),otherFilterSettingsToPrefetch:i.map(o=>t.withChange(ixe,o))}}};d();d();d();d();d();d();function TF(e){return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","faef89d9169d5eacf1d8c8dde3412e37","4535c7beffc844b46bb1ed4aa04d759a"].find(r=>e.includes(r))}s(TF,"findKnownOrg");d();d();var iv=(i=>(i[i.DEBUG=4]="DEBUG",i[i.INFO=3]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=1]="ERROR",i))(iv||{}),Ga=class{static{s(this,"LogTarget")}},ig=class{static{s(this,"TelemetryLogSender")}},Gt=class{constructor(t){this.category=t}static{s(this,"Logger")}log(t,r,...n){t.get(Ga).logIt(t,r,this.category,...n)}debug(t,...r){this.log(t,4,...r)}info(t,...r){this.log(t,3,...r)}warn(t,...r){this.log(t,2,...r)}error(t,...r){t.get(ig).sendError(t,this.category,...r),this.errorWithoutTelemetry(t,...r)}errorWithoutTelemetry(t,...r){this.log(t,1,...r)}exception(t,r,n){if(r instanceof Error&&r.name==="Canceled"&&r.message==="Canceled")return;let i=n;n.startsWith(".")&&(i=n.substring(1),n=`${this.category}${n}`),t.get(ig).sendException(t,r,n);let o=r instanceof Error?r:new Error(`Non-error thrown: ${String(r)}`);this.log(t,1,`${i}:`,o)}},kn=new Gt("default");d();var Ha=class{static{s(this,"NotificationSender")}async showWarningMessageOnlyOnce(t,r,...n){return this.showWarningMessage(r,...n)}};d();var lc=class{static{s(this,"UrlOpener")}};var ost=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"],oxe="Your proxy connection requires a trusted certificate. Please make sure the proxy certificate and any issuers are configured correctly and trusted by your operating system.",sxe="https://gh.io/copilot-network-errors",ou=class{constructor(){this.notifiedErrorCodes=[]}static{s(this,"UserErrorNotifier")}notifyUser(t,r){if(!(r instanceof Error))return;let n=r;n.code&&ost.includes(n.code)&&!this.didNotifyBefore(n.code)&&(this.notifiedErrorCodes.push(n.code),this.displayCertificateErrorNotification(t,n))}async displayCertificateErrorNotification(t,r){new Gt("certificates").error(t,`${oxe} Please visit ${sxe} to learn more. Original cause:`,r);let n={title:"Learn more"};return t.get(Ha).showWarningMessage(oxe,n).then(i=>{if(i?.title===n.title)return t.get(lc).open(sxe)})}didNotifyBefore(t){return this.notifiedErrorCodes.indexOf(t)!==-1}};d();d();function wF(){return typeof process>"u"}s(wF,"isWeb");async function uh(e,t,r,n={}){return n={...n,headers:{Authorization:`Bearer ${t.accessToken}`,...wF()?{}:Vu(e),...n.headers}},await e.get(fn).fetch(new URL(r,t.apiUrl).href,n)}s(uh,"apiFetch");var p0=new Gt("auth"),cxe=60;function l8(e){let t=e.serverUrl?.match(/^https?:\/\//)?e.serverUrl:"",r=e.apiUrl?.match(/^https?:\/\//)?e.apiUrl:"";return t?r||=t.replace("://","://api."):r?.includes("://api.")&&(t||=r.replace("://api.","://")),(!t||!r)&&(t="https://github.com",r="https://api.github.com"),{apiUrl:r,serverUrl:t}}s(l8,"fillGitHubUrls");function axe(){return Math.floor(Date.now()/1e3)}s(axe,"nowSeconds");async function _F(e,t){let r=dn.createAndMarkAsIssued({},{});jt(e,"auth.new_login");let n=await sst(e,t),i=await n.json(),o=i.user_notification;if(lxe(e,o,t),n.clientError&&!n.headers.get("x-github-request-id")&&p0.error(e,`HTTP ${n.status} response does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`),n.status===401){let c="Failed to get copilot token due to 401 status. Please sign out and try again.";return p0.info(e,c),tv(e,"auth.unknown_401",r),{kind:"failure",reason:"HTTP401",message:c,envelope:i}}if(!n.ok||!i.token){p0.info(e,`Invalid copilot token: missing token: ${n.status} ${n.statusText}`),tv(e,"auth.invalid_token",r.extendedBy({status:n.status.toString(),status_text:n.statusText}));let c=i.error_details;return c?.notification_id!=="not_signed_up"&&lxe(e,c,t),{kind:"failure",reason:"NotAuthorized",message:"User not authorized",envelope:i,...c}}let a=i.expires_at;i.expires_at=axe()+i.refresh_in+cxe;let l=new pA(i);return y_(e,l),jt(e,"auth.new_token",r.extendedBy({},{adjusted_expires_at:i.expires_at,expires_at:a,current_time:axe()})),{kind:"success",envelope:i}}s(_F,"authFromGitHubToken");async function sst(e,t){let r={"X-GitHub-Api-Version":Vm},n=t.devOverride?.copilotTokenUrl??"copilot_internal/v2/token";try{return await uh(e,t,n,{timeout:12e4,headers:r})}catch(i){throw e.get(ou).notifyUser(e,i),i}}s(sst,"fetchCopilotToken");function lxe(e,t,r){t&&e.get(Ha).showWarningMessageOnlyOnce(t.notification_id,t.message,{title:t.title},{title:"Dismiss"}).then(async n=>{let i=n?.title===t.title,o=i||n?.title==="Dismiss";if(i){let a=e.get(gn).getEditorPluginInfo(),l=t.url.replace("{EDITOR}",encodeURIComponent(a.name+"_"+a.version));await e.get(lc).open(l)}t.notification_id&&o&&await ast(e,t.notification_id,r)}).catch(n=>{p0.exception(e,n,"copilotToken.notification")})}s(lxe,"notifyUser");async function ast(e,t,r){let n=r.devOverride?.notificationUrl??"copilot_internal/notification",i=await uh(e,r,n,{method:"POST",headers:{"X-GitHub-Api-Version":Vm},body:JSON.stringify({notification_id:t})});(!i||!i.ok)&&p0.error(e,`Failed to send notification result to GitHub: ${i?.status} ${i?.statusText}`)}s(ast,"sendNotificationResultToGitHub");var pA=class{constructor(t){this.envelope=t;this.token=t.token,this.organization_list=t.organization_list,this.enterprise_list=t.enterprise_list,this.tokenMap=this.parseToken(this.token)}static{s(this,"CopilotToken")}needsRefresh(){return(this.envelope.expires_at-cxe)*1e3<Date.now()}isExpired(){return this.envelope.expires_at*1e3<Date.now()}get hasKnownOrg(){return TF(this.organization_list||[])!==void 0}parseToken(t){let r=new Map,i=(t??"").split(":")[0].split(";");for(let o of i){let[a,l]=o.split("=");r.set(a,l)}return r}getTokenValue(t){return this.tokenMap.get(t)}getTokenValues(){return Object.fromEntries(this.tokenMap)}};d();d();d();var hxe=Ze(fxe()),pxe=Ze(mxe()),sf=Ze(require("os"));var c8=class{constructor(t,r,n,i=!1){this.ctx=t;this.namespace=r;this.includeAuthorizationHeader=i;this.onCopilotToken=s(t=>{this.token=t;let r=t.getTokenValue("tid");r!==void 0&&(this.tags["ai.user.id"]=r)},"onCopilotToken");this.xhrOverride={sendPOST:s((t,r)=>{if(typeof t.data!="string")throw new Error(`AppInsightsReporter only supports string payloads, received ${typeof t.data}`);let n=t.headers??{};n["Content-Type"]="application/json",this.includeAuthorizationHeader&&this.token&&(n.Authorization=`Bearer ${this.token.token}`);let i={method:"POST",headers:n,body:t.data};this.ctx.get(fn).fetch(t.urlString,i).then(o=>o.text().then(a=>{r(o.status,Object.fromEntries(o.headers),a)})).catch(o=>{kn.errorWithoutTelemetry(this.ctx,"Error sending telemetry",o),r(0,{})})},"sendPOST")};this.client=new pxe.ApplicationInsights({instrumentationKey:n,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!1,disableInstrumentationKeyValidation:!0,endpointUrl:t.get(ps).getTelemetryUrl(),extensionConfig:{[hxe.BreezeChannelIdentifier]:{alwaysUseXhrOverride:!0,httpXHROverride:this.xhrOverride}}}),this.tags=lst(t),this.commonProperties=cst(t),this.#e=Ks(t,this.onCopilotToken)}static{s(this,"AppInsightsReporter")}#e;sendTelemetryEvent(t,r,n){r={...r,...this.commonProperties};let i=this.qualifyEventName(t);this.client.track({name:i,tags:this.tags,data:{...r,...n},baseType:"EventData",baseData:{name:i,properties:r,measurements:n}})}sendTelemetryErrorEvent(t,r,n){this.sendTelemetryEvent(this.qualifyEventName(t),r,n)}async dispose(){this.#e.dispose(),await this.client.unload(!0,void 0,200)}qualifyEventName(t){return t.startsWith(this.namespace)?t:`${this.namespace}/${t}`}};function lst(e){let t={},r=e.get(Ds);t["ai.session.id"]=r.sessionId;let n=e.get(ic);return n.trackingId&&(t["ai.user.id"]=n.trackingId),t["ai.cloud.roleInstance"]="REDACTED",t["ai.device.osVersion"]=`${sf.type()} ${sf.release()}`,t["ai.device.osArchitecture"]=sf.arch(),t["ai.device.osPlatform"]=sf.platform(),t["ai.cloud.role"]="Web",t["ai.application.ver"]=e.get(po).getVersion(),t}s(lst,"getTags");function cst(e){let t={};t.common_os=sf.platform(),t.common_platformversion=sf.release(),t.common_arch=sf.arch(),t.common_cpu=Array.from(new Set(sf.cpus().map(n=>n.model))).join();let r=e.get(Ds);return t.common_vscodemachineid=r.machineId,t.common_vscodesessionid=r.sessionId,t.common_uikind=r.uiKind,t.common_remotename=r.remoteName,t.common_isnewappinstall="",t}s(cst,"getCommonProperties");var gxe="7d7048df-6dd0-4048-bb23-b716c1461f8f",Axe="3fdd7f28-937a-48c8-9a21-ba337db23bd1",ust="f0000000-0000-0000-0000-000000000000",af=class{constructor(){this._initialized=!1}static{s(this,"TelemetryInitialization")}get isInitialized(){return this._initialized}get isEnabled(){return this._enabled??!1}async initialize(t,r,n){let i=t.get(Ms).deactivate();if(this._namespace=r,this._enabled=n,this._initialized=!0,n){let o=t.get(Ms);o.setReporter(new c8(t,r,gxe)),o.setRestrictedReporter(new c8(t,r,Axe)),o.setFTReporter(new c8(t,r,ust,!0))}await i}reInitialize(t){return this._initialized?this.initialize(t,this._namespace,this._enabled):Promise.reject(new Error("Cannot re-initialize telemetry that has not been initialized."))}};function w5(e,t,r){return e.get(af).initialize(e,t,r)}s(w5,"setupTelemetryReporters");var Bn=class{constructor(t,r){this.authPersistence=t;this._copilotTokenManager=r;this.pendingSignIn=void 0}static{s(this,"AuthManager")}#e;#t;getCopilotTokenManager(){return this._copilotTokenManager}updateEnterpriseConfig(t,r){if(this.#t=void 0,this.authPersistence.setAuthAuthority(void 0),r?.uri?.match(/^https?:\/\//))try{this.authPersistence.setAuthAuthority(new URL(r.uri).host),this.#t=r.uri}catch(n){p0.exception(t,n,`Ignoring invalid github-enterprise.uri: <${r.uri}>`)}}getConfiguredUrls(){let t=this.#t??"https://github.com";return{serverUrl:t,apiUrl:t.replace("://","://api.")}}async checkAndUpdateStatus(t,r){let n=r?.localChecksOnly??!1,i;return r?.githubAppId!==void 0?i=await this.getPersistedSession(t,r):i=await this.getSession(t),i===void 0?(this._copilotTokenManager.resetToken(),await this._copilotTokenManager.primeToken(),{status:"NotSignedIn"}):n?{status:"MaybeOK",user:i.login}:(r?.forceRefresh&&this._copilotTokenManager.resetToken(),{status:await this.getTokenWithSignUpLimited(t,i,r?.freshSignIn??!1),user:i.login})}async getTokenWithSignUpLimited(t,r,n){try{await this._copilotTokenManager.getToken()}catch(i){if(i instanceof Rd)return n&&i.result.envelope?.can_signup_for_limited&&await this.signUpLimited(t,r)?this.getTokenWithSignUpLimited(t,r,!1):i.result.reason==="HTTP401"?"NotSignedIn":i.result.reason;throw i}return"OK"}async getSession(t){let r=fst(process.env)??this.#e;if(r)return{...r,...l8(r)};if(r!==null)return await this.getPersistedSession(t)}async getPersistedSession(t,r){let n=await this.authPersistence.getAuthRecord(r);if(n===void 0)return;let i={...this.getConfiguredUrls(),accessToken:n.oauth_token,login:n.user,githubAppId:n.githubAppId};return n.dev_override&&Sd(t)==="dev"&&(i.devOverride={copilotTokenUrl:n.dev_override.copilot_token_url,notificationUrl:n.dev_override.notification_url,contentRestrictionsUrl:n.dev_override.content_restrictions_url}),i}async signUpLimited(t,r){let n="copilot_internal/subscribe_limited_user";try{return(await(await uh(t,r,n,{method:"POST",headers:{"X-GitHub-Api-Version":Vm},body:JSON.stringify({restricted_telemetry:t.get(af).isEnabled?"enabled":"disabled",public_code_suggestions:"enabled"})})).json())?.subscribed||!1}catch(i){return p0.exception(t,i,"signUpLimited failed"),!1}}async setPersistedSession({accessToken:t,login:r,githubAppId:n,serverUrl:i}){await this.authPersistence.saveAuthRecord({oauth_token:t,user:r,githubAppId:n},new URL(i||this.getConfiguredUrls().serverUrl).host),this._copilotTokenManager.resetToken(),await this._copilotTokenManager.primeToken(),await this.authPersistence.purgeLegacyAuthRecords()}setTransientSession(t,r=!0){this.#e=t,r&&this._copilotTokenManager.resetToken()}async deletePersistedSession(){await this.authPersistence.deleteAuthRecord(),await this.authPersistence.purgeLegacyAuthRecords(),!this.#e&&(this._copilotTokenManager.resetToken(),await this._copilotTokenManager.primeToken())}};function fst(e){if(e.GH_COPILOT_TOKEN&&!/=/.test(e.GH_COPILOT_TOKEN))return{apiUrl:e.GH_COPILOT_API_URL,serverUrl:e.GH_COPILOT_SERVER_URL,login:"<GH_COPILOT_TOKEN-user>",accessToken:e.GH_COPILOT_TOKEN};if(e.GITHUB_COPILOT_TOKEN)return{apiUrl:e.GITHUB_COPILOT_API_URL,serverUrl:e.GITHUB_COPILOT_SERVER_URL,login:"<GITHUB_COPILOT_TOKEN-user>",accessToken:e.GITHUB_COPILOT_TOKEN};if(e.CODESPACES==="true"&&e.GITHUB_TOKEN)return{apiUrl:e.GITHUB_API_URL,serverUrl:e.GITHUB_SERVER_URL,login:e.GITHUB_USER||"<codespaces-user>",accessToken:e.GITHUB_TOKEN}}s(fst,"getSessionFromEnv");d();var Ki=class{static{s(this,"StatusReporter")}#e=0;#t="Normal";#i;#n;#r=!0;get busy(){return this.#e>0}withProgress(t){return this.#t==="Warning"&&this.forceNormal(),this.#e++===0&&this.#o(),t().finally(()=>{--this.#e===0&&this.#o()})}forceStatus(t,r,n){this.#t===t&&this.#i===r&&!n&&!this.#n&&!this.#r||(this.#t=t,this.#i=r,this.#n=n,this.#r=!1,this.#o())}forceNormal(){this.#t!=="Inactive"&&this.forceStatus("Normal")}setError(t,r){this.forceStatus("Error",t,r)}setWarning(t){this.#t!=="Error"&&this.forceStatus("Warning",t)}setInactive(t){this.#t==="Error"||this.#t==="Warning"||this.forceStatus("Inactive",t)}clearInactive(){this.#t==="Inactive"&&this.forceStatus("Normal")}#o(){let t={kind:this.#t,message:this.#i,busy:this.busy,command:this.#n};this.didChange(t)}},kF=class extends Ki{static{s(this,"NoOpStatusReporter")}didChange(){}};var en=class{constructor(t=!1){this.primed=t}static{s(this,"CopilotTokenManager")}primeToken(){this.primed=!0;try{return this.getToken().then(()=>!0,()=>!1)}catch{return Promise.resolve(!1)}}},Rd=class extends as{constructor(r){super(r.message??"");this.result=r}static{s(this,"TokenResultError")}},BF=class extends en{constructor(r,n=!1){super(n);this.ctx=r;this.token=void 0;this.tokenPromise=void 0}static{s(this,"CopilotTokenManagerFromGitHubTokenBase")}async fetchCopilotTokenEnvelope(){let r=await this.getGitHubSession();if(!r)throw new Rd({reason:"NotSignedIn"});if(!r?.accessToken)throw new Rd({reason:"HTTP401"});let n=await _F(this.ctx,r);if(n.kind==="failure"){if(n.message)throw new Rd(n);let i=new Error(`Unexpected error getting Copilot token: ${n.reason}`);throw i.code=`CopilotToken.${n.reason}`,i}return n.envelope}async getToken(){if(!this.primed){let r=new Error("Token requested before initialization");if(yxe(this.ctx))throw r;p0.exception(this.ctx,r,".getToken")}if(!this.tokenPromise&&(!this.token||this.token?.needsRefresh())){let r=this.fetchCopilotTokenEnvelope().then(n=>{let i=new pA(n);return this.tokenPromise!==r?i:(this.token=i,this.tokenPromise=void 0,this.ctx.get(Ki).forceNormal(),this.token)},n=>{if(this.tokenPromise!==r)throw n;this.tokenPromise=void 0;let i=this.ctx.get(Ki);if(n instanceof Rd)switch(n.result.reason){case"NotSignedIn":i.setError("You are not signed into GitHub.",{command:"github.copilot.signIn",title:"Sign In"});break;case"HTTP401":i.setError("Your GitHub token is invalid. Try signing in again.");break;case"NotAuthorized":i.setError(n.message||"No access to Copilot found.");break}else i.setWarning(String(n));throw n});this.tokenPromise=r}return this.token&&!this.token.isExpired()?this.token:await this.tokenPromise}resetToken(r){r!==void 0?(jt(this.ctx,"auth.reset_token_"+r),p0.debug(this.ctx,`Resetting copilot token on HTTP error ${r}`)):p0.debug(this.ctx,"Resetting copilot token"),this.token=void 0,this.tokenPromise=void 0}},u8=class extends BF{static{s(this,"CopilotTokenManagerFromAuthManager")}async getGitHubSession(){return await this.ctx.get(Bn).getSession(this.ctx)}};function dst(e){let t=e.getCopilotIntegrationId();if(t)return t;switch(e.getEditorPluginInfo().name){case"copilot-intellij":return"jetbrains-chat";case"copilot":case"copilot-vs":return;default:return"jetbrains-chat"}}s(dst,"getIntegrationId");function _5(e){let t={...Vu(e),"X-GitHub-Api-Version":Vm},r=dst(e.get(gn));return r&&(t["Copilot-Integration-Id"]=r),t}s(_5,"getCapiHeaders");function f8(e,t,...r){return a8(e,t,"api",...r)}s(f8,"getCapiUrl");async function ov(e,t){let r=await e.get(en).getToken(),n=f8(e,r,t),i={Authorization:`Bearer ${r.token}`,..._5(e)};return await e.get(fn).fetch(new URL(n).href,{method:"GET",headers:i})}s(ov,"fetchCapiUrl");async function Cxe(e,t,r){let n=await e.get(en).getToken(),i=f8(e,n,t),o={Authorization:`Bearer ${n.token}`,..._5(e)};return await e.get(fn).fetch(new URL(i).href,{method:"POST",headers:o,body:r})}s(Cxe,"postCapiUrl");d();var xxe=10*60*1e3,ei={Gpt35turbo:"gpt-3.5-turbo",Gpt4:"gpt-4",Gpt4turbo:"gpt-4-turbo",Gpt4o:"gpt-4o",Gpt4oMini:"gpt-4o-mini",O1Mini:"o1-mini",O1Ga:"o1-ga",Claude35Sonnet:"claude-3.5-sonnet",O3Mini:"o3-mini",Gemini20Flash:"gemini-2.0-flash",Gemini20Pro:"gemini-2.0-pro",Claude37Sonnet:"claude-3.7-sonnet",Claude37SonnetThought:"claude-3.7-sonnet-thought",Gpt45:"gpt-4.5",CopilotBase:"copilot-base",Unknown:"unknown"},vxe=new Set([ei.O1Ga,ei.O3Mini,ei.O1Mini,ei.Gemini20Pro,ei.Gemini20Flash]);function kd(e){switch(e){case"edits":case"user":case"inline":return[ei.Gpt4o,ei.Gpt4turbo,ei.Gpt4,ei.O1Mini,ei.O1Ga,ei.Claude35Sonnet,ei.O3Mini,ei.Gemini20Flash,ei.Claude37Sonnet,ei.Claude37SonnetThought,ei.Gpt45,ei.CopilotBase];case"meta":case"suggestions":case"synonyms":return[ei.Gpt4oMini,ei.Gpt35turbo,ei.CopilotBase];case"gitCommit":return[ei.Gpt4oMini,ei.Gpt4o,ei.Gpt4,ei.CopilotBase];case"codeReview":return[ei.Gpt4,ei.CopilotBase];case"nesStubs":return[ei.Gpt4oMini,ei.CopilotBase]}}s(kd,"getSupportedModelFamiliesForPrompt");var NF={textEmbedding3Small:"text-embedding-3-small"},mst=I.Object({type:I.Union([I.Literal("chat"),I.Literal("embeddings"),I.Literal("completion")]),tokenizer:I.String(),family:I.String(),object:I.String(),supports:I.Optional(I.Object({tool_calls:I.Optional(I.Boolean()),parallel_tool_calls:I.Optional(I.Boolean()),streaming:I.Optional(I.Boolean()),vision:I.Optional(I.Boolean())})),limits:I.Optional(I.Object({max_inputs:I.Optional(I.Number()),max_prompt_tokens:I.Optional(I.Number()),max_output_tokens:I.Optional(I.Number()),max_context_window_tokens:I.Optional(I.Number())}))}),hst=I.Object({id:I.String(),name:I.String(),version:I.String(),model_picker_enabled:I.Boolean(),is_chat_default:I.Optional(I.Boolean()),is_chat_fallback:I.Optional(I.Boolean()),capabilities:mst,billing:I.Optional(I.Object({is_premium:I.Optional(I.Boolean()),multiplier:I.Optional(I.Number())})),object:I.String(),preview:I.Optional(I.Boolean()),isExperimental:I.Optional(I.Boolean()),policy:I.Optional(I.Object({state:I.String(),terms:I.String()}))}),bxe=I.Object({data:I.Array(hst)}),lf=class{static{s(this,"ModelMetadataProvider")}},DF=class extends lf{constructor(r){super();this.ctx=r;this._metadata=[];this._lastFetchTime=0;Ks(r,()=>{this._lastFetchTime=0})}static{s(this,"CapiModelMetadataProvider")}async getMetadata(){return this.shouldRefreshModels()&&await this.fetchMetadata(),this._metadata.slice()}async getFallbackModel(){return(await this.getMetadata()).find(n=>n.is_chat_fallback)}async fetchMetadata(){let r=await ov(this.ctx,"/models");if(r.status<200||r.status>=300){if(r.status===429&&this._metadata.length>0){kn.error(this.ctx,"Rate limited while fetching models from CAPI",{status:r.status,statusText:r.statusText});return}throw kn.error(this.ctx,"Failed to fetch models from CAPI",{status:r.status,statusText:r.statusText}),new Mx(r)}await this.processModels(r)}async fetchModel(r){let n=await ov(this.ctx,`/models/${r}`);if(!n.ok){kn.error(this.ctx,`Failed to fetch model ${r} from CAPI`,{status:n.status,statusText:n.statusText});return}return await n.json()}async acceptModelPolicy(r){return(await Cxe(this.ctx,`/models/${r}/policy`,JSON.stringify({status:"enabled"}))).ok?(await this.fetchMetadata(),!0):!1}async processModels(r){try{let n=await r.json();this._metadata=n.data,this._lastFetchTime=Date.now()}catch(n){kn.error(this.ctx,"Failed to parse models from CAPI",{error:n})}}shouldRefreshModels(){return this._metadata.length===0||!this._lastFetchTime?!0:this.isLastFetchOlderTenMinutes()}isLastFetchOlderTenMinutes(){return Date.now()-this._lastFetchTime>xxe}},PF=class extends lf{constructor(r,n){super();this.ctx=r;this.delegate=n;this._exp_models_cache=new Map}static{s(this,"ExpModelMetadataProvider")}async getMetadata(){let r=this.ctx.get(or),n=await r.updateExPValuesAndAssignments(),i=r.ideChatExpModelIds(n),o=[];if(i){let a=i?.split(",");for(let l of a){let c=await this.fetchModel(l.trim());c!==void 0&&(c.isExperimental=!0,o.push(c))}}return o.concat(await this.delegate.getMetadata())}async fetchModel(r){let n=this._exp_models_cache.get(r);if(n){let[o,a]=n;if(Date.now()-a<xxe)return o}let i=await this.delegate.fetchModel(r);if(i)return this._exp_models_cache.set(r,[i,Date.now()]),i}async acceptModelPolicy(r){return await this.delegate.acceptModelPolicy(r)}async getFallbackModel(){return await this.delegate.getFallbackModel()}};d();function Exe(e){let t=Vn(e,Rt.UserSelectedCompletionModel);return typeof t=="string"&&t.length>0?t:null}s(Exe,"getUserSelectedModelConfiguration");d();d();d();var d8=class extends Error{constructor(r,n){super(r,{cause:n});this.code="CopilotPromptLoadFailure"}static{s(this,"CopilotPromptLoadFailure")}};d();var Ixe=Ze(require("node:fs/promises")),LF=Ze(require("node:path"));async function FF(e){return await Ixe.readFile(nee(e))}s(FF,"readFile");function nee(e){return LF.default.resolve(LF.default.extname(__filename)!==".ts"?__dirname:LF.default.resolve(__dirname,"../../dist"),e)}s(nee,"locateFile");var m8=Ze(Qxe());var w_=new Map;function Do(e="o200k_base"){let t=w_.get(e);return t!==void 0?t:w_.get("o200k_base")}s(Do,"getTokenizer");async function Oxe(e="o200k_base"){return await hee,Do(e)}s(Oxe,"getTokenizerAsync");async function kst(e){if(!e.endsWith(".tiktoken.noindex"))throw new Error("File does not end with .tiktoken.noindex");let t=await FF(e),r=new Map,n=[];for(let i=0;i<t.length;i++){if(t[i]!==255||n.length===0){n.push(t[i]);continue}r.set(Uint8Array.from(n),r.size),n=[]}return r.set(Uint8Array.from(n),r.size),r}s(kst,"parseTikTokenNoIndex");var WF=class e{constructor(t){this._tokenizer=t}static{s(this,"TTokenizer")}static async create(t){try{let r=(0,m8.createTokenizer)(await kst(`resources/${t}.tiktoken.noindex`),(0,m8.getSpecialTokensByEncoder)(t),(0,m8.getRegexByEncoder)(t),32768);return new e(r)}catch(r){throw r instanceof Error?new d8("Could not load tokenizer",r):r}}tokenize(t){return this._tokenizer.encode(t)}detokenize(t){return this._tokenizer.decode(t)}tokenLength(t){return this.tokenize(t).length}tokenizeStrings(t){return this.tokenize(t).map(n=>this.detokenize([n]))}takeLastTokens(t,r){if(r<=0)return{text:"",tokens:[]};let n=4,i=1,o=Math.min(t.length,r*n),a=t.slice(-o),l=this.tokenize(a);for(;l.length<r+2&&o<t.length;)o=Math.min(t.length,o+r*i),a=t.slice(-o),l=this.tokenize(a);return l.length<r?{text:t,tokens:l}:(l=l.slice(-r),{text:this.detokenize(l),tokens:l})}takeFirstTokens(t,r){if(r<=0)return{text:"",tokens:[]};let n=4,i=1,o=Math.min(t.length,r*n),a=t.slice(0,o),l=this.tokenize(a);for(;l.length<r+2&&o<t.length;)o=Math.min(t.length,o+r*i),a=t.slice(0,o),l=this.tokenize(a);return l.length<r?{text:t,tokens:l}:(l=l.slice(0,r),{text:this.detokenize(l),tokens:l})}takeLastLinesTokens(t,r){let{text:n}=this.takeLastTokens(t,r);if(n.length===t.length||t[t.length-n.length-1]===`
`)return n;let i=n.indexOf(`
`);return n.substring(i+1)}},mee=class{constructor(){this.hash=s(t=>{let r=0;for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);r=(r<<5)-r+i,r&=r&65535}return r},"hash")}static{s(this,"MockTokenizer")}tokenize(t){return this.tokenizeStrings(t).map(this.hash)}detokenize(t){return t.map(r=>r.toString()).join(" ")}tokenizeStrings(t){return t.split(/\b/)}tokenLength(t){return this.tokenizeStrings(t).length}takeLastTokens(t,r){let n=this.tokenizeStrings(t).slice(-r);return{text:n.join(""),tokens:n.map(this.hash)}}takeFirstTokens(t,r){let n=this.tokenizeStrings(t).slice(0,r);return{text:n.join(""),tokens:n.map(this.hash)}}takeLastLinesTokens(t,r){let{text:n}=this.takeLastTokens(t,r);if(n.length===t.length||t[t.length-n.length-1]===`
`)return n;let i=n.indexOf(`
`);return n.substring(i+1)}},Bst={cl100k_base:{python:3.99,typescript:4.54,typescriptreact:4.58,javascript:4.76,csharp:5.13,java:4.86,cpp:3.85,php:4.1,html:4.57,vue:4.22,go:3.93,dart:5.66,javascriptreact:4.81,css:3.37},o200k_base:{python:4.05,typescript:4.12,typescriptreact:5.01,javascript:4.47,csharp:5.47,java:4.86,cpp:3.8,php:4.35,html:4.86,vue:4.3,go:4.21,dart:5.7,javascriptreact:4.83,css:3.33}},GF=class{constructor(t="o200k_base",r){this.languageId=r;this.tokenizerName=t}static{s(this,"ApproximateTokenizer")}tokenize(t){throw new Error("Not implemented")}detokenize(t){throw new Error("Not implemented")}tokenizeStrings(t){throw new Error("Not implemented")}getEffectiveTokenLength(){return this.tokenizerName&&this.languageId?Bst[this.tokenizerName]?.[this.languageId]??4:4}tokenLength(t){return Math.ceil(t.length/this.getEffectiveTokenLength())}takeLastTokens(t,r){if(r<=0)return{text:"",tokens:[]};let n=t.slice(-Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(i,o)=>o)}}takeFirstTokens(t,r){if(r<=0)return{text:"",tokens:[]};let n=t.slice(0,Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(i,o)=>o)}}takeLastLinesTokens(t,r){throw new Error("Not implemented")}},hee=(async()=>{w_.set("mock",new mee),w_.set("cl100k_base",await WF.create("cl100k_base")),w_.set("o200k_base",await WF.create("o200k_base"))})();d();d();var Dst=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},qxe=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},pee,HF,Wxe,gee=class extends xn{static{s(this,"AssertError")}constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),pee.add(this),HF.set(this,void 0),Dst(this,HF,t,"f"),this.error=r}Errors(){return new I5(qxe(this,pee,"m",Wxe).call(this))}};HF=new WeakMap,pee=new WeakSet,Wxe=s(function*(){this.error&&(yield this.error),yield*qxe(this,HF,"f")},"_AssertError_Iterator");function Uxe(e,t,r){if(!mi(e,t,r))throw new gee(rg(e,t,r))}s(Uxe,"AssertValue");function jF(...e){return e.length===3?Uxe(e[0],e[1],e[2]):Uxe(e[0],[],e[1])}s(jF,"Assert");d();d();d();function Pst(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ji(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ji(e[r]);return t}s(Pst,"FromObject");function Nst(e){return e.map(t=>Ji(t))}s(Nst,"FromArray");function Lst(e){return e.slice()}s(Lst,"FromTypedArray");function Fst(e){return new Map(Ji([...e.entries()]))}s(Fst,"FromMap");function Mst(e){return new Set(Ji([...e.entries()]))}s(Mst,"FromSet");function Qst(e){return new Date(e.toISOString())}s(Qst,"FromDate");function Ji(e){if(Cn(e))return Nst(e);if(d0(e))return Qst(e);if(gd(e))return Lst(e);if(p1e(e))return Fst(e);if(g1e(e))return Mst(e);if(ui(e))return Pst(e);if(zu(e))return e;throw new Error("ValueClone: Unable to clone value")}s(Ji,"Clone");var cf=class extends xn{static{s(this,"ValueCreateError")}constructor(t,r){super(r),this.schema=t}};function Xi(e){return o5(e)?e():Ji(e)}s(Xi,"FromDefault");function Ost(e,t){return yn(e,"default")?Xi(e.default):{}}s(Ost,"FromAny");function Ust(e,t){return{}}s(Ust,"FromArgument");function qst(e,t){if(e.uniqueItems===!0&&!yn(e,"default"))throw new cf(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!yn(e,"default"))throw new cf(e,"Array with the contains constraint requires a default value");return"default"in e?Xi(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>su(e.items,t)):[]}s(qst,"FromArray");function Wst(e,t){return yn(e,"default")?Xi(e.default):async function*(){}()}s(Wst,"FromAsyncIterator");function Gst(e,t){return yn(e,"default")?Xi(e.default):BigInt(0)}s(Gst,"FromBigInt");function Hst(e,t){return yn(e,"default")?Xi(e.default):!1}s(Hst,"FromBoolean");function jst(e,t){if(yn(e,"default"))return Xi(e.default);{let r=su(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let o=this;o[n]=i}}}:class{}}}s(jst,"FromConstructor");function Vst(e,t){return yn(e,"default")?Xi(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}s(Vst,"FromDate");function $st(e,t){return yn(e,"default")?Xi(e.default):()=>su(e.returns,t)}s($st,"FromFunction");function zst(e,t){let r=globalThis.Object.values(e.$defs),n=e.$defs[e.$ref];return su(n,[...t,...r])}s(zst,"FromImport");function Yst(e,t){return yn(e,"default")?Xi(e.default):e.minimum!==void 0?e.minimum:0}s(Yst,"FromInteger");function Kst(e,t){if(yn(e,"default"))return Xi(e.default);{let r=e.allOf.reduce((n,i)=>{let o=su(i,t);return typeof o=="object"?{...n,...o}:o},{});if(!mi(e,t,r))throw new cf(e,"Intersect produced invalid value. Consider using a default value.");return r}}s(Kst,"FromIntersect");function Jst(e,t){return yn(e,"default")?Xi(e.default):function*(){}()}s(Jst,"FromIterator");function Xst(e,t){return yn(e,"default")?Xi(e.default):e.const}s(Xst,"FromLiteral");function Zst(e,t){if(yn(e,"default"))return Xi(e.default);throw new cf(e,"Never types cannot be created. Consider using a default value.")}s(Zst,"FromNever");function eat(e,t){if(yn(e,"default"))return Xi(e.default);throw new cf(e,"Not types must have a default value")}s(eat,"FromNot");function tat(e,t){return yn(e,"default")?Xi(e.default):null}s(tat,"FromNull");function rat(e,t){return yn(e,"default")?Xi(e.default):e.minimum!==void 0?e.minimum:0}s(rat,"FromNumber");function nat(e,t){if(yn(e,"default"))return Xi(e.default);{let r=new Set(e.required),n={};for(let[i,o]of Object.entries(e.properties))r.has(i)&&(n[i]=su(o,t));return n}}s(nat,"FromObject");function iat(e,t){return yn(e,"default")?Xi(e.default):Promise.resolve(su(e.item,t))}s(iat,"FromPromise");function oat(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(yn(e,"default"))return Xi(e.default);if(r===$p||r===Vp)return{};{let i=r.slice(1,r.length-1).split("|"),o={};for(let a of i)o[a]=su(n,t);return o}}s(oat,"FromRecord");function sat(e,t){return yn(e,"default")?Xi(e.default):su(Yi(e,t),t)}s(sat,"FromRef");function aat(e,t){if(yn(e,"default"))return Xi(e.default);throw new cf(e,"RegExp types cannot be created. Consider using a default value.")}s(aat,"FromRegExp");function lat(e,t){if(e.pattern!==void 0){if(yn(e,"default"))return Xi(e.default);throw new cf(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(yn(e,"default"))return Xi(e.default);throw new cf(e,"String types with formats must specify a default value")}else return yn(e,"default")?Xi(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}s(lat,"FromString");function cat(e,t){return yn(e,"default")?Xi(e.default):"value"in e?Symbol.for(e.value):Symbol()}s(cat,"FromSymbol");function uat(e,t){if(yn(e,"default"))return Xi(e.default);if(!YN(e))throw new cf(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return vI(e)[0]}s(uat,"FromTemplateLiteral");function fat(e,t){if(Gxe++>Cat)throw new cf(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return yn(e,"default")?Xi(e.default):su(Yi(e,t),t)}s(fat,"FromThis");function dat(e,t){return yn(e,"default")?Xi(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>su(e.items[n],t))}s(dat,"FromTuple");function mat(e,t){if(yn(e,"default"))return Xi(e.default)}s(mat,"FromUndefined");function hat(e,t){if(yn(e,"default"))return Xi(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return su(e.anyOf[0],t)}s(hat,"FromUnion");function pat(e,t){return yn(e,"default")?Xi(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}s(pat,"FromUint8Array");function gat(e,t){return yn(e,"default")?Xi(e.default):{}}s(gat,"FromUnknown");function Aat(e,t){if(yn(e,"default"))return Xi(e.default)}s(Aat,"FromVoid");function yat(e,t){if(yn(e,"default"))return Xi(e.default);throw new Error("User defined types must specify a default value")}s(yat,"FromKind");function su(e,t){let r=_l(e,t),n=e;switch(n[ot]){case"Any":return Ost(n,r);case"Argument":return Ust(n,r);case"Array":return qst(n,r);case"AsyncIterator":return Wst(n,r);case"BigInt":return Gst(n,r);case"Boolean":return Hst(n,r);case"Constructor":return jst(n,r);case"Date":return Vst(n,r);case"Function":return $st(n,r);case"Import":return zst(n,r);case"Integer":return Yst(n,r);case"Intersect":return Kst(n,r);case"Iterator":return Jst(n,r);case"Literal":return Xst(n,r);case"Never":return Zst(n,r);case"Not":return eat(n,r);case"Null":return tat(n,r);case"Number":return rat(n,r);case"Object":return nat(n,r);case"Promise":return iat(n,r);case"Record":return oat(n,r);case"Ref":return sat(n,r);case"RegExp":return aat(n,r);case"String":return lat(n,r);case"Symbol":return cat(n,r);case"TemplateLiteral":return uat(n,r);case"This":return fat(n,r);case"Tuple":return dat(n,r);case"Undefined":return mat(n,r);case"Union":return hat(n,r);case"Uint8Array":return pat(n,r);case"Unknown":return gat(n,r);case"Void":return Aat(n,r);default:if(!m0.Has(n[ot]))throw new cf(n,"Unknown type");return yat(n,r)}}s(su,"Visit");var Cat=512,Gxe=0;function Bd(...e){return Gxe=0,e.length===2?su(e[0],e[1]):su(e[0],[])}s(Bd,"Create");var VF=class extends xn{static{s(this,"ValueCastError")}constructor(t,r){super(r),this.schema=t}};function xat(e,t,r){if(e[ot]==="Object"&&typeof r=="object"&&!tA(r)){let n=e,i=Object.getOwnPropertyNames(r),o=Object.entries(n.properties),[a,l]=[1/o.length,o.length];return o.reduce((c,[u,f])=>{let m=f[ot]==="Literal"&&f.const===r[u]?l:0,h=mi(f,t,r[u])?a:0,p=i.includes(u)?a:0;return c+(m+h+p)},0)}else return mi(e,t,r)?1:0}s(xat,"ScoreUnion");function vat(e,t,r){let n=e.anyOf.map(a=>Yi(a,t)),[i,o]=[n[0],0];for(let a of n){let l=xat(a,t,r);l>o&&(i=a,o=l)}return i}s(vat,"SelectUnion");function bat(e,t,r){if("default"in e)return typeof r=="function"?e.default:Ji(e.default);{let n=vat(e,t,r);return __(n,t,r)}}s(bat,"CastUnion");function Eat(e,t,r){return mi(e,t,r)?Ji(r):Bd(e,t)}s(Eat,"DefaultClone");function Iat(e,t,r){return mi(e,t,r)?r:Bd(e,t)}s(Iat,"Default");function Tat(e,t,r){if(mi(e,t,r))return Ji(r);let n=Cn(r)?Ji(r):Bd(e,t),i=Xr(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(Xr(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(c=>fh(e.items,t,c));if(e.uniqueItems!==!0)return a;let l=[...new Set(a)];if(!mi(e,t,l))throw new VF(e,"Array cast produced invalid data due to uniqueItems constraint");return l}s(Tat,"FromArray");function wat(e,t,r){if(mi(e,t,r))return Bd(e,t);let n=new Set(e.returns.required||[]),i=s(function(){},"result");for(let[o,a]of Object.entries(e.returns.properties))!n.has(o)&&r.prototype[o]===void 0||(i.prototype[o]=fh(a,t,r.prototype[o]));return i}s(wat,"FromConstructor");function _at(e,t,r){let n=globalThis.Object.values(e.$defs),i=e.$defs[e.$ref];return fh(i,[...t,...n],r)}s(_at,"FromImport");function Sat(e,t,r){let n=Bd(e,t),i=ui(n)&&ui(r)?{...n,...r}:r;return mi(e,t,i)?i:Bd(e,t)}s(Sat,"FromIntersect");function Rat(e,t,r){throw new VF(e,"Never types cannot be cast")}s(Rat,"FromNever");function kat(e,t,r){if(mi(e,t,r))return r;if(r===null||typeof r!="object")return Bd(e,t);let n=new Set(e.required||[]),i={};for(let[o,a]of Object.entries(e.properties))!n.has(o)&&r[o]===void 0||(i[o]=fh(a,t,r[o]));if(typeof e.additionalProperties=="object"){let o=Object.getOwnPropertyNames(e.properties);for(let a of Object.getOwnPropertyNames(r))o.includes(a)||(i[a]=fh(e.additionalProperties,t,r[a]))}return i}s(kat,"FromObject");function Bat(e,t,r){if(mi(e,t,r))return Ji(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return Bd(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],o={};for(let[a,l]of Object.entries(r))o[a]=fh(i,t,l);return o}s(Bat,"FromRecord");function Dat(e,t,r){return fh(Yi(e,t),t,r)}s(Dat,"FromRef");function Pat(e,t,r){return fh(Yi(e,t),t,r)}s(Pat,"FromThis");function Nat(e,t,r){return mi(e,t,r)?Ji(r):Cn(r)?e.items===void 0?[]:e.items.map((n,i)=>fh(n,t,r[i])):Bd(e,t)}s(Nat,"FromTuple");function Lat(e,t,r){return mi(e,t,r)?Ji(r):bat(e,t,r)}s(Lat,"FromUnion");function fh(e,t,r){let n=Ui(e.$id)?_l(e,t):t,i=e;switch(e[ot]){case"Array":return Tat(i,n,r);case"Constructor":return wat(i,n,r);case"Import":return _at(i,n,r);case"Intersect":return Sat(i,n,r);case"Never":return Rat(i,n,r);case"Object":return kat(i,n,r);case"Record":return Bat(i,n,r);case"Ref":return Dat(i,n,r);case"This":return Pat(i,n,r);case"Tuple":return Nat(i,n,r);case"Union":return Lat(i,n,r);case"Date":case"Symbol":case"Uint8Array":return Eat(e,t,r);default:return Iat(i,n,r)}}s(fh,"Visit");function __(...e){return e.length===3?fh(e[0],e[1],e[2]):fh(e[0],[],e[1])}s(__,"Cast");d();function Fat(e){return a5(e)&&e[ot]!=="Unsafe"}s(Fat,"IsCheckable");function Mat(e,t,r){return Cn(r)?r.map(n=>au(e.items,t,n)):r}s(Mat,"FromArray");function Qat(e,t,r){let n=globalThis.Object.values(e.$defs),i=e.$defs[e.$ref];return au(i,[...t,...n],r)}s(Qat,"FromImport");function Oat(e,t,r){let n=e.unevaluatedProperties,o=e.allOf.map(l=>au(l,t,Ji(r))).reduce((l,c)=>ui(c)?{...l,...c}:c,{});if(!ui(r)||!ui(o)||!a5(n))return o;let a=X0(e);for(let l of Object.getOwnPropertyNames(r))a.includes(l)||mi(n,t,r[l])&&(o[l]=au(n,t,r[l]));return o}s(Oat,"FromIntersect");function Uat(e,t,r){if(!ui(r)||Cn(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(yn(e.properties,i)){r[i]=au(e.properties[i],t,r[i]);continue}if(a5(n)&&mi(n,t,r[i])){r[i]=au(n,t,r[i]);continue}delete r[i]}return r}s(Uat,"FromObject");function qat(e,t,r){if(!ui(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[o,a]=Object.entries(e.patternProperties)[0],l=new RegExp(o);for(let c of i){if(l.test(c)){r[c]=au(a,t,r[c]);continue}if(a5(n)&&mi(n,t,r[c])){r[c]=au(n,t,r[c]);continue}delete r[c]}return r}s(qat,"FromRecord");function Wat(e,t,r){return au(Yi(e,t),t,r)}s(Wat,"FromRef");function Gat(e,t,r){return au(Yi(e,t),t,r)}s(Gat,"FromThis");function Hat(e,t,r){if(!Cn(r))return r;if(cs(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=au(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}s(Hat,"FromTuple");function jat(e,t,r){for(let n of e.anyOf)if(Fat(n)&&mi(n,t,r))return au(n,t,r);return r}s(jat,"FromUnion");function au(e,t,r){let n=Ui(e.$id)?_l(e,t):t,i=e;switch(i[ot]){case"Array":return Mat(i,n,r);case"Import":return Qat(i,n,r);case"Intersect":return Oat(i,n,r);case"Object":return Uat(i,n,r);case"Record":return qat(i,n,r);case"Ref":return Wat(i,n,r);case"This":return Gat(i,n,r);case"Tuple":return Hat(i,n,r);case"Union":return jat(i,n,r);default:return r}}s(au,"Visit");function $F(...e){return e.length===3?au(e[0],e[1],e[2]):au(e[0],[],e[1])}s($F,"Clean");d();function zF(e){return Ui(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}s(zF,"IsStringNumeric");function Vat(e){return tc(e)||jp(e)||Xr(e)}s(Vat,"IsValueToString");function S_(e){return e===!0||Xr(e)&&e===1||tc(e)&&e===BigInt("1")||Ui(e)&&(e.toLowerCase()==="true"||e==="1")}s(S_,"IsValueTrue");function R_(e){return e===!1||Xr(e)&&(e===0||Object.is(e,-0))||tc(e)&&e===BigInt("0")||Ui(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}s(R_,"IsValueFalse");function $at(e){return Ui(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}s($at,"IsTimeStringWithTimeZone");function zat(e){return Ui(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}s(zat,"IsTimeStringWithoutTimeZone");function Yat(e){return Ui(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}s(Yat,"IsDateTimeStringWithTimeZone");function Kat(e){return Ui(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}s(Kat,"IsDateTimeStringWithoutTimeZone");function Jat(e){return Ui(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}s(Jat,"IsDateString");function Xat(e,t){let r=jxe(e);return r===t?r:e}s(Xat,"TryConvertLiteralString");function Zat(e,t){let r=Vxe(e);return r===t?r:e}s(Zat,"TryConvertLiteralNumber");function elt(e,t){let r=Hxe(e);return r===t?r:e}s(elt,"TryConvertLiteralBoolean");function tlt(e,t){return Ui(e.const)?Xat(t,e.const):Xr(e.const)?Zat(t,e.const):jp(e.const)?elt(t,e.const):t}s(tlt,"TryConvertLiteral");function Hxe(e){return S_(e)?!0:R_(e)?!1:e}s(Hxe,"TryConvertBoolean");function rlt(e){let t=s(r=>r.split(".")[0],"truncateInteger");return zF(e)?BigInt(t(e)):Xr(e)?BigInt(Math.trunc(e)):R_(e)?BigInt(0):S_(e)?BigInt(1):e}s(rlt,"TryConvertBigInt");function jxe(e){return rA(e)&&e.description!==void 0?e.description.toString():Vat(e)?e.toString():e}s(jxe,"TryConvertString");function Vxe(e){return zF(e)?parseFloat(e):S_(e)?1:R_(e)?0:e}s(Vxe,"TryConvertNumber");function nlt(e){return zF(e)?parseInt(e):Xr(e)?Math.trunc(e):S_(e)?1:R_(e)?0:e}s(nlt,"TryConvertInteger");function ilt(e){return Ui(e)&&e.toLowerCase()==="null"?null:e}s(ilt,"TryConvertNull");function olt(e){return Ui(e)&&e==="undefined"?void 0:e}s(olt,"TryConvertUndefined");function slt(e){return d0(e)?e:Xr(e)?new Date(e):S_(e)?new Date(1):R_(e)?new Date(0):zF(e)?new Date(parseInt(e)):zat(e)?new Date(`1970-01-01T${e}.000Z`):$at(e)?new Date(`1970-01-01T${e}`):Kat(e)?new Date(`${e}.000Z`):Yat(e)?new Date(e):Jat(e)?new Date(`${e}T00:00:00.000Z`):e}s(slt,"TryConvertDate");function alt(e,t,r){return(Cn(r)?r:[r]).map(i=>dh(e.items,t,i))}s(alt,"FromArray");function llt(e,t,r){return rlt(r)}s(llt,"FromBigInt");function clt(e,t,r){return Hxe(r)}s(clt,"FromBoolean");function ult(e,t,r){return slt(r)}s(ult,"FromDate");function flt(e,t,r){let n=globalThis.Object.values(e.$defs),i=e.$defs[e.$ref];return dh(i,[...t,...n],r)}s(flt,"FromImport");function dlt(e,t,r){return nlt(r)}s(dlt,"FromInteger");function mlt(e,t,r){return e.allOf.reduce((n,i)=>dh(i,t,n),r)}s(mlt,"FromIntersect");function hlt(e,t,r){return tlt(e,r)}s(hlt,"FromLiteral");function plt(e,t,r){return ilt(r)}s(plt,"FromNull");function glt(e,t,r){return Vxe(r)}s(glt,"FromNumber");function Alt(e,t,r){if(!ui(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))yn(r,n)&&(r[n]=dh(e.properties[n],t,r[n]));return r}s(Alt,"FromObject");function ylt(e,t,r){if(!ui(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[i];for(let[a,l]of Object.entries(r))r[a]=dh(o,t,l);return r}s(ylt,"FromRecord");function Clt(e,t,r){return dh(Yi(e,t),t,r)}s(Clt,"FromRef");function xlt(e,t,r){return jxe(r)}s(xlt,"FromString");function vlt(e,t,r){return Ui(r)||Xr(r)?Symbol(r):r}s(vlt,"FromSymbol");function blt(e,t,r){return dh(Yi(e,t),t,r)}s(blt,"FromThis");function Elt(e,t,r){return Cn(r)&&!cs(e.items)?r.map((i,o)=>o<e.items.length?dh(e.items[o],t,i):i):r}s(Elt,"FromTuple");function Ilt(e,t,r){return olt(r)}s(Ilt,"FromUndefined");function Tlt(e,t,r){for(let n of e.anyOf){let i=dh(n,t,Ji(r));if(mi(n,t,i))return i}return r}s(Tlt,"FromUnion");function dh(e,t,r){let n=_l(e,t),i=e;switch(e[ot]){case"Array":return alt(i,n,r);case"BigInt":return llt(i,n,r);case"Boolean":return clt(i,n,r);case"Date":return ult(i,n,r);case"Import":return flt(i,n,r);case"Integer":return dlt(i,n,r);case"Intersect":return mlt(i,n,r);case"Literal":return hlt(i,n,r);case"Null":return plt(i,n,r);case"Number":return glt(i,n,r);case"Object":return Alt(i,n,r);case"Record":return ylt(i,n,r);case"Ref":return Clt(i,n,r);case"String":return xlt(i,n,r);case"Symbol":return vlt(i,n,r);case"This":return blt(i,n,r);case"Tuple":return Elt(i,n,r);case"Undefined":return Ilt(i,n,r);case"Union":return Tlt(i,n,r);default:return r}}s(dh,"Visit");function YF(...e){return e.length===3?dh(e[0],e[1],e[2]):dh(e[0],[],e[1])}s(YF,"Convert");d();function $xe(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!mi(t,r,n))throw new e8(t,n,rg(t,r,n).First());return mA(t,r)?t8(t,r,n):n}s($xe,"Decode");d();function gA(e,t){let r=yn(e,"default")?e.default:void 0,n=o5(r)?r():Ji(r);return cs(t)?n:ui(t)&&ui(n)?Object.assign(n,t):t}s(gA,"ValueOrDefault");function Aee(e){return a5(e)&&"default"in e}s(Aee,"HasDefaultProperty");function wlt(e,t,r){if(Cn(r)){for(let i=0;i<r.length;i++)r[i]=A0(e.items,t,r[i]);return r}let n=gA(e,r);if(!Cn(n))return n;for(let i=0;i<n.length;i++)n[i]=A0(e.items,t,n[i]);return n}s(wlt,"FromArray");function _lt(e,t,r){return d0(r)?r:gA(e,r)}s(_lt,"FromDate");function Slt(e,t,r){let n=globalThis.Object.values(e.$defs),i=e.$defs[e.$ref];return A0(i,[...t,...n],r)}s(Slt,"FromImport");function Rlt(e,t,r){let n=gA(e,r);return e.allOf.reduce((i,o)=>{let a=A0(o,t,n);return ui(a)?{...i,...a}:a},{})}s(Rlt,"FromIntersect");function klt(e,t,r){let n=gA(e,r);if(!ui(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let o of i){let a=A0(e.properties[o],t,n[o]);cs(a)||(n[o]=A0(e.properties[o],t,n[o]))}if(!Aee(e.additionalProperties))return n;for(let o of Object.getOwnPropertyNames(n))i.includes(o)||(n[o]=A0(e.additionalProperties,t,n[o]));return n}s(klt,"FromObject");function Blt(e,t,r){let n=gA(e,r);if(!ui(n))return n;let i=e.additionalProperties,[o,a]=Object.entries(e.patternProperties)[0],l=new RegExp(o);for(let c of Object.getOwnPropertyNames(n))l.test(c)&&Aee(a)&&(n[c]=A0(a,t,n[c]));if(!Aee(i))return n;for(let c of Object.getOwnPropertyNames(n))l.test(c)||(n[c]=A0(i,t,n[c]));return n}s(Blt,"FromRecord");function Dlt(e,t,r){return A0(Yi(e,t),t,gA(e,r))}s(Dlt,"FromRef");function Plt(e,t,r){return A0(Yi(e,t),t,r)}s(Plt,"FromThis");function Nlt(e,t,r){let n=gA(e,r);if(!Cn(n)||cs(e.items))return n;let[i,o]=[e.items,Math.max(e.items.length,n.length)];for(let a=0;a<o;a++)a<i.length&&(n[a]=A0(i[a],t,n[a]));return n}s(Nlt,"FromTuple");function Llt(e,t,r){let n=gA(e,r);for(let i of e.anyOf){let o=A0(i,t,Ji(n));if(mi(i,t,o))return o}return n}s(Llt,"FromUnion");function A0(e,t,r){let n=_l(e,t),i=e;switch(i[ot]){case"Array":return wlt(i,n,r);case"Date":return _lt(i,n,r);case"Import":return Slt(i,n,r);case"Intersect":return Rlt(i,n,r);case"Object":return klt(i,n,r);case"Record":return Blt(i,n,r);case"Ref":return Dlt(i,n,r);case"This":return Plt(i,n,r);case"Tuple":return Nlt(i,n,r);case"Union":return Llt(i,n,r);default:return gA(i,r)}}s(A0,"Visit");function KF(...e){return e.length===3?A0(e[0],e[1],e[2]):A0(e[0],[],e[1])}s(KF,"Default");d();d();var mh={};K1(mh,{Delete:()=>Mlt,Format:()=>k_,Get:()=>Olt,Has:()=>Qlt,Set:()=>Flt,ValuePointerRootDeleteError:()=>XF,ValuePointerRootSetError:()=>JF});d();var JF=class extends xn{static{s(this,"ValuePointerRootSetError")}constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}},XF=class extends xn{static{s(this,"ValuePointerRootDeleteError")}constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};function zxe(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}s(zxe,"Escape");function*k_(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield zxe(e.slice(t,r))),t=n+1):r=n;yield zxe(e.slice(t))}s(k_,"Format");function Flt(e,t,r){if(t==="")throw new JF(e,t,r);let[n,i,o]=[null,e,""];for(let a of k_(t))i[a]===void 0&&(i[a]={}),n=i,i=i[a],o=a;n[o]=r}s(Flt,"Set");function Mlt(e,t){if(t==="")throw new XF(e,t);let[r,n,i]=[null,e,""];for(let o of k_(t)){if(n[o]===void 0||n[o]===null)return;r=n,n=n[o],i=o}if(Array.isArray(r)){let o=parseInt(i);r.splice(o,1)}else delete r[i]}s(Mlt,"Delete");function Qlt(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let o of k_(t)){if(n[o]===void 0)return!1;r=n,n=n[o],i=o}return Object.getOwnPropertyNames(r).includes(i)}s(Qlt,"Has");function Olt(e,t){if(t==="")return e;let r=e;for(let n of k_(t)){if(r[n]===void 0)return;r=r[n]}return r}s(Olt,"Get");d();function Ult(e,t){if(!ui(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>sv(e[i],t[i]))}s(Ult,"ObjectType");function qlt(e,t){return d0(t)&&e.getTime()===t.getTime()}s(qlt,"DateType");function Wlt(e,t){return!Cn(t)||e.length!==t.length?!1:e.every((r,n)=>sv(r,t[n]))}s(Wlt,"ArrayType");function Glt(e,t){return!gd(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>sv(r,t[n]))}s(Glt,"TypedArrayType");function Hlt(e,t){return e===t}s(Hlt,"ValueType");function sv(e,t){if(d0(e))return qlt(e,t);if(gd(e))return Glt(e,t);if(Cn(e))return Wlt(e,t);if(ui(e))return Ult(e,t);if(zu(e))return Hlt(e,t);throw new Error("ValueEquals: Unable to compare value")}s(sv,"Equal");var jlt=ao({type:Di("insert"),path:h0(),value:th()}),Vlt=ao({type:Di("update"),path:h0(),value:th()}),$lt=ao({type:Di("delete"),path:h0()}),Kxe=so([jlt,Vlt,$lt]),ZF=class extends xn{static{s(this,"ValueDiffError")}constructor(t,r){super(r),this.value=t}};function eM(e,t){return{type:"update",path:e,value:t}}s(eM,"CreateUpdate");function Jxe(e,t){return{type:"insert",path:e,value:t}}s(Jxe,"CreateInsert");function Xxe(e){return{type:"delete",path:e}}s(Xxe,"CreateDelete");function Yxe(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new ZF(e,"Cannot diff objects with symbols")}s(Yxe,"AssertDiffable");function*zlt(e,t,r){if(Yxe(t),Yxe(r),!yJ(r))return yield eM(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let o of i)yn(t,o)||(yield Jxe(`${e}/${o}`,r[o]));for(let o of n)yn(r,o)&&(sv(t,r)||(yield*tM(`${e}/${o}`,t[o],r[o])));for(let o of n)yn(r,o)||(yield Xxe(`${e}/${o}`))}s(zlt,"ObjectType");function*Ylt(e,t,r){if(!Cn(r))return yield eM(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*tM(`${e}/${n}`,t[n],r[n]);for(let n=0;n<r.length;n++)n<t.length||(yield Jxe(`${e}/${n}`,r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield Xxe(`${e}/${n}`))}s(Ylt,"ArrayType");function*Klt(e,t,r){if(!gd(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield eM(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*tM(`${e}/${n}`,t[n],r[n])}s(Klt,"TypedArrayType");function*Jlt(e,t,r){t!==r&&(yield eM(e,r))}s(Jlt,"ValueType");function*tM(e,t,r){if(yJ(t))return yield*zlt(e,t,r);if(Cn(t))return yield*Ylt(e,t,r);if(gd(t))return yield*Klt(e,t,r);if(zu(t))return yield*Jlt(e,t,r);throw new ZF(t,"Unable to diff value")}s(tM,"Visit");function Zxe(e,t){return[...tM("",e,t)]}s(Zxe,"Diff");function Xlt(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}s(Xlt,"IsRootUpdate");function Zlt(e){return e.length===0}s(Zlt,"IsIdentity");function eve(e,t){if(Xlt(t))return Ji(t[0].value);if(Zlt(t))return Ji(e);let r=Ji(e);for(let n of t)switch(n.type){case"insert":{mh.Set(r,n.path,n.value);break}case"update":{mh.Set(r,n.path,n.value);break}case"delete":{mh.Delete(r,n.path);break}}return r}s(eve,"Patch");d();function tve(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=mA(t,r)?n8(t,r,n):n;if(!mi(t,r,i))throw new r8(t,i,rg(t,r,i).First());return i}s(tve,"Encode");d();function rM(e){return ui(e)&&!Cn(e)}s(rM,"IsStandardObject");var nM=class extends xn{static{s(this,"ValueMutateError")}constructor(t){super(t)}};function ect(e,t,r,n){if(!rM(r))mh.Set(e,t,Ji(n));else{let i=Object.getOwnPropertyNames(r),o=Object.getOwnPropertyNames(n);for(let a of i)o.includes(a)||delete r[a];for(let a of o)i.includes(a)||(r[a]=null);for(let a of o)yee(e,`${t}/${a}`,r[a],n[a])}}s(ect,"ObjectType");function tct(e,t,r,n){if(!Cn(r))mh.Set(e,t,Ji(n));else{for(let i=0;i<n.length;i++)yee(e,`${t}/${i}`,r[i],n[i]);r.splice(n.length)}}s(tct,"ArrayType");function rct(e,t,r,n){if(gd(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else mh.Set(e,t,Ji(n))}s(rct,"TypedArrayType");function nct(e,t,r,n){r!==n&&mh.Set(e,t,n)}s(nct,"ValueType");function yee(e,t,r,n){if(Cn(n))return tct(e,t,r,n);if(gd(n))return rct(e,t,r,n);if(rM(n))return ect(e,t,r,n);if(zu(n))return nct(e,t,r,n)}s(yee,"Visit");function rve(e){return gd(e)||zu(e)}s(rve,"IsNonMutableValue");function ict(e,t){return rM(e)&&Cn(t)||Cn(e)&&rM(t)}s(ict,"IsMismatchedValue");function nve(e,t){if(rve(e)||rve(t))throw new nM("Only object and array types can be mutated at the root level");if(ict(e,t))throw new nM("Cannot assign due type mismatch of assignable values");yee(e,"",e,t)}s(nve,"Mutate");d();var iM=class extends xn{static{s(this,"ParseError")}constructor(t){super(t)}},Cee;(function(e){let t=new Map([["Assert",(o,a,l)=>(jF(o,a,l),l)],["Cast",(o,a,l)=>__(o,a,l)],["Clean",(o,a,l)=>$F(o,a,l)],["Clone",(o,a,l)=>Ji(l)],["Convert",(o,a,l)=>YF(o,a,l)],["Decode",(o,a,l)=>mA(o,a)?t8(o,a,l):l],["Default",(o,a,l)=>KF(o,a,l)],["Encode",(o,a,l)=>mA(o,a)?n8(o,a,l):l]]);function r(o){t.delete(o)}s(r,"Delete"),e.Delete=r;function n(o,a){t.set(o,a)}s(n,"Set"),e.Set=n;function i(o){return t.get(o)}s(i,"Get"),e.Get=i})(Cee||(Cee={}));var ive=["Clone","Clean","Default","Convert","Assert","Decode"];function oct(e,t,r,n){return e.reduce((i,o)=>{let a=Cee.Get(o);if(cs(a))throw new iM(`Unable to find Parse operation '${o}'`);return a(t,r,i)},n)}s(oct,"ParseValue");function ove(...e){let[t,r,n,i]=e.length===4?[e[0],e[1],e[2],e[3]]:e.length===3?Cn(e[0])?[e[0],e[1],[],e[2]]:[ive,e[0],e[1],e[2]]:e.length===2?[ive,e[0],[],e[1]]:(()=>{throw new iM("Invalid Arguments")})();return oct(t,r,n,i)}s(ove,"Parse");d();var R5={};K1(R5,{Assert:()=>jF,Cast:()=>__,Check:()=>mi,Clean:()=>$F,Clone:()=>Ji,Convert:()=>YF,Create:()=>Bd,Decode:()=>$xe,Default:()=>KF,Diff:()=>Zxe,Edit:()=>Kxe,Encode:()=>tve,Equal:()=>sv,Errors:()=>rg,Hash:()=>E5,Mutate:()=>nve,Parse:()=>ove,Patch:()=>eve,ValueErrorIterator:()=>I5});d();var sct={capabilities:{family:"gpt-3.5-turbo",object:"model_capabilities",supports:{streaming:!0},tokenizer:"cl100k_base",type:"completion"},id:"copilot-codex",model_picker_enabled:!0,name:"GPT-3.5 Turbo",object:"model",preview:!1,version:"copilot-codex"},act="gpt-4o-copilot",Dd=class e{constructor(t,r=!0){this._ctx=t;this.onModelsFetchedCallbacks=[];this.fetchedModelData=[];this.customModels=[];this.editorPreviewFeaturesDisabled=!1;r&&Ks(this._ctx,n=>this.refreshAvailableModels(n))}static{s(this,"AvailableModelsManager")}async refreshAvailableModels(t){await this.refreshModels(t);for(let r of this.onModelsFetchedCallbacks)r()}addHandler(t){this.onModelsFetchedCallbacks.push(t)}getDefaultModelId(){if(this.fetchedModelData){let t=e.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled)[0];if(t)return t.id}return act}parseModelsResponse(t){try{return R5.Parse(bxe,t)}catch(r){kn.exception(this._ctx,r,"Failed to parse /models response from CAPI");return}}async refreshModels(t){let r=await this.fetchModels(t);r&&(this.fetchedModelData=r)}async fetchModels(t){return this.customModels=t.getTokenValue("cml")?.split(",")??[],this.editorPreviewFeaturesDisabled=t.getTokenValue("editor_preview_features")=="0",t.getTokenValue("fcv1")=="1"?Promise.resolve([sct]):await this.fetch()}async fetch(){let t=await ov(this._ctx,"/models");return t.ok?this.parseModelsResponse(await t.json())?.data??[]:(kn.error(this._ctx,"Failed to fetch models from CAPI",{status:t.status,statusText:t.statusText}),null)}getGenericCompletionModels(){let t=e.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled);return e.mapCompletionModels(t)}getTokenizerForModel(t){let n=this.getGenericCompletionModels().find(i=>i.modelId===t);return n?n.tokenizer:"o200k_base"}static filterCompletionModels(t,r){return t.filter(n=>n.capabilities.type==="completion").filter(n=>!r||n.preview===!1||n.preview===void 0)}static filterModelsWithEditorPreviewFeatures(t,r){return t.filter(n=>!r||n.preview===!1||n.preview===void 0)}static mapCompletionModels(t){return t.map(r=>({modelId:r.id,label:r.name,preview:!!r.preview,tokenizer:r.capabilities.tokenizer}))}getCurrentModelRequestInfo(t=void 0){let r=this.getDefaultModelId(),n=Exe(this._ctx);if(n){let l=this.getGenericCompletionModels().map(c=>c.modelId);l.includes(n)||(l.length>0&&kn.error(this._ctx,`User selected model ${n} is not in the list of generic models: ${l.join(", ")}, falling back to default model.`),n=null),r===n&&(n=null)}let i=Vn(this._ctx,Rt.DebugOverrideEngine)||Vn(this._ctx,Rt.DebugOverrideEngineLegacy);if(i)return new k5(i,"override");let o=t?this._ctx.get(or).customEngine(t):"",a=t?this._ctx.get(or).customEngineTargetEngine(t):void 0;return n?o&&a&&n===a?new k5(o,"exp"):new k5(n,"modelpicker"):o?new k5(o,"exp"):this.customModels.length>0?new k5(this.customModels[0],"custommodel"):new k5(r,"default")}},k5=class{constructor(t,r){this.modelId=t;this.modelChoiceSource=r}static{s(this,"ModelRequestInfo")}get headers(){return{}}};function B5(e,t=void 0){let r=e.get(Dd),n=r.getCurrentModelRequestInfo(t),i=r.getTokenizerForModel(n.modelId);return{headers:n.headers,modelId:n.modelId,engineChoiceSource:n.modelChoiceSource,tokenizer:i}}s(B5,"getEngineRequestInfo");d();d();var xo=class{static{s(this,"FileSystem")}};var Eve=Ze(bve());function Ive(e){return e!==void 0&&e!==0}s(Ive,"isRepoInfo");async function Tve(e){let r=(await e.get(en).getToken()).organization_list??[];return TF(r)??""}s(Tve,"getUserKind");async function B_(e,t){return(await e.get(en).getToken()).getTokenValue(t)??""}s(B_,"getTokenKeyValue");function wve(e){if(e===void 0||e===0)return"";let t=AA(e);if(t==="github/github")return t;let r=Pct(e)?.toLowerCase();return r!==void 0?r:""}s(wve,"getDogFood");function AA(e){if(e!==void 0&&e!==0&&e.hostname==="github.com")return e.owner+"/"+e.repo}s(AA,"tryGetGitHubNWO");function Pct(e){if(e!==void 0&&e!==0&&(e.hostname.endsWith("azure.com")||e.hostname.endsWith("visualstudio.com")))return e.owner+"/"+e.repo}s(Pct,"tryGetADONWO");function D5(e,t){let r=of(t);return Nct(e,r)}s(D5,"extractRepoInfoInBackground");var Nct=Qct(Lct,1e4);async function Lct(e,t){let r=txe(t);if(!r)return;let n=await Fct(e,r);if(!n)return;let i=e.get(xo),o=Bo(n,".git","config"),a;try{a=await i.readFileString(o)}catch{return}let l=Mct(a)??"",c=Eee(l),u={uri:n};return c===void 0?{baseFolder:u,url:l,hostname:"",owner:"",repo:"",pathname:""}:{baseFolder:u,url:l,...c}}s(Lct,"extractRepoInfo");function Eee(e){let t;try{if(t=(0,Eve.default)(e),t.resource==""||t.owner==""||t.name==""||t.pathname=="")return}catch{return}return{hostname:t.resource,owner:t.owner,repo:t.name,pathname:t.pathname}}s(Eee,"parseRepoUrl");async function Fct(e,t){let r=t+"_add_to_make_longer",n=e.get(xo);for(;t!=="file:///"&&t.length<r.length;){let i=Bo(t,".git","config"),o=!1;try{await n.stat(i),o=!0}catch{o=!1}if(o)return t;r=t,t=of(t)}}s(Fct,"getRepoBaseUri");function Mct(e){let t=/^\s*\[\s*remote\s+"((\\\\|\\"|[^\\"])+)"/,r=/^\s*\[remote.([^"\s]+)/,n=/^\s*url\s*=\s*([^\s#;]+)/,i=/^\s*\[/,o,a,l=!1;for(let c of e.split(`
`))if(l&&o!==void 0){if(o+=c,c.endsWith("\\"))o=o.substring(0,o.length-1);else if(l=!1,a==="origin")return o}else{let u=c.match(t)??c.match(r);if(u)a=u[1];else if(c.match(i))a=void 0;else{if(o&&a!=="origin")continue;{let f=c.match(n);if(f){if(o=f[1],o.endsWith("\\"))o=o.substring(0,o.length-1),l=!0;else if(a==="origin")return o}}}}return o}s(Mct,"getRepoUrlFromConfigText");var bee=class{static{s(this,"CompletedComputation")}constructor(t){this.result=t}};function Qct(e,t){let r=new un(t),n=new Set;return(i,...o)=>{let a=JSON.stringify(o),l=r.get(a);if(l)return l.result;if(n.has(a))return 0;let c=e(i,...o);return n.add(a),c.then(u=>{r.set(a,new bee(u)),n.delete(a)}),0}}s(Qct,"computeInBackgroundAndMemoize");d();d();d();d();var Oct={tokenizerName:"o200k_base"};function Uct(e){return{...Oct,...e}}s(Uct,"cursorContextOptions");function D_(e,t={}){let r=Uct(t),n=Do(r.tokenizerName);if(r.maxLineCount!==void 0&&r.maxLineCount<0)throw new Error("maxLineCount must be non-negative if defined");if(r.maxTokenLength!==void 0&&r.maxTokenLength<0)throw new Error("maxTokenLength must be non-negative if defined");if(r.maxLineCount===0||r.maxTokenLength===0)return{context:"",lineCount:0,tokenLength:0,tokenizerName:r.tokenizerName};let i=e.source.slice(0,e.offset);return r.maxLineCount!==void 0&&(i=i.split(`
`).slice(-r.maxLineCount).join(`
`)),r.maxTokenLength!==void 0&&(i=n.takeLastLinesTokens(i,r.maxTokenLength)),{context:i,lineCount:i.split(`
`).length,tokenLength:n.tokenLength(i),tokenizerName:r.tokenizerName}}s(D_,"getCursorContext");d();d();var qct={function:"function",snippet:"snippet",snippets:"snippets",variable:"variable",parameter:"parameter",method:"method",class:"class",module:"module",alias:"alias","enum member":"enum member",interface:"interface"};function _ve(e){let t=qct[e.semantics],r=["snippets"].includes(e.semantics)?"these":"this";return{headline:e.relativePath?`Compare ${r} ${t} from ${e.relativePath}:`:`Compare ${r} ${t}:`,snippet:e.snippet}}s(_ve,"announceSnippet");var Iee=class{constructor(t){this.keys=[];this.cache={};this.size=t}static{s(this,"FifoCache")}put(t,r){if(this.cache[t]=r,this.keys.length>this.size){this.keys.push(t);let n=this.keys.shift()??"";delete this.cache[n]}}get(t){return this.cache[t]}};var Tee=class{static{s(this,"Tokenizer")}constructor(t){this.stopsForLanguage=jct.get(t.languageId)??Hct}tokenize(t){return new Set(Wct(t).filter(r=>!this.stopsForLanguage.has(r)))}},Sve=new Iee(20),p8=class{static{s(this,"WindowedMatcher")}constructor(t){this.referenceDoc=t,this.tokenizer=new Tee(t)}get referenceTokens(){return this.createReferenceTokens()}async createReferenceTokens(){return this.referenceTokensCache??=this.tokenizer.tokenize(this._getCursorContextInfo(this.referenceDoc).context)}sortScoredSnippets(t,r="descending"){return r=="ascending"?t.sort((n,i)=>n.score>i.score?1:-1):r=="descending"?t.sort((n,i)=>n.score>i.score?-1:1):t}async retrieveAllSnippets(t,r="descending"){let n=[];if(t.source.length===0||(await this.referenceTokens).size===0)return n;let i=t.source.split(`
`),o=this.id()+":"+t.source,a=Sve.get(o)??[],l=a.length==0,c=l?i.map(u=>this.tokenizer.tokenize(u),this.tokenizer):[];for(let[u,[f,m]]of this.getWindowsDelineations(i).entries()){if(l){let g=new Set;c.slice(f,m).forEach(y=>y.forEach(x=>g.add(x),g)),a.push(g)}let h=a[u],p=this.similarityScore(h,await this.referenceTokens);if(n.length&&f>0&&n[n.length-1].endLine>f){n[n.length-1].score<p&&(n[n.length-1].score=p,n[n.length-1].startLine=f,n[n.length-1].endLine=m);continue}n.push({score:p,startLine:f,endLine:m})}return l&&Sve.put(o,a),this.sortScoredSnippets(n,r)}findMatches(t,r){return this.findBestMatch(t,r)}async findBestMatch(t,r){if(t.source.length===0||(await this.referenceTokens).size===0)return[];let n=t.source.split(`
`),i=await this.retrieveAllSnippets(t,"descending");if(i.length===0)return[];let o=[];for(let a=0;a<i.length&&a<r;a++)if(i[a].score!==0){let l=n.slice(i[a].startLine,i[a].endLine).join(`
`);o.push({snippet:l,semantics:"snippet",provider:"similar-files",...i[a]})}return o}};function Wct(e){return e.split(/[^a-zA-Z0-9]/).filter(t=>t.length>0)}s(Wct,"splitIntoWords");var Gct=new Set(["we","our","you","it","its","they","them","their","this","that","these","those","is","are","was","were","be","been","being","have","has","had","having","do","does","did","doing","can","don","t","s","will","would","should","what","which","who","when","where","why","how","a","an","the","and","or","not","no","but","because","as","until","again","further","then","once","here","there","all","any","both","each","few","more","most","other","some","such","above","below","to","during","before","after","of","at","by","about","between","into","through","from","up","down","in","out","on","off","over","under","only","own","same","so","than","too","very","just","now"]),Hct=new Set(["if","then","else","for","while","with","def","function","return","TODO","import","try","catch","raise","finally","repeat","switch","case","match","assert","continue","break","const","class","enum","struct","static","new","super","this","var",...Gct]),jct=new Map([]);d();d();d();function wee(e,t,r){return{type:"virtual",indentation:e,subs:t,label:r}}s(wee,"virtualNode");function Rve(e,t,r,n,i){if(r==="")throw new Error("Cannot create a line node with an empty source line");return{type:"line",indentation:e,lineNumber:t,sourceLine:r,subs:n,label:i}}s(Rve,"lineNode");function _ee(e){return{type:"blank",lineNumber:e,subs:[]}}s(_ee,"blankNode");function oM(e){return{type:"top",indentation:-1,subs:e??[]}}s(oM,"topNode");function cc(e){return e.type==="blank"}s(cc,"isBlank");function av(e){return e.type==="line"}s(av,"isLine");function lv(e){return e.type==="virtual"}s(lv,"isVirtual");function kve(e,t){return Oc(e,r=>{r.label=r.label?t(r.label)?void 0:r.label:void 0},"bottomUp"),e}s(kve,"clearLabelsIf");function cv(e,t){switch(e.type){case"line":case"virtual":{let r=e.subs.map(n=>cv(n,t));return{...e,subs:r,label:e.label?t(e.label):void 0}}case"blank":return{...e,label:e.label?t(e.label):void 0};case"top":return{...e,subs:e.subs.map(r=>cv(r,t)),label:e.label?t(e.label):void 0}}}s(cv,"mapLabels");function Oc(e,t,r){function n(i){r==="topDown"&&t(i),i.subs.forEach(o=>{n(o)}),r==="bottomUp"&&t(i)}s(n,"_visit"),n(e)}s(Oc,"visitTree");function See(e,t,r,n){let i=t;function o(a){i=r(a,i)}return s(o,"visitor"),Oc(e,o,n),i}s(See,"foldTree");function sM(e,t,r){let n=s(o=>{if(r!==void 0&&r(o))return o;{let a=o.subs.map(n).filter(l=>l!==void 0);return o.subs=a,t(o)}},"rebuild"),i=n(e);return i!==void 0?i:oM()}s(sM,"rebuildTree");d();function $ct(e){let t=e.split(`
`),r=t.map(u=>u.match(/^\s*/)[0].length),n=t.map(u=>u.trimLeft());function i(u){let[f,m]=o(u+1,r[u]);return[Rve(r[u],u,n[u],f),m]}s(i,"parseNode");function o(u,f){let m,h=[],p=u,g;for(;p<n.length&&(n[p]===""||r[p]>f);)if(n[p]==="")g===void 0&&(g=p),p+=1;else{if(g!==void 0){for(let y=g;y<p;y++)h.push(_ee(y));g=void 0}[m,p]=i(p),h.push(m)}return g!==void 0&&(p=g),[h,p]}s(o,"parseSubs");let[a,l]=o(0,-1),c=l;for(;c<n.length&&n[c]==="";)a.push(_ee(c)),c+=1;if(c<n.length)throw new Error(`Parsing did not go to end of file. Ended at ${c} out of ${n.length}`);return oM(a)}s($ct,"parseRaw");function P_(e,t){function r(n){if(av(n)){let i=t.find(o=>o.matches(n.sourceLine));i&&(n.label=i.label)}}s(r,"visitor"),Oc(e,r,"bottomUp")}s(P_,"labelLines");function aM(e){function t(r){if(lv(r)&&r.label===void 0){let n=r.subs.filter(i=>!cc(i));n.length===1&&(r.label=n[0].label)}}s(t,"visitor"),Oc(e,t,"bottomUp")}s(aM,"labelVirtualInherited");function N_(e){return Object.keys(e).map(t=>{let r;return e[t].test?r=s(n=>e[t].test(n),"matches"):r=e[t],{matches:r,label:t}})}s(N_,"buildLabelRules");function Ree(e){let r=sM(e,s(function(n){if(n.subs.length===0||n.subs.findIndex(a=>a.label==="closer"||a.label==="opener")===-1)return n;let i=[],o;for(let a=0;a<n.subs.length;a++){let l=n.subs[a],c=n.subs[a-1];if(l.label==="opener"&&c!==void 0&&av(c))c.subs.push(l),l.subs.forEach(u=>c.subs.push(u)),l.subs=[];else if(l.label==="closer"&&o!==void 0&&(av(l)||lv(l))&&l.indentation>=o.indentation){let u=i.length-1;for(;u>0&&cc(i[u]);)u-=1;if(o.subs.push(...i.splice(u+1)),l.subs.length>0){let f=o.subs.findIndex(g=>g.label!=="newVirtual"),m=o.subs.slice(0,f),h=o.subs.slice(f),p=h.length>0?[wee(l.indentation,h,"newVirtual")]:[];o.subs=[...m,...p,l]}else o.subs.push(l)}else i.push(l),cc(l)||(o=l)}return n.subs=i,n},"rebuilder"));return kve(e,n=>n==="newVirtual"),r}s(Ree,"combineClosersAndOpeners");function Bve(e,t=cc,r){return sM(e,s(function(i){if(i.subs.length<=1)return i;let o=[],a=[],l,c=!1;function u(f=!1){if(l!==void 0&&(o.length>0||!f)){let m=wee(l,a,r);o.push(m)}else a.forEach(m=>o.push(m))}s(u,"flushBlockIntoNewSubs");for(let f=0;f<i.subs.length;f++){let m=i.subs[f],h=t(m);!h&&c&&(u(),a=[]),c=h,a.push(m),cc(m)||(l=l??m.indentation)}return u(!0),i.subs=o,i},"rebuilder"))}s(Bve,"groupBlocks");function uv(e){return sM(e,s(function(r){return lv(r)&&r.label===void 0&&r.subs.length<=1?r.subs.length===0?void 0:r.subs[0]:(r.subs.length===1&&lv(r.subs[0])&&r.subs[0].label===void 0&&(r.subs=r.subs[0].subs),r)},"rebuilder"))}s(uv,"flattenVirtual");var zct={opener:/^[[({]/,closer:/^[\])}]/},Yct=N_(zct),Dve={};function kee(e,t){Dve[e]=t}s(kee,"registerLanguageSpecificParser");function L_(e,t){let r=$ct(e),n=Dve[t??""];return n?n(r):(P_(r,Yct),Ree(r))}s(L_,"parseTree");function lM(e,t){let r=[],n=t.length;if(n==0)return[];if(n<e)return[[0,n]];for(let i=0;i<n-e+1;i++)r.push([i,i+e]);return r}s(lM,"getBasicWindowDelineations");var cM=class e extends p8{static{s(this,"FixedWindowSizeJaccardMatcher")}constructor(t,r){super(t),this.windowLength=r}static{this.FACTORY=s(t=>({to:s(r=>new e(r,t),"to")}),"FACTORY")}id(){return"fixed:"+this.windowLength}getWindowsDelineations(t){return lM(this.windowLength,t)}_getCursorContextInfo(t){return D_(t,{maxLineCount:this.windowLength})}similarityScore(t,r){return Kct(t,r)}};function Kct(e,t){let r=new Set;return e.forEach(n=>{t.has(n)&&r.add(n)}),r.size/(e.size+t.size-r.size)}s(Kct,"computeScore");d();d();var uM=Ze(Pve());var Dee={python:"python",javascript:"javascript",javascriptreact:"javascript",jsx:"javascript",typescript:"typescript",typescriptreact:"tsx",go:"go",ruby:"ruby",csharp:"c_sharp",java:"java",php:"php",c:"cpp",cpp:"cpp"};function uf(e){return e in Dee&&e!=="csharp"&&e!=="java"&&e!=="php"&&e!=="c"&&e!=="cpp"}s(uf,"isSupportedLanguageId");function fM(e){if(!(e in Dee))throw new Error(`Unrecognized language: ${e}`);return Dee[e]}s(fM,"languageIdToWasmLanguage");var Bee=new Map;async function Jct(e){let t;try{t=await FF(`tree-sitter-${e}.wasm`)}catch(r){throw r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.name==="Error"?new d8(`Could not load tree-sitter-${e}.wasm`,r):r}return uM.default.Language.load(t)}s(Jct,"loadWasmLanguage");function Xct(e){let t=fM(e);if(!Bee.has(t)){let r=Jct(t);Bee.set(t,r)}return Bee.get(t)}s(Xct,"getLanguage");var Pee=class extends Error{static{s(this,"WrappedError")}constructor(t,r){super(t,{cause:r})}};async function yA(e,t){await uM.default.init({locateFile:s(o=>nee(o),"locateFile")});let r;try{r=new uM.default}catch(o){throw o&&typeof o=="object"&&"message"in o&&typeof o.message=="string"&&o.message.includes("table index is out of bounds")?new Pee(`Could not init Parse for language <${e}>`,o):o}let n=await Xct(e);r.setLanguage(n);let i=r.parse(t);return r.delete(),i}s(yA,"parseTreeSitter");function Nve(e){switch(fM(e)){case"python":return null;case"javascript":case"typescript":case"tsx":case"go":case"c_sharp":case"java":case"php":case"cpp":return"}";case"ruby":return"end"}}s(Nve,"getBlockCloseToken");function Zct(e,t){let r=[];for(let n of e){if(!n[1]){let i=t.tree.getLanguage();n[1]=i.query(n[0])}r.push(...n[1].matches(t))}return r}s(Zct,"innerQuery");var e0t=[`[
(class_definition (block (expression_statement (string))))
(function_definition (block (expression_statement (string))))
]`];function Lve(e){return Zct([e0t],e).length==1}s(Lve,"queryPythonIsDocstring");var dM=class e extends p8{static{s(this,"BlockTokenSubsetMatcher")}constructor(t,r){super(t),this.windowLength=r}static{this.FACTORY=s(t=>({to:s(r=>new e(r,t),"to")}),"FACTORY")}id(){return"fixed:"+this.windowLength}getWindowsDelineations(t){return lM(this.windowLength,t)}_getCursorContextInfo(t){return D_(t,{maxLineCount:this.windowLength})}get referenceTokens(){return this.createReferenceTokensForLanguage()}async createReferenceTokensForLanguage(){return this.referenceTokensCache?this.referenceTokensCache:(this.referenceTokensCache=e.syntaxAwareSupportsLanguage(this.referenceDoc.languageId)?await this.syntaxAwareReferenceTokens():await super.referenceTokens,this.referenceTokensCache)}async syntaxAwareReferenceTokens(){let t=(await this.getEnclosingMemberStart(this.referenceDoc.source,this.referenceDoc.offset))?.startIndex,r=this.referenceDoc.offset,n=t?this.referenceDoc.source.slice(t,r):D_(this.referenceDoc,{maxLineCount:this.windowLength}).context;return this.tokenizer.tokenize(n)}static syntaxAwareSupportsLanguage(t){switch(t){case"csharp":return!0;default:return!1}}similarityScore(t,r){return t0t(t,r)}async getEnclosingMemberStart(t,r){let n;try{n=await yA(this.referenceDoc.languageId,t);let i=n.rootNode.namedDescendantForIndex(r);for(;i&&!(e.isMember(i)||e.isBlock(i));)i=i.parent??void 0;return i}finally{n?.delete()}}static isMember(t){switch(t?.type){case"method_declaration":case"property_declaration":case"field_declaration":case"constructor_declaration":return!0;default:return!1}}static isBlock(t){switch(t?.type){case"class_declaration":case"struct_declaration":case"record_declaration":case"enum_declaration":case"interface_declaration":return!0;default:return!1}}};function t0t(e,t){let r=new Set;return t.forEach(n=>{e.has(n)&&r.add(n)}),r.size}s(t0t,"computeScore");var r0t=0,n0t=60,i0t=4,o0t=1,s0t=20,a0t=1e4,Nee={snippetLength:n0t,threshold:r0t,maxTopSnippets:i0t,maxCharPerFile:a0t,maxNumberOfFiles:s0t,maxSnippetsPerFile:o0t,useSubsetMatching:!1};var mM={snippetLength:60,threshold:0,maxTopSnippets:16,maxCharPerFile:1e5,maxNumberOfFiles:200,maxSnippetsPerFile:4};function l0t(e,t){return(t.useSubsetMatching?dM.FACTORY(t.snippetLength):cM.FACTORY(t.snippetLength)).to(e)}s(l0t,"getMatcher");async function Fve(e,t,r){let n=l0t(e,r);return r.maxTopSnippets===0?[]:(await t.filter(o=>o.source.length<r.maxCharPerFile&&o.source.length>0).slice(0,r.maxNumberOfFiles).reduce(async(o,a)=>(await o).concat((await n.findMatches(a,r.maxSnippetsPerFile)).map(l=>({relativePath:a.relativePath,...l}))),Promise.resolve([]))).filter(o=>o.score&&o.snippet&&o.score>r.threshold).sort((o,a)=>o.score-a.score).slice(-r.maxTopSnippets)}s(Fve,"getSimilarSnippets");var F_=500,M_=8192-F_,Mve=4;var hM=10,pM=15;var c0t={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor",c:"cpp"};function Q_(e){return e=e.toLowerCase(),c0t[e]??e}s(Q_,"normalizeLanguageId");var Lee=class{constructor(t){this.ctx=t;this.cache=new un(200)}static{s(this,"FilterSettingsToExpConfigs")}async fetchExpConfig(t){let r=this.cache.get(t.stringify());return r||(r=new Fee(()=>this.ctx.get(ch).fetchExperiments(this.ctx,t.toHeaders()),1e3*60*60),this.cache.set(t.stringify(),r)),r.run()}getCachedExpConfig(t){return this.cache.get(t.stringify())?.value()}},Fee=class{constructor(t,r=1/0){this.producer=t;this.expirationMs=r}static{s(this,"Task")}async run(){return this.promise===void 0&&(this.promise=this.producer(),this.storeResult(this.promise).then(()=>{this.expirationMs<1/0&&this.promise!==void 0&&setTimeout(()=>this.promise=void 0,this.expirationMs)})),this.promise}async storeResult(t){try{this.result=await t}finally{this.result===void 0&&(this.promise=void 0)}}value(){return this.result}};function f0t(e){return"uri"in e}s(f0t,"isCompletionsFiltersInfo");var or=class e{constructor(t){this.ctx=t;this.staticFilters={};this.dynamicFilters={};this.dynamicFilterGroups=[];this.upcomingDynamicFilters={};this.assignments=new Lee(this.ctx)}static{s(this,"Features")}static{this.upcomingDynamicFilterCheckDelayMs=20}static{this.upcomingTimeBucketMinutes=5+Math.floor(Math.random()*11)}registerStaticFilters(t){Object.assign(this.staticFilters,t)}registerDynamicFilter(t,r){this.dynamicFilters[t]=r}registerDynamicFilterGroup(t){this.dynamicFilterGroups.push(t)}getDynamicFilterValues(){let t={};for(let r of this.dynamicFilterGroups)Object.assign(t,r());for(let[r,n]of Object.entries(this.dynamicFilters))t[r]=n();return t}registerUpcomingDynamicFilter(t,r){this.upcomingDynamicFilters[t]=r}async updateExPValuesAndAssignments(t,r=dn.createAndMarkAsIssued()){if(r instanceof ng)throw new Error("updateExPValuesAndAssignments should not be called with TelemetryWithExp");let n=t&&f0t(t)?D5(this.ctx,t.uri):void 0,i=AA(n)??"",o=wve(n)??"",a=t?.languageId??"",l=B5(this.ctx).modelId,c=await Tve(this.ctx),u=await B_(this.ctx,"ft"),f=await B_(this.ctx,"ol"),m=await B_(this.ctx,"cml"),h=await B_(this.ctx,"tid"),p={"X-Copilot-Repository":i,"X-Copilot-FileType":a,"X-Copilot-UserKind":c,"X-Copilot-Dogfood":o,"X-Copilot-Engine":l,"X-Copilot-CustomModel":u,"X-Copilot-Orgs":f,"X-Copilot-CustomModelNames":m,"X-Copilot-CopilotTrackingId":h},g=this.getGranularityDirectory(),y=this.makeFilterSettings(p),x=g.extendFilters(y),b=await this.getExpConfig(x.newFilterSettings);g.update(y,+(b.variables.copilotbycallbuckets??NaN),+(b.variables.copilottimeperiodsizeinh??NaN));let E=g.extendFilters(y),_=E.newFilterSettings,k=await this.getExpConfig(_),B=new Promise(N=>setTimeout(N,e.upcomingDynamicFilterCheckDelayMs));for(let N of E.otherFilterSettingsToPrefetch)B=B.then(async()=>{await new Promise(M=>setTimeout(M,e.upcomingDynamicFilterCheckDelayMs)),this.getExpConfig(N)});return this.prepareForUpcomingFilters(_),new ng(r.properties,r.measurements,r.issuedTime,{filters:_,exp:k})}getGranularityDirectory(){if(!this.granularityDirectory){let t=this.ctx.get(Ds).machineId;this.granularityDirectory=new IF(t,this.ctx.get(Hp))}return this.granularityDirectory}makeFilterSettings(t){return new Fx({...this.staticFilters,...this.getDynamicFilterValues(),...t})}async getExpConfig(t){try{return this.assignments.fetchExpConfig(t)}catch(r){return _d.createFallbackConfig(this.ctx,`Error fetching ExP config: ${String(r)}`)}}async prepareForUpcomingFilters(t){if(!(new Date().getMinutes()<60-e.upcomingTimeBucketMinutes))for(let[r,n]of Object.entries(this.upcomingDynamicFilters))await new Promise(i=>setTimeout(i,e.upcomingDynamicFilterCheckDelayMs)),this.getExpConfig(t.withChange(r,n()))}stringify(){let t=this.assignments.getCachedExpConfig(new Fx({}));return JSON.stringify(t?.variables??{})}async getFallbackExpAndFilters(){let t=this.makeFilterSettings({}),r=await this.getExpConfig(t);return{filters:t,exp:r}}disableLogProb(t){return t.filtersAndExp.exp.variables.copilotdisablelogprob??!0}overrideBlockMode(t){return t.filtersAndExp.exp.variables.copilotoverrideblockmode||void 0}customEngine(t){return t.filtersAndExp.exp.variables.copilotcustomengine??""}customEngineTargetEngine(t){return t.filtersAndExp.exp.variables.copilotcustomenginetargetengine}suffixPercent(t){return t.filtersAndExp.exp.variables.CopilotSuffixPercent??pM}suffixMatchThreshold(t){return t.filtersAndExp.exp.variables.copilotsuffixmatchthreshold??hM}cppHeadersEnableSwitch(t){return t.filtersAndExp.exp.variables.copilotcppheadersenableswitch??!1}relatedFilesVSCodeCSharp(t){return t.filtersAndExp.exp.variables.copilotrelatedfilesvscodecsharp??!1}relatedFilesVSCodeTypeScript(t){return t.filtersAndExp.exp.variables.copilotrelatedfilesvscodetypescript??!1}relatedFilesVSCode(t){return t.filtersAndExp.exp.variables.copilotrelatedfilesvscode??!1}contextProviders(t){let r=t.filtersAndExp.exp.variables.copilotcontextproviders??"";return r?r.split(",").map(n=>n.trim()):[]}contextProviderTimeBudget(t){return t.filtersAndExp.exp.variables.copilotcontextprovidertimebudget??150}includeNeighboringFiles(t){return t.filtersAndExp.exp.variables.copilotincludeneighboringfiles??!1}excludeRelatedFiles(t){return t.filtersAndExp.exp.variables.copilotexcluderelatedfiles??!1}maxPromptCompletionTokens(t){return t.filtersAndExp.exp.variables.maxpromptcompletionTokens??M_+F_}ideChatMaxRequestTokens(t){return t.filtersAndExp.exp.variables.idechatmaxrequesttokens??-1}ideChatExpModelIds(t){return t.filtersAndExp.exp.variables.idechatexpmodelids??""}ideChatEnableProjectMetadata(t){return t.filtersAndExp.exp.variables.idechatenableprojectmetadata??!1}ideEnableCopilotEditsAgent(t){return t.filtersAndExp.exp.variables.ideenablecopiloteditsagent??!1}ideEnableCopilotNewBilling(t){return t.filtersAndExp.exp.variables.ideenablecopilotnewbilling??!1}recentEditsInPrompt(t){return t.filtersAndExp.exp.variables.copilotrecenteditsinprompt??!1}recentEditsEditCount(t){return t.filtersAndExp.exp.variables.copilotrecenteditseditcount??5}recentEditsMaxFiles(t){return t.filtersAndExp.exp.variables.copilotrecenteditsmaxfiles??5}recentEditsContextLines(t){return t.filtersAndExp.exp.variables.copilotrecenteditscontextlines??3}recentEditsEditMergeLineDistance(t){return t.filtersAndExp.exp.variables.copilotrecenteditseditmergelinedistance??3}recentEditsRemoveDeletedLines(t){return t.filtersAndExp.exp.variables.copilotrecenteditsremovedeletedlines??!1}recentEditsInsertionsBeforeDeletions(t){return t.filtersAndExp.exp.variables.copilotrecenteditsinsertionsbeforedeletions??!1}recentEditsAppendNoReplyMarker(t){return t.filtersAndExp.exp.variables.copilotrecenteditsappendnoreplymarker??!1}recentEditsMaxLinesBetweenEdits(t){return t.filtersAndExp.exp.variables.copilotrecenteditsmaxlinesbetweenedits??100}recentEditsActiveDocDistanceLimitFromCursor(t){return t.filtersAndExp.exp.variables.copilotrecenteditsactivedocdistancelimitfromcursor??100}recentEditsSummarizationFormat(t){return t.filtersAndExp.exp.variables.copilotrecenteditsummarizationformat??"diff"}triggerCompletionAfterAccept(t){return t.filtersAndExp.exp.variables.copilottriggercompletionafteraccept}enableAsyncCompletions(t){return t.filtersAndExp.exp.variables.copilotasynccompletions??!1}enableSpeculativeRequests(t){return t.filtersAndExp.exp.variables.copilotspeculativerequests??!1}cppContextProviderParams(t){return t.filtersAndExp.exp.variables.copilotcppContextProviderParams}csharpContextProviderParams(t){return t.filtersAndExp.exp.variables.copilotcsharpcontextproviderparams}javaContextProviderParams(t){return t.filtersAndExp.exp.variables.copilotjavacontextproviderparams}multiLanguageContextProviderParams(t){return t.filtersAndExp.exp.variables.copilotmultilanguagecontextproviderparams}disableContextualFilter(t){return t.filtersAndExp.exp.variables.copilotdisablecontextualfilter??!1}vscodeDebounceThreshold(t){return t.filtersAndExp.exp.variables.copilotvscodedebouncethreshold}enableElectronFetcher(t){return t.filtersAndExp.exp.variables.copilotelectronfetcher??!1}asyncCompletionsTimeout(t){return t.filtersAndExp.exp.variables.copilotasynccompletionstimeout??100}enablePromptContextProxyField(t){return t.filtersAndExp.exp.variables.copilotenablepromptcontextproxyfield??!1}enableProgressiveReveal(t){return t.filtersAndExp.exp.variables.copilotprogressivereveal??!1}modelAlwaysTerminatesSingleline(t){return t.filtersAndExp.exp.variables.copilotmodelterminatesingleline??!1}longLookaheadSize(t){return t.filtersAndExp.exp.variables.copilotprogressivereveallonglookaheadsize??7}shortLookaheadSize(t){return t.filtersAndExp.exp.variables.copilotprogressiverevealshortlookaheadsize??3}enableMultilineAfterAccept(t){return t.filtersAndExp.exp.variables.copilotmultilineafteraccept??!1}enablePrefixCompletionsCache(t){return t.filtersAndExp.exp.variables.copilotprefixcompletionscache??!1}completionsElisionStrategy(t){switch(t.filtersAndExp.exp.variables.copilotcompletionselisionstrategy??""){case"elidableText":return"elidableText";case"elidableTextWithoutChunks":return"elidableTextWithoutChunks";default:return"wishlist"}}approximateElision(t){return t.filtersAndExp.exp.variables.copilotapproximateelision??!1}enableNESXTab(t){return t.filtersAndExp.exp.variables.copilotnesxtab??!1}};d();var ag=class{constructor(t){this.node=t;this.children=[];this.collapsed=!1}static{s(this,"StatementNode")}addChild(t){t.parent=this,t.nextSibling=void 0,this.children.length>0&&(this.children[this.children.length-1].nextSibling=t),this.children.push(t)}childrenFinished(){}containsStatement(t){return this.node.startIndex<=t.node.startIndex&&this.node.endIndex>=t.node.endIndex}statementAt(t){if(this.node.startIndex>t||this.node.endIndex<t)return;let r;return this.children.find(n=>(r=n.statementAt(t),r!==void 0)),r??this}collapse(){this.children.length=0,this.collapsed=!0}get description(){return`${this.node.type} ([${this.node.startPosition.row},${this.node.startPosition.column}]..[${this.node.endPosition.row},${this.node.endPosition.column}]): ${JSON.stringify(this.node.text.length>33?this.node.text.substring(0,15)+"..."+this.node.text.slice(-15):this.node.text)}`}dump(t="",r=""){let n=[`${t}${this.description}`];return this.children.forEach(i=>{n.push(i.dump(`${r}+- `,i.nextSibling===void 0?`${r} `:`${r}| `))}),n.join(`
`)}dumpPath(t="",r="",n=!1){if(this.parent){let i=this.parent.dumpPath(t,r,!0),o=i.length-i.lastIndexOf(`
`)-1-r.length,a=" ".repeat(o),l=n?`
${r}${a}+- `:"";return i+this.description+l}else{let i=n?`
${r}+- `:"";return t+this.description+i}}},Uc=class{constructor(t,r,n,i){this.languageId=t;this.text=r;this.startOffset=n;this.endOffset=i;this.statements=[]}static{s(this,"StatementTree")}static isSupported(t){return O_.languageIds.has(t)||U_.languageIds.has(t)||q_.languageIds.has(t)||W_.languageIds.has(t)||G_.languageIds.has(t)||H_.languageIds.has(t)||j_.languageIds.has(t)||V_.languageIds.has(t)}static create(t,r,n,i){if(O_.languageIds.has(t))return new O_(t,r,n,i);if(U_.languageIds.has(t))return new U_(t,r,n,i);if(q_.languageIds.has(t))return new q_(t,r,n,i);if(H_.languageIds.has(t))return new H_(t,r,n,i);if(W_.languageIds.has(t))return new W_(t,r,n,i);if(G_.languageIds.has(t))return new G_(t,r,n,i);if(j_.languageIds.has(t))return new j_(t,r,n,i);if(V_.languageIds.has(t))return new V_(t,r,n,i);throw new Error(`Unsupported languageId: ${t}`)}[Symbol.dispose](){this.tree&&(this.tree.delete(),this.tree=void 0)}clear(){this.statements.length=0}statementAt(t){let r;return this.statements.find(n=>(r=n.statementAt(t),r!==void 0)),r}async build(){let t=[];this.clear();let r=await this.parse();this.getStatementQuery(r).captures(r.rootNode,this.offsetToPosition(this.startOffset),this.offsetToPosition(this.endOffset)).forEach(i=>{let o=this.createNode(i.node);for(;t.length>0&&!t[0].containsStatement(o);)t.shift()?.childrenFinished();t.length>0?t[0].addChild(o):this.addStatement(o),t.unshift(o)}),t.forEach(i=>i.childrenFinished())}addStatement(t){t.parent=void 0,t.nextSibling=void 0,this.statements.length>0&&(this.statements[this.statements.length-1].nextSibling=t),this.statements.push(t)}async parse(){return this.tree||(this.tree=await yA(this.languageId,this.text)),this.tree}getStatementQuery(t){return this.getQuery(t.getLanguage(),this.getStatementQueryText())}getQuery(t,r){return t.query(r)}offsetToPosition(t){let r=this.text.slice(0,t).split(`
`),n=r.length-1,i=r[r.length-1].length;return{row:n,column:i}}dump(t=""){let r=[];return this.statements.forEach((n,i)=>{let o=`[${i}]`,a=" ".repeat(o.length);r.push(n.dump(`${t} ${o} `,`${t} ${a} `))}),r.join(`
`)}},Mee=class e extends ag{static{s(this,"JSStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","generator_function_declaration","class_declaration","statement_block","if_statement","switch_statement","for_statement","for_in_statement","while_statement","do_statement","try_statement","with_statement","labeled_statement","method_definition","interface_declaration"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="statement_block"||this.children.length===2&&this.node.childForFieldName("else")!==null&&this.children[0].node.type!=="statement_block"&&this.children[1].node.type!=="statement_block"}},O_=class extends Uc{static{s(this,"JSStatementTree")}static{this.languageIds=new Set(["javascript","javascriptreact","jsx","typescript","typescriptreact"])}createNode(t){return new Mee(t)}getStatementQueryText(){return`[
(export_statement)
(import_statement)
(debugger_statement)
(expression_statement)
(declaration)
(statement_block)
(if_statement)
(switch_statement)
(for_statement)
(for_in_statement)
(while_statement)
(do_statement)
(try_statement)
(with_statement)
(break_statement)
(continue_statement)
(return_statement)
(throw_statement)
(empty_statement)
(labeled_statement)
(method_definition)
(public_field_definition)
] @statement`}},Qee=class e extends ag{static{s(this,"PyStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","for_statement","while_statement","try_statement","with_statement","function_definition","class_definition","decorated_definition","match_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"?!1:this.node.startPosition.row===this.node.endPosition.row}},U_=class extends Uc{static{s(this,"PyStatementTree")}static{this.languageIds=new Set(["python"])}createNode(t){return new Qee(t)}getStatementQueryText(){return`[
(future_import_statement)
(import_statement)
(import_from_statement)
(print_statement)
(assert_statement)
(expression_statement)
(return_statement)
(delete_statement)
(raise_statement)
(pass_statement)
(break_statement)
(continue_statement)
(global_statement)
(nonlocal_statement)
(exec_statement)
(if_statement)
(for_statement)
(while_statement)
(try_statement)
(with_statement)
(function_definition)
(class_definition)
(decorated_definition)
(match_statement)
(block)
] @statement`}},Oee=class e extends ag{static{s(this,"GoStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","method_declaration","if_statement","for_statement","expression_switch_statement","type_switch_statement","select_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}},q_=class extends Uc{static{s(this,"GoStatementTree")}static{this.languageIds=new Set(["go"])}createNode(t){return new Oee(t)}getStatementQueryText(){return`[
(package_clause)
(function_declaration)
(method_declaration)
(import_declaration)
(_statement)
(block)
] @statement`}},Uee=class e extends ag{static{s(this,"PhpStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","else_clause","else_if_clause","for_statement","foreach_statement","while_statement","do_statement","switch_statement","try_statement","catch_clause","finally_clause","anonymous_function","compound_statement"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}},W_=class extends Uc{static{s(this,"PhpStatementTree")}static{this.languageIds=new Set(["php"])}createNode(t){return new Uee(t)}getStatementQueryText(){return`[
(statement)
(compound_statement)
(method_declaration)
(property_declaration)
(const_declaration)
(use_declaration)
] @statement`}},qee=class e extends ag{static{s(this,"RubyStatementNode")}static{this.compoundTypeNames=new Set(["if","case","while","until","for","begin","module","class","method"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}},G_=class extends Uc{static{s(this,"RubyStatementTree")}static{this.languageIds=new Set(["ruby"])}createNode(t){return new qee(t)}getStatementQueryText(){return`[
(_statement)
(when)
] @statement`}},Wee=class e extends ag{static{s(this,"JavaStatementNode")}static{this.compoundTypeNames=new Set(["block","do_statement","enhanced_for_statement","for_statement","if_statement","labeled_statement","switch_expression","synchronized_statement","try_statement","try_with_resources_statement","while_statement","interface_declaration","method_declaration","constructor_declaration","compact_constructor_declaration","class_declaration","annotation_type_declaration","static_initializer"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},H_=class extends Uc{static{s(this,"JavaStatementTree")}static{this.languageIds=new Set(["java"])}createNode(t){return new Wee(t)}getStatementQueryText(){return`[
(statement)
(field_declaration)
(record_declaration)
(method_declaration)
(compact_constructor_declaration)
(class_declaration)
(interface_declaration)
(annotation_type_declaration)
(enum_declaration)
(block)
(static_initializer)
(constructor_declaration)
] @statement`}},Gee=class e extends ag{static{s(this,"CSharpStatementNode")}static{this.compoundTypeNames=new Set(["block","checked_statement","class_declaration","constructor_declaration","destructor_declaration","do_statement","fixed_statement","for_statement","foreach_statement","if_statement","interface_declaration","lock_statement","method_declaration","struct_declaration","switch_statement","try_statement","unsafe_statement","while_statement"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},j_=class extends Uc{static{s(this,"CSharpStatementTree")}static{this.languageIds=new Set(["csharp"])}createNode(t){return new Gee(t)}getStatementQueryText(){return`[
(extern_alias_directive)
(using_directive)
(global_attribute)
(preproc_if)
(namespace_declaration)
(file_scoped_namespace_declaration)
(statement)
(type_declaration)
(declaration)
(accessor_declaration)
(block)
] @statement`}},Hee=class e extends ag{static{s(this,"CStatementNode")}static{this.compoundTypeNames=new Set(["declaration","function_definition","enum_specifier","field_declaration_list","type_definition","compound_statement","if_statement","switch_statement","while_statement","for_statement","do_statement","preproc_if","preproc_ifdef","namespace_definition","class_specifier","field_declaration_list","concept_definition","template_declaration"])}get isCompoundStatementType(){return!this.collapsed&&e.compoundTypeNames.has(this.node.type)}childrenFinished(){(this.isSingleLineDeclarationStatement()||this.isSingleLineConceptDefinition())&&this.collapse()}isSingleLineDeclarationStatement(){return!(this.node.type!=="declaration"||this.node.startPosition.row!==this.node.endPosition.row)}isSingleLineConceptDefinition(){return!(this.node.type!=="concept_definition"||this.node.startPosition.row!==this.node.endPosition.row)}},V_=class extends Uc{static{s(this,"CStatementTree")}static{this.languageIds=new Set(["c","cpp"])}createNode(t){return new Hee(t)}getStatementQueryText(){return`[
(declaration)
(function_definition)
(type_definition)
(field_declaration)
(enum_specifier)
(return_statement)
(compound_statement)
(if_statement)
(expression_statement)
(switch_statement)
(break_statement)
(case_statement)
(while_statement)
(for_statement)
(do_statement)
(goto_statement)
(labeled_statement)
(preproc_if)
(preproc_def)
(preproc_ifdef)
(preproc_include)
(preproc_call)
(preproc_function_def)
(continue_statement)
;C++ specific:
(namespace_definition)
(class_specifier)
(field_declaration_list)
(field_declaration)
(concept_definition)
(compound_requirement)
(template_declaration)
(using_declaration)
(alias_declaration)
(static_assert_declaration)
] @statement`}};var jee={};K1(jee,{activationEvents:()=>B0t,badges:()=>k0t,browser:()=>D0t,bugs:()=>b0t,build:()=>g0t,buildType:()=>A0t,categories:()=>S0t,contributes:()=>Vee,default:()=>O0t,dependencies:()=>M0t,description:()=>h0t,devDependencies:()=>F0t,displayName:()=>m0t,enabledApiProposals:()=>N0t,engines:()=>_0t,extensionPack:()=>w0t,homepage:()=>x0t,icon:()=>I0t,keywords:()=>R0t,license:()=>v0t,main:()=>P0t,name:()=>d0t,overrides:()=>Q0t,preview:()=>C0t,pricing:()=>T0t,publisher:()=>y0t,qna:()=>E0t,scripts:()=>L0t,version:()=>p0t});var d0t="copilot",m0t="GitHub Copilot",h0t="Your AI pair programmer",p0t="1.324.0",g0t="1588",A0t="prod",y0t="GitHub",C0t=!1,x0t="https://github.com/features/copilot?editor=vscode",v0t="https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features",b0t={url:"https://github.com/microsoft/vscode-copilot-release/issues"},E0t="https://github.com/github-community/community/discussions/categories/copilot",I0t="assets/Copilot-App-Icon.png",T0t="Trial",w0t=["GitHub.copilot-chat","GitHub.copilot"],_0t={vscode:"^1.98.0",node:">=20.0.0",npm:">=9.0.0"},S0t=["AI","Chat","Programming Languages","Machine Learning"],R0t=["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin","co-pilot"],k0t=[{url:"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange",href:"https://github.com/github-copilot/signup?editor=vscode",description:"Sign up for GitHub Copilot"},{url:"https://img.shields.io/github/stars/github/copilot-docs?style=social",href:"https://github.com/github/copilot-docs",description:"Star Copilot on GitHub"},{url:"https://img.shields.io/youtube/channel/views/UC7c3Kb6jYCRj4JOHHZTxKsQ?style=social",href:"https://www.youtube.com/@GitHub/search?query=copilot",description:"Check out GitHub on Youtube"},{url:"https://img.shields.io/twitter/follow/github?style=social",href:"https://twitter.com/github",description:"Follow GitHub on Twitter"}],B0t=["onStartupFinished"],D0t="./dist/web",P0t="./dist/extension",N0t=["inlineCompletionsAdditions"],Vee={commands:[{command:"github.copilot.toggleStatusMenu",title:"Open Status Menu",category:"GitHub Copilot"},{command:"github.copilot.signIn",title:"Sign In",category:"GitHub Copilot",enablement:"!github.copilot.activated"},{command:"github.copilot.acceptCursorPanelSolution",title:"Accept Panel Suggestion at the Cursor",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.previousPanelSolution",title:"Navigate to the Previous Panel Suggestion",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.nextPanelSolution",title:"Navigate to the Next Panel Suggestion",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.generate",title:"Open Completions Panel",enablement:"github.copilot.activated && !isWeb",category:"GitHub Copilot"},{command:"github.copilot.completions.disable",title:"Disable Completions",enablement:"github.copilot.activated && config.editor.inlineSuggest.enabled && github.copilot.completions.enabled",category:"GitHub Copilot"},{command:"github.copilot.completions.enable",title:"Enable Completions",enablement:"github.copilot.activated && !(config.editor.inlineSuggest.enabled && github.copilot.completions.enabled)",category:"GitHub Copilot"},{command:"github.copilot.completions.toggle",title:"Toggle (Enable/Disable) Completions",enablement:"github.copilot.activated",category:"GitHub Copilot"},{command:"github.copilot.sendFeedback",title:"Send Feedback",category:"GitHub Copilot"},{command:"github.copilot.collectDiagnostics",title:"Collect Diagnostics",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github.copilot.openLogs",title:"Open Logs",category:"GitHub Copilot"},{command:"github.copilot.openModelPicker",title:"Change Completions Model",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github.copilot.sendCompletionFeedback",title:"Send Copilot Completion Feedback",category:"GitHub Copilot",enablement:"!isWeb"}],keybindings:[{command:"github.copilot.acceptCursorPanelSolution",key:"ctrl+/",mac:"ctrl+/",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.previousPanelSolution",key:"alt+[",mac:"alt+[",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.nextPanelSolution",key:"alt+]",mac:"alt+]",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"editor.action.inlineSuggest.trigger",key:"alt+\\",when:"editorTextFocus && !editorHasSelection && !inlineSuggestionsVisible"}],configuration:[{title:"GitHub Copilot",properties:{"github.copilot.selectedCompletionModel":{type:"string",default:"",markdownDescription:'The currently selected completion model ID. To select from a list of available models, use the __"Change Completion Model"__ command or open the model picker from the Copilot menu. The value must be a valid model ID. An empty value indicates that the default model will be used.'},"github.copilot.advanced":{type:"object",title:"Advanced Settings",properties:{authProvider:{type:"string",enum:["github","github-enterprise"],enumDescriptions:["GitHub.com","GitHub Enterprise"],default:"github",description:"The GitHub identity to use for Copilot"},authPermissions:{type:"string",enum:["default","minimal"],markdownEnumDescriptions:["Default (recommended) - The default permissions enable the best that Copilot has to offer including, but not limited to, faster repo indexing and the power of the `@github` agent.","Minimal - The minimal permissions required for Copilot functionality."],default:"default",markdownDescription:"Controls what kind of permissions are asked for when signing in to Copilot. The options are\n* `default` - (strongly recommended) The default permissions enable the best that Copilot has to offer including, but not limited to, faster repo indexing and the power of the `@github` agent.\n* `minimal` - The minimal permissions are the least that Copilot needs to function. Some features may behave slower or not at all."},useLanguageServer:{type:"boolean",default:!1,description:"Experimental: Use language server"},"debug.overrideEngine":{type:"string",default:"",description:"Override engine name"},"debug.overrideProxyUrl":{type:"string",default:"",description:"Override GitHub authentication proxy full URL"},"debug.testOverrideProxyUrl":{type:"string",default:"",description:"Override GitHub authentication proxy URL when running tests"},"debug.overrideCapiUrl":{type:"string",default:"",description:"Override GitHub Copilot API full URL"},"debug.testOverrideCapiUrl":{type:"string",default:"",description:"Override GitHub Copilot API URL when running tests"},"debug.filterLogCategories":{type:"array",default:[],deprecationMessage:"Set overrideLogLevels.* to ERROR to filter out unwanted categories.",description:"Show only log categories listed in this setting. If an array is empty, show all loggers"}}},"github.copilot.enable":{type:"object",scope:"window",default:{"*":!0,plaintext:!1,markdown:!1,scminput:!1},additionalProperties:{type:"boolean"},markdownDescription:"Enable or disable Copilot completions for specified [languages](https://code.visualstudio.com/docs/languages/identifiers)"},"github.copilot.inlineSuggest.enable":{type:"boolean",default:!0,deprecationMessage:"This setting has no effect. Please use github.copilot.enable instead.",description:"Show inline suggestions"},"github.copilot.editor.enableAutoCompletions":{type:"boolean",scope:"language-overridable",default:!0,deprecationMessage:"This setting has no effect. Please use github.copilot.enable instead.",description:"Automatically show inline completions"}}}],configurationDefaults:{"editor.tokenColorCustomizations":{"[*Light*]":{textMateRules:[{scope:"ref.matchtext",settings:{foreground:"#000"}}]},"[*Dark*]":{textMateRules:[{scope:"ref.matchtext",settings:{foreground:"#fff"}}]}}},languages:[{id:"code-referencing"}],grammars:[{language:"code-referencing",scopeName:"text.ref",path:"./syntaxes/ref.tmGrammar.json"}],iconFonts:[{id:"copilot-font",src:[{path:"assets/copilot.woff",format:"woff"}]}]},L0t={build:"tsx esbuild.ts",clean:"./script/build/clean.sh",compress:"tsx ./script/compressTokenizer.ts","forbid-sources-content:extension":"node script/forbid-sources-content.js --extension",generate_languages:"tsx script/generateLanguages.ts && prettier --write lib/src/language/generatedLanguages.ts",get_token:"tsx script/getToken.ts",lint:'run-p --aggregate-output "lint:*"',"lint:deps":"depcruise -c .dependency-cruiser.js .","lint:eslint":"eslint -f visualstudio --quiet --cache .","lint:prettier":"prettier --check . 2>&1","lint:types":"tsc --noEmit && tsc --noEmit -p extension/src/copilotPanel/webview",prebuild:"npm install",pretest:"npm run build","pretest:headless":"npm run build","pretest:extension":"npm run build","pretest:lsp-client":"npm run build","pretest:lib-e2e":"npm run build",prewatch:"npm run build","prewatch:esbuild":"npm run build",start:"npm run watch",test:'npm-run-all "test:extension --ignore-scripts" "test:headless --ignore-scripts" lint',"test:headless":'npm-run-all test:lib test:agent "test:lib-e2e --ignore-scripts" test:prompt "test:lsp-client --ignore-scripts" lint',"test:agent":'mocha "agent/src/**/*.test.{ts,tsx}"',"test:extension":"tsx extension/test/runTest.ts","test:lib":'mocha "lib/src/**/*.test.{ts,tsx}"',"test:lib-e2e":'mocha "lib/e2e/src/**/*.test.{ts,tsx}" --exclude "lib/e2e/src/prompt/**/*.test.ts"',"test:lib-e2e-no-ci":'mocha "lib/e2e/no-ci/**/*.test.{ts,tsx}"',"test:lib-prompt-e2e":'mocha "lib/e2e/src/prompt/prompt.test.ts"',"test:lib-prompt-e2e-perf":"INCLUDE_PERFORMANCE=true npm run test:lib-prompt-e2e","test:lsp-client":'mocha "lsp-client/test/*.test.{ts,tsx}"',"test:prompt":'mocha "prompt/test/**/*.test.{ts,tsx}"',"vscode-dts":"vscode-dts dev && mv vscode.proposed.*.ts extension/src","vscode:prepublish":'run-s "build --ignore-scripts" forbid-sources-content:extension',"vscode:uninstall":"node dist/extensionUninstalled.js",vsix:"vsce package --allow-missing-repository",watch:'run-p "watch:esbuild --ignore-scripts" "watch:types -- --preserveWatchOutput"',"watch:esbuild":"tsx esbuild.ts --watch","watch:types":"tsc --noEmit --watch"},F0t={"@datadog/datadog-ci":"^3.5.0","@github/prettier-config":"0.0.6","@limegrass/eslint-plugin-import-alias":"^1.5.1","@parcel/watcher":"^2.5.1","@types/benchmark":"^2.1.5","@types/crypto-js":"^4.2.2","@types/diff":"^7.0.2","@types/git-url-parse":"^16.0.0","@types/js-yaml":"^4.0.6","@types/kerberos":"^1.1.2","@types/mocha":"^10.0.10","@types/node":"~20.8.0","@types/semver":"^7.7.0","@types/sinon":"^17.0.4","@types/uuid":"^10.0.0","@types/vscode":"1.98.0","@types/yargs":"^17.0.24","@vscode/test-electron":"^2.5.2","@vscode/vsce":"^3.3.2","@yao-pkg/pkg":"^6.4.1",benchmark:"^2.1.4",boxen:"^8.0.1",chalk:"^5.4.1","dependency-cruiser":"^16.10.2",electron:"^28.1.4",esbuild:"^0.25.4","esbuild-plugin-copy":"^2.1.1",eslint:"^9.26.0","eslint-formatter-visualstudio":"^8.40.0","eslint-plugin-mocha":"^10.5.0",fantasticon:"^3.0.0",glob:"^11.0.2",globals:"^16.1.0","js-yaml":"^4.1.0",mocha:"^11.2.2","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",prettier:"^3.5.3","prettier-plugin-organize-imports":"^4.1.0",proxy:"^2.1.1","simple-git":"^3.27.0",sinon:"^20.0.0","ts-dedent":"^2.2.0",tsx:"^4.19.4",typescript:"^5.8.3","typescript-eslint":"^8.32.0","vscode-dts":"^0.3.3"},M0t={"@adobe/helix-fetch":"github:devm33/helix-fetch#1088e599270f36632703f138d88c2100cbe468db","@github/memoize":"1.1.5","@microsoft/1ds-post-js":"^4.3.6","@microsoft/applicationinsights-web-basic":"^3.3.6","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.11.1","@sinclair/typebox":"^0.34.33","@types/vscode-webview":"^1.57.4","@vscode/codicons":"^0.0.36","@vscode/prompt-tsx":"0.4.0-alpha.1","@vscode/webview-ui-toolkit":"^1.3.1","await-lock":"^2.2.2","crypto-js":"^4.2.0",diff:"^7.0.0",dldr:"^0.0.10","get-stream":"^6.0.1","git-url-parse":"^16.0.3",kerberos:"^2.2.0","mac-ca":"^3.1.1",microjob:"^0.7.0",minimatch:"^9.0.3",open:"^10.1.2","os-browserify":"^0.3.0","path-browserify":"^1.0.1",semver:"^7.7.1",shiki:"~1.15.0","source-map-support":"^0.5.21",sqlite3:"^5.1.7",uuid:"^11.1.0","vscode-languageclient":"^9.0.0","vscode-languageserver":"^9.0.0","vscode-languageserver-protocol":"^3.17","vscode-languageserver-textdocument":"~1.0.11","vscode-uri":"^3.1.0","web-tree-sitter":"^0.20.8","windows-ca-certs":"^0.1.0",yargs:"^17.7.2"},Q0t={fsevents:"<0",bindings:"npm:bundled-bindings@^1.5.0"},O0t={name:d0t,displayName:m0t,description:h0t,version:p0t,build:g0t,buildType:A0t,publisher:y0t,preview:C0t,homepage:x0t,license:v0t,bugs:b0t,qna:E0t,icon:I0t,pricing:T0t,extensionPack:w0t,engines:_0t,categories:S0t,keywords:R0t,badges:k0t,activationEvents:B0t,browser:D0t,main:P0t,enabledApiProposals:N0t,contributes:Vee,scripts:L0t,devDependencies:F0t,dependencies:M0t,overrides:Q0t};var Rt={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",FetchStrategy:"fetchStrategy",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugOverrideLogLevels:"advanced.debug.overrideLogLevels",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",DebugUseElectronFetcher:"advanced.debug.useElectronFetcher",DebugUseEditorFetcher:"advanced.debug.useEditorFetcher",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",UseAsyncCompletions:"internal.useAsyncCompletions",EnableSpeculativeRequests:"internal.enableSpeculativeRequests",EnablePrefixCache:"internal.enablePrefixCache",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",TrimCompletionsAggressively:"internal.trimCompletionsAggressively",VSCodeDebounceThreshold:"internal.vscodeDebounceThreshold",RecentEditsInPrompt:"internal.recentEditsInPrompt",RecentEditsEditCount:"internal.recentEditsEditCount",RecentEditsMaxFiles:"internal.recentEditsMaxFiles",RecentEditsContextLines:"internal.recentEditsContextLines",RecentEditsEditMergeLineDistance:"internal.recentEditsEditMergeLineDistance",RecentEditsRemoveDeletedLines:"internal.recentEditsRemoveDeletedLines",InsertionsBeforeDeletions:"internal.recentEditsInsertionsBeforeDeletions",RecentEditsAppendNoReplyMarker:"internal.recentEditsAppendNoReplyMarker",RecentEditsMaxLinesBetweenEdits:"internal.recentEditsMaxLinesBetweenEdits",RecentEditsActiveDocDistanceLimitFromCursor:"internal.recentEditsActiveDocDistanceLimitFromCursor",RecentEditsSummarizationFormat:"internal.recentEditsSummarizationFormat",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",MultilineAfterAccept:"internal.multilineAfterAccept",NESXTab:"internal.useXTab"};function Uve(e){return["server","parsingandserver"].includes(e)}s(Uve,"shouldDoServerTrimming");var hh=class{static{s(this,"BlockModeConfig")}},A8=class extends hh{static{s(this,"ConfigBlockModeConfig")}forLanguage(t,r,n){let i=t.get(or).overrideBlockMode(n);if(i)return Qve(i,r);let o=t.get(or).enableProgressiveReveal(n);return Vn(t,Rt.AlwaysRequestMultiline)??o?Qve("moremultiline",r):r=="ruby"?"parsing":uf(r)?"parsingandserver":"server"}};function U0t(e){return["parsing","parsingandserver","moremultiline"].includes(e)}s(U0t,"blockModeRequiresTreeSitter");function Qve(e,t){return e==="moremultiline"&&Uc.isSupported(t)?e:U0t(e)&&!uf(t)?"server":e}s(Qve,"toApplicableBlockMode");var lg=class{static{s(this,"ConfigProvider")}},y8=class extends lg{static{s(this,"DefaultsOnlyConfigProvider")}getConfig(t){return W0t(t)}getOptionalConfig(t){return G0t(t)}dumpForTelemetry(){return{}}},fv=class extends lg{constructor(r,n){super();this.baseConfigProvider=r;this.overrides=n}static{s(this,"InMemoryConfigProvider")}getOptionalOverride(r){return this.overrides.get(r)}getConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getConfig(r)}getOptionalConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getOptionalConfig(r)}setConfig(r,n){n!==void 0?this.overrides.set(r,n):this.overrides.delete(r)}dumpForTelemetry(){let r=this.baseConfigProvider.dumpForTelemetry();for(let n of[Rt.ShowEditorCompletions,Rt.EnableAutoCompletions,Rt.DelayCompletions,Rt.FilterCompletions]){let i=this.overrides.get(n);i!==void 0&&(r[n]=JSON.stringify(i))}return r}};function q0t(e){return e?.type==="object"&&"properties"in e}s(q0t,"isContributesObject");function qve(e,t){let r=e,n=[];for(let i of t.split(".")){let o=[...n,i].join(".");r&&typeof r=="object"&&o in r?(r=r[o],n.length=0):n.push(i)}if(!(r===void 0||n.length>0))return r}s(qve,"getConfigKeyRecursively");function W0t(e){if(g8.has(e))return g8.get(e);throw new Error(`Missing config default value: ${U7}.${e}`)}s(W0t,"getConfigDefaultForKey");function G0t(e){return g8.get(e)}s(G0t,"getOptionalConfigDefaultForKey");var g8=new Map([[Rt.DebugOverrideCppHeadersEnableSwitch,!1],[Rt.RelatedFilesVSCodeCSharp,!1],[Rt.RelatedFilesVSCodeTypeScript,!1],[Rt.RelatedFilesVSCode,!1],[Rt.IncludeNeighboringFiles,!1],[Rt.ExcludeRelatedFiles,!1],[Rt.ContextProviders,[]],[Rt.DebugUseEditorFetcher,null],[Rt.DebugUseElectronFetcher,null],[Rt.DebugOverrideLogLevels,{}],[Rt.DebugSnippyOverrideUrl,""],[Rt.FetchStrategy,"auto"],[Rt.UseSubsetMatching,null],[Rt.ContextProviderTimeBudget,void 0],[Rt.DebugOverrideCapiUrl,""],[Rt.DebugTestOverrideCapiUrl,""],[Rt.DebugOverrideProxyUrl,""],[Rt.DebugTestOverrideProxyUrl,""],[Rt.DebugOverrideEngine,""],[Rt.UseAsyncCompletions,void 0],[Rt.EnableSpeculativeRequests,void 0],[Rt.EnablePrefixCache,void 0],[Rt.AlwaysRequestMultiline,void 0],[Rt.ModelAlwaysTerminatesSingleline,void 0],[Rt.TrimCompletionsAggressively,void 0],[Rt.VSCodeDebounceThreshold,void 0],[Rt.RecentEditsInPrompt,void 0],[Rt.RecentEditsEditCount,void 0],[Rt.RecentEditsMaxFiles,void 0],[Rt.RecentEditsContextLines,void 0],[Rt.RecentEditsEditMergeLineDistance,void 0],[Rt.RecentEditsRemoveDeletedLines,void 0],[Rt.InsertionsBeforeDeletions,void 0],[Rt.RecentEditsAppendNoReplyMarker,void 0],[Rt.RecentEditsMaxLinesBetweenEdits,void 0],[Rt.RecentEditsActiveDocDistanceLimitFromCursor,void 0],[Rt.RecentEditsSummarizationFormat,void 0],[Rt.MultilineAfterAccept,void 0],[Rt.NESXTab,void 0],[Rt.ShowEditorCompletions,void 0],[Rt.DelayCompletions,void 0],[Rt.FilterCompletions,void 0]]);for(let e of Object.values(Rt)){let t=Vee.configuration[0],r=[],n=`${U7}.${e}`.split(".");for(;n.length>0;){r.push(n.shift());let i=t.properties[r.join(".")];if(q0t(i))r.length=0,t=i;else if(n.length==0&&i?.default!==void 0){if(g8.has(e))throw new Error(`Duplicate config default value ${U7}.${e}`);g8.set(e,i.default)}}if(!g8.has(e))throw new Error(`Missing config default value ${U7}.${e}`)}function Vn(e,t){return e.get(lg).getConfig(t)}s(Vn,"getConfig");function $3e(e){return e.get(lg).dumpForTelemetry()}s($3e,"dumpForTelemetry");var po=class{constructor(){this.packageJson=jee}static{s(this,"BuildInfo")}isPreRelease(){return this.getBuildType()==="nightly"}isProduction(){return this.getBuildType()!=="dev"}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getDisplayVersion(){return this.getBuildType()==="dev"?`${this.getVersion()}-dev`:this.getVersion()}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}};function xF(e){return e.get(po).isProduction()}s(xF,"isProduction");function yxe(e){return e.get(po).getBuildType()==="dev"}s(yxe,"isDevBuild");function Sd(e){return e.get(po).getBuildType()}s(Sd,"getBuildType");function z3e(e){return e.get(po).getBuild()}s(z3e,"getBuild");function rv(e){return e.get(po).getVersion()}s(rv,"getVersion");var Ds=class{constructor(t,r,n="none",i="desktop"){this.sessionId=t;this.machineId=r;this.remoteName=n;this.uiKind=i}static{s(this,"EditorSession")}};function eg({name:e,version:t}){return`${e}/${t}`}s(eg,"formatNameAndVersion");var gn=class{static{s(this,"EditorAndPluginInfo")}getCopilotIntegrationId(){}},Vm="2025-05-01";function Vu(e){let t=e.get(gn);return{"Editor-Version":eg(t.getEditorInfo()),"Editor-Plugin-Version":eg(t.getEditorPluginInfo()),"Copilot-Language-Server-Version":rv(e)}}s(Vu,"editorVersionHeaders");var Ove="Iv1.b507a08c87ecfe98",Ia=class{static{s(this,"GitHubAppInfo")}findAppIdToAuthenticate(){return this.githubAppId??Ove}fallbackAppId(){return Ove}};d();d();d();var dv={abap:{extensions:[".abap"]},aspdotnet:{extensions:[".asax",".ascx",".ashx",".asmx",".aspx",".axd"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},BluespecSystemVerilog:{extensions:[".bsv"]},c:{extensions:[".c",".cats",".h",".h.in",".idc"]},csharp:{extensions:[".cake",".cs",".cs.pp",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cppm",".cxx",".h",".h++",".hh",".hpp",".hxx",".idl",".inc",".inl",".ino",".ipp",".ixx",".rc",".re",".tcc",".tpp",".txx",".i"]},cobol:{extensions:[".cbl",".ccp",".cob",".cobol",".cpy"]},css:{extensions:[".css",".wxss"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".edn",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},cuda:{extensions:[".cu",".cuh"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".containerfile",".dockerfile"],filenames:["Containerfile","Dockerfile"]},dotenv:{extensions:[".env"],filenames:[".env",".env.ci",".env.dev",".env.development",".env.development.local",".env.example",".env.local",".env.prod",".env.production",".env.sample",".env.staging",".env.test",".env.testing"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".html5",".inc",".jsp",".njk",".tpl",".twig",".wxml",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".app",".app.src",".erl",".es",".escript",".hrl",".xrl",".yrl"],filenames:["Emakefile","rebar.config","rebar.config.lock","rebar.lock"]},fsharp:{extensions:[".fs",".fsi",".fsx"]},go:{extensions:[".go"]},groovy:{extensions:[".gradle",".groovy",".grt",".gtpl",".gvy",".jenkinsfile"],filenames:["Jenkinsfile","Jenkinsfile"]},graphql:{extensions:[".gql",".graphql",".graphqls"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},hlsl:{extensions:[".cginc",".fx",".fxh",".hlsl",".hlsli"]},erb:{extensions:[".erb",".erb.deface",".rhtml"]},razor:{extensions:[".cshtml",".razor"]},haml:{extensions:[".haml",".haml.deface"]},handlebars:{extensions:[".handlebars",".hbs"]},haskell:{extensions:[".hs",".hs-boot",".hsc"]},ini:{extensions:[".cfg",".cnf",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".buckconfig",".coveragerc",".flake8",".pylintrc","HOSTS","buildozer.spec","hosts","pylintrc","vlcrc"]},json:{extensions:[".4DForm",".4DProject",".JSON-tmLanguage",".avsc",".geojson",".gltf",".har",".ice",".json",".json.example",".jsonl",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","MODULE.bazel.lock","Package.resolved","Pipfile.lock","bun.lock","composer.lock","deno.lock","flake.lock","mcmod.info"]},jsonc:{extensions:[".code-snippets",".code-workspace",".jsonc",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","argv.json","devcontainer.json","extensions.json","jsconfig.json","keybindings.json","language-configuration.json","launch.json","profiles.json","settings.json","tasks.json","tsconfig.json","tslint.json"]},java:{extensions:[".jav",".java",".jsh"]},javascript:{extensions:["._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".js",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"]},julia:{extensions:[".jl"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".luau",".nse",".p8",".pd_lua",".rbxs",".rockspec",".wlua"],filenames:[".luacheckrc"]},makefile:{extensions:[".d",".mak",".make",".makefile",".mk",".mkfile"],filenames:["BSDmakefile","GNUmakefile","Kbuild","Makefile","Makefile.am","Makefile.boot","Makefile.frag","Makefile.in","Makefile.inc","Makefile.wat","makefile","makefile.sco","mkfile"]},markdown:{extensions:[".livemd",".markdown",".md",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"]},"objective-c":{extensions:[".h",".m"]},"objective-cpp":{extensions:[".mm"]},php:{extensions:[".aw",".ctp",".fcgi",".inc",".install",".module",".php",".php3",".php4",".php5",".phps",".phpt",".theme"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"]},perl:{extensions:[".al",".cgi",".fcgi",".perl",".ph",".pl",".plx",".pm",".psgi",".t"],filenames:[".latexmkrc","Makefile.PL","Rexfile","ack","cpanfile","latexmkrc"]},powershell:{extensions:[".ps1",".psd1",".psm1"]},pug:{extensions:[".jade",".pug"]},python:{extensions:[".cgi",".codon",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".sage",".spec",".tac",".wsgi",".xpy"],filenames:[".gclient","DEPS","SConscript","SConstruct","wscript"]},r:{extensions:[".r",".rd",".rsx"],filenames:[".Rprofile","expr-dist"]},ruby:{extensions:[".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".prawn",".rabl",".rake",".rb",".rbi",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr"],filenames:[".irbrc",".pryrc",".simplecov","Appraisals","Berksfile","Brewfile","Buildfile","Capfile","Dangerfile","Deliverfile","Fastfile","Gemfile","Guardfile","Jarfile","Mavenfile","Podfile","Puppetfile","Rakefile","Snapfile","Steepfile","Thorfile","Vagrantfile","buildfile"]},rust:{extensions:[".rs",".rs.in"]},scss:{extensions:[".scss"]},sql:{extensions:[".cql",".ddl",".inc",".mysql",".prc",".sql",".tab",".udf",".viw"]},sass:{extensions:[".sass"]},scala:{extensions:[".kojo",".sbt",".sc",".scala"]},shellscript:{extensions:[".bash",".bats",".cgi",".command",".fcgi",".fish",".ksh",".sh",".sh.in",".tmux",".tool",".trigger",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_functions",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".envrc",".flaskenv",".kshrc",".login",".profile",".tmux.conf",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","tmux.conf","zlogin","zlogout","zprofile","zshenv","zshrc"]},slang:{extensions:[".fxc",".hlsl",".s",".slang",".slangh",".usf",".ush",".vfx"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},systemverilog:{extensions:[".sv",".svh",".vh"]},typescriptreact:{extensions:[".tsx"]},latex:{extensions:[".aux",".bbx",".cbx",".cls",".dtx",".ins",".lbx",".ltx",".mkii",".mkiv",".mkvi",".sty",".tex",".toc"]},typescript:{extensions:[".cts",".mts",".ts"]},verilog:{extensions:[".v",".veo"]},vim:{extensions:[".vba",".vim",".vimrc",".vmb"],filenames:[".exrc",".gvimrc",".nvimrc",".vimrc","_vimrc","gvimrc","nvimrc","vimrc"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".bas",".cls",".ctl",".frm",".vbs"]},vue:{extensions:[".nvue",".vue"]},xml:{extensions:[".adml",".admx",".ant",".axaml",".axml",".builds",".ccproj",".ccxml",".clixml",".cproject",".cscfg",".csdef",".csl",".csproj",".ct",".depproj",".dita",".ditamap",".ditaval",".dll.config",".dotsettings",".filters",".fsproj",".fxml",".glade",".gml",".gmx",".gpx",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mod",".mojo",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".plist",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".pubxml",".qhelp",".rdf",".res",".resx",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".svg",".sw",".targets",".tml",".typ",".ui",".urdf",".ux",".vbproj",".vcxproj",".vsixmanifest",".vssettings",".vstemplate",".vxml",".wixproj",".workflow",".wsdl",".wsf",".wxi",".wxl",".wxs",".x3d",".xacro",".xaml",".xib",".xlf",".xliff",".xmi",".xml",".xml.dist",".xmp",".xproj",".xsd",".xspec",".xul",".zcml"],filenames:[".classpath",".cproject",".project","App.config","NuGet.config","Settings.StyleCop","Web.Debug.config","Web.Release.config","Web.config","packages.config"]},xsl:{extensions:[".xsl",".xslt"]},yaml:{extensions:[".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]},legend:{extensions:[".pure"]}};d();d();var Wve=[".ejs",".erb",".haml",".hbs",".j2",".jinja",".jinja2",".liquid",".mustache",".njk",".php",".pug",".slim",".webc"],Gve={".php":[".blade"]},$_=Object.keys(dv).flatMap(e=>dv[e].extensions);var $ee=Ze(require("node:path"));var x8=class{constructor(t,r,n){this.languageId=t;this.isGuess=r;this.fileExtension=n}static{s(this,"Language")}},z_=class{static{s(this,"LanguageDetection")}},zee=new Map,C8=new Map;for(let[e,{extensions:t,filenames:r}]of Object.entries(dv)){for(let n of t)zee.set(n,[...zee.get(n)??[],e]);for(let n of r??[])C8.set(n,[...C8.get(n)??[],e])}var Yee=class extends z_{static{s(this,"FilenameAndExensionLanguageDetection")}detectLanguage(t){let r=Pi(t.uri),n=$ee.extname(r).toLowerCase(),i=this.extensionWithoutTemplateLanguage(r,n),o=this.detectLanguageId(r,i),a=this.computeFullyQualifiedExtension(n,i);return o?new x8(o.languageId,o.isGuess,a):new x8(t.languageId,!0,a)}extensionWithoutTemplateLanguage(t,r){if(Wve.includes(r)){let n=t.substring(0,t.lastIndexOf(".")),i=$ee.extname(n).toLowerCase();if(i.length>0&&$_.includes(i)&&this.isExtensionValidForTemplateLanguage(r,i))return i}return r}isExtensionValidForTemplateLanguage(t,r){let n=Gve[t];return!n||n.includes(r)}detectLanguageId(t,r){if(C8.has(t))return{languageId:C8.get(t)[0],isGuess:!1};let n=zee.get(r)??[];if(n.length>0)return{languageId:n[0],isGuess:n.length>1};for(;t.includes(".");)if(t=t.replace(/\.[^.]*$/,""),C8.has(t))return{languageId:C8.get(t)[0],isGuess:!1}}computeFullyQualifiedExtension(t,r){return t!==r?r+t:t}},Kee=class extends z_{constructor(r){super();this.delegate=r}static{s(this,"GroupingLanguageDetection")}detectLanguage(r){let n=this.delegate.detectLanguage(r),i=n.languageId;return i==="c"||i==="cpp"?new x8("cpp",n.isGuess,n.fileExtension):n}},Jee=class extends z_{constructor(r){super();this.delegate=r}static{s(this,"ClientProvidedLanguageDetection")}detectLanguage(r){return r.uri.startsWith("untitled:")||r.uri.startsWith("vscode-notebook-cell:")?new x8(r.languageId,!0,""):this.delegate.detectLanguage(r)}},H0t=new Kee(new Jee(new Yee));function v8({uri:e,languageId:t}){let r=H0t.detectLanguage({uri:e,languageId:"UNKNOWN"});return r.languageId==="UNKNOWN"?t:r.languageId}s(v8,"detectLanguage");d();d();d();d();function CA(e){if(e.isCancellationRequested)throw new gM}s(CA,"throwIfCancellationRequested");function yM(e){return e instanceof gM?!0:e instanceof Error&&e.name===Xee&&e.message===Xee}s(yM,"isCancellationError");var gM=class extends Error{static{s(this,"CancellationError")}constructor(){super(Xee),this.name=this.message}},Xee="Canceled",AM=class{constructor(){this.items=[]}static{s(this,"Stack")}push(t){this.items.push(t)}pop(){return this.items.pop()}peek(){return this.items[this.items.length-1]}tryPeek(){return this.items.length>0}toArray(){return this.items}};function mv(e){switch(e){case 0:case 2:case 7:case 8:case 11:case 12:case 13:case 14:return!0;default:return!1}}s(mv,"isTypeDefinition");var lu=class e{static{s(this,"TextRange")}static{this.empty=new e(0,0)}constructor(t,r){this.start=t,this.length=r}static fromBounds(t,r){return new e(t,r-t)}get end(){return this.start+this.length}contains(t){return this.start<=t&&this.end>=t}containsRange(t){return this.start<=t.start&&this.end>=t.end}equals(t){return this.start===t.start&&this.length===t.length}getText(t){return t.slice(this.start,this.end)}getTextWithIndentation(t,r){let n=[],i=this.start;for(i=jve(t,t.length,i),Hve(n,r);i<this.end;)t[i]!=="\r"&&t[i]!==`
`?n.push(t[i++]):t[i]==="\r"&&i<t.length&&t[i+1]!==`
`||t[i]===`
`?(n.push(`
`),i=jve(t,t.length,++i),Hve(n,r)):i++;return n.join("")}};function Hve(e,t){for(let r=0;r<t;r++)e.push(" ")}s(Hve,"appendIndent");function jve(e,t,r){for(;r<t&&(e[r]===" "||e[r]===" ");)r++;return r}s(jve,"consumeIndent");var P5=class{constructor(t,r,n,i,o,a,l,c,u){this.fileName=t;this.fullyQualifiedName=r;this.unqualifiedName=n;this.commentRange=i;this.nameRange=o;this.bodyRange=a;this.extentRange=l;this.kind=c;this.refKind=u;if(t.indexOf("\\")!==-1)throw new Error("fileName must be normalized to use forward slashes as path separators")}static{s(this,"SymbolRange")}equals(t){return this.fileName===t.fileName&&this.fullyQualifiedName===t.fullyQualifiedName&&this.unqualifiedName===t.unqualifiedName&&this.commentRange.equals(t.commentRange)&&this.nameRange.equals(t.nameRange)&&this.bodyRange.equals(t.bodyRange)&&this.extentRange.equals(t.extentRange)&&this.kind===t.kind&&this.refKind===t.refKind}},uc=class e{constructor(){this.queriesCache=new Map}static{s(this,"SymbolExtractorBase")}async findMatches(t,r){let n=await yA(this.languageId,t),i=n.getLanguage(),a=this.getOrCreateQuery(i,r).matches(n.rootNode);return{tree:n,matches:a}}async executeQuery(t,r,n){let i;try{i=await this.findMatches(r,n);let o=new AM,a=[];for(let l of i.matches){let c=this.createSymbolRange(o,t,r,l.captures);c&&a.push(c)}return a}catch{return[]}finally{i?.tree.delete()}}getOrCreateQuery(t,r){let n=this.queriesCache.get(r);return n||(n=t.query(r),this.queriesCache.set(r,n)),n}createSymbolRange(t,r,n,i){let o=0,a=0,l=0,c=0,u=0,f=0,m=0,h=0,p=null,g=null;for(let b=0;b<i.length;b++){let E=i[b].name;E==="name"?(u=i[b].node.startIndex,f=i[b].node.endIndex):E==="reference"?(u=i[b].node.startIndex,f=i[b].node.endIndex,l=i[b].node.startIndex,c=i[b].node.endIndex,p=E):E==="body"?(m=i[b].node.startIndex,h=i[b].node.endIndex):E==="comment"?(o=o===0?i[b].node.startIndex:Math.min(o,i[b].node.startIndex),a=Math.max(a,i[b].node.endIndex)):E==="receiver"?g=lu.fromBounds(i[b].node.startIndex,i[b].node.endIndex).getText(n):(l=i[b].node.startIndex,c=i[b].node.endIndex,p=E)}p==="definition.module.filescoped"&&(h=n.length,c=h);let y=lu.fromBounds(l,c),x=l>0||c>0||u>0||f>0?new P5(r,"","",lu.fromBounds(o,a),lu.fromBounds(u,f),lu.fromBounds(m,h),y,e.kindFromString(p),0):null;if(x){e.updateScopesForSymbol(t,x);let b=x.nameRange.getText(n),E=this.createNameFromScopes(n,t.toArray());return E=g?`${g}.${E}`:E,new P5(r,E,b.substring(b.lastIndexOf(".")+1),x.commentRange,x.nameRange,x.bodyRange,x.extentRange,x.kind,0)}return null}static updateScopesForSymbol(t,r){for(;t.tryPeek()&&!t.peek()?.extentRange.containsRange(r.extentRange);)t.pop();t.push(r)}static kindFromString(t){switch(t){case"definition.class":return 0;case"definition.constant":return 1;case"definition.enum_variant":return 3;case"definition.enum":return 2;case"definition.field":return 4;case"definition.function":return 5;case"definition.implementation":return 6;case"definition.interface":return 7;case"definition.macro":return 8;case"definition.method":return 9;case"import.module":case"definition.module":case"definition.module.filescoped":return 10;case"definition.struct":return 11;case"definition.trait":return 12;case"definition.type":return 13;case"definition.union":return 14;case"reference":return 16;case"wildcard":return 18;case"alias":return 19;case"import":return 17;default:throw new Error("NotSupportedException")}}cleanQuotedString(t){return t.replace(/^(['"])(.*)\1$/,"$2")}};var CM=class extends uc{static{s(this,"GoSymbolExtractor")}get languageId(){return"go"}extractSymbols(t,r){return this.executeQuery(t,r,j0t)}createNameFromScopes(t,r){return r.map(n=>n.nameRange.getText(t)).join(".")}},xM=class extends uc{static{s(this,"GoReferenceExtractor")}get languageId(){return"go"}createNameFromScopes(t,r){return r.length>0?r[r.length-1].nameRange.getText(t):""}extractReferences(t,r){return this.executeQuery(t,r,V0t)}async extractLocalReferences(t,r,n){let i=await this.executeQuery(t,r,$0t),o=i.filter(c=>c.kind!==9),a=i.filter(c=>c.kind===9&&c.extentRange.containsRange(n)),l=[];for(let c of a)l.push(...o.filter(u=>c.extentRange.containsRange(u.extentRange)));return l}};var j0t=`
(
((comment)* @comment)
.
(type_declaration (type_spec name: (_) @name type: (struct_type (field_declaration_list) @body))) @definition.struct
)
(
((comment)* @comment)
.
(type_declaration (type_spec name: (_) @name type: (interface_type (_)) @body)) @definition.interface
)
(
((comment)* @comment)
.
(method_declaration receiver: (parameter_list (parameter_declaration type: [(type_identifier) @receiver (pointer_type (type_identifier) @receiver)] )) name: (_) @name body: (_) @body) @definition.method
)
(
((comment)* @comment)
.
(method_elem name: (_) @name) @definition.method
)
(
((comment)* @comment)
.
(function_declaration name: (_) @name) @definition.method
)
(
((comment)* @comment)
.
(field_declaration name: (_) @name) @definition.field
)
`;var V0t=`
(call_expression function: (_) @name) @reference
(type_identifier) @reference
`,$0t=`
(call_expression function: (_) @name) @reference
(type_identifier) @reference
`;d();var vM=class extends uc{static{s(this,"JavaSymbolExtractor")}get languageId(){return"java"}extractSymbols(t,r){return this.executeQuery(t,r,z0t)}createNameFromScopes(t,r){return r.map(n=>n.nameRange.getText(t)).join(".")}},bM=class extends uc{static{s(this,"JavaReferenceExtractor")}get languageId(){return"java"}createNameFromScopes(t,r){return r.length>0?r[r.length-1].nameRange.getText(t):""}extractReferences(t,r){return this.executeQuery(t,r,Y0t)}async extractLocalReferences(t,r,n){let i=await this.executeQuery(t,r,K0t),o=i.filter(c=>c.kind!==9),a=i.filter(c=>c.kind===9&&c.extentRange.containsRange(n)),l=[];for(let c of a)l.push(...o.filter(u=>c.extentRange.containsRange(u.extentRange)));return l}};var z0t=`
(
[
(block_comment) @comment
(line_comment)* @comment
]
.
(class_declaration name: (identifier) @name body: (class_body) @body) @definition.class
)
(
[
(block_comment) @comment
(line_comment)* @comment
]
.
(constructor_declaration name: (identifier) @name body: (constructor_body) @body) @definition.method
)
(
[
(block_comment) @comment
(line_comment)* @comment
]
.
(method_declaration name: (identifier) @name body: (block)? @body) @definition.method
)
(
[
(block_comment) @comment
(line_comment)* @comment
]
.
(interface_declaration name: (identifier) @name body: (interface_body) @body) @definition.interface
)
(
[
(block_comment) @comment
(line_comment)* @comment
]
.
(field_declaration declarator: (variable_declarator name: (identifier) @name)) @definition.field
)
(
[
((line_comment)* @comment)
((block_comment)* @comment)
]
.
(enum_declaration name: (_) @name body: (_) @body) @definition.enum
)
(
[
((line_comment)* @comment)
((block_comment)* @comment)
]
.
(enum_constant name: (identifier) @name) @definition.enum_variant
)
`;var Y0t=`
(method_invocation
name: (identifier) @name
) @reference
(type_identifier) @reference
`,K0t=`
(method_invocation
name: (identifier) @name
) @reference
(type_identifier) @reference
`;d();var J0t=new Set(["null","undefined","void","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),EM=class extends uc{static{s(this,"JavaScriptSymbolExtractor")}get languageId(){return"javascript"}extractSymbols(t,r){return this.executeQuery(t,r,X0t)}createNameFromScopes(t,r){return r.map(n=>n.nameRange.getText(t)).join(".")}},IM=class extends uc{static{s(this,"JavaScriptReferenceExtractor")}extractLocalReferences(t,r,n){throw new Error("Method not implemented.")}get languageId(){return"javascript"}createNameFromScopes(t,r){return r.length>0?r[r.length-1].nameRange.getText(t):""}async extractReferences(t,r){return(await this.executeQuery(t,r,Z0t)).filter(i=>!J0t.has(i.unqualifiedName))}},X0t=`
(
((comment)* @comment)
.
[
(class_declaration name: (_) @name body: (_) @body) @definition.class
(function_declaration name: (_) @name body: (_) @body) @definition.function
(export_statement declaration: (lexical_declaration (variable_declarator name: (identifier) @name value: (_) @body))) @definition.function
]
)
`,Z0t=`
(call_expression function: (_) @name) @reference
`;d();var eut=new Set(["int","str","float","bool","list","dict","tuple","set"]),TM=class extends uc{static{s(this,"PythonSymbolExtractor")}get languageId(){return"python"}extractSymbols(t,r){return this.executeQuery(t,r,tut)}createNameFromScopes(t,r){return r.map(n=>n.nameRange.getText(t)).join(".")}},wM=class extends uc{static{s(this,"PythonReferenceExtractor")}get languageId(){return"python"}createNameFromScopes(t,r){return r.length>0?r[r.length-1].nameRange.getText(t):""}async extractReferences(t,r){return(await this.executeQuery(t,r,rut)).filter(i=>!eut.has(i.unqualifiedName))}async extractLocalReferences(t,r,n){let i=await this.executeQuery(t,r,nut),o=i.filter(c=>c.kind!==9),a=i.filter(c=>c.kind===9&&c.extentRange.containsRange(n)),l=[];for(let c of a)l.push(...o.filter(u=>c.extentRange.containsRange(u.extentRange)));return l}};var tut=`
(
((comment)* @comment)
.
(class_definition name: (_) @name body: (_) @body) @definition.class
)
(
((comment)* @comment)
.
(function_definition name: (_) @name body: (_) @body) @definition.method
)
`,rut=`
(call function: (_) @name) @reference
(type [
(identifier)* @name
(_ (identifier) @name)*
]) @reference
(class_definition superclasses: (argument_list (identifier) @name)) @reference
`;var nut=`
(call function: (_) @name) @reference
(type [
(identifier)* @name
(_ (identifier) @name)*
]) @reference
(class_definition superclasses: (argument_list (identifier) @name)) @reference
`;d();var iut=new Set(["string","number","boolean","null","undefined","void","any","never","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),b8=class extends uc{static{s(this,"TypeScriptSymbolExtractor")}get languageId(){return"typescript"}extractSymbols(t,r){return this.executeQuery(t,r,sut)}createNameFromScopes(t,r){return r.map(n=>n.nameRange.getText(t)).join(".")}},E8=class extends uc{static{s(this,"TypeScriptReferenceExtractor")}get languageId(){return"typescript"}createNameFromScopes(t,r){return r.length>0?r[r.length-1].nameRange.getText(t):""}async extractReferences(t,r){return(await this.executeQuery(t,r,aut)).filter(i=>!iut.has(i.unqualifiedName))}async extractLocalReferences(t,r,n){throw new Error("Method not implemented.")}},sut=`
(
((comment)* @comment)
.
[
(class_declaration name: (_) @name body: (_) @body) @definition.class
(interface_declaration name: (_) @name body: (_) @body) @definition.interface
(type_alias_declaration name: (type_identifier) @name) @definition.type
(abstract_class_declaration name: (type_identifier) @name) @definition.class
(enum_declaration name: (identifier) @name) @definition.type
]
)
(
((comment)* @comment)
.
[
(method_definition name: (_) @name body: (_) @body) @definition.method
(function_declaration name: (_) @name body: (_) @body) @definition.function
(function_signature name: (identifier) @name) @definition.function
(method_signature name: (property_identifier) @name) @definition.method
(abstract_method_signature name: (property_identifier) @name) @definition.method
(variable_declarator name: (identifier) @name type: (type_annotation (type_identifier)))
]
)
`,aut=`
(call_expression function: (_) @name) @reference
(type_identifier) @name @reference
(new_expression constructor: (identifier) @name) @reference
`;d();var lut=new Set(["string","number","boolean","null","undefined","void","any","never","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),_M=class extends b8{static{s(this,"TypeScriptReactSymbolExtractor")}get languageId(){return"typescriptreact"}extractSymbols(t,r){return Promise.all([this.executeQuery(t,r,cut),super.extractSymbols(t,r)]).then(([n,i])=>[...n,...i])}createNameFromScopes(t,r){return r.map(n=>n.nameRange.getText(t)).join(".")}},SM=class extends E8{static{s(this,"TypeScriptReactReferenceExtractor")}get languageId(){return"typescriptreact"}createNameFromScopes(t,r){return r.length>0?r[r.length-1].nameRange.getText(t):""}async extractReferences(t,r){let[n,i]=await Promise.all([this.executeQuery(t,r,uut),super.extractReferences(t,r)]);return[...n.filter(o=>!lut.has(o.unqualifiedName)),...i]}},cut=`
(
((comment)* @comment)
.
[
(lexical_declaration
(variable_declarator
name: (identifier) @name
value: (arrow_function
parameters: (_)
body: (_) @body))) @definition.function
]
)
`,uut=`
(jsx_element open_tag: (jsx_opening_element name: (_) @name) close_tag: (jsx_closing_element) ) @reference
(jsx_self_closing_element name: (_) @name) @reference
(import_specifier name:(identifier) @name) @reference
`;var RM=[{symbolExtractor:new vM,referenceExtractor:new bM,languageId:"java"},{symbolExtractor:new CM,referenceExtractor:new xM,languageId:"go"},{symbolExtractor:new TM,referenceExtractor:new wM,languageId:"python"},{symbolExtractor:new b8,referenceExtractor:new E8,languageId:"typescript"},{symbolExtractor:new _M,referenceExtractor:new SM,languageId:"typescriptreact"},{symbolExtractor:new EM,referenceExtractor:new IM,languageId:"javascript"}];function $ve(e){let t=v8({uri:e});if(t&&RM.some(r=>t===r.languageId))return t}s($ve,"getSupportedLanguageIdForMultiLanguageProvider");var zve=RM.map(e=>e.referenceExtractor),kM=RM.map(e=>e.symbolExtractor),Zee=RM.map(e=>dv[e.languageId].extensions).flat();d();d();d();d();d();d();d();d();var fut={package:/^package /,import:/^import /,class:/\bclass /,interface:/\binterface /,javadoc:/^\/\*\*/,comment_multi:/^\/\*[^*]/,comment_single:/^\/\//,annotation:/^@/,opener:/^[[({]/,closer:/^[\])}]/},dut=N_(fut);function Yve(e){let t=e;return P_(t,dut),t=Ree(t),t=uv(t),aM(t),Oc(t,r=>{if(r.label==="class"||r.label==="interface")for(let n of r.subs)!cc(n)&&(n.label===void 0||n.label==="annotation")&&(n.label="member")},"bottomUp"),t}s(Yve,"processJava");d();var mut={heading:/^# /,subheading:/^## /,subsubheading:/### /},hut=N_(mut);function Kve(e){let t=e;if(P_(t,hut),cc(t))return t;function r(o){if(o.label==="heading")return 1;if(o.label==="subheading")return 2;if(o.label==="subsubheading")return 3}s(r,"headingLevel");let n=[t],i=[...t.subs];t.subs=[];for(let o of i){let a=r(o);if(a===void 0||cc(o))n[n.length-1].subs.push(o);else{for(;n.length<a;)n.push(n[n.length-1]);for(n[a-1].subs.push(o),n[a]=o;n.length>a+1;)n.pop()}}return t=Bve(t),t=uv(t),aM(t),t}s(Kve,"processMarkdown");d();function Jve(e){return" ".repeat(e.indentation)+e.sourceLine+`
`}s(Jve,"deparseLine");kee("markdown",Kve);kee("java",Yve);var put={worthUp:.9,worthSibling:.88,worthDown:.8};function ete(e,t,r=Do(),n=put){let i=cv(e,o=>o?1:void 0);return Oc(i,o=>{if(cc(o))return;let a=o.subs.reduce((l,c)=>Math.max(l,c.label??0),0);o.label=Math.max(o.label??0,a*n.worthUp)},"bottomUp"),Oc(i,o=>{if(cc(o))return;let a=o.subs.map(u=>u.label??0),l=[...a];for(let u=0;u<a.length;u++)a[u]!==0&&(l=l.map((f,m)=>Math.max(f,Math.pow(n.worthSibling,Math.abs(u-m))*a[u])));let c=o.label;c!==void 0&&(l=l.map(u=>Math.max(u,n.worthDown*c))),o.subs.forEach((u,f)=>u.label=l[f])},"topDown"),gut(i,t,r)}s(ete,"fromTreeWithFocussedLines");function gut(e,t,r=Do()){let n=See(e,[],(i,o)=>((i.type==="line"||i.type==="blank")&&o.push(i.type==="line"?[Jve(i).trimEnd(),i.label??0]:["",i.label??0]),o),"topDown");return new zt(n,t,r)}s(gut,"fromTreeWithValuedLines");function y0(e,t=!0,r=!0,n,i=Do()){let o=typeof e=="string"?L_(e):L_(e.source,e.languageId);uv(o);let a=cv(o,l=>t&&l!=="closer");return Oc(a,l=>{l.label===void 0&&(l.label=t&&l.label!==!1)},"topDown"),t&&Oc(a,l=>{if(l.label){let c=!1;for(let u of[...l.subs].reverse())u.label&&!c?c=!0:u.label=!1}else for(let c of l.subs)c.label=!1;l.subs.length>0&&(l.label=!1)},"topDown"),r&&Oc(a,l=>{l.label||=(av(l)||cc(l))&&l.lineNumber==0},"topDown"),ete(a,n,i)}s(y0,"elidableTextForSourceCode");d();var Y_=class e{constructor(t,r,n,i="strict",o){this.text=t;this._value=r;this._cost=n;this.metadata=o;if(t.includes(`
`)&&i!=="none")throw new Error("LineWithValueAndCost: text contains newline");if(r<0&&i!=="none")throw new Error("LineWithValueAndCost: value is negative");if(n<0&&i!=="none")throw new Error("LineWithValueAndCost: cost is negative");if(i=="strict"&&r>1)throw new Error("Value should normally be between 0 and 1 -- set validation to `loose` to ignore this error")}static{s(this,"LineWithValueAndCost")}get value(){return this._value}get cost(){return this._cost}adjustValue(t){return this._value*=t,this}setValue(t){return this._value=t,this}recost(t=r=>Do().tokenLength(r+`
`)){return this._cost=t(this.text),this}copy(){return new e(this.text,this.value,this.cost,"none",this.metadata)}};var BM="elidableTextChunk",zt=class e{constructor(t,r,n=Do()){this.metadata=r;this.tokenizer=n;this.lines=[];let i=[];for(let o of t){let a=Array.isArray(o)?o[1]:1,l=Array.isArray(o)?o[0]:o;typeof l=="string"?l.split(`
`).forEach(c=>i.push(new Y_(c,a,n.tokenLength(c+`
`),"strict",this.metadata))):l instanceof e?l.lines.forEach(c=>i.push(c.copy().adjustValue(a))):"source"in l&&"languageId"in l&&y0(l).lines.forEach(c=>i.push(c.copy().adjustValue(a)))}this.lines=i}static{s(this,"ElidableText")}adjust(t){this.lines.forEach(r=>r.adjustValue(t))}recost(t=r=>Do().tokenLength(r+`
`)){this.lines.forEach(r=>r.recost(t))}elide(t,r="[...]",n=!0,i="removeLeastDesirable",o=this.tokenizer,a="topToBottom"){let l=this.lines.map(c=>c.copy());return Aut(l,t,r,n,i,o,a)}};function Aut(e,t,r,n,i,o,a){if(o.tokenLength(r+`
`)>t)throw new Error("maxTokens must be larger than the ellipsis length");let l=0,c=0,u=0;for(let x of e)l+=x.cost,c=Math.max(c,x.value),u=Math.max(u,x.text.length),i==="removeLeastBangForBuck"&&x.adjustValue(1/x.cost);let f=c+1,m=u+1,h=r.trim(),p=s(x=>x?.text.match(/^\s*/)?.[0].length??0,"getIndentation"),g=s(x=>x?.text.trim()===h,"isEllipsis"),y=e.length+1;for(;l>t&&y-- >0;){let x=-1,b=1/0;for(let M=0;M<e.length;M++){let Z=e[M];(Z.value<b||Z.value===b&&a==="bottomToTop")&&(b=Z.value,x=M)}let E=e[x],_=E.metadata?.get(BM);if(_!==void 0&&_.size>0)for(let M of e){let Z=M.metadata?.get(BM);Z&&Z.size>0&&[..._].every(he=>Z.has(he))&&M.text.trim()!==h&&M.adjustValue(0)}let k=0;if(n){let M=e.slice(0,x+1).reverse().find(ee=>ee.text.trim()!==""),Z=e[x-1],he=e[x+1];k=Math.min(M?p(M):0,g(Z)?p(Z):m,g(he)?p(he):m)}let B=" ".repeat(k)+r,N=new Y_(B,f,o.tokenLength(B+`
`),"loose",E.metadata);l-=E.cost,e.splice(x,1,N),l+=N.cost,g(e[x+1])&&(l-=e[x+1].cost,e.splice(x+1,1)),g(e[x-1])&&(l-=e[x-1].cost,e.splice(x-1,1),x--),l>t&&e.every(M=>M.value===f)&&(n=!1)}if(y<0)throw new Error("Infinite loop in ElidableText.makePrompt: Defensive counter < 0 in ElidableText.makePrompt with end text");e=e.filter(x=>x.value!==0);for(let x=e.length-1;x>0;x--)g(e[x])&&g(e[x-1])&&e.splice(x,1);return{getText:s(()=>e.map(x=>x.text).join(`
`),"getText"),getLines:s(()=>e,"getLines")}}s(Aut,"elide");d();d();function ph(){}s(ph,"Diff");ph.prototype={diff:s(function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={});var a=this;function l(k){return k=a.postProcess(k,i),o?(setTimeout(function(){o(k)},0),!0):k}s(l,"done"),t=this.castInput(t,i),r=this.castInput(r,i),t=this.removeEmpty(this.tokenize(t,i)),r=this.removeEmpty(this.tokenize(r,i));var c=r.length,u=t.length,f=1,m=c+u;i.maxEditLength!=null&&(m=Math.min(m,i.maxEditLength));var h=(n=i.timeout)!==null&&n!==void 0?n:1/0,p=Date.now()+h,g=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(g[0],r,t,0,i);if(g[0].oldPos+1>=u&&y+1>=c)return l(Xve(a,g[0].lastComponent,r,t,a.useLongestToken));var x=-1/0,b=1/0;function E(){for(var k=Math.max(x,-f);k<=Math.min(b,f);k+=2){var B=void 0,N=g[k-1],M=g[k+1];N&&(g[k-1]=void 0);var Z=!1;if(M){var he=M.oldPos-k;Z=M&&0<=he&&he<c}var ee=N&&N.oldPos+1<u;if(!Z&&!ee){g[k]=void 0;continue}if(!ee||Z&&N.oldPos<M.oldPos?B=a.addToPath(M,!0,!1,0,i):B=a.addToPath(N,!1,!0,1,i),y=a.extractCommon(B,r,t,k,i),B.oldPos+1>=u&&y+1>=c)return l(Xve(a,B.lastComponent,r,t,a.useLongestToken));g[k]=B,B.oldPos+1>=u&&(b=Math.min(b,k-1)),y+1>=c&&(x=Math.max(x,k+1))}f++}if(s(E,"execEditLength"),o)s(function k(){setTimeout(function(){if(f>m||Date.now()>p)return o();E()||k()},0)},"exec")();else for(;f<=m&&Date.now()<=p;){var _=E();if(_)return _}},"diff"),addToPath:s(function(t,r,n,i,o){var a=t.lastComponent;return a&&!o.oneChangePerToken&&a.added===r&&a.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:r,removed:n,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:a}}},"addToPath"),extractCommon:s(function(t,r,n,i,o){for(var a=r.length,l=n.length,c=t.oldPos,u=c-i,f=0;u+1<a&&c+1<l&&this.equals(n[c+1],r[u+1],o);)u++,c++,f++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return f&&!o.oneChangePerToken&&(t.lastComponent={count:f,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u},"extractCommon"),equals:s(function(t,r,n){return n.comparator?n.comparator(t,r):t===r||n.ignoreCase&&t.toLowerCase()===r.toLowerCase()},"equals"),removeEmpty:s(function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},"removeEmpty"),castInput:s(function(t){return t},"castInput"),tokenize:s(function(t){return Array.from(t)},"tokenize"),join:s(function(t){return t.join("")},"join"),postProcess:s(function(t){return t},"postProcess")};function Xve(e,t,r,n,i){for(var o=[],a;t;)o.push(t),a=t.previousComponent,delete t.previousComponent,t=a;o.reverse();for(var l=0,c=o.length,u=0,f=0;l<c;l++){var m=o[l];if(m.removed)m.value=e.join(n.slice(f,f+m.count)),f+=m.count;else{if(!m.added&&i){var h=r.slice(u,u+m.count);h=h.map(function(p,g){var y=n[f+g];return y.length>p.length?y:p}),m.value=e.join(h)}else m.value=e.join(r.slice(u,u+m.count));u+=m.count,m.added||(f+=m.count)}}return o}s(Xve,"buildValues");var nvr=new ph;function Zve(e,t){var r;for(r=0;r<e.length&&r<t.length;r++)if(e[r]!=t[r])return e.slice(0,r);return e.slice(0,r)}s(Zve,"longestCommonPrefix");function ebe(e,t){var r;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(r=0;r<e.length&&r<t.length;r++)if(e[e.length-(r+1)]!=t[t.length-(r+1)])return e.slice(-r);return e.slice(-r)}s(ebe,"longestCommonSuffix");function tte(e,t,r){if(e.slice(0,t.length)!=t)throw Error("string ".concat(JSON.stringify(e)," doesn't start with prefix ").concat(JSON.stringify(t),"; this is a bug"));return r+e.slice(t.length)}s(tte,"replacePrefix");function rte(e,t,r){if(!t)return e+r;if(e.slice(-t.length)!=t)throw Error("string ".concat(JSON.stringify(e)," doesn't end with suffix ").concat(JSON.stringify(t),"; this is a bug"));return e.slice(0,-t.length)+r}s(rte,"replaceSuffix");function K_(e,t){return tte(e,t,"")}s(K_,"removePrefix");function DM(e,t){return rte(e,t,"")}s(DM,"removeSuffix");function tbe(e,t){return t.slice(0,yut(e,t))}s(tbe,"maximumOverlap");function yut(e,t){var r=0;e.length>t.length&&(r=e.length-t.length);var n=t.length;e.length<t.length&&(n=e.length);var i=Array(n),o=0;i[0]=0;for(var a=1;a<n;a++){for(t[a]==t[o]?i[a]=i[o]:i[a]=o;o>0&&t[a]!=t[o];)o=i[o];t[a]==t[o]&&o++}o=0;for(var l=r;l<e.length;l++){for(;o>0&&e[l]!=t[o];)o=i[o];e[l]==t[o]&&o++}return o}s(yut,"overlapCount");var PM="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Cut=new RegExp("[".concat(PM,"]+|\\s+|[^").concat(PM,"]"),"ug"),NM=new ph;NM.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};NM.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(o){return o.segment})}else r=e.match(Cut)||[];var n=[],i=null;return r.forEach(function(o){/\s/.test(o)?i==null?n.push(o):n.push(n.pop()+o):/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+o):n.push(i+o):n.push(o),i=o}),n};NM.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};NM.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,i=null;return e.forEach(function(o){o.added?n=o:o.removed?i=o:((n||i)&&rbe(r,i,n,o),r=o,n=null,i=null)}),(n||i)&&rbe(r,i,n,null),e};function rbe(e,t,r,n){if(t&&r){var i=t.value.match(/^\s*/)[0],o=t.value.match(/\s*$/)[0],a=r.value.match(/^\s*/)[0],l=r.value.match(/\s*$/)[0];if(e){var c=Zve(i,a);e.value=rte(e.value,a,c),t.value=K_(t.value,c),r.value=K_(r.value,c)}if(n){var u=ebe(o,l);n.value=tte(n.value,l,u),t.value=DM(t.value,u),r.value=DM(r.value,u)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var f=n.value.match(/^\s*/)[0],m=t.value.match(/^\s*/)[0],h=t.value.match(/\s*$/)[0],p=Zve(f,m);t.value=K_(t.value,p);var g=ebe(K_(f,p),h);t.value=DM(t.value,g),n.value=tte(n.value,f,g),e.value=rte(e.value,f,f.slice(0,f.length-g.length))}else if(n){var y=n.value.match(/^\s*/)[0],x=t.value.match(/\s*$/)[0],b=tbe(x,y);t.value=DM(t.value,b)}else if(e){var E=e.value.match(/\s*$/)[0],_=t.value.match(/^\s*/)[0],k=tbe(E,_);t.value=K_(t.value,k)}}s(rbe,"dedupeWhitespaceInChangeObjects");var xut=new ph;xut.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(PM,"]+|[^\\S\\n\\r]+|[^").concat(PM,"]"),"ug");return e.match(t)||[]};var ste=new ph;ste.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!t.newlineIsToken?r[r.length-1]+=o:r.push(o)}return r};ste.equals=function(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
`))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
`))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
`)&&(e=e.slice(0,-1)),t.endsWith(`
`)&&(t=t.slice(0,-1))),ph.prototype.equals.call(this,e,t,r)};var vut=new ph;vut.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var but=new ph;but.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function nte(e){"@babel/helpers - typeof";return nte=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nte(e)}s(nte,"_typeof");var J_=new ph;J_.useLongestToken=!0;J_.tokenize=ste.tokenize;J_.castInput=function(e,t){var r=t.undefinedReplacement,n=t.stringifyReplacer,i=n===void 0?function(o,a){return typeof a>"u"?r:a}:n;return typeof e=="string"?e:JSON.stringify(ite(e,null,null,i),i," ")};J_.equals=function(e,t,r){return ph.prototype.equals.call(J_,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)};function ite(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return r[o];var a;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),r.push(a),o=0;o<e.length;o+=1)a[o]=ite(e[o],t,r,n,i);return t.pop(),r.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),nte(e)==="object"&&e!==null){t.push(e),a={},r.push(a);var l=[],c;for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&l.push(c);for(l.sort(),o=0;o<l.length;o+=1)c=l[o],a[c]=ite(e[c],t,r,n,c);t.pop(),r.pop()}else a=e;return a}s(ite,"canonicalize");var ote=new ph;ote.tokenize=function(e){return e.slice()};ote.join=ote.removeEmpty=function(e){return e};var nbe=require("fs");async function ibe(e,t,r,n,i){let o=new Map,a=0;for(let m of e){let h=m.node.fileName.toLowerCase(),p=o.get(h);p?p.symbols.push(m):o.set(h,{symbols:[m],topRank:a}),a++}if(o.delete(r.toLowerCase()),o.size===0)return[];let l=t,c=t/Math.min(4,o.size),u=[],f=Array.from(o.keys());f.sort((m,h)=>{let p=o.get(m).topRank,g=o.get(h).topRank;return p-g});for(let m of f){let h=o.get(m).symbols;if(h.length===0)continue;let p=h[0].node.fileName,g=h.reduce((y,x)=>y+x.node.extentRange.length,0);for(let y of h){if(l<=5)return u;CA(i);let x=y.node.extentRange.length/g,b=Math.min(l,x*c),E=(await Iut([y])).elide(b).getText();l-=n.tokenLength(E),u.push({uri:p,value:E})}}return u}s(ibe,"symbolRangesToCodeSnippets");async function Iut(e){if(e.length===0)return new zt([]);let t=e[0].node.fileName,r=[],n="";try{let i=Xo(t);i&&(n=(await nbe.promises.readFile(i)).toString())}catch{}for(let i of e)obe(i,n).forEach(o=>r.push(o));return new zt(r)}s(Iut,"sameFileSymbolRangeToElidableText");function obe(e,t){let n=[],i=e.node,o=t.substring(ate(t,i.commentRange.start),i.commentRange.end);n.push([lte(o),1-3e-4]);let a=ate(t,i.bodyRange.start),l=ate(t,i.extentRange.start),c=i.bodyRange.length===0?t.substring(l,i.extentRange.end):t.substring(i.commentRange.length===0?l:i.commentRange.end,a);if(mv(i.kind)&&(c="BEGIN "+c.trimStart()),n.push([lte(c),1-1e-4]),e.children.length>0)for(let u of e.children)n.push(...obe(u,t));else{let u=1-(mv(e.node.kind)?3e-4:4e-4),f=t.substring(a,i.bodyRange.end);n.push([lte(f),u])}return mv(i.kind)&&n.push(["END "+c.substring(6),1-1e-4]),n.filter(u=>u[0].length>0)}s(obe,"prepareForElidableText");function ate(e,t){for(;t-1>=0&&(e[t-1]===" "||e[t-1]===" ");)t--;return t}s(ate,"shiftLeftToNearestLineEndingOrAlphanumeric");function lte(e){let t=0;for(;t<e.length&&(e[t]==="\r"||e[t]===`
`);)t++;let r=e.length-1;for(;r>=0&&(e[r]==="\r"||e[r]===`
`||e[r]===" "||e[r]===" ");)r--;return e.substring(t,r+1)}s(lte,"trimLineEndingsAndTrailingWhitespace");var cte=class{constructor(t,r){this.referenceExtractors=new Map;this.index=t;for(let n of r)this.referenceExtractors.set(n.languageId,n)}static{s(this,"ContextRetrievalStrategy")}},N5=class extends cte{static{s(this,"UnqualifiedNameRetrievalStrategy")}constructor(t,r,n,i){super(t,r),this.caseSensitive=n,this.typesOnly=i}async getContextAtPositionAsync(t,r,n,i,o,a){let l=this.referenceExtractors.get(i);if(!l)return[];CA(a);let c=await l.extractReferences(t,r);CA(a);let u=Array.from(c);u.sort((p,g)=>this.compareSymbolRangesByProximityToCaret(p,g,n));let f=[],m=new Set,h=await this.findDefinitionsViaUnqualifiedNames(u,o,a);this.typesOnly&&(h=h.filter(p=>mv(p.kind)));for(let p of h)m.has(JSON.stringify(p))||(m.add(JSON.stringify(p)),f.push(await this.makeSymbolRangeNodeFromDefinition(p,a)));return f}async findDefinitionsViaUnqualifiedNames(t,r,n){let i=Array.from(new Set(t.map(m=>m.unqualifiedName))),o=!this.caseSensitive,a=await this.index.findPotentialDefinitionsAsync(i,o,n),l=s(m=>o?m.toLowerCase():m,"lowercaseIfCaseInsensitive"),c=s(m=>l(m.unqualifiedName),"getSymbolKey"),u=new Map;for(let m of a){let h=c(m),p=u.get(h)??[];u.set(h,[...p,m])}let f=[];for(let m of i){let h=u.get(l(m));if(!(!h||h.length>r.mlcpMaxSymbolMatches)){if(f.length+h.length>r.mlcpMaxContextItems){f.push(...h.slice(0,r.mlcpMaxContextItems-f.length));break}f.push(...h)}}return f}async makeSymbolRangeNodeFromDefinition(t,r){if(CA(r),mv(t.kind)){let n=await this.index.findSymbolsByFullyQualifiedNamePrefix(t.fileName,t.fullyQualifiedName+".",r),i=await Promise.all(n.map(o=>this.makeSymbolRangeNodeFromDefinition(o,r)));return{node:t,children:i}}else return{node:t,children:[]}}compareSymbolRangesByProximityToCaret(t,r,n){let i=t.extentRange.end<=n,o=r.extentRange.end<=n;if(i&&!o)return-1;if(!i&&o)return 1;let a=Math.abs(t.extentRange.start-n),l=Math.abs(r.extentRange.start-n);return a-l}},LM=class{constructor(t,r){this.strategies=new Map;this.strategies.set("go",new N5(t,r,!0,!0)),this.strategies.set("java",new N5(t,r,!0,!0)),this.strategies.set("python",new N5(t,r,!0,!1)),this.strategies.set("typescript",new N5(t,r,!0,!0)),this.strategies.set("typescriptreact",new N5(t,r,!0,!0)),this.strategies.set("javascript",new N5(t,r,!0,!1))}static{s(this,"SyntaxAwareContextRetrieval")}async getStringifiedContextAtPositionAsync(t,r,n,i,o,a,l){let c=await this.getContextAtPositionAsync(t,r,n,i,o,l);CA(l);let u=Do();return ibe(c,a,t,u,l)}async getContextAtPositionAsync(t,r,n,i,o,a){return this.strategies.has(i)?this.strategies.get(i).getContextAtPositionAsync(t,r,n,i,o,a):[]}};d();d();d();d();var hv={Id:"id"},ff={FilePath:"filePath",LastWriteTimeUtc:"lastWriteTimeUtc"},Ni={DocumentId:"documentId",FullyQualifiedName:"fullyQualifiedName",UnqualifiedName:"unqualifiedName",CommentStart:"commentStart",CommentLength:"commentLength",NameStart:"nameStart",NameLength:"nameLength",BodyStart:"bodyStart",BodyLength:"bodyLength",ExtentStart:"extentStart",ExtentLength:"extentLength",SymbolKind:"symbolKind",RefKind:"refKind"};d();d();var FM=class{constructor(t,r,n){this.tableName=t;this.createOptimizations=r;this.extraCreateDeclarations=n;this.primaryKey=new ute(hv.Id)}static{s(this,"SQLTableQueryGenerator")}createTableQueries(){return this.createTableString??=this.generateCreateTableString(),[this.createTableString,...this.createOptimizations]}generateCreateTableString(){let t=this.fields.map(r=>r.initColumnString());return this.extraCreateDeclarations&&t.push(this.extraCreateDeclarations),t.push(),[`CREATE TABLE IF NOT EXISTS ${this.tableName} (`,` ${this.primaryKey.initColumnString()},`,` ${t.join(`,
`)}`,")"].join(`
`)}insertQuery(t,r){this.cachedInsertQueryStrings??=this.generateInsertQueryStrings();let n=[this.cachedInsertQueryStrings.prefix,Array(r).fill(this.cachedInsertQueryStrings.valuesTemplate).join(`,
`)];return t&&n.push("ON CONFLICT DO NOTHING"),n.join(`
`)}generateInsertQueryStrings(){return{prefix:`INSERT INTO ${this.tableName} (${this.fields.map(t=>t.name).join(", ")})
VALUES`,valuesTemplate:`(${Array(this.fields.length).fill("?").join(", ")})`}}},X_=class e extends FM{constructor(){super(e.tableName,[`CREATE UNIQUE INDEX IF NOT EXISTS 'IX_Document_FilePath' ON '${e.tableName}' ('${ff.FilePath}');`]);this.fields=[new tS(ff.FilePath,{notNull:!0,collate:!0,noCase:!0,unique:!0}),new cu(ff.LastWriteTimeUtc,{notNull:!0})]}static{s(this,"DocumentQueryGenerator")}static{this.tableName="Document"}},Z_=class e extends FM{constructor(){super(e.tableName,[`CREATE INDEX IF NOT EXISTS 'IX_Symbol_DocumentId' ON '${e.tableName}' ('${Ni.DocumentId}', '${Ni.ExtentStart}', '${Ni.ExtentLength}');`,`CREATE INDEX IF NOT EXISTS 'IX_Symbol_UnqualifiedName' ON '${e.tableName}' ('${Ni.UnqualifiedName}');`],`FOREIGN KEY(${Ni.DocumentId}) REFERENCES Document(${hv.Id}) ON DELETE CASCADE`);this.fields=[new cu(Ni.DocumentId),new tS(Ni.FullyQualifiedName,{notNull:!0}),new tS(Ni.UnqualifiedName,{notNull:!0}),new cu(Ni.CommentStart,{notNull:!0}),new cu(Ni.CommentLength,{notNull:!0}),new cu(Ni.NameStart,{notNull:!0}),new cu(Ni.NameLength,{notNull:!0}),new cu(Ni.BodyStart,{notNull:!0}),new cu(Ni.BodyLength,{notNull:!0}),new cu(Ni.ExtentStart,{notNull:!0}),new cu(Ni.ExtentLength,{notNull:!0}),new cu(Ni.SymbolKind,{notNull:!0}),new cu(Ni.RefKind,{notNull:!0})]}static{s(this,"SymbolQueryGenerator")}static{this.tableName="Symbol"}},eS=class{constructor(t,r){this.name=t;this.notNull=r?.notNull??!1}static{s(this,"SQLField")}},tS=class extends eS{static{s(this,"StringColumn")}constructor(t,r){super(t,{notNull:r?.notNull}),this.collate=r?.collate??!1,this.noCase=r?.noCase??!1,this.unique=r?.unique??!1}initColumnString(){let t=this.collate?"COLLATE":void 0,r=this.noCase?"NOCASE":void 0,n=this.notNull?"NOT NULL":void 0,i=this.unique?"UNIQUE":void 0,o=[t,r,n,i].filter(a=>a).join(" ");return`'${this.name}' VARCHAR(500) ${o}`}},cu=class extends eS{static{s(this,"NumberColumn")}initColumnString(){return`'${this.name}' INTEGER${this.notNull?" NOT NULL":""}`}},ute=class extends eS{static{s(this,"NumberPrimaryKeyColumn")}initColumnString(){return`'${this.name}' INTEGER PRIMARY KEY AUTOINCREMENT${this.notNull?" NOT NULL":""}`}};var MM=class{static{s(this,"SQLTable")}constructor(t){this.queryGenerator=this.createQueryGenerator(),this.init=this.doInit(t)}async doInit(t){let r=await t;if(r)return await this.create(r),r}async create(t){let r=s(i=>new Promise((o,a)=>{t.run(i,l=>{l?a(l):o()})}),"runQuery"),n=this.queryGenerator.createTableQueries();for(let i of n)await r(i)}async insert(t,r){let n=await this.init;n&&await new Promise((i,o)=>{let a=this.queryGenerator.insertQuery(r,t.length);n.run(a,t.map(l=>Object.values(l)).flat(),function(l){l?o(l):i(this)})})}async getAllRows(){let t=await this.init;return t?Pd(t,`SELECT * FROM ${this.queryGenerator.tableName}`,[]):[]}async deleteRow(t){let r=await this.init;if(r)return Pd(r,`DELETE FROM ${this.queryGenerator.tableName} WHERE ${hv.Id} = ?`,[t])}},xA=class e extends MM{static{s(this,"DocumentTable")}static{this.tableName=X_.tableName}createQueryGenerator(){return new X_}async updateTimestamp(t,r){let n=await this.init;n&&await Pd(n,`UPDATE ${e.tableName} SET ${ff.LastWriteTimeUtc} = ? WHERE ${ff.FilePath} = ?`,[r,t])}async deleteAllWithPath(t){let r=await this.init;r&&await Pd(r,`DELETE FROM ${e.tableName} WHERE ${ff.FilePath} = ?`,[t])}async getDocumentByFilePath(t){let r=await this.init;return r?Pd(r,`SELECT * FROM ${this.queryGenerator.tableName} WHERE ${ff.FilePath} = ?`,[t]):[]}},$a=class e extends MM{static{s(this,"SymbolTable")}static{this.tableName=Z_.tableName}createQueryGenerator(){return new Z_}async clearAllSymbolsFromDocument(t){let r=await this.init;if(r)return Pd(r,`DELETE FROM ${e.tableName} WHERE ${Ni.DocumentId} = ?`,[t])}};async function Pd(e,t,r){return new Promise((n,i)=>e.all(t,r,(o,a)=>{o&&i(o),n(a)}))}s(Pd,"runPromisifiedDBQuery");var UM=class{constructor(t){this.databaseFileName=t;this.innerJoinStatement=`INNER JOIN ${xA.tableName} ON ${$a.tableName}.${Ni.DocumentId} = ${xA.tableName}.${hv.Id}`;this.db=this.initDb(t),this.documentTable=new xA(this.db),this.symbolTable=new $a(this.db)}static{s(this,"DocumentSymbolDatabase")}async initDb(t){let r;try{r=await Promise.resolve().then(()=>Ze(Abe()))}catch(i){console.error("Error loading sqlite3 module:",i);return}let n;try{n=await new Promise((i,o)=>{let a=new r.default.Database(t,l=>{l?o(l):i(a)})})}catch(i){console.error("Error initializing database:",i);return}return await Pd(n,"pragma journal_mode=wal",[]),await Pd(n,"pragma synchronous=normal",[]),await Pd(n,"pragma optimize=0x10002",[]),await Pd(n,"pragma foreign_keys = ON",[]),n}async close(){let t=await this.db;if(t)return await this.documentTable.init,await this.symbolTable.init,new Promise((r,n)=>{t.close(i=>i?n(i):r())})}async querySymbolsFuzzilyUsingUnqualifiedName(t,r){return await this.query([`SELECT * FROM ${$a.tableName}`,this.innerJoinStatement,`WHERE ${Ni.UnqualifiedName} BETWEEN ? AND (? || '~')`,`ORDER BY ${Ni.UnqualifiedName}`,"LIMIT ?"].join(`
`),[t,t,r])}async querySymbolsUsingUnqualifiedNames(t,r){let n=t.map(()=>"?").join(", "),i=r?"COLLATE NOCASE ":"";return await this.query([`SELECT * FROM ${$a.tableName}`,this.innerJoinStatement,`WHERE ${Ni.UnqualifiedName} ${i}IN (${n})`].join(`
`),t)}async querySymbolsUsingFullyQualifiedName(t){return this.query([`SELECT * FROM ${$a.tableName}`,this.innerJoinStatement,`WHERE ${Ni.FullyQualifiedName} = ?`].join(`
`),[t])}async querySymbolsContainingPosition(t,r){return this.query([`SELECT * FROM ${$a.tableName}`,this.innerJoinStatement,`WHERE ${xA.tableName}.${ff.FilePath} = ? AND ${$a.tableName}.${Ni.ExtentStart} <= ? AND (${$a.tableName}.${Ni.ExtentStart} + ${$a.tableName}.${Ni.ExtentLength}) >= ?`].join(`
`),[t,r,r])}async querySymbolsContainedByRange(t,r,n){return this.query([`SELECT * FROM ${$a.tableName}`,this.innerJoinStatement,`WHERE ${xA.tableName}.${ff.FilePath} = ? AND ${$a.tableName}.${Ni.ExtentStart} >= ? AND (${$a.tableName}.${Ni.ExtentStart} + ${$a.tableName}.${Ni.ExtentLength}) <= ?`,`ORDER BY ${$a.tableName}.${Ni.ExtentStart}`].join(`
`),[t,r,n])}async querySymbolsByQualifiedNamePrefix(t,r){return this.query([`SELECT * FROM ${$a.tableName}`,this.innerJoinStatement,`WHERE ${xA.tableName}.${ff.FilePath} = ? AND ${$a.tableName}.${Ni.FullyQualifiedName} LIKE ?`,`ORDER BY ${$a.tableName}.${Ni.ExtentStart}`].join(`
`),[t,`${r}%`])}async insertSymbols(t){return await this.symbolTable.insert(t,!1)}async insertDocument(t,r,n=!1){return await this.documentTable.insert([{filePath:t,lastWriteTimeUtc:r}],n)}async clearAllSymbolsFromDocument(t){return this.symbolTable.clearAllSymbolsFromDocument(t)}async updateDocumentTimestamp(t,r){return this.documentTable.updateTimestamp(t,r)}async deleteAllDocumentsWithPath(t){return this.documentTable.deleteAllWithPath(t)}async getAllDocuments(){return this.documentTable.getAllRows()}getDocument(t){return this.documentTable.getDocumentByFilePath(t)}async query(t,r){let n=await this.db;return n?(await this.documentTable.init,await this.symbolTable.init,Pd(n,t,r)):[]}};var qM=class{static{s(this,"SQLStorageReaderWriter")}constructor(t){this.database=new UM(t)}async close(){await this.database.close()}async insertOrReplaceDocumentSymbolsAsync(t,r,n){let i=await this.getOrCreateDocumentAsync(t,r);await this.database.clearAllSymbolsFromDocument(i.id),n.length>0&&await this.database.insertSymbols(n.map(o=>({documentId:i.id,fullyQualifiedName:o.fullyQualifiedName,unqualifiedName:o.unqualifiedName,commentStart:o.commentRange.start,commentLength:o.commentRange.length,nameStart:o.nameRange.start,nameLength:o.nameRange.length,bodyStart:o.bodyRange.start,bodyLength:o.bodyRange.length,extentStart:o.extentRange.start,extentLength:o.extentRange.length,symbolKind:o.kind,refKind:o.refKind}))),await this.database.updateDocumentTimestamp(t,r)}async addDocumentsAsync(t){for(let r of t)r=r.toLowerCase(),await this.database.insertDocument(r,Date.now(),!0)}async deleteDocumentAsync(t){return await this.database.deleteAllDocumentsWithPath(t.toLowerCase())}async updateDocumentTimestampAsync(t,r){return await this.database.updateDocumentTimestamp(t.toLowerCase(),r)}async fuzzyMatchSymbolsAsync(t,r){return w8(await this.database.querySymbolsFuzzilyUsingUnqualifiedName(t,r))}async findPotentialDefinitionsAsync(t,r,n){let i=[],a=0;for(;a<t.length;){let l=t.slice(a,a+500);a+=500;let c=await this.database.querySymbolsUsingUnqualifiedNames(l,r);i.push(...c),CA(n)}return w8(i)}async getDefinitionsAsync(t){return w8(await this.database.querySymbolsUsingFullyQualifiedName(t))}async findSymbolsContainingPositionAsync(t,r){let n=await this.database.querySymbolsContainingPosition(t.toLowerCase(),r);return w8(n)}async findSymbolsContainedByRangeAsync(t,r,n){return w8(await this.database.querySymbolsContainedByRange(t.toLowerCase(),r,n))}async findSymbolsByFullyQualifiedNamePrefix(t,r){return w8(await this.database.querySymbolsByQualifiedNamePrefix(t.toLowerCase(),r))}async getDocumentsAsync(){return this.database.getAllDocuments()}async getDocumentAsync(t){let r=await this.database.getDocument(t);if(r?.at(0))return r[0]}async getOrCreateDocumentAsync(t,r){let n=await this.database.getDocument(t);if(n?.at(0))return n[0];await this.database.insertDocument(t,r,!0);let i=await this.database.getDocument(t);if(!i)throw Error("Unable to insert document");return i[0]}};function w8(e){return e.map(t=>new P5(t.filePath,t.fullyQualifiedName,t.unqualifiedName,new lu(t.commentStart,t.commentLength),new lu(t.nameStart,t.nameLength),new lu(t.bodyStart,t.bodyLength),new lu(t.extentStart,t.extentLength),t.symbolKind,t.refKind))}s(w8,"symbolsToSymbolRanges");var GM=Ze(require("fs/promises"));var WM=class{static{s(this,"Index")}constructor(t,r){this.storage=new qM(t),this.symbolExtractors=r}dispose(){return this.storage.close()}get reader(){return this.storage}async indexFile(t,r){let n=Xo(t);if(!n)throw Error(`Cannot resolve a readable file path from ${t}`);let i;try{i=await GM.stat(n)}catch{await this.storage.deleteDocumentAsync(t);return}let o=i.mtimeMs,a=await this.storage.getDocumentAsync(t);if(a&&a.lastWriteTimeUtc>=o)return;let l=this.symbolExtractors.find(f=>f.languageId==r);if(!l)return;let c=(await GM.readFile(n)).toString(),u=await l.extractSymbols(t,c);await this.storage.insertOrReplaceDocumentSymbolsAsync(t,o,u)}async getDocumentFilePaths(){return(await this.storage.getDocumentsAsync()).map(r=>r.filePath)}};d();function gte(e){let t=e;return typeof t?.cwd=="string"&&Array.isArray(t?.indexWorkspaceRoots)&&t.indexWorkspaceRoots.every(r=>But(r))}s(gte,"isIndexWorkerData");var nS=class{static{s(this,"IndexNotification")}constructor(t){this.operation=t}},L5=class extends nS{constructor(r,n){super(n);this.id=r;this.id=r}static{s(this,"IndexRequest")}},HM=class extends nS{constructor(r){super(qc.Cancel);this.messageIdToCancel=r}static{s(this,"CancellationNotification")}},qc={CreateIndex:"createIndex",AddOrInvalidated:"addOrInvalidated",GetContext:"getContext",Exit:"exit",Response:"response",RemoveIndex:"removeIndex",Cancel:"cancel",GetAllDocumentsInWorkspace:"getAllDocumentsInWorkspace"},jM=class extends L5{constructor(r,n,i){super(r,qc.CreateIndex);this.baseWorkspaceFolderUri=n;this.databaseFilePath=i}static{s(this,"CreateIndexRequest")}},VM=class extends L5{constructor(r,n){super(r,qc.RemoveIndex);this.baseWorkspaceFolderUri=n}static{s(this,"RemoveIndexRequest")}},$M=class extends L5{constructor(r,n,i){super(r,qc.AddOrInvalidated);this.fileUri=n;this.languageId=i}static{s(this,"AddOrInvalidatedRequest")}},zM=class extends L5{constructor(r,n){super(r,qc.GetAllDocumentsInWorkspace);this.baseWorkspaceFolderUri=n}static{s(this,"GetAllDocumentsRequest")}},YM=class extends L5{constructor(r,n,i,o,a,l){super(r,qc.GetContext);this.fileUri=n;this.code=i;this.offset=o;this.languageId=a;this.params=l}static{s(this,"GetContextRequest")}},KM=class extends L5{static{s(this,"ExitRequest")}constructor(t){super(t,qc.Exit)}},gh=class extends nS{constructor(r,n,i){super(qc.Response);this.id=r;this.error=n;this.data=i;n&&"code"in n&&typeof n.code=="string"&&(this.code=n.code)}static{s(this,"ResponseMessage")}};function But(e){return"databaseFilePath"in e&&"rootPath"in e}s(But,"isIndexableWorkspaceFolder");var ybe=Ze(ii()),pv=require("worker_threads");var JM=class{static{s(this,"IndexInfo")}constructor(t){this.index=new WM(t,kM),this.contextRetreival=new LM(this.index.reader,zve)}},Ate=class e{constructor(t,r){this.indices=new Map;this.cancellationTokens=new Map;for(let n of r){let i=Wa(n.rootPath);this.indices.set(i,new JM(n.databaseFilePath))}this.port=t,this.port.on("message",n=>void this.dispatchMessage(n,this.indices,this.cancellationTokens))}static{s(this,"IndexWorker")}async dispatchMessage(t,r,n){try{let i=new ybe.CancellationTokenSource;n.set(t.id,i);let o;switch(t.operation){case qc.AddOrInvalidated:o=await e.dispatchAddOrInvalidate(t,r,i.token);break;case qc.GetContext:o=await e.dispatchGetContext(t,r,i.token);break;case qc.Cancel:n.get(t.id)?.cancel(),o=new gh(t.id,void 0,void 0);break;case qc.Exit:o=await this.dispatchExit(t,r,i.token);break;case qc.CreateIndex:o=await e.dispatchCreateIndex(t,r,i.token);break;case qc.RemoveIndex:o=await e.dispatchRemoveIndex(t,r,i.token);break;case qc.GetAllDocumentsInWorkspace:o=await e.GetAllDocumentsInWorkspaceRequest(t,r,i.token);break;default:this.port?.postMessage(new Error(`Unknown operation: ${t.operation}`))}o&&this.port?.postMessage(o),n.get(t.id)?.dispose(),n.delete(t.id)}catch(i){if(!(i instanceof Error))throw i;this.port?.postMessage(new gh(t.id,i,void 0))}}static async GetAllDocumentsInWorkspaceRequest(t,r,n){let i=Wa(t.baseWorkspaceFolderUri),o,a;return r.has(i)?a=await r.get(i).index.getDocumentFilePaths():o=new Error(`Index not found for ${t.baseWorkspaceFolderUri}`),new gh(t.id,o,a)}static async dispatchAddOrInvalidate(t,r,n){let i=Wa(t.fileUri),o=e.getIndexInfo(i,r)?.index,a;return o?await o.indexFile(t.fileUri,t.languageId):a=new Error(`Index not found for ${t.fileUri}`),new gh(t.id,a,void 0)}static async dispatchGetContext(t,r,n){let i=Wa(t.fileUri),o=e.getIndexInfo(i,r)?.contextRetreival,a,l;return o?l=await o.getStringifiedContextAtPositionAsync(t.fileUri,t.code,t.offset,t.languageId,t.params,8e3,n):a=new Error(`ContextRetrieval not found for ${t.fileUri}`),new gh(t.id,a,l)}async dispatchExit(t,r,n){for(let i of r.values())await i.index.dispose();r.clear(),this.port?.postMessage(new gh(t.id,void 0,void 0)),this.port?.close()}static async dispatchCreateIndex(t,r,n){let i=Wa(t.baseWorkspaceFolderUri);return r.has(i)||r.set(i,new JM(t.databaseFilePath)),new gh(t.id,void 0,void 0)}static async dispatchRemoveIndex(t,r,n){let i=Wa(t.baseWorkspaceFolderUri);if(r.has(i)){let o=r.get(i);o&&await o.index.dispose(),r.delete(i)}return new gh(t.id,void 0,void 0)}static getIndexInfo(t,r){for(let[n,i]of r)if(t.startsWith(n))return i}};function Cbe(){return gte(pv.workerData)}s(Cbe,"isIndexWorker");function xbe(){let e=pv.parentPort;if(!e)throw new Error("This must be run a worker thread.");if(!gte(pv.workerData))throw new Error("Worker data must provide a valid database path.");let t=pv.workerData.cwd;process.cwd=()=>t,new Ate(e,pv.workerData.indexWorkspaceRoots)}s(xbe,"runIndexWorker");d();var iS=Ze(require("util"));function vbe(e){let t=new console.Console(process.stderr,process.stderr);function r(n,...i){if(Sd(e)==="dev")return e.get(Ga).logIt(e,n,"console",...i)}return s(r,"logIt"),t.debug=(...n)=>r(4,...n),t.info=(...n)=>r(3,...n),t.warn=(...n)=>r(2,...n),t.error=(...n)=>r(1,...n),t.assert=(n,...i)=>{n||(i.length===0?r(2,"Assertion failed"):r(2,"Assertion failed:",iS.format(...i)))},t.dir=(n,i)=>r(4,iS.inspect(n,i)),t.log=t.debug.bind(t),t.trace=(...n)=>{let i=new Error(iS.format(...n));i.name="Trace",t.log(i)},t}s(vbe,"createConsole");var sYe=Ze(require("fs/promises")),aYe=Ze(require("os")),Tm=Ze(yh()),lYe=require("worker_threads");d();d();var LQ=require("assert");d();d();var Hft={right:Yft,center:Kft},jft=0,SQ=1,Vft=2,RQ=3,Gte=class{static{s(this,"UI")}constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...t){let r=this.div(...t);r.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(`
`).map(i=>i.split(" ")),n=0;return r.forEach(i=>{i.length>1&&df.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),df.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((o,a)=>({text:o.trim(),padding:this.measurePadding(o),width:a===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){let r=df.stripAnsi(t);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(r=>{this.rowToString(r,t)}),t.filter(r=>!r.hidden).map(r=>r.text).join(`
`)}rowToString(t,r){return this.rasterize(t).forEach((n,i)=>{let o="";n.forEach((a,l)=>{let{width:c}=t[l],u=this.negatePadding(t[l]),f=a;if(u>df.stringWidth(a)&&(f+=" ".repeat(u-df.stringWidth(a))),t[l].align&&t[l].align!=="left"&&this.wrap){let h=Hft[t[l].align];f=h(f,u),df.stringWidth(f)<u&&(f+=" ".repeat((c||0)-df.stringWidth(f)-1))}let m=t[l].padding||[0,0,0,0];m[RQ]&&(o+=" ".repeat(m[RQ])),o+=pEe(t[l],f,"| "),o+=f,o+=pEe(t[l],f," |"),m[SQ]&&(o+=" ".repeat(m[SQ])),i===0&&r.length>0&&(o=this.renderInline(o,r[r.length-1]))}),r.push({text:o.replace(/ +$/,""),span:t.span})}),r}renderInline(t,r){let n=t.match(/^ */),i=n?n[0].length:0,o=r.text,a=df.stringWidth(o.trimRight());return r.span?this.wrap?i<a?t:(r.hidden=!0,o.trimRight()+" ".repeat(i-a)+t.trimLeft()):(r.hidden=!0,o+t):t}rasterize(t){let r=[],n=this.columnWidths(t),i;return t.forEach((o,a)=>{o.width=n[a],this.wrap?i=df.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
`):i=o.text.split(`
`),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[jft]||0).fill("")),i.push(...new Array(o.padding[Vft]||0).fill(""))),i.forEach((l,c)=>{r[c]||r.push([]);let u=r[c];for(let f=0;f<a;f++)u[f]===void 0&&u.push("");u.push(l)})}),r}negatePadding(t){let r=t.width||0;return t.padding&&(r-=(t.padding[RQ]||0)+(t.padding[SQ]||0)),t.border&&(r-=4),r}columnWidths(t){if(!this.wrap)return t.map(a=>a.width||df.stringWidth(a.text));let r=t.length,n=this.width,i=t.map(a=>{if(a.width)return r--,n-=a.width,a.width}),o=r?Math.floor(n/r):0;return i.map((a,l)=>a===void 0?Math.max(o,$ft(t[l])):a)}};function pEe(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}s(pEe,"addBorder");function $ft(e){let t=e.padding||[],r=1+(t[RQ]||0)+(t[SQ]||0);return e.border?r+4:r}s($ft,"_minWidth");function zft(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}s(zft,"getWindowWidth");function Yft(e,t){e=e.trim();let r=df.stringWidth(e);return r<t?" ".repeat(t-r)+e:e}s(Yft,"alignRight");function Kft(e,t){e=e.trim();let r=df.stringWidth(e);return r>=t?e:" ".repeat(t-r>>1)+e}s(Kft,"alignCenter");var df;function gEe(e,t){return df=t,new Gte({width:e?.width||zft(),wrap:e?.wrap})}s(gEe,"cliui");d();var AEe=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function Hte(e){return e.replace(AEe,"")}s(Hte,"stripAnsi");function yEe(e,t){let[r,n]=e.match(AEe)||["",""];e=Hte(e);let i="";for(let o=0;o<e.length;o++)o!==0&&o%t===0&&(i+=`
`),i+=e.charAt(o);return r&&n&&(i=`${r}${i}${n}`),i}s(yEe,"wrap");function jte(e){return gEe(e,{stringWidth:s(t=>[...t].length,"stringWidth"),stripAnsi:Hte,wrap:yEe})}s(jte,"ui");d();var k8=require("path"),kQ=require("fs");function Vte(e,t){let r=(0,k8.resolve)(".",e),n;for((0,kQ.statSync)(r).isDirectory()||(r=(0,k8.dirname)(r));;){if(n=t(r,(0,kQ.readdirSync)(r)),n)return(0,k8.resolve)(r,n);if(r=(0,k8.dirname)(n=r),n===r)break}}s(Vte,"default");var NEe=require("util"),LEe=require("fs"),FEe=require("url");d();var EEe=require("util"),NQ=require("path");d();function Cv(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,i=e.match(/^-+/);for(let o=i?i[0].length:0;o<e.length;o++){let a=e.charAt(o);n&&(n=!1,a=a.toUpperCase()),o!==0&&(a==="-"||a==="_")?n=!0:a!=="-"&&a!=="_"&&(r+=a)}return r}}s(Cv,"camelCase");function BQ(e,t){let r=e.toLowerCase();t=t||"-";let n="";for(let i=0;i<e.length;i++){let o=r.charAt(i),a=e.charAt(i);o!==a&&i>0?n+=`${t}${r.charAt(i)}`:n+=a}return n}s(BQ,"decamelize");function DQ(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}s(DQ,"looksLikeNumber");d();d();function CEe(e){if(Array.isArray(e))return e.map(a=>typeof a!="string"?a+"":a);e=e.trim();let t=0,r=null,n=null,i=null,o=[];for(let a=0;a<e.length;a++){if(r=n,n=e.charAt(a),n===" "&&!i){r!==" "&&t++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[t]||(o[t]=""),o[t]+=n}return o}s(CEe,"tokenizeArgString");d();var Od;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(Od||(Od={}));var vA,PQ=class{static{s(this,"YargsParser")}constructor(t){vA=t}parse(t,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=CEe(t),o=typeof t=="string",a=Jft(Object.assign(Object.create(null),n.alias)),l=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),u=n.configObjects||[],f=n.envPrefix,m=l["populate--"],h=m?"--":"_",p=Object.create(null),g=Object.create(null),y=n.__||vA.format,x={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},b=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,E=new RegExp("^--"+l["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(Y){let ne=typeof Y=="object"?Y.key:Y,Fe=Object.keys(Y).map(function(Se){return{boolean:"bools",string:"strings",number:"numbers"}[Se]}).filter(Boolean).pop();Fe&&(x[Fe][ne]=!0),x.arrays[ne]=!0,x.keys.push(ne)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(Y){x.bools[Y]=!0,x.keys.push(Y)}),[].concat(n.string||[]).filter(Boolean).forEach(function(Y){x.strings[Y]=!0,x.keys.push(Y)}),[].concat(n.number||[]).filter(Boolean).forEach(function(Y){x.numbers[Y]=!0,x.keys.push(Y)}),[].concat(n.count||[]).filter(Boolean).forEach(function(Y){x.counts[Y]=!0,x.keys.push(Y)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(Y){x.normalize[Y]=!0,x.keys.push(Y)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([Y,ne])=>{typeof ne=="number"&&(x.nargs[Y]=ne,x.keys.push(Y))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([Y,ne])=>{typeof ne=="function"&&(x.coercions[Y]=ne,x.keys.push(Y))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(Y){x.configs[Y]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([Y,ne])=>{(typeof ne=="boolean"||typeof ne=="function")&&(x.configs[Y]=ne)})),De(n.key,a,n.default,x.arrays),Object.keys(c).forEach(function(Y){(x.aliases[Y]||[]).forEach(function(ne){c[ne]=c[Y]})});let _=null;Ge();let k=[],B=Object.assign(Object.create(null),{_:[]}),N={};for(let Y=0;Y<i.length;Y++){let ne=i[Y],Fe=ne.replace(/^-{3,}/,"---"),Se,Ce,Ue,Ve,tt,Ct;if(ne!=="--"&&/^-/.test(ne)&&ft(ne))M(ne);else if(Fe.match(/^---+(=|$)/)){M(ne);continue}else if(ne.match(/^--.+=/)||!l["short-option-groups"]&&ne.match(/^-.+=/))Ve=ne.match(/^--?([^=]+)=([\s\S]*)$/),Ve!==null&&Array.isArray(Ve)&&Ve.length>=3&&(be(Ve[1],x.arrays)?Y=he(Y,Ve[1],i,Ve[2]):be(Ve[1],x.nargs)!==!1?Y=Z(Y,Ve[1],i,Ve[2]):ee(Ve[1],Ve[2],!0));else if(ne.match(E)&&l["boolean-negation"])Ve=ne.match(E),Ve!==null&&Array.isArray(Ve)&&Ve.length>=2&&(Ce=Ve[1],ee(Ce,be(Ce,x.arrays)?[!1]:!1));else if(ne.match(/^--.+/)||!l["short-option-groups"]&&ne.match(/^-[^-]+/))Ve=ne.match(/^--?(.+)/),Ve!==null&&Array.isArray(Ve)&&Ve.length>=2&&(Ce=Ve[1],be(Ce,x.arrays)?Y=he(Y,Ce,i):be(Ce,x.nargs)!==!1?Y=Z(Y,Ce,i):(tt=i[Y+1],tt!==void 0&&(!tt.match(/^-/)||tt.match(b))&&!be(Ce,x.bools)&&!be(Ce,x.counts)||/^(true|false)$/.test(tt)?(ee(Ce,tt),Y++):ee(Ce,lt(Ce))));else if(ne.match(/^-.\..+=/))Ve=ne.match(/^-([^=]+)=([\s\S]*)$/),Ve!==null&&Array.isArray(Ve)&&Ve.length>=3&&ee(Ve[1],Ve[2]);else if(ne.match(/^-.\..+/)&&!ne.match(b))tt=i[Y+1],Ve=ne.match(/^-(.\..+)/),Ve!==null&&Array.isArray(Ve)&&Ve.length>=2&&(Ce=Ve[1],tt!==void 0&&!tt.match(/^-/)&&!be(Ce,x.bools)&&!be(Ce,x.counts)?(ee(Ce,tt),Y++):ee(Ce,lt(Ce)));else if(ne.match(/^-[^-]+/)&&!ne.match(b)){Ue=ne.slice(1,-1).split(""),Se=!1;for(let Pt=0;Pt<Ue.length;Pt++){if(tt=ne.slice(Pt+2),Ue[Pt+1]&&Ue[Pt+1]==="="){Ct=ne.slice(Pt+3),Ce=Ue[Pt],be(Ce,x.arrays)?Y=he(Y,Ce,i,Ct):be(Ce,x.nargs)!==!1?Y=Z(Y,Ce,i,Ct):ee(Ce,Ct),Se=!0;break}if(tt==="-"){ee(Ue[Pt],tt);continue}if(/[A-Za-z]/.test(Ue[Pt])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(tt)&&be(tt,x.bools)===!1){ee(Ue[Pt],tt),Se=!0;break}if(Ue[Pt+1]&&Ue[Pt+1].match(/\W/)){ee(Ue[Pt],tt),Se=!0;break}else ee(Ue[Pt],lt(Ue[Pt]))}Ce=ne.slice(-1)[0],!Se&&Ce!=="-"&&(be(Ce,x.arrays)?Y=he(Y,Ce,i):be(Ce,x.nargs)!==!1?Y=Z(Y,Ce,i):(tt=i[Y+1],tt!==void 0&&(!/^(-|--)[^-]/.test(tt)||tt.match(b))&&!be(Ce,x.bools)&&!be(Ce,x.counts)||/^(true|false)$/.test(tt)?(ee(Ce,tt),Y++):ee(Ce,lt(Ce))))}else if(ne.match(/^-[0-9]$/)&&ne.match(b)&&be(ne.slice(1),x.bools))Ce=ne.slice(1),ee(Ce,lt(Ce));else if(ne==="--"){k=i.slice(Y+1);break}else if(l["halt-at-non-option"]){k=i.slice(Y);break}else M(ne)}V(B,!0),V(B,!1),z(B),U(),re(B,x.aliases,c,!0),K(B),l["set-placeholder-key"]&&ae(B),Object.keys(x.counts).forEach(function(Y){le(B,Y.split("."))||ee(Y,0)}),m&&k.length&&(B[h]=[]),k.forEach(function(Y){B[h].push(Y)}),l["camel-case-expansion"]&&l["strip-dashed"]&&Object.keys(B).filter(Y=>Y!=="--"&&Y.includes("-")).forEach(Y=>{delete B[Y]}),l["strip-aliased"]&&[].concat(...Object.keys(a).map(Y=>a[Y])).forEach(Y=>{l["camel-case-expansion"]&&Y.includes("-")&&delete B[Y.split(".").map(ne=>Cv(ne)).join(".")],delete B[Y]});function M(Y){let ne=ie("_",Y);(typeof ne=="string"||typeof ne=="number")&&B._.push(ne)}s(M,"pushPositional");function Z(Y,ne,Fe,Se){let Ce,Ue=be(ne,x.nargs);if(Ue=typeof Ue!="number"||isNaN(Ue)?1:Ue,Ue===0)return Ae(Se)||(_=Error(y("Argument unexpected for: %s",ne))),ee(ne,lt(ne)),Y;let Ve=Ae(Se)?0:1;if(l["nargs-eats-options"])Fe.length-(Y+1)+Ve<Ue&&(_=Error(y("Not enough arguments following: %s",ne))),Ve=Ue;else{for(Ce=Y+1;Ce<Fe.length&&(!Fe[Ce].match(/^-[^0-9]/)||Fe[Ce].match(b)||ft(Fe[Ce]));Ce++)Ve++;Ve<Ue&&(_=Error(y("Not enough arguments following: %s",ne)))}let tt=Math.min(Ve,Ue);for(!Ae(Se)&&tt>0&&(ee(ne,Se),tt--),Ce=Y+1;Ce<tt+Y+1;Ce++)ee(ne,Fe[Ce]);return Y+tt}s(Z,"eatNargs");function he(Y,ne,Fe,Se){let Ce=[],Ue=Se||Fe[Y+1],Ve=be(ne,x.nargs);if(be(ne,x.bools)&&!/^(true|false)$/.test(Ue))Ce.push(!0);else if(Ae(Ue)||Ae(Se)&&/^-/.test(Ue)&&!b.test(Ue)&&!ft(Ue)){if(c[ne]!==void 0){let tt=c[ne];Ce=Array.isArray(tt)?tt:[tt]}}else{Ae(Se)||Ce.push(q(ne,Se,!0));for(let tt=Y+1;tt<Fe.length&&!(!l["greedy-arrays"]&&Ce.length>0||Ve&&typeof Ve=="number"&&Ce.length>=Ve||(Ue=Fe[tt],/^-/.test(Ue)&&!b.test(Ue)&&!ft(Ue)));tt++)Y=tt,Ce.push(q(ne,Ue,o))}return typeof Ve=="number"&&(Ve&&Ce.length<Ve||isNaN(Ve)&&Ce.length===0)&&(_=Error(y("Not enough arguments following: %s",ne))),ee(ne,Ce),Y}s(he,"eatArray");function ee(Y,ne,Fe=o){if(/-/.test(Y)&&l["camel-case-expansion"]){let Ue=Y.split(".").map(function(Ve){return Cv(Ve)}).join(".");G(Y,Ue)}let Se=q(Y,ne,Fe),Ce=Y.split(".");ce(B,Ce,Se),x.aliases[Y]&&x.aliases[Y].forEach(function(Ue){let Ve=Ue.split(".");ce(B,Ve,Se)}),Ce.length>1&&l["dot-notation"]&&(x.aliases[Ce[0]]||[]).forEach(function(Ue){let Ve=Ue.split("."),tt=[].concat(Ce);tt.shift(),Ve=Ve.concat(tt),(x.aliases[Y]||[]).includes(Ve.join("."))||ce(B,Ve,Se)}),be(Y,x.normalize)&&!be(Y,x.arrays)&&[Y].concat(x.aliases[Y]||[]).forEach(function(Ve){Object.defineProperty(N,Ve,{enumerable:!0,get(){return ne},set(tt){ne=typeof tt=="string"?vA.normalize(tt):tt}})})}s(ee,"setArg");function G(Y,ne){x.aliases[Y]&&x.aliases[Y].length||(x.aliases[Y]=[ne],p[ne]=!0),x.aliases[ne]&&x.aliases[ne].length||G(ne,Y)}s(G,"addNewAlias");function q(Y,ne,Fe){Fe&&(ne=Xft(ne)),(be(Y,x.bools)||be(Y,x.counts))&&typeof ne=="string"&&(ne=ne==="true");let Se=Array.isArray(ne)?ne.map(function(Ce){return ie(Y,Ce)}):ie(Y,ne);return be(Y,x.counts)&&(Ae(Se)||typeof Se=="boolean")&&(Se=$te()),be(Y,x.normalize)&&be(Y,x.arrays)&&(Array.isArray(ne)?Se=ne.map(Ce=>vA.normalize(Ce)):Se=vA.normalize(ne)),Se}s(q,"processValue");function ie(Y,ne){return!l["parse-positional-numbers"]&&Y==="_"||!be(Y,x.strings)&&!be(Y,x.bools)&&!Array.isArray(ne)&&(DQ(ne)&&l["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${ne}`)))||!Ae(ne)&&be(Y,x.numbers))&&(ne=Number(ne)),ne}s(ie,"maybeCoerceNumber");function z(Y){let ne=Object.create(null);re(ne,x.aliases,c),Object.keys(x.configs).forEach(function(Fe){let Se=Y[Fe]||ne[Fe];if(Se)try{let Ce=null,Ue=vA.resolve(vA.cwd(),Se),Ve=x.configs[Fe];if(typeof Ve=="function"){try{Ce=Ve(Ue)}catch(tt){Ce=tt}if(Ce instanceof Error){_=Ce;return}}else Ce=vA.require(Ue);j(Ce)}catch(Ce){Ce.name==="PermissionDenied"?_=Ce:Y[Fe]&&(_=Error(y("Invalid JSON config file: %s",Se)))}})}s(z,"setConfig");function j(Y,ne){Object.keys(Y).forEach(function(Fe){let Se=Y[Fe],Ce=ne?ne+"."+Fe:Fe;typeof Se=="object"&&Se!==null&&!Array.isArray(Se)&&l["dot-notation"]?j(Se,Ce):(!le(B,Ce.split("."))||be(Ce,x.arrays)&&l["combine-arrays"])&&ee(Ce,Se)})}s(j,"setConfigObject");function U(){typeof u<"u"&&u.forEach(function(Y){j(Y)})}s(U,"setConfigObjects");function V(Y,ne){if(typeof f>"u")return;let Fe=typeof f=="string"?f:"",Se=vA.env();Object.keys(Se).forEach(function(Ce){if(Fe===""||Ce.lastIndexOf(Fe,0)===0){let Ue=Ce.split("__").map(function(Ve,tt){return tt===0&&(Ve=Ve.substring(Fe.length)),Cv(Ve)});(ne&&x.configs[Ue.join(".")]||!ne)&&!le(Y,Ue)&&ee(Ue.join("."),Se[Ce])}})}s(V,"applyEnvVars");function K(Y){let ne,Fe=new Set;Object.keys(Y).forEach(function(Se){if(!Fe.has(Se)&&(ne=be(Se,x.coercions),typeof ne=="function"))try{let Ce=ie(Se,ne(Y[Se]));[].concat(x.aliases[Se]||[],Se).forEach(Ue=>{Fe.add(Ue),Y[Ue]=Ce})}catch(Ce){_=Ce}})}s(K,"applyCoercions");function ae(Y){return x.keys.forEach(ne=>{~ne.indexOf(".")||typeof Y[ne]>"u"&&(Y[ne]=void 0)}),Y}s(ae,"setPlaceholderKeys");function re(Y,ne,Fe,Se=!1){Object.keys(Fe).forEach(function(Ce){le(Y,Ce.split("."))||(ce(Y,Ce.split("."),Fe[Ce]),Se&&(g[Ce]=!0),(ne[Ce]||[]).forEach(function(Ue){le(Y,Ue.split("."))||ce(Y,Ue.split("."),Fe[Ce])}))})}s(re,"applyDefaultsAndAliases");function le(Y,ne){let Fe=Y;l["dot-notation"]||(ne=[ne.join(".")]),ne.slice(0,-1).forEach(function(Ce){Fe=Fe[Ce]||{}});let Se=ne[ne.length-1];return typeof Fe!="object"?!1:Se in Fe}s(le,"hasKey");function ce(Y,ne,Fe){let Se=Y;l["dot-notation"]||(ne=[ne.join(".")]),ne.slice(0,-1).forEach(function(Ct){Ct=xEe(Ct),typeof Se=="object"&&Se[Ct]===void 0&&(Se[Ct]={}),typeof Se[Ct]!="object"||Array.isArray(Se[Ct])?(Array.isArray(Se[Ct])?Se[Ct].push({}):Se[Ct]=[Se[Ct],{}],Se=Se[Ct][Se[Ct].length-1]):Se=Se[Ct]});let Ce=xEe(ne[ne.length-1]),Ue=be(ne.join("."),x.arrays),Ve=Array.isArray(Fe),tt=l["duplicate-arguments-array"];!tt&&be(Ce,x.nargs)&&(tt=!0,(!Ae(Se[Ce])&&x.nargs[Ce]===1||Array.isArray(Se[Ce])&&Se[Ce].length===x.nargs[Ce])&&(Se[Ce]=void 0)),Fe===$te()?Se[Ce]=$te(Se[Ce]):Array.isArray(Se[Ce])?tt&&Ue&&Ve?Se[Ce]=l["flatten-duplicate-arrays"]?Se[Ce].concat(Fe):(Array.isArray(Se[Ce][0])?Se[Ce]:[Se[Ce]]).concat([Fe]):!tt&&!!Ue==!!Ve?Se[Ce]=Fe:Se[Ce]=Se[Ce].concat([Fe]):Se[Ce]===void 0&&Ue?Se[Ce]=Ve?Fe:[Fe]:tt&&!(Se[Ce]===void 0||be(Ce,x.counts)||be(Ce,x.bools))?Se[Ce]=[Se[Ce],Fe]:Se[Ce]=Fe}s(ce,"setKey");function De(...Y){Y.forEach(function(ne){Object.keys(ne||{}).forEach(function(Fe){x.aliases[Fe]||(x.aliases[Fe]=[].concat(a[Fe]||[]),x.aliases[Fe].concat(Fe).forEach(function(Se){if(/-/.test(Se)&&l["camel-case-expansion"]){let Ce=Cv(Se);Ce!==Fe&&x.aliases[Fe].indexOf(Ce)===-1&&(x.aliases[Fe].push(Ce),p[Ce]=!0)}}),x.aliases[Fe].concat(Fe).forEach(function(Se){if(Se.length>1&&/[A-Z]/.test(Se)&&l["camel-case-expansion"]){let Ce=BQ(Se,"-");Ce!==Fe&&x.aliases[Fe].indexOf(Ce)===-1&&(x.aliases[Fe].push(Ce),p[Ce]=!0)}}),x.aliases[Fe].forEach(function(Se){x.aliases[Se]=[Fe].concat(x.aliases[Fe].filter(function(Ce){return Se!==Ce}))}))})})}s(De,"extendAliases");function be(Y,ne){let Fe=[].concat(x.aliases[Y]||[],Y),Se=Object.keys(ne),Ce=Fe.find(Ue=>Se.includes(Ue));return Ce?ne[Ce]:!1}s(be,"checkAllAliases");function qe(Y){let ne=Object.keys(x);return[].concat(ne.map(Se=>x[Se])).some(function(Se){return Array.isArray(Se)?Se.includes(Y):Se[Y]})}s(qe,"hasAnyFlag");function Re(Y,...ne){return[].concat(...ne).some(function(Se){let Ce=Y.match(Se);return Ce&&qe(Ce[1])})}s(Re,"hasFlagsMatching");function Xe(Y){if(Y.match(b)||!Y.match(/^-[^-]+/))return!1;let ne=!0,Fe,Se=Y.slice(1).split("");for(let Ce=0;Ce<Se.length;Ce++){if(Fe=Y.slice(Ce+2),!qe(Se[Ce])){ne=!1;break}if(Se[Ce+1]&&Se[Ce+1]==="="||Fe==="-"||/[A-Za-z]/.test(Se[Ce])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(Fe)||Se[Ce+1]&&Se[Ce+1].match(/\W/))break}return ne}s(Xe,"hasAllShortFlags");function ft(Y){return l["unknown-options-as-args"]&&at(Y)}s(ft,"isUnknownOptionAsArg");function at(Y){return Y=Y.replace(/^-{3,}/,"--"),Y.match(b)||Xe(Y)?!1:!Re(Y,/^-+([^=]+?)=[\s\S]*$/,E,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}s(at,"isUnknownOption");function lt(Y){return!be(Y,x.bools)&&!be(Y,x.counts)&&`${Y}`in c?c[Y]:oe(Ne(Y))}s(lt,"defaultValue");function oe(Y){return{[Od.BOOLEAN]:!0,[Od.STRING]:"",[Od.NUMBER]:void 0,[Od.ARRAY]:[]}[Y]}s(oe,"defaultForType");function Ne(Y){let ne=Od.BOOLEAN;return be(Y,x.strings)?ne=Od.STRING:be(Y,x.numbers)?ne=Od.NUMBER:be(Y,x.bools)?ne=Od.BOOLEAN:be(Y,x.arrays)&&(ne=Od.ARRAY),ne}s(Ne,"guessType");function Ae(Y){return Y===void 0}s(Ae,"isUndefined");function Ge(){Object.keys(x.counts).find(Y=>be(Y,x.arrays)?(_=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",Y)),!0):be(Y,x.nargs)?(_=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",Y)),!0):!1)}return s(Ge,"checkConfiguration"),{aliases:Object.assign({},x.aliases),argv:Object.assign(N,B),configuration:l,defaulted:Object.assign({},g),error:_,newAliases:Object.assign({},p)}}};function Jft(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(i){t.push([].concat(e[i],i))});n;){n=!1;for(let i=0;i<t.length;i++)for(let o=i+1;o<t.length;o++)if(t[i].filter(function(l){return t[o].indexOf(l)!==-1}).length){t[i]=t[i].concat(t[o]),t.splice(o,1),n=!0;break}}return t.forEach(function(i){i=i.filter(function(a,l,c){return c.indexOf(a)===l});let o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}s(Jft,"combineAliases");function $te(e){return e!==void 0?e+1:1}s($te,"increment");function xEe(e){return e==="__proto__"?"___proto___":e}s(xEe,"sanitizeKey");function Xft(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}s(Xft,"stripQuotes");var IEe=require("fs");var zte,Yte,Kte,vEe=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,bEe=(Yte=(zte=process==null?void 0:process.versions)===null||zte===void 0?void 0:zte.node)!==null&&Yte!==void 0?Yte:(Kte=process==null?void 0:process.version)===null||Kte===void 0?void 0:Kte.slice(1);if(bEe&&Number(bEe.match(/^([^.]+)/)[1])<vEe)throw Error(`yargs parser supports a minimum Node.js version of ${vEe}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Zft=process?process.env:{},TEe=new PQ({cwd:process.cwd,env:s(()=>Zft,"env"),format:EEe.format,normalize:NQ.normalize,resolve:NQ.resolve,require:s(e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse((0,IEe.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")},"require")}),fS=s(function(t,r){return TEe.parse(t.slice(),r).argv},"Parser");fS.detailed=function(e,t){return TEe.parse(e.slice(),t)};fS.camelCase=Cv;fS.decamelize=BQ;fS.looksLikeNumber=DQ;var wEe=fS;var xh=require("path");d();function edt(){return tdt()?0:1}s(edt,"getProcessArgvBinIndex");function tdt(){return rdt()&&!process.defaultApp}s(tdt,"isBundledElectronApp");function rdt(){return!!process.versions.electron}s(rdt,"isElectronApp");function _Ee(){return process.argv[edt()]}s(_Ee,"getProcessArgvBin");d();var gs=class e extends Error{static{s(this,"YError")}constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};d();d();var B8=require("fs"),SEe=require("util"),REe=require("path");var kEe={fs:{readFileSync:B8.readFileSync,writeFile:B8.writeFile},format:SEe.format,resolve:REe.resolve,exists:s(e=>{try{return(0,B8.statSync)(e).isFile()}catch{return!1}},"exists")};d();var Ch,Jte=class{static{s(this,"Y18N")}constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=s(function(){},"cb");return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Ch.format.apply(Ch.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),i=t.shift(),o=s(function(){},"cb");typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let a=i===1?r:n;this.cache[this.locale][r]&&(a=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let l=[a];return~a.indexOf("%d")&&l.push(i),Ch.format.apply(Ch.format,l.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r])}_taggedLiteral(t,...r){let n="";return t.forEach(function(i,o){let a=r[o+1];n+=i,typeof a<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,i=r.locale,o=r.cb,a=this._resolveLocaleFile(n,i),l=JSON.stringify(this.cache[i],null,2);Ch.fs.writeFile(a,l,"utf-8",function(c){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(c)})}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{Ch.fs.readFileSync&&(t=JSON.parse(Ch.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t}_resolveLocaleFile(t,r){let n=Ch.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let i=Ch.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(t){return Ch.exists(t)}};function BEe(e,t){Ch=t;let r=new Jte(e);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}s(BEe,"y18n");var ndt=s(e=>BEe(e,kEe),"y18n"),DEe=ndt;var idt="require is not supported by ESM",PEe="loading a directory of commands is not supported yet for ESM",dS;try{dS=(0,FEe.fileURLToPath)(importMetaUrlShim)}catch{dS=process.cwd()}var odt=dS.substring(0,dS.lastIndexOf("node_modules")),MEe={assert:{notStrictEqual:LQ.notStrictEqual,strictEqual:LQ.strictEqual},cliui:jte,findUp:Vte,getEnv:s(e=>process.env[e],"getEnv"),inspect:NEe.inspect,getCallerFile:s(()=>{throw new gs(PEe)},"getCallerFile"),getProcessArgvBin:_Ee,mainFilename:odt||process.cwd(),Parser:wEe,path:{basename:xh.basename,dirname:xh.dirname,extname:xh.extname,relative:xh.relative,resolve:xh.resolve},process:{argv:s(()=>process.argv,"argv"),cwd:process.cwd,emitWarning:s((e,t)=>process.emitWarning(e,t),"emitWarning"),execPath:s(()=>process.execPath,"execPath"),exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:LEe.readFileSync,require:s(()=>{throw new gs(idt)},"require"),requireDirectory:s(()=>{throw new gs(PEe)},"requireDirectory"),stringWidth:s(e=>[...e].length,"stringWidth"),y18n:DEe({directory:(0,xh.resolve)(dS,"../../../locales"),updateFiles:!1})};d();d();d();function x0(e,t,r,n){r.assert.notStrictEqual(e,t,n)}s(x0,"assertNotStrictEqual");function Xte(e,t){t.assert.strictEqual(typeof e,"string")}s(Xte,"assertSingleKey");function D8(e){return Object.keys(e)}s(D8,"objectKeys");d();function As(e){return!!e&&!!e.then&&typeof e.then=="function"}s(As,"isPromise");d();d();d();function O5(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,i=r.shift();if(!i)throw new Error(`No command found in: ${e}`);let o={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((a,l)=>{let c=!1;a=a.replace(/\s/g,""),/\.+[\]>]/.test(a)&&l===r.length-1&&(c=!0),/^\[/.test(a)?o.optional.push({cmd:a.replace(n,"").split("|"),variadic:c}):o.demanded.push({cmd:a.replace(n,"").split("|"),variadic:c})}),o}s(O5,"parseCommand");var sdt=["first","second","third","fourth","fifth","sixth"];function Fr(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[O5(`cmd ${e}`),t,r]}s(n,"parseArgs");try{let i=0,[o,a,l]=n(),c=[].slice.call(a);for(;c.length&&c[c.length-1]===void 0;)c.pop();let u=l||c.length;if(u<o.demanded.length)throw new gs(`Not enough arguments provided. Expected ${o.demanded.length} but received ${c.length}.`);let f=o.demanded.length+o.optional.length;if(u>f)throw new gs(`Too many arguments provided. Expected max ${f} but received ${u}.`);o.demanded.forEach(m=>{let h=c.shift(),p=QEe(h);m.cmd.filter(y=>y===p||y==="*").length===0&&OEe(p,m.cmd,i),i+=1}),o.optional.forEach(m=>{if(c.length===0)return;let h=c.shift(),p=QEe(h);m.cmd.filter(y=>y===p||y==="*").length===0&&OEe(p,m.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}s(Fr,"argsert");function QEe(e){return Array.isArray(e)?"array":e===null?"null":typeof e}s(QEe,"guessType");function OEe(e,t,r){throw new gs(`Invalid ${sdt[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}s(OEe,"argumentTypeError");var FQ=class{static{s(this,"GlobalMiddleware")}constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,r,n=!0,i=!1){if(Fr("<array|function> [boolean] [boolean] [boolean]",[t,r,n],arguments.length),Array.isArray(t)){for(let o=0;o<t.length;o++){if(typeof t[o]!="function")throw Error("middleware must be a function");let a=t[o];a.applyBeforeValidation=r,a.global=n}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let o=t;o.applyBeforeValidation=r,o.global=n,o.mutates=i,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let o=[...n[r]||[],r];return i.option?!o.includes(i.option):!0}),t.option=r,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function UEe(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}s(UEe,"commandMiddlewareFactory");function xv(e,t,r,n){return r.reduce((i,o)=>{if(o.applyBeforeValidation!==n)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(As(i))return i.then(a=>Promise.all([a,o(a,t)])).then(([a,l])=>Object.assign(a,l));{let a=o(i,t);return As(a)?a.then(l=>Object.assign(i,l)):Object.assign(i,a)}},e)}s(xv,"applyMiddleware");d();function vv(e,t,r=n=>{throw n}){try{let n=adt(e)?e():e;return As(n)?n.then(i=>t(i)):t(n)}catch(n){return r(n)}}s(vv,"maybeAsyncResult");function adt(e){return typeof e=="function"}s(adt,"isFunction");d();function Zte(e){if(typeof require>"u")return null;for(let t=0,r=Object.keys(require.cache),n;t<r.length;t++)if(n=require.cache[r[t]],n.exports===e)return n;return null}s(Zte,"whichModule");var P8=/(^\*)|(^\$0)/,ere=class{static{s(this,"CommandInstance")}constructor(t,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=n,this.validation=r}addDirectory(t,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let o=typeof i.visit=="function"?i.visit:a=>a;i.visit=(a,l,c)=>{let u=o(a,l,c);if(u){if(this.requireCache.has(l))return u;this.requireCache.add(l),this.addHandler(u)}return u},this.shim.requireDirectory({require:r,filename:n},t,i)}addHandler(t,r,n,i,o,a){let l=[],c=UEe(o);if(i=i||(()=>{}),Array.isArray(t))if(ldt(t))[t,...l]=t;else for(let u of t)this.addHandler(u);else if(udt(t)){let u=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(u=[].concat(u).concat(t.aliases)),this.addHandler(u,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(qEe(n)){this.addHandler([t].concat(l),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof t=="string"){let u=O5(t);l=l.map(h=>O5(h).cmd);let f=!1,m=[u.cmd].concat(l).filter(h=>P8.test(h)?(f=!0,!1):!0);m.length===0&&f&&m.push("$0"),f&&(u.cmd=m[0],l=m.slice(1),t=t.replace(P8,u.cmd)),l.forEach(h=>{this.aliasMap[h]=u.cmd}),r!==!1&&this.usage.command(t,r,f,l,a),this.handlers[u.cmd]={original:t,description:r,handler:i,builder:n||{},middlewares:c,deprecated:a,demanded:u.demanded,optional:u.optional},f&&(this.defaultCommand=this.handlers[u.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,r,n,i,o,a){let l=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,c=r.getInternalMethods().getContext(),u=c.commands.slice(),f=!t;t&&(c.commands.push(t),c.fullCommands.push(l.original));let m=this.applyBuilderUpdateUsageAndParse(f,l,r,n.aliases,u,i,o,a);return As(m)?m.then(h=>this.applyMiddlewareAndGetResult(f,l,h.innerArgv,c,o,h.aliases,r)):this.applyMiddlewareAndGetResult(f,l,m.innerArgv,c,o,m.aliases,r)}applyBuilderUpdateUsageAndParse(t,r,n,i,o,a,l,c){let u=r.builder,f=n;if(MQ(u)){n.getInternalMethods().getUsageInstance().freeze();let m=u(n.getInternalMethods().reset(i),c);if(As(m))return m.then(h=>(f=GEe(h)?h:n,this.parseAndUpdateUsage(t,r,f,o,a,l)))}else cdt(u)&&(n.getInternalMethods().getUsageInstance().freeze(),f=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(m=>{f.option(m,u[m])}));return this.parseAndUpdateUsage(t,r,f,o,a,l)}parseAndUpdateUsage(t,r,n,i,o,a){t&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);let l=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,a);return As(l)?l.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):{aliases:n.parsed.aliases,innerArgv:l}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,r){let n=P8.test(r.original)?r.original.replace(P8,"").trim():r.original,i=t.filter(o=>!P8.test(o));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,r,n,i,o,a,l,c){if(!a.getInternalMethods().getHasOutput()){let u=a.getInternalMethods().runValidation(o,c,a.parsed.error,t);n=vv(n,f=>(u(f),f))}if(r.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let u=!!a.getOptions().configuration["populate--"];a.getInternalMethods().postProcess(n,u,!1,!1),n=xv(n,a,l,!1),n=vv(n,f=>{let m=r.handler(f);return As(m)?m.then(()=>f):f}),t||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),As(n)&&!a.getInternalMethods().hasParseCallback()&&n.catch(f=>{try{a.getInternalMethods().getUsageInstance().fail(null,f)}catch{}})}return t||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(t,r,n,i,o,a,l){let c={};if(o)return n;l.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,n,i,l));let u=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),f=xv(n,l,u,!0);return As(f)?f.then(m=>this.handleValidationAndGetResult(t,r,m,i,a,l,u,c)):this.handleValidationAndGetResult(t,r,f,i,a,l,u,c)}populatePositionals(t,r,n,i){r._=r._.slice(n.commands.length);let o=t.demanded.slice(0),a=t.optional.slice(0),l={};for(this.validation.positionalCount(o.length,r._.length);o.length;){let c=o.shift();this.populatePositional(c,r,l)}for(;a.length;){let c=a.shift();this.populatePositional(c,r,l)}return r._=n.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,l,this.cmdToParseOptions(t.original),i),l}populatePositional(t,r,n){let i=t.cmd[0];t.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(t){let r={array:[],default:{},alias:{},demand:{}},n=O5(t);return n.demanded.forEach(i=>{let[o,...a]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=a,r.demand[o]=!0}),n.optional.forEach(i=>{let[o,...a]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=a}),r}postProcessPositionals(t,r,n,i){let o=Object.assign({},i.getOptions());o.default=Object.assign(n.default,o.default);for(let u of Object.keys(n.alias))o.alias[u]=(o.alias[u]||[]).concat(n.alias[u]);o.array=o.array.concat(n.array),o.config={};let a=[];if(Object.keys(r).forEach(u=>{r[u].map(f=>{o.configuration["unknown-options-as-args"]&&(o.key[u]=!0),a.push(`--${u}`),a.push(f)})}),!a.length)return;let l=Object.assign({},o.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(a,Object.assign({},o,{configuration:l}));if(c.error)i.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{let u=Object.keys(r);Object.keys(r).forEach(f=>{u.push(...c.aliases[f])}),Object.keys(c.argv).forEach(f=>{u.includes(f)&&(r[f]||(r[f]=c.argv[f]),!this.isInConfigs(i,f)&&!this.isDefaulted(i,f)&&Object.prototype.hasOwnProperty.call(t,f)&&Object.prototype.hasOwnProperty.call(c.argv,f)&&(Array.isArray(t[f])||Array.isArray(c.argv[f]))?t[f]=[].concat(t[f],c.argv[f]):t[f]=c.argv[f])})}}isDefaulted(t,r){let{default:n}=t.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(t,r){let{configObjects:n}=t.getOptions();return n.some(i=>Object.prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let n=P8.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(MQ(r))return r(t,!0);qEe(r)||Object.keys(r).forEach(n=>{t.option(n,r[n])})}moduleName(t){let r=Zte(t);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(r.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:r,desc:n}){for(let i of[t,r,n]){if(typeof i=="string"||i===!1)return i;x0(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();x0(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function WEe(e,t,r,n){return new ere(e,t,r,n)}s(WEe,"command");function qEe(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}s(qEe,"isCommandBuilderDefinition");function ldt(e){return e.every(t=>typeof t=="string")}s(ldt,"isCommandAndAliases");function MQ(e){return typeof e=="function"}s(MQ,"isCommandBuilderCallback");function cdt(e){return typeof e=="object"}s(cdt,"isCommandBuilderOptionDefinitions");function udt(e){return typeof e=="object"&&!Array.isArray(e)}s(udt,"isCommandHandlerDefinition");d();d();function U5(e={},t=()=>!0){let r={};return D8(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n])}),r}s(U5,"objFilter");d();function q5(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e)})}s(q5,"setBlocking");function fdt(e){return typeof e=="boolean"}s(fdt,"isBoolean");function jEe(e,t){let r=t.y18n.__,n={},i=[];n.failFn=s(function(q){i.push(q)},"failFn");let o=null,a=null,l=!0;n.showHelpOnFail=s(function(q=!0,ie){let[z,j]=typeof q=="string"?[!0,q]:[q,ie];return e.getInternalMethods().isGlobalContext()&&(a=j),o=j,l=z,n},"showHelpOnFailFn");let c=!1;n.fail=s(function(q,ie){let z=e.getInternalMethods().getLoggerInstance();if(i.length)for(let j=i.length-1;j>=0;--j){let U=i[j];if(fdt(U)){if(ie)throw ie;if(q)throw Error(q)}else U(q,ie,n)}else{if(e.getExitProcess()&&q5(!0),!c){c=!0,l&&(e.showHelp("error"),z.error()),(q||ie)&&z.error(q||ie);let j=o||a;j&&((q||ie)&&z.error(""),z.error(j))}if(ie=ie||new gs(q),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,ie);throw ie}},"fail");let u=[],f=!1;n.usage=(G,q)=>G===null?(f=!0,u=[],n):(f=!1,u.push([G,q||""]),n),n.getUsage=()=>u,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>r("Positionals:");let m=[];n.example=(G,q)=>{m.push([G,q||""])};let h=[];n.command=s(function(q,ie,z,j,U=!1){z&&(h=h.map(V=>(V[2]=!1,V))),h.push([q,ie||"",z,j,U])},"command"),n.getCommands=()=>h;let p={};n.describe=s(function(q,ie){Array.isArray(q)?q.forEach(z=>{n.describe(z,ie)}):typeof q=="object"?Object.keys(q).forEach(z=>{n.describe(z,q[z])}):p[q]=ie},"describe"),n.getDescriptions=()=>p;let g=[];n.epilog=G=>{g.push(G)};let y=!1,x;n.wrap=G=>{y=!0,x=G},n.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(y||(x=Z(),y=!0),x);let b="__yargsString__:";n.deferY18nLookup=G=>b+G,n.help=s(function(){if(k)return k;_();let q=e.customScriptName?e.$0:t.path.basename(e.$0),ie=e.getDemandedOptions(),z=e.getDemandedCommands(),j=e.getDeprecatedOptions(),U=e.getGroups(),V=e.getOptions(),K=[];K=K.concat(Object.keys(p)),K=K.concat(Object.keys(ie)),K=K.concat(Object.keys(z)),K=K.concat(Object.keys(V.default)),K=K.filter(N),K=Object.keys(K.reduce((Re,Xe)=>(Xe!=="_"&&(Re[Xe]=!0),Re),{}));let ae=n.getWrap(),re=t.cliui({width:ae,wrap:!!ae});if(!f){if(u.length)u.forEach(Re=>{re.div({text:`${Re[0].replace(/\$0/g,q)}`}),Re[1]&&re.div({text:`${Re[1]}`,padding:[1,0,0,0]})}),re.div();else if(h.length){let Re=null;z._?Re=`${q} <${r("command")}>
`:Re=`${q} [${r("command")}]
`,re.div(`${Re}`)}}if(h.length>1||h.length===1&&!h[0][2]){re.div(r("Commands:"));let Re=e.getInternalMethods().getContext(),Xe=Re.commands.length?`${Re.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(h=h.sort((at,lt)=>at[0].localeCompare(lt[0])));let ft=q?`${q} `:"";h.forEach(at=>{let lt=`${ft}${Xe}${at[0].replace(/^\$0 ?/,"")}`;re.span({text:lt,padding:[0,2,0,2],width:E(h,ae,`${q}${Xe}`)+4},{text:at[1]});let oe=[];at[2]&&oe.push(`[${r("default")}]`),at[3]&&at[3].length&&oe.push(`[${r("aliases:")} ${at[3].join(", ")}]`),at[4]&&(typeof at[4]=="string"?oe.push(`[${r("deprecated: %s",at[4])}]`):oe.push(`[${r("deprecated")}]`)),oe.length?re.div({text:oe.join(" "),padding:[0,0,0,2],align:"right"}):re.div()}),re.div()}let le=(Object.keys(V.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);K=K.filter(Re=>!e.parsed.newAliases[Re]&&le.every(Xe=>(V.alias[Xe]||[]).indexOf(Re)===-1));let ce=r("Options:");U[ce]||(U[ce]=[]),B(K,V.alias,U,ce);let De=s(Re=>/^--/.test(QQ(Re)),"isLongSwitch"),be=Object.keys(U).filter(Re=>U[Re].length>0).map(Re=>{let Xe=U[Re].filter(N).map(ft=>{if(le.includes(ft))return ft;for(let at=0,lt;(lt=le[at])!==void 0;at++)if((V.alias[lt]||[]).includes(ft))return lt;return ft});return{groupName:Re,normalizedKeys:Xe}}).filter(({normalizedKeys:Re})=>Re.length>0).map(({groupName:Re,normalizedKeys:Xe})=>{let ft=Xe.reduce((at,lt)=>(at[lt]=[lt].concat(V.alias[lt]||[]).map(oe=>Re===n.getPositionalGroupName()?oe:(/^[0-9]$/.test(oe)?V.boolean.includes(lt)?"-":"--":oe.length>1?"--":"-")+oe).sort((oe,Ne)=>De(oe)===De(Ne)?0:De(oe)?1:-1).join(", "),at),{});return{groupName:Re,normalizedKeys:Xe,switches:ft}});if(be.filter(({groupName:Re})=>Re!==n.getPositionalGroupName()).some(({normalizedKeys:Re,switches:Xe})=>!Re.every(ft=>De(Xe[ft])))&&be.filter(({groupName:Re})=>Re!==n.getPositionalGroupName()).forEach(({normalizedKeys:Re,switches:Xe})=>{Re.forEach(ft=>{De(Xe[ft])&&(Xe[ft]=ddt(Xe[ft],4))})}),be.forEach(({groupName:Re,normalizedKeys:Xe,switches:ft})=>{re.div(Re),Xe.forEach(at=>{let lt=ft[at],oe=p[at]||"",Ne=null;oe.includes(b)&&(oe=r(oe.substring(b.length))),V.boolean.includes(at)&&(Ne=`[${r("boolean")}]`),V.count.includes(at)&&(Ne=`[${r("count")}]`),V.string.includes(at)&&(Ne=`[${r("string")}]`),V.normalize.includes(at)&&(Ne=`[${r("string")}]`),V.array.includes(at)&&(Ne=`[${r("array")}]`),V.number.includes(at)&&(Ne=`[${r("number")}]`);let Ae=s(ne=>typeof ne=="string"?`[${r("deprecated: %s",ne)}]`:`[${r("deprecated")}]`,"deprecatedExtra"),Ge=[at in j?Ae(j[at]):null,Ne,at in ie?`[${r("required")}]`:null,V.choices&&V.choices[at]?`[${r("choices:")} ${n.stringifiedValues(V.choices[at])}]`:null,M(V.default[at],V.defaultDescription[at])].filter(Boolean).join(" ");re.span({text:QQ(lt),padding:[0,2,0,2+HEe(lt)],width:E(ft,ae)+4},oe);let Y=e.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;Ge&&!Y?re.div({text:Ge,padding:[0,0,0,2],align:"right"}):re.div()}),re.div()}),m.length&&(re.div(r("Examples:")),m.forEach(Re=>{Re[0]=Re[0].replace(/\$0/g,q)}),m.forEach(Re=>{Re[1]===""?re.div({text:Re[0],padding:[0,2,0,2]}):re.div({text:Re[0],padding:[0,2,0,2],width:E(m,ae)+4},{text:Re[1]})}),re.div()),g.length>0){let Re=g.map(Xe=>Xe.replace(/\$0/g,q)).join(`
`);re.div(`${Re}
`)}return re.toString().replace(/\s*$/,"")},"help");function E(G,q,ie){let z=0;return Array.isArray(G)||(G=Object.values(G).map(j=>[j])),G.forEach(j=>{z=Math.max(t.stringWidth(ie?`${ie} ${QQ(j[0])}`:QQ(j[0]))+HEe(j[0]),z)}),q&&(z=Math.min(z,parseInt((q*.5).toString(),10))),z}s(E,"maxWidth");function _(){let G=e.getDemandedOptions(),q=e.getOptions();(Object.keys(q.alias)||[]).forEach(ie=>{q.alias[ie].forEach(z=>{p[z]&&n.describe(ie,p[z]),z in G&&e.demandOption(ie,G[z]),q.boolean.includes(z)&&e.boolean(ie),q.count.includes(z)&&e.count(ie),q.string.includes(z)&&e.string(ie),q.normalize.includes(z)&&e.normalize(ie),q.array.includes(z)&&e.array(ie),q.number.includes(z)&&e.number(ie)})})}s(_,"normalizeAliases");let k;n.cacheHelpMessage=function(){k=this.help()},n.clearCachedHelpMessage=function(){k=void 0},n.hasCachedHelpMessage=function(){return!!k};function B(G,q,ie,z){let j=[],U=null;return Object.keys(ie).forEach(V=>{j=j.concat(ie[V])}),G.forEach(V=>{U=[V].concat(q[V]),U.some(K=>j.indexOf(K)!==-1)||ie[z].push(V)}),j}s(B,"addUngroupedKeys");function N(G){return e.getOptions().hiddenOptions.indexOf(G)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}s(N,"filterHiddenOptions"),n.showHelp=G=>{let q=e.getInternalMethods().getLoggerInstance();G||(G="error"),(typeof G=="function"?G:q[G])(n.help())},n.functionDescription=G=>["(",G.name?t.Parser.decamelize(G.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=s(function(q,ie){let z="",j=ie||", ",U=[].concat(q);return!q||!U.length||U.forEach(V=>{z.length&&(z+=j),z+=JSON.stringify(V)}),z},"stringifiedValues");function M(G,q){let ie=`[${r("default:")} `;if(G===void 0&&!q)return null;if(q)ie+=q;else switch(typeof G){case"string":ie+=`"${G}"`;break;case"object":ie+=JSON.stringify(G);break;default:ie+=G}return`${ie}]`}s(M,"defaultString");function Z(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}s(Z,"windowWidth");let he=null;n.version=G=>{he=G},n.showVersion=G=>{let q=e.getInternalMethods().getLoggerInstance();G||(G="error"),(typeof G=="function"?G:q[G])(he)},n.reset=s(function(q){return o=null,c=!1,u=[],f=!1,g=[],m=[],h=[],p=U5(p,ie=>!q[ie]),n},"reset");let ee=[];return n.freeze=s(function(){ee.push({failMessage:o,failureOutput:c,usages:u,usageDisabled:f,epilogs:g,examples:m,commands:h,descriptions:p})},"freeze"),n.unfreeze=s(function(q=!1){let ie=ee.pop();ie&&(q?(p={...ie.descriptions,...p},h=[...ie.commands,...h],u=[...ie.usages,...u],m=[...ie.examples,...m],g=[...ie.epilogs,...g]):{failMessage:o,failureOutput:c,usages:u,usageDisabled:f,epilogs:g,examples:m,commands:h,descriptions:p}=ie)},"unfreeze"),n}s(jEe,"usage");function tre(e){return typeof e=="object"}s(tre,"isIndentedText");function ddt(e,t){return tre(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}s(ddt,"addIndentation");function HEe(e){return tre(e)?e.indentation:0}s(HEe,"getIndentation");function QQ(e){return tre(e)?e.text:e}s(QQ,"getText");d();d();var VEe=`###-begin-{{app_name}}-completions-###
#
# yargs command completion script
#
# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
#
_{{app_name}}_yargs_completions()
{
local cur_word args type_list
cur_word="\${COMP_WORDS[COMP_CWORD]}"
args=("\${COMP_WORDS[@]}")
# ask yargs to generate completions.
type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
# if no match was found, fall back to filename completion
if [ \${#COMPREPLY[@]} -eq 0 ]; then
COMPREPLY=()
fi
return 0
}
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
###-end-{{app_name}}-completions-###
`,$Ee=`#compdef {{app_name}}
###-begin-{{app_name}}-completions-###
#
# yargs command completion script
#
# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
#
_{{app_name}}_yargs_completions()
{
local reply
local si=$IFS
IFS=$'
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
IFS=$si
_describe 'values' reply
}
compdef _{{app_name}}_yargs_completions {{app_name}}
###-end-{{app_name}}-completions-###
`;var rre=class{static{s(this,"Completion")}constructor(t,r,n,i){var o,a,l;this.yargs=t,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(l=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((a=this.shim.getEnv("ZSH_NAME"))===null||a===void 0?void 0:a.includes("zsh")))!==null&&l!==void 0?l:!1}defaultCompletion(t,r,n,i){let o=this.command.getCommandHandlers();for(let l=0,c=t.length;l<c;++l)if(o[t[l]]&&o[t[l]].builder){let u=o[t[l]].builder;if(MQ(u)){this.indexAfterLastReset=l+1;let f=this.yargs.getInternalMethods().reset();return u(f,!0),f.argv}}let a=[];this.commandCompletions(a,t,n),this.optionCompletions(a,t,r,n),this.choicesFromOptionsCompletions(a,t,r,n),this.choicesFromPositionalsCompletions(a,t,r,n),i(null,a)}commandCompletions(t,r,n){let i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{let a=O5(o[0]).cmd;if(r.indexOf(a)===-1)if(!this.zshShell)t.push(a);else{let l=o[1]||"";t.push(a.replace(/:/g,"\\:")+":"+l)}})}optionCompletions(t,r,n,i){if((i.match(/^-/)||i===""&&t.length===0)&&!this.previousArgHasChoices(r)){let o=this.yargs.getOptions(),a=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(l=>{let c=!!o.configuration["boolean-negation"]&&o.boolean.includes(l);!a.includes(l)&&!o.hiddenOptions.includes(l)&&!this.argsContainKey(r,l,c)&&this.completeOptionKey(l,t,i,c&&!!o.default[l])})}}choicesFromOptionsCompletions(t,r,n,i){if(this.previousArgHasChoices(r)){let o=this.getPreviousArgChoices(r);o&&o.length>0&&t.push(...o.map(a=>a.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(t,r,n,i){if(i===""&&t.length>0&&this.previousArgHasChoices(r))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],a=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),l=o[n._.length-a-1];if(!l)return;let c=this.yargs.getOptions().choices[l]||[];for(let u of c)u.startsWith(i)&&t.push(u.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let r=t[t.length-1],n="";if(!r.startsWith("-")&&t.length>1&&(n=r,r=t[t.length-2]),!r.startsWith("-"))return;let i=r.replace(/^-+/,""),o=this.yargs.getOptions(),a=[i,...this.yargs.getAliases()[i]||[]],l;for(let c of a)if(Object.prototype.hasOwnProperty.call(o.key,c)&&Array.isArray(o.choices[c])){l=o.choices[c];break}if(l)return l.filter(c=>!n||c.startsWith(n))}previousArgHasChoices(t){let r=this.getPreviousArgChoices(t);return r!==void 0&&r.length>0}argsContainKey(t,r,n){let i=s(o=>t.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1,"argsContains");if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(let o of this.aliases[r])if(i(o))return!0}return!1}completeOptionKey(t,r,n,i){var o,a,l,c;let u=t;if(this.zshShell){let p=this.usage.getDescriptions(),g=(a=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[t])===null||a===void 0?void 0:a.find(b=>{let E=p[b];return typeof E=="string"&&E.length>0}),y=g?p[g]:void 0,x=(c=(l=p[t])!==null&&l!==void 0?l:y)!==null&&c!==void 0?c:"";u=`${t.replace(/:/g,"\\:")}:${x.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let f=s(p=>/^--/.test(p),"startsByTwoDashes"),m=s(p=>/^[^0-9]$/.test(p),"isShortOption"),h=!f(n)&&m(t)?"-":"--";r.push(h+u),i&&r.push(h+"no-"+u)}customCompletion(t,r,n,i){if(x0(this.customCompletionFunction,null,this.shim),hdt(this.customCompletionFunction)){let o=this.customCompletionFunction(n,r);return As(o)?o.then(a=>{this.shim.process.nextTick(()=>{i(null,a)})}).catch(a=>{this.shim.process.nextTick(()=>{i(a,void 0)})}):i(null,o)}else return pdt(this.customCompletionFunction)?this.customCompletionFunction(n,r,(o=i)=>this.defaultCompletion(t,r,n,o),o=>{i(null,o)}):this.customCompletionFunction(n,r,o=>{i(null,o)})}getCompletion(t,r){let n=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),o=this.customCompletionFunction?a=>this.customCompletion(t,a,n,r):a=>this.defaultCompletion(t,a,n,r);return As(i)?i.then(o):o(i)}generateCompletionScript(t,r){let n=this.zshShell?$Ee:VEe,i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),n=n.replace(/{{app_name}}/g,i),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}};function zEe(e,t,r,n){return new rre(e,t,r,n)}s(zEe,"completion");function hdt(e){return e.length<3}s(hdt,"isSyncCompletionFunction");function pdt(e){return e.length>3}s(pdt,"isFallbackCompletionFunction");d();d();function YEe(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let i;for(i=0;i<=e.length;i++)r[0][i]=i;for(n=1;n<=t.length;n++)for(i=1;i<=e.length;i++)t.charAt(n-1)===e.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&t.charAt(n-2)===e.charAt(i-1)&&t.charAt(n-1)===e.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[t.length][e.length]}s(YEe,"levenshtein");var KEe=["$0","--","_"];function JEe(e,t,r){let n=r.y18n.__,i=r.y18n.__n,o={};o.nonOptionCount=s(function(m){let h=e.getDemandedCommands(),g=m._.length+(m["--"]?m["--"].length:0)-e.getInternalMethods().getContext().commands.length;h._&&(g<h._.min||g>h._.max)&&(g<h._.min?h._.minMsg!==void 0?t.fail(h._.minMsg?h._.minMsg.replace(/\$0/g,g.toString()).replace(/\$1/,h._.min.toString()):null):t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",g,g.toString(),h._.min.toString())):g>h._.max&&(h._.maxMsg!==void 0?t.fail(h._.maxMsg?h._.maxMsg.replace(/\$0/g,g.toString()).replace(/\$1/,h._.max.toString()):null):t.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",g,g.toString(),h._.max.toString()))))},"nonOptionCount"),o.positionalCount=s(function(m,h){h<m&&t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",h,h+"",m+""))},"positionalCount"),o.requiredArguments=s(function(m,h){let p=null;for(let g of Object.keys(h))(!Object.prototype.hasOwnProperty.call(m,g)||typeof m[g]>"u")&&(p=p||{},p[g]=h[g]);if(p){let g=[];for(let x of Object.keys(p)){let b=p[x];b&&g.indexOf(b)<0&&g.push(b)}let y=g.length?`
${g.join(`
`)}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(p).length,Object.keys(p).join(", ")+y))}},"requiredArguments"),o.unknownArguments=s(function(m,h,p,g,y=!0){var x;let b=e.getInternalMethods().getCommandInstance().getCommands(),E=[],_=e.getInternalMethods().getContext();if(Object.keys(m).forEach(k=>{!KEe.includes(k)&&!Object.prototype.hasOwnProperty.call(p,k)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),k)&&!o.isValidAndSomeAliasIsNotNew(k,h)&&E.push(k)}),y&&(_.commands.length>0||b.length>0||g)&&m._.slice(_.commands.length).forEach(k=>{b.includes(""+k)||E.push(""+k)}),y){let B=((x=e.getDemandedCommands()._)===null||x===void 0?void 0:x.max)||0,N=_.commands.length+B;N<m._.length&&m._.slice(N).forEach(M=>{M=String(M),!_.commands.includes(M)&&!E.includes(M)&&E.push(M)})}E.length&&t.fail(i("Unknown argument: %s","Unknown arguments: %s",E.length,E.map(k=>k.trim()?k:`"${k}"`).join(", ")))},"unknownArguments"),o.unknownCommands=s(function(m){let h=e.getInternalMethods().getCommandInstance().getCommands(),p=[],g=e.getInternalMethods().getContext();return(g.commands.length>0||h.length>0)&&m._.slice(g.commands.length).forEach(y=>{h.includes(""+y)||p.push(""+y)}),p.length>0?(t.fail(i("Unknown command: %s","Unknown commands: %s",p.length,p.join(", "))),!0):!1},"unknownCommands"),o.isValidAndSomeAliasIsNotNew=s(function(m,h){if(!Object.prototype.hasOwnProperty.call(h,m))return!1;let p=e.parsed.newAliases;return[m,...h[m]].some(g=>!Object.prototype.hasOwnProperty.call(p,g)||!p[m])},"isValidAndSomeAliasIsNotNew"),o.limitedChoices=s(function(m){let h=e.getOptions(),p={};if(!Object.keys(h.choices).length)return;Object.keys(m).forEach(x=>{KEe.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(h.choices,x)&&[].concat(m[x]).forEach(b=>{h.choices[x].indexOf(b)===-1&&b!==void 0&&(p[x]=(p[x]||[]).concat(b))})});let g=Object.keys(p);if(!g.length)return;let y=n("Invalid values:");g.forEach(x=>{y+=`
${n("Argument: %s, Given: %s, Choices: %s",x,t.stringifiedValues(p[x]),t.stringifiedValues(h.choices[x]))}`}),t.fail(y)},"limitedChoices");let a={};o.implies=s(function(m,h){Fr("<string|object> [array|number|string]",[m,h],arguments.length),typeof m=="object"?Object.keys(m).forEach(p=>{o.implies(p,m[p])}):(e.global(m),a[m]||(a[m]=[]),Array.isArray(h)?h.forEach(p=>o.implies(m,p)):(x0(h,void 0,r),a[m].push(h)))},"implies"),o.getImplied=s(function(){return a},"getImplied");function l(f,m){let h=Number(m);return m=isNaN(h)?m:h,typeof m=="number"?m=f._.length>=m:m.match(/^--no-.+/)?(m=m.match(/^--no-(.+)/)[1],m=!Object.prototype.hasOwnProperty.call(f,m)):m=Object.prototype.hasOwnProperty.call(f,m),m}s(l,"keyExists"),o.implications=s(function(m){let h=[];if(Object.keys(a).forEach(p=>{let g=p;(a[p]||[]).forEach(y=>{let x=g,b=y;x=l(m,x),y=l(m,y),x&&!y&&h.push(` ${g} -> ${b}`)})}),h.length){let p=`${n("Implications failed:")}
`;h.forEach(g=>{p+=g}),t.fail(p)}},"implications");let c={};o.conflicts=s(function(m,h){Fr("<string|object> [array|string]",[m,h],arguments.length),typeof m=="object"?Object.keys(m).forEach(p=>{o.conflicts(p,m[p])}):(e.global(m),c[m]||(c[m]=[]),Array.isArray(h)?h.forEach(p=>o.conflicts(m,p)):c[m].push(h))},"conflicts"),o.getConflicting=()=>c,o.conflicting=s(function(m){Object.keys(m).forEach(h=>{c[h]&&c[h].forEach(p=>{p&&m[h]!==void 0&&m[p]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",h,p))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(h=>{c[h].forEach(p=>{p&&m[r.Parser.camelCase(h)]!==void 0&&m[r.Parser.camelCase(p)]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",h,p))})})},"conflictingFn"),o.recommendCommands=s(function(m,h){h=h.sort((x,b)=>b.length-x.length);let g=null,y=1/0;for(let x=0,b;(b=h[x])!==void 0;x++){let E=YEe(m,b);E<=3&&E<y&&(y=E,g=b)}g&&t.fail(n("Did you mean %s?",g))},"recommendCommands"),o.reset=s(function(m){return a=U5(a,h=>!m[h]),c=U5(c,h=>!m[h]),o},"reset");let u=[];return o.freeze=s(function(){u.push({implied:a,conflicting:c})},"freeze"),o.unfreeze=s(function(){let m=u.pop();x0(m,void 0,r),{implied:a,conflicting:c}=m},"unfreeze"),o}s(JEe,"validation");d();var nre=[],mS;function OQ(e,t,r,n){mS=n;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return i;let o=/\.json|\..*rc$/.test(e.extends),a=null;if(o)a=Adt(t,e.extends);else try{a=require.resolve(e.extends)}catch{return e}gdt(a),nre.push(a),i=o?JSON.parse(mS.readFileSync(a,"utf8")):require(e.extends),delete e.extends,i=OQ(i,mS.path.dirname(a),r,mS)}return nre=[],r?XEe(i,e):Object.assign({},i,e)}s(OQ,"applyExtends");function gdt(e){if(nre.indexOf(e)>-1)throw new gs(`Circular extended configurations: '${e}'.`)}s(gdt,"checkForCircularExtends");function Adt(e,t){return mS.path.resolve(e,t)}s(Adt,"getPathToDefaultConfig");function XEe(e,t){let r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}s(n,"isObject"),Object.assign(r,e);for(let i of Object.keys(t))n(t[i])&&n(r[i])?r[i]=XEe(e[i],t[i]):r[i]=t[i];return r}s(XEe,"mergeDeep");var Qr=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},pe=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Ta,bv,hS,Ud,mf,UQ,W5,Ev,qQ,qd,WQ,Wd,cg,hf,Gd,GQ,N8,kl,Yr,HQ,jQ,pf,Iv,L8,Tv,G5,VQ,Qn,wv,_v,Sv,$n,$Q,ug,oa;function y4e(e){return(t=[],r=e.process.cwd(),n)=>{let i=new hre(t,r,n,e);return Object.defineProperty(i,"argv",{get:s(()=>i.parse(),"get"),enumerable:!0}),i.help(),i.version(),i}}s(y4e,"YargsFactory");var ZEe=Symbol("copyDoubleDash"),e4e=Symbol("copyDoubleDash"),ire=Symbol("deleteFromParserHintObject"),t4e=Symbol("emitWarning"),r4e=Symbol("freeze"),n4e=Symbol("getDollarZero"),Rv=Symbol("getParserConfiguration"),i4e=Symbol("getUsageConfiguration"),ore=Symbol("guessLocale"),o4e=Symbol("guessVersion"),s4e=Symbol("parsePositionalNumbers"),sre=Symbol("pkgUp"),H5=Symbol("populateParserHintArray"),F8=Symbol("populateParserHintSingleValueDictionary"),are=Symbol("populateParserHintArrayDictionary"),lre=Symbol("populateParserHintDictionary"),cre=Symbol("sanitizeKey"),ure=Symbol("setKey"),fre=Symbol("unfreeze"),a4e=Symbol("validateAsync"),l4e=Symbol("getCommandInstance"),c4e=Symbol("getContext"),u4e=Symbol("getHasOutput"),f4e=Symbol("getLoggerInstance"),d4e=Symbol("getParseContext"),m4e=Symbol("getUsageInstance"),h4e=Symbol("getValidationInstance"),zQ=Symbol("hasParseCallback"),p4e=Symbol("isGlobalContext"),kv=Symbol("postProcess"),g4e=Symbol("rebase"),dre=Symbol("reset"),pS=Symbol("runYargsParserAndExecuteCommands"),mre=Symbol("runValidation"),A4e=Symbol("setHasOutput"),Bv=Symbol("kTrackManuallySetKeys"),hre=class{static{s(this,"YargsInstance")}constructor(t=[],r,n,i){this.customScriptName=!1,this.parsed=!1,Ta.set(this,void 0),bv.set(this,void 0),hS.set(this,{commands:[],fullCommands:[]}),Ud.set(this,null),mf.set(this,null),UQ.set(this,"show-hidden"),W5.set(this,null),Ev.set(this,!0),qQ.set(this,{}),qd.set(this,!0),WQ.set(this,[]),Wd.set(this,void 0),cg.set(this,{}),hf.set(this,!1),Gd.set(this,null),GQ.set(this,!0),N8.set(this,void 0),kl.set(this,""),Yr.set(this,void 0),HQ.set(this,void 0),jQ.set(this,{}),pf.set(this,null),Iv.set(this,null),L8.set(this,{}),Tv.set(this,{}),G5.set(this,void 0),VQ.set(this,!1),Qn.set(this,void 0),wv.set(this,!1),_v.set(this,!1),Sv.set(this,!1),$n.set(this,void 0),$Q.set(this,{}),ug.set(this,null),oa.set(this,void 0),Qr(this,Qn,i,"f"),Qr(this,G5,t,"f"),Qr(this,bv,r,"f"),Qr(this,HQ,n,"f"),Qr(this,Wd,new FQ(this),"f"),this.$0=this[n4e](),this[dre](),Qr(this,Ta,pe(this,Ta,"f"),"f"),Qr(this,$n,pe(this,$n,"f"),"f"),Qr(this,oa,pe(this,oa,"f"),"f"),Qr(this,Yr,pe(this,Yr,"f"),"f"),pe(this,Yr,"f").showHiddenOpt=pe(this,UQ,"f"),Qr(this,N8,this[e4e](),"f")}addHelpOpt(t,r){let n="help";return Fr("[string|boolean] [string]",[t,r],arguments.length),pe(this,Gd,"f")&&(this[ire](pe(this,Gd,"f")),Qr(this,Gd,null,"f")),t===!1&&r===void 0?this:(Qr(this,Gd,typeof t=="string"?t:n,"f"),this.boolean(pe(this,Gd,"f")),this.describe(pe(this,Gd,"f"),r||pe(this,$n,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if(Fr("[string|boolean] [string]",[t,r],arguments.length),t===!1&&r===void 0)return this;let n=typeof t=="string"?t:pe(this,UQ,"f");return this.boolean(n),this.describe(n,r||pe(this,$n,"f").deferY18nLookup("Show hidden options")),pe(this,Yr,"f").showHiddenOpt=n,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return Fr("<object|string|array> [string|array]",[t,r],arguments.length),this[are](this.alias.bind(this),"alias",t,r),this}array(t){return Fr("<array|string>",[t],arguments.length),this[H5]("array",t),this[Bv](t),this}boolean(t){return Fr("<array|string>",[t],arguments.length),this[H5]("boolean",t),this[Bv](t),this}check(t,r){return Fr("<function> [boolean]",[t,r],arguments.length),this.middleware((n,i)=>vv(()=>t(n,i.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&pe(this,$n,"f").fail(o.toString(),o):pe(this,$n,"f").fail(pe(this,Qn,"f").y18n.__("Argument check failed: %s",t.toString())),n),o=>(pe(this,$n,"f").fail(o.message?o.message:o.toString(),o),n)),!1,r),this}choices(t,r){return Fr("<object|string|array> [string|array]",[t,r],arguments.length),this[are](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if(Fr("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new gs("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new gs("coerce callback must be provided");return pe(this,Yr,"f").key[t]=!0,pe(this,Wd,"f").addCoerceMiddleware((n,i)=>{let o;return Object.prototype.hasOwnProperty.call(n,t)?vv(()=>(o=i.getAliases(),r(n[t])),l=>{n[t]=l;let c=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[t]&&c!==!0)for(let u of o[t])n[u]=l;return n},l=>{throw new gs(l.message)}):n},t),this}conflicts(t,r){return Fr("<string|object> [string|array]",[t,r],arguments.length),pe(this,oa,"f").conflicts(t,r),this}config(t="config",r,n){return Fr("[object|string] [string|function] [function]",[t,r,n],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=OQ(t,pe(this,bv,"f"),this[Rv]()["deep-merge-config"]||!1,pe(this,Qn,"f")),pe(this,Yr,"f").configObjects=(pe(this,Yr,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(t,r||pe(this,$n,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(i=>{pe(this,Yr,"f").config[i]=n||!0}),this)}completion(t,r,n){return Fr("[string] [string|boolean|function] [function]",[t,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),Qr(this,mf,t||pe(this,mf,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(pe(this,mf,"f"),r),n&&pe(this,Ud,"f").registerFunction(n),this}command(t,r,n,i,o,a){return Fr("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,n,i,o,a],arguments.length),pe(this,Ta,"f").addHandler(t,r,n,i,o,a),this}commands(t,r,n,i,o,a){return this.command(t,r,n,i,o,a)}commandDir(t,r){Fr("<string> [object]",[t,r],arguments.length);let n=pe(this,HQ,"f")||pe(this,Qn,"f").require;return pe(this,Ta,"f").addDirectory(t,n,pe(this,Qn,"f").getCallerFile(),r),this}count(t){return Fr("<array|string>",[t],arguments.length),this[H5]("count",t),this[Bv](t),this}default(t,r,n){return Fr("<object|string|array> [*] [string]",[t,r,n],arguments.length),n&&(Xte(t,pe(this,Qn,"f")),pe(this,Yr,"f").defaultDescription[t]=n),typeof r=="function"&&(Xte(t,pe(this,Qn,"f")),pe(this,Yr,"f").defaultDescription[t]||(pe(this,Yr,"f").defaultDescription[t]=pe(this,$n,"f").functionDescription(r)),r=r.call()),this[F8](this.default.bind(this),"default",t,r),this}defaults(t,r,n){return this.default(t,r,n)}demandCommand(t=1,r,n,i){return Fr("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),pe(this,Yr,"f").demandedCommands._={min:t,max:r,minMsg:n,maxMsg:i},this}demand(t,r,n){return Array.isArray(r)?(r.forEach(i=>{x0(n,!0,pe(this,Qn,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof t=="number"?(x0(n,!0,pe(this,Qn,"f")),this.demandCommand(t,r,n,n)):Array.isArray(t)?t.forEach(i=>{x0(n,!0,pe(this,Qn,"f")),this.demandOption(i,n)}):typeof n=="string"?this.demandOption(t,n):(n===!0||typeof n>"u")&&this.demandOption(t),this}demandOption(t,r){return Fr("<object|string|array> [string]",[t,r],arguments.length),this[F8](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return Fr("<string> [string|boolean]",[t,r],arguments.length),pe(this,Yr,"f").deprecatedOptions[t]=r,this}describe(t,r){return Fr("<object|string|array> [string]",[t,r],arguments.length),this[ure](t,!0),pe(this,$n,"f").describe(t,r),this}detectLocale(t){return Fr("<boolean>",[t],arguments.length),Qr(this,Ev,t,"f"),this}env(t){return Fr("[string|boolean]",[t],arguments.length),t===!1?delete pe(this,Yr,"f").envPrefix:pe(this,Yr,"f").envPrefix=t||"",this}epilogue(t){return Fr("<string>",[t],arguments.length),pe(this,$n,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return Fr("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(n=>this.example(...n)):pe(this,$n,"f").example(t,r),this}exit(t,r){Qr(this,hf,!0,"f"),Qr(this,W5,r,"f"),pe(this,qd,"f")&&pe(this,Qn,"f").process.exit(t)}exitProcess(t=!0){return Fr("[boolean]",[t],arguments.length),Qr(this,qd,t,"f"),this}fail(t){if(Fr("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new gs("Invalid first argument. Expected function or boolean 'false'");return pe(this,$n,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return Fr("<array> [function]",[t,r],arguments.length),r?pe(this,Ud,"f").getCompletion(t,r):new Promise((n,i)=>{pe(this,Ud,"f").getCompletion(t,(o,a)=>{o?i(o):n(a)})})}getDemandedOptions(){return Fr([],0),pe(this,Yr,"f").demandedOptions}getDemandedCommands(){return Fr([],0),pe(this,Yr,"f").demandedCommands}getDeprecatedOptions(){return Fr([],0),pe(this,Yr,"f").deprecatedOptions}getDetectLocale(){return pe(this,Ev,"f")}getExitProcess(){return pe(this,qd,"f")}getGroups(){return Object.assign({},pe(this,cg,"f"),pe(this,Tv,"f"))}getHelp(){if(Qr(this,hf,!0,"f"),!pe(this,$n,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[pS](pe(this,G5,"f"),void 0,void 0,0,!0);if(As(r))return r.then(()=>pe(this,$n,"f").help())}let t=pe(this,Ta,"f").runDefaultBuilderOn(this);if(As(t))return t.then(()=>pe(this,$n,"f").help())}return Promise.resolve(pe(this,$n,"f").help())}getOptions(){return pe(this,Yr,"f")}getStrict(){return pe(this,wv,"f")}getStrictCommands(){return pe(this,_v,"f")}getStrictOptions(){return pe(this,Sv,"f")}global(t,r){return Fr("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==!1?pe(this,Yr,"f").local=pe(this,Yr,"f").local.filter(n=>t.indexOf(n)===-1):t.forEach(n=>{pe(this,Yr,"f").local.includes(n)||pe(this,Yr,"f").local.push(n)}),this}group(t,r){Fr("<string|array> <string>",[t,r],arguments.length);let n=pe(this,Tv,"f")[r]||pe(this,cg,"f")[r];pe(this,Tv,"f")[r]&&delete pe(this,Tv,"f")[r];let i={};return pe(this,cg,"f")[r]=(n||[]).concat(t).filter(o=>i[o]?!1:i[o]=!0),this}hide(t){return Fr("<string>",[t],arguments.length),pe(this,Yr,"f").hiddenOptions.push(t),this}implies(t,r){return Fr("<string|object> [number|string|array]",[t,r],arguments.length),pe(this,oa,"f").implies(t,r),this}locale(t){return Fr("[string]",[t],arguments.length),t===void 0?(this[ore](),pe(this,Qn,"f").y18n.getLocale()):(Qr(this,Ev,!1,"f"),pe(this,Qn,"f").y18n.setLocale(t),this)}middleware(t,r,n){return pe(this,Wd,"f").addMiddleware(t,!!r,n)}nargs(t,r){return Fr("<string|object|array> [number]",[t,r],arguments.length),this[F8](this.nargs.bind(this),"narg",t,r),this}normalize(t){return Fr("<array|string>",[t],arguments.length),this[H5]("normalize",t),this}number(t){return Fr("<array|string>",[t],arguments.length),this[H5]("number",t),this[Bv](t),this}option(t,r){if(Fr("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof r!="object"&&(r={}),this[Bv](t),pe(this,ug,"f")&&(t==="version"||r?.alias==="version")&&this[t4e](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
`),void 0,"versionWarning"),pe(this,Yr,"f").key[t]=!0,r.alias&&this.alias(t,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(t,n);let i=r.demand||r.required||r.require;i&&this.demand(t,i),r.demandOption&&this.demandOption(t,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(t,r.conflicts),"default"in r&&this.default(t,r.default),r.implies!==void 0&&this.implies(t,r.implies),r.nargs!==void 0&&this.nargs(t,r.nargs),r.config&&this.config(t,r.configParser),r.normalize&&this.normalize(t),r.choices&&this.choices(t,r.choices),r.coerce&&this.coerce(t,r.coerce),r.group&&this.group(t,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(t),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(t),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(t),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(t),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(t),typeof r.global=="boolean"&&this.global(t,r.global),r.defaultDescription&&(pe(this,Yr,"f").defaultDescription[t]=r.defaultDescription),r.skipValidation&&this.skipValidation(t);let o=r.describe||r.description||r.desc,a=pe(this,$n,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(a,t)||typeof o=="string")&&this.describe(t,o),r.hidden&&this.hide(t),r.requiresArg&&this.requiresArg(t)}return this}options(t,r){return this.option(t,r)}parse(t,r,n){Fr("[string|array] [function|boolean|object] [function]",[t,r,n],arguments.length),this[r4e](),typeof t>"u"&&(t=pe(this,G5,"f")),typeof r=="object"&&(Qr(this,Iv,r,"f"),r=n),typeof r=="function"&&(Qr(this,pf,r,"f"),r=!1),r||Qr(this,G5,t,"f"),pe(this,pf,"f")&&Qr(this,qd,!1,"f");let i=this[pS](t,!!r),o=this.parsed;return pe(this,Ud,"f").setParsed(this.parsed),As(i)?i.then(a=>(pe(this,pf,"f")&&pe(this,pf,"f").call(this,pe(this,W5,"f"),a,pe(this,kl,"f")),a)).catch(a=>{throw pe(this,pf,"f")&&pe(this,pf,"f")(a,this.parsed.argv,pe(this,kl,"f")),a}).finally(()=>{this[fre](),this.parsed=o}):(pe(this,pf,"f")&&pe(this,pf,"f").call(this,pe(this,W5,"f"),i,pe(this,kl,"f")),this[fre](),this.parsed=o,i)}parseAsync(t,r,n){let i=this.parse(t,r,n);return As(i)?i:Promise.resolve(i)}parseSync(t,r,n){let i=this.parse(t,r,n);if(As(i))throw new gs(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(t){return Fr("<object>",[t],arguments.length),Qr(this,jQ,t,"f"),this}pkgConf(t,r){Fr("<string> [string]",[t,r],arguments.length);let n=null,i=this[sre](r||pe(this,bv,"f"));return i[t]&&typeof i[t]=="object"&&(n=OQ(i[t],r||pe(this,bv,"f"),this[Rv]()["deep-merge-config"]||!1,pe(this,Qn,"f")),pe(this,Yr,"f").configObjects=(pe(this,Yr,"f").configObjects||[]).concat(n)),this}positional(t,r){Fr("<string> <object>",[t,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=U5(r,(a,l)=>a==="type"&&!["string","number","boolean"].includes(l)?!1:n.includes(a));let i=pe(this,hS,"f").fullCommands[pe(this,hS,"f").fullCommands.length-1],o=i?pe(this,Ta,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return D8(o).forEach(a=>{let l=o[a];Array.isArray(l)?l.indexOf(t)!==-1&&(r[a]=!0):l[t]&&!(a in r)&&(r[a]=l[t])}),this.group(t,pe(this,$n,"f").getPositionalGroupName()),this.option(t,r)}recommendCommands(t=!0){return Fr("[boolean]",[t],arguments.length),Qr(this,VQ,t,"f"),this}required(t,r,n){return this.demand(t,r,n)}require(t,r,n){return this.demand(t,r,n)}requiresArg(t){return Fr("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&pe(this,Yr,"f").narg[t]?this:(this[F8](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,r){return Fr("[string] [string]",[t,r],arguments.length),t=t||this.$0,pe(this,N8,"f").log(pe(this,Ud,"f").generateCompletionScript(t,r||pe(this,mf,"f")||"completion")),this}showHelp(t){if(Fr("[string|function]",[t],arguments.length),Qr(this,hf,!0,"f"),!pe(this,$n,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[pS](pe(this,G5,"f"),void 0,void 0,0,!0);if(As(n))return n.then(()=>{pe(this,$n,"f").showHelp(t)}),this}let r=pe(this,Ta,"f").runDefaultBuilderOn(this);if(As(r))return r.then(()=>{pe(this,$n,"f").showHelp(t)}),this}return pe(this,$n,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,r){return Fr("[boolean|string] [string]",[t,r],arguments.length),pe(this,$n,"f").showHelpOnFail(t,r),this}showVersion(t){return Fr("[string|function]",[t],arguments.length),pe(this,$n,"f").showVersion(t),this}skipValidation(t){return Fr("<array|string>",[t],arguments.length),this[H5]("skipValidation",t),this}strict(t){return Fr("[boolean]",[t],arguments.length),Qr(this,wv,t!==!1,"f"),this}strictCommands(t){return Fr("[boolean]",[t],arguments.length),Qr(this,_v,t!==!1,"f"),this}strictOptions(t){return Fr("[boolean]",[t],arguments.length),Qr(this,Sv,t!==!1,"f"),this}string(t){return Fr("<array|string>",[t],arguments.length),this[H5]("string",t),this[Bv](t),this}terminalWidth(){return Fr([],0),pe(this,Qn,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return Fr("<object>",[t],arguments.length),Qr(this,Ev,!1,"f"),pe(this,Qn,"f").y18n.updateLocale(t),this}usage(t,r,n,i){if(Fr("<string|null|undefined> [string|boolean] [function|object] [function]",[t,r,n,i],arguments.length),r!==void 0){if(x0(t,null,pe(this,Qn,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,r,n,i);throw new gs(".usage() description must start with $0 if being used as alias for .command()")}else return pe(this,$n,"f").usage(t),this}usageConfiguration(t){return Fr("<object>",[t],arguments.length),Qr(this,$Q,t,"f"),this}version(t,r,n){let i="version";if(Fr("[boolean|string] [string] [string]",[t,r,n],arguments.length),pe(this,ug,"f")&&(this[ire](pe(this,ug,"f")),pe(this,$n,"f").version(void 0),Qr(this,ug,null,"f")),arguments.length===0)n=this[o4e](),t=i;else if(arguments.length===1){if(t===!1)return this;n=t,t=i}else arguments.length===2&&(n=r,r=void 0);return Qr(this,ug,typeof t=="string"?t:i,"f"),r=r||pe(this,$n,"f").deferY18nLookup("Show version number"),pe(this,$n,"f").version(n||void 0),this.boolean(pe(this,ug,"f")),this.describe(pe(this,ug,"f"),r),this}wrap(t){return Fr("<number|null|undefined>",[t],arguments.length),pe(this,$n,"f").wrap(t),this}[(Ta=new WeakMap,bv=new WeakMap,hS=new WeakMap,Ud=new WeakMap,mf=new WeakMap,UQ=new WeakMap,W5=new WeakMap,Ev=new WeakMap,qQ=new WeakMap,qd=new WeakMap,WQ=new WeakMap,Wd=new WeakMap,cg=new WeakMap,hf=new WeakMap,Gd=new WeakMap,GQ=new WeakMap,N8=new WeakMap,kl=new WeakMap,Yr=new WeakMap,HQ=new WeakMap,jQ=new WeakMap,pf=new WeakMap,Iv=new WeakMap,L8=new WeakMap,Tv=new WeakMap,G5=new WeakMap,VQ=new WeakMap,Qn=new WeakMap,wv=new WeakMap,_v=new WeakMap,Sv=new WeakMap,$n=new WeakMap,$Q=new WeakMap,ug=new WeakMap,oa=new WeakMap,ZEe)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch{}return t}[e4e](){return{log:s((...t)=>{this[zQ]()||console.log(...t),Qr(this,hf,!0,"f"),pe(this,kl,"f").length&&Qr(this,kl,pe(this,kl,"f")+`
`,"f"),Qr(this,kl,pe(this,kl,"f")+t.join(" "),"f")},"log"),error:s((...t)=>{this[zQ]()||console.error(...t),Qr(this,hf,!0,"f"),pe(this,kl,"f").length&&Qr(this,kl,pe(this,kl,"f")+`
`,"f"),Qr(this,kl,pe(this,kl,"f")+t.join(" "),"f")},"error")}}[ire](t){D8(pe(this,Yr,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=pe(this,Yr,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete pe(this,$n,"f").getDescriptions()[t]}[t4e](t,r,n){pe(this,qQ,"f")[n]||(pe(this,Qn,"f").process.emitWarning(t,r),pe(this,qQ,"f")[n]=!0)}[r4e](){pe(this,WQ,"f").push({options:pe(this,Yr,"f"),configObjects:pe(this,Yr,"f").configObjects.slice(0),exitProcess:pe(this,qd,"f"),groups:pe(this,cg,"f"),strict:pe(this,wv,"f"),strictCommands:pe(this,_v,"f"),strictOptions:pe(this,Sv,"f"),completionCommand:pe(this,mf,"f"),output:pe(this,kl,"f"),exitError:pe(this,W5,"f"),hasOutput:pe(this,hf,"f"),parsed:this.parsed,parseFn:pe(this,pf,"f"),parseContext:pe(this,Iv,"f")}),pe(this,$n,"f").freeze(),pe(this,oa,"f").freeze(),pe(this,Ta,"f").freeze(),pe(this,Wd,"f").freeze()}[n4e](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(pe(this,Qn,"f").process.argv()[0])?r=pe(this,Qn,"f").process.argv().slice(1,2):r=pe(this,Qn,"f").process.argv().slice(0,1),t=r.map(n=>{let i=this[g4e](pe(this,bv,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),pe(this,Qn,"f").getEnv("_")&&pe(this,Qn,"f").getProcessArgvBin()===pe(this,Qn,"f").getEnv("_")&&(t=pe(this,Qn,"f").getEnv("_").replace(`${pe(this,Qn,"f").path.dirname(pe(this,Qn,"f").process.execPath())}/`,"")),t}[Rv](){return pe(this,jQ,"f")}[i4e](){return pe(this,$Q,"f")}[ore](){if(!pe(this,Ev,"f"))return;let t=pe(this,Qn,"f").getEnv("LC_ALL")||pe(this,Qn,"f").getEnv("LC_MESSAGES")||pe(this,Qn,"f").getEnv("LANG")||pe(this,Qn,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[o4e](){return this[sre]().version||"unknown"}[s4e](t){let r=t["--"]?t["--"]:t._;for(let n=0,i;(i=r[n])!==void 0;n++)pe(this,Qn,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return t}[sre](t){let r=t||"*";if(pe(this,L8,"f")[r])return pe(this,L8,"f")[r];let n={};try{let i=t||pe(this,Qn,"f").mainFilename;!t&&pe(this,Qn,"f").path.extname(i)&&(i=pe(this,Qn,"f").path.dirname(i));let o=pe(this,Qn,"f").findUp(i,(a,l)=>{if(l.includes("package.json"))return"package.json"});x0(o,void 0,pe(this,Qn,"f")),n=JSON.parse(pe(this,Qn,"f").readFileSync(o,"utf8"))}catch{}return pe(this,L8,"f")[r]=n||{},pe(this,L8,"f")[r]}[H5](t,r){r=[].concat(r),r.forEach(n=>{n=this[cre](n),pe(this,Yr,"f")[t].push(n)})}[F8](t,r,n,i){this[lre](t,r,n,i,(o,a,l)=>{pe(this,Yr,"f")[o][a]=l})}[are](t,r,n,i){this[lre](t,r,n,i,(o,a,l)=>{pe(this,Yr,"f")[o][a]=(pe(this,Yr,"f")[o][a]||[]).concat(l)})}[lre](t,r,n,i,o){if(Array.isArray(n))n.forEach(a=>{t(a,i)});else if((a=>typeof a=="object")(n))for(let a of D8(n))t(a,n[a]);else o(r,this[cre](n),i)}[cre](t){return t==="__proto__"?"___proto___":t}[ure](t,r){return this[F8](this[ure].bind(this),"key",t,r),this}[fre](){var t,r,n,i,o,a,l,c,u,f,m,h;let p=pe(this,WQ,"f").pop();x0(p,void 0,pe(this,Qn,"f"));let g;t=this,r=this,n=this,i=this,o=this,a=this,l=this,c=this,u=this,f=this,m=this,h=this,{options:{set value(y){Qr(t,Yr,y,"f")}}.value,configObjects:g,exitProcess:{set value(y){Qr(r,qd,y,"f")}}.value,groups:{set value(y){Qr(n,cg,y,"f")}}.value,output:{set value(y){Qr(i,kl,y,"f")}}.value,exitError:{set value(y){Qr(o,W5,y,"f")}}.value,hasOutput:{set value(y){Qr(a,hf,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){Qr(l,wv,y,"f")}}.value,strictCommands:{set value(y){Qr(c,_v,y,"f")}}.value,strictOptions:{set value(y){Qr(u,Sv,y,"f")}}.value,completionCommand:{set value(y){Qr(f,mf,y,"f")}}.value,parseFn:{set value(y){Qr(m,pf,y,"f")}}.value,parseContext:{set value(y){Qr(h,Iv,y,"f")}}.value}=p,pe(this,Yr,"f").configObjects=g,pe(this,$n,"f").unfreeze(),pe(this,oa,"f").unfreeze(),pe(this,Ta,"f").unfreeze(),pe(this,Wd,"f").unfreeze()}[a4e](t,r){return vv(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[l4e].bind(this),getContext:this[c4e].bind(this),getHasOutput:this[u4e].bind(this),getLoggerInstance:this[f4e].bind(this),getParseContext:this[d4e].bind(this),getParserConfiguration:this[Rv].bind(this),getUsageConfiguration:this[i4e].bind(this),getUsageInstance:this[m4e].bind(this),getValidationInstance:this[h4e].bind(this),hasParseCallback:this[zQ].bind(this),isGlobalContext:this[p4e].bind(this),postProcess:this[kv].bind(this),reset:this[dre].bind(this),runValidation:this[mre].bind(this),runYargsParserAndExecuteCommands:this[pS].bind(this),setHasOutput:this[A4e].bind(this)}}[l4e](){return pe(this,Ta,"f")}[c4e](){return pe(this,hS,"f")}[u4e](){return pe(this,hf,"f")}[f4e](){return pe(this,N8,"f")}[d4e](){return pe(this,Iv,"f")||{}}[m4e](){return pe(this,$n,"f")}[h4e](){return pe(this,oa,"f")}[zQ](){return!!pe(this,pf,"f")}[p4e](){return pe(this,GQ,"f")}[kv](t,r,n,i){return n||As(t)||(r||(t=this[ZEe](t)),(this[Rv]()["parse-positional-numbers"]||this[Rv]()["parse-positional-numbers"]===void 0)&&(t=this[s4e](t)),i&&(t=xv(t,this,pe(this,Wd,"f").getMiddleware(),!1))),t}[dre](t={}){Qr(this,Yr,pe(this,Yr,"f")||{},"f");let r={};r.local=pe(this,Yr,"f").local||[],r.configObjects=pe(this,Yr,"f").configObjects||[];let n={};r.local.forEach(a=>{n[a]=!0,(t[a]||[]).forEach(l=>{n[l]=!0})}),Object.assign(pe(this,Tv,"f"),Object.keys(pe(this,cg,"f")).reduce((a,l)=>{let c=pe(this,cg,"f")[l].filter(u=>!(u in n));return c.length>0&&(a[l]=c),a},{})),Qr(this,cg,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(a=>{r[a]=(pe(this,Yr,"f")[a]||[]).filter(l=>!n[l])}),o.forEach(a=>{r[a]=U5(pe(this,Yr,"f")[a],l=>!n[l])}),r.envPrefix=pe(this,Yr,"f").envPrefix,Qr(this,Yr,r,"f"),Qr(this,$n,pe(this,$n,"f")?pe(this,$n,"f").reset(n):jEe(this,pe(this,Qn,"f")),"f"),Qr(this,oa,pe(this,oa,"f")?pe(this,oa,"f").reset(n):JEe(this,pe(this,$n,"f"),pe(this,Qn,"f")),"f"),Qr(this,Ta,pe(this,Ta,"f")?pe(this,Ta,"f").reset():WEe(pe(this,$n,"f"),pe(this,oa,"f"),pe(this,Wd,"f"),pe(this,Qn,"f")),"f"),pe(this,Ud,"f")||Qr(this,Ud,zEe(this,pe(this,$n,"f"),pe(this,Ta,"f"),pe(this,Qn,"f")),"f"),pe(this,Wd,"f").reset(),Qr(this,mf,null,"f"),Qr(this,kl,"","f"),Qr(this,W5,null,"f"),Qr(this,hf,!1,"f"),this.parsed=!1,this}[g4e](t,r){return pe(this,Qn,"f").path.relative(t,r)}[pS](t,r,n,i=0,o=!1){let a=!!n||o;t=t||pe(this,G5,"f"),pe(this,Yr,"f").__=pe(this,Qn,"f").y18n.__,pe(this,Yr,"f").configuration=this[Rv]();let l=!!pe(this,Yr,"f").configuration["populate--"],c=Object.assign({},pe(this,Yr,"f").configuration,{"populate--":!0}),u=pe(this,Qn,"f").Parser.detailed(t,Object.assign({},pe(this,Yr,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),f=Object.assign(u.argv,pe(this,Iv,"f")),m,h=u.aliases,p=!1,g=!1;Object.keys(f).forEach(y=>{y===pe(this,Gd,"f")&&f[y]?p=!0:y===pe(this,ug,"f")&&f[y]&&(g=!0)}),f.$0=this.$0,this.parsed=u,i===0&&pe(this,$n,"f").clearCachedHelpMessage();try{if(this[ore](),r)return this[kv](f,l,!!n,!1);pe(this,Gd,"f")&&[pe(this,Gd,"f")].concat(h[pe(this,Gd,"f")]||[]).filter(_=>_.length>1).includes(""+f._[f._.length-1])&&(f._.pop(),p=!0),Qr(this,GQ,!1,"f");let y=pe(this,Ta,"f").getCommands(),x=pe(this,Ud,"f").completionKey in f,b=p||x||o;if(f._.length){if(y.length){let E;for(let _=i||0,k;f._[_]!==void 0;_++)if(k=String(f._[_]),y.includes(k)&&k!==pe(this,mf,"f")){let B=pe(this,Ta,"f").runCommand(k,this,u,_+1,o,p||g||o);return this[kv](B,l,!!n,!1)}else if(!E&&k!==pe(this,mf,"f")){E=k;break}!pe(this,Ta,"f").hasDefaultCommand()&&pe(this,VQ,"f")&&E&&!b&&pe(this,oa,"f").recommendCommands(E,y)}pe(this,mf,"f")&&f._.includes(pe(this,mf,"f"))&&!x&&(pe(this,qd,"f")&&q5(!0),this.showCompletionScript(),this.exit(0))}if(pe(this,Ta,"f").hasDefaultCommand()&&!b){let E=pe(this,Ta,"f").runCommand(null,this,u,0,o,p||g||o);return this[kv](E,l,!!n,!1)}if(x){pe(this,qd,"f")&&q5(!0),t=[].concat(t);let E=t.slice(t.indexOf(`--${pe(this,Ud,"f").completionKey}`)+1);return pe(this,Ud,"f").getCompletion(E,(_,k)=>{if(_)throw new gs(_.message);(k||[]).forEach(B=>{pe(this,N8,"f").log(B)}),this.exit(0)}),this[kv](f,!l,!!n,!1)}if(pe(this,hf,"f")||(p?(pe(this,qd,"f")&&q5(!0),a=!0,this.showHelp("log"),this.exit(0)):g&&(pe(this,qd,"f")&&q5(!0),a=!0,pe(this,$n,"f").showVersion("log"),this.exit(0))),!a&&pe(this,Yr,"f").skipValidation.length>0&&(a=Object.keys(f).some(E=>pe(this,Yr,"f").skipValidation.indexOf(E)>=0&&f[E]===!0)),!a){if(u.error)throw new gs(u.error.message);if(!x){let E=this[mre](h,{},u.error);n||(m=xv(f,this,pe(this,Wd,"f").getMiddleware(),!0)),m=this[a4e](E,m??f),As(m)&&!n&&(m=m.then(()=>xv(f,this,pe(this,Wd,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof gs)pe(this,$n,"f").fail(y.message,y);else throw y}return this[kv](m??f,l,!!n,!0)}[mre](t,r,n,i){let o={...this.getDemandedOptions()};return a=>{if(n)throw new gs(n.message);pe(this,oa,"f").nonOptionCount(a),pe(this,oa,"f").requiredArguments(a,o);let l=!1;pe(this,_v,"f")&&(l=pe(this,oa,"f").unknownCommands(a)),pe(this,wv,"f")&&!l?pe(this,oa,"f").unknownArguments(a,t,r,!!i):pe(this,Sv,"f")&&pe(this,oa,"f").unknownArguments(a,t,{},!1,!1),pe(this,oa,"f").limitedChoices(a),pe(this,oa,"f").implications(a),pe(this,oa,"f").conflicting(a)}}[A4e](){Qr(this,hf,!0,"f")}[Bv](t){if(typeof t=="string")pe(this,Yr,"f").key[t]=!0;else for(let r of t)pe(this,Yr,"f").key[r]=!0}};function GEe(e){return!!e&&typeof e.getInternalMethods=="function"}s(GEe,"isYargsInstance");var ydt=y4e(MEe),C4e=ydt;d();d();var gS="apps",pre="hosts",AS=class{constructor(t,r){this.ctx=t;this.persistenceManager=r}static{s(this,"AuthPersistence")}#e;setAuthAuthority(t){this.#e=t}async getAuthRecord({githubAppId:t}={}){let r=this.getAuthAuthority(),n=await this.persistenceManager.read(gS,this.authRecordKey(this.ctx,r,t));return!t&&!n?(t=this.ctx.get(Ia).fallbackAppId(),n=await this.persistenceManager.read(gS,this.authRecordKey(this.ctx,r,t))):t??=this.ctx.get(Ia).findAppIdToAuthenticate(),n?{...n,oauth_token:n.access_token||n.oauth_token,user:n.login||n.user,githubAppId:t}:await this.legacyAuthRecordMaybe(r)}async legacyAuthRecordMaybe(t){let r=await this.persistenceManager.read(pre,t);if(r){let n=this.ctx.get(Ia).fallbackAppId();return{...r,githubAppId:n}}}async saveAuthRecord(t,r=this.getAuthAuthority()){await this.persistenceManager.update(gS,this.authRecordKey(this.ctx,r,t.githubAppId),t)}async deleteAuthRecord(){let t=this.getAuthAuthority(),r=await this.getAuthRecord();if(r){let n=this.ctx.get(Ia).fallbackAppId();r.githubAppId===n&&await this.persistenceManager.delete(pre,t),await this.persistenceManager.delete(gS,this.authRecordKey(this.ctx,t)),await this.persistenceManager.delete(gS,this.authRecordKey(this.ctx,t,n))}}async purgeLegacyAuthRecords(){await this.persistenceManager.deleteSetting(pre)}authRecordKey(t,r,n){let i=n??t.get(Ia).findAppIdToAuthenticate();return`${r}:${i}`}getAuthAuthority(){return this.#e??"github.com"}};d();d();var YQ={AuthNotifyShown:"auth.auth_notify_shown",AuthNotifyDismissed:"auth.auth_notify_dismissed",NewGitHubLogin:"auth.new_github_login",GitHubLoginSuccess:"auth.github_login_success"};function x4e(e,t){let r=dn.createAndMarkAsIssued({authSource:t});return jt(e,YQ.AuthNotifyShown,r)}s(x4e,"telemetryAuthNotifyShown");function v4e(e){return jt(e,YQ.AuthNotifyDismissed)}s(v4e,"telemetryAuthNotifyDismissed");function KQ(e,t,r){let n=dn.createAndMarkAsIssued({authSource:t,authType:r});return jt(e,YQ.NewGitHubLogin,n)}s(KQ,"telemetryNewGitHubLogin");function JQ(e,t){let r=dn.createAndMarkAsIssued({authType:t});return jt(e,YQ.GitHubLoginSuccess,r)}s(JQ,"telemetryGitHubLoginSuccess");var gre=class extends as{static{s(this,"DeviceFlowError")}constructor(t){super(t.error_description),this.code=t.error,this.uri=t.error_uri,this.name="DeviceFlowError"}};async function Cdt(e,t,{serverUrl:r}){let n={method:"POST",headers:{Accept:"application/json",...Vu(e)},json:{client_id:t},timeout:3e4},i,o=new URL("login/device/code",r).href;try{i=await e.get(fn).fetch(o,n)}catch(a){throw a instanceof Error&&H7(a)?new as(`Could not log in with device flow on ${r}: ${a.message}`):a}if(!i.ok)throw new as(`Could not log in with device flow on ${r}: HTTP ${i.status}`);return await i.json()}s(Cdt,"requestDeviceFlowStage1");async function xdt(e,t,r,{serverUrl:n}){let i={method:"POST",headers:{Accept:"application/json",...Vu(e)},json:{client_id:r,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4},o=await e.get(fn).fetch(new URL("login/oauth/access_token",n).href,i),a=await o.json();if(a.access_token||a.error==="authorization_pending"||a.error==="slow_down")return a;throw a.error&&a.error_description?new gre(a):new as(`Unexpected ${o.status} response from device flow: ${JSON.stringify(a)}`)}s(xdt,"requestDeviceFlowStage2");async function vdt(e,t){JQ(e,"deviceFlow");let n=await(await uh(e,t,"user",{headers:{Accept:"application/json"}})).json();if("errors"in n)throw new as(`Error retrieving user information: ${String(n.errors)}`);return n}s(vdt,"requestUserInfo");var Dv=class{static{s(this,"GitHubDeviceFlow")}async getToken(t,r,n){try{return await this.getTokenUnguarded(t,r,n)}catch(i){throw t.get(ou).notifyUser(t,i),i}}async getTokenUnguarded(t,r,n){KQ(t,"unknown","deviceFlow");let i=await Cdt(t,r,n),o=(async()=>{let a=i.expires_in,l,c=i.interval;for(;a>0;){await new Promise(f=>setTimeout(f,1e3*c));let u=await xdt(t,i.device_code,r,n);if(a-=c,l=u.access_token,l){let f=await vdt(t,{...n,accessToken:l});return{...n,githubAppId:r,login:f.login,accessToken:l}}c=u.interval??c}throw new as("Timed out waiting for login to complete")})();return{...i,waitForAuth:o}}};d();var gf=class{static{s(this,"CitationManager")}},XQ=class extends gf{static{s(this,"NoOpCitationManager")}async handleIPCodeCitation(t,r){}};d();d();d();var bdt={didChangeFeatureFlags:!1,fetch:!1,ipCodeCitation:!1,redirectedTelemetry:!1,related:!1,token:!1,watchedFiles:!1},Go=class{constructor(){this.capabilities={...bdt}}static{s(this,"CopilotCapabilitiesProvider")}setCapabilities(t){let r;for(r in t){let n=t[r];n!==void 0&&(this.capabilities[r]=n)}}getCapabilities(){return this.capabilities}};d();var yS=class extends Error{constructor(r){super(`No instance of ${r.name} has been registered`);this.ctor=r;this.name="UnregisteredContextError",this.code=r.name}static{s(this,"UnregisteredContextError")}},M8=class{constructor(){this.instances=new Map}static{s(this,"Context")}get(t){let r=this.tryGet(t);if(r)return r;throw new yS(t)}tryGet(t){let r=this.instances.get(t);if(r)return r}set(t,r){if(this.tryGet(t))throw new Error(`An instance of ${t.name} has already been registered. Use forceSet() if you're sure it's a good idea.`);this.assertIsInstance(t,r),this.instances.set(t,r)}forceSet(t,r){this.assertIsInstance(t,r),this.instances.set(t,r)}assertIsInstance(t,r){if(!(r instanceof t)){let n=JSON.stringify(r);throw new Error(`The instance you're trying to register for ${t.name} is not an instance of it (${n}).`)}}};d();d();d();var ZQ=class e{static{s(this,"FullTextDocument")}constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(e.isIncremental(n)){let i=I4e(n.range),o=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,o)+n.text+this._content.substring(a,this._content.length);let l=Math.max(i.start.line,0),c=Math.max(i.end.line,0),u=this._lineOffsets,f=b4e(n.text,!1,o);if(c-l===f.length)for(let h=0,p=f.length;h<p;h++)u[h+l+1]=f[h];else f.length<1e4?u.splice(l+1,c-l,...f):this._lineOffsets=u=u.slice(0,l+1).concat(f,u.slice(c+1));let m=n.text.length-(a-o);if(m!==0)for(let h=l+1+f.length,p=u.length;h<p;h++)u[h]=u[h]+m}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=b4e(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:t};for(;n<i;){let a=Math.floor((n+i)/2);r[a]>t?i=a:n=a+1}let o=n-1;return t=this.ensureBeforeEOL(t,r[o]),{line:o,character:t-r[o]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let i=t.line+1<r.length?r[t.line+1]:this._content.length,o=Math.min(n+t.character,i);return this.ensureBeforeEOL(o,n)}ensureBeforeEOL(t,r){for(;t>r&&E4e(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},j5;(function(e){function t(i,o,a,l){return new ZQ(i,o,a,l)}s(t,"create"),e.create=t;function r(i,o,a){if(i instanceof ZQ)return i.update(o,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),e.update=r;function n(i,o){let a=i.getText(),l=Are(o.map(Edt),(f,m)=>{let h=f.range.start.line-m.range.start.line;return h===0?f.range.start.character-m.range.start.character:h}),c=0,u=[];for(let f of l){let m=i.offsetAt(f.range.start);if(m<c)throw new Error("Overlapping edit");m>c&&u.push(a.substring(c,m)),f.newText.length&&u.push(f.newText),c=i.offsetAt(f.range.end)}return u.push(a.substr(c)),u.join("")}s(n,"applyEdits"),e.applyEdits=n})(j5||(j5={}));function Are(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Are(n,t),Are(i,t);let o=0,a=0,l=0;for(;o<n.length&&a<i.length;)t(n[o],i[a])<=0?e[l++]=n[o++]:e[l++]=i[a++];for(;o<n.length;)e[l++]=n[o++];for(;a<i.length;)e[l++]=i[a++];return e}s(Are,"mergeSort");function b4e(e,t,r=0){let n=t?[r]:[];for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);E4e(o)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}s(b4e,"computeLineOffsets");function E4e(e){return e===13||e===10}s(E4e,"isEOL");function I4e(e){let t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}s(I4e,"getWellformedRange");function Edt(e){let t=I4e(e.range);return t!==e.range?{newText:e.newText,range:t}:e}s(Edt,"getWellformedEdit");d();var T4e;(function(e){function t(r){return typeof r=="string"}s(t,"is"),e.is=t})(T4e||(T4e={}));var yre;(function(e){function t(r){return typeof r=="string"}s(t,"is"),e.is=t})(yre||(yre={}));var w4e;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}s(t,"is"),e.is=t})(w4e||(w4e={}));var eO;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}s(t,"is"),e.is=t})(eO||(eO={}));var Gc;(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=eO.MAX_VALUE),i===Number.MAX_VALUE&&(i=eO.MAX_VALUE),{line:n,character:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Ke.uinteger(i.line)&&Ke.uinteger(i.character)}s(r,"is"),e.is=r})(Gc||(Gc={}));var Zo;(function(e){function t(n,i,o,a){if(Ke.uinteger(n)&&Ke.uinteger(i)&&Ke.uinteger(o)&&Ke.uinteger(a))return{start:Gc.create(n,i),end:Gc.create(o,a)};if(Gc.is(n)&&Gc.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${o}, ${a}]`)}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Gc.is(i.start)&&Gc.is(i.end)}s(r,"is"),e.is=r})(Zo||(Zo={}));var tO;(function(e){function t(n,i){return{uri:n,range:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Zo.is(i.range)&&(Ke.string(i.uri)||Ke.undefined(i.uri))}s(r,"is"),e.is=r})(tO||(tO={}));var _4e;(function(e){function t(n,i,o,a){return{targetUri:n,targetRange:i,targetSelectionRange:o,originSelectionRange:a}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Zo.is(i.targetRange)&&Ke.string(i.targetUri)&&Zo.is(i.targetSelectionRange)&&(Zo.is(i.originSelectionRange)||Ke.undefined(i.originSelectionRange))}s(r,"is"),e.is=r})(_4e||(_4e={}));var Cre;(function(e){function t(n,i,o,a){return{red:n,green:i,blue:o,alpha:a}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Ke.numberRange(i.red,0,1)&&Ke.numberRange(i.green,0,1)&&Ke.numberRange(i.blue,0,1)&&Ke.numberRange(i.alpha,0,1)}s(r,"is"),e.is=r})(Cre||(Cre={}));var S4e;(function(e){function t(n,i){return{range:n,color:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Zo.is(i.range)&&Cre.is(i.color)}s(r,"is"),e.is=r})(S4e||(S4e={}));var R4e;(function(e){function t(n,i,o){return{label:n,textEdit:i,additionalTextEdits:o}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Ke.string(i.label)&&(Ke.undefined(i.textEdit)||O8.is(i))&&(Ke.undefined(i.additionalTextEdits)||Ke.typedArray(i.additionalTextEdits,O8.is))}s(r,"is"),e.is=r})(R4e||(R4e={}));var k4e;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(k4e||(k4e={}));var B4e;(function(e){function t(n,i,o,a,l,c){let u={startLine:n,endLine:i};return Ke.defined(o)&&(u.startCharacter=o),Ke.defined(a)&&(u.endCharacter=a),Ke.defined(l)&&(u.kind=l),Ke.defined(c)&&(u.collapsedText=c),u}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Ke.uinteger(i.startLine)&&Ke.uinteger(i.startLine)&&(Ke.undefined(i.startCharacter)||Ke.uinteger(i.startCharacter))&&(Ke.undefined(i.endCharacter)||Ke.uinteger(i.endCharacter))&&(Ke.undefined(i.kind)||Ke.string(i.kind))}s(r,"is"),e.is=r})(B4e||(B4e={}));var xre;(function(e){function t(n,i){return{location:n,message:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&tO.is(i.location)&&Ke.string(i.message)}s(r,"is"),e.is=r})(xre||(xre={}));var D4e;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(D4e||(D4e={}));var P4e;(function(e){e.Unnecessary=1,e.Deprecated=2})(P4e||(P4e={}));var N4e;(function(e){function t(r){let n=r;return Ke.objectLiteral(n)&&Ke.string(n.href)}s(t,"is"),e.is=t})(N4e||(N4e={}));var rO;(function(e){function t(n,i,o,a,l,c){let u={range:n,message:i};return Ke.defined(o)&&(u.severity=o),Ke.defined(a)&&(u.code=a),Ke.defined(l)&&(u.source=l),Ke.defined(c)&&(u.relatedInformation=c),u}s(t,"create"),e.create=t;function r(n){var i;let o=n;return Ke.defined(o)&&Zo.is(o.range)&&Ke.string(o.message)&&(Ke.number(o.severity)||Ke.undefined(o.severity))&&(Ke.integer(o.code)||Ke.string(o.code)||Ke.undefined(o.code))&&(Ke.undefined(o.codeDescription)||Ke.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(Ke.string(o.source)||Ke.undefined(o.source))&&(Ke.undefined(o.relatedInformation)||Ke.typedArray(o.relatedInformation,xre.is))}s(r,"is"),e.is=r})(rO||(rO={}));var Q8;(function(e){function t(n,i,...o){let a={title:n,command:i};return Ke.defined(o)&&o.length>0&&(a.arguments=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.string(i.title)&&Ke.string(i.command)}s(r,"is"),e.is=r})(Q8||(Q8={}));var O8;(function(e){function t(o,a){return{range:o,newText:a}}s(t,"replace"),e.replace=t;function r(o,a){return{range:{start:o,end:o},newText:a}}s(r,"insert"),e.insert=r;function n(o){return{range:o,newText:""}}s(n,"del"),e.del=n;function i(o){let a=o;return Ke.objectLiteral(a)&&Ke.string(a.newText)&&Zo.is(a.range)}s(i,"is"),e.is=i})(O8||(O8={}));var vre;(function(e){function t(n,i,o){let a={label:n};return i!==void 0&&(a.needsConfirmation=i),o!==void 0&&(a.description=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Ke.string(i.label)&&(Ke.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Ke.string(i.description)||i.description===void 0)}s(r,"is"),e.is=r})(vre||(vre={}));var U8;(function(e){function t(r){let n=r;return Ke.string(n)}s(t,"is"),e.is=t})(U8||(U8={}));var L4e;(function(e){function t(o,a,l){return{range:o,newText:a,annotationId:l}}s(t,"replace"),e.replace=t;function r(o,a,l){return{range:{start:o,end:o},newText:a,annotationId:l}}s(r,"insert"),e.insert=r;function n(o,a){return{range:o,newText:"",annotationId:a}}s(n,"del"),e.del=n;function i(o){let a=o;return O8.is(a)&&(vre.is(a.annotationId)||U8.is(a.annotationId))}s(i,"is"),e.is=i})(L4e||(L4e={}));var bre;(function(e){function t(n,i){return{textDocument:n,edits:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&_re.is(i.textDocument)&&Array.isArray(i.edits)}s(r,"is"),e.is=r})(bre||(bre={}));var Ere;(function(e){function t(n,i,o){let a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),o!==void 0&&(a.annotationId=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&Ke.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Ke.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ke.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||U8.is(i.annotationId))}s(r,"is"),e.is=r})(Ere||(Ere={}));var Ire;(function(e){function t(n,i,o,a){let l={kind:"rename",oldUri:n,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(l.options=o),a!==void 0&&(l.annotationId=a),l}s(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&Ke.string(i.oldUri)&&Ke.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Ke.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ke.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||U8.is(i.annotationId))}s(r,"is"),e.is=r})(Ire||(Ire={}));var Tre;(function(e){function t(n,i,o){let a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),o!==void 0&&(a.annotationId=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&Ke.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Ke.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Ke.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||U8.is(i.annotationId))}s(r,"is"),e.is=r})(Tre||(Tre={}));var wre;(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>Ke.string(i.kind)?Ere.is(i)||Ire.is(i)||Tre.is(i):bre.is(i)))}s(t,"is"),e.is=t})(wre||(wre={}));var F4e;(function(e){function t(n){return{uri:n}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.string(i.uri)}s(r,"is"),e.is=r})(F4e||(F4e={}));var M4e;(function(e){function t(n,i){return{uri:n,version:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.string(i.uri)&&Ke.integer(i.version)}s(r,"is"),e.is=r})(M4e||(M4e={}));var _re;(function(e){function t(n,i){return{uri:n,version:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.string(i.uri)&&(i.version===null||Ke.integer(i.version))}s(r,"is"),e.is=r})(_re||(_re={}));var Q4e;(function(e){function t(n,i,o,a){return{uri:n,languageId:i,version:o,text:a}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.string(i.uri)&&Ke.string(i.languageId)&&Ke.integer(i.version)&&Ke.string(i.text)}s(r,"is"),e.is=r})(Q4e||(Q4e={}));var Sre;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}s(t,"is"),e.is=t})(Sre||(Sre={}));var CS;(function(e){function t(r){let n=r;return Ke.objectLiteral(r)&&Sre.is(n.kind)&&Ke.string(n.value)}s(t,"is"),e.is=t})(CS||(CS={}));var O4e;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(O4e||(O4e={}));var U4e;(function(e){e.PlainText=1,e.Snippet=2})(U4e||(U4e={}));var q4e;(function(e){e.Deprecated=1})(q4e||(q4e={}));var W4e;(function(e){function t(n,i,o){return{newText:n,insert:i,replace:o}}s(t,"create"),e.create=t;function r(n){let i=n;return i&&Ke.string(i.newText)&&Zo.is(i.insert)&&Zo.is(i.replace)}s(r,"is"),e.is=r})(W4e||(W4e={}));var G4e;(function(e){e.asIs=1,e.adjustIndentation=2})(G4e||(G4e={}));var H4e;(function(e){function t(r){let n=r;return n&&(Ke.string(n.detail)||n.detail===void 0)&&(Ke.string(n.description)||n.description===void 0)}s(t,"is"),e.is=t})(H4e||(H4e={}));var j4e;(function(e){function t(r){return{label:r}}s(t,"create"),e.create=t})(j4e||(j4e={}));var V4e;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}s(t,"create"),e.create=t})(V4e||(V4e={}));var nO;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(t,"fromPlainText"),e.fromPlainText=t;function r(n){let i=n;return Ke.string(i)||Ke.objectLiteral(i)&&Ke.string(i.language)&&Ke.string(i.value)}s(r,"is"),e.is=r})(nO||(nO={}));var $4e;(function(e){function t(r){let n=r;return!!n&&Ke.objectLiteral(n)&&(CS.is(n.contents)||nO.is(n.contents)||Ke.typedArray(n.contents,nO.is))&&(r.range===void 0||Zo.is(r.range))}s(t,"is"),e.is=t})($4e||($4e={}));var z4e;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}s(t,"create"),e.create=t})(z4e||(z4e={}));var Y4e;(function(e){function t(r,n,...i){let o={label:r};return Ke.defined(n)&&(o.documentation=n),Ke.defined(i)?o.parameters=i:o.parameters=[],o}s(t,"create"),e.create=t})(Y4e||(Y4e={}));var K4e;(function(e){e.Text=1,e.Read=2,e.Write=3})(K4e||(K4e={}));var J4e;(function(e){function t(r,n){let i={range:r};return Ke.number(n)&&(i.kind=n),i}s(t,"create"),e.create=t})(J4e||(J4e={}));var X4e;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(X4e||(X4e={}));var Z4e;(function(e){e.Deprecated=1})(Z4e||(Z4e={}));var eIe;(function(e){function t(r,n,i,o,a){let l={name:r,kind:n,location:{uri:o,range:i}};return a&&(l.containerName=a),l}s(t,"create"),e.create=t})(eIe||(eIe={}));var tIe;(function(e){function t(r,n,i,o){return o!==void 0?{name:r,kind:n,location:{uri:i,range:o}}:{name:r,kind:n,location:{uri:i}}}s(t,"create"),e.create=t})(tIe||(tIe={}));var rIe;(function(e){function t(n,i,o,a,l,c){let u={name:n,detail:i,kind:o,range:a,selectionRange:l};return c!==void 0&&(u.children=c),u}s(t,"create"),e.create=t;function r(n){let i=n;return i&&Ke.string(i.name)&&Ke.number(i.kind)&&Zo.is(i.range)&&Zo.is(i.selectionRange)&&(i.detail===void 0||Ke.string(i.detail))&&(i.deprecated===void 0||Ke.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}s(r,"is"),e.is=r})(rIe||(rIe={}));var nIe;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(nIe||(nIe={}));var iO;(function(e){e.Invoked=1,e.Automatic=2})(iO||(iO={}));var iIe;(function(e){function t(n,i,o){let a={diagnostics:n};return i!=null&&(a.only=i),o!=null&&(a.triggerKind=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.typedArray(i.diagnostics,rO.is)&&(i.only===void 0||Ke.typedArray(i.only,Ke.string))&&(i.triggerKind===void 0||i.triggerKind===iO.Invoked||i.triggerKind===iO.Automatic)}s(r,"is"),e.is=r})(iIe||(iIe={}));var oIe;(function(e){function t(n,i,o){let a={title:n},l=!0;return typeof i=="string"?(l=!1,a.kind=i):Q8.is(i)?a.command=i:a.edit=i,l&&o!==void 0&&(a.kind=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return i&&Ke.string(i.title)&&(i.diagnostics===void 0||Ke.typedArray(i.diagnostics,rO.is))&&(i.kind===void 0||Ke.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Q8.is(i.command))&&(i.isPreferred===void 0||Ke.boolean(i.isPreferred))&&(i.edit===void 0||wre.is(i.edit))}s(r,"is"),e.is=r})(oIe||(oIe={}));var sIe;(function(e){function t(n,i){let o={range:n};return Ke.defined(i)&&(o.data=i),o}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Zo.is(i.range)&&(Ke.undefined(i.command)||Q8.is(i.command))}s(r,"is"),e.is=r})(sIe||(sIe={}));var aIe;(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Ke.uinteger(i.tabSize)&&Ke.boolean(i.insertSpaces)}s(r,"is"),e.is=r})(aIe||(aIe={}));var lIe;(function(e){function t(n,i,o){return{range:n,target:i,data:o}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Zo.is(i.range)&&(Ke.undefined(i.target)||Ke.string(i.target))}s(r,"is"),e.is=r})(lIe||(lIe={}));var cIe;(function(e){function t(n,i){return{range:n,parent:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Zo.is(i.range)&&(i.parent===void 0||e.is(i.parent))}s(r,"is"),e.is=r})(cIe||(cIe={}));var uIe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(uIe||(uIe={}));var fIe;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(fIe||(fIe={}));var dIe;(function(e){function t(r){let n=r;return Ke.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}s(t,"is"),e.is=t})(dIe||(dIe={}));var mIe;(function(e){function t(n,i){return{range:n,text:i}}s(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&Zo.is(i.range)&&Ke.string(i.text)}s(r,"is"),e.is=r})(mIe||(mIe={}));var hIe;(function(e){function t(n,i,o){return{range:n,variableName:i,caseSensitiveLookup:o}}s(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&Zo.is(i.range)&&Ke.boolean(i.caseSensitiveLookup)&&(Ke.string(i.variableName)||i.variableName===void 0)}s(r,"is"),e.is=r})(hIe||(hIe={}));var pIe;(function(e){function t(n,i){return{range:n,expression:i}}s(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&Zo.is(i.range)&&(Ke.string(i.expression)||i.expression===void 0)}s(r,"is"),e.is=r})(pIe||(pIe={}));var gIe;(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.defined(i)&&Zo.is(n.stoppedLocation)}s(r,"is"),e.is=r})(gIe||(gIe={}));var Rre;(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}s(t,"is"),e.is=t})(Rre||(Rre={}));var kre;(function(e){function t(n){return{value:n}}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&(i.tooltip===void 0||Ke.string(i.tooltip)||CS.is(i.tooltip))&&(i.location===void 0||tO.is(i.location))&&(i.command===void 0||Q8.is(i.command))}s(r,"is"),e.is=r})(kre||(kre={}));var AIe;(function(e){function t(n,i,o){let a={position:n,label:i};return o!==void 0&&(a.kind=o),a}s(t,"create"),e.create=t;function r(n){let i=n;return Ke.objectLiteral(i)&&Gc.is(i.position)&&(Ke.string(i.label)||Ke.typedArray(i.label,kre.is))&&(i.kind===void 0||Rre.is(i.kind))&&i.textEdits===void 0||Ke.typedArray(i.textEdits,O8.is)&&(i.tooltip===void 0||Ke.string(i.tooltip)||CS.is(i.tooltip))&&(i.paddingLeft===void 0||Ke.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Ke.boolean(i.paddingRight))}s(r,"is"),e.is=r})(AIe||(AIe={}));var yIe;(function(e){function t(r){return{kind:"snippet",value:r}}s(t,"createSnippet"),e.createSnippet=t})(yIe||(yIe={}));var CIe;(function(e){function t(r,n,i,o){return{insertText:r,filterText:n,range:i,command:o}}s(t,"create"),e.create=t})(CIe||(CIe={}));var xIe;(function(e){function t(r){return{items:r}}s(t,"create"),e.create=t})(xIe||(xIe={}));var vIe;(function(e){e.Invoked=0,e.Automatic=1})(vIe||(vIe={}));var bIe;(function(e){function t(r,n){return{range:r,text:n}}s(t,"create"),e.create=t})(bIe||(bIe={}));var EIe;(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}s(t,"create"),e.create=t})(EIe||(EIe={}));var IIe;(function(e){function t(r){let n=r;return Ke.objectLiteral(n)&&yre.is(n.uri)&&Ke.string(n.name)}s(t,"is"),e.is=t})(IIe||(IIe={}));var TIe;(function(e){function t(o,a,l,c){return new Bre(o,a,l,c)}s(t,"create"),e.create=t;function r(o){let a=o;return!!(Ke.defined(a)&&Ke.string(a.uri)&&(Ke.undefined(a.languageId)||Ke.string(a.languageId))&&Ke.uinteger(a.lineCount)&&Ke.func(a.getText)&&Ke.func(a.positionAt)&&Ke.func(a.offsetAt))}s(r,"is"),e.is=r;function n(o,a){let l=o.getText(),c=i(a,(f,m)=>{let h=f.range.start.line-m.range.start.line;return h===0?f.range.start.character-m.range.start.character:h}),u=l.length;for(let f=c.length-1;f>=0;f--){let m=c[f],h=o.offsetAt(m.range.start),p=o.offsetAt(m.range.end);if(p<=u)l=l.substring(0,h)+m.newText+l.substring(p,l.length);else throw new Error("Overlapping edit");u=h}return l}s(n,"applyEdits"),e.applyEdits=n;function i(o,a){if(o.length<=1)return o;let l=o.length/2|0,c=o.slice(0,l),u=o.slice(l);i(c,a),i(u,a);let f=0,m=0,h=0;for(;f<c.length&&m<u.length;)a(c[f],u[m])<=0?o[h++]=c[f++]:o[h++]=u[m++];for(;f<c.length;)o[h++]=c[f++];for(;m<u.length;)o[h++]=u[m++];return o}s(i,"mergeSort")})(TIe||(TIe={}));var Bre=class{static{s(this,"FullTextDocument")}constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(t.push(i),n=!1);let o=r.charAt(i);n=o==="\r"||o===`
`,o==="\r"&&i+1<r.length&&r.charAt(i+1)===`
`&&i++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return Gc.create(0,t);for(;n<i;){let a=Math.floor((n+i)/2);r[a]>t?i=a:n=a+1}let o=n-1;return Gc.create(o,t-r[o])}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)}get lineCount(){return this.getLineOffsets().length}},Ke;(function(e){let t=Object.prototype.toString;function r(p){return typeof p<"u"}s(r,"defined"),e.defined=r;function n(p){return typeof p>"u"}s(n,"undefined"),e.undefined=n;function i(p){return p===!0||p===!1}s(i,"boolean"),e.boolean=i;function o(p){return t.call(p)==="[object String]"}s(o,"string"),e.string=o;function a(p){return t.call(p)==="[object Number]"}s(a,"number"),e.number=a;function l(p,g,y){return t.call(p)==="[object Number]"&&g<=p&&p<=y}s(l,"numberRange"),e.numberRange=l;function c(p){return t.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}s(c,"integer"),e.integer=c;function u(p){return t.call(p)==="[object Number]"&&0<=p&&p<=2147483647}s(u,"uinteger"),e.uinteger=u;function f(p){return t.call(p)==="[object Function]"}s(f,"func"),e.func=f;function m(p){return p!==null&&typeof p=="object"}s(m,"objectLiteral"),e.objectLiteral=m;function h(p,g){return Array.isArray(p)&&p.every(g)}s(h,"typedArray"),e.typedArray=h})(Ke||(Ke={}));var No=class{static{s(this,"LocationFactory")}static{this.range=Zo.create.bind(Zo)}static{this.position=Gc.create.bind(Gc)}},bA=class e{constructor(t,r,n){this.uri=t;this._textDocument=r;this.detectedLanguageId=n}static{s(this,"CopilotTextDocument")}static withChanges(t,r,n){let i=j5.create(t.clientUri,t.clientLanguageId,n,t.getText());return j5.update(i,r,n),new e(t.uri,i,t.detectedLanguageId)}applyEdits(t){let r=j5.create(this.clientUri,this.clientLanguageId,this.version,this.getText());return j5.update(r,t.map(n=>({text:n.newText,range:n.range})),this.version),new e(this.uri,r,this.detectedLanguageId)}static create(t,r,n,i,o=v8({uri:t,languageId:r})){return new e(ac(t),j5.create(t,r,n,i),o)}get clientUri(){return this._textDocument.uri}get clientLanguageId(){return this._textDocument.languageId}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(t){return this._textDocument.getText(t)}positionAt(t){return this._textDocument.positionAt(t)}offsetAt(t){return this._textDocument.offsetAt(t)}lineAt(t){let r=typeof t=="number"?t:t.line;if(r<0||r>=this.lineCount)throw new RangeError("Illegal value for lineNumber");let n=Zo.create(r,0,r+1,0),i=this.getText(n).replace(/\r\n$|\r$|\n$/g,""),o=Zo.create(Gc.create(r,0),Gc.create(r,i.length)),a=i.trim().length===0;return{text:i,range:o,isEmptyOrWhitespace:a}}};d();d();d();d();var xS={isBlocked:!1,reason:"VALID_FILE"},oO={isBlocked:!1,reason:"NO_MATCHING_POLICY"},wIe={isBlocked:!0,reason:"POLICY_ERROR",message:"Copilot is disabled because we could not fetch the repository policy"},Pv={all:"all",repo:"repo"},EA=new Gt("contentExclusion");d();d();var sO=class{static{s(this,"PolicyEvaluator")}};d();d();d();var _Ie=new Gt("repository"),Nv=class e{constructor(){this.data={}}static{s(this,"GitConfigData")}getKeys(){return Object.keys(this.data)}getEntries(){return Object.entries(this.data)}get(t){let r=this.getAll(t);return r?r[r.length-1]:void 0}getAll(t){return this.data[this.normalizeKey(t)]}add(t,r){t in this.data||(this.data[t]=[]),this.data[t].push(r)}getSectionValues(t,r){let n=`${t}.`.toLowerCase(),i=`.${r}`.toLowerCase();return Object.keys(this.data).filter(o=>o.startsWith(n)&&o.endsWith(i)).map(o=>o.slice(n.length,-i.length))}concat(t){return this.getEntries().concat(t.getEntries()).reduce((r,[n,i])=>(i.forEach(o=>r.add(n,o)),r),new e)}normalizeKey(t){let r=t.split(".");return r[0]=r[0].toLowerCase(),r[r.length-1]=r[r.length-1].toLowerCase(),r.join(".")}},vh=class{static{s(this,"GitConfigLoader")}},aO=class extends vh{constructor(r){super();this.loaders=r}static{s(this,"GitFallbackConfigLoader")}async getConfig(r,n){for(let i of this.loaders){let o=await i.getConfig(r,n);if(o)return o}}};d();var SIe=require("os");var lO=class{constructor(t){this.url=t;this.isUrl()?this.parseUrl():this.tryParseSSHString()||(this._scheme="file")}static{s(this,"GitRemoteUrl")}get scheme(){return this._scheme}get authority(){return this._authority}get hostname(){return this._hostname}get path(){return this._path}isInvalid(){return this._error!==void 0}isRemote(){return this.scheme!=="file"&&this.hostname!==void 0}isGitHub(){return this.isRemote()&&/(?:^|\.)(?:github\.com|ghe\.com)$/i.test(this.hostname??"")}isADO(){return this.isRemote()&&/(?:^|\.)(?:visualstudio\.com|azure\.com)$/i.test(this.hostname??"")}getUrlForApi(){if(!this.isRemote())return null;if(this.isUrl()&&!this.isInvalid())return T5.from({scheme:this.scheme,authority:this.authority.replace(/^[^@]+@/,""),path:this.path}).toString();if(this.scheme=="ssh"&&this.isADO()){let t=this.url.indexOf(":");return this.url.substring(0,t+1)+this.path}return this.url}isUrl(){return/[A-Za-z0-9][A-Za-z0-9]+:\/\//.test(this.url)}parseUrl(){let t;try{t=T5.parse(this.url)}catch(r){this._error=r;return}this._scheme=t.scheme,this.setAuthority(t.authority),this.setPath(t.path)}setAuthority(t){this._authority=t;let r=t.replace(/^[^@]+@/,"").replace(/:\d*$/,"");r&&(this._hostname=r)}tryParseSSHString(){let t=/^(?<host>[^:/\\[]*(?:\[[^/\\\]]*\])?):/.exec(this.url);if(t&&((0,SIe.platform)()!=="win32"||(t.groups?.host?.length??0)>1)){let r=t.groups?.host??"";return this._scheme="ssh",this.setAuthority(r),this.setPath(this.url.substring(r.length+1)),!0}return!1}setPath(t){if(this.isADO())try{this._path=decodeURIComponent(t);return}catch{}this._path=t}};var cO=class{static{s(this,"GitRemoteResolver")}async resolveRemote(t,r){let n=await t.get(vh).getConfig(t,r);if(!n)return;let i=this.getRemotes(n),o=i.filter(a=>a.url.isGitHub());if(o.length)return o.find(a=>a.name==="origin")?.url??o[0].url;if(i.length)return i.find(a=>a.name==="origin")?.url??i[0].url}getRemotes(t){let r=this.getInsteadOfRules(t);return t.getSectionValues("remote","url").map(n=>({name:n,url:new lO(this.applyInsteadOfRules(r,t.get(`remote.${n}.url`)??""))})).filter(n=>n.url.isRemote())}applyInsteadOfRules(t,r){for(let n of t)if(r.startsWith(n.insteadOf))return n.base+r.slice(n.insteadOf.length);return r}getInsteadOfRules(t){return t.getSectionValues("url","insteadof").map(r=>({base:r,insteadOf:t.get(`url.${r}.insteadof`)})).sort((r,n)=>n.base.length-r.base.length)}};var Idt=100,Dre=class{constructor(t,r){this.baseFolder=t;this.remote=r;this.setNWO()}static{s(this,"GitRepository")}get tenant(){return this._tenant}get owner(){return this._owner}get name(){return this._name}get adoOrganization(){return this._adoOrganization}isGitHub(){return this.remote?.isGitHub()??!1}isADO(){return this.remote?.isADO()??!1}setNWO(){let t=this.remote?.path?.replace(/^\//,"").split("/");if(this.isGitHub()){this._owner=t?.[0],this._name=t?.[1]?.replace(/\.git$/,"");let r=/^(?<tenant>[^.]+)\.ghe\.com$/.exec(this.remote?.hostname??"");r&&(this._tenant=r.groups?.tenant)}else if(this.isADO()&&t?.length===4){if(this.remote?.scheme==="ssh"){this._adoOrganization=t?.[1],this._owner=t?.[2],this._name=t?.[3];return}let r=/(?:(?<org>[^.]+)\.)?visualstudio\.com$/.exec(this.remote?.hostname??"");r?(this._adoOrganization=r.groups?.org,this._owner=t?.[1],this._name=t?.[3]):(this._adoOrganization=t?.[0],this._owner=t?.[1],this._name=t?.[3])}}},IA=class e{constructor(t){this.ctx=t;this.remoteResolver=new cO;this.cache=new un(Idt)}static{s(this,"RepositoryManager")}async getRepo({uri:t}){let r,n=[];do{if(this.cache.has(t.toString())){let o=this.cache.get(t);return this.updateCache(n,o),o}n.push(t.toString());let i=await this.tryGetRepoForFolder(t);if(i)return this.updateCache(n,i),i;r=t,t=of(t)}while(t!==r);this.updateCache(n,void 0)}updateCache(t,r){t.forEach(n=>this.cache.set(n,r))}async tryGetRepoForFolder(t){return await this.isBaseRepoFolder(t)?new Dre(typeof t=="string"?{uri:t}:t,await this.repoUrl(t)):void 0}async isBaseRepoFolder(t){return await e.getRepoConfigLocation(this.ctx,t)!==void 0}async repoUrl(t){return await this.remoteResolver.resolveRemote(this.ctx,t)}static async getRepoConfigLocation(t,r){try{let n=t.get(xo),i=Bo(r,".git");if((await n.stat(i)).type&1)return await this.getConfigLocationForGitfile(n,r,i);let a=Bo(i,"config");return await n.stat(a),a}catch{return}}static async getConfigLocationForGitfile(t,r,n){let o=(await t.readFileString(n)).match(/^gitdir:\s+(.+)$/m);if(!o)return;let a=nv(r,o[1]),l=Bo(a,"config");if(await this.tryStat(t,l)!==void 0)return l;let c=Bo(a,"config.worktree");if(await this.tryStat(t,c)!==void 0)return c;let u=Bo(a,"commondir");a=nv(a,(await t.readFileString(u)).trimEnd());let f=Bo(a,"config");return await t.stat(f),f}static async tryStat(t,r){try{return await t.stat(r)}catch{return}}};d();var RIe=s((e,t)=>{if(R5.Check(e,t))return t;let r=`Typebox schema validation failed:
${[...R5.Errors(e,t)].map(n=>`${n.path} ${n.message}`).join(`
`)}`;throw new Error(r)},"assertShape");d();d();d();var fO=new WeakMap;function dO(e,t){if(e==null||typeof e!="object")return String(e);let r,n="",i=0,o=Object.prototype.toString.call(e);if(o!=="[object RegExp]"&&o!=="[object Date]"&&fO.has(e))return fO.get(e);switch(fO.set(e,"~"+ ++t),o){case"[object Set]":r=Array.from(e);case"[object Array]":for(r||(r=e),n+="a";i<r.length;n+=dO(r[i++],t));break;case"[object Object]":for(n+="o",r=Object.keys(e).sort();i<r.length;n+=r[i]+dO(e[r[i++]],t));break;case"[object Map]":for(n+="o",r=Array.from(e.keys()).sort();i<r.length;n+=r[i]+dO(e.get(r[i++]),t));break;case"[object Date]":return"d"+ +e;case"[object RegExp]":return"r"+e.source+e.flags;default:throw new Error(`Unsupported value ${e}`)}return fO.set(e,n),n}s(dO,"t");function mO(e){return dO(e,0)}s(mO,"r");var Pre=new WeakMap;function kIe(e,t,r=mO(t)){let n,i,o=Pre.get(e);o||(Pre.set(e,o=[[],i=[],n=[]]),queueMicrotask(function(){let u,f=0;function m(h){for(;u=n[f++];u.r(h));}s(m,"o"),Pre.delete(e),e(i).then(function(h){if(h.length!==n.length)return m(new Error("loader value length mismatch"));for(;u=h[f++],f<=h.length;u instanceof Error?n[f-1].r(u):n[f-1].s(u));},m)}));let a=o[0].indexOf(r);if(~a)return o[2][a].p;let l=o[0].push(r)-1,c=o[2][l]={};return o[1][l]=t,c.p=new Promise(function(u,f){c.s=u,c.r=f})}s(kIe,"n");var BIe=new WeakMap;function Tdt(e,t,r,n=mO(r)){if(t||(t=BIe.get(e)),t||BIe.set(e,t=new Map),t.has(n))return Promise.resolve(t.get(n));let i=kIe(e,r,n);return t.set(n,i),i.catch(()=>t.delete(n)),i}s(Tdt,"n");function DIe(e,t){return function(r,n){return Tdt(e,t,r,n)}}s(DIe,"o");d();var ZIe=Ze(jIe(),1);d();var bS=s(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");d();d();var Pdt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ES=s(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Ndt=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),VIe=s(e=>e.join(""),"rangesToString"),$Ie=s((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,l=!1,c=!1,u=!1,f=r,m="";e:for(;o<e.length;){let y=e.charAt(o);if((y==="!"||y==="^")&&o===r+1){u=!0,o++;continue}if(y==="]"&&a&&!c){f=o+1;break}if(a=!0,y==="\\"&&!c){c=!0,o++;continue}if(y==="["&&!c){for(let[x,[b,E,_]]of Object.entries(Pdt))if(e.startsWith(x,o)){if(m)return["$.",!1,e.length-r,!0];o+=x.length,_?i.push(b):n.push(b),l=l||E;continue e}}if(c=!1,m){y>m?n.push(ES(m)+"-"+ES(y)):y===m&&n.push(ES(y)),m="",o++;continue}if(e.startsWith("-]",o+1)){n.push(ES(y+"-")),o+=2;continue}if(e.startsWith("-",o+1)){m=y,o+=2;continue}n.push(ES(y)),o++}if(f<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let y=n[0].length===2?n[0].slice(-1):n[0];return[Ndt(y),!1,f-r,!1]}let h="["+(u?"^":"")+VIe(n)+"]",p="["+(u?"":"^")+VIe(i)+"]";return[n.length&&i.length?"("+h+"|"+p+")":n.length?h:p,l,f-r,!0]},"parseClass");d();var V5=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var Ldt=new Set(["!","?","+","*","@"]),zIe=s(e=>Ldt.has(e),"isExtglobType"),Fdt="(?!(?:^|/)\\.\\.?(?:$|/))",hO="(?!\\.)",Mdt=new Set(["[","."]),Qdt=new Set(["..","."]),Odt=new Set("().*{}+?[]^$\\!"),Udt=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Fre="[^/]",YIe=Fre+"*?",KIe=Fre+"+?",q8=class e{static{s(this,"AST")}type;#e;#t;#i=!1;#n=[];#r;#o;#s;#a=!1;#l;#c;#f=!1;constructor(t,r,n={}){this.type=t,t&&(this.#t=!0),this.#r=r,this.#e=this.#r?this.#r.#e:this,this.#l=this.#e===this?n:this.#e.#l,this.#s=this.#e===this?[]:this.#e.#s,t==="!"&&!this.#e.#a&&this.#s.push(this),this.#o=this.#r?this.#r.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let t of this.#n)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#c=this.#n.map(t=>String(t)).join("")}#m(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#s.pop();){if(t.type!=="!")continue;let r=t,n=r.#r;for(;n;){for(let i=r.#o+1;!n.type&&i<n.#n.length;i++)for(let o of t.#n){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#n[i])}r=n,n=r.#r}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#r===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){let t=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&this.#r?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#r?.isStart())return!1;if(this.#o===0)return!0;let t=this.#r;for(let r=0;r<this.#o;r++){let n=t.#n[r];if(!(n instanceof e&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#r?.type==="!")return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let t=this.#r?this.#r.#n.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let n of this.#n)r.copyIn(n);return r}static#u(t,r,n,i){let o=!1,a=!1,l=-1,c=!1;if(r.type===null){let p=n,g="";for(;p<t.length;){let y=t.charAt(p++);if(o||y==="\\"){o=!o,g+=y;continue}if(a){p===l+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(p===l+2&&c)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,l=p,c=!1,g+=y;continue}if(!i.noext&&zIe(y)&&t.charAt(p)==="("){r.push(g),g="";let x=new e(y,r);p=e.#u(t,x,p,i),r.push(x);continue}g+=y}return r.push(g),p}let u=n+1,f=new e(null,r),m=[],h="";for(;u<t.length;){let p=t.charAt(u++);if(o||p==="\\"){o=!o,h+=p;continue}if(a){u===l+1?(p==="^"||p==="!")&&(c=!0):p==="]"&&!(u===l+2&&c)&&(a=!1),h+=p;continue}else if(p==="["){a=!0,l=u,c=!1,h+=p;continue}if(zIe(p)&&t.charAt(u)==="("){f.push(h),h="";let g=new e(p,f);f.push(g),u=e.#u(t,g,u,i);continue}if(p==="|"){f.push(h),h="",m.push(f),f=new e(null,r);continue}if(p===")")return h===""&&r.#n.length===0&&(r.#f=!0),f.push(h),h="",r.push(...m,f),u;h+=p}return r.type=null,r.#t=void 0,r.#n=[t.substring(n-1)],u}static fromGlob(t,r={}){let n=new e(null,void 0,r);return e.#u(t,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#t||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let l=(this.#l.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,l),{_src:r,_glob:t})}get options(){return this.#l}toRegExpSource(t){let r=t??!!this.#l.dot;if(this.#e===this&&this.#m(),!this.type){let c=this.isStart()&&this.isEnd(),u=this.#n.map(p=>{let[g,y,x,b]=typeof p=="string"?e.#h(p,this.#t,c):p.toRegExpSource(t);return this.#t=this.#t||x,this.#i=this.#i||b,g}).join(""),f="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&Qdt.has(this.#n[0]))){let g=Mdt,y=r&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),x=!r&&!t&&g.has(u.charAt(0));f=y?Fdt:x?hO:""}let m="";return this.isEnd()&&this.#e.#a&&this.#r?.type==="!"&&(m="(?:$|\\/)"),[f+u+m,V5(u),this.#t=!!this.#t,this.#i]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#d(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#n=[c],this.type=null,this.#t=void 0,[c,V5(this.toString()),!1,!1]}let a=!n||t||r||!hO?"":this.#d(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let l="";if(this.type==="!"&&this.#f)l=(this.isStart()&&!r?hO:"")+KIe;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?hO:"")+YIe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+o+c}return[l,V5(o),this.#t=!!this.#t,this.#i]}#d(t){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(t);return this.#i=this.#i||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#h(t,r,n=!1){let i=!1,o="",a=!1;for(let l=0;l<t.length;l++){let c=t.charAt(l);if(i){i=!1,o+=(Odt.has(c)?"\\":"")+c;continue}if(c==="\\"){l===t.length-1?o+="\\\\":i=!0;continue}if(c==="["){let[u,f,m,h]=$Ie(t,l);if(m){o+=u,a=a||f,l+=m-1,r=r||h;continue}}if(c==="*"){n&&t==="*"?o+=KIe:o+=YIe,r=!0;continue}if(c==="?"){o+=Fre,r=!0;continue}o+=Udt(c)}return[o,V5(t),!!r,a]}};d();var Mre=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var wa=s((e,t,r={})=>(bS(t),!r.nocomment&&t.charAt(0)==="#"?!1:new W8(t,r).match(e)),"minimatch"),qdt=/^\*+([^+@!?\*\[\(]*)$/,Wdt=s(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),Gdt=s(e=>t=>t.endsWith(e),"starDotExtTestDot"),Hdt=s(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),jdt=s(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),Vdt=/^\*+\.\*+$/,$dt=s(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),zdt=s(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),Ydt=/^\.\*+$/,Kdt=s(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),Jdt=/^\*+$/,Xdt=s(e=>e.length!==0&&!e.startsWith("."),"starTest"),Zdt=s(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),emt=/^\?+([^+@!?\*\[\(]*)?$/,tmt=s(([e,t=""])=>{let r=e8e([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),rmt=s(([e,t=""])=>{let r=t8e([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),nmt=s(([e,t=""])=>{let r=t8e([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),imt=s(([e,t=""])=>{let r=e8e([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),e8e=s(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),t8e=s(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),r8e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",JIe={win32:{sep:"\\"},posix:{sep:"/"}},omt=r8e==="win32"?JIe.win32.sep:JIe.posix.sep;wa.sep=omt;var jd=Symbol("globstar **");wa.GLOBSTAR=jd;var smt="[^/]",amt=smt+"*?",lmt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",cmt="(?:(?!(?:\\/|^)\\.).)*?",umt=s((e,t={})=>r=>wa(r,e,t),"filter");wa.filter=umt;var Hd=s((e,t={})=>Object.assign({},e,t),"ext"),fmt=s(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return wa;let t=wa;return Object.assign(s((n,i,o={})=>t(n,i,Hd(e,o)),"m"),{Minimatch:class extends t.Minimatch{static{s(this,"Minimatch")}constructor(i,o={}){super(i,Hd(e,o))}static defaults(i){return t.defaults(Hd(e,i)).Minimatch}},AST:class extends t.AST{static{s(this,"AST")}constructor(i,o,a={}){super(i,o,Hd(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,Hd(e,o))}},unescape:s((n,i={})=>t.unescape(n,Hd(e,i)),"unescape"),escape:s((n,i={})=>t.escape(n,Hd(e,i)),"escape"),filter:s((n,i={})=>t.filter(n,Hd(e,i)),"filter"),defaults:s(n=>t.defaults(Hd(e,n)),"defaults"),makeRe:s((n,i={})=>t.makeRe(n,Hd(e,i)),"makeRe"),braceExpand:s((n,i={})=>t.braceExpand(n,Hd(e,i)),"braceExpand"),match:s((n,i,o={})=>t.match(n,i,Hd(e,o)),"match"),sep:t.sep,GLOBSTAR:jd})},"defaults");wa.defaults=fmt;var n8e=s((e,t={})=>(bS(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,ZIe.default)(e)),"braceExpand");wa.braceExpand=n8e;var dmt=s((e,t={})=>new W8(e,t).makeRe(),"makeRe");wa.makeRe=dmt;var mmt=s((e,t,r={})=>{let n=new W8(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");wa.match=mmt;var XIe=/[?*]|[+@!]\(.*?\)|\[|\]/,hmt=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),W8=class{static{s(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){bS(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||r8e,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=o[0]===""&&o[1]===""&&(o[2]==="?"||!XIe.test(o[2]))&&!XIe.test(o[3]),u=/^[a-z]:/i.test(o[0]);if(c)return[...o.slice(0,4),...o.slice(4).map(f=>this.parse(f))];if(u)return[o[0],...o.slice(1).map(f=>this.parse(f))]}return o.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let l=n[i+1],c=n[i+2],u=n[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let l=n[a];a===1&&l===""&&n[0]===""||(l==="."||l==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...c),n.length===0&&n.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);if(i){t[r]=[],t[n]=i;break}}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,o=0,a=[],l="";for(;i<t.length&&o<r.length;)if(t[i]===r[o])a.push(l==="b"?r[o]:t[i]),i++,o++;else if(n&&t[i]==="**"&&r[o]===t[i+1])a.push(t[i]),i++;else if(n&&r[o]==="**"&&t[i]===r[o+1])a.push(r[o]),o++;else if(t[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,o++}else if(r[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(r[o]),i++,o++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=this.options;if(this.isWindows){let y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),x=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),b=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),E=!b&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),_=x?3:y?0:void 0,k=E?3:b?0:void 0;if(typeof _=="number"&&typeof k=="number"){let[B,N]=[t[_],r[k]];B.toLowerCase()===N.toLowerCase()&&(r[k]=B,k>_?r=r.slice(k):_>k&&(t=t.slice(_)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var a=0,l=0,c=t.length,u=r.length;a<c&&l<u;a++,l++){this.debug("matchOne loop");var f=r[l],m=t[a];if(this.debug(r,f,m),f===!1)return!1;if(f===jd){this.debug("GLOBSTAR",[r,f,m]);var h=a,p=l+1;if(p===u){for(this.debug("** at the end");a<c;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;h<c;){var g=t[h];if(this.debug(`
globstar while`,t,h,r,p,g),this.matchOne(t.slice(h),r.slice(p),n))return this.debug("globstar found match!",h,c,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,h,r,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!!(n&&(this.debug(`
>>> no match, partial?`,t,h,r,p),h===c))}let y;if(typeof f=="string"?(y=m===f,this.debug("string match",f,m,y)):(y=f.test(m),this.debug("pattern match",f,m,y)),!y)return!1}if(a===c&&l===u)return!0;if(a===c)return n;if(l===u)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return n8e(this.pattern,this.options)}parse(t){bS(t);let r=this.options;if(t==="**")return jd;if(t==="")return"";let n,i=null;(n=t.match(Jdt))?i=r.dot?Zdt:Xdt:(n=t.match(qdt))?i=(r.nocase?r.dot?jdt:Hdt:r.dot?Gdt:Wdt)(n[1]):(n=t.match(emt))?i=(r.nocase?r.dot?rmt:tmt:r.dot?nmt:imt)(n):(n=t.match(Vdt))?i=r.dot?zdt:$dt:(n=t.match(Ydt))&&(i=Kdt);let o=q8.fromGlob(t,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?amt:r.dot?lmt:cmt,i=new Set(r.nocase?["i"]:[]),o=t.map(c=>{let u=c.map(f=>{if(f instanceof RegExp)for(let m of f.flags.split(""))i.add(m);return typeof f=="string"?hmt(f):f===jd?jd:f._src});return u.forEach((f,m)=>{let h=u[m+1],p=u[m-1];f!==jd||p===jd||(p===void 0?h!==void 0&&h!==jd?u[m+1]="(?:\\/|"+n+"\\/)?"+h:u[m]=n:h===void 0?u[m-1]=p+"(?:\\/|"+n+")?":h!==jd&&(u[m-1]=p+"(?:\\/|\\/"+n+"\\/)"+h,u[m+1]=jd))}),u.filter(f=>f!==jd).join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+l+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l=0;l<o.length;l++){let c=o[l],u=i;if(n.matchBase&&c.length===1&&(u=[a]),this.matchOne(u,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return wa.defaults(t).Minimatch}};wa.AST=q8;wa.Minimatch=W8;wa.escape=Mre;wa.unescape=V5;var Qre="contentExclusion",pO=class extends sO{static{s(this,"CopilotContentExclusion")}#e;#t=new un(1e4);#i=new un(200);constructor(t){super(),this.#e=t}async evaluate(t,r){try{t=nv(t).toString();let n=await this.getGitRepo({uri:t}),i=await this.#n(n?.url??Pv.all);if(!i)return oO;let o=n?.baseFolder?.uri??"file://",a=this.evaluateFilePathRules(t,o,i);if(a.isBlocked)return a;let l=this.evaluateTextBasedRules(t,i,r);if(l.isBlocked)return l}catch(n){return EA.exception(this.#e,n,`${Qre}.evaluate`),wIe}return xS}evaluateFilePathRules(t,r,n){let i=t;if(this.#t.has(i))return this.#t.get(i);let o=xS,a,l=eee(t.replace(r,""));e:for(let c of n)for(let u of c.paths)if(wa(l,u,{nocase:!0,matchBase:!0,nonegate:!0,dot:!0})){o=Ore(c,"FILE_BLOCKED_PATH"),a=u;break e}return EA.debug(this.#e,`Evaluated path-based exclusion rules for <${t}>`,{result:o,baseUri:r,fileName:l,matchingPattern:a}),this.#t.set(i,o),o}evaluateTextBasedRules(t,r,n){let i=r.filter(l=>l.ifAnyMatch),o=r.filter(l=>l.ifNoneMatch);if(!n||i.length===0&&o.length===0)return xS;let a=this.evaluateFileContent(i,o,n);return EA.debug(this.#e,`Evaluated text-based exclusion rules for <${t}>`,{result:a}),a}evaluateFileContent(t,r,n){for(let i of t)if(i.ifAnyMatch&&i.ifAnyMatch.length>0&&i.ifAnyMatch.map(a=>i8e(a)).some(a=>a.test(n)))return Ore(i,"FILE_BLOCKED_TEXT_BASED");for(let i of r)if(i.ifNoneMatch&&i.ifNoneMatch.length>0&&!i.ifNoneMatch.map(a=>i8e(a)).some(a=>a.test(n)))return Ore(i,"FILE_BLOCKED_TEXT_BASED");return xS}async refresh(){try{let t=[...this.#i.keys()];this.reset(),await Promise.all(t.map(r=>this.#o(r)))}catch(t){Ea(this.#e,t,`${Qre}.refresh`)}}reset(){this.#i.clear(),this.#t.clear()}async#n(t){if(this.#r?.length)return this.#r;let r=await this.#o(t.toLowerCase());if(r.length!==0)return r}#r;setTestingRules(t){this.#r=t}#o=DIe(async t=>{let r=await this.#e.get(en).getGitHubSession();if(!r)throw new as("No token found");let n=r.devOverride?.contentRestrictionsUrl??"copilot_internal/content_exclusion",i=new URL(n,r.apiUrl),o=t.includes(Pv.all);t.filter(u=>u!==Pv.all).length>0&&i.searchParams.set("repos",t.filter(u=>u!==Pv.all).join(",")),i.searchParams.set("scope",o?Pv.all:Pv.repo);let l=await uh(this.#e,r,i.href),c=await l.json();if(!l.ok){if(l.status===404)return Array.from(t,()=>[]);throw this.#s("fetch.error",{message:c.message}),new Mx(l)}return this.#s("fetch.success"),RIe(ymt,c).map(u=>u.rules)},this.#i);async getGitRepo(t){let n=await this.#e.get(IA).getRepo(of(t));if(!n||!n?.remote)return;let i=n.remote.getUrlForApi();if(i)return{baseFolder:n.baseFolder,url:i}}#s(t,r,n){jt(this.#e,`${Qre}.${t}`,dn.createAndMarkAsIssued(r,n))}};function i8e(e){if(!e.startsWith("/")&&!e.endsWith("/"))return new RegExp(e);let t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}s(i8e,"stringToRegex");function Ore(e,t){return{isBlocked:!0,message:`Your ${e.source.type.toLowerCase()} '${e.source.name}' has disabled Copilot for this file`,reason:t}}s(Ore,"fileBlockedEvaluationResult");var pmt=I.Object({name:I.String(),type:I.String()}),gmt=I.Object({paths:I.Array(I.String()),ifNoneMatch:I.Optional(I.Array(I.String())),ifAnyMatch:I.Optional(I.Array(I.String())),source:pmt}),Ure=I.Array(gmt),Amt=I.Object({rules:Ure,last_updated_at:I.String(),scope:I.String()}),ymt=I.Array(Amt);var Hc=class{constructor(t){this.ctx=t;this.#e=!1;this.#t=new pO(this.ctx);this.evaluateResultCache=new Map;this.onDidChangeActiveTextEditor=s(async t=>{if(!this.#e)return;if(!t){this.updateStatusIcon(!1);return}let r=await this.ctx.get(Vr).getTextDocumentValidation(t.document),n=r.status==="invalid",i=r.status==="invalid"?r.reason:void 0;this.updateStatusIcon(n,i)},"onDidChangeActiveTextEditor");this.ctx.get(Vr).onDidFocusTextDocument(this.onDidChangeActiveTextEditor),Ks(this.ctx,r=>{this.#e=r.envelope.copilotignore_enabled??!1,this.evaluateResultCache.clear(),this.#t.refresh()})}static{s(this,"CopilotContentExclusionManager")}#e;#t;get enabled(){return this.#e}async evaluate(t,r,n){let i=Xo(t)!==void 0;if(i||EA.debug(this.ctx,`Unsupported file URI <${t}>`),!this.#e||!i)return{isBlocked:!1};let o=[],a=s(async(u,f)=>{let m=Date.now(),h=await f.evaluate(t,r),p=Date.now();return o.push({key:u,result:h,elapsedMs:p-m}),h},"track"),c=(await Promise.all([a("contentExclusion.evaluate",this.#t)])).find(u=>u?.isBlocked)??{isBlocked:!1};try{for(let u of o)this.#i(u.key,t,u.result,u.elapsedMs)}catch(u){EA.error(this.ctx,"Error tracking telemetry",u)}return n==="UPDATE"&&this.updateStatusIcon(c.isBlocked,c.message),c}updateStatusIcon(t,r){this.#e&&(t?this.ctx.get(Ki).setInactive(r??"Copilot is disabled"):this.ctx.get(Ki).clearInactive())}#i(t,r,n,i){let o=r+t;if(this.evaluateResultCache.get(o)===n.reason)return!1;if(this.evaluateResultCache.set(o,n.reason??"UNKNOWN"),n.reason===oO.reason)return EA.debug(this.ctx,`[${t}] No matching policy for this repository. uri: ${r}`),!1;let l={isBlocked:n.isBlocked?"true":"false",reason:n.reason??"UNKNOWN"},c={elapsedMs:i};return jt(this.ctx,t,dn.createAndMarkAsIssued(l,c)),jt(this.ctx,t,dn.createAndMarkAsIssued({...l,path:r},c),1),EA.debug(this.ctx,`[${t}] ${r}`,n),!0}setTestingRules(t){this.#t.setTestingRules(t)}set __contentExclusions(t){this.#t=t}get __contentExclusions(){return this.#t}};async function Lv(e,t,r){let n=await e.get(Hc).evaluate(t.uri,r);return n.isBlocked?{status:"invalid",reason:n.message??"Document is blocked by repository policy"}:{status:"valid"}}s(Lv,"isDocumentValid");var Vr=class{constructor(t){this.ctx=t}static{s(this,"TextDocumentManager")}async textDocuments(){let t=this.getTextDocumentsUnsafe(),r=[];for(let n of t)(await Lv(this.ctx,n,n.getText())).status==="valid"&&r.push(n);return r}getTextDocumentUnsafe(t){let r=ac(t.uri);return this.getTextDocumentsUnsafe().find(n=>n.uri===r)}async getTextDocument(t){return this.getTextDocumentWithValidation(t).then(r=>{if(r.status==="valid")return r.document})}validateTextDocument(t,r){return Lv(this.ctx,t,r)}async getTextDocumentValidation(t){try{let r=this.getTextDocumentUnsafe(t)?.getText()??await this.readTextDocumentFromDisk(t.uri);return r===void 0?this.notFoundResult(t):this.validateTextDocument(t,r)}catch{return this.notFoundResult(t)}}async getTextDocumentWithValidation(t){let r=this.getTextDocumentUnsafe(t);if(!r)return this.notFoundResult(t);let n=await this.validateTextDocument(t,r.getText());return n.status==="valid"?{status:"valid",document:r}:n}notFoundResult({uri:t}){return{status:"notfound",message:`Document for URI could not be found: ${t}`}}async readTextDocumentFromDisk(t){try{if((await this.ctx.get(xo).stat(t)).size>5*1024*1024)return}catch{return}return await this.ctx.get(xo).readFileString(t)}getWorkspaceFolder(t){let r=ac(t.uri);return this.getWorkspaceFolders().find(n=>r.startsWith(ac(n.uri)))}getRelativePath(t){if(t.uri.startsWith("untitled:"))return;let r=ac(t.uri);for(let n of this.getWorkspaceFolders()){let i=ac(n.uri).replace(/[#?].*/,"").replace(/\/?$/,"/");if(r.startsWith(i))return r.slice(i.length)}return Pi(r)}};function ys(e){switch(e.status){case"valid":return e.document.getText().trim().length===0?"empty":"included";case"invalid":return"blocked";case"notfound":return"notfound"}}s(ys,"statusFromTextDocumentResult");var On=class{constructor(t){this.ctx=t}static{s(this,"FileReader")}getRelativePath(t){return this.ctx.get(Vr).getRelativePath(t)??Pi(t.uri)}getOrReadTextDocument(t){return this.readFile(t.uri)}getOrReadTextDocumentWithFakeClientProperties(t){return this.readFile(t.uri)}async readFile(t){let n=await this.ctx.get(Vr).getTextDocumentWithValidation({uri:t});if(n.status!=="notfound")return n;try{if(await this.getFileSizeMB(t)>1)return{status:"notfound",message:"File too large"};let o=await this.doReadFile(t),a=await Lv(this.ctx,{uri:t},o);return a.status==="valid"?{status:"valid",document:bA.create(t,"UNKNOWN",-1,o)}:a}catch{return{status:"notfound",message:"File not found"}}}async doReadFile(t){return await this.ctx.get(xo).readFileString(t)}async getFileSizeMB(t){return(await this.ctx.get(xo).stat(t)).size/1024/1024}};d();d();var $5=class{constructor(){this.resolve=s(()=>{},"resolve");this.reject=s(()=>{},"reject");this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r})}static{s(this,"Deferred")}};function IS(e,t=void 0){return new Promise(r=>setTimeout(()=>r(t),e))}s(IS,"delay");d();var qre=class{constructor(){this.observers=new Set}static{s(this,"Subject")}subscribe(t){return this.observers.add(t),()=>this.observers.delete(t)}next(t){for(let r of this.observers)r.next(t)}error(t){for(let r of this.observers)r.error?.(t)}complete(){for(let t of this.observers)t.complete?.()}},gO=class extends qre{static{s(this,"ReplaySubject")}subscribe(t){let r=super.subscribe(t);return this._value!==void 0&&t.next(this._value),r}next(t){this._value=t,super.next(t)}};var bh=class{constructor(t){this.ctx=t;this.#e=!1;this.#t=new Gt("AsyncCompletionManager");this.requests=new un(100);this.mostRecentRequestId="";Ks(t,r=>{this.#e=r.hasKnownOrg})}static{s(this,"AsyncCompletionManager")}#e;#t;clear(){this.requests.clear()}isEnabled(t){let r=Vn(this.ctx,Rt.UseAsyncCompletions);return this.#e&&typeof r=="boolean"?r:this.ctx.get(or).enableAsyncCompletions(t)}shouldWaitForAsyncCompletions(t,r){for(let[n,i]of this.requests)if(Wre(t,r,i))return!0;return!1}updateCompletion(t,r){let n=this.requests.get(t);n!==void 0&&(n.partialCompletionText=r,n.subject.next(n))}queueCompletionRequest(t,r,n,i,o){this.#t.debug(this.ctx,`[${t}] Queueing async completion request:`,r.substring(r.lastIndexOf(`
`)+1));let a=new gO;return this.requests.set(t,{state:2,cancellationTokenSource:i,headerRequestId:t,prefix:r,prompt:n,subject:a}),o.then(l=>{if(this.requests.delete(t),l.type!=="success"){this.#t.debug(this.ctx,`[${t}] Request failed with`,l.reason),a.error(l.reason);return}let c={cancellationTokenSource:i,headerRequestId:t,prefix:r,prompt:n,subject:a,choice:l.value[0],result:l,state:0,allChoicesPromise:l.value[1]};this.requests.set(t,c),a.next(c),a.complete()}).catch(l=>{this.#t.error(this.ctx,`[${t}] Request errored with`,l),this.requests.delete(t),a.error(l)})}getFirstMatchingRequestWithTimeout(t,r,n,i,o){let a=this.ctx.get(or).asyncCompletionsTimeout(o);return a<0?(this.#t.debug(this.ctx,`[${t}] Waiting for completions without timeout`),this.getFirstMatchingRequest(t,r,n,i)):(this.#t.debug(this.ctx,`[${t}] Waiting for completions with timeout of ${a}ms`),Promise.race([this.getFirstMatchingRequest(t,r,n,i),new Promise(l=>setTimeout(()=>l(null),a))]).then(l=>{if(l===null){this.#t.debug(this.ctx,`[${t}] Timed out waiting for completion`);return}return l}))}async getFirstMatchingRequest(t,r,n,i){i||(this.mostRecentRequestId=t);let o=!1,a=new $5,l=new Map,c=s(f=>()=>{let m=l.get(f);m!==void 0&&(m(),l.delete(f),!o&&l.size===0&&(o=!0,this.#t.debug(this.ctx,`[${t}] No matching completions found`),a.resolve(void 0)))},"finishRequest"),u=s(f=>{if(Wre(r,n,f)){if(f.state===0){let m=r.substring(f.prefix.length),{completionText:h}=f.choice;if(!h.startsWith(m)||h.length<=m.length){c(f.headerRequestId)();return}h=h.substring(m.length),f.choice.telemetryData.measurements.foundOffset=m.length,this.#t.debug(this.ctx,`[${t}] Found completion at offset ${m.length}: ${JSON.stringify(h)}`),a.resolve([{...f.choice,completionText:h},f.allChoicesPromise]),o=!0}}else this.cancelRequest(t,f),c(f.headerRequestId)()},"next");for(let[f,m]of this.requests)Wre(r,n,m)?l.set(f,m.subject.subscribe({next:u,error:c(f),complete:c(f)})):this.cancelRequest(t,m);return a.promise.finally(()=>{for(let f of l.values())f()})}cancelRequest(t,r){t===this.mostRecentRequestId&&r.state!==0&&(this.#t.debug(this.ctx,`[${t}] Cancelling request: ${r.headerRequestId}`),r.cancellationTokenSource.cancel(),this.requests.delete(r.headerRequestId))}};function Wre(e,t,r){if(r.prompt.suffix!==t.suffix||!e.startsWith(r.prefix))return!1;let n=e.substring(r.prefix.length);return r.state===0?r.choice.completionText.startsWith(n)&&r.choice.completionText.trimEnd().length>n.length:r.partialCompletionText===void 0?!0:r.partialCompletionText.startsWith(n)}s(Wre,"isCandidate");d();d();var wS=class{constructor(t){this.maxSize=t;this.root=new TS;this.leafNodes=new Set}static{s(this,"LRURadixTrie")}set(t,r){let{node:n,remainingKey:i}=this.findClosestNode(t);if(i.length>0){for(let[o,a]of n.children)if(o.startsWith(i)){let l=o.slice(0,i.length),c=new TS;n.removeChild(o),n.addChild(l,c),c.addChild(o.slice(l.length),a),n=c,i=i.slice(l.length);break}if(i.length>0){let o=new TS;n.addChild(i,o),n=o}}n.value=r,this.leafNodes.add(n),this.leafNodes.size>this.maxSize&&this.evictLeastRecentlyUsed()}findAll(t){return this.findClosestNode(t).stack.map(({node:r,remainingKey:n})=>r.value!==void 0?{remainingKey:n,value:r.value}:void 0).filter(r=>r!==void 0)}delete(t){let{node:r,remainingKey:n}=this.findClosestNode(t);n.length>0||this.deleteNode(r)}findClosestNode(t){let r=!0,n=this.root,i=[{node:n,remainingKey:t}];for(;t.length>0&&r;){r=!1;for(let[o,a]of n.children)if(t.startsWith(o)){t=t.slice(o.length),i.unshift({node:a,remainingKey:t}),n=a,r=!0;break}}return{node:n,remainingKey:t,stack:i}}deleteNode(t){if(t.value=void 0,this.leafNodes.delete(t),t.parent===void 0||t.childCount>1)return;let{node:r,edge:n}=t.parent;if(t.childCount===1){let[o,a]=Array.from(t.children)[0];t.removeChild(o),r.removeChild(n),r.addChild(n+o,a);return}if(r.removeChild(n),r.parent===void 0)return;let i=r.parent;if(r.value===void 0&&r.childCount===1){let[o,a]=Array.from(r.children)[0],l=i.edge+o;r.removeChild(o),i.node.removeChild(i.edge),i.node.addChild(l,a)}}evictLeastRecentlyUsed(){let t=this.findLeastRecentlyUsed();t&&this.deleteNode(t)}findLeastRecentlyUsed(){let t;for(let r of this.leafNodes)(t===void 0||r.touched<t.touched)&&(t=r);return t}},TS=class{constructor(){this._children=new Map;this._touched=performance.now()}static{s(this,"LRURadixNode")}get children(){return this._children.entries()}get childCount(){return this._children.size}addChild(t,r){this._children.set(t,r),r.parent={node:this,edge:t}}removeChild(t){let r=this._children.get(t);r&&(r.parent=void 0),this._children.delete(t)}get value(){return this.touch(),this._value}set value(t){this.touch(),this._value=t}get touched(){return this._touched}touch(){this._touched=performance.now()}};var Af=class{static{s(this,"CompletionsCache")}constructor(){this._cache=new un(100)}get(t){return this._cache.get(t)}set(t,r){this._cache.set(t,r)}clear(){this._cache.clear()}},Eh=class{constructor(){this.cache=new wS(100)}static{s(this,"PrefixCompletionsCache")}findAll(t){return this.cache.findAll(t).flatMap(({remainingKey:r,value:n})=>n.choices.filter(i=>i.completionText.startsWith(r)&&i.completionText.length>r.length).map(i=>({...i,completionText:i.completionText.slice(r.length),telemetryData:i.telemetryData.extendedBy({},{foundOffset:r.length})})))}append(t,r){let n=this.cache.findAll(t);if(n.length>0&&n[0].remainingKey===""){let i=n[0].value.choices;this.cache.set(t,{choices:[...i,...r]})}else this.cache.set(t,{choices:r})}clear(){this.cache=new wS(100)}};d();d();var Gre={javascript:1,typescript:2,typescriptreact:3,python:4,vue:5,php:6,dart:7,javascriptreact:8,go:9,css:10,cpp:11,html:12,scss:13,markdown:14,csharp:15,java:16,json:17,rust:18,ruby:19,c:20},fu={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95};d();function o8e(e){let t;e[0]>1e-35?e[29]>1e-35?e[138]>1e-35?t=.49496579646815353:t=.47546580490346646:e[30]>1e-35?t=.4456371992737078:e[4]>3.238486181444842?e[135]>1e-35?t=.2645576817782658:e[46]>1e-35?t=.20251922126765812:t=.37359143313367105:e[7]>.9662372103242399?t=.44975631109230374:t=.4067133376207218:e[7]>.960816451500545?e[29]>1e-35?e[4]>1.7005986908310777?t=.4240336839258693:t=.35414085998710754:e[4]>3.238486181444842?t=.353882328354817:e[100]>1e-35?t=.48783079865293355:e[30]>1e-35?t=.419904106522537:t=.38599249795612806:e[4]>3.6242520361853052?e[29]>1e-35?e[7]>.5086748127709895?t=.37522628419389664:t=.3359393805000766:e[30]>1e-35?t=.3685210833144829:e[135]>1e-35?t=.22140958666091123:e[134]>1e-35?t=.38379851487275685:e[46]>1e-35?t=.1926283522107934:t=.3098162447812857:e[46]>1e-35?t=.22698331991181095:e[4]>1.4978661367769956?e[30]>1e-35?e[4]>2.138333059508028?t=.39709448374768985:t=.34711865383837703:e[134]>1e-35?t=.40608455346469957:e[135]>1e-35?t=.3084120164848763:e[48]>1e-35?t=.24193590696691425:e[51]>1e-35?t=.2087938690163009:e[4]>3.1984648276080736?t=.3529508564858481:t=.3698795818909763:t=.30210240039979064;let r;e[0]>1e-35?e[2]>2.4414009612931857?e[2]>3.676220550121792?e[7]>.9246495578512688?r=.0570428673081833:r=.019779482100154476:e[7]>.9705672697050661?r=.1023948532887641:r=.06265430080550045:e[29]>1e-35?e[5]>4.658699722134796?e[2]>1.2424533248940002?r=.12784241430585772:r=.15126156743993927:e[8]>1e-35?e[2]>.8958797346140276?r=.10624230855386699:r=-.1699142543394302:r=.10290106276456985:e[5]>3.5694334999727624?r=.09368877801612557:r=.1552615744687782:e[2]>3.3842466058243152?e[4]>3.5694334999727624?e[29]>1e-35?e[7]>.7022798213723723?r=.02282408308012389:r=-.032610792718175546:r=-.04405498437523181:e[46]>1e-35?r=-.14475563528583885:e[7]>.9159108669154322?r=.02539215399728953:e[134]>1e-35?r=.04720629593220485:e[4]>1.8688348091416842?r=-.00150052748656963:r=-.04528409340753242:e[5]>3.5694334999727624?e[4]>3.6505739029280164?e[29]>1e-35?r=.050909089229765704:e[39]>1e-35?r=-.08747827386821926:e[46]>1e-35?r=-.11300671054986217:r=-.002669293928522137:e[46]>1e-35?r=-.07873653229849684:e[39]>1e-35?r=-.06389470798465265:e[2]>.8958797346140276?e[47]>1e-35?r=-.07102696386827136:e[4]>1.8688348091416842?r=.04567768852273886:r=.016429189359442275:r=.024223384872688037:e[7]>.9569480028661056?r=.12458720561596202:r=-.006224718391409129;let n;e[29]>1e-35?e[2]>2.602003343538398?e[2]>4.166635176627655?e[7]>.8375851232899904?n=.027219239366992384:n=-.023288925509443156:e[7]>.5866799179067689?n=.05780689652787357:n=.019914206435185725:e[2]>1.2424533248940002?e[7]>.9246495578512688?n=.1091540005913688:n=.08430043254349175:e[6]>4.832297822126891?e[125]>1e-35?n=.029350728374412424:n=.1327178977041336:e[8]>1e-35?e[7]>.9793410316570949?n=-.10742256752042179:n=.10128035205992136:n=.08719230025231978:e[5]>3.772694874805912?e[39]>1e-35?n=-.07712063687837625:e[46]>1e-35?n=-.09987046122905541:e[2]>3.6242520361853052?e[134]>1e-35?n=.0549278412468898:e[155]>1e-35?n=.0628934857241284:e[47]>1e-35?n=-.14605662411148382:e[48]>1e-35?n=-.1460221669882455:n=.002073957868392086:e[2]>1e-35?e[47]>1e-35?n=-.0769198367034467:e[155]>1e-35?n=.0769122902449957:e[134]>1e-35?n=.06856131328753592:e[152]>1e-35?n=.07081107422282688:e[51]>1e-35?n=-.11095669360187602:e[91]>1e-35?n=-.08136006552659215:e[48]>1e-35?n=-.07180356044417698:e[18]>1e-35?n=-.029572927306223313:e[50]>1e-35?n=-.11419309779400831:n=.03331652781327257:n=.0015747823792064454:e[7]>.9662372103242399?n=.1203598683210537:n=.011240838199712565;let i;e[0]>1e-35?e[2]>2.4414009612931857?e[1]>1e-35?e[2]>4.03420147928485?i=.03823654007072966:e[7]>.9033253454895247?i=.09329944316059466:i=.06705865009439997:e[134]>1e-35?i=.06865805795066232:e[30]>1e-35?i=.05189058132179502:e[217]>1e-35?i=.044913757044379055:i=-.05078929160105722:e[1]>1e-35?e[6]>5.161920636569023?e[2]>1.4978661367769956?i=.10652732380394028:i=.13307829460294332:e[7]>.985694415330804?i=.06936133858882627:i=.11090193559908544:e[30]>1e-35?i=.10406540623634791:i=.03985408831881549:e[1]>1e-35?e[2]>3.772694874805912?e[29]>1e-35?e[7]>.7316379010844482?i=.012897973304512032:i=-.028068579877067623:i=.024577017676752924:e[5]>3.417592293073651?e[22]>1e-35?i=-.023871063947594612:e[7]>.8255520169851381?i=.0513970804870914:e[153]>1e-35?i=.0032035784177419503:i=.038713568639820416:e[7]>.9527510849235538?i=.10975706910869304:i=-.009433959232316078:e[38]>1e-35?i=.05195298239886214:e[30]>1e-35?i=.02476336300816124:e[2]>2.524928003624769?e[217]>1e-35?i=.0135414448190362:e[135]>1e-35?i=-.14660288310803915:i=-.07298980826531443:e[135]>1e-35?i=-.11136111748165503:e[123]>1e-35?i=-.1489448617480049:e[46]>1e-35?i=-.0922792773195811:i=-.024587716086845016;let o;e[0]>1e-35?e[2]>2.249904835165133?e[1]>1e-35?e[2]>3.540854293052788?e[3]>2.249904835165133?o=.0590142410559562:e[7]>.6376007852429183?o=.043799948513989724:o=-4018626768373957e-20:o=.0790082705503403:e[38]>1e-35?o=.06581244939148062:e[30]>1e-35?o=.04874874335011108:o=-.03908081910821116:e[3]>2.602003343538398?e[1]>1e-35?o=.0902076086329385:e[30]>1e-35?o=.10143876154366023:o=.021304615514737626:e[2]>1.4978661367769956?o=.10248710197602005:e[8]>1e-35?e[125]>1e-35?o=-.1652240484643952:o=.09695355914385996:o=.12574960258243387:e[1]>1e-35?e[2]>3.8815106545092593?e[3]>2.249904835165133?o=.030411053020370282:e[7]>.8375851232899904?o=.01347947217941036:o=-.02329004077119854:e[7]>.9480659774309611?e[22]>1e-35?o=-.021734552060979462:e[100]>1e-35?o=.12154672718218543:e[3]>1e-35?o=.0467045097539336:o=.07133232987671506:e[4]>2.012675845367575?e[4]>3.9219243190762363?o=.018631928508103857:o=.04026129961424531:o=-.0060403819170799225:e[38]>1e-35?o=.04740678443866351:e[30]>1e-35?o=.022411595432555845:e[2]>2.970085626360216?e[121]>1e-35?o=.016385457091892035:o=-.07115043890873148:e[4]>3.417592293073651?o=-.04057726754591634:e[29]>1e-35?o=-.10601923621749415:o=-.013474385705240824;let a;e[3]>1e-35?e[3]>3.481121732133104?e[30]>1e-35?a=.03419190074885174:e[39]>1e-35?a=-.07596248521514803:e[142]>1e-35?a=-.09906305142951233:e[143]>1e-35?a=-.11544208927241095:e[134]>1e-35?a=.03231677158309109:e[217]>1e-35?a=.04584520241402839:a=-.014587374070287719:e[30]>1e-35?e[141]>1e-35?a=-.05022127515891476:e[6]>3.540854293052788?a=.046006786519929344:e[3]>2.3502401828962087?a=.03746852485580482:a=.11887634683908754:e[142]>1e-35?a=-.0715680845257123:e[134]>1e-35?a=.05310603374316432:e[39]>1e-35?a=-.05301061369502469:e[143]>1e-35?a=-.06806923450459589:e[21]>1e-35?a=-.054617004299251364:e[113]>1e-35?e[6]>3.795426061844291?a=.03901365322581413:a=.11833310693969545:e[141]>1e-35?a=-.039041289505442084:e[3]>3.0677824455408698?a=.010823236602311471:e[29]>1e-35?a=-.062100944449970996:e[58]>1e-35?a=-.04585181543113668:e[99]>1e-35?a=.053796582993543764:e[100]>1e-35?e[6]>3.676220550121792?a=.02800134029424525:a=.12622387863644666:e[98]>1e-35?a=.06289940430905602:a=.023655750883710656:e[138]>1e-35?a=.09902929683374195:e[6]>5.161920636569023?a=.07160940969782595:e[141]>1e-35?a=.11975693334861698:a=.03480602671098732;let l;e[0]>1e-35?e[2]>2.4414009612931857?e[1]>1e-35?e[2]>4.600145018061341?l=.02024868069387139:e[2]>3.1984648276080736?l=.048682024362267456:l=.07158946327961134:e[134]>1e-35?l=.05360858064017479:e[30]>1e-35?l=.03969788038954029:e[39]>1e-35?l=-.1339275468398512:l=-.03340699462411555:e[1]>1e-35?e[2]>1.2424533248940002?l=.09338368602561321:e[5]>4.5379471377116305?l=.11818377094705468:l=.02406138301472482:e[30]>1e-35?l=.08786833398626331:l=.031294938606502315:e[1]>1e-35?e[2]>2.970085626360216?e[29]>1e-35?e[2]>4.923617305492666?l=-.0247806554659429:l=.00415615978158072:e[4]>2.138333059508028?e[4]>3.6505739029280164?l=-.0025888569756007704:l=.033556460788819964:l=-.011238496891848667:e[5]>3.5694334999727624?e[4]>2.012675845367575?e[2]>.8958797346140276?l=.03964701920383755:l=.024902380380505313:e[141]>1e-35?l=-.07221122170573789:l=.009221806859728395:e[2]>.8958797346140276?l=.09633850035166669:l=.007323280248710229:e[134]>1e-35?l=.038330704525669945:e[30]>1e-35?l=.01660549386778516:e[2]>2.524928003624769?e[217]>1e-35?l=.008967266036665084:e[29]>1e-35?l=-.12693911437262784:l=-.05779560753585583:e[29]>1e-35?l=-.0908743155940788:e[4]>3.314020688089767?l=-.030882471980034343:l=-.010429019903489632;let c;e[0]>1e-35?e[2]>2.138333059508028?e[1]>1e-35?e[2]>3.4498615536424366?e[3]>2.249904835165133?c=.04956831432894648:e[2]>5.223051249395764?c=-.010305811579773205:c=.027491320728082233:c=.06656735137915168:e[38]>1e-35?c=.05309749470598965:e[30]>1e-35?c=.03843762763805799:c=-.030980078724697425:e[3]>1e-35?e[1]>1e-35?c=.08089335516186445:c=.04120452858949669:e[6]>4.832297822126891?e[2]>.8958797346140276?c=.10006865536846919:c=.11917243570572485:e[8]>1e-35?e[2]>.8958797346140276?c=.06704577104028654:c=-.1454046740476985:e[219]>1e-35?c=-.13678871665753098:c=.07859247859374968:e[1]>1e-35?e[2]>3.314020688089767?e[3]>2.249904835165133?c=.024623237775190106:e[2]>4.73179313355342?c=-.02080435685185878:c=.0026175118278487855:e[6]>3.417592293073651?e[22]>1e-35?c=-.025465692791530083:e[45]>1e-35?c=-.044807460105408044:e[8]>1e-35?c=.008766235663186964:c=.032712521408248645:e[3]>2.602003343538398?c=-.0056332432294706036:e[6]>2.524928003624769?c=.09592889105245415:c=-.013339150198983546:e[38]>1e-35?c=.03563564253379704:e[30]>1e-35?c=.014870517098142924:e[2]>2.970085626360216?c=-.054537994223319376:e[219]>1e-35?c=-.13242819761683536:e[39]>1e-35?c=-.0910629106840573:c=-.01970485337755703;let u;e[0]>1e-35?e[2]>2.012675845367575?e[1]>1e-35?e[2]>3.4498615536424366?e[7]>.9246495578512688?u=.04812308497880073:e[29]>1e-35?u=.0005380021336956461:u=.03361690381564229:e[5]>3.5694334999727624?u=.05947219194425965:u=.11024468105183681:e[134]>1e-35?u=.04905351957215242:e[138]>1e-35?u=.05554447267811877:u=-.021863233324542066:e[29]>1e-35?e[5]>4.855921334140645?e[2]>.8958797346140276?u=.09590438270550732:u=.11498869480105023:u=.04093609484315685:u=.06588820186431316:e[1]>1e-35?e[2]>2.970085626360216?e[29]>1e-35?e[7]>.41763374498947375?u=.0043146758499583255:u=-.03443798345003191:e[58]>1e-35?u=-.08355523706358281:u=.017928058505534663:e[5]>3.5694334999727624?e[22]>1e-35?u=-.02209335592785362:e[2]>.8958797346140276?u=.03223396066919647:u=.0170789547385017:e[7]>.9546729796082215?e[2]>.8958797346140276?u=.09545837551902411:u=.008923660539643153:u=-.012322532316048181:e[134]>1e-35?u=.03182502017906531:e[138]>1e-35?e[29]>1e-35?u=-.06617589040350445:u=.040440282181288686:e[2]>2.802901033147999?u=-.043412758816960974:e[219]>1e-35?u=-.11700143817568372:e[48]>1e-35?u=-.11379636451926181:e[49]>1e-35?u=-.14202838670262277:e[39]>1e-35?u=-.08160450909782378:u=-.013448620144296253;let f;e[1]>1e-35?e[2]>2.602003343538398?e[3]>2.249904835165133?e[4]>3.6505739029280164?f=.004170792297448336:f=.0368033867902024:e[7]>.8333442551332461?e[2]>4.677480030793064?f=.009136341105716223:f=.03568813371096505:e[7]>.22301866079069904?e[2]>5.1209788959100075?f=-.02365589472388456:f=.00919157417627931:f=-.0379399276194825:e[3]>1e-35?e[5]>3.5694334999727624?e[2]>.8958797346140276?e[22]>1e-35?f=-.019258819649469603:f=.03709105125649261:f=.016860660630369267:e[3]>2.602003343538398?f=-.00991261350028801:e[7]>.9626084674797213?f=.11517814309711256:f=-.009719045525281071:e[2]>1.2424533248940002?e[7]>.7316379010844482?f=.07097600019370685:f=.04586465946843457:e[6]>4.783307617946789?f=.09722756919612678:e[8]>1e-35?e[7]>.9793410316570949?f=-.11805054859481241:f=.07110946491407406:f=.05402719662002902:e[134]>1e-35?f=.03393227005537922:e[30]>1e-35?f=.023661319650909306:e[2]>2.970085626360216?e[121]>1e-35?f=.031049210793405797:e[135]>1e-35?f=-.10837216222444626:e[219]>1e-35?f=-.14640457784236915:f=-.03965818070110935:e[121]>1e-35?f=.039992710146502054:e[143]>1e-35?f=-.09311937611688731:e[46]>1e-35?f=-.07559392834101462:e[219]>1e-35?f=-.09895720087616466:e[135]>1e-35?f=-.07586062007425573:f=-.011775153504486295;let m;e[1]>1e-35?e[3]>1e-35?e[141]>1e-35?m=-.03681630636575175:e[22]>1e-35?m=-.024594313135047084:e[7]>.9626084674797213?e[6]>3.676220550121792?m=.03355559026428929:e[3]>2.602003343538398?m=.012516956280523336:m=.1113827943542528:e[3]>2.3502401828962087?e[39]>1e-35?m=-.03483153469277968:e[29]>1e-35?m=-.06012725416594425:m=.03180949281577552:e[3]>1.2424533248940002?m=.007572391854701212:m=-.04833059473573461:e[7]>.5866799179067689?e[138]>1e-35?m=.084956566507563:e[7]>.9407436463973539?e[6]>5.161920636569023?m=.07174368742657447:e[7]>.9793410316570949?m=.024186357466630726:m=.07739671408330714:m=.048429456456843774:e[6]>5.078289090109146?e[138]>1e-35?m=.07555203090037793:m=.033181836695182196:m=-.02197298038836975:e[38]>1e-35?m=.031334580210504996:e[30]>1e-35?m=.021270582199851534:e[121]>1e-35?m=.0329970846397004:e[42]>1e-35?m=.04064092183581017:e[135]>1e-35?m=-.08440485061890712:e[219]>1e-35?m=-.10638369254266776:e[143]>1e-35?m=-.09755269717731242:e[144]>1e-35?m=-.1173397395002877:e[51]>1e-35?m=-.1288517354356988:e[49]>1e-35?m=-.13923283846721088:e[91]>1e-35?m=-.1224188861275682:e[3]>3.156774023138548?m=-.02477169567121223:m=-.006917307470148426;let h;e[2]>2.802901033147999?e[7]>.9159108669154322?e[3]>3.314020688089767?h=-.0010700017432373199:e[2]>4.832297822126891?h=.009582861728698568:h=.029780100164495754:e[30]>1e-35?e[210]>1e-35?h=-.028942339056712313:h=.020599853201598167:e[3]>3.540854293052788?h=-.030156164189210577:e[2]>4.620046665062766?e[3]>1.8688348091416842?h=-.00103151911027294:e[217]>1e-35?h=.005930672148987754:h=-.03586108945255643:h=.004417350848115493:e[3]>1e-35?e[2]>.8958797346140276?e[5]>3.5694334999727624?e[3]>3.6242520361853052?e[30]>1e-35?h=.02388317653477103:h=-.0034021644637823034:e[125]>1e-35?h=-.059034648546006076:e[18]>1e-35?h=-.02514305472376584:e[46]>1e-35?h=-.05290744310611087:e[21]>1e-35?h=-.03750702516022783:e[39]>1e-35?h=-.031092446888446753:h=.028272541588979773:e[7]>.9676186228082213?e[3]>2.602003343538398?h=-.009169247394016047:h=.11347856526033356:h=-.00310251177264949:e[2]>1e-35?h=.00844340216096322:h=-.00894414829369423:e[2]>1.4978661367769956?e[7]>.6223082132708274?e[6]>3.0677824455408698?h=.04885293193722139:h=.10736598620828455:h=.026545392586289893:e[6]>4.938058177869999?e[2]>.8958797346140276?h=.07355143458077283:h=.09420954595651049:e[8]>1e-35?e[2]>.8958797346140276?h=.07966619891180966:h=-.10471235843714122:h=.04867207725748343;let p;e[1]>1e-35?e[3]>1e-35?e[5]>3.5694334999727624?e[3]>2.249904835165133?e[22]>1e-35?p=-.0262424908256809:e[8]>1e-35?p=.001637419319408071:e[155]>1e-35?p=.053444838794586114:e[99]>1e-35?p=.05039717103923269:p=.02448689278350471:e[141]>1e-35?p=-.05723199469388615:p=.005411562031545046:e[7]>.9626084674797213?e[3]>2.602003343538398?p=.00980665121101267:p=.10420505846679201:p=-.001639851950872336:e[7]>.26911173821332884?e[138]>1e-35?p=.07591724033622518:e[7]>.9275861021112151?e[5]>5.173316863805991?p=.06276466446882598:e[194]>1e-35?p=-.1330802382498368:e[5]>3.156774023138548?e[8]>1e-35?p=-.027034262965141144:p=.03949417085855365:p=.08851962788853085:e[9]>1e-35?p=.05379608621573637:p=.032253635727649325:e[138]>1e-35?p=.058048925881989615:p=.005620237500451222:e[134]>1e-35?p=.02734220426041116:e[30]>1e-35?p=.017746745665275825:e[142]>1e-35?p=-.07814745820732061:e[143]>1e-35?p=-.08860968498533135:e[14]>1e-35?p=.01954819512523945:e[42]>1e-35?p=.03333354798081121:e[147]>1e-35?p=-.11642554317575503:e[49]>1e-35?p=-.12425086420883341:e[146]>1e-35?p=-.12996952774815626:e[3]>3.817651943129708?p=-.03275661606585881:p=-.014860694091417102;let g;e[1]>1e-35?e[2]>2.524928003624769?e[3]>2.249904835165133?e[3]>3.725620842493839?g=-.000906155627647317:e[24]>1e-35?g=.0785324151067157:e[154]>1e-35?g=-.058309500036909157:g=.026762512119806844:e[7]>.26911173821332884?e[2]>4.505334588423558?g=-.010584135839537876:g=.013982545022862853:g=-.03208712711019827:e[3]>1e-35?e[2]>.8958797346140276?e[5]>3.5694334999727624?g=.026401003398891884:e[3]>2.602003343538398?g=-.008168418058515686:e[7]>.9662372103242399?g=.10626422692131453:g=-.01031637351522216:g=.010358942714602982:e[2]>1.2424533248940002?e[2]>2.012675845367575?g=.0312811686023135:g=.05423507965224627:e[6]>4.832297822126891?g=.08479742987484738:e[8]>1e-35?e[7]>.9793410316570949?g=-.09338070882722671:g=.058145805002919916:g=.04227449937397909:e[38]>1e-35?g=.025289091019879376:e[2]>3.1132683346437333?e[3]>.8958797346140276?e[46]>1e-35?g=-.09114331684757576:e[135]>1e-35?g=-.07948190608487016:e[48]>1e-35?g=-.12911151777601662:e[143]>1e-35?g=-.09735205976374478:g=-.017192402584465798:g=-.08661537827420282:e[217]>1e-35?g=.033425023239885124:e[14]>1e-35?g=.02729990952110066:e[48]>1e-35?g=-.09098188061865646:e[46]>1e-35?g=-.05848458618550134:e[91]>1e-35?g=-.10969774095556883:g=-.0068971807474334365;let y;e[1]>1e-35?e[3]>1e-35?e[3]>1.2424533248940002?e[125]>1e-35?y=-.06150017523108556:e[39]>1e-35?y=-.03350257370473994:e[22]>1e-35?y=-.02193617429266551:e[8]>1e-35?y=7274245146620154e-20:e[6]>3.676220550121792?e[4]>2.3502401828962087?y=.026702786904914785:y=.00851181280021978:e[4]>2.673553765358735?y=.010358811529123666:e[6]>2.802901033147999?y=.08891517935366504:y=.023114323891227237:y=-.02875694375159779:e[4]>1.7005986908310777?e[138]>1e-35?y=.06720372648635974:e[6]>5.427147823217923?e[9]>1e-35?y=.0544777682515472:y=.037060547607205986:e[6]>1e-35?y=.022016394753027843:y=-.1559604133821172:e[6]>3.540854293052788?y=-.009372509268454739:y=-.24388295956457617:e[38]>1e-35?y=.023012278764368795:e[138]>1e-35?y=.03564423186175008:e[30]>1e-35?y=.008093643695090883:e[217]>1e-35?y=.028810461962454004:e[135]>1e-35?y=-.07120877224354143:e[46]>1e-35?y=-.06546454537408128:e[144]>1e-35?y=-.09534262423492412:e[143]>1e-35?y=-.0770344566882831:e[29]>1e-35?y=-.06285371287531509:e[14]>1e-35?y=.02073120300153793:e[123]>1e-35?y=-.09016320513643451:e[51]>1e-35?y=-.10496442920973255:e[3]>3.1132683346437333?y=-.019949599427836494:y=-.0019060085544902166;let x;e[0]>1e-35?e[2]>1.8688348091416842?e[2]>3.1984648276080736?e[1]>1e-35?e[3]>2.249904835165133?x=.03174009468268253:e[2]>5.363634090365639?x=-.019608371322822362:x=.012560836552403976:x=-.006925466014569184:e[1]>1e-35?x=.047796055675515446:x=.014363935217773802:e[6]>5.391349638084432?e[2]>.8958797346140276?e[3]>1e-35?x=.05193425865217324:x=.07891754708034264:x=.09859506024630252:e[8]>1e-35?e[5]>4.424828703319957?x=.0288226384042998:x=-.09397342098461306:e[4]>.8958797346140276?x=.06181532763949055:e[3]>1e-35?x=.0661728888522049:x=-.18938681666136592:e[2]>3.6242520361853052?e[30]>1e-35?x=.005754128097002715:e[4]>1.7005986908310777?e[1]>1e-35?e[3]>1.8688348091416842?x=.003940381852503271:x=-.01767544594631589:e[134]>1e-35?x=.005683243725945637:x=-.033167818200618454:x=-.049739953036904844:e[1]>1e-35?e[5]>3.417592293073651?e[3]>2.249904835165133?e[3]>4.051747139190486?x=-.013281167238314323:x=.016971087295600894:x=-.0032296953806057044:e[8]>1e-35?e[3]>1e-35?x=-.09772932329003692:x=.10215199291158968:e[3]>1e-35?x=.04042124133857408:e[4]>1.7005986908310777?x=-.03780917296974188:x=-.29617407728303585:e[3]>1.2424533248940002?e[134]>1e-35?x=.019695468056761475:x=-.008073287117671947:x=-.07196945037292647;let b;e[0]>1e-35?e[3]>1e-35?e[30]>1e-35?b=.04565870990720628:e[4]>3.481121732133104?b=-.0010242035152053465:e[46]>1e-35?b=-.06735757101078846:b=.028047085557873476:e[4]>.8958797346140276?b=.061451212522936484:b=-.008994471708946133:e[4]>3.8815106545092593?b=-.015862290359637304:e[4]>1.2424533248940002?e[156]>1e-35?b=-.0353203284829365:e[135]>1e-35?b=-.029955239188290975:e[153]>1e-35?b=-.024262881593313065:e[21]>1e-35?b=-.04039396048201336:e[155]>1e-35?b=.031605649750965394:e[46]>1e-35?b=-.0412690351363074:e[18]>1e-35?b=-.02516534034859168:e[51]>1e-35?b=-.09383050740007202:e[219]>1e-35?e[30]>1e-35?b=.05781620337941066:b=-.031029108058883783:e[54]>1e-35?b=-.1312103962175427:e[14]>1e-35?b=.029309503966067275:e[52]>1e-35?b=-.12376041877584809:e[49]>1e-35?b=-.08405476403385437:e[129]>1e-35?b=-.07017699310303659:e[3]>3.238486181444842?b=.0005864979938663785:e[90]>1e-35?b=-.19027994988708324:e[4]>2.4414009612931857?b=.013036973814688194:e[141]>1e-35?b=-.05866284827055356:e[196]>1e-35?e[3]>1.2424533248940002?e[3]>1.4978661367769956?b=.021738540839636195:b=.10410506831002041:b=-.25590968590756463:b=.0023982515170817725:b=-.04143304307857132;let E;e[0]>1e-35?e[2]>1.8688348091416842?e[2]>3.417592293073651?e[2]>5.335128436483344?E=-.011443269019739626:e[1]>1e-35?E=.015228192424880932:E=-.005492858431736962:e[1]>1e-35?e[5]>3.5694334999727624?E=.03605247912942737:E=.08439131345296227:E=.009650676995478455:e[5]>5.096808314315481?e[2]>.8958797346140276?e[29]>1e-35?E=.07077360688836766:E=.044754385330663386:E=.09313294724999382:e[8]>1e-35?e[2]>.8958797346140276?E=.04214845406094496:E=-.10283747682230321:e[4]>.8958797346140276?E=.05232959789940822:e[2]>.8958797346140276?E=.00730829946441921:E=-.23825070451282065:e[7]>.9358314658959646?e[5]>3.417592293073651?e[8]>1e-35?E=-.013117301012430346:E=.010418379595902224:e[19]>1e-35?E=-.07514668047310291:E=.05032486941219513:e[29]>1e-35?e[1]>1e-35?e[7]>.14547530463198097?e[4]>2.138333059508028?E=-.009576060406554683:E=-.04582944318062007:E=-.04685159067258116:E=-.07022291581850879:e[1]>1e-35?e[4]>2.3502401828962087?e[4]>3.8815106545092593?E=-.008313873320272646:e[140]>1e-35?E=-.029352675967497712:e[37]>1e-35?E=-.09937923794037767:E=.015967772276156707:E=-.009857373135428817:e[38]>1e-35?E=.011345159604794278:e[2]>2.4414009612931857?e[30]>1e-35?E=.001522017389940959:E=-.026992183902105407:E=-.006358778971076675;let _;e[0]>1e-35?e[2]>1.8688348091416842?e[2]>2.970085626360216?e[7]>.8649016459419877?_=.018617011644318126:e[29]>1e-35?e[2]>4.832297822126891?_=-.03407648259949232:_=-.0036502511604675977:e[4]>3.540854293052788?_=-.00934040898683245:_=.010922739771398862:e[7]>.9676186228082213?_=.05137169375874399:_=.02682190004807807:e[29]>1e-35?e[2]>.8958797346140276?_=.065076078729683:e[8]>1e-35?e[7]>.9750059495478345?e[7]>.996914501566243?_=.08915557171019604:_=-.06286636147644172:_=.0902247220475161:e[4]>.8958797346140276?_=.09051085461905525:e[9]>1e-35?_=-.19701197524821418:_=.005536577088671752:e[30]>1e-35?_=.0682573098268795:_=.031380692115494484:e[2]>4.151008904875603?e[155]>1e-35?_=.026867659395235544:e[7]>.5866799179067689?_=-.008345671861059714:_=-.02185200164340811:e[7]>.9626084674797213?e[22]>1e-35?_=-.024341883095402903:e[141]>1e-35?e[29]>1e-35?_=.08888912525147288:_=-.040584195806350004:_=.014817521849450843:e[4]>1.7005986908310777?e[4]>3.9219243190762363?_=-.01259238316205765:e[156]>1e-35?_=-.03305969547622109:e[50]>1e-35?_=-.10133912689920138:e[155]>1e-35?_=.025358210175047153:e[55]>1e-35?_=-.14645261489281414:e[9]>1e-35?_=.012035823488806215:_=.0010743871783232305:_=-.030440082321355873;let k;e[0]>1e-35?e[1]>1e-35?e[7]>.30853255358841714?e[4]>.8958797346140276?e[138]>1e-35?k=.0708169212387357:e[7]>.9974623466432676?k=.06323909894881967:k=.04463133906529934:k=-.006876640569960593:e[4]>2.138333059508028?k=.02983313061920756:k=-.012849740499321841:e[138]>1e-35?k=.05170725384597862:e[134]>1e-35?k=.03407970940934425:e[32]>1e-35?k=.04641257566344885:e[217]>1e-35?k=.04726549849359106:e[152]>1e-35?k=.04284855498215312:k=-.018635981778740818:e[7]>.9358314658959646?e[1]>1e-35?k=.013495195381145214:k=-.0017562536904350947:e[153]>1e-35?k=-.035450683955968364:e[135]>1e-35?k=-.033677490938511655:e[1]>1e-35?e[156]>1e-35?k=-.03492338371344172:e[4]>2.012675845367575?e[8]>1e-35?k=-.012478407554855247:e[58]>1e-35?k=-.06588308463544146:k=.01024668455910621:k=-.017964352445712636:e[138]>1e-35?k=.023509519134334668:e[134]>1e-35?k=.009985116251562821:e[219]>1e-35?k=-.08089904073615993:e[144]>1e-35?k=-.08668450969211726:e[146]>1e-35?k=-.11193950701534479:e[91]>1e-35?k=-.09510832561737878:e[47]>1e-35?k=-.06671901650698997:e[145]>1e-35?k=-.10185972302071798:e[142]>1e-35?k=-.050979038763275586:k=-.008318124414257324;let B;e[2]>2.4414009612931857?e[7]>.5866799179067689?e[1]>1e-35?e[2]>5.059420419187638?B=-.004966114458456121:e[3]>1.4978661367769956?e[6]>3.9219243190762363?B=.016160825033090097:e[4]>2.673553765358735?B=-.008119911797705546:e[7]>.9676186228082213?B=.10191214482603793:B=.010406721157764452:e[4]>2.602003343538398?B=.011963972867583182:e[209]>1e-35?e[24]>1e-35?B=-.4633165603515741:B=-.027241411195905924:B=-.01021341522779383:e[3]>.8958797346140276?e[39]>1e-35?B=-.07106669495723826:B=-.003949154414882924:B=-.06434150131915288:e[3]>1.7005986908310777?e[1]>1e-35?B=.005050893558647285:B=-.01649483548684653:e[217]>1e-35?B=.0027009145619870485:e[7]>.16413460456379095?B=-.021492035902356262:B=-.04956173856083012:e[3]>1e-35?e[2]>.8958797346140276?e[4]>3.314020688089767?B=.004614615289098078:e[125]>1e-35?B=-.053838919278819175:e[141]>1e-35?B=-.031232660335016666:e[7]>.9676186228082213?B=.031522536832188655:B=.016369948821613637:B=-.001970208279177045:e[2]>1.2424533248940002?e[7]>.8045995506441456?e[6]>3.0677824455408698?B=.035653122678366796:B=.09668798382116887:B=.017192957672541906:e[6]>5.427147823217923?e[2]>.8958797346140276?B=.05167603828162103:B=.07201242912898732:e[4]>.8958797346140276?e[6]>4.3882378946731615?B=.04079789432551034:B=-.00477197753110532:B=-.1330224689055222;let N;e[0]>1e-35?e[1]>1e-35?e[6]>5.519456907163478?e[3]>1e-35?N=.025938224253040522:e[7]>.9480659774309611?N=.06369970668749851:N=.04567224211157202:e[8]>1e-35?N=-.03272937728465352:e[7]>.8002228006195066?e[219]>1e-35?N=-.06304921759586735:N=.04293432033794005:N=.0034607309539607385:e[30]>1e-35?N=.03333728636724803:e[134]>1e-35?N=.03171739664928598:e[32]>1e-35?N=.04247521237473512:e[217]>1e-35?N=.04515237436183519:e[138]>1e-35?N=.043674672816657406:N=-.021495642896979555:e[153]>1e-35?e[7]>.7405695827634472?N=-.005353425538700483:N=-.03818743916821677:e[1]>1e-35?e[156]>1e-35?N=-.026937004040991603:e[9]>1e-35?N=.01687211330975012:e[129]>1e-35?N=-.06344334253531962:e[5]>3.276966702012906?e[3]>2.4414009612931857?e[3]>4.3882378946731615?N=-.029787052855333836:e[140]>1e-35?N=-.0315337765152156:N=.01010125865272709:N=-.003643087951301554:e[3]>1.8688348091416842?N=-.009293469974765106:e[7]>.9407436463973539?e[19]>1e-35?N=-.10837629052758145:N=.08012552652666853:N=-.03240188731353479:e[3]>.8958797346140276?e[138]>1e-35?N=.028089541906112948:e[134]>1e-35?N=.011775653029555359:e[54]>1e-35?N=-.1329256322319015:N=-.010520589644656487:N=-.058476715353390545;let M;e[0]>1e-35?e[2]>1.7005986908310777?e[2]>2.970085626360216?e[3]>1.4978661367769956?e[1]>1e-35?M=.015966021866473425:M=-.004942501766182043:e[7]>.7646034107159144?M=.0008922354520049755:M=-.02377096637770522:e[1]>1e-35?M=.03185471115279236:M=.009030463601278762:e[6]>5.033695261903033?e[2]>.8958797346140276?e[3]>1e-35?M=.03583918176912262:M=.05978765203310842:e[3]>1.4978661367769956?M=.04363706154403441:M=.08596238935719265:e[8]>1e-35?e[4]>3.676220550121792?M=-.14139420543234502:e[6]>4.135134555718313?M=.06641653507737781:M=-.08482961471233386:e[219]>1e-35?M=-.08432601495298837:M=.036383288293587494:e[2]>4.212100162283537?e[4]>4.06899022722607?M=-.027653216441781994:e[4]>1.2424533248940002?M=-.0074990353344818825:M=-.047274115298751654:e[3]>4.350257124271638?M=-.021535524001034215:e[7]>.9626084674797213?e[6]>3.314020688089767?M=.008343192891130257:e[3]>2.602003343538398?M=-.029175290449111352:e[19]>1e-35?M=-.0982821612709299:M=.07967468666491928:e[3]>2.012675845367575?e[1]>1e-35?e[141]>1e-35?M=-.050000478457880464:e[99]>1e-35?M=.03066844761711629:M=.00757148708610041:e[14]>1e-35?M=.030325269400598688:e[138]>1e-35?M=.029925649226634522:M=-.005865781126590595:e[7]>.14547530463198097?M=-.006746433384005582:M=-.03419211369300411;let Z;e[7]>.8453853180651066?e[9]>1e-35?e[204]>1e-35?e[5]>3.979637980058199?Z=.03492440471960614:Z=.10640952227810228:Z=.024674544399570984:e[21]>1e-35?Z=-.03056548710005192:e[24]>1e-35?Z=.04417102228084844:e[18]>1e-35?e[5]>3.417592293073651?Z=-.01915628728670732:Z=.08218968786016527:e[22]>1e-35?Z=-.015022557207326592:e[7]>.9941118339384912?Z=.024199625103362956:e[135]>1e-35?Z=-.01204089678887213:e[5]>3.156774023138548?e[14]>1e-35?Z=.03343354440638259:e[144]>1e-35?Z=-.06832894943893354:Z=.0114980261254499:e[12]>1e-35?e[100]>1e-35?Z=.09915326976032354:Z=-.011405707270850872:Z=.05400113313957842:e[138]>1e-35?Z=.029070115198082648:e[7]>.11348809759407426?e[9]>1e-35?Z=.0124381999772114:e[14]>1e-35?Z=.021548670539672424:e[152]>1e-35?Z=.02386756199239544:e[155]>1e-35?Z=.024879667358339554:e[217]>1e-35?Z=.014495299809094343:e[17]>1e-35?Z=.023665548251738264:e[21]>1e-35?Z=-.04352613176288253:e[142]>1e-35?Z=-.041479100066479035:e[47]>1e-35?Z=-.054730987834988636:e[135]>1e-35?Z=-.02041552814087628:e[12]>1e-35?Z=.00599257601351913:e[19]>1e-35?Z=.017289098956116435:Z=-.005346146967029123:Z=-.015035114021856248;let he;e[2]>2.524928003624769?e[39]>1e-35?he=-.054727205204329936:e[2]>5.1209788959100075?e[3]>1.7005986908310777?he=-.006846267565269392:e[5]>6.826002629905951?he=-.031164989612379426:he=-.002741497453668024:e[91]>1e-35?he=-.09671408062751485:e[4]>1.4978661367769956?e[1]>1e-35?e[3]>2.249904835165133?he=.01457038163563883:e[7]>.1998775237752378?he=.0022386178156093236:he=-.023878153904868322:e[138]>1e-35?he=.02577301491883366:e[134]>1e-35?he=.012196636151923639:he=-.011620066788940737:he=-.02547345266933859:e[3]>1e-35?e[2]>1e-35?e[1]>1e-35?e[125]>1e-35?he=-.054140900037670386:e[5]>3.5694334999727624?he=.011956526123643832:e[3]>2.602003343538398?he=-.02114925328017154:e[7]>.9662372103242399?he=.08782010508103752:he=-.017223208918198857:e[138]>1e-35?he=.03552967765214556:e[134]>1e-35?he=.02029988465200251:he=-.0027071098830831453:he=-.010563423003945922:e[2]>1.2424533248940002?e[1]>1e-35?e[5]>3.156774023138548?he=.020789754957971127:e[8]>1e-35?he=.09676607622337308:he=-.13431522143386382:he=-.04328684841078818:e[6]>5.427147823217923?e[2]>.8958797346140276?he=.04286558286931383:he=.0632450248289209:e[4]>.8958797346140276?e[8]>1e-35?e[4]>3.676220550121792?he=-.12134536828900527:he=-.0021406313647826976:he=.02703554321037796:he=-.10987991092748431;let ee;e[3]>3.238486181444842?e[30]>1e-35?ee=.009506310623811853:e[39]>1e-35?ee=-.0390989997202559:e[187]>1e-35?ee=-.07249802958837052:e[46]>1e-35?ee=-.05080833699879983:e[143]>1e-35?ee=-.06014247774751084:e[219]>1e-35?ee=-.05179602905357869:e[6]>6.1537953943602615?e[15]>1e-35?ee=-.025022238573512268:ee=.0011147676050071987:ee=-.013840284878987585:e[7]>.9626084674797213?e[5]>3.417592293073651?e[3]>1e-35?e[6]>3.9219243190762363?ee=.008593726678003006:ee=.05272960047875293:e[5]>4.424828703319957?ee=.03164186747443643:ee=-.019512539098210834:e[3]>2.602003343538398?ee=-.0016290671598964486:e[3]>1.2424533248940002?e[8]>1e-35?ee=-.1920669264002081:ee=.09024848315677546:e[8]>1e-35?ee=.06434775905745808:e[44]>1e-35?ee=.11389595321585716:ee=-.036695137521575945:e[6]>4.987019604243537?e[141]>1e-35?ee=-.03813401544172915:e[138]>1e-35?ee=.029859363038130183:e[58]>1e-35?ee=-.06135288076045784:e[39]>1e-35?ee=-.04609789446034826:e[7]>.14547530463198097?e[11]>1e-35?ee=.0007666746170242386:e[129]>1e-35?ee=-.04984156530077896:e[18]>1e-35?ee=-.01554744241744757:e[10]>1e-35?e[219]>1e-35?ee=-.043774129950223145:ee=.0062051346459236715:ee=.014331149613197688:ee=-.004868728135790881:ee=-.009310258638274059;let G;e[0]>1e-35?e[2]>1.7005986908310777?e[2]>3.817651943129708?e[3]>1.8688348091416842?G=.0015603015891380355:G=-.018128739944024166:e[5]>3.5694334999727624?e[6]>5.427147823217923?G=.017445711714402918:G=-.006013735620008879:e[3]>1.2424533248940002?G=.08568755276415789:e[4]>2.602003343538398?G=.03195371214541369:e[6]>2.970085626360216?G=-.3506562612672139:G=-.038898555979475155:e[6]>5.391349638084432?e[2]>.8958797346140276?G=.04755052122467952:e[3]>1.4978661367769956?G=.03861414711908666:G=.08185303441168128:e[8]>1e-35?e[5]>4.424828703319957?G=.016473058697350277:G=-.08025494910794358:e[219]>1e-35?G=-.06606152909975703:G=.033955083083682974:e[153]>1e-35?G=-.022769519242142378:e[155]>1e-35?G=.021917770434351808:e[3]>4.051747139190486?G=-.016298405734735375:e[4]>1.2424533248940002?e[156]>1e-35?G=-.023334559703496013:e[91]>1e-35?G=-.07354920004445119:e[21]>1e-35?G=-.03472005783841508:e[9]>1e-35?G=.0088614848397155:e[152]>1e-35?G=.01650058356046536:e[50]>1e-35?G=-.08689386936995537:e[219]>1e-35?G=-.025293957964644554:e[22]>1e-35?G=-.02911571993589908:e[52]>1e-35?G=-.10060771324188006:e[151]>1e-35?G=-.11187645020980451:e[49]>1e-35?G=-.07269389735370566:G=.00010096962399904588:G=-.0308050484468705;let q;e[0]>1e-35?e[2]>1.7005986908310777?e[2]>3.1132683346437333?e[2]>5.589117819455554?q=-.01634394676179118:e[135]>1e-35?q=-.025978770194490092:q=.003478202132522329:e[5]>3.772694874805912?e[6]>5.55101783490842?q=.0201238113260563:q=-.003889163967162744:q=.0619995705843029:e[6]>5.391349638084432?e[2]>.8958797346140276?q=.04441301244720888:q=.07580163057048642:e[5]>4.424828703319957?q=.030400021609279876:e[135]>1e-35?e[6]>4.03420147928485?q=-.1614949959350695:q=.011868201115510678:e[144]>1e-35?q=-.24480189212017833:q=.00743113235503554:e[135]>1e-35?q=-.02500550080046047:e[155]>1e-35?q=.019914668189284807:e[14]>1e-35?q=.016272311078771865:e[2]>4.436734027666816?q=-.010942143677155697:e[152]>1e-35?q=.01655515192923104:e[5]>3.276966702012906?e[208]>1e-35?q=.01544696196221499:e[209]>1e-35?q=.011686634595667988:e[204]>1e-35?q=.012948259428096241:e[54]>1e-35?q=-.0987840586310838:e[17]>1e-35?q=.019642065140602974:e[9]>1e-35?q=.002408217148588979:e[129]>1e-35?q=-.051760999013377655:e[53]>1e-35?q=-.12326801905337725:e[156]>1e-35?q=-.027148214121600067:q=-.00591946140033722:e[141]>1e-35?q=.08076229481403298:e[100]>1e-35?q=.09029873540689846:q=.004633440115146894;let ie;e[1]>1e-35?e[4]>2.138333059508028?e[9]>1e-35?e[7]>.9738681190948303?e[4]>2.249904835165133?ie=.0335386338744903:ie=.08871810783567416:ie=.019225035967642936:e[7]>.5866799179067689?e[44]>1e-35?ie=-.028577747938027556:e[22]>1e-35?ie=-.017080349342057245:e[123]>1e-35?ie=-.06459630434555787:ie=.01496396100048332:e[7]>.04507521918085865?ie=.0037545927605624665:ie=-.024364818555823085:e[7]>.3301972011875425?e[4]>.8958797346140276?ie=.003955118988355861:ie=-.024852972286710795:e[210]>1e-35?ie=-.06918033561606161:ie=-.016436360434421187:e[219]>1e-35?ie=-.07074619361594191:e[14]>1e-35?ie=.02288621182895308:e[30]>1e-35?ie=.009951065285890723:e[4]>3.0677824455408698?e[48]>1e-35?ie=-.08645289278185848:e[18]>1e-35?ie=-.07128859518483391:e[46]>1e-35?ie=-.059012415377229614:e[51]>1e-35?ie=-.09897820075751956:e[143]>1e-35?ie=-.0658809793369211:e[39]>1e-35?ie=-.05072244120975425:e[145]>1e-35?ie=-.1041573357946847:e[21]>1e-35?ie=-.07265724033978356:e[121]>1e-35?ie=.032340406020414894:e[150]>1e-35?ie=-.12780465144045577:e[50]>1e-35?ie=-.10084067045905792:ie=-.008282579596590931:e[31]>1e-35?ie=.09475423612489574:e[134]>1e-35?ie=.016436600209473996:ie=-.0032052350949025154;let z;e[0]>1e-35?e[1]>1e-35?e[6]>5.980149988077803?e[3]>1e-35?z=.016868562767356994:e[7]>.9480659774309611?z=.0490126593301439:z=.03183712887814021:e[4]>.8958797346140276?e[8]>1e-35?z=-.018344689935240077:e[7]>.5762123732244849?z=.027823839417468396:z=.0022237549483396734:z=-.049221463486990365:e[30]>1e-35?z=.024881540664409785:e[4]>3.0677824455408698?z=-.012956173562801246:z=.010844244442972509:e[153]>1e-35?z=-.021011529883710918:e[135]>1e-35?z=-.022862755771243214:e[91]>1e-35?z=-.06523564179230792:e[3]>4.3372693810700085?z=-.01836396186345982:e[4]>1.2424533248940002?e[14]>1e-35?z=.018063557788938384:e[1]>1e-35?e[58]>1e-35?z=-.05666864992513037:e[37]>1e-35?z=-.09859173931566362:e[140]>1e-35?z=-.026368697925604742:e[139]>1e-35?z=-.06458698835998881:e[3]>2.4414009612931857?e[8]>1e-35?z=-.012750470980894203:e[128]>1e-35?z=-.06062526587440112:z=.011637315217958607:e[7]>.9569480028661056?e[6]>3.314020688089767?e[6]>8.256477558772088?z=-.01867324944649552:z=.013333709765106694:e[19]>1e-35?z=-.0862336521704207:z=.06263843669460754:z=-.005209374987876728:e[29]>1e-35?z=-.05314556259108334:e[144]>1e-35?z=-.06747511467043471:z=-.0032459743896180644:z=-.025647852465095045;let j;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.802901033147999?e[153]>1e-35?j=-.028446025186518367:e[135]>1e-35?j=-.030498458478750823:e[4]>1.4978661367769956?j=.0028332406263713176:j=-.029966327008991617:j=.018714561890725637:e[6]>5.033695261903033?e[2]>.8958797346140276?j=.041738631496127304:j=.0701395739744944:e[7]>.9811887196001154?e[28]>1e-35?e[194]>1e-35?j=-.6270617037879163:j=-.14198370205598315:j=-.008029082191082339:j=.03966126215239892:e[153]>1e-35?j=-.018792731305353614:e[135]>1e-35?j=-.020500053366640306:e[156]>1e-35?e[11]>1e-35?j=-.05063175110475535:j=-.0120172710473678:e[147]>1e-35?j=-.06181360325166399:e[7]>.06275229375044648?e[52]>1e-35?j=-.09381845963236321:e[4]>4.424828703319957?j=-.015836182358134197:e[4]>1.2424533248940002?e[48]>1e-35?j=-.047387335727107405:e[50]>1e-35?j=-.07061356901704502:e[151]>1e-35?j=-.09680213548388712:e[46]>1e-35?j=-.028970851669790916:e[123]>1e-35?j=-.035197840867969954:e[49]>1e-35?j=-.06299268464836878:e[149]>1e-35?j=-.10197175263174806:e[58]>1e-35?j=-.03908263666673043:e[22]>1e-35?j=-.021903737116021876:e[2]>.8958797346140276?j=.005307704388235018:j=-.0020984759645931708:j=-.021935509998616008:j=-.01887705116018838;let U;e[2]>2.4414009612931857?e[2]>4.749261159734808?e[219]>1e-35?U=-.0427111578574511:e[153]>1e-35?U=-.030189831687705213:e[135]>1e-35?U=-.03512251542671204:U=-.005813108237155817:e[39]>1e-35?U=-.03612853474204475:e[91]>1e-35?U=-.07347487395456895:e[142]>1e-35?U=-.04314124434818331:e[21]>1e-35?U=-.03933135423264962:e[29]>1e-35?e[6]>4.3882378946731615?e[1]>1e-35?U=-.0015250307417007892:U=-.0490054084929899:e[209]>1e-35?U=-.19107169934362123:U=-.032434842765588306:e[18]>1e-35?U=-.04413318629193353:e[5]>3.772694874805912?U=.004026864766696988:e[7]>.9705672697050661?e[4]>2.602003343538398?U=-.0184663870129198:U=.08888448773905216:U=-.0040785146358560806:e[29]>1e-35?e[2]>1.2424533248940002?e[1]>1e-35?e[5]>3.156774023138548?U=.012676257607559291:e[4]>2.012675845367575?U=.07794141958502514:U=-.23905004122480836:U=-.03904279404529968:e[6]>5.818597045157784?e[1]>1e-35?U=.04439337662833094:U=-.009601154125838422:e[28]>1e-35?e[7]>.9926276364955392?e[156]>1e-35?U=.08495906118788314:e[153]>1e-35?U=.09808912606252018:U=-.41470362752984724:U=.024659633328041372:e[6]>4.3882378946731615?U=.02348696158531392:U=-.011219631635525798:e[2]>.8958797346140276?U=.00764827947682953:U=-.002636723662133651;let V;e[0]>1e-35?e[138]>1e-35?V=.04040206743401164:e[7]>.47159631571429605?e[39]>1e-35?V=-.04204265697956852:e[18]>1e-35?V=-.02345608311313191:e[46]>1e-35?V=-.07250113205332377:e[47]>1e-35?V=-.06901706560471924:e[123]>1e-35?V=-.02471508138476658:e[91]>1e-35?V=-.08527667683257537:e[6]>5.519456907163478?e[7]>.9811887196001154?V=.033642311398086024:V=.019968221974742344:e[6]>3.540854293052788?e[28]>1e-35?e[7]>.9914949911911836?V=-.17171139407761582:V=.033182911468765224:V=.0060896749985828915:e[7]>.9626084674797213?V=.050178751374534494:V=-.008697473314227091:e[6]>5.957131031247307?V=.008840008772752947:V=-.00839587224544437:e[57]>1e-35?V=-.11000065936717814:e[187]>1e-35?V=-.039919217528968265:e[135]>1e-35?V=-.01777859479698383:e[7]>.841541958453746?e[6]>8.681774988134558?V=-.006645633391127337:V=.005363553180866138:e[7]>.06275229375044648?e[141]>1e-35?V=-.028575934798358252:e[147]>1e-35?V=-.06523418671938815:e[53]>1e-35?V=-.12439699935111644:e[47]>1e-35?V=-.04201034294282216:e[21]>1e-35?V=-.029998534764449716:e[11]>1e-35?V=-.008349262144218515:e[10]>1e-35?e[152]>1e-35?V=.03211843381827455:V=-.009616753935387912:V=.001507728277179471:V=-.018453367252451447;let K;e[2]>2.4414009612931857?e[155]>1e-35?K=.02097415247337288:e[2]>5.1209788959100075?e[219]>1e-35?K=-.04107586321461544:e[153]>1e-35?K=-.030708779452328257:K=-.008547089256234949:e[24]>1e-35?e[113]>1e-35?K=.10372474211849725:K=.010871474495452506:e[46]>1e-35?K=-.048875079231930615:e[152]>1e-35?K=.0169028183837229:e[91]>1e-35?K=-.06545106192484919:e[7]>.5395500104437768?e[21]>1e-35?K=-.03634133884877529:e[123]>1e-35?K=-.04524486315275367:K=.0007726000210664368:e[153]>1e-35?K=-.026631444280113794:K=-.005897540198114922:e[29]>1e-35?e[2]>1.2424533248940002?e[141]>1e-35?K=.06938494238244022:e[1]>1e-35?e[4]>2.602003343538398?e[7]>.21160651352969054?K=.016731168841731828:K=-.009280453313693341:K=-.006549806005743951:K=-.035447929694275064:e[8]>1e-35?K=-.0032912467465369953:e[4]>1.2424533248940002?e[1]>1e-35?e[2]>.8958797346140276?K=.024369266212637037:e[138]>1e-35?K=.06205121318768558:K=.03811769435016647:K=-.009452348851889555:K=-.025248141993897872:e[2]>1e-35?e[57]>1e-35?K=-.12191990737301042:e[4]>3.3842466058243152?K=.00020591213976092076:e[141]>1e-35?K=-.03252260939244301:e[186]>1e-35?K=-.13818838492678748:K=.009368844137034227:K=-.007973426105216213;let ae;e[2]>2.3502401828962087?e[14]>1e-35?ae=.015015656987761437:e[30]>1e-35?e[210]>1e-35?e[7]>.6876768869498817?ae=.00543900892248828:ae=-.04253496769494065:e[141]>1e-35?ae=-.052958350924390156:e[140]>1e-35?ae=-.10364099832282586:ae=.010452960405207413:e[24]>1e-35?e[113]>1e-35?ae=.09898709072741292:e[209]>1e-35?e[7]>.9821472231924556?ae=-.26615665549082984:ae=.09636256138859388:ae=.01708542025496261:e[217]>1e-35?ae=.008049408683788317:e[21]>1e-35?ae=-.04590265539954756:e[90]>1e-35?ae=-.13784770816769107:e[142]>1e-35?ae=-.04628126597884301:e[47]>1e-35?ae=-.05827975565933709:e[135]>1e-35?ae=-.0223224900840969:e[18]>1e-35?ae=-.03220713396184497:e[91]>1e-35?ae=-.06447405488640102:e[58]>1e-35?ae=-.05284544446869763:e[48]>1e-35?ae=-.06649148594881385:e[123]>1e-35?ae=-.04383701454842744:e[7]>.07815070294696584?e[52]>1e-35?ae=-.11846610284210293:e[50]>1e-35?ae=-.08907531725085399:e[156]>1e-35?ae=-.018270336483319834:e[150]>1e-35?ae=-.1090721461891663:e[151]>1e-35?ae=-.12157322199183473:ae=-.001565820654257863:ae=-.02380240397829804:e[7]>.7957410883753849?ae=.01267070049428537:e[9]>1e-35?ae=.012970301396505988:ae=.0031136826722851885;let re;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>3.817651943129708?e[29]>1e-35?re=-.01811927921170173:re=-.0007182192063435364:e[30]>1e-35?re=.024303187146750442:e[1]>1e-35?re=.011106265465270054:e[134]>1e-35?re=.029835980521591587:re=-.011058553872914158:e[29]>1e-35?e[4]>.8958797346140276?e[2]>.8958797346140276?re=.038081831260496:e[7]>.9761943980359399?e[7]>.9974623466432676?re=.0678338591810893:re=.02371719224774027:re=.0682898584583309:re=-.023148464063014726:e[30]>1e-35?re=.04610988679672867:re=.003060113702583105:e[29]>1e-35?e[2]>.8958797346140276?e[4]>2.4414009612931857?e[7]>.9587163092581167?re=.01081564552001606:re=-.006807357600587744:re=-.02409609521595022:re=-.033329165496176885:e[4]>4.051747139190486?re=-.01130115168237245:e[129]>1e-35?re=-.04589370141507604:e[21]>1e-35?re=-.029442074982620643:e[14]>1e-35?re=.016895124578179443:e[186]>1e-35?re=-.11907557430036886:e[1]>1e-35?e[139]>1e-35?re=-.06194447560538838:e[133]>1e-35?re=-.0758465323292204:e[58]>1e-35?re=-.04330766372695393:e[138]>1e-35?re=-.04155491116231014:e[156]>1e-35?re=-.04841608169206507:e[44]>1e-35?re=-.01948221703985556:re=.006580878599054945:e[217]>1e-35?re=.022433802380447482:re=-.00412091757515532;let le;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.970085626360216?e[153]>1e-35?le=-.024502725801264887:e[2]>5.589117819455554?le=-.01230190569981064:le=.0013078979950003464:e[1]>1e-35?le=.016172143068823742:le=.0006345060509537773:e[2]>.8958797346140276?le=.030005982109869073:e[7]>.9811887196001154?e[7]>.9983480540068196?le=.0671951915420627:e[4]>.8958797346140276?e[204]>1e-35?e[4]>2.4414009612931857?le=.044068636573383585:le=-.6634026033584294:e[28]>1e-35?e[194]>1e-35?le=-.3139210817530322:le=-.030502668897116853:le=.02841326513237545:le=-.12080826254458728:le=.05983169094937563:e[25]>1e-35?le=-.03468266531519899:e[17]>1e-35?le=.018557285805987474:e[91]>1e-35?le=-.051420462987159146:e[153]>1e-35?e[24]>1e-35?le=.04301006671297924:e[57]>1e-35?le=-.09748386515224282:e[7]>.43956365248689394?le=-.00756781004151352:le=-.03008603678955382:e[40]>1e-35?le=-.06712212199178254:e[9]>1e-35?e[99]>1e-35?le=.02709638137622776:le=.00311232737924217:e[219]>1e-35?le=-.021650545703290135:e[129]>1e-35?le=-.04139534817677377:e[4]>4.482986592105174?le=-.01666373169408667:e[7]>.14547530463198097?e[28]>1e-35?le=.0203181446326991:e[24]>1e-35?le=.019321702534414745:le=-.0013149142637674523:le=-.010572437649803333;let ce;e[1]>1e-35?e[99]>1e-35?ce=.024922390516579074:e[7]>.6223082132708274?e[5]>8.674624195715621?ce=-.0013697481432616754:e[8]>1e-35?e[5]>3.0201273556387074?e[5]>4.855921334140645?ce=-.0034268395365245545:ce=-.034186463672076346:e[29]>1e-35?ce=.07759914281958613:ce=-.07773573805144608:e[22]>1e-35?ce=-.0175879419801366:e[7]>.9626084674797213?ce=.016773359142537643:ce=.008028381804196754:e[133]>1e-35?ce=-.0535216100744091:ce=-.0005000628423357899:e[38]>1e-35?e[14]>1e-35?ce=.05090247458630403:ce=.007750826606170666:e[30]>1e-35?ce=.007698939719746262:e[121]>1e-35?ce=.02303487268261317:e[56]>1e-35?ce=.04301822779572479:e[219]>1e-35?ce=-.061056125991793546:e[49]>1e-35?ce=-.08519783826666813:e[54]>1e-35?ce=-.11098408863832084:e[51]>1e-35?ce=-.07495147940928196:e[52]>1e-35?ce=-.10268521021357209:e[143]>1e-35?ce=-.050337621945760906:e[50]>1e-35?ce=-.08215637358309871:e[135]>1e-35?ce=-.037923453156281546:e[29]>1e-35?ce=-.03275476659364492:e[118]>1e-35?ce=-.05655325181162936:e[46]>1e-35?ce=-.03579874818682071:e[55]>1e-35?ce=-.10858775815345066:e[98]>1e-35?ce=-.02949179817285505:e[91]>1e-35?ce=-.06114394873657414:ce=-.0024381269826722327;let De;e[0]>1e-35?e[138]>1e-35?De=.03188433658945665:e[6]>5.957131031247307?e[29]>1e-35?De=.02161439640262312:e[46]>1e-35?De=-.05856082884648366:De=.00579188508436574:e[5]>3.417592293073651?De=-.0023781291067078423:e[6]>2.524928003624769?e[29]>1e-35?De=-.009165058612451055:De=.06060298049441096:De=-.024654633200924148:e[29]>1e-35?e[141]>1e-35?De=.047057536167451744:e[5]>7.751690325550034?De=-.014630738159823437:e[6]>1e-35?De=-.0022830386545257364:De=-.1244934159203967:e[141]>1e-35?De=-.03108265181870111:e[151]>1e-35?De=-.0899976208431091:e[53]>1e-35?De=-.10125439914522794:e[57]>1e-35?De=-.08285049636367613:e[48]>1e-35?De=-.04071723813859757:e[147]>1e-35?De=-.05043191744833317:e[49]>1e-35?De=-.05480244282058292:e[52]>1e-35?De=-.07341553831872409:e[91]>1e-35?De=-.04164336745260387:e[50]>1e-35?De=-.05943962674275153:e[40]>1e-35?De=-.054773037913883875:e[129]>1e-35?De=-.03640370706396673:e[54]>1e-35?De=-.07483146938849299:e[22]>1e-35?De=-.02027834075472462:e[186]>1e-35?De=-.08116240011202293:e[143]>1e-35?De=-.028437692949603324:e[21]>1e-35?De=-.02421670339700474:e[46]>1e-35?De=-.02303808594532841:De=.0030552215125396933;let be;e[0]>1e-35?e[1]>1e-35?e[4]>2.138333059508028?e[9]>1e-35?be=.02933727780739186:e[6]>4.722943345003718?e[7]>.9246495578512688?be=.024680404379144982:be=.012015730636539185:e[113]>1e-35?be=.09112392780348796:e[135]>1e-35?e[7]>.990877425524446?be=-.11617284449593282:be=-.005246041787488675:be=-.011069319481086321:e[90]>1e-35?be=-.2763006993902732:e[7]>.9546729796082215?e[6]>3.0677824455408698?be=.009233858920042097:be=.08920751503262825:be=-.008824102277148265:e[138]>1e-35?be=.02736126919460762:e[4]>2.917405368531303?e[30]>1e-35?be=.013112272135200274:e[217]>1e-35?be=.035799930603658235:be=-.015618218537266096:be=.010656981322113845:e[14]>1e-35?be=.01147191978691208:e[17]>1e-35?be=.016681596753170068:e[135]>1e-35?be=-.017396147137824756:e[4]>1.8688348091416842?e[4]>4.03420147928485?be=-.008863534867945834:e[31]>1e-35?be=.05416038384474034:e[113]>1e-35?be=.012656827040897288:e[204]>1e-35?be=.011410879858785482:e[208]>1e-35?e[1]>1e-35?be=.02085606775425661:be=-.008618410086291444:e[53]>1e-35?be=-.09674487817291225:e[155]>1e-35?be=.010841012663281826:be=-.0027234799964982103:e[100]>1e-35?e[6]>4.226807104886684?be=-.02684998739505702:be=.09196076999373319:be=-.014557367931257406;let qe;e[1]>1e-35?e[4]>2.4414009612931857?e[140]>1e-35?qe=-.020508725755139606:e[9]>1e-35?qe=.014160204295049248:e[37]>1e-35?qe=-.06190233326923697:e[6]>1e-35?qe=.005164496028342236:qe=-.11389189550910446:e[141]>1e-35?qe=-.04125881484049697:e[186]>1e-35?qe=-.17160163910476212:e[29]>1e-35?e[6]>3.676220550121792?qe=-.010283419868136159:e[7]>.9626084674797213?qe=-.1716178372310524:qe=-.008856137283327148:e[28]>1e-35?qe=.05315666786902214:e[129]>1e-35?qe=-.04136913767615559:e[7]>.9705672697050661?e[6]>3.540854293052788?qe=.00751812285476753:e[8]>1e-35?qe=-.11960098941111366:qe=.06631760098044483:e[210]>1e-35?e[30]>1e-35?qe=-.05338190010412709:qe=.017275201286894953:e[30]>1e-35?qe=.014424216946760394:e[99]>1e-35?qe=.027062693955934525:qe=-.006762492910108134:e[219]>1e-35?qe=-.0534489198792768:e[138]>1e-35?qe=.017328465617667224:e[4]>2.970085626360216?e[144]>1e-35?qe=-.0662951231725991:e[143]>1e-35?qe=-.04739088646917139:e[145]>1e-35?qe=-.07635546796992515:e[14]>1e-35?qe=.012433708195861912:e[217]>1e-35?qe=.021046036228368578:e[51]>1e-35?qe=-.07024391932712475:qe=-.007585229386863768:e[127]>1e-35?qe=.0788172427657374:qe=.0036475442240054556;let Re;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.802901033147999?e[153]>1e-35?Re=-.02488671343402725:e[135]>1e-35?Re=-.026342401137212534:e[4]>1.4978661367769956?Re=-.0002120610158998857:Re=-.02619014803287452:e[5]>3.772694874805912?Re=.00791871819482647:Re=.05245006986819034:e[5]>5.431533816254341?e[2]>.8958797346140276?Re=.026755493155023333:Re=.05657996196424821:e[5]>4.424828703319957?e[28]>1e-35?Re=-.12833948112036647:Re=.02009706276124955:e[135]>1e-35?Re=-.1062651205805238:Re=-.014392542658357654:e[156]>1e-35?e[11]>1e-35?Re=-.0426876288098691:Re=-.009210886749467585:e[25]>1e-35?Re=-.029685120249418873:e[153]>1e-35?e[24]>1e-35?Re=.039675921298659045:Re=-.01470247025894634:e[135]>1e-35?Re=-.013162475027411236:e[2]>1e-35?e[22]>1e-35?Re=-.01924589513592333:e[21]>1e-35?Re=-.02301719200164619:e[5]>8.75754777636908?e[4]>2.602003343538398?Re=-.0007468484638490539:Re=-.0158247553028744:e[1]>1e-35?e[99]>1e-35?Re=.024493682002973784:e[42]>1e-35?Re=-.07469088345156226:e[45]>1e-35?Re=-.03838380763638677:e[114]>1e-35?Re=.02409327545276692:e[154]>1e-35?Re=-.038977286951036944:e[208]>1e-35?Re=.021915882358345885:Re=.003839964304606302:Re=-.0014382346596150915:Re=-.008713493537728363;let Xe;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>4.119004124609202?e[3]>1.2424533248940002?Xe=-.0017308950709495397:Xe=-.020269742816377157:e[5]>3.5694334999727624?e[6]>6.468474521450064?Xe=.007854184286630537:Xe=-.005163758444496073:e[3]>1.2424533248940002?e[12]>1e-35?Xe=-.009039854020477722:Xe=.08762320620103459:e[194]>1e-35?Xe=-.3433922378591172:e[24]>1e-35?Xe=-.2523113760729937:Xe=-.000461371156912453:e[5]>5.692045796563381?e[3]>1.4978661367769956?Xe=.007177758561499448:e[2]>.8958797346140276?Xe=.03195343200682438:Xe=.059909349900388334:e[5]>4.424828703319957?e[28]>1e-35?Xe=-.10695282804536732:Xe=.019125081292682575:e[135]>1e-35?Xe=-.09257011968677195:Xe=-.012855523323410875:e[14]>1e-35?Xe=.010052176448775013:e[152]>1e-35?Xe=.011482760058014926:e[156]>1e-35?Xe=-.017677609761538152:e[24]>1e-35?Xe=.01670301885059328:e[39]>1e-35?Xe=-.02425844450882272:e[12]>1e-35?e[3]>1.2424533248940002?e[6]>5.980149988077803?Xe=.01117036123239103:e[3]>1.4978661367769956?Xe=-.005154239762347923:Xe=.06349844063391799:Xe=-.011876368966362884:e[4]>3.772694874805912?Xe=-.010120762110714197:e[5]>3.276966702012906?e[4]>2.4414009612931857?e[4]>3.1132683346437333?Xe=-.0035902728428789336:Xe=.003411450739155564:e[5]>8.17933999189099?Xe=-.018866709049095685:Xe=-.0038747233097564068:Xe=.024379138339081993;let ft;e[7]>.5866799179067689?e[11]>1e-35?e[217]>1e-35?ft=.01816196279626246:ft=-.008720340174685528:e[14]>1e-35?ft=.017422275374961747:e[3]>2.802901033147999?e[6]>6.0026509725338455?e[18]>1e-35?ft=-.035421013136394335:e[219]>1e-35?ft=-.03997357699142973:e[3]>4.993822430271426?ft=-.03250278247092862:ft=.004080430247607075:ft=-.010055330454519094:e[5]>9.345963324807864?ft=-.008136951493137817:e[90]>1e-35?ft=-.16414188828180187:e[45]>1e-35?ft=-.0395103723535772:e[17]>1e-35?e[6]>3.314020688089767?ft=.03144428117941763:ft=-.12305809642153893:e[5]>3.417592293073651?ft=.006863569747629234:e[7]>.9626084674797213?e[204]>1e-35?ft=.08986402088848823:e[100]>1e-35?ft=.09658177526577977:e[141]>1e-35?ft=.06795495668113817:e[28]>1e-35?e[3]>1e-35?ft=.10311172778826272:ft=-.12367638872784459:e[209]>1e-35?ft=.06796205879581844:e[6]>3.0677824455408698?e[3]>2.012675845367575?ft=-.1815028770626217:ft=-.027600842388305583:ft=.013979123567456554:ft=-.003475039039176338:e[6]>4.3882378946731615?e[3]>3.6242520361853052?ft=-.008151073332139989:e[3]>2.4414009612931857?e[48]>1e-35?ft=-.05732062477153205:ft=.0038104987226822806:e[7]>.14547530463198097?ft=-.0015360108147469411:ft=-.014797616303672155:e[3]>.8958797346140276?ft=-.010446976011382926:ft=-.039018423658353285;let at;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>4.620046665062766?e[3]>1.8688348091416842?at=-.0031733808376565214:at=-.019463570735432378:at=.0032566959999593536:e[5]>5.692045796563381?e[3]>1.4978661367769956?at=.006472511895453073:e[2]>.8958797346140276?at=.029439910335277677:at=.05703290277034656:e[219]>1e-35?at=-.06489530937321614:e[5]>4.424828703319957?at=.017756995160153607:e[125]>1e-35?at=-.13863131633711023:at=-.011337464460106939:e[29]>1e-35?e[2]>.8958797346140276?e[3]>1e-35?at=-.04822012795561216:e[125]>1e-35?at=.06083023155995546:e[141]>1e-35?at=.04503531231698771:e[5]>7.751690325550034?at=-.008826435995092507:at=.0004769856196102064:e[5]>5.895778350950796?at=-.03439788269853701:at=.0012862199645308793:e[141]>1e-35?e[3]>3.0677824455408698?at=.0046610227653059695:at=-.04504560149384845:e[3]>4.3372693810700085?at=-.011924612526365003:e[151]>1e-35?at=-.07909878419302184:e[40]>1e-35?at=-.04837106565429512:e[52]>1e-35?at=-.06478730352567258:e[18]>1e-35?e[46]>1e-35?at=.060888920864590634:e[5]>3.5694334999727624?at=-.02601024872439008:at=.07960150564774994:e[46]>1e-35?at=-.027213119561154103:e[51]>1e-35?at=-.054081846676903716:e[54]>1e-35?at=-.07375359621246233:e[50]>1e-35?at=-.0570341640965886:at=.0021129818482267812;let lt;e[2]>2.861792550976191?e[11]>1e-35?e[58]>1e-35?lt=-.09222476830824185:e[156]>1e-35?lt=-.044357001480428:lt=-.009033627105152873:e[8]>1e-35?e[5]>7.429817490674132?lt=-.007435399919321396:lt=-.025630334739367253:e[155]>1e-35?lt=.02064199664419035:e[5]>8.75754777636908?e[2]>4.119004124609202?lt=-.012759040985224594:lt=-.0009375109950390992:e[21]>1e-35?lt=-.028664595543047417:e[187]>1e-35?lt=-.03837361994986333:e[22]>1e-35?lt=-.027274995074267547:e[14]>1e-35?lt=.016392245342055616:e[17]>1e-35?lt=.022509678093313362:e[28]>1e-35?lt=.025145343126000193:e[39]>1e-35?lt=-.02939647868188604:lt=.00042395552644239256:e[29]>1e-35?e[2]>2.012675845367575?lt=-.0030925701821976686:e[5]>6.0390628155997765?e[2]>.8958797346140276?lt=.010736817315927911:lt=.02426980448005241:e[28]>1e-35?e[194]>1e-35?lt=-.3070569158934055:e[196]>1e-35?lt=-.5506885961570867:lt=-.033353293982668515:lt=.006553036790621832:e[2]>1.2424533248940002?e[5]>3.5694334999727624?e[155]>1e-35?lt=.02102370525016274:lt=.003409533559556135:e[204]>1e-35?lt=.08873962123163927:e[24]>1e-35?lt=.10555359938821945:e[28]>1e-35?lt=.09719645392539251:e[196]>1e-35?lt=.08224623369607056:lt=-.020134405544960793:lt=-.0015937623030202052;let oe;e[0]>1e-35?e[2]>1.8688348091416842?e[3]>1.4978661367769956?e[3]>3.540854293052788?oe=-.0076758153562413375:e[18]>1e-35?oe=-.04295196457825341:e[51]>1e-35?oe=-.13248011320062422:oe=.008952360414023641:e[7]>.987306237235768?oe=.006439776900137331:oe=-.012660562195035134:e[3]>2.861792550976191?e[30]>1e-35?oe=.026757175255811883:oe=-.01062556784320532:e[2]>.8958797346140276?oe=.02114926571950188:e[8]>1e-35?e[7]>.9738681190948303?e[7]>.996914501566243?oe=.039844832378913425:oe=-.06690456482695102:oe=.05010759067838343:e[7]>.9901971344332651?e[204]>1e-35?e[7]>.9945060383544003?oe=.03772632631184001:oe=-.28522617893050056:e[28]>1e-35?oe=-.060992612788434375:oe=.03341245674945403:oe=.051288950777861456:e[8]>1e-35?oe=-.010769283931178146:e[29]>1e-35?e[2]>.8958797346140276?e[1]>1e-35?e[7]>.98482287934795?oe=.009069204772381522:oe=-.004081394384581673:oe=-.03594060084257492:e[7]>.9216401592048815?oe=-.00442206228805168:oe=-.03576891499137606:e[55]>1e-35?oe=-.08223884312902127:e[57]>1e-35?oe=-.0742535346669798:e[149]>1e-35?oe=-.07940704728071792:e[39]>1e-35?oe=-.017161105634171125:e[49]>1e-35?oe=-.04763279499691125:e[139]>1e-35?oe=-.027192821855546695:e[10]>1e-35?oe=-.0036316338579956914:oe=.0026484338648234077;let Ne;e[0]>1e-35?e[2]>1.4978661367769956?e[2]>5.527441013321604?Ne=-.012306712525171806:e[7]>.26911173821332884?e[18]>1e-35?Ne=-.027850707388722303:e[91]>1e-35?Ne=-.07216882827488169:e[2]>2.740319461670996?e[3]>1.4978661367769956?Ne=.005596837686865309:Ne=-.0059429747278747225:Ne=.009524033665726878:Ne=-.0077898166249992535:e[6]>5.912149824839399?e[3]>1.4978661367769956?e[30]>1e-35?Ne=.032201880996274065:Ne=-.009587971174292791:e[2]>.8958797346140276?Ne=.02761965407835318:Ne=.05238312639482409:e[7]>.990877425524446?e[28]>1e-35?e[156]>1e-35?Ne=.08220352701195494:Ne=-.16200772313735304:e[135]>1e-35?e[6]>4.310776603370241?Ne=-.03126230621131264:Ne=-.15437767199900418:e[219]>1e-35?e[2]>.8958797346140276?Ne=.018944713961164792:e[3]>1e-35?Ne=.06629929139668997:Ne=-.16790799717043633:e[192]>1e-35?Ne=-.3320398525405097:Ne=.009790162291004705:e[125]>1e-35?Ne=-.0996239956884951:Ne=.017982806591038288:e[25]>1e-35?Ne=-.02642518530716432:e[6]>9.286096980078398?e[3]>2.740319461670996?Ne=-.0027582177390145703:Ne=-.02047492290459601:e[17]>1e-35?Ne=.01622159988588393:e[7]>.5866799179067689?Ne=.0012556670436606133:e[3]>2.3502401828962087?e[3]>3.314020688089767?Ne=-.00567335909535631:Ne=.0036605424249172938:e[7]>.085616240166877?Ne=-.00662352094724046:Ne=-.024196995936398374;let Ae;e[0]>1e-35?e[2]>1.2424533248940002?e[2]>2.802901033147999?e[3]>1.8688348091416842?e[4]>3.6242520361853052?Ae=-.008283589876968955:Ae=.005263882290960596:e[7]>.9662372103242399?Ae=.0028703212438091555:Ae=-.014488335095453487:e[5]>3.5694334999727624?Ae=.006182444666070272:Ae=.04834325475124454:e[5]>5.821564412917691?e[3]>1.4978661367769956?Ae=.006862035478899274:e[2]>1e-35?Ae=.03694434517261685:Ae=.06818308291563471:e[8]>1e-35?e[4]>3.979637980058199?Ae=-.14792403668068005:e[5]>4.297262267176281?Ae=.04085199387960594:Ae=-.08112459203056922:e[7]>.990877425524446?e[204]>1e-35?e[4]>2.4414009612931857?Ae=.040094872099644886:Ae=-.37432021591644105:e[128]>1e-35?e[17]>1e-35?Ae=.11216772098992614:Ae=-.39517539261887863:Ae=-.006202508512715542:Ae=.031730389306944315:e[8]>1e-35?e[5]>3.156774023138548?Ae=-.011787620507206525:e[3]>1.2424533248940002?Ae=-.0681989521208321:Ae=.06597717957453096:e[2]>1e-35?e[25]>1e-35?Ae=-.024543929344106336:e[5]>8.193814844759492?e[4]>2.602003343538398?e[2]>5.167634984480833?Ae=-.00996811570890536:Ae=.001134417943860963:Ae=-.013004815776467261:e[1]>1e-35?e[22]>1e-35?Ae=-.019057324908699217:e[141]>1e-35?Ae=-.026707851278989517:Ae=.005608056403567553:Ae=-.0017699070677530831:e[3]>1.4978661367769956?Ae=-.005457163739006659:Ae=-.02994467745413277;let Ge;e[11]>1e-35?e[154]>1e-35?Ge=-.07640004589975245:e[153]>1e-35?Ge=-.027921183286970398:e[156]>1e-35?Ge=-.02508900369371103:e[47]>1e-35?Ge=-.09621039139423637:e[46]>1e-35?Ge=-.05890206826599292:Ge=-.0018521707885188695:e[7]>.1998775237752378?e[39]>1e-35?Ge=-.02026563108381904:e[91]>1e-35?Ge=-.03979999802398471:e[14]>1e-35?e[134]>1e-35?Ge=.044705853812635206:Ge=.01112016315736189:e[24]>1e-35?e[6]>3.417592293073651?Ge=.01585670681557334:Ge=.0820229237073549:e[9]>1e-35?e[204]>1e-35?e[6]>3.9219243190762363?Ge=.01475544028693712:e[30]>1e-35?Ge=.10219265831102325:Ge=-.0567832116465987:e[154]>1e-35?Ge=-.04682869193620295:Ge=.0058147572533605784:e[123]>1e-35?Ge=-.04011640490395746:e[17]>1e-35?e[6]>3.314020688089767?Ge=.016472642951500794:Ge=-.10372235311156908:e[19]>1e-35?Ge=.013619887374131652:e[28]>1e-35?e[6]>3.1984648276080736?e[6]>5.5816130673839615?Ge=.021404525777064917:Ge=-.022090537029637168:Ge=.07927547222505857:e[129]>1e-35?Ge=-.0315112950229846:e[90]>1e-35?Ge=-.08016175793969123:e[60]>1e-35?Ge=-.044255594885932:e[150]>1e-35?Ge=-.0643645650066138:Ge=18071436579202054e-21:e[6]>6.132312266239896?Ge=.00017227075512669227:Ge=-.010904669702571911;let Y;e[0]>1e-35?e[1]>1e-35?e[7]>.30853255358841714?e[154]>1e-35?Y=-.053460642910797676:Y=.009652079082741289:Y=-.0017676195976280011:e[134]>1e-35?Y=.01746182064829904:e[32]>1e-35?Y=.033149881191962445:e[138]>1e-35?Y=.02149173543949675:e[37]>1e-35?Y=.028519159270523897:e[152]>1e-35?Y=.023352031441951773:e[217]>1e-35?Y=.02290558132732214:Y=-.01850975101703459:e[152]>1e-35?Y=.010488854074509982:e[155]>1e-35?e[12]>1e-35?Y=.027490522294963154:Y=.002575743497494008:e[131]>1e-35?Y=-.07138027268500055:e[57]>1e-35?Y=-.06658662137088783:e[28]>1e-35?Y=.015141080652315508:e[55]>1e-35?Y=-.07156337757427284:e[204]>1e-35?Y=.008085415901726045:e[99]>1e-35?e[1]>1e-35?Y=.01803019280250009:Y=-.012275416064615064:e[113]>1e-35?Y=.007680714218522011:e[102]>1e-35?Y=.01923593781092882:e[38]>1e-35?Y=.00598208846998872:e[112]>1e-35?Y=.00895148693111358:e[217]>1e-35?Y=.004322676779141819:e[114]>1e-35?e[1]>1e-35?Y=.019173900241286065:e[18]>1e-35?Y=-.1302545616586715:Y=-.012219608237225175:e[89]>1e-35?Y=.019080595932083305:e[95]>1e-35?Y=.009182530113836561:Y=-.006531048204768366;let ne;e[2]>4.135134555718313?e[47]>1e-35?ne=-.06057129526622943:e[5]>6.805168536739806?e[3]>2.4414009612931857?e[1]>1e-35?e[32]>1e-35?ne=-.09672976728291365:e[217]>1e-35?ne=-.09138286775903748:e[114]>1e-35?ne=.034435801312936894:ne=.003550781249532139:e[56]>1e-35?ne=.06582022232543998:e[144]>1e-35?ne=-.08601101006110747:ne=-.006766914059699758:e[217]>1e-35?ne=.001822103802069182:ne=-.013646878234832634:e[8]>1e-35?ne=-.02495807137678248:e[1]>1e-35?ne=.009517017217557915:ne=-.007488737506950444:e[6]>6.1537953943602615?e[140]>1e-35?ne=-.013180308369805589:e[51]>1e-35?ne=-.0496089337787575:e[15]>1e-35?e[30]>1e-35?ne=.017032153502995334:ne=-.01330098154550191:e[10]>1e-35?e[56]>1e-35?ne=.04713518460375107:ne=-.0016223104582873055:e[131]>1e-35?ne=-.07291331059881433:e[27]>1e-35?ne=-.015619378359486803:ne=.006051005570772542:e[3]>3.1132683346437333?e[8]>1e-35?ne=-.02945681137428643:ne=-.00725026522062693:e[6]>1e-35?e[3]>1.2424533248940002?ne=.0035081297381004684:e[194]>1e-35?e[5]>3.772694874805912?ne=-.03142097937872678:ne=-.17253564001853064:e[5]>3.156774023138548?ne=-.004860170522962415:e[12]>1e-35?ne=-.04169370739781986:ne=.05886396855048806:ne=-.10415236736977414;let Fe;e[2]>2.3502401828962087?e[11]>1e-35?e[58]>1e-35?Fe=-.07548370555339029:Fe=-.009060327134219393:e[21]>1e-35?Fe=-.02536204329245056:e[155]>1e-35?Fe=.01626198918750622:e[142]>1e-35?Fe=-.029262265693304763:e[4]>1.8688348091416842?e[48]>1e-35?Fe=-.0522966414357639:e[47]>1e-35?Fe=-.03867213359133592:e[149]>1e-35?Fe=-.10392339919606915:e[135]>1e-35?Fe=-.010541433982611018:e[51]>1e-35?Fe=-.06273170107556418:e[54]>1e-35?Fe=-.08769404750229767:e[18]>1e-35?e[1]>1e-35?Fe=.0022966362330231133:e[31]>1e-35?Fe=.19571528454816625:Fe=-.04919246049942885:e[50]>1e-35?Fe=-.06766114512966344:e[7]>.9793410316570949?Fe=.00837983401462093:Fe=.0007986280224776339:e[186]>1e-35?Fe=-.16446174535054356:e[62]>1e-35?Fe=.06508947502037822:Fe=-.010260699234562241:e[6]>5.486867329823672?e[140]>1e-35?Fe=-.01589822136096899:e[125]>1e-35?Fe=-.025465846683560996:e[190]>1e-35?Fe=-.03671457167643481:e[91]>1e-35?Fe=-.03821691103237143:e[57]>1e-35?Fe=-.07502589184745939:e[50]>1e-35?Fe=-.05395522531288487:Fe=.005241788285288346:e[4]>3.1132683346437333?Fe=-.008741587825172916:e[12]>1e-35?e[100]>1e-35?Fe=.06608964318040904:Fe=-.012827641806975033:Fe=.004744161815471635;let Se;e[4]>.8958797346140276?e[2]>5.4049245766661995?e[5]>6.0051201133541365?Se=-.008352440702113342:Se=.00818161196788124:e[123]>1e-35?Se=-.02387242845183433:e[190]>1e-35?Se=-.03574127589374163:e[152]>1e-35?Se=.01262147105943106:e[11]>1e-35?e[58]>1e-35?Se=-.05955906348417553:Se=-.003717083835106387:e[6]>6.0026509725338455?e[15]>1e-35?e[30]>1e-35?Se=.023589988800048537:Se=-.01290090410411923:e[38]>1e-35?Se=.015295369946508892:e[1]>1e-35?e[4]>2.740319461670996?e[22]>1e-35?Se=-.01614208413608714:e[42]>1e-35?Se=-.05454658382875832:Se=.008894057269932708:e[141]>1e-35?Se=-.029660896741885025:Se=.0007918628584206305:e[12]>1e-35?Se=.010735865892076339:e[218]>1e-35?Se=.06499398466334683:e[29]>1e-35?Se=-.02987220407530282:e[118]>1e-35?Se=-.05994319680494358:Se=-.0022119035344297464:e[113]>1e-35?e[24]>1e-35?Se=.09992180359591052:Se=.003953091072683087:e[204]>1e-35?e[4]>2.249904835165133?Se=.0012737346185997833:e[5]>3.979637980058199?Se=.012350990163327259:e[29]>1e-35?Se=-.4173182186315585:Se=.09483857671510697:Se=-.0034771114722081282:e[19]>1e-35?Se=.04818172610227253:e[158]>1e-35?Se=.09085872490042819:e[123]>1e-35?Se=.046170414156546824:Se=-.030833991141721785;let Ce;e[0]>1e-35?e[2]>1.2424533248940002?e[2]>2.138333059508028?e[3]>1.4978661367769956?e[3]>4.197173680708697?Ce=-.015067858446918237:e[5]>3.979637980058199?Ce=.0025493966284458503:e[24]>1e-35?Ce=.10170949517680355:e[3]>2.3502401828962087?Ce=-.010182198776560389:e[7]>.9662372103242399?Ce=.0855616171705204:Ce=-.0044290837387121786:e[7]>.992067132663463?Ce=.006950766900495411:Ce=-.011703657118613042:e[3]>3.314020688089767?Ce=-.007590151825214328:Ce=.011931088318037653:e[5]>4.424828703319957?e[3]>1.4978661367769956?Ce=.003895993078605918:e[2]>1e-35?e[5]>5.859359688974663?Ce=.03311360926528595:e[7]>.9936484368123463?e[28]>1e-35?Ce=-.1296383065201116:e[18]>1e-35?Ce=-.2304238024287801:Ce=-.0007035160942990814:Ce=.03872938637191365:Ce=.05931958562003542:e[204]>1e-35?e[7]>.9926276364955392?Ce=-.2503820824196552:Ce=.01514980593659256:e[135]>1e-35?e[7]>.990877425524446?Ce=-.12146435764173391:Ce=.03579230653026111:e[125]>1e-35?Ce=-.11990587076136816:Ce=-.0017264106529335022:e[2]>.8958797346140276?e[3]>4.878999622893762?Ce=-.028006872909888104:e[17]>1e-35?Ce=.015327119563713427:e[14]>1e-35?Ce=.008966123864441086:e[24]>1e-35?Ce=.014884319812071584:Ce=-.0008180929266082377:e[29]>1e-35?e[5]>5.895778350950796?Ce=-.02927173520516398:Ce=.004256706136162408:Ce=-.0030692852485265805;let Ue;e[39]>1e-35?Ue=-.019116728566000912:e[152]>1e-35?Ue=.011159312353677259:e[52]>1e-35?Ue=-.06556505864685434:e[7]>.14547530463198097?e[187]>1e-35?Ue=-.02203060071288757:e[48]>1e-35?Ue=-.03406851575382452:e[10]>1e-35?e[219]>1e-35?Ue=-.026242020752538932:Ue=-.0026163734864036088:e[21]>1e-35?Ue=-.016803181860075653:e[8]>1e-35?e[5]>3.0201273556387074?e[6]>4.722943345003718?e[125]>1e-35?Ue=-.07907862980413462:Ue=-.0024968534057976956:e[141]>1e-35?Ue=.01751368963010255:Ue=-.035334686232177996:e[3]>1e-35?Ue=-.049727650261844114:Ue=.06649006602788514:e[51]>1e-35?Ue=-.047051279496267896:e[58]>1e-35?e[19]>1e-35?Ue=.06794814379814933:Ue=-.033933057704283995:e[6]>8.681774988134558?Ue=-.001906867260604815:e[3]>3.3842466058243152?e[23]>1e-35?Ue=.029126145919054786:e[12]>1e-35?e[59]>1e-35?Ue=.06547842372312768:Ue=.005706402727440608:e[89]>1e-35?Ue=.05238448470974841:Ue=-.003970577798047124:e[141]>1e-35?e[3]>1e-35?Ue=-.02994666941636212:Ue=.029175297065511276:e[139]>1e-35?Ue=-.03926804943552878:e[7]>.9626084674797213?Ue=.010270060885238803:e[6]>4.5379471377116305?Ue=.0051640733904868355:Ue=-.006326617548806485:e[3]>2.3502401828962087?Ue=-.001064039369711557:Ue=-.015232776877478657;let Ve;e[4]>.8958797346140276?e[0]>1e-35?e[3]>3.540854293052788?e[138]>1e-35?Ve=.020620751195117866:Ve=-.007657642824282572:e[9]>1e-35?Ve=.013255738783000171:e[123]>1e-35?Ve=-.04553588467808997:e[14]>1e-35?Ve=.020257942633657516:e[17]>1e-35?Ve=.02379466680602821:e[7]>.26911173821332884?Ve=.004563013176326579:Ve=-.006044878247080096:e[208]>1e-35?e[1]>1e-35?Ve=.016583051243963785:Ve=-.005473696128326885:e[53]>1e-35?Ve=-.07392011100318682:e[3]>4.840234496705036?Ve=-.022277334024938686:e[49]>1e-35?Ve=-.04140311782670083:e[40]>1e-35?Ve=-.041278341040658334:e[156]>1e-35?Ve=-.01087788432462589:e[8]>1e-35?e[141]>1e-35?Ve=.032404890147508435:Ve=-.008762958389316138:e[153]>1e-35?e[18]>1e-35?Ve=.03064796696780178:e[19]>1e-35?Ve=.025912082684934896:e[7]>.9033253454895247?Ve=.00010665286308939541:Ve=-.019390651252802232:e[133]>1e-35?Ve=-.013215417920201165:e[35]>1e-35?Ve=-.07409193965805899:e[16]>1e-35?Ve=.010595288788401727:Ve=.0004445963442680354:e[19]>1e-35?Ve=.043800560164078434:e[62]>1e-35?Ve=.08440762960688118:e[123]>1e-35?Ve=.04196062757398021:e[44]>1e-35?e[7]>.9880960409521241?Ve=-.14025705728324367:Ve=.07605327900446729:Ve=-.030453882536033008;let tt;e[14]>1e-35?e[134]>1e-35?tt=.03807815059641535:tt=.007895137847547357:e[39]>1e-35?tt=-.019172673927560828:e[138]>1e-35?tt=.009207480510332959:e[152]>1e-35?e[10]>1e-35?tt=.029310247627617716:tt=.006422126177312616:e[3]>3.5114340430413216?e[155]>1e-35?tt=.02869511059037871:e[137]>1e-35?tt=.048763707543632046:e[218]>1e-35?tt=.0393143924208134:tt=-.0065205942363783:e[4]>2.4414009612931857?e[113]>1e-35?tt=.016047178137914484:e[35]>1e-35?tt=-.09486179869071369:e[118]>1e-35?tt=-.032706818831570415:e[0]>1e-35?tt=.004733859562945298:tt=-4345884264792552e-20:e[29]>1e-35?e[204]>1e-35?e[4]>2.3502401828962087?tt=-.23804773582311067:tt=.0015066742334155967:e[194]>1e-35?e[4]>1.7005986908310777?tt=-.013296404682101122:tt=-.14340192620927933:e[196]>1e-35?tt=-.17446678790111786:tt=-.01140535620661492:e[141]>1e-35?tt=-.03362328403627273:e[99]>1e-35?tt=.02082592497315901:e[196]>1e-35?tt=.02125156827172031:e[204]>1e-35?tt=.018738441981476887:e[194]>1e-35?tt=.022230335367621302:e[114]>1e-35?tt=.017460982004618885:e[210]>1e-35?e[11]>1e-35?tt=-.07421933796695453:tt=-.02600449772874995:e[62]>1e-35?tt=.0435295764572802:tt=-.0036358741919687645;let Ct;e[2]>4.749261159734808?e[5]>6.826002629905951?e[29]>1e-35?Ct=-.012866931871530748:e[47]>1e-35?Ct=-.06511122680099479:Ct=-.0033152297369715466:e[1]>1e-35?Ct=.00634942519508748:Ct=-.008516826211528918:e[6]>6.1537953943602615?e[11]>1e-35?e[121]>1e-35?e[1]>1e-35?Ct=-.06214080664476329:Ct=.037029947625630194:e[47]>1e-35?Ct=-.08203414630098728:Ct=-.0044122376347199765:e[15]>1e-35?e[30]>1e-35?Ct=.012452689013210465:Ct=-.011970977023212193:e[10]>1e-35?e[152]>1e-35?Ct=.02888624440861723:Ct=-.0026872248277927456:e[27]>1e-35?Ct=-.01471521834054285:e[21]>1e-35?Ct=-.014970363019863132:e[13]>1e-35?Ct=-.0057151868439017945:e[38]>1e-35?Ct=.01633003881478886:Ct=.005850603591179588:e[113]>1e-35?e[5]>3.979637980058199?Ct=.006600693642185256:e[6]>3.1984648276080736?Ct=.07576534772024612:Ct=-.013028252220942527:e[204]>1e-35?e[9]>1e-35?e[6]>3.9219243190762363?Ct=.01266221511189265:e[29]>1e-35?Ct=-.20167612409830682:Ct=.09361829582187109:Ct=.0016303497789744046:e[6]>4.310776603370241?Ct=-.0015960016142716584:e[141]>1e-35?e[2]>2.249904835165133?e[6]>2.970085626360216?Ct=-.05054316446311788:Ct=.06528096075929847:e[29]>1e-35?Ct=.07763431964140277:Ct=-.017239135292908336:Ct=-.011068823413100247;let Pt;e[91]>1e-35?Pt=-.03524202222673902:e[55]>1e-35?Pt=-.07505808762820981:e[47]>1e-35?Pt=-.026314216162986376:e[49]>1e-35?Pt=-.045488810456426665:e[54]>1e-35?Pt=-.06424779605129435:e[0]>1e-35?e[39]>1e-35?Pt=-.03267263134559766:e[46]>1e-35?Pt=-.049285436356671077:e[51]>1e-35?Pt=-.09277060040547602:e[4]>.8958797346140276?e[123]>1e-35?Pt=-.027164727231258436:e[7]>.4232249052377311?e[14]>1e-35?Pt=.021561483416797714:e[9]>1e-35?e[58]>1e-35?Pt=-.08387877475105178:Pt=.014404401501386124:Pt=.004694473365260974:Pt=-.0001897538693116325:Pt=-.017140588284242805:e[5]>9.119594757170685?e[3]>2.740319461670996?Pt=-.0007153953072197825:Pt=-.010378474356201449:e[8]>1e-35?e[5]>3.276966702012906?e[125]>1e-35?Pt=-.06966241558514917:e[4]>4.82429765145367?Pt=-.05703428861212874:Pt=-.007549683006633188:e[3]>1.2424533248940002?Pt=-.05340556429257431:Pt=.0524214727387076:e[22]>1e-35?Pt=-.012756524179901607:e[186]>1e-35?Pt=-.06578146880564559:e[208]>1e-35?Pt=.011189277267677045:e[11]>1e-35?e[58]>1e-35?Pt=-.05051984734793551:e[3]>1.2424533248940002?Pt=-.0002576217567062796:e[134]>1e-35?Pt=-.07452351335236179:Pt=-.010366062496356129:e[94]>1e-35?Pt=-.04206673603732986:Pt=.0017654268359667174;let yt;e[2]>2.3502401828962087?e[28]>1e-35?yt=.018743416209068924:e[142]>1e-35?yt=-.027628078748284907:e[4]>1.7005986908310777?e[123]>1e-35?yt=-.039485087567133176:e[48]>1e-35?yt=-.04707407726639779:e[49]>1e-35?yt=-.0644727439161007:e[47]>1e-35?yt=-.03586301268310228:e[52]>1e-35?yt=-.08213761833929575:e[60]>1e-35?yt=-.036939376764301805:e[22]>1e-35?yt=-.02264827779335228:e[153]>1e-35?e[24]>1e-35?yt=.03651632275248908:yt=-.010403215174169965:e[18]>1e-35?e[31]>1e-35?yt=.17011943799802248:yt=-.024083374989820074:e[147]>1e-35?yt=-.05792387046048145:e[39]>1e-35?yt=-.019000152117179:e[54]>1e-35?yt=-.09256681585621543:e[50]>1e-35?yt=-.06535283940797192:e[187]>1e-35?yt=-.023020538580498528:e[149]>1e-35?yt=-.09670391878996044:e[8]>1e-35?e[6]>5.865049616265698?yt=.0007122257672540384:yt=-.024203929126070334:e[55]>1e-35?yt=-.10687519344783902:e[21]>1e-35?yt=-.019836359134795922:yt=.0028141634686288143:e[153]>1e-35?yt=-.044827592367532504:yt=-.009894012855110334:e[140]>1e-35?e[18]>1e-35?yt=.060584003745668275:yt=-.015006980258423744:e[6]>5.161920636569023?e[125]>1e-35?yt=-.021624709427283298:yt=.0035264081894521636:yt=-.0030260520850755417;let Kt;e[57]>1e-35?Kt=-.06665941268716478:e[2]>5.4049245766661995?Kt=-.0048763725607228565:e[17]>1e-35?Kt=.012937023835595996:e[91]>1e-35?Kt=-.032642493399923284:e[40]>1e-35?Kt=-.04355571234278559:e[14]>1e-35?e[217]>1e-35?Kt=-.030555708374197955:Kt=.010895997063478696:e[1]>1e-35?e[99]>1e-35?Kt=.016029829045206837:e[114]>1e-35?Kt=.017475123428921584:e[139]>1e-35?Kt=-.042037981483985604:e[210]>1e-35?e[29]>1e-35?Kt=.015395913258454092:Kt=-.024779051599098958:e[90]>1e-35?Kt=-.09436512907953146:e[25]>1e-35?Kt=-.0385103760507401:e[113]>1e-35?Kt=.014955995782471:e[208]>1e-35?Kt=.01363101947809469:Kt=.0004708078358576994:e[29]>1e-35?Kt=-.02567148566035587:e[217]>1e-35?Kt=.017896286118860596:e[118]>1e-35?Kt=-.04366196842115269:e[144]>1e-35?Kt=-.04332564222613586:e[54]>1e-35?Kt=-.08095356842154083:e[31]>1e-35?e[15]>1e-35?Kt=-.12797365603832508:Kt=.05407709367007049:e[56]>1e-35?Kt=.030874690971051524:e[148]>1e-35?Kt=-.06664437092250396:e[50]>1e-35?Kt=-.05710031053092695:e[114]>1e-35?e[18]>1e-35?Kt=-.12348764088627251:Kt=-.014081947133593207:e[147]>1e-35?Kt=-.044629298717173554:Kt=-.000742893245658901;let Xt;e[138]>1e-35?Xt=.008266725465725232:e[1]>1e-35?e[37]>1e-35?Xt=-.06288072801700428:e[114]>1e-35?Xt=.01701875404216428:e[128]>1e-35?Xt=-.022207708344996902:e[113]>1e-35?e[24]>1e-35?Xt=.08078133512323216:Xt=.010126216487392538:e[11]>1e-35?e[58]>1e-35?Xt=-.0542116306120395:Xt=-.004962440421854299:e[155]>1e-35?e[30]>1e-35?Xt=.02107443326718807:Xt=-.01069225359959257:Xt=.0009105709984003484:e[218]>1e-35?Xt=.05160355321154702:e[134]>1e-35?Xt=.006114948378400552:e[121]>1e-35?Xt=.016106484014031797:e[89]>1e-35?Xt=.01912348851711998:e[56]>1e-35?Xt=.029777849606436514:e[157]>1e-35?Xt=.04060172642469715:e[31]>1e-35?Xt=.040190765597096945:e[115]>1e-35?Xt=.038285461163007885:e[144]>1e-35?Xt=-.04397941351839926:e[53]>1e-35?Xt=-.09153555712989248:e[34]>1e-35?Xt=.05063635650139542:e[145]>1e-35?Xt=-.05531793235403996:e[18]>1e-35?e[142]>1e-35?Xt=.050915836711889595:Xt=-.038668153033606156:e[142]>1e-35?Xt=-.03161888799270195:e[21]>1e-35?Xt=-.039152400008548416:e[147]>1e-35?Xt=-.06369054146375448:e[146]>1e-35?Xt=-.06687062048733548:e[143]>1e-35?Xt=-.0374398909044375:Xt=-.004075281311375503;let lr;e[19]>1e-35?lr=.011138060439416179:e[7]>.054053454943712505?e[17]>1e-35?e[30]>1e-35?lr=.031458353209402545:lr=.006712963530887799:e[135]>1e-35?lr=-.008268741342836259:e[60]>1e-35?lr=-.026373116795568554:e[7]>.8375851232899904?e[3]>2.602003343538398?e[6]>4.832297822126891?lr=.001164103411669833:e[8]>1e-35?lr=-.04419920795209664:lr=-.007580602414427876:e[6]>3.417592293073651?e[6]>8.80963889693121?lr=-.00653283113371423:e[8]>1e-35?e[125]>1e-35?lr=-.10156793652811894:lr=-.004200534838133274:e[18]>1e-35?lr=-.01192673279840267:lr=.007421951916920296:e[7]>.9626084674797213?e[29]>1e-35?e[6]>2.970085626360216?lr=-.0032059430383565256:lr=.05159315082197918:e[8]>1e-35?lr=-.0890031715943104:e[22]>1e-35?lr=-.16814104441488775:e[12]>1e-35?e[100]>1e-35?lr=.1021284677424052:lr=-.13655977142603173:lr=.09393254504800182:lr=-.0008030674521708154:e[153]>1e-35?e[18]>1e-35?lr=.028570793527563892:lr=-.01146507406243734:e[125]>1e-35?e[3]>1e-35?lr=-.04344386283066575:lr=.049543778722220704:e[47]>1e-35?lr=-.025602694767462936:lr=41633336342102227e-21:e[3]>2.3502401828962087?e[3]>3.3497501700808394?lr=-.018924000087166926:lr=.005374758944061522:e[14]>1e-35?lr=.02825013192303339:lr=-.028367959366723622;let ge;e[190]>1e-35?ge=-.033259392758942484:e[4]>2.4414009612931857?e[123]>1e-35?ge=-.030965448877928344:e[150]>1e-35?ge=-.05353588365501967:e[53]>1e-35?ge=-.07322459471644706:e[0]>1e-35?e[6]>6.9012339353508745?ge=.007566110700214329:e[4]>3.0677824455408698?e[7]>.5242163672259389?e[8]>1e-35?e[6]>4.722943345003718?ge=-.00508197369229565:e[4]>3.5694334999727624?ge=-.09566908841488272:ge=-.009799018561370653:e[29]>1e-35?ge=.01134634874419129:ge=-.008480456528154491:ge=-.010775036248093376:ge=.006611525544742429:e[23]>1e-35?ge=.01761735039511882:e[19]>1e-35?ge=.01278442042249664:ge=-.0002242132003162585:e[186]>1e-35?ge=-.1282956565830828:e[99]>1e-35?ge=.018493666625505303:e[141]>1e-35?ge=-.026024552608676074:e[29]>1e-35?e[5]>3.5694334999727624?e[217]>1e-35?ge=.010089877008871859:e[7]>.9569480028661056?ge=-.0021891593882122327:ge=-.019455050281455402:e[7]>.960816451500545?ge=-.13777176433158442:ge=.02722608122697913:e[28]>1e-35?e[194]>1e-35?ge=.09549833737461155:ge=.012447932823540411:e[129]>1e-35?e[26]>1e-35?ge=.147381625399948:ge=-.03418523266130075:e[7]>.26911173821332884?ge=.0014660191124088442:e[217]>1e-35?ge=-.08282397562490618:e[210]>1e-35?ge=-.0386848317545183:ge=-.001892646396528824;let Me;e[57]>1e-35?Me=-.059790543460520464:e[55]>1e-35?Me=-.06524069243313577:e[3]>4.283562780082224?e[37]>1e-35?Me=-.054605342954169904:Me=-.006343751747681404:e[17]>1e-35?Me=.011961708215735271:e[40]>1e-35?Me=-.04296088601962452:e[6]>1e-35?e[24]>1e-35?e[113]>1e-35?e[6]>4.460127707454046?Me=-.026498922218692673:Me=.10501477027016158:e[6]>4.03420147928485?Me=.012792216148037112:e[7]>.9830997303909479?Me=-.2271005546552327:Me=-.008348690537914538:e[9]>1e-35?e[153]>1e-35?e[7]>.20588252599634785?Me=-.004842123367456505:Me=-.03575275485660392:e[99]>1e-35?e[1]>1e-35?Me=.032397176999597294:Me=-.0033271937210452387:e[204]>1e-35?Me=.02154799118278769:Me=.0034498877728340095:e[28]>1e-35?e[6]>3.0677824455408698?e[6]>5.5816130673839615?Me=.01602715871650751:e[7]>.9901971344332651?e[194]>1e-35?Me=-.21161676626091178:e[127]>1e-35?Me=-.4024450297968636:Me=-.030976570087232314:Me=.0031980605341801454:Me=.07943810970798848:e[135]>1e-35?Me=-.00869354055420051:e[123]>1e-35?Me=-.022241787113206086:e[62]>1e-35?Me=.037165483434744594:e[7]>.04507521918085865?e[21]>1e-35?Me=-.013433718654288605:e[155]>1e-35?Me=.00919342834132915:Me=-.0002729025327531227:Me=-.012537468897218136:Me=-.07894994665155514;let Je;e[4]>.8958797346140276?e[14]>1e-35?Je=.007800140351631253:e[138]>1e-35?Je=.007294945388686309:e[1]>1e-35?e[32]>1e-35?e[28]>1e-35?Je=.09462192942805535:Je=-.06376046128949985:e[37]>1e-35?Je=-.06442220885770956:e[140]>1e-35?e[30]>1e-35?Je=-.09261012186873348:Je=-.015294712278584928:e[98]>1e-35?Je=.019329173498247088:e[58]>1e-35?Je=-.026405515460271967:e[5]>8.608586615680721?e[4]>2.602003343538398?Je=6125118307170923e-20:Je=-.009497787119169794:e[40]>1e-35?Je=-.05491317248554455:e[7]>.30853255358841714?Je=.003951848833690266:Je=-.0021827028977256715:e[219]>1e-35?Je=-.03918852409108207:e[98]>1e-35?Je=-.025490621458423603:e[218]>1e-35?Je=.04685239586600909:e[4]>2.970085626360216?e[152]>1e-35?Je=.019288400231624092:e[132]>1e-35?Je=.04845025214421127:e[157]>1e-35?Je=.03681235344369351:e[18]>1e-35?Je=-.034132162265456074:e[48]>1e-35?Je=-.04861483835690636:e[142]>1e-35?Je=-.031057400959951156:e[148]>1e-35?Je=-.06903688486009983:Je=-.004426858558248682:e[31]>1e-35?Je=.06983425899920179:Je=.002335587968443938:e[19]>1e-35?Je=.04178364096434334:e[123]>1e-35?Je=.03954255208630935:e[62]>1e-35?Je=.07169067239737285:Je=-.022094630155173406;let rt;e[190]>1e-35?rt=-.029705030481716018:e[2]>2.4414009612931857?e[125]>1e-35?e[3]>1e-35?rt=-.052080713549693486:rt=.015237248725743169:e[49]>1e-35?rt=-.05738028956460733:e[28]>1e-35?rt=.015629889576502864:e[14]>1e-35?rt=.007178838639724632:e[217]>1e-35?rt=.006873744757442591:e[3]>.8958797346140276?rt=-.0009297977761919447:e[4]>2.740319461670996?rt=-.0032588616048005344:e[209]>1e-35?rt=-.09352716353634213:rt=-.015820890219545396:e[0]>1e-35?e[2]>.8958797346140276?e[30]>1e-35?rt=.019248760742983276:e[3]>2.861792550976191?e[6]>8.372051799062541?rt=.011687619771455333:rt=-.014380012538782239:rt=.007119108038702808:e[5]>4.424828703319957?e[3]>2.249904835165133?rt=-.004571416888569663:e[4]>.8958797346140276?e[2]>1e-35?rt=.03291298609827498:rt=.056149641245301286:e[6]>5.66469358412419?rt=.03259771207074825:rt=-.09357704176112766:e[135]>1e-35?e[4]>3.1132683346437333?e[4]>3.276966702012906?rt=-.061655392996083594:rt=-.32745698278768204:rt=.05791789791717941:rt=-.018505458368810124:e[2]>1.2424533248940002?rt=.0026761409362875913:e[3]>1e-35?e[30]>1e-35?e[210]>1e-35?rt=-.039544237504098204:rt=-.00840469876565937:e[138]>1e-35?rt=-.03964217397514852:rt=-4311139741723525e-22:e[5]>6.136645972583987?rt=-.022772355719852342:rt=.00817231129409795;let St;e[91]>1e-35?St=-.028069212077752072:e[2]>5.1209788959100075?e[25]>1e-35?e[4]>3.314020688089767?St=-.07374751231467579:St=-.012603466600012023:St=-.003323309316995181:e[0]>1e-35?e[2]>1.2424533248940002?e[11]>1e-35?St=-.008138434386494645:e[2]>1.8688348091416842?e[18]>1e-35?St=-.021752576521312197:e[142]>1e-35?St=-.03703704004008216:e[21]>1e-35?St=-.031901873695323615:St=.0007949433315561949:e[156]>1e-35?St=.04622194605125366:St=.007164185384903575:e[156]>1e-35?St=.05649230717257425:e[192]>1e-35?St=-.14560972428612223:e[144]>1e-35?St=-.0847860756426489:e[4]>.8958797346140276?e[2]>.8958797346140276?St=.009443385055723438:e[9]>1e-35?St=.0384706300742172:e[7]>.9738681190948303?e[7]>.9983480540068196?St=.03566002120217884:e[125]>1e-35?St=-.08601531943220733:e[28]>1e-35?St=-.07136595081940608:St=.005430826378707227:St=.026279964393698674:e[2]>.8958797346140276?St=.025916235406054845:St=-.05093685243097706:e[2]>.8958797346140276?e[4]>2.4414009612931857?e[22]>1e-35?St=-.018458649485324576:e[123]>1e-35?St=-.027048533130577097:e[9]>1e-35?St=.005768627348361876:St=.0011976274380886302:e[196]>1e-35?St=.024074476840894424:St=-.0040891042038809855:e[156]>1e-35?St=-.03722816735059365:St=-.004021663177778795;let bt;e[57]>1e-35?bt=-.054174378986311306:e[55]>1e-35?bt=-.05937408126377534:e[35]>1e-35?bt=-.06355743050048665:e[52]>1e-35?bt=-.049028563645544726:e[10]>1e-35?e[152]>1e-35?bt=.023779508772836917:e[217]>1e-35?bt=.00760039749111183:bt=-.005758267779536595:e[6]>1e-35?e[50]>1e-35?bt=-.03899686693288482:e[53]>1e-35?bt=-.06158372699069763:e[19]>1e-35?bt=.009506113370718208:e[154]>1e-35?bt=-.021220440237800273:e[129]>1e-35?e[26]>1e-35?bt=.12643307498280917:bt=-.02322694568396696:e[49]>1e-35?bt=-.03489161935560748:e[173]>1e-35?bt=-.041310484369004336:e[116]>1e-35?bt=-.026931019221510855:e[150]>1e-35?bt=-.04336081700276943:e[46]>1e-35?bt=-.01503021840754708:e[21]>1e-35?bt=-.011723313966476847:e[187]>1e-35?e[30]>1e-35?bt=.029035482597327224:bt=-.020238143126606493:e[22]>1e-35?bt=-.0092659038594408:e[6]>8.954867306462836?bt=-.002270298325316596:e[25]>1e-35?e[1]>1e-35?e[152]>1e-35?bt=.025059955137215612:bt=-.058962720741665454:bt=4061285457160542e-20:e[7]>.787025207541384?bt=.0045073893285534905:e[156]>1e-35?bt=-.00956127321029558:e[153]>1e-35?bt=-.006428735642845697:bt=.0020065887307204903:bt=-.07142994726664682;let Mt;e[190]>1e-35?Mt=-.026482483927372538:e[11]>1e-35?e[153]>1e-35?Mt=-.019448665116575673:e[46]>1e-35?Mt=-.046207503035123526:e[143]>1e-35?Mt=-.060693025841649276:e[125]>1e-35?Mt=-.0635615784828548:Mt=-.0020226769939179086:e[10]>1e-35?e[152]>1e-35?Mt=.021657999498329004:e[217]>1e-35?Mt=.006867901248533881:e[186]>1e-35?Mt=-.17526174685635476:e[7]>.3736576099860928?e[125]>1e-35?Mt=-.06860813037660739:Mt=-.0030373931794416857:e[153]>1e-35?Mt=-.036659407900460406:Mt=-.009138716679401575:e[8]>1e-35?e[141]>1e-35?Mt=.022488528656368925:Mt=-.004824813956579289:e[155]>1e-35?e[29]>1e-35?Mt=-.0923825728762917:Mt=.013279779321478072:e[13]>1e-35?e[29]>1e-35?Mt=-.02015430689927317:Mt=-.0014075476679032272:e[21]>1e-35?Mt=-.010052866682366596:e[15]>1e-35?e[127]>1e-35?Mt=-.11613127921904604:Mt=-.004425492436566155:e[61]>1e-35?Mt=-.04761391619756717:e[38]>1e-35?Mt=.010790742168686546:e[138]>1e-35?e[25]>1e-35?Mt=-.03936956646884221:Mt=.012187893435100131:e[18]>1e-35?e[46]>1e-35?Mt=.052404637972043124:e[29]>1e-35?e[219]>1e-35?Mt=-.026128288926960785:Mt=.01402455905339408:Mt=-.018095204676971146:Mt=.002238241111198228;let Ot;e[3]>4.993822430271426?Ot=-.021704560089024494:e[39]>1e-35?Ot=-.012978601337522922:e[57]>1e-35?Ot=-.04850734344953324:e[190]>1e-35?Ot=-.02323817835232452:e[55]>1e-35?Ot=-.054265924680079236:e[144]>1e-35?Ot=-.020797331827991154:e[52]>1e-35?Ot=-.04407078296749134:e[50]>1e-35?Ot=-.03531075513550682:e[14]>1e-35?e[217]>1e-35?Ot=-.02603818360896512:Ot=.00845420085528292:e[90]>1e-35?e[3]>3.5114340430413216?Ot=.010289606334961197:Ot=-.10259966877314837:e[139]>1e-35?Ot=-.01903913128660918:e[17]>1e-35?e[30]>1e-35?Ot=.027295226228104732:e[38]>1e-35?Ot=.036847447575421244:e[3]>2.861792550976191?Ot=-.016454620470329126:Ot=.010475083165212631:e[19]>1e-35?Ot=.008675111927467:e[40]>1e-35?Ot=-.036362054443170776:e[9]>1e-35?Ot=.0031294075955568394:e[123]>1e-35?Ot=-.02131953072683769:e[24]>1e-35?e[113]>1e-35?e[3]>2.602003343538398?Ot=-.005045224468848018:e[3]>2.3502401828962087?Ot=.1006727710215487:Ot=-.21606952724358763:e[209]>1e-35?Ot=-.07903381656359819:Ot=.0099843967860757:e[28]>1e-35?Ot=.009909672751437115:e[155]>1e-35?e[3]>3.941534675652877?Ot=.04961274235179155:Ot=.005113567009198253:e[158]>1e-35?Ot=.031566828492110836:Ot=-.0012534895812835874;let wt;e[4]>2.4414009612931857?e[123]>1e-35?wt=-.022743199998420272:e[47]>1e-35?wt=-.02199867034393067:e[3]>3.238486181444842?e[155]>1e-35?wt=.015256601991879549:e[23]>1e-35?wt=.01997791344831838:e[97]>1e-35?wt=.024977281654938052:e[218]>1e-35?wt=.031730655567930977:e[32]>1e-35?e[1]>1e-35?wt=-.05855958691798028:wt=-.009630189044251312:e[195]>1e-35?wt=-.009842090802252708:e[125]>1e-35?wt=-.030084333742373532:wt=-.0009935375527704107:e[135]>1e-35?wt=-.006040875366017567:e[43]>1e-35?wt=-.03616920022546756:e[44]>1e-35?wt=-.014787601622259254:e[0]>1e-35?wt=.005949240867095038:wt=.0018435357767462809:e[141]>1e-35?e[3]>1e-35?wt=-.030610116678182732:wt=.01960307197844505:e[3]>1.2424533248940002?e[101]>1e-35?wt=-.04366907994393087:e[28]>1e-35?e[194]>1e-35?wt=.0927536258129216:wt=.00806369969474508:e[198]>1e-35?wt=.03402296877725087:wt=-.00033907517363096143:e[194]>1e-35?e[19]>1e-35?wt=-.16957712930341856:e[28]>1e-35?wt=-.2078243840685859:wt=-.01982072284112783:e[134]>1e-35?wt=-.059093837808976674:e[155]>1e-35?wt=-.11429749518431415:e[1]>1e-35?e[123]>1e-35?wt=.04159085402090426:wt=-.0053579302271092874:wt=-.038428527597709254;let kt;e[2]>2.249904835165133?e[53]>1e-35?kt=-.09149569302330776:e[142]>1e-35?kt=-.020143603866796752:e[29]>1e-35?e[1]>1e-35?e[4]>2.740319461670996?e[0]>1e-35?kt=-.005838073295705989:kt=.0025448179376697196:e[217]>1e-35?kt=.010391363152324442:e[6]>3.9219243190762363?e[7]>.9546729796082215?kt=.00016709708501075782:kt=-.019274537854809464:e[7]>.9717523368299734?e[2]>4.848108675189105?kt=.0038332904395533517:e[141]>1e-35?e[6]>3.0677824455408698?kt=-.12592300140122323:kt=-1.2073741246841418:kt=-.17682453022795175:kt=-.004373737265888883:kt=-.032810714691009164:e[18]>1e-35?kt=-.024280045660709612:e[156]>1e-35?kt=-.023509654115095334:e[1]>1e-35?e[141]>1e-35?kt=-.032438707623116556:e[32]>1e-35?kt=-.061272201063817755:kt=.004415514992097752:kt=-.0017176659108089432:e[0]>1e-35?e[6]>6.288787065535392?e[2]>.8958797346140276?kt=.008680085548304642:e[29]>1e-35?kt=.03767506445697859:kt=-.0007537359215762705:e[4]>.8958797346140276?kt=.0002799056937607271:kt=-.039667032027283916:e[2]>1.2424533248940002?kt=.002506908961838236:e[29]>1e-35?e[7]>.950335336459789?kt=.0027367426972748597:kt=-.021265206402010337:e[30]>1e-35?e[210]>1e-35?kt=-.03496264625173957:kt=-.007705718616493613:e[138]>1e-35?kt=-.035840689909527164:kt=.0006855012949462712;let _t;e[2]>5.418317700738354?e[5]>6.0051201133541365?e[156]>1e-35?_t=-.024776046248283234:_t=-.004761578172448051:e[8]>1e-35?_t=-.025343070913887773:_t=.012224469039913016:e[150]>1e-35?_t=-.04079051452350429:e[10]>1e-35?e[152]>1e-35?_t=.019743419118584654:e[186]>1e-35?_t=-.15575093795294756:e[217]>1e-35?_t=.0056968023991711995:_t=-.004356449942923164:e[5]>6.0051201133541365?e[125]>1e-35?_t=-.01597803134795572:e[151]>1e-35?_t=-.05058454115923059:e[50]>1e-35?_t=-.03619853041443809:e[49]>1e-35?_t=-.03261722685392842:e[24]>1e-35?_t=.011909155984778505:e[2]>2.012675845367575?_t=.0004933624031973823:e[219]>1e-35?_t=.015579421213152617:_t=.002812703494519415:e[113]>1e-35?e[24]>1e-35?_t=.09675188599473092:_t=.0008025077587732017:e[204]>1e-35?e[9]>1e-35?e[5]>3.772694874805912?_t=.02609533140492082:e[29]>1e-35?_t=-.21256031284758028:_t=.09442590919716193:_t=-.004086903422513798:e[24]>1e-35?e[5]>3.979637980058199?_t=-.011071875945121415:e[209]>1e-35?_t=-.19367443751378252:_t=-.04414838576908475:e[178]>1e-35?_t=-.06538606241685795:e[100]>1e-35?e[5]>3.772694874805912?_t=-.01294941588968201:e[5]>2.673553765358735?_t=.08150000027300734:_t=-.08989919051554107:_t=-.0032151101072856354;let qt;e[35]>1e-35?qt=-.05704221149718709:e[91]>1e-35?qt=-.023832002943165256:e[102]>1e-35?qt=.015441451551750014:e[3]>4.993822430271426?qt=-.020159490027748073:e[4]>2.3502401828962087?e[144]>1e-35?qt=-.022873219553742163:e[22]>1e-35?qt=-.01287591196884623:e[47]>1e-35?e[18]>1e-35?qt=.07657102696661595:qt=-.0243921910773003:e[150]>1e-35?qt=-.043982850497096056:e[138]>1e-35?e[25]>1e-35?qt=-.03740348349716821:qt=.008237493112057112:e[49]>1e-35?qt=-.03254806921800082:e[53]>1e-35?qt=-.057370285686186163:e[3]>4.085941003063911?e[37]>1e-35?qt=-.04084726667137505:e[155]>1e-35?qt=.0323666619020495:qt=-.0038866525930422893:e[118]>1e-35?e[18]>1e-35?qt=-.0975422096275863:qt=-.014038224866250074:e[136]>1e-35?qt=-.03199938604211209:qt=.0014268928516615767:e[99]>1e-35?qt=.018668567929263327:e[5]>7.334002872979111?e[156]>1e-35?qt=-.05380541629812827:e[210]>1e-35?e[30]>1e-35?qt=-.047112416583853595:qt=.00900546030963941:e[208]>1e-35?qt=.02334424121914086:e[158]>1e-35?qt=.04595592178250823:qt=-.006709820970668842:e[204]>1e-35?e[5]>3.772694874805912?qt=.009489783712825852:e[3]>2.249904835165133?qt=.09999429949553015:qt=-.03961464289941561:qt=-.001190853283470586;let $t;e[39]>1e-35?$t=-.011391872842603505:e[190]>1e-35?$t=-.021093147889461955:e[51]>1e-35?e[18]>1e-35?$t=.08723256651643213:$t=-.04233732133209843:e[19]>1e-35?$t=.008078856044745801:e[4]>.8958797346140276?e[60]>1e-35?$t=-.022165860715145688:e[129]>1e-35?e[3]>3.314020688089767?$t=.019990677612126993:$t=-.035520772730423776:e[153]>1e-35?e[2]>.8958797346140276?$t=-.006946377120973384:e[0]>1e-35?e[8]>1e-35?e[5]>5.692045796563381?$t=.04230611914121616:$t=-.1152833284663223:$t=.03987788751961305:$t=-.02748865099804465:e[46]>1e-35?e[18]>1e-35?$t=.047655531405650486:$t=-.022707509947190632:e[18]>1e-35?e[3]>.8958797346140276?e[31]>1e-35?$t=.1425984397283696:e[143]>1e-35?$t=.05597721538261218:$t=-.02117927246804007:$t=.011077153043550766:e[143]>1e-35?$t=-.0158979963012007:e[187]>1e-35?e[30]>1e-35?$t=.02515771028113912:$t=-.019084229614362958:e[49]>1e-35?e[1]>1e-35?$t=.014623537050735559:$t=-.05320125987679328:e[58]>1e-35?e[3]>3.1132683346437333?$t=.021421346835282216:$t=-.03287702034784505:e[16]>1e-35?$t=.008645735809593434:e[3]>4.993822430271426?$t=-.01889537207927676:$t=.00131546333396141:e[153]>1e-35?$t=-.09822789507794744:$t=-.010292962989428067;let Zt;e[11]>1e-35?e[156]>1e-35?e[4]>3.1132683346437333?Zt=-.009153166060719259:Zt=-.035386636811765286:e[58]>1e-35?Zt=-.03881024236774208:e[153]>1e-35?e[7]>.12645023619128054?Zt=-.01286680669029116:Zt=-.0573874491021103:e[3]>3.276966702012906?e[38]>1e-35?Zt=-.03084033316462023:Zt=-.00517175216868761:e[195]>1e-35?Zt=.01773824295809578:e[131]>1e-35?Zt=-.17828043850421407:Zt=.0005554487984838318:e[7]>.14547530463198097?e[105]>1e-35?Zt=-.018589129226123456:e[116]>1e-35?Zt=-.0227108777687536:e[24]>1e-35?Zt=.009520152980411787:e[135]>1e-35?Zt=-.004364970908897872:e[0]>1e-35?e[18]>1e-35?Zt=-.015737703364129243:Zt=.003711277180349787:e[12]>1e-35?e[4]>3.540854293052788?e[155]>1e-35?Zt=.04655165952772795:Zt=.009321761971665682:e[210]>1e-35?Zt=.018839890489201528:e[129]>1e-35?Zt=-.03111680952187252:Zt=.0002649813454447912:e[23]>1e-35?Zt=.014110539528977999:e[109]>1e-35?Zt=.014168740682742625:Zt=-.0008607565404007093:e[3]>2.3502401828962087?e[9]>1e-35?e[4]>3.3842466058243152?Zt=-.004252607769147212:Zt=.02017003996344357:e[16]>1e-35?Zt=.01594899805169211:Zt=-.006372071796745688:e[12]>1e-35?Zt=-.0251011457777017:e[121]>1e-35?Zt=-.07822588279288774:Zt=-.005026529762858;let dr;e[7]>.8375851232899904?e[155]>1e-35?e[3]>1.2424533248940002?dr=.014982109981371684:dr=-.08302064203662592:e[3]>2.602003343538398?e[125]>1e-35?dr=-.02862612402789537:dr=-.0004831913476108919:e[42]>1e-35?dr=-.08030278175390543:e[90]>1e-35?dr=-.11931838045625616:dr=.003328726909052652:e[125]>1e-35?e[3]>1e-35?dr=-.03347653784336098:dr=.0381767649776156:e[3]>2.4414009612931857?e[3]>3.1132683346437333?e[137]>1e-35?dr=.04078434374172937:e[130]>1e-35?dr=.04811471469938318:e[152]>1e-35?dr=.012079515899716571:e[23]>1e-35?dr=.017817807971301534:e[122]>1e-35?dr=.049338146544587284:e[115]>1e-35?dr=.026905923036994708:e[10]>1e-35?dr=-.008135082370740723:e[89]>1e-35?dr=.023584069012120446:e[95]>1e-35?dr=.013988944683250695:dr=-.002584756192745314:e[139]>1e-35?dr=-.04454469703180858:e[99]>1e-35?e[3]>2.524928003624769?dr=.010620580427538877:dr=.047779724434429495:e[131]>1e-35?dr=-.08155143867377633:dr=.0031488702256745843:e[7]>.06275229375044648?e[99]>1e-35?dr=.016956254821045937:e[90]>1e-35?dr=-.11685880917620971:e[210]>1e-35?e[11]>1e-35?dr=-.040607887814632475:dr=-.006287900824728332:dr=-.0018997472673294537:e[14]>1e-35?dr=.02358706984105576:dr=-.01737075534918072;let xr;e[6]>1e-35?e[2]>5.4049245766661995?e[5]>6.441743353550561?e[29]>1e-35?e[4]>2.673553765358735?xr=-.007517267159018327:xr=-.02379463821120899:xr=-.0026543290628044274:e[8]>1e-35?xr=-.022865480180725452:xr=.009005117181880752:e[6]>5.161920636569023?e[0]>1e-35?e[2]>.8958797346140276?e[2]>2.012675845367575?e[3]>2.3502401828962087?xr=.0021573820428423146:xr=-.0046125093600082965:e[3]>3.314020688089767?xr=-.005566488595229649:e[6]>6.288787065535392?xr=.012796965207082116:xr=-.0023971957228440767:e[3]>2.249904835165133?e[2]>1e-35?xr=-.0003832411399288501:e[1]>1e-35?xr=-.03148874544425103:xr=-.3158553329522586:e[2]>1e-35?xr=.025981575700247922:xr=.052944809618023905:e[6]>8.681774988134558?e[3]>2.970085626360216?xr=-.0005280655103032829:xr=-.009402467452152188:e[2]>.8958797346140276?xr=.0018798828715775142:e[3]>1.7005986908310777?xr=-.0002583719758369029:xr=-.014467497542301198:e[128]>1e-35?xr=-.03075061856353219:e[3]>3.0201273556387074?e[8]>1e-35?xr=-.03107874404542307:xr=-.0063178690978266385:e[113]>1e-35?e[24]>1e-35?xr=.10168122236339333:xr=.0027676566086997536:e[100]>1e-35?e[3]>1.4978661367769956?xr=-.019182725682091863:e[3]>1.2424533248940002?xr=.10007959215270637:xr=-.049901874168813753:e[12]>1e-35?xr=-.008354674563617942:xr=.000556773623388255:xr=-.06338083699889271;let ur;e[14]>1e-35?e[5]>7.841296344941067?e[217]>1e-35?ur=-.03452197748259044:e[141]>1e-35?ur=-.05526745933972476:ur=.003096257901065188:ur=.013468654879205778:e[90]>1e-35?ur=-.04633994478668718:e[7]>.04507521918085865?e[39]>1e-35?ur=-.011427282692256308:e[188]>1e-35?ur=-.11824461537515621:e[17]>1e-35?e[5]>3.276966702012906?ur=.009014346731620665:ur=-.10784986305366669:e[102]>1e-35?ur=.014356846380168074:e[109]>1e-35?ur=.0100955463134877:e[31]>1e-35?ur=.025672511171270042:e[127]>1e-35?ur=-.10904631172619624:e[19]>1e-35?ur=.007015456473363717:e[60]>1e-35?ur=-.02409044800892067:e[217]>1e-35?e[7]>.9914949911911836?ur=.02334115299069277:e[1]>1e-35?ur=-29013080593250377e-21:ur=.014307421165143329:e[1]>1e-35?e[42]>1e-35?ur=-.06673983904970003:e[37]>1e-35?ur=-.05636396687178933:e[32]>1e-35?ur=-.042854874962508754:e[140]>1e-35?ur=-.014546243613252019:e[119]>1e-35?ur=.02592806792359847:ur=.0008331579108247542:e[12]>1e-35?ur=.004348565717870661:e[195]>1e-35?ur=-.016064193157584304:e[210]>1e-35?ur=-.01896835246692864:e[122]>1e-35?ur=.06415669138405272:e[219]>1e-35?ur=-.03191239858069586:ur=-.0022170295258555585:ur=-.00965022020696389;let mr;e[55]>1e-35?mr=-.04649484416236924:e[6]>1e-35?e[35]>1e-35?mr=-.04814595674860986:e[173]>1e-35?mr=-.030965289355370126:e[190]>1e-35?mr=-.01892908615035444:e[50]>1e-35?mr=-.03023310323845746:e[14]>1e-35?e[134]>1e-35?mr=.029102388421738776:e[217]>1e-35?mr=-.021829759931582565:mr=.005209049556942947:e[90]>1e-35?e[3]>3.276966702012906?mr=.007482519637019732:e[28]>1e-35?mr=.08823476156200263:mr=-.1134870648564767:e[17]>1e-35?e[5]>3.156774023138548?e[3]>2.861792550976191?e[134]>1e-35?mr=.037573808092493166:mr=-.008120569804875069:mr=.015185866424900767:mr=-.10150107137017012:e[39]>1e-35?mr=-.011108691883331833:e[4]>2.4414009612931857?e[123]>1e-35?mr=-.019406534412652932:e[22]>1e-35?mr=-.011646225036274034:e[118]>1e-35?e[1]>1e-35?mr=.007977856608752276:mr=-.038946271309380914:mr=.0009257226566265858:e[101]>1e-35?e[6]>5.769881059461895?mr=-.06484570063989317:mr=.016294764421436982:e[29]>1e-35?e[204]>1e-35?e[5]>5.859359688974663?mr=.036329398743295674:mr=-.20474934656494398:e[4]>1.7005986908310777?mr=-.0005630875641286038:e[5]>3.5694334999727624?e[19]>1e-35?mr=.03322386202318951:mr=-.01687696637036405:mr=-.10533305728771972:mr=-.0004901077590279651:mr=-.05758869249681345;let nr;e[57]>1e-35?nr=-.043478488738181505:e[53]>1e-35?nr=-.05188532777589009:e[11]>1e-35?e[156]>1e-35?nr=-.01733439245316815:e[58]>1e-35?nr=-.03508850349398082:e[134]>1e-35?e[38]>1e-35?e[3]>3.156774023138548?nr=-.02641618586067251:nr=.0053883499998111746:nr=-.04111067521339709:e[46]>1e-35?nr=-.03960880739147387:e[56]>1e-35?nr=.02833430038101972:e[3]>4.548585836935273?nr=-.028156779064728323:nr=-.0006287807275955149:e[105]>1e-35?nr=-.018589321466431944:e[187]>1e-35?e[30]>1e-35?nr=.021938681282791916:nr=-.016917430307970042:e[7]>.015258684697466883?e[132]>1e-35?nr=.026815659384164206:e[204]>1e-35?e[7]>.992067132663463?nr=-.010565408217521758:e[7]>.9738681190948303?e[9]>1e-35?e[30]>1e-35?nr=.09345774314045512:nr=-.003460687191126055:nr=.009778848673591349:nr=.006207652194161698:e[134]>1e-35?e[14]>1e-35?nr=.026940863472122597:nr=.004032635910042969:e[16]>1e-35?e[156]>1e-35?nr=-.014571620220052964:e[219]>1e-35?nr=.03394257525872151:e[189]>1e-35?nr=-.16441255476933125:nr=.006890416623408193:e[7]>.5866799179067689?e[156]>1e-35?e[9]>1e-35?nr=-.002374233797129139:nr=.015343494638416642:nr=.0007085956801478842:nr=-.0014226167854637043:nr=-.014931890774210171;let hr;e[52]>1e-35?hr=-.040552145534119004:e[88]>1e-35?hr=-.11616238297789526:e[147]>1e-35?e[21]>1e-35?hr=.08405882357263977:hr=-.028120036866471673:e[89]>1e-35?hr=.013417411709807947:e[138]>1e-35?e[25]>1e-35?hr=-.03104795267483152:e[8]>1e-35?hr=-.013793892541819341:hr=.007067793368543704:e[3]>4.212100162283537?e[37]>1e-35?hr=-.04169781427571004:e[59]>1e-35?hr=.039366779099462186:e[190]>1e-35?hr=-.0746572875957972:hr=-.0046665287028623895:e[31]>1e-35?e[3]>3.3497501700808394?hr=-.015043885860062665:hr=.04427790295514171:e[127]>1e-35?hr=-.09222397003880911:e[188]>1e-35?hr=-.11791399942046604:e[116]>1e-35?hr=-.022670774074606673:e[21]>1e-35?e[118]>1e-35?hr=-.08590814127371893:hr=-.009079159755287763:e[10]>1e-35?e[153]>1e-35?e[7]>.12025037553499339?hr=-.010834658570263708:hr=-.06942979142484561:e[59]>1e-35?hr=-.0368654965105411:e[186]>1e-35?hr=-.13585047638050318:hr=-.001475385731000911:e[11]>1e-35?e[47]>1e-35?hr=-.07021793045868131:e[58]>1e-35?hr=-.03264322466138671:e[153]>1e-35?e[7]>.4982752029697964?hr=-.000719771928860618:hr=-.02550581685370434:hr=-.001300530189452872:e[216]>1e-35?hr=-.04553949138490546:hr=.0013445292966782988;let Ie;e[152]>1e-35?Ie=.005642349825665321:e[108]>1e-35?e[1]>1e-35?Ie=.012759171568581189:Ie=-.0015650437871311187:e[102]>1e-35?Ie=.012533880283367552:e[10]>1e-35?e[4]>1.4978661367769956?e[7]>.9888588760569341?Ie=.007453521083396632:Ie=-.0036225862281260785:e[3]>.8958797346140276?Ie=-.0027177080775155366:e[5]>5.782284349061034?Ie=-.04454373321655838:Ie=.021964247026786614:e[11]>1e-35?e[47]>1e-35?Ie=-.06196070580382676:e[121]>1e-35?e[1]>1e-35?Ie=-.06122312462911518:e[7]>.3847172300624272?Ie=.03518239795956787:e[3]>2.4414009612931857?Ie=.006811972713764457:Ie=-.0933556055347465:e[5]>4.938058177869999?Ie=-.004012086267764631:Ie=.01930669434547199:e[5]>6.0051201133541365?e[27]>1e-35?Ie=-.012304580143719986:Ie=.0013650712455989071:e[3]>2.802901033147999?Ie=-.0083470520183599:e[7]>.5811983411966435?e[7]>.990877425524446?e[219]>1e-35?e[3]>1e-35?Ie=.06211865200552023:e[17]>1e-35?Ie=.06775644666502018:Ie=-.06866304616688222:e[217]>1e-35?Ie=.059656960273077646:Ie=-.004328630560280456:e[204]>1e-35?e[4]>2.249904835165133?Ie=.006371564018556469:e[3]>2.138333059508028?Ie=.09486061534469152:Ie=-.09409330595635478:e[4]>2.602003343538398?Ie=.011308844028341723:e[100]>1e-35?Ie=.0439316487073224:Ie=-.003403233436702135:Ie=-.00960652384005499;let O;e[144]>1e-35?e[18]>1e-35?O=.07197995497453837:e[1]>1e-35?O=-.001274320993832369:O=-.040032546534329444:e[52]>1e-35?e[18]>1e-35?O=.09098124993319018:O=-.04537404774072243:e[40]>1e-35?O=-.02515534903180516:e[53]>1e-35?O=-.04736675675905027:e[178]>1e-35?O=-.021374380471858013:e[55]>1e-35?O=-.04240162360893064:e[51]>1e-35?e[18]>1e-35?O=.07999652271774131:O=-.036649228565504045:e[109]>1e-35?O=.009067075019741765:e[54]>1e-35?e[1]>1e-35?O=.019160818735605257:O=-.05967997790089002:e[35]>1e-35?O=-.043420689526233285:e[173]>1e-35?O=-.027561163630755333:e[190]>1e-35?O=-.016370101115869642:e[14]>1e-35?e[217]>1e-35?O=-.019735056448517897:e[141]>1e-35?O=-.028090004807030017:O=.006865378253320941:e[139]>1e-35?e[1]>1e-35?O=-.032389864623829076:O=.005458607214221278:e[60]>1e-35?O=-.019089857559617188:e[153]>1e-35?e[18]>1e-35?O=.015189336996079859:e[19]>1e-35?O=.013745154147527805:e[1]>1e-35?O=-.005284271350108698:O=-.0374184512092477:e[18]>1e-35?e[99]>1e-35?O=-.0595395395199616:e[100]>1e-35?O=-.09991342902311327:O=-.0042488091801234805:O=.0006682804828197052;let de;e[46]>1e-35?de=-.012191380765172536:e[88]>1e-35?de=-.10266216005056819:e[91]>1e-35?de=-.018445844031974568:e[50]>1e-35?de=-.027431707051961525:e[144]>1e-35?e[7]>.9945060383544003?de=.03614842925379388:de=-.02095650990295711:e[4]>2.4414009612931857?e[123]>1e-35?e[3]>3.0201273556387074?de=-.01053451990903616:de=-.05114195197878968:e[16]>1e-35?de=.007316468830803533:e[9]>1e-35?de=.003316750172048933:de=860911526134492e-20:e[141]>1e-35?e[3]>1e-35?de=-.02547358042212171:de=.019472890771357998:e[186]>1e-35?de=-.09288424685816356:e[41]>1e-35?de=-.1310231930206974:e[42]>1e-35?de=-.056216247465863484:e[29]>1e-35?e[5]>3.5694334999727624?e[134]>1e-35?de=-.054747915129536466:e[1]>1e-35?e[131]>1e-35?de=-.16815706432319097:de=-.002818043413853223:de=-.041951940639575136:e[7]>.960816451500545?e[219]>1e-35?de=.10052885656939581:de=-.11599835225683999:de=.029922858316313545:e[101]>1e-35?e[5]>7.429817490674132?de=-.06576516230122952:de=-.0008540865426696243:e[210]>1e-35?e[114]>1e-35?de=.013062456952379193:e[7]>.7267616382562012?de=.0022613700798703854:de=-.03938763940013096:e[59]>1e-35?e[12]>1e-35?de=.008501036224046256:de=-.06542467236134167:de=.002585754319607976;let ye;e[28]>1e-35?ye=.008779900390406317:e[7]>.9880960409521241?e[8]>1e-35?ye=-.008991654120695218:e[3]>1e-35?e[140]>1e-35?ye=-.02731072195122447:ye=.002008744895602654:e[217]>1e-35?ye=.02359361264236281:ye=.007024522001417586:e[2]>2.138333059508028?e[3]>2.4414009612931857?e[125]>1e-35?ye=-.04199133736767654:e[47]>1e-35?ye=-.027561033349225085:e[3]>4.085941003063911?e[12]>1e-35?ye=.007807873722550442:e[152]>1e-35?ye=.030689318204494505:e[137]>1e-35?ye=.06699720359975746:ye=-.010441301216813357:e[118]>1e-35?ye=-.03153852460438172:e[48]>1e-35?ye=-.03440026517387997:ye=.0015296602873888215:e[0]>1e-35?e[2]>6.607325405747152?ye=-.027110120892630915:e[153]>1e-35?ye=-.017016088064422574:ye=-.005723165911539293:e[187]>1e-35?ye=-.031718114891806884:ye=-.0005272212291525389:e[0]>1e-35?e[2]>.8958797346140276?e[46]>1e-35?ye=-.09171631422683799:ye=.003327268948098216:e[3]>2.3502401828962087?e[125]>1e-35?ye=-.5887915327321841:e[2]>1e-35?ye=-.006637502258168407:ye=-.08424468641004934:e[125]>1e-35?ye=-.06617256968162606:ye=.028846174454930092:e[2]>1.2424533248940002?e[15]>1e-35?ye=-.016616715415331784:ye=.002680237807803091:e[3]>1e-35?ye=-.0012589163812412535:ye=-.015154395987664649;let J;e[6]>9.286096980078398?e[4]>2.970085626360216?J=-.001155963563974424:J=-.011949331884445141:e[6]>6.3071868642287745?e[2]>5.150393035655617?J=-.0033183579364470086:e[11]>1e-35?J=-.0018887492076874403:e[169]>1e-35?J=-.09486398911649394:J=.0025252552927441433:e[4]>3.0677824455408698?e[7]>.09963982551990838?e[141]>1e-35?e[6]>3.314020688089767?J=.012137569190879735:J=.09584425242224671:e[8]>1e-35?e[7]>.987306237235768?e[2]>.8958797346140276?J=-.020817404206469048:J=-.06464699261956137:J=-.008121005894366425:J=-.002273798477153842:e[4]>3.5114340430413216?J=-.024199637055494112:J=-.0044500308011184275:e[12]>1e-35?J=-.00483411782477681:e[5]>3.156774023138548?e[8]>1e-35?e[5]>3.772694874805912?e[6]>3.795426061844291?J=.0013628724281773107:J=-.04205266437322089:e[141]>1e-35?e[4]>2.861792550976191?e[5]>3.417592293073651?J=-.15445392240959782:e[2]>2.970085626360216?J=-.5683130345409004:J=-1.2639522532467855:J=-.12861577169349267:J=-.08527127841498366:e[4]>2.4414009612931857?e[7]>.29163353806150266?J=.003881870206848933:J=.01474849027472377:e[18]>1e-35?e[219]>1e-35?J=-.07387984252991263:J=-.013089382916580447:J=-.0008129634296833813:e[3]>2.3502401828962087?e[2]>3.1132683346437333?J=.019943967048858428:J=-.04278248600927625:e[17]>1e-35?J=-.11809979934412335:J=.03777084692378827;let F;e[57]>1e-35?F=-.03805766278012468:e[6]>9.286096980078398?e[2]>3.725620842493839?F=-.010152097691926694:F=-.000726856757223527:e[25]>1e-35?e[4]>2.917405368531303?e[6]>4.226807104886684?e[5]>8.866229029069968?F=.016965184252348844:F=-.027524673351863413:F=-.09999982742666325:e[219]>1e-35?F=-.11642840619184194:e[6]>3.1984648276080736?F=.02202934385365115:F=-.0758508504188626:e[17]>1e-35?e[5]>3.276966702012906?e[3]>2.861792550976191?e[38]>1e-35?F=.03529859841404316:F=-.005442656204983076:F=.013832633319757828:F=-.07099090377505678:e[40]>1e-35?e[12]>1e-35?F=.020780509349314687:F=-.0412229778697227:e[178]>1e-35?e[6]>4.832297822126891?F=-.012751356404573045:F=-.07365946414911166:e[6]>1e-35?e[91]>1e-35?F=-.018973855754862178:e[31]>1e-35?e[3]>3.3497501700808394?F=-.019342018507399077:F=.04336755184633714:e[52]>1e-35?F=-.034601279556920723:e[53]>1e-35?F=-.04570921257037347:e[4]>2.4414009612931857?e[22]>1e-35?F=-.009909029766665835:e[88]>1e-35?F=-.13759996623650647:F=.0010774168904012999:e[90]>1e-35?F=-.09942790916464699:e[5]>8.17933999189099?F=-.006237804261380787:e[154]>1e-35?F=-.02869365685254793:e[41]>1e-35?F=-.11951308633255478:F=.0005720279396045617:F=-.05091927304878396;let Te;e[2]>8.18910569469239?Te=-.011281718118735835:e[2]>8.136957041085973?Te=.007639929297282146:e[2]>6.178980383851587?Te=-.006867711027875817:e[6]>4.5379471377116305?e[125]>1e-35?e[3]>1e-35?Te=-.026657037414316055:Te=.03822052894720058:e[89]>1e-35?Te=.01442240494610187:Te=.0005482931472826037:e[3]>2.970085626360216?e[8]>1e-35?Te=-.04157937378268839:e[25]>1e-35?Te=-.07438346384769444:Te=-.007688780027797844:e[113]>1e-35?e[24]>1e-35?Te=.10208422768618285:Te=-.0025376848550412623:e[24]>1e-35?e[209]>1e-35?e[7]>.9738681190948303?Te=-.18081467351794253:Te=.06403272706376394:Te=-.006045919721112658:e[100]>1e-35?e[3]>1.4978661367769956?Te=-.034372452343283254:e[3]>1.2424533248940002?Te=.10087241747333926:Te=-.06270133551905664:e[12]>1e-35?e[209]>1e-35?Te=.02872327658284419:Te=-.012940407270969699:e[5]>3.276966702012906?e[8]>1e-35?Te=-.02165149142042258:e[3]>2.249904835165133?Te=.011522668417532612:Te=-.005129494488342788:e[3]>2.3502401828962087?e[2]>3.1132683346437333?Te=.018894357520732635:Te=-.03443967069634786:e[19]>1e-35?e[0]>1e-35?Te=.0868126244943877:e[2]>1.4978661367769956?e[194]>1e-35?Te=-.16834554324370338:Te=.08799302490518951:Te=.007907573815540844:e[17]>1e-35?Te=-.07843101628051594:Te=.04322926522720053;let Oe;e[7]>.987306237235768?e[8]>1e-35?e[5]>6.285066127789834?Oe=6536595256810364e-20:e[153]>1e-35?Oe=-.07687008855803332:Oe=-.015088524832702519:e[18]>1e-35?Oe=-.012556097563484098:e[217]>1e-35?e[5]>8.28387302567733?Oe=-.004574660978375117:Oe=.02566519458840368:Oe=.003837771337656032:e[28]>1e-35?e[194]>1e-35?e[29]>1e-35?e[5]>3.979637980058199?Oe=.04675774128546983:Oe=-.16922871147253024:e[5]>5.821564412917691?Oe=.017788548280824237:Oe=.101599048954043:e[5]>4.424828703319957?Oe=.009470487487627452:Oe=-.046977132290520585:e[95]>1e-35?Oe=.008579165333164537:e[204]>1e-35?e[7]>.9782662069407232?e[9]>1e-35?Oe=.0717824359443052:Oe=.01776258010455891:Oe=.003970948558978321:e[208]>1e-35?e[1]>1e-35?Oe=.012428835257375037:e[18]>1e-35?Oe=-.08152843296689005:Oe=-.0059907248803252305:e[109]>1e-35?Oe=.008117980905290326:e[89]>1e-35?e[1]>1e-35?Oe=-.08097766993639294:Oe=.014258345453663996:e[62]>1e-35?Oe=.025185598552042956:e[213]>1e-35?Oe=.01261362855232781:e[138]>1e-35?e[1]>1e-35?e[29]>1e-35?Oe=.004355449069502461:Oe=-.03327693117307522:e[29]>1e-35?Oe=-.024228224306581475:e[5]>5.244385543610066?Oe=.01690188327986934:Oe=-.02426164440751183:Oe=-.0016932467092565535;let xt;e[116]>1e-35?xt=-.018106356667092538:e[24]>1e-35?e[113]>1e-35?e[5]>4.658699722134796?xt=-.0289267666661116:xt=.10225466717059267:e[5]>3.979637980058199?xt=.007715497036238576:e[209]>1e-35?xt=-.1596622066794057:xt=-.02153459011172981:e[46]>1e-35?e[18]>1e-35?xt=.044010040060630896:xt=-.018791912393741998:e[39]>1e-35?xt=-.008648992983623099:e[3]>4.993822430271426?xt=-.01442291433054286:e[158]>1e-35?xt=.023944934429097977:e[21]>1e-35?xt=-.008731676115726167:e[51]>1e-35?e[18]>1e-35?xt=.07015276907667169:xt=-.03981801316250594:e[152]>1e-35?e[12]>1e-35?e[7]>.9811887196001154?xt=.025342984951627335:e[56]>1e-35?xt=-.039652717595259894:xt=-.003499774006708361:e[4]>3.676220550121792?xt=.026612369959601385:e[0]>1e-35?e[2]>2.012675845367575?xt=.012259156005894655:xt=.04466570041636591:xt=.002369030228609974:e[50]>1e-35?xt=-.02625338435100237:e[198]>1e-35?e[5]>3.156774023138548?e[4]>2.602003343538398?xt=.004706524615587467:xt=.03172381727140614:xt=-.08877100979833137:e[19]>1e-35?e[156]>1e-35?xt=.047690620764284854:xt=.004980692597287184:e[188]>1e-35?xt=-.10330323519600788:e[108]>1e-35?xt=.006389080836282864:e[217]>1e-35?xt=.0034861135133741716:xt=-.0005184951270632008;let Wt;e[150]>1e-35?Wt=-.03083355660591381:e[6]>8.681774988134558?e[0]>1e-35?Wt=.0032708551521722813:e[3]>2.970085626360216?Wt=-.0008773771112515323:Wt=-.008194765714031488:e[1]>1e-35?e[42]>1e-35?Wt=-.0544661644610188:e[114]>1e-35?Wt=.014743200719322279:e[25]>1e-35?Wt=-.03415156332118204:e[121]>1e-35?e[0]>1e-35?Wt=-.012241568524042012:Wt=-.08332027167107449:e[119]>1e-35?Wt=.02487058944439717:e[210]>1e-35?e[4]>2.602003343538398?Wt=.003409540133128587:e[7]>.985694415330804?Wt=.014360134818665793:Wt=-.029939754177999198:e[140]>1e-35?e[30]>1e-35?Wt=-.07017324311241228:Wt=-.00954038893956995:e[32]>1e-35?Wt=-.0321895511220355:Wt=.0018389054792352236:e[3]>.8958797346140276?e[138]>1e-35?Wt=.014210083256713822:e[3]>2.970085626360216?e[56]>1e-35?Wt=.03179391063657913:e[132]>1e-35?Wt=.044860161753142676:e[122]>1e-35?Wt=.056053352587009365:e[44]>1e-35?Wt=.011126140459263092:e[217]>1e-35?Wt=.015177735064648389:e[30]>1e-35?Wt=.00292550151642784:e[0]>1e-35?Wt=-.01370614277688821:Wt=-.00467240699644943:e[30]>1e-35?e[17]>1e-35?Wt=.06455607454604466:Wt=-.018525791968354337:e[127]>1e-35?Wt=.058525937257934674:Wt=.004550050432870272:Wt=-.024273015893662056;let Lt;e[57]>1e-35?Lt=-.03433295479723807:e[35]>1e-35?Lt=-.039185287251387806:e[2]>8.18910569469239?Lt=-.01005594457537474:e[2]>8.136957041085973?Lt=.006899889609485921:e[2]>5.6542404955442525?e[156]>1e-35?Lt=-.021428903659715646:Lt=-.003794036359277691:e[6]>4.3882378946731615?e[125]>1e-35?Lt=-.012625422706971806:e[0]>1e-35?e[2]>.8958797346140276?e[32]>1e-35?Lt=.024078606665492636:e[6]>6.9309832857755405?e[2]>2.012675845367575?Lt=.00015676395930232578:Lt=.008324926956588046:Lt=-.0031526636810443134:e[156]>1e-35?Lt=.053603289446623514:e[6]>5.912149824839399?Lt=.022861200347258755:e[128]>1e-35?e[9]>1e-35?Lt=-.44322676747225076:Lt=-.07989645752877887:Lt=.005736631305989689:e[6]>9.286096980078398?Lt=-.005302861539231229:e[133]>1e-35?Lt=-.011410750972764748:e[2]>1e-35?e[139]>1e-35?Lt=-.01695599188677891:e[12]>1e-35?e[129]>1e-35?Lt=-.029257180272820173:e[106]>1e-35?Lt=.03593102425808264:e[59]>1e-35?Lt=.03336711951593411:e[114]>1e-35?Lt=.021293721644930708:Lt=.0031644417228525465:e[140]>1e-35?e[2]>2.802901033147999?Lt=.005338088459754211:Lt=-.018863893195455395:e[59]>1e-35?e[20]>1e-35?Lt=-.2145461556048109:Lt=-.013833058686928565:Lt=.0010745795613665528:Lt=-.003974960846380726:Lt=-.004018386137909663;let sr;e[55]>1e-35?sr=-.038436881673730244:e[49]>1e-35?e[1]>1e-35?sr=.013340924551504776:sr=-.04038081752369706:e[135]>1e-35?e[17]>1e-35?sr=.02160784630817418:e[6]>4.722943345003718?e[2]>3.9981586158983733?sr=-.012347824466576033:sr=-.000545766507983511:e[4]>3.0201273556387074?e[2]>1e-35?sr=-.0252070573488502:sr=-.13173630032620282:sr=.009893647988200364:e[6]>1e-35?e[73]>1e-35?sr=-.05384174968342247:e[52]>1e-35?e[1]>1e-35?sr=.02326718288961822:sr=-.04799167043714381:e[7]>.8453853180651066?e[4]>3.481121732133104?e[12]>1e-35?e[59]>1e-35?sr=.061286381265316374:e[3]>3.481121732133104?sr=.005424469650470853:e[6]>4.310776603370241?sr=.014609485744972962:sr=.06126754321077295:e[156]>1e-35?e[2]>8.898092196194755?sr=-.2427431056579565:sr=.018014774163852717:sr=.0018695162213364096:e[61]>1e-35?sr=-.07802947082997094:e[45]>1e-35?sr=-.024426413301391545:e[140]>1e-35?e[4]>.8958797346140276?sr=-.021126260874271455:e[6]>4.03420147928485?sr=-.08415757514826445:e[3]>1e-35?sr=.10708927158160722:sr=-.24178647896179492:sr=.0008522369825914582:e[218]>1e-35?sr=.02373187641553724:e[57]>1e-35?sr=-.04729470896114382:e[6]>4.135134555718313?sr=-.00014270136560779048:sr=-.007024429214918294:sr=-.08338039048086893;let cr;e[72]>1e-35?cr=.056415744834310104:e[102]>1e-35?cr=.010312560108512227:e[109]>1e-35?cr=.007457767681676636:e[208]>1e-35?e[4]>3.0677824455408698?e[18]>1e-35?cr=-.06595581480202953:cr=.0010087955639505731:cr=.010976237400105874:e[4]>2.4414009612931857?e[123]>1e-35?e[2]>4.5900436644025815?cr=-.05474288807524913:cr=-.010369052951168002:e[47]>1e-35?e[18]>1e-35?cr=.06670108938458437:e[20]>1e-35?cr=.08555144132474565:cr=-.021968528557862133:e[48]>1e-35?e[18]>1e-35?cr=.06392608504748652:cr=-.02321056177872842:e[54]>1e-35?cr=-.03592967725793262:e[6]>5.519456907163478?cr=.0008682946366782881:e[133]>1e-35?cr=-.029370515479889298:e[4]>3.0201273556387074?cr=-.004567764283497172:e[12]>1e-35?cr=-.008355751724201374:e[113]>1e-35?cr=.04158028065835193:cr=.005544170962219649:e[141]>1e-35?cr=-.01706283616408152:e[186]>1e-35?cr=-.08075713781164345:e[196]>1e-35?e[4]>2.012675845367575?cr=-.004591551989937031:e[4]>.8958797346140276?e[18]>1e-35?cr=-.1239344826496822:cr=.026355647530608275:cr=-.07955511774996737:e[41]>1e-35?cr=-.10181506412232362:e[42]>1e-35?cr=-.0453542732395041:e[116]>1e-35?cr=-.040407946567398226:e[158]>1e-35?cr=.027239009428531448:cr=-.002118967070037752;let Ut;e[174]>1e-35?Ut=-.02339144841300339:e[173]>1e-35?Ut=-.02466576607302462:e[60]>1e-35?Ut=-.014400177078045:e[187]>1e-35?Ut=-.009580909976967153:e[6]>8.681774988134558?Ut=-.0018832004566674773:e[1]>1e-35?e[42]>1e-35?e[10]>1e-35?Ut=-.13287881120130746:Ut=-.03759084751116859:e[25]>1e-35?Ut=-.029737667621816583:e[119]>1e-35?Ut=.022639692376110337:e[98]>1e-35?Ut=.014991063146855506:e[195]>1e-35?e[6]>3.417592293073651?Ut=.008961268500787772:Ut=-.023240187732927162:e[61]>1e-35?e[7]>.428769371249852?Ut=-.08413653233956772:Ut=.0010489731231787087:e[140]>1e-35?e[3]>.8958797346140276?e[5]>4.855921334140645?e[44]>1e-35?Ut=-.009299863216357543:Ut=-.0613782065666655:Ut=-.06705655672927394:e[5]>3.772694874805912?Ut=.0008635593500817348:Ut=.08361268069705163:Ut=.001087642897550713:e[98]>1e-35?Ut=-.021712258264119783:e[3]>.8958797346140276?e[105]>1e-35?Ut=-.039681509263849626:e[195]>1e-35?e[18]>1e-35?Ut=-.07079074829049314:Ut=-.008109353986158243:e[210]>1e-35?e[18]>1e-35?Ut=-.10610285355896108:Ut=-.009292320249100847:e[157]>1e-35?Ut=.03507595269407085:e[97]>1e-35?Ut=.0249669535461336:e[48]>1e-35?Ut=-.027595291123779366:Ut=.0011643902717306173:Ut=-.0211420439263067;let It;e[138]>1e-35?e[1]>1e-35?e[42]>1e-35?e[3]>3.5114340430413216?It=-.022448598781455772:It=-.07031164685918086:e[2]>1e-35?e[2]>2.740319461670996?It=.00894455632762117:It=-.003454709734759444:e[0]>1e-35?It=.060858110677215166:It=-.03435493609374257:e[3]>2.602003343538398?e[2]>.8958797346140276?It=.0168978378983998:It=-.009237748165804088:It=-.016931758267026403:e[3]>4.424828703319957?It=-.005659352703826067:e[24]>1e-35?e[113]>1e-35?e[6]>4.460127707454046?It=-.023722482692479133:It=.10064484300766507:e[6]>4.03420147928485?It=.007526717802235146:e[209]>1e-35?e[4]>2.970085626360216?It=.11711852031495243:It=-.15067622815741855:It=-.011085192149895408:e[108]>1e-35?It=.0059255171206349135:e[19]>1e-35?e[156]>1e-35?It=.04454460743043898:e[37]>1e-35?It=-.14161163738926447:e[4]>1.4978661367769956?e[4]>1.7005986908310777?e[217]>1e-35?It=-.020705364221039385:It=.006460529078997639:e[0]>1e-35?e[98]>1e-35?It=.10347448218504114:It=-.04090123141769794:e[6]>5.636572136251498?It=-.001212671493834005:e[2]>1.8688348091416842?It=-.15821279618670178:It=-.03563734739460456:It=.027924859655082585:e[57]>1e-35?It=-.03743904649648422:e[35]>1e-35?It=-.0414066369468363:e[46]>1e-35?It=-.011240341460759123:It=-.0003091959047563666;let fr;e[14]>1e-35?e[5]>7.841296344941067?e[141]>1e-35?fr=-.04382809259971909:e[217]>1e-35?e[4]>3.417592293073651?fr=-.05008164665262682:fr=.0007032387608254502:e[190]>1e-35?fr=-.19371592847895003:fr=.0017489801221668277:e[129]>1e-35?fr=-.24591656603456258:fr=.011026730387591234:e[72]>1e-35?fr=.05658163433406649:e[90]>1e-35?e[4]>3.5114340430413216?fr=.017141361021852975:e[28]>1e-35?fr=.07243997319099477:fr=-.08677988948169385:e[138]>1e-35?fr=.0038201430289573884:e[23]>1e-35?e[4]>2.917405368531303?fr=.014990462643385919:fr=-.013592080985068531:e[217]>1e-35?e[4]>1.8688348091416842?fr=.0022421195021632245:e[4]>1.2424533248940002?fr=.03891295508085918:e[4]>.8958797346140276?fr=-.08902318396862074:fr=.02476911275463073:e[2]>3.1132683346437333?e[29]>1e-35?e[19]>1e-35?fr=.023731839695418987:e[5]>7.366761104104307?e[4]>3.417592293073651?e[6]>6.633975895571033?e[8]>1e-35?fr=.016171629088047517:e[134]>1e-35?fr=.03196373735768742:fr=-.006820341969572339:fr=-.02712238491085242:fr=-.016309188486296804:fr=-.0019386576944297078:e[156]>1e-35?fr=-.03079416196682616:e[123]>1e-35?fr=-.020888866054988395:e[4]>3.238486181444842?fr=-.0027078359220281674:e[141]>1e-35?fr=-.029581214969996845:fr=.002299670778244013:fr=.0001804027795430786;let zo=Cmt(t+r+n+i+o+a+l+c+u+f+m+h+p+g+y+x+b+E+_+k+B+N+M+Z+he+ee+G+q+ie+z+j+U+V+K+ae+re+le+ce+De+be+qe+Re+Xe+ft+at+lt+oe+Ne+Ae+Ge+Y+ne+Fe+Se+Ce+Ue+Ve+tt+Ct+Pt+yt+Kt+Xt+lr+ge+Me+Je+rt+St+bt+Mt+Ot+wt+kt+_t+qt+$t+Zt+dr+xr+ur+mr+nr+hr+Ie+O+de+ye+J+F+Te+Oe+xt+Wt+Lt+sr+cr+Ut+It+fr);return[1-zo,zo]}s(o8e,"treeScore");function Cmt(e){if(e<0){let t=Math.exp(e);return t/(1+t)}return 1/(1+Math.exp(-e))}s(Cmt,"sigmoid");var yf=class{static{s(this,"ContextualFilterManager")}constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600,this.probabilityAccept=0}};function s8e(e){let t=e.split(`
`);return t[t.length-1].length}s(s8e,"getLastLineLength");function a8e(e,t,r){let n=e.get(yf),i=n.previousLabel,o=0;"afterCursorWhitespace"in t.properties&&t.properties.afterCursorWhitespace==="true"&&(o=1);let a=(Date.now()-n.previousLabelTimestamp)/1e3,l=Math.log(1+a),c=0,u=0,f=r.prefix;if(f){c=Math.log(1+s8e(f));let k=f.slice(-1);fu[k]!==void 0&&(u=fu[k])}let m=0,h=0,p=f.trimEnd();if(p){m=Math.log(1+s8e(p));let k=p.slice(-1);fu[k]!==void 0&&(h=fu[k])}let g=0;if("documentLength"in t.measurements){let k=t.measurements.documentLength;g=Math.log(1+k)}let y=0;if("promptEndPos"in t.measurements){let k=t.measurements.promptEndPos;y=Math.log(1+k)}let x=0;if("promptEndPos"in t.measurements&&"documentLength"in t.measurements){let k=t.measurements.documentLength;x=(t.measurements.promptEndPos+.5)/(1+k)}let b=0;Gre[t.properties.languageId]!==void 0&&(b=Gre[t.properties.languageId]);let E=0,_=new Array(221).fill(0);return _[0]=i,_[1]=o,_[2]=l,_[3]=c,_[4]=m,_[5]=g,_[6]=y,_[7]=x,_[8+b]=1,_[29+u]=1,_[125+h]=1,E=o8e(_)[1],e.get(yf).probabilityAccept=E,E}s(a8e,"contextualFilterScore");d();d();d();var z5=class{constructor(t,r,n){this.languageId=t;this.prefix=r;this.completion=n}static{s(this,"BlockTrimmer")}static isSupported(t){return Uc.isSupported(t)}async withParsedStatementTree(t){var n=[];try{let r=UK(n,Uc.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length));await r.build();return await t(r)}catch(i){var o=i,a=!0}finally{qK(n,o,a)}}trimmedCompletion(t){return t===void 0?this.completion:this.completion.substring(0,t)}getStatementAtCursor(t){return t.statementAt(Math.max(this.prefix.length-1,0))??t.statements[0]}getContainingBlockOffset(t){let r;if(t&&this.isCompoundStatement(t))r=t;else if(t){let n=t.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(t){if(!t||!t.nextSibling)return!1;let r=this.asCompletionOffset(t.node.endIndex),n=this.asCompletionOffset(t.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(t){return t===void 0?void 0:t-this.prefix.length}isCompoundStatement(t){return t.isCompoundStatementType||t.children.length>0}};var AO=class extends z5{constructor(r,n,i,o=3,a=7){super(r,n,i);this.lineLimit=o;this.lookAhead=a;let l=[...this.completion.matchAll(/\n/g)],c=this.lineLimit+this.lookAhead;l.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=l[this.lineLimit-1].index),l.length>=c&&c>0&&(this.lookAheadOffset=l[c-1].index)}static{s(this,"TerseBlockTrimmer")}async getCompletionTrimOffset(){return await this.withParsedStatementTree(async r=>{let n=r.statementAt(this.stmtStartPos()),i=this.getContainingBlockOffset(n);return i=this.trimAtFirstBlankLine(i),n&&(i=this.trimAtStatementChange(n,i)),this.limitOffset&&this.lookAheadOffset&&(i===void 0||i>this.lookAheadOffset)?this.limitOffset:i})}stmtStartPos(){let r=this.completion.match(/\S/);return r&&r.index!==void 0?this.prefix.length+r.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(r){let n=[...this.trimmedCompletion(r).matchAll(/\r?\n\s*\r?\n/g)];for(;n.length>0&&(r===void 0||r>n[0].index);){let i=n.shift();if(this.completion.substring(0,i.index).trim()!=="")return i.index}return r}trimAtStatementChange(r,n){let i=this.prefix.length,o=this.prefix.length+(n??this.completion.length);if(r.node.endIndex>i&&this.isCompoundStatement(r))return r.nextSibling&&r.node.endIndex<o?this.asCompletionOffset(r.node.endIndex):n;let a=r,l=r.nextSibling;for(;l&&l.node.endIndex<=o&&!this.hasNonStatementContentAfter(a)&&!this.isCompoundStatement(l);)a=l,l=l.nextSibling;return l&&a.node.endIndex>i&&a.node.endIndex<o?this.asCompletionOffset(a.node.endIndex):n}};async function l8e(e,t){var l=[];try{let r=e.getText();let n=e.offsetAt(t);let i=UK(l,Uc.create(e.detectedLanguageId,r,0,r.length));await i.build();let o=i.statementAt(n);if(!o)return"non-block";if(!o.isCompoundStatementType&&o.children.length===0)return o.parent&&!o.nextSibling&&o.node.endPosition.row<=t.line?"block-end":o.parent?"mid-block":"non-block";if(o.children.length===0)return"empty-block";let a=o.children[o.children.length-1];if(n<a.node.startIndex)return"mid-block";return"block-end"}catch(c){var u=c,f=!0}finally{qK(l,u,f)}}s(l8e,"getBlockPositionType");d();d();function c8e(e){let t;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>427.50000000000006?e[9]>13.500000000000002?e[121]>1e-35?t=-.3793786744885956:e[149]>1e-35?t=-.34717430705356905:t=-.26126834451035963:t=-.2431318366096852:e[5]>888.5000000000001?t=-.20600463586387135:t=-.2568037008471491:e[308]>1e-35?t=-.2363064824497454:e[8]>370.50000000000006?t=-.37470755210284723:t=-.321978453730494:e[3]>24.500000000000004?e[23]>1e-35?e[131]>1e-35?t=-.26259136509758885:t=-.3096719634039438:e[4]>30.500000000000004?e[9]>18.500000000000004?t=-.34254903852890883:e[2]>98.50000000000001?t=-.41585250791146294:t=-.3673574858887241:e[9]>6.500000000000001?t=-.31688079287876225:e[31]>1e-35?t=-.29110977864003823:e[308]>1e-35?t=-.3201411739040839:t=-.36874023066055506:e[8]>691.5000000000001?e[82]>1e-35?t=-.41318393149040566:e[133]>1e-35?t=-.3741272613525161:e[32]>1e-35?t=-.4112378041027121:e[227]>1e-35?t=-.37726615155719356:e[10]>3.5000000000000004?t=-.3164502293560397:t=-.2930071546509045:e[9]>13.500000000000002?t=-.277366858539218:e[308]>1e-35?e[4]>10.500000000000002?t=-.30975610686807187:e[4]>1.5000000000000002?t=-.2549142136728043:t=-.3271325650785176:e[127]>1e-35?e[0]>1937.5000000000002?t=-.2533046188098832:t=-.325520883579:t=-.331628896481776;let r;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>546.5000000000001?e[9]>13.500000000000002?r=.031231253521808708:r=.05380836288014532:e[5]>423.00000000000006?e[8]>114.50000000000001?r=.06751619128429062:r=.09625089153176467:r=.027268163053989804:e[308]>1e-35?r=.060174483556283756:r=-.049062854038919135:e[3]>24.500000000000004?e[23]>1e-35?e[4]>63.50000000000001?r=-.03969241799174589:r=.01086816842550381:e[31]>1e-35?r=-.003284694817583201:e[9]>6.500000000000001?e[4]>30.500000000000004?r=-.04224490699947552:r=-.011834162944360616:e[308]>1e-35?e[32]>1e-35?r=-.13448447971850278:r=-.019569456707046823:e[19]>1e-35?e[9]>1.5000000000000002?r=-.07256260662659254:e[4]>60.50000000000001?r=-.08227503453609311:r=-.020596416747563847:r=-.07396549241564149:e[8]>691.5000000000001?e[82]>1e-35?r=-.10046536995362734:e[133]>1e-35?r=-.06407649822752297:e[225]>1e-35?r=.08035785003303324:e[92]>1e-35?r=.018901360933204676:e[20]>1e-35?r=.05252546973665552:e[8]>2592.5000000000005?r=-.040543705016462955:r=-.011236043818320725:e[9]>17.500000000000004?r=.025560632674895334:e[308]>1e-35?e[0]>1847.5000000000002?r=.03527165701669741:r=-.0071847350825815035:e[127]>1e-35?r=.024373016379595405:e[9]>2.5000000000000004?r=-.0035090719709448288:r=-.03514829488063766;let n;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>546.5000000000001?n=.03848674861536988:e[5]>423.00000000000006?e[8]>114.50000000000001?e[9]>56.50000000000001?n=-.003764520033319488:n=.06570817919969299:e[4]>61.50000000000001?n=.028346156293069538:n=.0908154644362606:n=.02445594243234816:e[308]>1e-35?e[8]>65.50000000000001?n=.0019305229020073053:n=.09279357295883772:n=-.04458984161917124:e[3]>24.500000000000004?e[23]>1e-35?n=.0027405390271277013:e[4]>29.500000000000004?e[52]>1e-35?n=.044727478132905285:e[115]>1e-35?n=.10245804828855934:e[9]>17.500000000000004?n=-.03353173647469207:e[2]>98.50000000000001?n=-.10048106638102179:n=-.05484231104348874:e[31]>1e-35?n=.016807537467116516:e[9]>6.500000000000001?n=-.012113620535295137:e[4]>8.500000000000002?e[308]>1e-35?n=-.01882594250504289:n=-.05585658862796076:n=.04279591277938338:e[8]>691.5000000000001?e[82]>1e-35?n=-.09262278043707878:e[133]>1e-35?n=-.058454257768893625:e[32]>1e-35?n=-.09769348447126434:e[25]>1e-35?n=-.0725430043727677:e[122]>1e-35?n=-.10047841601578077:n=-.00580671054458958:e[9]>13.500000000000002?n=.021399199032818294:e[308]>1e-35?e[4]>10.500000000000002?n=-.0076376731757173515:n=.03394923033036848:e[127]>1e-35?n=.02070489091204209:n=-.02290162726126496;let i;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>892.5000000000001?e[9]>21.500000000000004?i=.010230295672324606:i=.038540509248742805:e[8]>125.50000000000001?e[1]>49.50000000000001?i=.03086356292895467:i=.057128750867458604:e[5]>888.5000000000001?i=.07861602941396924:i=.030523262699070908:e[308]>1e-35?i=.048236117667577356:e[8]>370.50000000000006?i=-.05642125069212264:i=-.007232836777168195:e[3]>24.500000000000004?e[23]>1e-35?e[131]>1e-35?i=.03640661467213915:i=-.005889820723907028:e[31]>1e-35?i=-.0009007166998276938:e[9]>6.500000000000001?i=-.022590340093882378:e[308]>1e-35?e[32]>1e-35?i=-.1215445089091064:i=-.01435612266219722:e[19]>1e-35?e[9]>1.5000000000000002?i=-.061555513040777825:e[4]>60.50000000000001?i=-.07053475504569347:i=-.013733369453963092:i=-.06302097189114152:e[227]>1e-35?i=-.05820440333190048:e[8]>683.5000000000001?e[82]>1e-35?i=-.08466979526809346:e[10]>24.500000000000004?i=-.017092159721119944:e[92]>1e-35?i=.03592901452463749:i=-.00359310519524756:e[5]>1809.5000000000002?e[243]>1e-35?i=-.03963116207386097:e[118]>1e-35?i=-.09483996283536394:e[217]>1e-35?i=-.03394542089519989:e[242]>1e-35?i=-.07985899422287938:i=.019706602160656964:e[9]>12.500000000000002?i=.014072998937735146:i=-.021156294523894684;let o;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>892.5000000000001?e[9]>21.500000000000004?o=.009197756540516563:o=.03458896869535166:e[5]>5082.500000000001?o=.08265545468131008:e[131]>1e-35?o=.0740738432473315:o=.045159136632942756:e[8]>319.50000000000006?o=-.04653401534465376:e[7]>3.5000000000000004?e[0]>1230.5000000000002?e[0]>2579.5000000000005?o=-.011400839766681709:o=.11149800187510031:o=-.08683250977599462:o=.08355310136724753:e[4]>23.500000000000004?e[23]>1e-35?e[131]>1e-35?o=.040389083779932555:o=-.009887614274108602:e[52]>1e-35?o=.03705353499757327:e[9]>6.500000000000001?o=-.025401260429257562:e[2]>98.50000000000001?o=-.09237673187534504:o=-.04298556869281803:e[222]>1e-35?o=-.045221965895986184:e[8]>691.5000000000001?e[133]>1e-35?o=-.05435318330148897:e[128]>1e-35?o=-.08672907303184191:e[227]>1e-35?o=-.05568304584186561:e[122]>1e-35?o=-.09623059693538563:e[225]>1e-35?o=.07558331642202279:e[82]>1e-35?o=-.07360566227233566:o=-.005646164647395919:e[242]>1e-35?o=-.08203758341228108:e[9]>13.500000000000002?o=.018726123829696042:e[308]>1e-35?e[4]>10.500000000000002?o=-.011153942154062704:o=.03132858912391067:e[127]>1e-35?o=.021455228822345174:e[23]>1e-35?o=.01959966745346997:o=-.021764790177579325;let a;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>284.50000000000006?e[121]>1e-35?e[18]>1e-35?a=.07547602514276922:a=-.08529678832140396:a=.030314822344598043:e[5]>888.5000000000001?e[4]>61.50000000000001?a=.011143589009415464:a=.0654700456802118:a=.021794712646632755:e[308]>1e-35?a=.04231872551095028:a=-.034381999950549455:e[4]>23.500000000000004?e[23]>1e-35?e[4]>63.50000000000001?a=-.03678981254332261:a=.010518160384496255:e[8]>825.5000000000001?a=-.04506534842082387:e[9]>38.50000000000001?a=.01004983052203438:a=-.030580958620701027:e[39]>1e-35?a=-.12802435021505382:e[8]>691.5000000000001?e[23]>1e-35?e[203]>1e-35?e[4]>6.500000000000001?a=.030426957004611704:a=-.0726407693060581:a=.017395521646964375:e[4]>7.500000000000001?e[0]>93.50000000000001?e[9]>7.500000000000001?a=-.008024349629981291:e[31]>1e-35?a=.01296539930850471:e[308]>1e-35?a=-.012855016509024084:a=-.04564527976851505:a=-.15681420504058596:e[10]>4.500000000000001?e[243]>1e-35?a=-.1012064426380198:a=-.0062808850924854194:a=.030706323726162416:e[9]>13.500000000000002?a=.017081636133736405:e[308]>1e-35?e[4]>10.500000000000002?a=-.009306613091760644:e[4]>1.5000000000000002?a=.03655523200850989:a=-.02671654212893341:e[127]>1e-35?a=.019261510468604387:a=-.017627818570628936;let l;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>892.5000000000001?e[308]>1e-35?l=.036100405995889276:l=.011709313297015793:e[0]>119.50000000000001?e[8]>125.50000000000001?l=.03622542297472574:l=.05595579157301536:l=-.02234751038146796:e[8]>319.50000000000006?l=-.040132029478400735:e[7]>3.5000000000000004?e[0]>1230.5000000000002?e[0]>2579.5000000000005?l=-.009306153573847916:l=.10058509567064988:l=-.0785668890966017:e[9]>28.500000000000004?l=-.04781977604130416:l=.09753292614937459:e[4]>23.500000000000004?e[131]>1e-35?l=.02372493254975127:e[148]>1e-35?l=.028103095989516644:e[4]>58.50000000000001?e[10]>1e-35?l=-.05000852203469597:l=.02922366846119705:e[23]>1e-35?l=-.0026335076988151292:l=-.03073993752935585:e[222]>1e-35?l=-.03867374428185713:e[32]>1e-35?l=-.07220729365053084:e[39]>1e-35?l=-.11624524614351733:e[8]>691.5000000000001?e[133]>1e-35?l=-.04836360271198036:e[8]>4968.500000000001?l=-.10873681915578029:e[149]>1e-35?l=-.11847484033769298:e[122]>1e-35?l=-.08916172460307559:e[82]>1e-35?l=-.06774726602152634:l=-.0033469147714351327:e[126]>1e-35?l=-.09474445392080015:e[8]>131.50000000000003?e[118]>1e-35?l=-.09002547031023511:l=.015475385187009489:e[25]>1e-35?l=-.08175501232759151:l=-.000429679055394914;let c;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>546.5000000000001?c=.021942996005324917:c=.042349138084484074:e[308]>1e-35?c=.036507270845732874:c=-.028981850556764995:e[3]>24.500000000000004?e[23]>1e-35?c=.00210930790963475:e[31]>1e-35?c=.006825358293027163:e[9]>6.500000000000001?c=-.013772084269062394:e[308]>1e-35?c=-.008307929099892574:e[19]>1e-35?c=-.027706313312904487:c=-.04891108984170914:e[134]>1e-35?c=-.0605730733844732:e[25]>1e-35?c=-.05347926493253117:e[227]>1e-35?c=-.049415829249003666:e[32]>1e-35?c=-.06807799662179595:e[308]>1e-35?e[4]>10.500000000000002?e[2]>13.500000000000002?c=-.00016302718260794637:c=-.10247095758122947:e[210]>1e-35?c=-.022149002072787024:e[95]>1e-35?c=.15222631630626304:c=.027393884520465712:e[9]>7.500000000000001?e[225]>1e-35?c=.13483346577752245:e[3]>9.500000000000002?e[243]>1e-35?c=-.045352728133789516:e[8]>683.5000000000001?c=.00474372227519902:c=.02635476098707525:e[92]>1e-35?c=.05659380819933452:e[105]>1e-35?c=.07431443210341222:e[186]>1e-35?c=.0915821133384904:c=-.016414750130401053:e[127]>1e-35?c=.011824693641866162:e[23]>1e-35?c=.0228468674288774:e[284]>1e-35?c=.06606936863302432:c=-.02872463273902358;let u;e[13]>1e-35?e[3]>1.5000000000000002?e[8]>125.50000000000001?e[288]>1e-35?u=-.019844363904157558:e[1]>50.50000000000001?e[131]>1e-35?u=.044961338592245194:u=.003659599513761676:e[121]>1e-35?u=-.04057103630479994:u=.03158560697078578:e[0]>421.50000000000006?e[4]>61.50000000000001?u=-.0003708603406529278:u=.05331312264472391:u=.0006575958601218936:e[8]>319.50000000000006?u=-.034654694051901545:e[7]>3.5000000000000004?e[0]>1230.5000000000002?e[0]>2579.5000000000005?u=-.0076053515916517005:u=.09116695486305336:u=-.07137458699162028:u=.06633130654035282:e[4]>29.500000000000004?e[23]>1e-35?e[4]>63.50000000000001?u=-.0308520802187302:u=.013156423968295541:e[115]>1e-35?u=.11581171687488252:e[52]>1e-35?e[10]>22.500000000000004?u=.12264179915175587:u=-.021905727233873535:e[8]>799.5000000000001?u=-.04181869575935412:u=-.023695901673350575:e[222]>1e-35?u=-.034612899265371776:e[8]>691.5000000000001?e[9]>98.50000000000001?u=-.06892116536821917:e[149]>1e-35?u=-.11194586444154514:e[133]>1e-35?u=-.04269583234000504:e[128]>1e-35?u=-.0644631966969502:e[8]>4968.500000000001?u=-.09650726096330133:u=-.004219129180139438:e[126]>1e-35?u=-.08038306745347751:e[5]>1809.5000000000002?u=.009265335288169993:e[9]>2.5000000000000004?u=.006447645462117438:u=-.021047132609551503;let f;e[13]>1e-35?e[3]>1.5000000000000002?e[9]>21.500000000000004?e[121]>1e-35?f=-.08436540015142402:e[8]>1861.5000000000002?f=-.01621425699342421:f=.01878613821895428:f=.031052879158242532:e[8]>319.50000000000006?f=-.031536619360997865:e[7]>3.5000000000000004?f=-.004510586962343298:f=.0596524941011746:e[4]>18.500000000000004?e[23]>1e-35?f=.004757490541310808:e[9]>6.500000000000001?f=-.008842393772207996:e[31]>1e-35?f=.0010536183837006993:e[308]>1e-35?f=-.008145882815435419:e[2]>98.50000000000001?f=-.08404937622173021:e[276]>1e-35?f=.0020072791321856663:e[19]>1e-35?f=-.023031820639490178:f=-.04553314326377875:e[8]>2134.5000000000005?f=-.02244583113572251:e[134]>1e-35?f=-.05592137394753121:e[308]>1e-35?e[49]>1e-35?f=.09989109704064947:e[4]>10.500000000000002?e[2]>13.500000000000002?f=-.00447733056482096:f=-.10191061664873849:f=.021765308380331864:e[9]>7.500000000000001?e[118]>1e-35?f=-.07570059131536411:e[243]>1e-35?f=-.040983393346598646:e[3]>9.500000000000002?f=.014763759061483812:e[92]>1e-35?f=.05136368898963024:f=-.008162398981149495:e[127]>1e-35?f=.013999119696708346:e[23]>1e-35?e[20]>1e-35?f=.14138985500120907:f=.008668274102844162:e[284]>1e-35?f=.06356484011042893:f=-.024781304572706303;let m;e[13]>1e-35?e[3]>8.500000000000002?e[8]>892.5000000000001?e[0]>384.50000000000006?m=.014387526569215037:e[8]>2266.5000000000005?m=-.1397298649743087:m=.007953931014097788:e[0]>119.50000000000001?e[4]>61.50000000000001?m=.0029819092211896296:e[218]>1e-35?m=.08450459375645737:m=.031646488019280654:m=-.03544960151460596:e[9]>9.500000000000002?m=-.026002317735915183:e[7]>1.5000000000000002?m=.005074258810794793:m=.0745247650477651:e[4]>29.500000000000004?e[131]>1e-35?m=.023269218675640847:e[148]>1e-35?m=.03812942399144545:e[115]>1e-35?m=.10512283476967227:m=-.02607307479736138:e[227]>1e-35?m=-.036576708299046294:e[101]>1e-35?m=.027948683650881864:e[149]>1e-35?m=-.08195628451594297:e[50]>1e-35?m=-.16997544922278504:e[8]>691.5000000000001?e[9]>101.50000000000001?m=-.06860333850762075:e[225]>1e-35?m=.06066641950951723:e[10]>22.500000000000004?e[1]>29.500000000000004?e[127]>1e-35?m=.028599705845427533:m=-.010746719511640914:e[0]>4877.500000000001?m=-.07251187886096228:m=-.021299712241446785:e[118]>1e-35?m=-.11902023760964736:m=15874469526809387e-21:e[8]>267.50000000000006?m=.01317292185402293:e[148]>1e-35?e[9]>20.500000000000004?m=.09614842415142123:m=.006049073167176467:e[189]>1e-35?m=.05562696451900713:m=-.006257541923837303;let h;e[13]>1e-35?e[9]>14.500000000000002?e[2]>11.500000000000002?e[1]>71.50000000000001?e[8]>1252.5000000000002?h=-.10069846585436666:h=-.010577995535809317:e[146]>1e-35?h=-.008877238274428668:e[280]>1e-35?h=.10076055897012692:e[6]>70.50000000000001?h=-.020603523042565547:e[7]>1.5000000000000002?h=.02819095420813202:h=-.1223354167911277:h=-.025073583348334844:e[8]>416.50000000000006?h=.01718560189149466:e[230]>1e-35?h=.12281803224342265:h=.03281276971308565:e[4]>14.500000000000002?e[23]>1e-35?e[21]>1e-35?h=-.13070568109867683:e[4]>63.50000000000001?h=-.027221825262496814:h=.01530862490082352:e[9]>6.500000000000001?e[5]>4320.500000000001?e[2]>31.500000000000004?h=-.00605574271293711:h=.04739407327741249:h=-.012537528620315956:e[31]>1e-35?e[20]>1e-35?h=.1252215087035768:h=.003905888677601057:e[52]>1e-35?h=.045466299731038815:e[2]>100.50000000000001?h=-.07815624550168065:e[308]>1e-35?h=-.007715815250508057:e[276]>1e-35?e[9]>1.5000000000000002?h=-.03538265083203445:e[18]>1e-35?h=.1591211669800727:h=.015151475408241136:e[8]>557.5000000000001?h=-.04225569725456342:h=-.022455546324243267:e[308]>1e-35?h=.01325441736085826:e[197]>1e-35?h=.03752194600682512:e[225]>1e-35?h=.06583712394533976:h=-.005205289866839043;let p;e[13]>1e-35?e[9]>21.500000000000004?e[2]>12.500000000000002?p=.010264022580774884:p=-.02335958814489217:e[8]>416.50000000000006?e[3]>4.500000000000001?e[295]>1e-35?p=-.0936747137352166:e[0]>384.50000000000006?p=.019846244507320695:p=-.0751102554077272:p=-.026885329334203723:e[0]>966.5000000000001?e[10]>48.50000000000001?p=.11654906890054273:p=.0346250587613322:e[4]>39.50000000000001?p=-.08568002378645614:e[9]>16.500000000000004?p=-.12010535752923689:p=.021321923389033808:e[4]>14.500000000000002?e[23]>1e-35?e[21]>1e-35?p=-.12056431231412057:e[131]>1e-35?p=.03652965550568472:p=.002563006128791669:e[9]>6.500000000000001?e[30]>1e-35?p=-.10141481732178981:p=-.003936457893178248:e[31]>1e-35?p=.008215898756249477:e[52]>1e-35?e[0]>4188.500000000001?p=.12972828769588213:p=-.003137412232297087:e[2]>100.50000000000001?p=-.0730872929087944:e[308]>1e-35?p=-.006958622747243333:e[35]>1e-35?e[0]>3707.5000000000005?p=.07934620723812878:p=-.018598568353702116:p=-.030635505446410763:e[128]>1e-35?p=-.06962290453843294:e[84]>1e-35?p=-.15290337844960322:e[308]>1e-35?e[8]>2543.5000000000005?p=-.034938657503885584:p=.016339322898966915:e[197]>1e-35?p=.03358907965870046:e[18]>1e-35?p=-.01754013791515288:p=-.0004944586067698557;let g;e[13]>1e-35?e[308]>1e-35?e[210]>1e-35?g=.005888790687820524:g=.0429676533834978:e[2]>7.500000000000001?e[0]>119.50000000000001?e[6]>79.50000000000001?g=-.0224319889201976:e[212]>1e-35?g=.06249587051783863:e[8]>963.5000000000001?e[8]>1156.5000000000002?g=.010357273289123324:g=-.029749145161304082:e[218]>1e-35?g=.06449336340743606:g=.018047654539345502:g=-.07350502390293116:g=-.019594829995832414:e[4]>39.50000000000001?g=-.019338083179859314:e[39]>1e-35?g=-.10427066919173111:e[222]>1e-35?e[0]>612.5000000000001?g=-.019197415255018464:g=-.0836562507048181:e[149]>1e-35?g=-.07679624472577429:e[32]>1e-35?g=-.05097506748590604:e[191]>1e-35?g=.04670476485250936:e[30]>1e-35?g=-.05313073892148652:e[8]>691.5000000000001?e[23]>1e-35?e[203]>1e-35?e[4]>8.500000000000002?g=.03930363008271334:g=-.06029171685615689:g=.016203086182431294:e[4]>7.500000000000001?g=-.013824248237085224:e[10]>4.500000000000001?e[94]>1e-35?g=-.09817668643367765:e[10]>40.50000000000001?g=-.023558078753593125:g=.0065113494780482326:e[8]>809.5000000000001?e[297]>1e-35?g=-.1352063548573715:g=.058203900441270634:g=-.035243959159285736:e[10]>59.50000000000001?e[1]>43.50000000000001?g=-.012552876807800442:g=.05991247777734298:g=.0035893102109330177;let y;e[13]>1e-35?e[9]>21.500000000000004?e[145]>1e-35?y=.03507251990078782:e[2]>14.500000000000002?y=.004905698363309292:e[8]>2421.5000000000005?y=-.10306119951984316:y=-.018951037816654928:e[8]>416.50000000000006?e[3]>4.500000000000001?e[295]>1e-35?y=-.08503171085833393:y=.015130974593044409:y=-.024425267075198206:y=.02624054905103126:e[4]>19.500000000000004?e[131]>1e-35?y=.02100191580704534:e[32]>1e-35?e[8]>2302.5000000000005?y=.09908783187786288:y=-.06920877329925636:e[8]>241.50000000000003?y=-.016756131804203496:e[9]>33.50000000000001?y=.04903179955263626:e[217]>1e-35?y=-.047416847619291644:y=-.0017200891991431119:e[39]>1e-35?y=-.10389927604977028:e[134]>1e-35?y=-.050480365434872866:e[178]>1e-35?y=-.05167855791556937:e[8]>2134.5000000000005?y=-.01663197335585307:e[242]>1e-35?y=-.05361323756615453:e[118]>1e-35?y=-.05299780866211368:e[10]>24.500000000000004?e[10]>55.50000000000001?e[8]>764.5000000000001?y=-.0016544848369620534:y=.04494144460483587:y=-.009283616456736156:e[121]>1e-35?e[0]>4463.500000000001?y=.051166688553608355:y=-.06623908820705383:e[84]>1e-35?y=-.12990936092409747:e[306]>1e-35?y=-.07020596855118943:e[49]>1e-35?y=.06272964802556856:e[192]>1e-35?y=.06540204627162581:y=.008277910531592885;let x;e[13]>1e-35?e[308]>1e-35?e[210]>1e-35?x=.003325460510319164:x=.037153108286272905:e[2]>12.500000000000002?e[1]>124.50000000000001?x=-.09880713344892134:e[7]>60.50000000000001?e[10]>71.50000000000001?x=.0697359767152808:e[230]>1e-35?x=.06513506845651572:x=-.02826625276613455:e[5]>246.50000000000003?e[8]>95.50000000000001?x=.013616385013146277:x=.04171540100223404:x=-.04360396575094823:e[212]>1e-35?x=.025945477945627522:x=-.019793208261535442:e[4]>39.50000000000001?e[25]>1e-35?x=-.07856453318384411:x=-.014803893522351739:e[39]>1e-35?x=-.09185452630751932:e[149]>1e-35?x=-.07122426086157027:e[134]>1e-35?x=-.04231052091434186:e[227]>1e-35?x=-.029815824273994197:e[50]>1e-35?x=-.15736496271211153:e[222]>1e-35?x=-.02360285356956629:e[128]>1e-35?x=-.03922080193836443:e[136]>1e-35?x=-.07219685327698587:e[10]>24.500000000000004?e[1]>8.500000000000002?x=-.0029736170756835783:x=-.06482902102259112:e[84]>1e-35?x=-.11340924635708383:e[94]>1e-35?x=-.03635703457792193:e[118]>1e-35?x=-.058181913914186034:e[126]>1e-35?x=-.062030576241517366:e[116]>1e-35?x=-.045086301850604006:e[25]>1e-35?x=-.031665223656767286:e[203]>1e-35?x=-.009444685731407691:x=.0112265153772187;let b;e[13]>1e-35?e[1]>64.50000000000001?e[9]>14.500000000000002?e[9]>54.50000000000001?b=.022717227245241684:b=-.049700413274686266:b=.007175776918589741:e[5]>50.50000000000001?e[8]>61.50000000000001?e[21]>1e-35?b=-.07927556792063156:e[3]>8.500000000000002?e[4]>23.500000000000004?e[281]>1e-35?b=-.12263724050601095:b=.0070743478891288035:e[288]>1e-35?b=-.050439138582109:b=.0255701593657891:b=-.005812703740580558:e[6]>49.50000000000001?b=-.008542694147899113:b=.035147383686665:b=-.0960461939274094:e[32]>1e-35?b=-.04555453745517765:e[222]>1e-35?e[0]>612.5000000000001?b=-.01800870272656664:b=-.07817304234604389:e[30]>1e-35?b=-.05227061750368981:e[25]>1e-35?e[0]>4449.500000000001?e[217]>1e-35?b=.08778416018479411:b=-.026563982720830256:b=-.05296139548112329:e[50]>1e-35?b=-.14926464875852247:e[8]>779.5000000000001?e[133]>1e-35?b=-.036572140520852024:e[183]>1e-35?b=-.10766853736801459:b=-.003966794968701808:e[217]>1e-35?e[5]>5237.500000000001?b=.09513215942486053:b=-.03641865277445567:e[10]>59.50000000000001?b=.03177172388687933:e[39]>1e-35?b=-.10234241303898953:e[243]>1e-35?b=-.02966738115984321:e[190]>1e-35?b=-.04312785336449181:e[118]>1e-35?b=-.05808521194081524:b=.006720381600740378;let E;e[308]>1e-35?e[5]>423.00000000000006?e[133]>1e-35?E=-.046284053681928526:e[210]>1e-35?E=49778070699847876e-21:e[13]>1e-35?E=.03328070054739309:e[128]>1e-35?E=-.054790214922938896:e[126]>1e-35?E=-.08524792218532945:E=.014414055975542446:e[1]>38.50000000000001?E=-.07287851335872973:E=.005263371501687163:e[9]>7.500000000000001?e[21]>1e-35?e[10]>4.500000000000001?E=-.12459748864088374:E=-.004626323021331593:e[298]>1e-35?e[4]>64.50000000000001?E=.13044981041138526:e[9]>71.50000000000001?E=-.056068402282406865:e[9]>12.500000000000002?E=.038957722962512764:E=-.04598815982492169:e[8]>691.5000000000001?e[126]>1e-35?E=-.0852126122372075:e[225]>1e-35?E=.10082066771689505:e[1]>161.50000000000003?E=-.11609832500613824:e[3]>8.500000000000002?e[8]>1685.5000000000002?E=-.010835400874777133:E=.004607419973807752:E=-.016989075258564062:E=.009205417251698097:e[23]>1e-35?e[20]>1e-35?E=.10184317139657878:e[0]>5724.500000000001?E=-.1163666496650542:e[1]>106.50000000000001?E=.1303850608190687:e[129]>1e-35?E=.10745031509534769:E=.006166901738036226:e[31]>1e-35?E=.010177092833155127:e[13]>1e-35?e[0]>213.50000000000003?E=.005004582564506611:E=-.10481581731668346:e[19]>1e-35?E=-.009850706427306281:E=-.02608226348051303;let _;e[13]>1e-35?e[1]>64.50000000000001?e[2]>4.500000000000001?_=-.0024117174588695603:_=-.058339700513831916:e[212]>1e-35?e[0]>2215.5000000000005?e[8]>847.5000000000001?e[10]>21.500000000000004?e[1]>39.50000000000001?_=.04575380761203418:_=-.10025595041353463:e[15]>1e-35?_=.17705790384964004:_=.0073813837628615014:_=.07676373681392407:_=-.027167992693885996:e[3]>11.500000000000002?e[280]>1e-35?_=.07078572910026419:e[4]>23.500000000000004?_=.005513918674164821:_=.0206586476926392:e[0]>5269.500000000001?_=.07706773525822633:_=-.010233826953776122:e[148]>1e-35?e[8]>1622.5000000000002?_=-.03204783603215824:_=.027405418223981973:e[4]>14.500000000000002?e[131]>1e-35?e[9]>1.5000000000000002?e[0]>5026.500000000001?_=-.0930246911392012:_=.011173087289703683:e[3]>24.500000000000004?_=.03281421918878597:_=.12449335091369843:e[204]>1e-35?_=.06634531187326123:_=-.011522999669353388:e[92]>1e-35?e[10]>42.50000000000001?_=-.041196758517013515:e[4]>7.500000000000001?_=-2942718111029724e-20:e[4]>6.500000000000001?_=.11953909558532852:_=.03188615019450534:e[122]>1e-35?_=-.0616037324662157:e[101]>1e-35?_=.027230889593349412:e[8]>4968.500000000001?_=-.1113986516540856:e[3]>2.5000000000000004?_=-.002045140426885727:e[129]>1e-35?_=.12641163374304432:_=.014909826232873194;let k;e[308]>1e-35?e[0]>7277.500000000001?k=-.09337446795435:e[5]>423.00000000000006?e[133]>1e-35?k=-.040884836258675006:e[210]>1e-35?k=-.0003719413278428804:e[13]>1e-35?k=.030287610160818174:k=.011174130013595384:e[1]>38.50000000000001?k=-.0662442170185784:k=.004332185707008564:e[9]>7.500000000000001?e[145]>1e-35?e[285]>1e-35?k=-.08092286307197555:k=.029866363328584986:e[21]>1e-35?e[10]>4.500000000000001?k=-.1155211149523894:k=-.0032903546638958538:e[149]>1e-35?k=-.03632198993199768:e[3]>9.500000000000002?e[8]>999.5000000000001?k=-.003507023626534306:e[128]>1e-35?e[4]>13.500000000000002?e[0]>3459.5000000000005?k=-.025416927789760076:k=.02777568919793122:k=-.10310351509769732:k=.013549608903688785:e[186]>1e-35?k=.08513865847420551:k=-.009306721292510369:e[31]>1e-35?k=.009780833952582307:e[23]>1e-35?k=.011143773934157629:e[210]>1e-35?k=.025354797285173356:e[17]>1e-35?e[10]>3.5000000000000004?k=-.04846287537743046:k=-.014647271080376757:e[2]>5.500000000000001?e[7]>57.50000000000001?k=-.034224938681445764:e[8]>1641.5000000000002?k=-.027298372075800673:e[191]>1e-35?e[10]>18.500000000000004?k=-.027950103994861836:k=.14575930827829034:k=-.007124740389354946:e[10]>22.500000000000004?k=.013173304107866726:k=-.11119620042551365;let B;e[131]>1e-35?B=.01892225243240137:e[308]>1e-35?e[5]>691.5000000000001?e[133]>1e-35?B=-.037118314390013646:e[1]>51.50000000000001?e[5]>3749.5000000000005?e[8]>58.50000000000001?B=-.022305242912035072:B=.024792895826340516:B=.013666137278072166:e[88]>1e-35?e[10]>27.500000000000004?B=.2080083584805785:B=.04247197078083379:e[10]>40.50000000000001?e[18]>1e-35?e[1]>27.500000000000004?B=.060783227455868206:B=-.056904865557409035:B=-.03278952553107572:e[192]>1e-35?B=.13117402617043625:B=.01647119888257836:B=-.01825870445636398:e[9]>6.500000000000001?e[298]>1e-35?B=.026536210945939682:e[8]>691.5000000000001?e[126]>1e-35?B=-.07927319604548912:e[10]>3.5000000000000004?e[21]>1e-35?B=-.11083976837572328:e[146]>1e-35?B=-.03359294484446772:B=-.0042815953591236475:e[190]>1e-35?B=-.09264239592903775:e[10]>1e-35?B=.022282638485105657:B=-.0205994057928458:e[5]>4918.500000000001?B=.03430715695199153:e[243]>1e-35?e[2]>57.50000000000001?B=.08935072241972036:B=-.03781647876237494:B=.0062655753179671515:e[31]>1e-35?B=.008603500300349887:e[230]>1e-35?B=.03350056932774173:e[23]>1e-35?e[241]>1e-35?B=.10277555508503314:B=.0017901817172993888:e[2]>98.50000000000001?B=-.05920081229672715:B=-.015722173275739208;let N;e[13]>1e-35?e[118]>1e-35?N=.07957905150112207:e[1]>125.50000000000001?N=-.0662620579858685:e[145]>1e-35?N=.029682040828779843:e[19]>1e-35?e[6]>15.500000000000002?N=-.0009597832580977798:N=-.081474760755753:e[212]>1e-35?N=.03637001492325179:N=.006912305498963309:e[32]>1e-35?N=-.03919900630910754:e[134]>1e-35?N=-.036225295529777886:e[4]>4.500000000000001?e[5]>384.50000000000006?e[204]>1e-35?N=.06671440854602108:e[136]>1e-35?N=-.07577364230133474:e[148]>1e-35?e[4]>7.500000000000001?N=.026430947016830915:N=-.04075501264495112:e[9]>93.50000000000001?N=-.04353169430417609:e[50]>1e-35?N=-.1411224537622882:e[17]>1e-35?e[49]>1e-35?N=.068392679163672:e[10]>1.5000000000000002?N=-.0209659792007492:N=-.0004393235559249831:e[133]>1e-35?e[9]>64.50000000000001?N=.07254524592323175:N=-.0319087835282534:N=.00037444813327793425:N=-.025138768151370408:e[243]>1e-35?N=-.050010891710502096:e[94]>1e-35?N=-.0817513550778599:e[122]>1e-35?N=-.061038875809822285:e[19]>1e-35?e[8]>1085.5000000000002?N=-.008408408775061623:e[2]>5.500000000000001?e[218]>1e-35?N=.1454877641381946:N=.053787998331240316:e[9]>33.50000000000001?N=.08602629796680285:N=-.03895127455803038:N=.008830878042315722;let M;e[131]>1e-35?M=.01687979707990516:e[8]>2915.5000000000005?e[297]>1e-35?M=.07473600489975568:e[0]>93.50000000000001?M=-.021596848506011502:M=-.13840802327735696:e[230]>1e-35?e[4]>6.500000000000001?e[0]>4977.500000000001?M=.10264284346448256:M=.031042487183181262:M=-.016653982936827776:e[4]>60.50000000000001?e[10]>75.50000000000001?M=.04226403420647408:e[10]>1e-35?e[0]>4733.500000000001?M=.006271403149804702:M=-.030013637555715046:e[0]>4449.500000000001?M=-.06556876058654929:M=.06437994816903034:e[32]>1e-35?M=-.043814577251655815:e[308]>1e-35?e[0]>7277.500000000001?M=-.09349726304052086:e[210]>1e-35?M=-.0035960132209098003:e[5]>691.5000000000001?e[133]>1e-35?M=-.029188394315052574:M=.017219308333820193:M=-.017378928852189585:e[9]>6.500000000000001?e[0]>2653.5000000000005?e[149]>1e-35?M=-.04428555753857688:M=.0001456106867817353:e[5]>213.50000000000003?M=.01740292726636365:M=-.011361718115556464:e[7]>4.500000000000001?e[0]>316.50000000000006?e[19]>1e-35?e[10]>54.50000000000001?M=.03410288911259329:e[121]>1e-35?M=-.06056527462120627:e[8]>2592.5000000000005?M=.12166808844363577:e[191]>1e-35?M=.11669879218998758:M=-.001664858391716235:M=-.01262927450503166:M=-.04506589951879664:e[227]>1e-35?M=-.08548904959752329:M=.02156080776537726;let Z;e[306]>1e-35?e[149]>1e-35?Z=-.1389218965136736:Z=-.032218642644416894:e[13]>1e-35?Z=.006465035217331847:e[50]>1e-35?Z=-.1381687930130022:e[179]>1e-35?Z=-.13112784985951215:e[148]>1e-35?e[8]>1726.5000000000002?Z=-.03262719498763048:Z=.023342916702125613:e[191]>1e-35?Z=.030005484947580197:e[4]>4.500000000000001?e[204]>1e-35?Z=.047767773119269434:e[136]>1e-35?e[0]>1937.5000000000002?Z=-.09989343595668776:Z=.06533942033334243:e[15]>1e-35?e[9]>86.50000000000001?Z=-.10577989354150097:e[8]>668.5000000000001?e[126]>1e-35?Z=-.09165257825246746:e[9]>32.50000000000001?Z=.02484870392366004:Z=-.008499493096971395:e[8]>24.500000000000004?Z=.02459679192828244:Z=-.010527978013140512:e[25]>1e-35?e[217]>1e-35?Z=.0015644546318714849:Z=-.06579524865022705:Z=-.0060233890975120614:e[122]>1e-35?e[1]>36.50000000000001?Z=.03331853632960164:Z=-.09482264761126993:e[19]>1e-35?e[8]>1430.5000000000002?Z=-.019091477207111116:Z=.037878468575478504:e[94]>1e-35?Z=-.08013082284576584:e[4]>2.5000000000000004?e[186]>1e-35?Z=.16919658785098224:e[243]>1e-35?Z=-.06580584936754524:Z=.01567555159935563:e[129]>1e-35?Z=.06721746994993226:e[10]>32.50000000000001?Z=-.046394462507797975:Z=-.006436180519584767;let he;e[131]>1e-35?he=.015039096856208693:e[8]>779.5000000000001?e[145]>1e-35?he=.019122095523977856:e[298]>1e-35?he=.023828936462317443:e[1]>23.500000000000004?e[5]>384.50000000000006?e[7]>59.50000000000001?he=-.026094309429557913:e[204]>1e-35?he=.09163404305658318:e[1]>27.500000000000004?e[149]>1e-35?e[6]>34.50000000000001?he=.012643810980689466:he=-.07884161741497837:he=-.0025267379810891104:e[2]>43.50000000000001?e[0]>2860.5000000000005?he=.04493082949897325:he=.18046359750455776:e[7]>18.500000000000004?he=-.018667348656891496:he=.02584325784698236:he=-.045696524897545915:e[0]>3321.5000000000005?e[201]>1e-35?he=.04749240016989375:he=-.0333334578246718:e[5]>3276.5000000000005?he=.11330554740098908:e[7]>94.50000000000001?he=.1296600395033268:he=-.003576436308940934:e[15]>1e-35?e[183]>1e-35?he=-.13787130789142835:e[0]>1847.5000000000002?he=.017915229729920556:e[10]>23.500000000000004?e[10]>31.500000000000004?e[6]>7.500000000000001?he=.028856848462727104:he=-.11197632885851168:he=.08169801342016791:e[1]>22.500000000000004?he=-.021052888644970163:he=.019048604298876753:e[7]>4.500000000000001?he=-.002603328695276418:e[7]>1.5000000000000002?e[2]>5.500000000000001?he=.03432638833359197:he=-.0036767863082454973:e[1]>48.50000000000001?he=.03087375270128195:e[2]>3.5000000000000004?he=-.04219917149740248:he=.018818493993207935;let ee;e[306]>1e-35?ee=-.04076858123502297:e[13]>1e-35?e[1]>67.50000000000001?e[9]>14.500000000000002?e[9]>53.50000000000001?e[8]>1971.5000000000002?ee=-.09091897542577475:ee=.04042943082645558:e[218]>1e-35?ee=.056254985867151:ee=-.053848117950183044:ee=.003881630017086845:e[5]>5152.500000000001?e[8]>857.5000000000001?e[6]>28.500000000000004?ee=.021581808008986944:ee=-.05639286496176611:ee=.052838875036198954:e[5]>50.50000000000001?e[5]>4082.5000000000005?e[17]>1e-35?ee=.023061479860228728:e[145]>1e-35?e[9]>10.500000000000002?ee=.023885302967553288:ee=.1617794086125622:e[212]>1e-35?ee=.04504545345658806:e[3]>17.500000000000004?e[4]>45.50000000000001?ee=-.03948072448245435:e[1]>47.50000000000001?e[9]>18.500000000000004?ee=.01894935813286188:ee=-.06449356357429188:ee=.012297239104320094:e[1]>26.500000000000004?e[8]>33.50000000000001?ee=-.034718828212885515:ee=.0898976288814321:e[1]>17.500000000000004?ee=-.15440137451988326:ee=-.03864183216821465:ee=.009988507307006308:ee=-.08540311947043305:e[50]>1e-35?ee=-.13323659732101975:e[134]>1e-35?ee=-.031820386486894385:e[32]>1e-35?e[8]>2302.5000000000005?ee=.08082476177379844:ee=-.041665761903645876:e[179]>1e-35?ee=-.12405023987936657:e[39]>1e-35?ee=-.06247416524997478:e[138]>1e-35?ee=-.10724031753676487:ee=-.0005423122305122404;let G;e[308]>1e-35?G=.006160742906729798:e[190]>1e-35?e[0]>2461.5000000000005?e[10]>22.500000000000004?G=.023223358334607133:G=-.04383410185346742:G=-.08542395045055405:e[297]>1e-35?e[8]>51.50000000000001?e[1]>13.500000000000002?G=.023406489302867494:G=-.085521220804058:G=-.02921899554854833:e[298]>1e-35?e[9]>12.500000000000002?G=.028120059780969632:G=-.04211009474298743:e[294]>1e-35?G=-.05040415676618239:e[86]>1e-35?e[1]>36.50000000000001?G=-.0993035220737934:G=-.0005384930611060366:e[230]>1e-35?e[4]>6.500000000000001?G=.029770210551187937:G=-.016272917551655715:e[4]>60.50000000000001?e[280]>1e-35?G=.06421359317599738:G=-.01963732469244167:e[218]>1e-35?e[3]>3.5000000000000004?G=.024368404612215164:G=-.04045232374803373:e[131]>1e-35?G=.017372701982485795:e[120]>1e-35?G=.08812710275150198:e[18]>1e-35?e[90]>1e-35?G=.18451364351180236:e[7]>33.50000000000001?G=-.03850813130183531:e[195]>1e-35?G=.06966114053446336:e[3]>16.500000000000004?G=-.0012869181693341211:e[0]>4242.500000000001?G=-.054625548611291035:G=-.014431095117473881:e[5]>4558.500000000001?e[8]>1.5000000000000002?G=.006302103427145562:G=.13967622319898698:e[121]>1e-35?G=-.038798585213145644:e[5]>4544.500000000001?G=-.08050498033009466:G=-.002986974112681435;let q;e[0]>384.50000000000006?e[2]>101.50000000000001?e[1]>16.500000000000004?q=-.03461119351456781:q=.05659026566680352:e[306]>1e-35?e[2]>14.500000000000002?e[149]>1e-35?q=-.12404435523286539:q=-.0034376913880382956:q=-.09821622245095822:e[131]>1e-35?e[9]>1.5000000000000002?q=.0037507103585310234:q=.03610387965829944:e[8]>999.5000000000001?e[9]>137.50000000000003?q=-.11985021663179699:e[0]>1847.5000000000002?e[126]>1e-35?q=-.04832024079663151:e[37]>1e-35?q=-.037103393468366934:q=-.004248086592531705:e[8]>3084.0000000000005?e[9]>43.50000000000001?q=.032539071163832034:e[5]>1643.5000000000002?q=.036408625378035665:e[0]>1500.5000000000002?q=-.1346358322854993:q=-.027586559522081014:e[3]>1e-35?e[190]>1e-35?q=-.1133991164577881:e[9]>52.50000000000001?q=-.024478640359723122:q=.03673777861098756:q=-.1037451237591819:e[230]>1e-35?e[9]>48.50000000000001?e[10]>20.500000000000004?q=.002583438691776944:q=.10773520810108106:e[9]>12.500000000000002?e[1]>16.500000000000004?q=-.02141222346712401:q=.06392462314316179:e[4]>12.500000000000002?q=.08700122294434816:e[8]>267.50000000000006?q=.056923170082743224:q=-.07716309825583327:e[32]>1e-35?q=-.03961343943752142:q=.002674914122888783:e[1]>42.50000000000001?q=-.05217539654421676:e[145]>1e-35?q=.09553630282946368:q=-.009424791262477729;let ie;e[183]>1e-35?ie=-.05753337139158443:e[308]>1e-35?ie=.00562436671450989:e[9]>7.500000000000001?e[21]>1e-35?e[10]>8.500000000000002?ie=-.10477869875380448:ie=-.0070301869937306055:e[3]>9.500000000000002?e[8]>1765.5000000000002?e[0]>4571.500000000001?ie=-.12526505173232894:e[10]>1e-35?e[9]>71.50000000000001?ie=-.04442302951713574:ie=.00012409888451734224:ie=-.092199119633697:e[225]>1e-35?ie=.13773072450201831:e[0]>2882.5000000000005?ie=.0028540012229920533:e[298]>1e-35?ie=.07134486044361629:ie=.014297412329837425:e[145]>1e-35?ie=.05608385321902638:e[92]>1e-35?ie=.038298413603926135:e[107]>1e-35?e[2]>6.500000000000001?ie=-.0039957800609801315:ie=.0776927564241081:e[203]>1e-35?ie=-.05502900859432093:e[105]>1e-35?ie=.06062892720841595:ie=-.009574839629252128:e[31]>1e-35?ie=.009488858841144216:e[23]>1e-35?e[20]>1e-35?ie=.08818126313644752:e[8]>161.50000000000003?ie=.014353968957885408:ie=-.022240738532827903:e[210]>1e-35?ie=.024648862719806694:e[2]>5.500000000000001?e[4]>4.500000000000001?e[17]>1e-35?e[10]>16.500000000000004?ie=-.043902062079383485:ie=-.014741559220396223:ie=-.00934935734853194:e[6]>32.50000000000001?ie=.1514593126307404:ie=.010771222510801532:e[10]>22.500000000000004?ie=.01412495209334078:ie=-.08576940379502533;let z;e[0]>384.50000000000006?e[84]>1e-35?z=-.06647690967306838:e[2]>101.50000000000001?z=-.024451334501552457:e[306]>1e-35?z=-.034517188927733505:e[131]>1e-35?e[9]>1.5000000000000002?z=.0031858381443673127:z=.032574927024450646:e[204]>1e-35?e[1]>62.50000000000001?z=-.08601340441214533:e[1]>29.500000000000004?z=.10487598629539963:e[8]>597.5000000000001?z=-.0786529133673238:z=.08689436600511559:e[8]>779.5000000000001?e[10]>2.5000000000000004?e[9]>100.50000000000001?z=-.04883600353740688:e[126]>1e-35?z=-.03794042763348827:z=-.003358871967539988:e[210]>1e-35?z=.054991356498447566:e[6]>19.500000000000004?z=-.007418396981635549:z=.018032606049498613:e[18]>1e-35?e[7]>35.50000000000001?e[2]>44.50000000000001?z=-.02143003429501711:z=-.09016000554055564:e[1]>19.500000000000004?e[1]>42.50000000000001?e[8]>17.500000000000004?z=-.006636355416244082:z=-.06483095743431454:e[4]>21.500000000000004?z=-.028975965946833545:z=.022012264796522657:z=-.06653648243193663:e[5]>4593.500000000001?z=.01753551428088607:e[217]>1e-35?z=-.028864824937700297:e[94]>1e-35?z=-.04885192273020658:e[279]>1e-35?z=.08105715462329498:e[121]>1e-35?z=-.04576676034750651:z=.004795141324949362:e[1]>42.50000000000001?z=-.047446619702809195:e[145]>1e-35?z=.08400495571952321:z=-.00854528836489364;let j;e[294]>1e-35?j=-.042529778074638265:e[266]>1e-35?j=-.1180276669679798:e[134]>1e-35?j=-.026818144353279623:e[183]>1e-35?j=-.05120747503479363:e[227]>1e-35?e[8]>1641.5000000000002?j=-.07265906898294434:e[4]>12.500000000000002?e[17]>1e-35?j=-.027516137530797014:e[0]>4331.500000000001?e[1]>64.50000000000001?j=-.03049646619610203:e[1]>50.50000000000001?j=.20634590755061122:j=.06956378103625731:e[0]>3770.5000000000005?j=-.07946414366134913:e[19]>1e-35?j=.17083312065604694:e[2]>21.500000000000004?j=-.02327981978127724:j=.129717297518715:e[145]>1e-35?j=.006891245076133524:j=-.0789123467863741:e[3]>99.50000000000001?j=-.02022281202803071:e[302]>1e-35?e[10]>47.50000000000001?j=.06447639919732716:j=-.05457561977645972:e[306]>1e-35?j=-.029995903305383882:e[191]>1e-35?j=.030596508110850414:e[242]>1e-35?j=-.024085578702020216:e[8]>3198.5000000000005?e[297]>1e-35?j=.09518584795377832:j=-.018197744600833596:e[13]>1e-35?j=.006751790086127549:e[148]>1e-35?j=.01904174573618417:e[99]>1e-35?j=.025287735102561926:e[4]>14.500000000000002?j=-.004364337681643273:e[1]>15.500000000000002?e[35]>1e-35?j=-.09467943982430241:e[243]>1e-35?j=-.02521824751996268:j=.005437570718352172:j=-.022476214821960674;let U;e[0]>384.50000000000006?e[84]>1e-35?U=-.06088131453064195:e[147]>1e-35?U=-.05332792965930566:e[135]>1e-35?e[9]>32.50000000000001?U=.04219361472548491:U=-.07227529211725771:e[10]>4.500000000000001?e[21]>1e-35?U=-.0787279848043689:e[17]>1e-35?e[3]>18.500000000000004?e[188]>1e-35?U=-.054347604504400286:e[0]>3544.5000000000005?e[0]>5850.500000000001?U=-.11431764534511478:U=.013549717238356157:U=-.020987333767091276:e[6]>2.5000000000000004?U=-.02914877855133127:U=.08483464900160231:e[8]>58.50000000000001?e[183]>1e-35?U=-.10087072787978416:e[37]>1e-35?U=-.030467397753331196:e[229]>1e-35?U=-.1017559811057469:e[4]>20.500000000000004?U=-.00413177742240167:e[20]>1e-35?U=.05213315982685969:U=.0037921635866823133:e[8]>51.50000000000001?U=.07327913092421544:e[6]>49.50000000000001?U=-.03457694284156811:e[6]>18.500000000000004?e[7]>17.500000000000004?U=.02744420891894289:U=.11288946357194463:U=.003482908820966248:e[18]>1e-35?e[1]>20.500000000000004?e[7]>4.500000000000001?U=-.012329314369909049:U=.026816658655600168:U=-.0872405354618811:U=.007872673500247845:e[1]>42.50000000000001?U=-.04309044198258254:e[145]>1e-35?U=.07572529147860785:e[7]>5.500000000000001?U=-.013837187093264945:e[1]>17.500000000000004?U=.04208698439539668:U=-.06284346769019863;let V;e[294]>1e-35?V=-.0384794324818203:e[266]>1e-35?V=-.1087205883821061:e[32]>1e-35?e[8]>2302.5000000000005?V=.07432960094940501:V=-.035248735855751855:e[134]>1e-35?V=-.02456191365284949:e[121]>1e-35?e[0]>4720.500000000001?e[1]>39.50000000000001?V=-.01706896375068821:V=.08212247914968074:e[2]>59.50000000000001?V=-.09546478958824225:e[6]>53.50000000000001?V=.12317082897575611:e[1]>56.50000000000001?e[4]>7.500000000000001?e[0]>3560.5000000000005?V=.02816463285971267:V=.15449139016588445:V=-.10199787406123524:V=-.038068684323297096:e[223]>1e-35?e[8]>668.5000000000001?V=-.13924786681478077:V=-.0072772442570213335:e[39]>1e-35?V=-.05392786531177836:e[0]>93.50000000000001?e[40]>1e-35?V=-.054059371343144036:e[306]>1e-35?e[2]>14.500000000000002?e[149]>1e-35?V=-.11174465335620831:V=.00013144040097180107:V=-.08493919336681105:e[42]>1e-35?V=-.11078582572836196:e[84]>1e-35?e[4]>17.500000000000004?V=-.015540659878839153:V=-.14442609417300142:e[21]>1e-35?V=-.025251979447574083:V=.0023698372645272847:e[18]>1e-35?V=.07269739695712212:e[8]>2592.5000000000005?V=-.1460388776448558:e[9]>30.500000000000004?e[1]>23.500000000000004?V=-.01835130329646532:e[9]>45.50000000000001?V=.02023047454629885:V=.16469378262221102:V=-.042975030085836426;let K;e[8]>2915.5000000000005?e[297]>1e-35?K=.06257393915394144:e[0]>93.50000000000001?e[4]>1.5000000000000002?K=-.01034964686484714:K=-.07357437440667927:K=-.11987794734779106:e[298]>1e-35?e[8]>81.50000000000001?e[0]>3370.5000000000005?e[8]>155.50000000000003?e[8]>660.5000000000001?e[8]>2134.5000000000005?K=-.09476398869062203:e[9]>72.50000000000001?K=-.0757383854264379:K=.02806542779508718:K=-.05147742568418084:K=.10212721564444344:K=.0518263760642861:K=-.08743405377022222:e[189]>1e-35?e[0]>5269.500000000001?K=-.10669213185972036:K=.027050434286384796:e[302]>1e-35?K=-.0407832394672723:e[116]>1e-35?e[10]>38.50000000000001?K=.06354599160071946:e[1]>67.50000000000001?K=.05317447949011187:K=-.059138165935307165:e[212]>1e-35?e[19]>1e-35?K=-.09369289448773599:e[0]>2215.5000000000005?K=.04077965380363924:e[0]>807.5000000000001?K=-.0591771776458298:K=.057315736906679376:e[308]>1e-35?e[1]>52.50000000000001?e[5]>3749.5000000000005?K=-.016323380219241672:K=.007291062979527741:e[210]>1e-35?e[8]>1641.5000000000002?K=.03720704290087811:K=-.008730548158766654:e[4]>80.50000000000001?K=-.05346644687473197:K=.014596824736762107:e[218]>1e-35?e[3]>3.5000000000000004?K=.019984510398089086:K=-.03917825025861855:e[9]>170.50000000000003?K=-.09759719821334525:K=-.0023586682752856298;let ae;e[183]>1e-35?e[17]>1e-35?ae=.030100940443356424:e[10]>1.5000000000000002?ae=-.10861112216742408:ae=.017680668976453255:e[227]>1e-35?e[17]>1e-35?e[2]>16.500000000000004?ae=-.032062878390325456:ae=-.10808232631806887:e[8]>1641.5000000000002?ae=-.06147013392655731:e[4]>12.500000000000002?ae=.03324767551088266:e[145]>1e-35?ae=.028851633810612017:ae=-.054871239091792784:e[134]>1e-35?ae=-.023813968121342108:e[266]>1e-35?ae=-.10037039667146351:e[222]>1e-35?e[0]>612.5000000000001?e[10]>1e-35?e[8]>1939.5000000000002?ae=-.055566877553100726:e[2]>24.500000000000004?e[8]>182.50000000000003?e[10]>43.50000000000001?e[10]>55.50000000000001?ae=-.025350325484720576:ae=.1579024598549572:e[9]>2.5000000000000004?e[0]>3746.5000000000005?ae=.056817276537534815:ae=-.07674158463557636:ae=-.06335553143454145:e[1]>56.50000000000001?ae=.16390494217299284:ae=-.0027330160430847177:e[10]>36.50000000000001?e[8]>1067.5000000000002?ae=.041717597065890205:ae=-.10357913492269129:e[10]>29.500000000000004?ae=.1365512866715726:ae=.020600048310575665:ae=.09708785634773187:ae=-.060427658852305666:e[126]>1e-35?e[10]>32.50000000000001?e[6]>24.500000000000004?e[8]>1146.5000000000002?ae=-.03146213719547347:ae=.11784024316238083:ae=-.050940520532045355:ae=-.047988344143075616:e[191]>1e-35?ae=.028764654731460032:ae=.0011911575567860023;let re;e[294]>1e-35?e[10]>50.50000000000001?re=-.11630092297244568:e[0]>2432.5000000000005?e[0]>4199.500000000001?re=-.05103908560370243:re=.05002066201169583:re=-.09976646725732496:e[32]>1e-35?e[0]>4242.500000000001?re=-.0648838712201258:e[5]>3721.5000000000005?e[9]>4.500000000000001?re=.127983140816313:re=-.05436534163636867:re=-.024514536544596455:e[121]>1e-35?e[0]>4449.500000000001?e[4]>9.500000000000002?re=-.009504203657088933:e[8]>819.5000000000001?re=.18689664822602375:re=.03635576744011826:re=-.029862411809998525:e[223]>1e-35?re=-.06474496692999487:e[86]>1e-35?e[8]>65.50000000000001?e[1]>46.50000000000001?re=-.09405026597863717:e[0]>4153.500000000001?re=.053577663326799765:re=-.05062127873995668:re=.06512222894425874:e[39]>1e-35?re=-.04985311717827547:e[51]>1e-35?re=-.04541229517934797:e[178]>1e-35?e[2]>25.500000000000004?e[2]>30.500000000000004?e[0]>2151.5000000000005?re=-.02860634573675884:re=.08863753005590103:re=.11158892111063744:e[0]>655.5000000000001?re=-.031005736641654926:re=-.1439827004505974:e[222]>1e-35?e[1]>11.500000000000002?e[0]>612.5000000000001?re=-.00843386136334982:re=-.05273594615999777:re=.1060183822015004:e[126]>1e-35?e[10]>32.50000000000001?e[8]>719.5000000000001?re=-.015774115523598486:re=.10147367091236065:re=-.048307000563071016:re=.002118376117677254;let le;e[8]>1014.5000000000001?e[9]>137.50000000000003?le=-.10279096288817871:e[0]>93.50000000000001?e[8]>1067.5000000000002?e[227]>1e-35?le=-.03544332389470493:e[285]>1e-35?e[9]>64.50000000000001?le=.07211107542565391:le=-.041556776020476104:e[145]>1e-35?e[1]>66.50000000000001?le=-.0751486415451188:e[1]>59.50000000000001?le=.13459005084554104:le=.024184371850147466:e[0]>3072.5000000000005?e[95]>1e-35?le=.06715575425741895:le=-.005895690393702183:e[8]>2915.5000000000005?le=-.010205039411753762:e[9]>33.50000000000001?e[9]>47.50000000000001?le=-.00029068886245881074:le=.0613467393188786:e[148]>1e-35?le=-.06074463294936236:e[3]>1.5000000000000002?e[5]>1849.5000000000002?e[1]>15.500000000000002?le=.003887223773199377:le=-.08553893131979015:le=.025654192706396767:le=-.05651733979610658:le=-.02039913645229667:e[2]>7.500000000000001?le=-.1058450646728524:le=.02267192191610376:e[1]>120.50000000000001?e[2]>60.50000000000001?le=-.12304707569000428:e[1]>132.50000000000003?e[6]>41.50000000000001?le=.1283258201586378:le=-.01718135372229775:le=-.07702452408491414:e[125]>1e-35?le=-.0804612900572707:e[178]>1e-35?e[0]>4533.500000000001?le=.04273051857848212:le=-.04533122948101463:e[2]>196.50000000000003?le=-.10543331044088727:e[94]>1e-35?e[5]>4532.500000000001?le=.0231032972703664:le=-.04807386814498683:le=.002729435991332102;let ce;e[179]>1e-35?ce=-.08065315471211375:e[183]>1e-35?e[17]>1e-35?ce=.026484626664041125:e[10]>1.5000000000000002?ce=-.10187000872941615:ce=.015274190652133752:e[84]>1e-35?e[9]>6.500000000000001?e[2]>43.50000000000001?ce=.09574540795390041:ce=-.06454986703691233:ce=-.11411849349353141:e[266]>1e-35?ce=-.09281838517322076:e[32]>1e-35?e[8]>2302.5000000000005?ce=.06685250330182936:e[4]>67.50000000000001?e[2]>97.50000000000001?ce=-.04403391373512386:ce=.1132928075412222:e[2]>47.50000000000001?ce=-.09700191391838056:ce=-.02147184357182825:e[10]>4.500000000000001?e[21]>1e-35?ce=-.0735617817957859:e[17]>1e-35?e[3]>18.500000000000004?ce=-.001668912999010927:ce=-.02363511102970245:e[8]>58.50000000000001?ce=-.00035213368294640616:e[3]>17.500000000000004?e[2]>28.500000000000004?e[10]>23.500000000000004?e[1]>38.50000000000001?ce=.0911011436534449:e[1]>28.500000000000004?ce=-.07192390493729035:ce=.06913818091291246:ce=-.012312625373699222:ce=.06784496312307986:ce=-167756936027735e-19:e[18]>1e-35?e[8]>302.50000000000006?ce=.0026564453057705273:ce=-.025425772389361445:e[122]>1e-35?ce=-.12046786388602149:e[0]>3183.5000000000005?ce=.01162092842804907:e[91]>1e-35?ce=.07000265526928563:e[1]>22.500000000000004?e[0]>576.5000000000001?ce=-.0001647792543020228:ce=-.023664538532907665:ce=.01609078206180752;let De;e[294]>1e-35?e[1]>26.500000000000004?e[0]>4141.500000000001?De=-.051473645433684705:e[0]>3030.5000000000005?e[1]>51.50000000000001?De=-.017696526862422682:De=.1450050954613223:De=-.05406930069823832:De=-.08308700260259043:e[120]>1e-35?De=.058316269489189415:e[297]>1e-35?e[94]>1e-35?De=-.07425512495167255:e[8]>51.50000000000001?e[1]>13.500000000000002?e[1]>33.50000000000001?e[19]>1e-35?e[0]>4498.500000000001?De=.038431826961746934:De=-.05937462906539856:e[9]>65.50000000000001?De=.10814845712507865:e[4]>9.500000000000002?e[2]>22.500000000000004?e[1]>39.50000000000001?e[1]>44.50000000000001?e[10]>44.50000000000001?De=.12297945639231944:e[0]>3796.5000000000005?e[4]>26.500000000000004?De=-.09579030954062734:De=.025064711572811746:De=.02579440518821548:De=.1044440128091862:De=-.058348633139536844:De=.07766788227934436:De=-.01021229539092708:e[2]>2.5000000000000004?e[10]>29.500000000000004?e[0]>3770.5000000000005?e[0]>4438.500000000001?De=.07463684068207214:De=.18244269035484484:e[6]>39.50000000000001?De=-.06050050067471004:De=.05787759066913493:De=.010783225857972171:De=.1674891243602606:e[4]>9.500000000000002?De=-.004814132027475892:De=-.14543299413454813:De=-.02935093398687923:e[116]>1e-35?e[9]>2.5000000000000004?e[8]>1218.5000000000002?De=-.07634466313617769:De=.0287825335169114:De=-.06894721943300268:De=-.00023988459059521937;let be;e[131]>1e-35?e[1]>93.50000000000001?be=-.05706887458825395:e[2]>1.5000000000000002?be=.011446637886629108:be=-.10616119878749211:e[230]>1e-35?e[4]>6.500000000000001?e[0]>4977.500000000001?be=.08424281276381033:e[3]>17.500000000000004?e[20]>1e-35?be=.11146885439601915:e[8]>61.50000000000001?e[0]>3530.5000000000005?e[9]>48.50000000000001?e[9]>61.50000000000001?be=.026278724448495064:be=.17053138400480508:e[0]>4463.500000000001?be=-.06482289890096041:be=.03026516489536295:be=-.031785170717683144:be=.1312690622980455:e[13]>1e-35?be=.14336922540461444:be=.03523850945454039:be=-.015407465968975714:e[39]>1e-35?be=-.054809635385158186:e[32]>1e-35?e[0]>4242.500000000001?be=-.0659975068798723:be=-.008386582621403979:e[4]>60.50000000000001?e[10]>75.50000000000001?e[3]>107.50000000000001?be=-.04225314193574262:e[3]>70.50000000000001?e[1]>29.500000000000004?be=.057409156184759516:be=.2024322059866388:be=-.030670938454461245:e[10]>1e-35?e[0]>4733.500000000001?be=.010648654146284154:e[308]>1e-35?be=.008728141696325391:e[4]>64.50000000000001?e[298]>1e-35?be=.12364025998551711:be=-.02247495081065243:e[1]>22.500000000000004?be=-.0726295464624251:be=.03481895086048152:e[0]>4331.500000000001?be=-.04775443357020673:be=.07172377425057568:e[2]>89.50000000000001?be=-.11782645274716962:be=.00010092665257989378;let qe;e[147]>1e-35?qe=-.041560228567115574:e[302]>1e-35?e[10]>47.50000000000001?qe=.062292114082780084:e[10]>5.500000000000001?e[7]>22.500000000000004?qe=-.016101990375700172:e[0]>2579.5000000000005?qe=-.13045089661551845:qe=-.02874367814784938:qe=.025835149631944995:e[167]>1e-35?e[0]>3928.5000000000005?qe=.17084176915326055:qe=-.019195947948312853:e[222]>1e-35?e[30]>1e-35?e[1]>36.50000000000001?e[8]>45.50000000000001?e[8]>578.5000000000001?e[1]>67.50000000000001?qe=.10591712319944074:qe=-.024082167264285:qe=.16497698867036126:qe=-.04985066326861431:e[0]>1937.5000000000002?e[2]>16.500000000000004?qe=-.021012910475524206:qe=-.13058422554298485:e[0]>1102.5000000000002?qe=.10955864175201457:qe=-.03566689354348996:e[1]>11.500000000000002?qe=-.02093884208606101:qe=.09107244766183857:e[126]>1e-35?e[10]>32.50000000000001?e[8]>719.5000000000001?qe=-.013861861436128482:qe=.09756849802202777:e[224]>1e-35?e[1]>51.50000000000001?qe=.10163873449625677:qe=-.02779270277623805:e[1]>26.500000000000004?qe=-.08035058228527389:qe=.0005719695099064484:e[191]>1e-35?e[9]>9.500000000000002?qe=-.007028075523033826:qe=.0489470913925288:e[1]>61.50000000000001?e[132]>1e-35?qe=.11230846723576784:e[0]>350.50000000000006?e[2]>1.5000000000000002?qe=-.0032075580718124892:qe=-.04442829143298883:qe=-.06597073245775804:qe=.0015594090939337751;let Re;e[223]>1e-35?e[8]>668.5000000000001?Re=-.12803889879260094:Re=.002171373740016862:e[121]>1e-35?e[0]>4720.500000000001?e[217]>1e-35?Re=.08967966612917375:e[1]>39.50000000000001?Re=-.059791671514498074:Re=.05648934961902822:e[2]>59.50000000000001?Re=-.08633234097449628:e[6]>53.50000000000001?Re=.11140345067444689:e[1]>56.50000000000001?e[4]>7.500000000000001?e[0]>3560.5000000000005?Re=.025606129643140924:Re=.13835395886271978:Re=-.09361630641448024:e[4]>7.500000000000001?e[1]>26.500000000000004?e[1]>49.50000000000001?Re=-.09975506556937946:e[10]>36.50000000000001?Re=-.09427724661655643:e[10]>24.500000000000004?Re=.07329330653410447:Re=-.02271182965807972:Re=-.09767874967639482:e[6]>13.500000000000002?e[10]>23.500000000000004?Re=-.05082091374050816:Re=.1687114435254966:e[0]>2314.5000000000005?Re=-.06422664016383926:Re=.0636688376664789:e[298]>1e-35?e[9]>12.500000000000002?e[133]>1e-35?Re=-.06857762517406195:e[9]>71.50000000000001?e[0]>4188.500000000001?Re=-.1274167728754332:Re=.01308079126447365:e[4]>73.50000000000001?Re=.13854015371106546:e[4]>48.50000000000001?Re=-.03684255740123261:e[6]>45.50000000000001?Re=.10329912215813097:e[10]>77.50000000000001?Re=-.08630788656925215:Re=.031022006843800853:e[1]>25.500000000000004?Re=-.08278381528048026:Re=.06664374548141594:e[84]>1e-35?Re=-.05624227409079396:Re=.00012184182357340415;let Xe;e[179]>1e-35?Xe=-.07443348719246982:e[40]>1e-35?e[0]>1937.5000000000002?Xe=-.07595415373151816:Xe=.054065040429292326:e[134]>1e-35?e[11]>1e-35?e[2]>13.500000000000002?e[0]>1187.5000000000002?Xe=.022822510448266862:Xe=.17491569312933697:Xe=-.058362287133533565:e[2]>2.5000000000000004?Xe=-.03633895806364428:Xe=.06397808186120692:e[8]>4968.500000000001?e[1]>31.500000000000004?Xe=-.07294848747514579:Xe=.025053613105805606:e[230]>1e-35?e[4]>6.500000000000001?e[107]>1e-35?Xe=-.07009535282685533:e[8]>2640.0000000000005?Xe=-.051761240111316276:e[131]>1e-35?Xe=-.06245774419231631:Xe=.03495606662854905:Xe=-.013863522184803188:e[131]>1e-35?e[1]>93.50000000000001?e[1]>105.50000000000001?Xe=.0015036626973581122:Xe=-.12505706794835883:e[1]>48.50000000000001?e[276]>1e-35?Xe=.10435171369790015:e[0]>5026.500000000001?e[0]>5308.500000000001?Xe=.022343994371919224:Xe=-.14087991797693533:e[8]>1323.5000000000002?e[10]>49.50000000000001?Xe=.07724450228328664:e[0]>3853.5000000000005?Xe=-.15671707454435677:e[10]>28.500000000000004?Xe=-.10179090671841723:Xe=.014878216919760927:Xe=.03967665658164865:e[8]>2696.5000000000005?e[15]>1e-35?Xe=.14054154485273487:Xe=.01821247272493051:e[2]>5.500000000000001?e[2]>100.50000000000001?Xe=-.08632985141410315:Xe=.005524157938954954:Xe=-.08802502622523681:Xe=-.0004649168897260341;let ft;e[86]>1e-35?e[8]>65.50000000000001?e[1]>32.50000000000001?e[4]>16.500000000000004?ft=-.007458687464321174:ft=-.09444966249102484:e[1]>23.500000000000004?ft=.08564129697360716:ft=-.07105002902845851:ft=.05688756955238231:e[294]>1e-35?e[10]>50.50000000000001?ft=-.10326216566705966:e[1]>26.500000000000004?ft=.0050539832484585365:ft=-.07080395606126953:e[306]>1e-35?e[149]>1e-35?ft=-.10399433201474328:e[2]>14.500000000000002?e[9]>6.500000000000001?ft=.05783632021087773:e[10]>17.500000000000004?ft=-.06720598671764105:e[1]>47.50000000000001?ft=.097495825172558:ft=-.013372242800584872:ft=-.06463226787713715:e[42]>1e-35?ft=-.0885725817597767:e[204]>1e-35?e[1]>62.50000000000001?ft=-.07496598696848249:e[1]>29.500000000000004?e[8]>446.50000000000006?ft=.11051270080118503:ft=.027719462817590454:e[8]>597.5000000000001?ft=-.08441503592016869:ft=.05534229430302502:e[223]>1e-35?e[8]>668.5000000000001?ft=-.12190088985091102:ft=-.0067442838156576345:e[148]>1e-35?e[9]>79.50000000000001?ft=.09225972475904022:e[2]>10.500000000000002?e[1]>102.50000000000001?ft=.11805676536334647:e[8]>1726.5000000000002?e[9]>10.500000000000002?ft=.016585157185448045:ft=-.11032043771149425:ft=.01586986028570486:e[8]>388.50000000000006?ft=-.10592413013261853:ft=.04930703248769364:e[13]>1e-35?ft=.003621937787920821:ft=-.0013786331198611841;let at;e[145]>1e-35?e[1]>32.50000000000001?e[1]>38.50000000000001?e[10]>55.50000000000001?e[1]>54.50000000000001?at=.009769895322846493:at=-.10620052926943656:e[9]>19.500000000000004?at=.03781202525403449:e[9]>14.500000000000002?at=-.11485785321365344:e[9]>6.500000000000001?at=.07677177833073881:e[0]>4342.500000000001?at=-.07079285609687631:e[49]>1e-35?at=.06156814809246001:at=-.014788509042554625:at=-.032659201618470655:e[5]>5207.500000000001?at=-.09013500825185713:e[3]>10.500000000000002?e[8]>1787.5000000000002?at=-.03094160322187924:e[1]>29.500000000000004?at=.09474646043921069:at=.023445783928231618:at=.09342846694174194:e[0]>533.5000000000001?e[204]>1e-35?e[1]>62.50000000000001?at=-.07164443768784848:e[1]>29.500000000000004?at=.089473622509272:e[8]>597.5000000000001?at=-.08155349903101317:at=.07098423265024251:e[8]>691.5000000000001?e[5]>2252.5000000000005?at=-.004003900679358653:e[190]>1e-35?at=-.09236113461485262:e[8]>3198.5000000000005?at=-.0124130160451179:at=.018453070064009328:e[15]>1e-35?at=.012013209112857824:e[7]>4.500000000000001?e[7]>5.500000000000001?at=-.0009580759587680961:at=-.03227283036698222:at=.01369287669536875:e[1]>50.50000000000001?at=-.04213060332500437:e[35]>1e-35?at=-.11508095777767471:e[190]>1e-35?at=-.08611884672400155:e[297]>1e-35?at=.05723551879433584:at=-.004829340082311461;let lt;e[183]>1e-35?lt=-.037994150023203555:e[227]>1e-35?e[17]>1e-35?e[3]>20.500000000000004?e[10]>36.50000000000001?lt=-.11753465135886734:lt=-.007515490299047085:lt=-.08576941990777916:e[8]>1641.5000000000002?e[10]>37.50000000000001?lt=-.12371142493530439:e[1]>36.50000000000001?lt=.032189417575190435:lt=-.10339125953022954:e[3]>32.50000000000001?e[4]>27.500000000000004?e[1]>59.50000000000001?lt=-.0784518658439288:e[2]>54.50000000000001?lt=.12477882322370665:lt=.000313468482399738:lt=.12261955132611434:e[8]>81.50000000000001?e[23]>1e-35?lt=.04969252946760318:e[8]>511.50000000000006?e[8]>1146.5000000000002?lt=.0353146070135579:lt=-.06327619611098285:lt=.02813577701641991:lt=-.12354390728506215:e[34]>1e-35?lt=-.07664408516055397:e[3]>99.50000000000001?e[1]>16.500000000000004?e[1]>26.500000000000004?lt=-.01245803535276381:lt=-.07169472553475001:e[1]>11.500000000000002?lt=.12989984824561698:lt=-.01201544398886606:e[6]>91.50000000000001?e[1]>22.500000000000004?lt=.010390226893521422:e[10]>14.500000000000002?lt=.16790888126487719:lt=.010614982228955577:e[4]>79.50000000000001?e[9]>44.50000000000001?e[0]>3853.5000000000005?lt=-.043398307129729134:lt=.09963544907820426:e[9]>30.500000000000004?lt=-.13540713124984502:e[9]>17.500000000000004?lt=.0509435850590757:lt=-.04761897852404613:e[4]>78.50000000000001?lt=.09197086656470652:lt=.0006771050176682337;let oe;e[122]>1e-35?e[6]>36.50000000000001?oe=.05686884451670743:oe=-.05334759543084309:e[266]>1e-35?oe=-.08603579519816038:e[157]>1e-35?oe=-.06736746113382097:e[302]>1e-35?e[0]>2579.5000000000005?oe=-.0499592651503952:e[0]>725.5000000000001?oe=.11780353905132664:oe=-.05232097173108943:e[147]>1e-35?e[1]>53.50000000000001?oe=-.11398297342629615:e[0]>2604.5000000000005?e[0]>3629.5000000000005?oe=-.03190157229022304:oe=.07985197845805492:oe=-.0763078988943886:e[4]>41.50000000000001?e[280]>1e-35?oe=.05162933940904835:e[11]>1e-35?e[0]>460.50000000000006?oe=-.027174047777029083:oe=.057117284879796476:e[3]>43.50000000000001?oe=-.0016147040913107311:oe=-.05856597304613519:e[2]>45.50000000000001?e[0]>4663.500000000001?e[18]>1e-35?oe=-.04779247091640426:e[10]>25.500000000000004?e[9]>22.500000000000004?e[22]>1e-35?oe=-.01466076988151239:oe=.13375695925484857:oe=-.04885873081899647:e[0]>5566.500000000001?oe=.11086813028591343:e[8]>992.5000000000001?oe=-.07622304217072383:oe=.04316019272026325:e[10]>12.500000000000002?e[9]>36.50000000000001?e[9]>45.50000000000001?oe=.03285858361708423:oe=-.12354858211764992:oe=.0672788301823281:e[15]>1e-35?oe=.08658836986585006:oe=-.02741484278509758:e[290]>1e-35?oe=-.08161310335133287:e[135]>1e-35?oe=-.04824156054814152:oe=.0009156904299554183;let Ne;e[3]>7.500000000000001?Ne=.0006791852818377787:e[129]>1e-35?e[0]>2904.5000000000005?e[0]>4004.5000000000005?Ne=.03642374718166293:Ne=.16379973756366603:Ne=-.03946685266127979:e[186]>1e-35?Ne=.07618896623420895:e[96]>1e-35?Ne=.0680272261319657:e[107]>1e-35?e[1]>48.50000000000001?Ne=-.022822371600847505:Ne=.0501405836324949:e[203]>1e-35?e[1]>77.50000000000001?Ne=.044416424920571296:Ne=-.0648450593196238:e[5]>3921.5000000000005?e[1]>110.50000000000001?Ne=-.11110466767595227:e[9]>5.500000000000001?e[9]>52.50000000000001?e[1]>50.50000000000001?Ne=.1061937286809567:e[7]>54.50000000000001?Ne=.11487507743121311:e[8]>819.5000000000001?Ne=-.07181278009001418:e[10]>25.500000000000004?Ne=.13499019430369633:e[1]>31.500000000000004?Ne=.09032979489780704:Ne=-.12754166393372374:e[9]>37.50000000000001?Ne=-.05093963635361407:Ne=-.005026651151683848:e[9]>2.5000000000000004?Ne=.07619735785573735:Ne=.012363301341532136:e[26]>1e-35?Ne=-.10685800454968203:e[8]>125.50000000000001?e[8]>446.50000000000006?e[0]>3842.5000000000005?Ne=-.08783796894105043:e[282]>1e-35?e[1]>47.50000000000001?e[9]>40.50000000000001?Ne=-.10764172927882483:Ne=.01890760098464703:Ne=.06573095405846417:e[8]>634.5000000000001?Ne=-.00783575973273707:Ne=-.050612689680229306:e[1]>22.500000000000004?Ne=-.0016842490401359626:Ne=.0738227088444087:Ne=-.02663970950432175;let Ae;e[31]>1e-35?e[8]>17.500000000000004?Ae=.013678038624884814:e[1]>35.50000000000001?e[1]>51.50000000000001?Ae=.007191286124908192:Ae=-.09347881647636902:e[10]>1.5000000000000002?Ae=.07938758708008091:Ae=-.008702935600305113:e[224]>1e-35?e[149]>1e-35?e[13]>1e-35?Ae=.12321804057595996:Ae=-.018281109320672437:e[23]>1e-35?e[4]>62.50000000000001?Ae=-.04644244754790671:Ae=.024546310702263208:e[8]>862.5000000000001?e[0]>3429.5000000000005?e[4]>9.500000000000002?e[52]>1e-35?Ae=.0706108609273337:e[2]>40.50000000000001?Ae=-.028046629962303716:Ae=-.06497613993109329:Ae=.01076489668586676:e[1]>33.50000000000001?e[0]>966.5000000000001?e[2]>14.500000000000002?e[1]>38.50000000000001?Ae=-.03056331974267756:Ae=-.11886389712497057:Ae=.053364962175658184:e[8]>2233.5000000000005?Ae=-.0448152521157682:Ae=.1508651602190868:e[2]>33.50000000000001?e[0]>2882.5000000000005?e[0]>3183.5000000000005?Ae=.03818796510453344:Ae=.23673992112982362:Ae=.02858814226507374:e[10]>44.50000000000001?Ae=-.1125863771551199:Ae=.009129996952394916:e[1]>7.500000000000001?Ae=-.004374525302461639:Ae=-.07858519434925451:e[149]>1e-35?e[6]>23.500000000000004?Ae=.0005231594491642136:e[0]>4053.5000000000005?e[8]>660.5000000000001?Ae=-.13677189943034931:e[10]>2.5000000000000004?Ae=.039591891437078086:Ae=-.09312596849507347:Ae=-.02423172142089822:Ae=.0009836986075266283;let Ge;e[189]>1e-35?e[0]>5269.500000000001?Ge=-.103183298350443:e[2]>51.50000000000001?Ge=.09784373530929913:e[10]>26.500000000000004?e[8]>764.5000000000001?Ge=-.05186168947388339:Ge=.0496996365539082:e[10]>23.500000000000004?Ge=.1404445738719:e[93]>1e-35?Ge=.0027146310074558505:e[5]>3821.5000000000005?Ge=.002153033152069652:e[4]>2.5000000000000004?Ge=.007663539551317215:Ge=.13902616832015402:e[298]>1e-35?e[8]>81.50000000000001?e[4]>64.50000000000001?Ge=.11498405722487515:e[2]>23.500000000000004?e[0]>2815.5000000000005?e[2]>44.50000000000001?e[4]>42.50000000000001?Ge=-.021479467709980358:Ge=.09336868994327292:e[1]>22.500000000000004?e[15]>1e-35?Ge=.021660293256233334:Ge=-.0927396152303864:Ge=.0665074081601698:e[0]>1550.5000000000002?Ge=.08972407105958534:Ge=-.0380796411182682:e[6]>13.500000000000002?e[10]>2.5000000000000004?Ge=.06761927942466854:Ge=-.015762168112653286:e[17]>1e-35?Ge=.10311304131145381:Ge=-.017672785252336027:Ge=-.08629805732772755:e[1]>24.500000000000004?e[138]>1e-35?Ge=-.10638321435298535:Ge=.0007073011744385905:e[18]>1e-35?Ge=-.027056185501334325:e[145]>1e-35?Ge=.023191199677450886:e[9]>33.50000000000001?e[201]>1e-35?Ge=.09762140519655171:e[9]>110.50000000000001?Ge=-.06581942957595835:e[6]>54.50000000000001?Ge=.04959634035251596:Ge=.0022616298654554207:Ge=-.007437620924990854;let Y;e[179]>1e-35?Y=-.06961998209988884:e[167]>1e-35?e[0]>3928.5000000000005?Y=.1470294450403005:Y=-.01671476793947083:e[187]>1e-35?e[6]>13.500000000000002?e[4]>30.500000000000004?e[13]>1e-35?Y=.07448480853603114:e[0]>1012.5000000000001?e[5]>2883.5000000000005?e[0]>3682.5000000000005?e[5]>4031.5000000000005?e[23]>1e-35?Y=.07965955447707423:e[10]>10.500000000000002?Y=-.09236156404262426:Y=.03396273196231458:Y=-.13246465021467432:Y=.07092822261735353:Y=-.08753829085942:Y=.09409024840640956:e[1]>40.50000000000001?e[8]>984.5000000000001?e[8]>1514.5000000000002?e[8]>2134.5000000000005?Y=.004705878789890202:Y=.13775378964952867:Y=-.04770928980587811:e[10]>29.500000000000004?Y=.011221519891071544:e[0]>3853.5000000000005?Y=.06365381191628273:Y=.15506252245336827:e[1]>37.50000000000001?Y=-.07254777021042061:Y=.026514587757252385:e[308]>1e-35?Y=.04115804816617256:e[10]>26.500000000000004?Y=.02077721353011946:e[5]>3548.5000000000005?Y=-.1280907116663952:Y=-.021974774274438:e[306]>1e-35?Y=-.02700446558079895:e[297]>1e-35?e[212]>1e-35?Y=.07794139136748461:e[7]>5.500000000000001?e[19]>1e-35?Y=-.005710865560475598:e[94]>1e-35?Y=-.06751507982853555:Y=.027250040757588703:e[9]>52.50000000000001?Y=.07060357924595577:Y=-.030297760713011795:Y=-.0006005400085266517;let ne;e[113]>1e-35?ne=-.07311041707507712:e[40]>1e-35?e[0]>1937.5000000000002?ne=-.06996356565314456:ne=.04780211300352931:e[10]>52.50000000000001?e[49]>1e-35?ne=-.08317707559926495:e[21]>1e-35?ne=-.0817284654645976:e[15]>1e-35?e[2]>3.5000000000000004?ne=-.010538203005984922:ne=.08454819465349446:e[9]>124.50000000000001?ne=.09015659250299132:e[7]>15.500000000000002?e[5]>5732.500000000001?ne=-.08542251249346582:e[9]>50.50000000000001?ne=-.023428882537657472:ne=.010042500833979073:ne=.020697210754240154:e[10]>28.500000000000004?e[5]>423.00000000000006?e[148]>1e-35?ne=.03006025206979096:e[9]>108.50000000000001?ne=-.09153851322499747:e[145]>1e-35?e[5]>4814.500000000001?e[2]>38.50000000000001?ne=.04222035773042132:ne=-.09078149053947535:e[8]>568.5000000000001?e[1]>64.50000000000001?ne=-.07209095448054853:ne=.028065954981903313:ne=.08714651929917122:ne=-.006678820669279169:e[10]>40.50000000000001?ne=.006982396294941626:ne=-.07889649792011418:e[94]>1e-35?e[4]>30.500000000000004?ne=-.09351114982645548:e[4]>3.5000000000000004?ne=-.004837550129223451:ne=-.08324141237464677:e[303]>1e-35?ne=.10703037493990825:e[9]>156.50000000000003?ne=-.10803018621648303:e[116]>1e-35?ne=-.03208302566598311:e[212]>1e-35?e[243]>1e-35?ne=.10261721665006701:ne=.018994509090668264:ne=.0011244262442038839;let Fe;e[86]>1e-35?e[8]>65.50000000000001?e[1]>46.50000000000001?Fe=-.08404263465005328:e[0]>3682.5000000000005?Fe=.041259223920298876:e[1]>29.500000000000004?Fe=-.09541257493441671:Fe=.001482192721625409:Fe=.051541427372951004:e[3]>7.500000000000001?e[157]>1e-35?Fe=-.08268996098437432:e[230]>1e-35?Fe=.015749498159959817:e[4]>7.500000000000001?e[3]>11.500000000000002?Fe=-913218977737457e-19:e[4]>10.500000000000002?Fe=-.056334165674005156:e[127]>1e-35?Fe=-.0784634021824036:e[2]>9.500000000000002?e[1]>62.50000000000001?Fe=-.04231200150318989:e[10]>42.50000000000001?Fe=.10182973257894812:Fe=.015934763950068445:Fe=-.03130938805859397:e[92]>1e-35?e[4]>6.500000000000001?e[1]>51.50000000000001?e[9]>19.500000000000004?Fe=-.041117068322885315:Fe=.1167767830037126:Fe=.13611206992387337:e[10]>41.50000000000001?Fe=-.07120286010564107:Fe=.022032788063345417:e[8]>1.5000000000000002?e[1]>51.50000000000001?e[9]>72.50000000000001?Fe=-.07702290997669524:e[198]>1e-35?Fe=.08776558554437136:Fe=-.008290740324975692:e[2]>32.50000000000001?Fe=.07198457624219955:Fe=.005463113714361629:Fe=.09414099512900526:e[129]>1e-35?e[0]>2904.5000000000005?e[0]>4004.5000000000005?Fe=.03295785445437507:Fe=.15140250150674536:Fe=-.035613213948910254:e[186]>1e-35?Fe=.06849425535860769:e[96]>1e-35?Fe=.06028225812727254:Fe=-.007582543288662308;let Se;e[84]>1e-35?e[9]>6.500000000000001?e[2]>43.50000000000001?Se=.08396556264106572:Se=-.0562516995099192:Se=-.10593011018789432:e[183]>1e-35?e[15]>1e-35?Se=-.09705176473553752:e[7]>18.500000000000004?e[2]>37.50000000000001?Se=.0052017514017035915:Se=-.11194119432743639:Se=.03724337696163019:e[227]>1e-35?e[17]>1e-35?e[2]>16.500000000000004?Se=-.025692451287403446:Se=-.09511862672123193:e[8]>1661.5000000000002?e[10]>37.50000000000001?Se=-.11892250746801664:e[10]>22.500000000000004?Se=.07548493166973796:Se=-.05973048107712209:e[4]>12.500000000000002?e[0]>4319.500000000001?e[10]>4.500000000000001?e[10]>37.50000000000001?Se=.13750699058082427:e[18]>1e-35?Se=.06535408879552801:Se=-.054118179035040674:Se=.1344282838979622:e[0]>3982.5000000000005?Se=-.10409582202467015:e[19]>1e-35?Se=.12672850705810795:e[8]>587.5000000000001?e[1]>35.50000000000001?Se=.012705935670766466:Se=.14149359442527545:Se=-.047977876173706004:e[20]>1e-35?Se=.057945228080337946:e[0]>3642.5000000000005?Se=-.008726535792122467:Se=-.08424769891378858:e[34]>1e-35?Se=-.0699329538228602:e[134]>1e-35?e[11]>1e-35?e[4]>15.500000000000002?e[0]>1187.5000000000002?Se=.01196849566739346:Se=.1614642278429876:Se=-.043022338150701625:e[3]>5.500000000000001?Se=-.03907848255033881:Se=.018280601026175593:Se=.0006654540402589085;let Ce;e[31]>1e-35?e[2]>58.50000000000001?e[9]>1.5000000000000002?Ce=-.01386103677247845:Ce=.11386694333005128:e[4]>27.500000000000004?Ce=-.021862617610091336:e[2]>31.500000000000004?Ce=.0828858469030438:Ce=.006483353475830127:e[224]>1e-35?e[149]>1e-35?e[13]>1e-35?Ce=.11303635767048735:Ce=-.01645525128352694:e[23]>1e-35?e[4]>62.50000000000001?Ce=-.04238798044549342:Ce=.022091190130494303:e[5]>5082.500000000001?Ce=-.04287166152163786:e[8]>862.5000000000001?e[19]>1e-35?Ce=.000660344696244351:e[4]>9.500000000000002?e[0]>1277.5000000000002?Ce=-.04291104140431434:e[17]>1e-35?Ce=.11256797532342613:Ce=-.017206916368289193:Ce=.026482035265709743:e[1]>8.500000000000002?e[11]>1e-35?Ce=.04060606971664621:e[0]>4733.500000000001?e[8]>214.50000000000003?e[5]>4814.500000000001?Ce=.03581712466863222:Ce=.14770264307668884:e[8]>73.50000000000001?Ce=-.13093289429740068:Ce=.042461737442702936:e[52]>1e-35?Ce=.0501831919044939:Ce=-.010450249720465756:Ce=-.0753365425372656:e[149]>1e-35?e[6]>23.500000000000004?Ce=.0005381332165438493:Ce=-.04549431717503909:e[133]>1e-35?e[2]>5.500000000000001?e[8]>698.5000000000001?e[282]>1e-35?Ce=.04849637311285226:Ce=-.036671377119808564:e[0]>421.50000000000006?Ce=.00020968499911058945:Ce=.11636422423182405:Ce=-.12687837788222575:Ce=.0012774367867215346;let Ue;e[120]>1e-35?Ue=.04776057572434719:e[229]>1e-35?e[0]>2952.5000000000005?e[0]>3904.5000000000005?Ue=-.042799574885345304:Ue=.07412430171193245:Ue=-.11248270469336048:e[193]>1e-35?Ue=-.060694220820603384:e[121]>1e-35?e[217]>1e-35?e[0]>4449.500000000001?e[4]>8.500000000000002?Ue=.028911612178122104:Ue=.12326369727728437:e[0]>4091.5000000000005?Ue=-.09370267064141052:e[0]>3519.5000000000005?e[8]>668.5000000000001?Ue=.1159839898100149:Ue=-.01924880886585737:e[8]>501.50000000000006?e[10]>16.500000000000004?Ue=-.0216343737351583:Ue=-.1220272260878369:e[2]>18.500000000000004?Ue=.09152924475072398:e[8]>55.50000000000001?Ue=.039508716651005665:Ue=-.11714436880423203:e[18]>1e-35?e[9]>2.5000000000000004?Ue=.06793009902674053:Ue=-.024060578029812988:e[4]>2.5000000000000004?e[2]>16.500000000000004?e[4]>11.500000000000002?Ue=-.04391068849624096:Ue=.04009967593394672:e[8]>1085.5000000000002?Ue=-.024773826356034825:Ue=-.13919707884246582:Ue=.06659278075192335:e[223]>1e-35?e[8]>668.5000000000001?Ue=-.11567917501901476:Ue=-.006813640337684114:e[3]>7.500000000000001?Ue=.0010671269682548076:e[7]>3.5000000000000004?e[1]>33.50000000000001?e[0]>1597.5000000000002?e[10]>1.5000000000000002?Ue=-.001754586408351048:Ue=-.055422422450722056:Ue=-.06090032532532226:e[0]>5269.500000000001?Ue=.11787981735983527:Ue=-.00198119768540783:Ue=.00210412924303036;let Ve;e[294]>1e-35?e[10]>50.50000000000001?Ve=-.09738558653332406:e[0]>2432.5000000000005?e[0]>4533.500000000001?Ve=-.06063239096209816:Ve=.03317022411417386:Ve=-.08607562321324262:e[120]>1e-35?e[4]>18.500000000000004?Ve=-.013608609329298802:Ve=.09078000157330264:e[99]>1e-35?Ve=.014828708581964632:e[10]>52.50000000000001?e[49]>1e-35?Ve=-.07536137260189814:Ve=.006253266595455118:e[10]>28.500000000000004?Ve=-.006106041147592768:e[9]>156.50000000000003?Ve=-.11828932797811101:e[94]>1e-35?Ve=-.02566078479505714:e[303]>1e-35?Ve=.09544850289775349:e[15]>1e-35?e[224]>1e-35?e[4]>56.50000000000001?Ve=-.08401252789168523:e[5]>4244.500000000001?Ve=.026372887658499107:e[1]>16.500000000000004?Ve=-.027836756345634026:Ve=.09205362097909099:Ve=.00934612788718244:e[203]>1e-35?Ve=-.016371658366767253:e[7]>26.500000000000004?e[0]>966.5000000000001?e[1]>38.50000000000001?e[146]>1e-35?e[9]>21.500000000000004?Ve=-.09580979052540028:e[1]>50.50000000000001?Ve=-.06402211827281554:Ve=.08342858760095972:e[2]>36.50000000000001?Ve=.008114897658204584:e[92]>1e-35?Ve=.09541587072672864:Ve=-.022342147210555434:Ve=-.01660492519175128:Ve=.014721622240945446:e[4]>25.500000000000004?e[11]>1e-35?Ve=.15846731118501817:Ve=.039498507912023195:e[245]>1e-35?Ve=.07008718676813333:Ve=.0019806389728814727;let tt;e[32]>1e-35?e[8]>90.50000000000001?e[4]>67.50000000000001?e[0]>4188.500000000001?tt=-.01192072916082109:tt=.13888590840802637:e[1]>16.500000000000004?e[8]>2302.5000000000005?tt=.06874032717466054:e[4]>40.50000000000001?tt=-.07752510020707537:e[1]>76.50000000000001?tt=-.09944032260703917:e[8]>1381.5000000000002?tt=-.054466635810800745:e[1]>32.50000000000001?tt=.05974084520839573:tt=-.0384718740755954:tt=-.11374190719134032:e[0]>2151.5000000000005?tt=-.13703645155803298:tt=.004833344758654556:e[297]>1e-35?e[212]>1e-35?tt=.06954747264544993:e[7]>9.500000000000002?e[19]>1e-35?e[1]>30.500000000000004?e[0]>4242.500000000001?tt=.013539805885738608:tt=-.0692740641801559:e[0]>2653.5000000000005?e[10]>57.50000000000001?tt=.09941880179344399:tt=-.01608127391210995:tt=.08025226531247417:e[9]>67.50000000000001?tt=.13525448212444113:e[6]>61.50000000000001?tt=-.05511099182158894:e[94]>1e-35?tt=-.06821509831783572:e[128]>1e-35?tt=.11361314817714643:tt=.030160785008575566:e[1]>13.500000000000002?e[8]>17.500000000000004?e[16]>1e-35?tt=-.09954181329804547:e[197]>1e-35?tt=.10102833149755386:e[188]>1e-35?tt=.05584490988313965:e[9]>49.50000000000001?e[4]>5.500000000000001?tt=-.03781554214742005:tt=.09927933385592314:tt=-.020006000056720083:tt=-.10520473615957895:tt=-.12006990846253787:tt=-.00026111570975317574;let Ct;e[8]>2830.5000000000005?e[1]>31.500000000000004?e[9]>32.50000000000001?e[5]>1234.5000000000002?e[0]>1725.5000000000002?e[7]>14.500000000000002?e[2]>38.50000000000001?Ct=-.019188245509744628:Ct=-.13354864350075848:e[0]>2461.5000000000005?Ct=.051885477468354396:Ct=-.0833581968852119:Ct=.08233441701532287:Ct=-.10865584951212362:e[8]>2992.5000000000005?e[10]>49.50000000000001?e[10]>56.50000000000001?e[1]>45.50000000000001?e[0]>2041.5000000000002?Ct=.09926337893072812:Ct=-.027753610497327715:e[0]>1972.5000000000002?Ct=-.09780045823152517:Ct=.032380915168504935:Ct=.11502632261226381:e[17]>1e-35?Ct=-.06094965899579662:e[10]>40.50000000000001?Ct=-.07500475582440802:Ct=.006499832113084677:e[10]>4.500000000000001?e[4]>10.500000000000002?Ct=-.09584538995220808:Ct=-.00908705814304442:Ct=.03203281520813893:e[10]>49.50000000000001?Ct=-.03146271513986384:e[2]>63.50000000000001?Ct=.13172001315536286:e[224]>1e-35?Ct=.08945777550527927:e[0]>2282.5000000000005?e[4]>4.500000000000001?Ct=.09521549382082259:Ct=-.04414925613522197:e[0]>1847.5000000000002?Ct=-.09118580379557353:Ct=.009206744918282364:e[178]>1e-35?e[2]>25.500000000000004?e[1]>31.500000000000004?Ct=.03525144509943896:Ct=-.053340750721609057:e[0]>1057.5000000000002?e[10]>2.5000000000000004?Ct=-.04766112322938157:e[2]>10.500000000000002?Ct=.0728516504357201:Ct=-.05049625965272536:Ct=-.10868663055825774:Ct=.0005382613419948969;let Pt;e[147]>1e-35?e[1]>53.50000000000001?Pt=-.10615739288764095:e[0]>2604.5000000000005?e[0]>3629.5000000000005?Pt=-.030504020655417463:Pt=.07102458639110094:Pt=-.07058131985243714:e[302]>1e-35?e[10]>47.50000000000001?Pt=.055304563442710876:e[1]>53.50000000000001?Pt=.033723409577443623:e[8]>175.50000000000003?e[0]>2628.5000000000005?e[9]>40.50000000000001?Pt=-.1568835288372895:Pt=-.0279829124400056:Pt=.04493843959601833:Pt=-.11637042729644327:e[191]>1e-35?e[282]>1e-35?Pt=-.054133834303687026:e[9]>48.50000000000001?Pt=.11263810289007213:e[9]>9.500000000000002?Pt=-.02202034562838259:e[4]>45.50000000000001?Pt=-.03410927569045158:Pt=.04381615166534081:e[242]>1e-35?e[0]>3615.5000000000005?e[3]>19.500000000000004?e[1]>56.50000000000001?e[4]>28.500000000000004?Pt=-.029687297407295893:Pt=.10673602850001934:e[4]>42.50000000000001?Pt=.0036275562945108117:Pt=-.0760789221330622:Pt=-.10385623431741903:e[2]>34.50000000000001?e[2]>44.50000000000001?e[4]>51.50000000000001?Pt=.08274426793676076:Pt=-.07076234425516396:Pt=.13890177606150175:Pt=-.019863286503635686:e[53]>1e-35?e[18]>1e-35?Pt=-.09250637750836187:Pt=-.0031531727902009026:e[2]>107.50000000000001?e[4]>91.50000000000001?e[1]>16.500000000000004?Pt=-.01897867921812603:Pt=.04890781705365262:Pt=-.11569892307597907:e[2]>106.50000000000001?Pt=.09032697440623969:Pt=.00047935919155035045;let yt;e[115]>1e-35?yt=.05338335681275557:e[242]>1e-35?e[0]>3615.5000000000005?e[4]>42.50000000000001?e[4]>75.50000000000001?yt=-.10131179514695865:e[8]>938.5000000000001?yt=.10203729808015481:yt=-.015357944186835289:e[1]>56.50000000000001?e[2]>22.500000000000004?yt=.03574015165562999:yt=-.07763042506449493:yt=-.0813323116215548:e[2]>34.50000000000001?e[2]>44.50000000000001?e[4]>51.50000000000001?yt=.0665706259130275:yt=-.06586817559309924:yt=.11925564412287476:yt=-.014170019267143326:e[1]>124.50000000000001?e[2]>30.500000000000004?e[8]>533.5000000000001?e[4]>41.50000000000001?e[8]>977.5000000000001?yt=.046017146627455346:yt=-.08623321630086885:e[8]>1765.5000000000002?yt=-.017990564319859934:e[10]>25.500000000000004?e[10]>48.50000000000001?yt=.11143827902215087:yt=-.01817808730473413:yt=.16980985030210127:yt=-.09357806298740017:e[10]>7.500000000000001?e[10]>54.50000000000001?yt=.010168994879727824:yt=-.09099594488792513:e[9]>1.5000000000000002?yt=.0533459678147928:yt=-.06886854808370108:e[99]>1e-35?e[17]>1e-35?e[9]>22.500000000000004?yt=-.062346959148773695:e[1]>47.50000000000001?yt=-.0021578343835599316:e[2]>27.500000000000004?yt=.19567373210166172:yt=.07851555379116423:e[18]>1e-35?yt=.03711549097804649:e[8]>359.50000000000006?yt=.012492346746905587:e[4]>20.500000000000004?yt=.047511695735697544:yt=-.07999269063948773:yt=6802045404471004e-20;let Kt;e[222]>1e-35?e[0]>612.5000000000001?e[10]>1e-35?e[8]>2167.5000000000005?e[4]>25.500000000000004?Kt=.0011484728213539738:Kt=-.0936582904650763:e[2]>25.500000000000004?e[8]>182.50000000000003?e[10]>22.500000000000004?e[0]>5026.500000000001?Kt=-.09828874964938798:e[8]>1586.5000000000002?Kt=.13726397438080162:e[4]>48.50000000000001?e[2]>63.50000000000001?Kt=.011938269926919522:Kt=.17541983715953954:e[19]>1e-35?Kt=.023002786011088672:Kt=-.06221461272461431:e[9]>2.5000000000000004?e[0]>3818.5000000000005?Kt=.06508934844183291:Kt=-.10168553534835639:Kt=-.07755626499024171:e[2]>51.50000000000001?e[4]>65.50000000000001?Kt=.021140806225203937:Kt=-.1167833342453639:e[2]>33.50000000000001?Kt=.13163585734056618:Kt=-.00203273890889717:e[10]>36.50000000000001?e[8]>1067.5000000000002?Kt=.06314479201263888:Kt=-.09639088327091713:e[10]>29.500000000000004?Kt=.09225469303582386:e[0]>3129.5000000000005?e[0]>4091.5000000000005?e[0]>4354.500000000001?Kt=40577156464836036e-21:Kt=.12322387121810757:Kt=-.03697224045046014:e[1]>22.500000000000004?Kt=.016474835887320276:Kt=.16919298733903063:Kt=.07633203630214054:Kt=-.047438037934250644:e[30]>1e-35?e[224]>1e-35?e[1]>52.50000000000001?Kt=.14150493354700563:Kt=-.01831155354975749:e[1]>28.500000000000004?Kt=-.07952557178685365:e[10]>28.500000000000004?Kt=.0665695554984927:Kt=-.053640139319277094:Kt=.0004754840665898665;let Xt;e[76]>1e-35?Xt=-.06814884255939921:e[179]>1e-35?Xt=-.06325743795510681:e[122]>1e-35?e[6]>36.50000000000001?Xt=.05052338063261613:e[8]>626.5000000000001?e[1]>38.50000000000001?Xt=.004193658608848433:Xt=-.1066968975983452:e[8]>302.50000000000006?Xt=.05476730110440451:Xt=-.06382970920394895:e[218]>1e-35?e[2]>3.5000000000000004?e[6]>13.500000000000002?e[2]>19.500000000000004?e[0]>3200.5000000000005?e[4]>91.50000000000001?Xt=-.12156071809840739:e[9]>21.500000000000004?e[5]>3883.5000000000005?e[8]>919.5000000000001?e[8]>1085.5000000000002?Xt=.013555772109446666:Xt=-.09856116699770784:Xt=.0284329611813383:e[2]>52.50000000000001?Xt=.04008708444763762:e[9]>29.500000000000004?Xt=-.1289599546008197:Xt=-.018566534248335896:e[8]>747.5000000000001?Xt=.02236484980076122:Xt=.1148871655157582:e[8]>3084.0000000000005?Xt=-.05573875952902531:e[10]>17.500000000000004?e[2]>51.50000000000001?Xt=.03164751204281298:Xt=.11752140436184891:e[9]>42.50000000000001?Xt=-.07180559595410106:e[22]>1e-35?Xt=.09325040416256854:Xt=-.016041122807939914:Xt=-.02765708954618808:e[1]>30.500000000000004?e[1]>66.50000000000001?Xt=-.010718250133458515:Xt=.09818827994853763:Xt=.010180038981174032:Xt=-.039472162599295535:e[9]>170.50000000000003?Xt=-.08536729235976731:e[189]>1e-35?e[0]>5269.500000000001?Xt=-.08674788057474031:Xt=.02077653508548371:Xt=-.0003536561382007414;let lr;e[86]>1e-35?e[10]>6.500000000000001?e[0]>4376.500000000001?lr=.018337297491457794:lr=-.05926206443180149:lr=.024026520855881126:e[288]>1e-35?e[184]>1e-35?lr=.10747078482128616:e[126]>1e-35?lr=-.10550625192391357:e[7]>71.50000000000001?lr=-.07698346027863572:e[8]>302.50000000000006?e[6]>49.50000000000001?e[4]>47.50000000000001?e[1]>38.50000000000001?e[15]>1e-35?lr=.1317396472229434:lr=-.025035791351328947:lr=-.0728334305864372:e[8]>963.5000000000001?lr=.023642201723096064:lr=.183010326734258:e[128]>1e-35?lr=.04228920135648387:e[2]>34.50000000000001?e[15]>1e-35?lr=.002801782941492993:e[3]>40.50000000000001?e[4]>39.50000000000001?lr=-.1088876900335281:lr=.02758317023002635:lr=-.11886771300807207:e[9]>59.50000000000001?e[1]>33.50000000000001?lr=-.01928020117446408:lr=.10193718474139135:e[1]>48.50000000000001?e[4]>9.500000000000002?e[8]>932.5000000000001?lr=.07893723375925096:lr=-.009878929627026153:e[10]>2.5000000000000004?e[9]>20.500000000000004?lr=-.10301657587280551:lr=.005787463140224318:lr=.07421364314695046:e[0]>2840.5000000000005?e[10]>29.500000000000004?lr=-.019296977889522397:lr=-.07274529751752634:e[1]>30.500000000000004?lr=-.050368901143148286:lr=.029630869489466655:e[2]>6.500000000000001?e[4]>9.500000000000002?lr=.0015332402792773946:lr=.09930153676749967:lr=-.06370844564357069:lr=.00042272155209927616;let ge;e[71]>1e-35?e[4]>17.500000000000004?ge=.12586844370423247:ge=-.006791999603126354:e[222]>1e-35?e[1]>10.500000000000002?e[30]>1e-35?e[1]>36.50000000000001?e[9]>1.5000000000000002?e[10]>25.500000000000004?ge=-.08474891624263797:e[8]>125.50000000000001?ge=.08125086980439704:ge=-.04082085238068532:e[0]>3863.5000000000005?ge=.020481535807469208:ge=.14810819386202126:e[0]>1937.5000000000002?e[2]>16.500000000000004?ge=-.019110200161573936:ge=-.12387719685855114:e[0]>1102.5000000000002?ge=.08376595701957407:ge=-.031821919580524834:e[9]>4.500000000000001?ge=-.08116383486497568:e[7]>8.500000000000002?e[2]>24.500000000000004?ge=-.02154820850475448:e[0]>3863.5000000000005?e[8]>902.5000000000001?ge=.1349841206807871:ge=.011864053595560297:e[1]>41.50000000000001?ge=-.08203662486612544:e[2]>18.500000000000004?ge=-.009541865642346947:ge=.08345043168501759:e[2]>10.500000000000002?ge=-.09585031818030947:ge=.019432330487099865:ge=.08399259524715129:e[30]>1e-35?e[224]>1e-35?e[1]>52.50000000000001?ge=.11951517733981365:ge=-.016651014735738538:e[1]>28.500000000000004?ge=-.07410922545030711:e[10]>28.500000000000004?ge=.05886430683844788:ge=-.04929626605117184:e[191]>1e-35?e[9]>9.500000000000002?e[9]>48.50000000000001?ge=.04802269879144705:ge=-.026208212831796737:e[4]>45.50000000000001?ge=-.03227476944664786:ge=.05124575625622705:ge=.00020506696916003137;let Me;e[116]>1e-35?e[9]>2.5000000000000004?e[9]>17.500000000000004?Me=-.03042091758483443:e[10]>14.500000000000002?Me=.09816619204768777:Me=.01332124067720947:e[8]>8.500000000000002?e[4]>15.500000000000002?Me=-.02381165060401718:Me=-.10950361804974783:Me=.03538211665111128:e[212]>1e-35?e[19]>1e-35?Me=-.09940014650006174:e[0]>2215.5000000000005?e[5]>5056.500000000001?e[3]>5.500000000000001?e[10]>25.500000000000004?Me=-.06371052144380579:Me=.0835500621252692:Me=-.10408255929333915:e[1]>74.50000000000001?Me=.13208968122712403:e[1]>64.50000000000001?Me=-.04778844603644965:e[8]>51.50000000000001?e[8]>201.50000000000003?e[8]>660.5000000000001?e[6]>4.500000000000001?e[9]>5.500000000000001?e[1]>29.500000000000004?e[0]>3830.5000000000005?Me=.09922816902423433:Me=.016366955328796718:Me=.1592412560903584:e[1]>39.50000000000001?Me=.05409467990258923:Me=-.08260633210459611:Me=-.06307205775247567:e[9]>36.50000000000001?Me=.040253940015648144:Me=.14202568969471283:Me=-.028761848341594044:Me=.08994073058773508:e[0]>807.5000000000001?Me=-.043427848826323195:Me=.04573516446846493:e[20]>1e-35?e[188]>1e-35?Me=-.0758877731600639:e[23]>1e-35?Me=.05913923322043199:e[8]>155.50000000000003?e[128]>1e-35?Me=.08124700978741987:Me=.013296063087086852:e[7]>5.500000000000001?Me=-.01640196088612987:Me=-.12685498840146067:Me=-.0004940792382459551;let Je;e[1]>24.500000000000004?e[103]>1e-35?e[8]>61.50000000000001?e[17]>1e-35?Je=-.05584993681929434:e[9]>27.500000000000004?e[0]>3916.5000000000005?Je=.08513773825688947:Je=-.1184664832315282:Je=.05676963535893477:Je=.14263843210340613:Je=.0005795003292924202:e[18]>1e-35?e[0]>5453.500000000001?e[1]>11.500000000000002?Je=-.10669720555606924:Je=.029016613003137307:e[2]>46.50000000000001?e[10]>9.500000000000002?Je=.0664744575868955:Je=-.08469256188890871:Je=-.026746678040592144:e[281]>1e-35?Je=-.07408427239006925:e[145]>1e-35?e[4]>6.500000000000001?e[9]>16.500000000000004?e[4]>18.500000000000004?Je=.012131807587207655:Je=-.12776015795398743:Je=.04320472481083551:Je=.08390980661550446:e[10]>227.50000000000003?Je=-.09771783809101153:e[10]>130.50000000000003?Je=.11175201938704937:e[8]>779.5000000000001?e[5]>3325.5000000000005?e[128]>1e-35?Je=-.07610698254064358:e[8]>902.5000000000001?Je=-.03136381213599649:e[131]>1e-35?Je=.0704821739127936:e[224]>1e-35?Je=-.056961477774953785:e[10]>30.500000000000004?e[9]>43.50000000000001?Je=.10431473040024908:e[8]>841.5000000000001?Je=.07304745320500514:Je=-.038011541882439825:Je=-.01679746695007364:e[0]>3129.5000000000005?Je=.05589952587431965:e[210]>1e-35?Je=.06227198085800842:Je=-.0011341890997947812:e[8]>740.5000000000001?Je=.04817300084412584:Je=-.000577001010789238;let rt;e[187]>1e-35?e[6]>12.500000000000002?e[10]>8.500000000000002?e[10]>16.500000000000004?e[8]>234.50000000000003?e[4]>43.50000000000001?e[0]>4476.500000000001?rt=-.10504730480402079:e[5]>3341.5000000000005?rt=.11087894671081754:rt=-.0406668834674614:rt=.03308382165616109:e[8]>104.50000000000001?rt=-.10431436764549162:rt=.0073928337244891455:e[4]>34.50000000000001?rt=-.10571751512748416:rt=-.006081128814142983:e[13]>1e-35?rt=.1299673566095023:e[4]>60.50000000000001?rt=-.06587492443829139:e[0]>2604.5000000000005?e[3]>19.500000000000004?rt=.04857126072645073:rt=-.03431365358104773:e[4]>16.500000000000004?rt=.04101865986596709:rt=.16480274980378218:e[10]>26.500000000000004?rt=.03673978504199255:e[10]>9.500000000000002?rt=-.10996402743800027:e[308]>1e-35?rt=.0553693735082498:rt=-.041600136235644125:e[306]>1e-35?e[8]>1156.5000000000002?e[4]>14.500000000000002?e[10]>21.500000000000004?rt=.010902983761213922:rt=.1325118659895645:rt=-.064362945508595:e[1]>66.50000000000001?rt=.033416767779331176:rt=-.054080316225040496:e[42]>1e-35?rt=-.07762364337810815:e[10]>1089.5000000000002?rt=-.08465599849125216:e[31]>1e-35?e[8]>30.500000000000004?rt=.012788520036013586:e[1]>32.50000000000001?e[1]>51.50000000000001?rt=.0220102041325908:rt=-.06516708740003069:rt=.012833498905748267:e[224]>1e-35?rt=-.007038418272997865:rt=.00037666304316290967;let St;e[84]>1e-35?e[9]>6.500000000000001?e[2]>43.50000000000001?St=.07554189644995735:St=-.052089349455904946:St=-.10148206848169845:e[113]>1e-35?St=-.06666678653225779:e[39]>1e-35?e[9]>3.5000000000000004?e[0]>3670.5000000000005?St=.07172653627995676:St=-.07602959317610998:St=-.08790686271287523:e[229]>1e-35?e[0]>2952.5000000000005?e[0]>3904.5000000000005?St=-.0399322883690891:St=.06523495517476098:St=-.10358715295743802:e[193]>1e-35?St=-.05551414334329124:e[134]>1e-35?e[11]>1e-35?e[2]>13.500000000000002?e[10]>1.5000000000000002?St=.015928764772252406:St=.1341513061552287:St=-.04975001987586173:e[10]>2.5000000000000004?e[3]>5.500000000000001?e[9]>2.5000000000000004?e[8]>310.50000000000006?St=-.033592997607280156:St=-.12432458028446665:e[1]>32.50000000000001?e[217]>1e-35?St=-.08402551858097379:St=.017401984506038796:e[1]>25.500000000000004?St=.13337205393591278:St=-.01160208350090984:St=.06708317942315471:e[8]>227.50000000000003?St=-.08486943882418681:St=-.013970104864235007:e[8]>4968.500000000001?e[1]>31.500000000000004?e[9]>4.500000000000001?St=-.10496268177586783:St=-.020921489532370493:St=.02629915927247642:e[7]>20.500000000000004?e[8]>251.50000000000003?e[115]>1e-35?St=.11639296062157028:St=-.004275784356569115:e[32]>1e-35?St=-.07297384970166025:St=.006026841626381599:St=.002034611134960428;let bt;e[248]>1e-35?bt=.06091438745093315:e[0]>384.50000000000006?e[204]>1e-35?e[1]>62.50000000000001?bt=-.06455513326540585:e[1]>29.500000000000004?bt=.07718474591552532:e[4]>7.500000000000001?bt=.040139336931404826:bt=-.09685734690563386:bt=.00015327283570347363:e[9]>88.50000000000001?bt=.10079017954199324:e[1]>47.50000000000001?e[2]>20.500000000000004?e[2]>27.500000000000004?bt=-.04077257804338707:bt=.0739963982640615:e[9]>1.5000000000000002?e[17]>1e-35?bt=.03778141591008941:bt=-.06459919920634845:bt=-.11193190957880604:e[7]>6.500000000000001?e[11]>1e-35?e[18]>1e-35?bt=.14063930759326346:e[0]>179.50000000000003?bt=.07287482250668585:e[8]>1180.5000000000002?bt=-.14419393112726253:e[10]>28.500000000000004?bt=-.07993142770099469:e[17]>1e-35?bt=-.04702595410391655:e[7]>21.500000000000004?e[2]>26.500000000000004?bt=.05527969663610186:bt=-.10824385941441346:e[3]>11.500000000000002?bt=.12358502961047915:bt=-.017509147119622873:e[0]>74.50000000000001?bt=-.014907705458730486:e[8]>95.50000000000001?bt=-.02225118168342062:bt=-.1222374623708485:e[8]>1.5000000000000002?e[8]>950.5000000000001?bt=.06946188930925638:e[3]>6.500000000000001?e[10]>2.5000000000000004?e[19]>1e-35?bt=.04962819555610421:bt=-.07213577821855309:bt=.09139529824708481:e[19]>1e-35?bt=.013439401088345224:bt=-.049274647207292056:bt=.10531673719686951;let Mt;e[40]>1e-35?e[0]>1937.5000000000002?Mt=-.06421671152073961:Mt=.04235421241226177:e[294]>1e-35?e[10]>50.50000000000001?Mt=-.09100102290316286:e[0]>3030.5000000000005?e[0]>4177.500000000001?Mt=-.03520420769287065:e[8]>1085.5000000000002?Mt=-.019817352506127633:Mt=.11444439424520964:Mt=-.06854631664538167:e[120]>1e-35?e[4]>18.500000000000004?Mt=-.010490117519863269:Mt=.08104430117757461:e[121]>1e-35?e[243]>1e-35?Mt=.16408304891242204:e[217]>1e-35?e[0]>4449.500000000001?Mt=.06619344145920268:e[0]>4091.5000000000005?Mt=-.08813353450871053:e[0]>3519.5000000000005?e[8]>668.5000000000001?Mt=.10016091391222309:Mt=-.017407607199427293:e[8]>501.50000000000006?e[10]>16.500000000000004?Mt=-.019511460451434884:Mt=-.11643672465055221:e[2]>18.500000000000004?Mt=.07848228087333317:e[8]>55.50000000000001?Mt=.032583027899956235:Mt=-.11209832692153521:e[11]>1e-35?Mt=.027482174104412567:e[10]>1.5000000000000002?e[6]>26.500000000000004?e[4]>19.500000000000004?e[9]>31.500000000000004?Mt=-.09996887746328006:e[9]>2.5000000000000004?Mt=.02157682011863397:Mt=-.05247727848991843:Mt=.07409150201483244:e[1]>38.50000000000001?Mt=-.11378466075449625:e[224]>1e-35?Mt=-.10741749127732923:e[1]>26.500000000000004?Mt=.07343136534146562:Mt=-.07013573628594773:e[25]>1e-35?Mt=-.04626669734164317:Mt=.05518333197956482:Mt=.00032434010867555516;let Ot;e[183]>1e-35?e[10]>1.5000000000000002?e[17]>1e-35?Ot=.026313251010808853:Ot=-.08997339150292381:Ot=.025062509535227952:e[227]>1e-35?e[1]>6.500000000000001?e[2]>9.500000000000002?e[210]>1e-35?Ot=.08071107515789745:e[23]>1e-35?e[1]>75.50000000000001?Ot=.0905155504503746:e[8]>1049.5000000000002?Ot=-.062312558183394054:e[8]>719.5000000000001?Ot=.09583836191410239:e[0]>3719.5000000000005?Ot=-.0778097309430818:Ot=.04012012419054895:e[4]>12.500000000000002?e[8]>1496.5000000000002?e[10]>42.50000000000001?Ot=-.12920865648544927:e[0]>2699.5000000000005?Ot=-.07086587879041864:Ot=.022614182502461846:e[4]>15.500000000000002?e[8]>55.50000000000001?e[1]>60.50000000000001?e[8]>652.5000000000001?Ot=-.11377786322600797:Ot=-.009486325820117998:e[1]>55.50000000000001?Ot=.12430248795958142:e[0]>2952.5000000000005?e[0]>4331.500000000001?e[1]>38.50000000000001?Ot=-.07938291201004219:e[2]>36.50000000000001?Ot=.01520046732530246:Ot=.13649854049662832:Ot=-.07145015938528873:e[8]>407.50000000000006?Ot=-.00350257360822279:Ot=.11332047082193297:Ot=-.10060624458629897:Ot=.05429496612497562:e[8]>1446.5000000000002?Ot=.006073419197482838:Ot=-.08718676350883998:Ot=-.11532497988252638:Ot=.10766270463068293:e[34]>1e-35?Ot=-.06345912440611544:e[131]>1e-35?e[9]>1.5000000000000002?Ot=-.0004109812623829506:Ot=.021601073497455662:Ot=-7343540098965853e-20;let wt;e[298]>1e-35?e[9]>12.500000000000002?e[133]>1e-35?wt=-.06107663265515864:e[9]>70.50000000000001?e[10]>37.50000000000001?wt=.05995640200798119:e[0]>3443.5000000000005?wt=-.14698883458733583:wt=-.030039164579240187:e[189]>1e-35?wt=-.06086763220538141:e[1]>86.50000000000001?wt=-.05096727866142538:e[4]>64.50000000000001?wt=.11240554253834577:e[4]>45.50000000000001?wt=-.030279760168394117:e[6]>45.50000000000001?wt=.10161088917815142:e[10]>77.50000000000001?wt=-.0792333078055653:e[7]>23.500000000000004?e[0]>2882.5000000000005?wt=-.06672020005240323:wt=.08831457502630258:e[8]>2592.5000000000005?wt=-.052617701047376654:e[10]>29.500000000000004?wt=.08499327690298047:e[2]>12.500000000000002?e[9]>41.50000000000001?wt=.12880460816709416:e[9]>25.500000000000004?e[4]>11.500000000000002?wt=-.064099222705728:wt=.044332487521538365:e[0]>2882.5000000000005?wt=.031099546885005065:wt=.12938467051623853:e[0]>4221.500000000001?wt=-.0928676413498701:e[9]>30.500000000000004?wt=-.05781824812803708:wt=.07561268901778094:e[8]>711.5000000000001?e[2]>22.500000000000004?wt=-.06648105454098469:wt=.05985487552383097:wt=-.13070190291919334:e[116]>1e-35?e[10]>38.50000000000001?wt=.05282385499619401:e[1]>66.50000000000001?wt=.048802929108006314:e[2]>4.500000000000001?e[0]>4593.500000000001?wt=.027885690791379255:wt=-.08407126408362446:wt=.014432924125571093:wt=-9903435845205118e-20;let kt;e[76]>1e-35?kt=-.06307875292162934:e[21]>1e-35?e[7]>10.500000000000002?e[10]>4.500000000000001?e[8]>944.5000000000001?e[0]>3655.5000000000005?kt=.013633653464240465:kt=-.10164319411983509:kt=-.1228424374328996:e[1]>26.500000000000004?e[2]>28.500000000000004?kt=.00632864847804078:kt=-.08393000368134668:kt=.07870508617440916:e[284]>1e-35?kt=.1092302727710421:kt=-.0025505047582483234:e[248]>1e-35?kt=.07101822393621864:e[274]>1e-35?kt=-.06621099406425579:e[1]>26.500000000000004?e[1]>28.500000000000004?kt=.0003077044909372931:e[10]>2.5000000000000004?e[0]>3770.5000000000005?kt=.025081789181021243:kt=-.014813325803582618:e[9]>33.50000000000001?kt=-.033466921233840194:e[3]>12.500000000000002?e[23]>1e-35?kt=.11926990418060353:kt=.01852125513565268:kt=.0975367595927343:e[5]>3325.5000000000005?e[8]>892.5000000000001?e[133]>1e-35?kt=-.1178464984373743:e[283]>1e-35?kt=.043370859226927405:e[5]>4320.500000000001?kt=-.01103141226366587:e[8]>1104.5000000000002?kt=-.023053423988095886:kt=-.0734238953804657:e[6]>18.500000000000004?e[8]>85.50000000000001?kt=.000579145585864887:kt=.03389152834202143:e[128]>1e-35?kt=-.14527722052568462:e[210]>1e-35?kt=-.08915971541902741:e[7]>9.500000000000002?kt=-.03307314577076116:e[18]>1e-35?kt=-.05521712302023565:kt=.009315605032770029:kt=.0036332551852289933;let _t;e[0]>689.5000000000001?e[5]>768.5000000000001?e[20]>1e-35?e[5]>4368.500000000001?_t=-.07583539600416284:e[188]>1e-35?_t=-.07042659515500142:e[23]>1e-35?e[0]>3807.5000000000005?_t=-.011038193049597113:_t=.08154028164397753:e[1]>85.50000000000001?_t=.10259361975201933:_t=.011640408330521594:_t=-.00023319159023748508:e[92]>1e-35?_t=.13771692859530546:_t=.022860029819654806:e[1]>22.500000000000004?e[1]>24.500000000000004?e[2]>96.50000000000001?_t=.09967230141007705:e[30]>1e-35?_t=-.08888529037551285:_t=-.008615931385397808:e[10]>5.500000000000001?e[4]>36.50000000000001?_t=.08284665960761373:_t=-.029292565021289504:e[7]>7.500000000000001?_t=-.09945093355204493:_t=-.008381393701708593:e[20]>1e-35?_t=-.04218678460370465:e[10]>6.500000000000001?e[9]>2.5000000000000004?e[1]>13.500000000000002?e[8]>143.50000000000003?e[4]>7.500000000000001?e[2]>36.50000000000001?_t=.07585582641438211:e[8]>284.50000000000006?_t=-.029387993239886723:_t=.07716738177321587:e[1]>18.500000000000004?_t=.026745348497993746:_t=.1427429617069753:e[9]>16.500000000000004?e[9]>33.50000000000001?_t=.02337306890530338:_t=-.10390355904767366:_t=.07390521199638532:_t=-.06788247515155237:_t=-.04201446383470994:e[2]>25.500000000000004?e[2]>29.500000000000004?e[8]>227.50000000000003?_t=-.06360325615644084:_t=.04342192339836601:_t=-.10598779152030145:_t=.05253384605768211;let qt;e[3]>7.500000000000001?e[157]>1e-35?qt=-.07514182877923786:qt=.000636205502279271:e[129]>1e-35?e[0]>2904.5000000000005?e[0]>4004.5000000000005?qt=.028692053800951845:qt=.14081686716133598:qt=-.03316566526940354:e[186]>1e-35?e[0]>2653.5000000000005?qt=.0037139292567243084:qt=.12662311031652707:e[107]>1e-35?e[0]>612.5000000000001?qt=.01202688580305612:qt=.0993509141454483:e[203]>1e-35?e[1]>77.50000000000001?qt=.043935495082738626:qt=-.05639305759669704:e[247]>1e-35?qt=-.06770766046891649:e[105]>1e-35?e[19]>1e-35?qt=.10331836202616368:qt=.0006926658459781341:e[96]>1e-35?qt=.05361846065599475:e[127]>1e-35?e[0]>2723.5000000000005?e[1]>54.50000000000001?qt=-.0741403257305367:qt=.022900127535540854:e[7]>3.5000000000000004?qt=.038110741403836294:qt=.14618649985842758:e[5]>3921.5000000000005?e[1]>110.50000000000001?qt=-.09552842289807008:e[1]>27.500000000000004?qt=.012505935885798007:qt=-.020509603428689526:e[282]>1e-35?e[9]>45.50000000000001?e[6]>5.500000000000001?qt=-.1046104767723845:qt=.031388606992301074:e[8]>114.50000000000001?e[9]>17.500000000000004?e[9]>22.500000000000004?e[1]>32.50000000000001?qt=.023466328488582572:qt=.11730925774586994:qt=-.04771965631104874:qt=.17059689880751394:qt=-.08181850955999449:e[26]>1e-35?qt=-.12727482696678769:qt=-.014343123272734182;let $t;e[147]>1e-35?e[1]>53.50000000000001?$t=-.0993064321015924:e[0]>2604.5000000000005?e[0]>3629.5000000000005?$t=-.02763546051134888:$t=.06423344777499343:$t=-.064606430904295:e[302]>1e-35?e[10]>2.5000000000000004?e[10]>47.50000000000001?$t=.049825139823021586:e[7]>22.500000000000004?$t=-.01131680751379858:e[0]>2579.5000000000005?$t=-.10673674485369694:$t=-.015387212937189957:$t=.04347325151148724:e[179]>1e-35?$t=-.05788885608624092:e[84]>1e-35?e[9]>6.500000000000001?e[2]>43.50000000000001?$t=.0650355590939066:$t=-.0473332870892226:$t=-.09699315983340703:e[288]>1e-35?e[88]>1e-35?$t=.11139543329789044:e[126]>1e-35?$t=-.09726928633696198:e[8]>149.50000000000003?e[9]>46.50000000000001?e[4]>1.5000000000000002?e[8]>1861.5000000000002?$t=.06370903833231022:e[10]>29.500000000000004?$t=.03415223859607161:e[10]>3.5000000000000004?$t=-.07415518117873297:$t=-.0014119203473324082:$t=.12617652343819508:e[9]>41.50000000000001?$t=-.10311145857176976:e[8]>2757.5000000000005?$t=-.08106484219011428:e[7]>71.50000000000001?$t=-.09783384432091176:e[1]>88.50000000000001?$t=.06249739709782831:e[3]>9.500000000000002?e[5]>1601.5000000000002?$t=-.008884084501608536:$t=.061339437777743616:$t=-.042490992675121846:e[2]>6.500000000000001?e[3]>10.500000000000002?$t=.01526664064166223:$t=.13534828515415498:$t=-.06985484465894776:$t=.0005758961943178744;let Zt;e[86]>1e-35?e[1]>23.500000000000004?e[1]>29.500000000000004?e[4]>16.500000000000004?e[2]>31.500000000000004?Zt=-.029152732370514342:Zt=.07173628916139178:e[1]>36.50000000000001?Zt=-.08859111297255318:Zt=.0018030071815630785:Zt=.13652461563759322:Zt=-.07550137680349367:e[10]>52.50000000000001?e[49]>1e-35?Zt=-.07145140450454163:e[21]>1e-35?Zt=-.07422841663493233:Zt=.006289319702780104:e[10]>40.50000000000001?e[9]>59.50000000000001?e[19]>1e-35?e[13]>1e-35?Zt=.11864240653986852:e[3]>33.50000000000001?Zt=-.08821209591953476:Zt=.05706392280054726:Zt=-.03600088051578915:e[18]>1e-35?e[1]>24.500000000000004?Zt=.01953613016837112:Zt=-.059781039130025006:e[148]>1e-35?Zt=.052668447861325476:e[3]>30.500000000000004?e[9]>49.50000000000001?Zt=.07207826841738371:e[202]>1e-35?Zt=.08163917539410503:Zt=-.01319846363832958:e[9]>35.50000000000001?e[5]>4134.500000000001?e[10]>44.50000000000001?Zt=-.06858280496900336:Zt=-.1781828899516648:Zt=-.04024620133969553:e[9]>10.500000000000002?e[1]>22.500000000000004?e[1]>37.50000000000001?Zt=.018232649414147116:Zt=-.04419781124222661:Zt=.05145485182416554:e[1]>23.500000000000004?e[0]>655.5000000000001?e[5]>4901.500000000001?e[10]>45.50000000000001?Zt=.11452368095776105:Zt=-.036496437259924026:Zt=-.040445338739465486:Zt=.0816572651001145:Zt=-.08968914517368663:Zt=.0002826343082585516;let dr;e[189]>1e-35?e[0]>5269.500000000001?dr=-.08839493050459957:e[10]>85.50000000000001?dr=.10046908365702462:e[8]>2592.5000000000005?dr=-.09632233975926387:e[8]>2000.5000000000002?dr=.10282992953871627:e[8]>1266.5000000000002?e[9]>34.50000000000001?dr=.035504970430426296:e[1]>31.500000000000004?dr=-.1133764813142531:dr=-.01138280942244812:e[8]>1125.5000000000002?dr=.09800530246229806:dr=.016170419267589393:e[218]>1e-35?e[9]>99.50000000000001?e[9]>101.50000000000001?e[9]>124.50000000000001?dr=.07316772160107896:dr=-.059095014819051765:dr=.17859437315769733:e[2]>1.5000000000000002?e[9]>86.50000000000001?dr=-.09150209066166894:e[8]>3084.0000000000005?dr=-.05443972593168094:e[1]>65.50000000000001?e[10]>11.500000000000002?e[9]>33.50000000000001?dr=-.04449234460408263:dr=.05568837973347338:dr=-.12362324875024472:e[1]>41.50000000000001?e[10]>12.500000000000002?e[8]>1336.5000000000002?dr=.12741077850267066:dr=.007372371864985329:e[2]>39.50000000000001?dr=.02295917234617787:dr=.14966532083907075:e[1]>39.50000000000001?dr=-.06685557815340279:e[10]>22.500000000000004?e[2]>52.50000000000001?dr=-.02511861881285652:e[1]>27.500000000000004?dr=.08683660011672288:dr=.02956214835267301:e[9]>15.500000000000002?dr=-.016538805462996232:dr=.04352738094981517:dr=-.05561856645643868:e[9]>170.50000000000003?dr=-.07996752635874248:e[179]>1e-35?dr=-.09065975936933919:dr=-.00042817975060427177;let xr;e[39]>1e-35?e[4]>25.500000000000004?xr=.03443173196222934:xr=-.06554248341270724:e[32]>1e-35?e[8]>90.50000000000001?e[4]>67.50000000000001?e[4]>86.50000000000001?xr=-.0013415395759330318:xr=.12950978489563347:e[1]>22.500000000000004?e[10]>19.500000000000004?e[4]>30.500000000000004?e[9]>41.50000000000001?xr=.002297618040307216:xr=-.12522800128774994:e[4]>8.500000000000002?e[8]>1075.5000000000002?xr=-.015297257305397608:xr=.09651828834062742:xr=-.06636003334371929:e[10]>11.500000000000002?xr=.17631616138309397:e[0]>1639.5000000000002?xr=3804386478092585e-20:xr=-.09099296398683193:xr=-.06874415876172972:e[0]>2151.5000000000005?xr=-.1311264883406766:xr=.00809052010141122:e[253]>1e-35?xr=-.06338558211939296:e[178]>1e-35?e[2]>25.500000000000004?e[2]>30.500000000000004?e[0]>2151.5000000000005?e[10]>10.500000000000002?e[0]>3615.5000000000005?xr=.045038497754638605:xr=-.07770167665661752:xr=-.08596294280650517:xr=.08538655727027213:xr=.09829076418590559:e[1]>39.50000000000001?e[9]>1.5000000000000002?xr=.054627956617973275:e[1]>61.50000000000001?xr=-.11994465088415499:e[4]>8.500000000000002?xr=.06676200239406452:xr=-.027503148069376867:e[8]>676.5000000000001?xr=-.10363964928357075:e[4]>8.500000000000002?xr=-.07589816227175682:xr=.034664436544646814:e[1]>159.50000000000003?e[6]>25.500000000000004?xr=.009093153189012338:xr=-.06119765876605404:xr=.0004668642103528348;let ur;e[223]>1e-35?e[1]>31.500000000000004?e[8]>711.5000000000001?ur=-.10100794502567233:ur=.08000205636470442:ur=-.11945419826856896:e[113]>1e-35?ur=-.06105445938688056:e[167]>1e-35?e[0]>3928.5000000000005?ur=.1224302423880318:ur=-.01875566982911468:e[222]>1e-35?e[1]>8.500000000000002?e[1]>24.500000000000004?e[4]>3.5000000000000004?e[0]>725.5000000000001?e[0]>1682.5000000000002?e[0]>2860.5000000000005?ur=.0019277012166729114:e[1]>28.500000000000004?ur=-.054445821715687494:ur=.045645722976713245:e[30]>1e-35?ur=.13402660155331655:ur=.008921176001777645:ur=-.058547426505451076:ur=.08841202222426625:e[1]>22.500000000000004?e[10]>9.500000000000002?ur=-.13526418192218206:ur=-.03266013432583145:e[1]>20.500000000000004?e[4]>27.500000000000004?ur=.0007263224246135398:ur=.12450043268647056:e[1]>17.500000000000004?e[9]>1.5000000000000002?ur=-.11575657261278308:ur=-.01530376565862095:e[4]>13.500000000000002?e[4]>22.500000000000004?ur=-.01995960178292952:ur=.11216586049153021:ur=-.10050961087149474:ur=.08848063368485726:e[30]>1e-35?e[224]>1e-35?e[1]>52.50000000000001?ur=.10303451081526649:ur=-.01375730267020699:e[1]>28.500000000000004?e[2]>20.500000000000004?ur=-.043799548968209395:ur=-.12451444314954115:e[4]>12.500000000000002?ur=-.03838117361958468:ur=.06504990789767144:e[57]>1e-35?ur=.06890006938293915:ur=.0003914274695562949;let mr;e[53]>1e-35?e[4]>11.500000000000002?e[8]>617.5000000000001?e[2]>41.50000000000001?mr=.004271749009686975:mr=-.10523878297127605:mr=.04633982158107851:mr=-.10349713975483057:e[183]>1e-35?e[15]>1e-35?mr=-.08655730561951676:e[8]>919.5000000000001?mr=-.0676453705610183:e[7]>18.500000000000004?mr=-.027787974193650575:mr=.08012784576991301:e[227]>1e-35?e[1]>6.500000000000001?e[3]>8.500000000000002?e[210]>1e-35?mr=.07185850683316512:e[8]>201.50000000000003?e[8]>348.50000000000006?e[23]>1e-35?e[8]>1049.5000000000002?mr=-.03473877164537313:e[8]>719.5000000000001?mr=.10471053866934404:mr=.008236107678382981:e[4]>57.50000000000001?mr=.09412219478825269:e[10]>66.50000000000001?mr=-.13884338641811986:e[10]>19.500000000000004?e[10]>22.500000000000004?e[0]>2490.5000000000005?mr=-.040681323751002293:mr=.06374650297561021:mr=.12884615227401788:e[10]>5.500000000000001?mr=-.0887517295786972:e[8]>597.5000000000001?e[18]>1e-35?mr=-.05474068967150784:mr=.03744700650806603:mr=-.07846396348680855:e[1]>42.50000000000001?mr=.018972315810821302:mr=.10953621007604744:e[5]>4439.500000000001?mr=.010999776705494586:e[1]>40.50000000000001?mr=-.12394200059775967:e[10]>2.5000000000000004?mr=.013528093962849453:mr=-.09222088417048682:mr=-.12662967149701485:mr=.09327296405849603:e[3]>99.50000000000001?mr=-.013581954439986752:mr=.0005526498251862075;let nr;e[187]>1e-35?e[243]>1e-35?nr=-.08392792551692502:e[10]>68.50000000000001?nr=.07871769409454053:e[10]>8.500000000000002?e[10]>16.500000000000004?e[2]>17.500000000000004?e[3]>31.500000000000004?e[91]>1e-35?e[10]>21.500000000000004?e[10]>33.50000000000001?e[10]>48.50000000000001?nr=-.0825306209711224:nr=.049559996084532945:nr=-.1064938580886302:nr=.03353240732240275:nr=.045985370399163464:e[1]>42.50000000000001?e[4]>20.500000000000004?nr=.16966001471529374:e[1]>57.50000000000001?nr=-.005772777673676247:nr=.09383677041525058:e[8]>747.5000000000001?nr=.054068175469351235:nr=-.049968216310277036:e[8]>753.5000000000001?nr=-.0679383555784074:e[4]>8.500000000000002?nr=-.059757341189735386:nr=.05701083682780414:nr=-.052497281448921164:e[6]>12.500000000000002?e[8]>969.5000000000001?e[4]>23.500000000000004?nr=.05820296128730006:nr=-.1063042385102475:e[1]>49.50000000000001?e[8]>302.50000000000006?nr=.15340611616954566:nr=.04385036188666874:e[0]>4449.500000000001?nr=-.02110897605541555:e[1]>24.500000000000004?e[2]>17.500000000000004?nr=.004840354641006495:nr=.09967827580276283:nr=.11605363537391578:e[9]>19.500000000000004?nr=-.0735831692725717:nr=.019973331823355176:e[306]>1e-35?e[149]>1e-35?nr=-.08968948874343531:e[8]>1094.5000000000002?e[10]>15.500000000000002?nr=-.02442182361342386:nr=.10334853004243093:nr=-.030431948680167104:nr=-956078595250818e-19;let hr;e[294]>1e-35?e[1]>26.500000000000004?e[0]>4078.5000000000005?hr=-.040232505718244854:e[0]>3030.5000000000005?hr=.0634109586813073:hr=-.04043617034245621:hr=-.06385323610738443:e[120]>1e-35?e[4]>18.500000000000004?hr=-.007859096946435131:hr=.07282728486115758:e[229]>1e-35?e[0]>2952.5000000000005?e[17]>1e-35?hr=.05515771679628051:hr=-.04214471312668263:hr=-.09589322222261765:e[193]>1e-35?hr=-.05056345906812831:e[121]>1e-35?e[243]>1e-35?hr=.14857706653119385:e[4]>9.500000000000002?e[1]>26.500000000000004?e[2]>59.50000000000001?hr=-.08152604001147906:e[11]>1e-35?hr=.09132936522356462:e[15]>1e-35?e[4]>23.500000000000004?hr=.13100930780107503:e[10]>25.500000000000004?hr=.05921074710011526:hr=-.07226005736695183:e[0]>3304.5000000000005?e[0]>3707.5000000000005?e[0]>4053.5000000000005?hr=.0009447118243153454:hr=-.09820565036865991:hr=.057146909749745546:e[0]>2115.5000000000005?hr=-.12331216726611678:hr=.007281983677694285:e[2]>56.50000000000001?hr=.012310154675612615:hr=-.08873665774670461:e[6]>25.500000000000004?hr=.134708740821879:e[9]>5.500000000000001?hr=-.0805901581148979:e[224]>1e-35?hr=-.063684477784257:e[7]>2.5000000000000004?e[19]>1e-35?hr=.10842593386554122:e[2]>13.500000000000002?hr=.06466798320378395:hr=-.08578130788886655:hr=-.03590892078300114:hr=.0003499894043880708;let Ie;e[134]>1e-35?e[6]>50.50000000000001?e[0]>3601.5000000000005?Ie=.10839808814624702:Ie=-.028043875308180352:e[7]>30.500000000000004?e[8]>932.5000000000001?Ie=-.007478368069393829:Ie=-.09066751344326617:e[0]>3588.5000000000005?e[5]>4748.500000000001?Ie=.04035247751736232:e[0]>4255.500000000001?Ie=-.1310865624507367:e[0]>4004.5000000000005?Ie=.06647367311982634:Ie=-.08339693352955757:e[4]>10.500000000000002?e[1]>34.50000000000001?Ie=-.011618902907510411:Ie=.1114646660406691:e[10]>2.5000000000000004?e[0]>3072.5000000000005?Ie=.09356028223727986:Ie=-.03811765057032162:Ie=-.09456215497345526:e[280]>1e-35?e[7]>70.50000000000001?Ie=.10322956436499003:e[2]>22.500000000000004?e[1]>83.50000000000001?Ie=.1146142460964847:e[1]>62.50000000000001?Ie=-.09679869865322362:e[9]>71.50000000000001?Ie=-.07377580769927583:e[4]>19.500000000000004?e[0]>4571.500000000001?Ie=-.039046426387852974:Ie=.04558778688367152:Ie=.11220830937352602:e[7]>5.500000000000001?e[9]>17.500000000000004?e[8]>1067.5000000000002?Ie=.03261697816211156:e[15]>1e-35?Ie=.02586252542264368:e[2]>14.500000000000002?Ie=-.016420452667484604:Ie=-.1011799626006976:Ie=-.13787471318963773:e[6]>4.500000000000001?e[8]>427.50000000000006?e[10]>36.50000000000001?Ie=.010193588102560583:Ie=.11748729525930773:Ie=-.04468162226743652:Ie=-.028365274393617957:e[71]>1e-35?Ie=.05115139346588793:Ie=-.0001510425316936658;let O;e[298]>1e-35?e[8]>81.50000000000001?e[8]>119.50000000000001?e[4]>64.50000000000001?O=.09072192054181037:e[9]>72.50000000000001?e[8]>1094.5000000000002?O=.020637047900190317:O=-.1017300802134141:e[1]>23.500000000000004?e[9]>12.500000000000002?e[0]>2815.5000000000005?e[0]>3183.5000000000005?e[3]>23.500000000000004?e[3]>45.50000000000001?e[4]>48.50000000000001?O=-.04632587527094407:O=.08603684785510396:O=-.05101401015448496:O=.025466432054358498:O=-.07897811963329214:e[6]>13.500000000000002?e[10]>26.500000000000004?O=.020385355430046367:O=.12032592051335252:O=-.012387370292173013:e[2]>23.500000000000004?O=-.12568545484492677:O=-.022261190943521976:e[8]>634.5000000000001?e[8]>857.5000000000001?O=.043528764484784536:O=.14352071657196003:O=-.009332833816977268:O=.11186782227735846:O=-.0737365712425554:e[136]>1e-35?e[0]>1937.5000000000002?O=-.05649104643152564:O=.03884200719305747:e[42]>1e-35?O=-.07191700385792335:e[116]>1e-35?e[9]>2.5000000000000004?e[9]>17.500000000000004?O=-.04103416502526736:O=.04881823954656287:e[4]>15.500000000000002?O=.009342724662897898:e[0]>3969.5000000000005?O=-.025637309961309498:O=-.12574492012987865:e[212]>1e-35?e[19]>1e-35?O=-.08185697075265091:e[0]>2215.5000000000005?O=.030063975892297354:e[0]>807.5000000000001?O=-.03924325550733229:O=.0415330999189793:O=-.00024374664461674863;let de;e[3]>7.500000000000001?de=.0005117490419655908:e[129]>1e-35?e[0]>2904.5000000000005?e[0]>4004.5000000000005?de=.025798416259686565:de=.13251610353146012:de=-.029900559552677654:e[1]>81.50000000000001?e[1]>110.50000000000001?e[0]>4242.500000000001?de=-.11098564237775424:de=25960925309712775e-21:e[0]>4177.500000000001?e[9]>35.50000000000001?de=.15347826616466054:e[3]>4.500000000000001?de=.10379320730958941:de=-.008896303020010654:e[0]>3415.5000000000005?e[0]>3830.5000000000005?de=.03159791088468647:de=-.10612873364104258:de=.05059856107348746:e[133]>1e-35?e[2]>5.500000000000001?de=-.02335760775001469:de=-.1379386577903324:e[1]>62.50000000000001?e[3]>2.5000000000000004?de=-.011164334474672973:de=-.06594044410501655:e[207]>1e-35?de=-.1014214372326535:e[8]>3.5000000000000004?e[107]>1e-35?e[2]>6.500000000000001?de=-.01725821503981916:de=.05594086838700241:e[203]>1e-35?e[1]>44.50000000000001?e[1]>51.50000000000001?de=-.04226531631656534:de=-.14409800530171432:de=-.03245576341206398:e[8]>4214.500000000001?de=.0895409165534886:e[247]>1e-35?de=-.06506383629143335:e[118]>1e-35?de=-.07214270121257443:e[8]>546.5000000000001?de=-.004385020865473831:de=.009321812545248529:e[0]>1639.5000000000002?e[13]>1e-35?de=.046278501133958524:de=-.030835570926968044:e[0]>493.50000000000006?de=-.12794504651610425:de=.009415039807550776;let ye;e[304]>1e-35?ye=-.04717777269217453:e[76]>1e-35?ye=-.05813439142128324:e[1]>59.50000000000001?e[0]>350.50000000000006?e[53]>1e-35?ye=-.09648224457374217:e[132]>1e-35?ye=.07089308107910267:e[0]>2248.5000000000005?e[5]>2525.5000000000005?e[9]>1.5000000000000002?e[114]>1e-35?ye=-.08595213071749083:e[9]>14.500000000000002?e[9]>33.50000000000001?e[285]>1e-35?ye=.10838431695638147:e[230]>1e-35?ye=.06458713915750626:e[0]>3219.5000000000005?e[3]>23.500000000000004?e[9]>69.50000000000001?ye=.050071316251979:ye=-.006356941111525215:e[6]>8.500000000000002?ye=-.0384814076434817:e[1]>73.50000000000001?e[0]>3746.5000000000005?ye=.10217402850540398:ye=-.048840949025349197:ye=-.03668313197909846:e[7]>39.50000000000001?ye=-.0562642841496003:e[10]>2.5000000000000004?ye=.09749777369987417:ye=-.04848223121417616:e[0]>5453.500000000001?ye=.08316648226133942:ye=-.0261979698267618:e[212]>1e-35?ye=.09565573198318654:e[5]>4814.500000000001?e[8]>963.5000000000001?e[8]>1514.5000000000002?ye=.04837009746506856:ye=-.09184360565631328:ye=.0032411047845613606:e[0]>4733.500000000001?ye=.0977378556864798:ye=.010776545559325588:ye=-.012483310473120218:ye=-.049284121449103935:ye=.011962641341789565:e[1]>67.50000000000001?e[1]>77.50000000000001?ye=-.08380361910948711:ye=.07375088778585813:ye=-.1084864186071348:ye=.0007819503469605476;let J;e[7]>17.500000000000004?e[115]>1e-35?J=.08741852531696623:e[167]>1e-35?J=.10078975495600809:J=-.0018324767784017562:e[290]>1e-35?J=-.0850089851255888:e[74]>1e-35?e[10]>16.500000000000004?J=.1379733311640402:J=-.0038500648529631075:e[6]>29.500000000000004?e[8]>876.5000000000001?e[0]>3129.5000000000005?e[9]>5.500000000000001?e[8]>1765.5000000000002?J=-.09360083033774169:J=.061471353193188374:e[10]>11.500000000000002?e[10]>31.500000000000004?J=-.015599362579530679:e[0]>4593.500000000001?J=-.12029549262691491:J=-.018917032256501397:J=.04632831686576592:J=.06892347785444271:e[4]>8.500000000000002?e[10]>33.50000000000001?J=-.05894883236412263:J=.05213944998315824:J=.12621779223564986:e[243]>1e-35?e[6]>16.500000000000004?e[0]>4141.500000000001?e[0]>5850.500000000001?J=.07577412405680808:J=-.053144737214742235:e[1]>29.500000000000004?e[9]>16.500000000000004?J=-.0277076900736147:e[1]>65.50000000000001?J=-.023587471585763506:J=.10184896592433082:J=-.057699270527916825:J=-.041191811945739454:e[114]>1e-35?e[2]>23.500000000000004?J=.06566902102799584:e[10]>25.500000000000004?J=-.07033633753181047:J=-.01599120398351932:e[242]>1e-35?e[0]>2402.5000000000005?J=-.08108035861059537:J=.04184690010531078:e[35]>1e-35?e[0]>2904.5000000000005?J=-.12431182772561139:J=.01886235886984271:J=.0025579594894418116;let F;e[8]>2915.5000000000005?e[101]>1e-35?F=.08648323956719083:e[0]>93.50000000000001?e[196]>1e-35?F=-.09509320772734361:e[4]>1.5000000000000002?e[5]>1106.5000000000002?e[5]>1191.5000000000002?e[283]>1e-35?F=-.11268313808648661:e[10]>12.500000000000002?e[131]>1e-35?F=.0687641681341721:e[10]>102.50000000000001?F=-.09667920080214842:e[4]>15.500000000000002?e[8]>2992.5000000000005?e[1]>24.500000000000004?e[1]>71.50000000000001?F=-.06762578396473291:e[10]>65.50000000000001?F=-.05226727783610509:e[282]>1e-35?F=.09911438410640917:e[19]>1e-35?F=.06915156336429933:F=-.006565637886508241:F=-.08344300251849307:F=-.0928863907927501:e[1]>60.50000000000001?e[2]>17.500000000000004?F=.19428463865406298:F=.016073883020956765:e[13]>1e-35?F=.06864077097923665:F=-.01388867527034731:e[0]>1847.5000000000002?F=.004655280608161356:e[1]>40.50000000000001?F=.031406054057765996:F=.12798062439212832:F=.09859670536264255:e[10]>2.5000000000000004?e[9]>68.50000000000001?F=.08821759640665892:e[9]>32.50000000000001?e[8]>3960.0000000000005?e[1]>31.500000000000004?F=-.0706095614785733:F=.04227164041372561:F=-.1056906923176064:e[2]>8.500000000000002?e[19]>1e-35?F=-.07139533369873902:F=.008952586782921625:F=.06086212582180936:F=-.0816938490403437:F=-.051224901945956025:F=-.10525399124186095:F=.000270924147208224;let Te;e[122]>1e-35?e[0]>2461.5000000000005?e[2]>36.50000000000001?Te=.029186512383291244:e[7]>1.5000000000000002?Te=-.14984127276725573:e[1]>40.50000000000001?Te=.032757060730648144:Te=-.07675575422749602:e[6]>8.500000000000002?Te=.10599766037117893:Te=-.0541423394552156:e[1]>24.500000000000004?e[103]>1e-35?e[8]>61.50000000000001?e[17]>1e-35?Te=-.051394622947855385:Te=.03237141302699347:Te=.12526173027943244:Te=.000579473126472788:e[18]>1e-35?e[3]>4.500000000000001?e[3]>6.500000000000001?e[0]>5453.500000000001?Te=-.07383912482657777:e[0]>5147.500000000001?Te=.07008813937042091:e[10]>38.50000000000001?Te=-.06779203808365307:Te=-.013782769999524498:Te=.0880038869117715:Te=-.12846294176070952:e[281]>1e-35?Te=-.06810806903850834:e[10]>227.50000000000003?Te=-.08937977001661111:e[10]>130.50000000000003?Te=.10538920632708033:e[145]>1e-35?e[4]>6.500000000000001?e[9]>16.500000000000004?e[4]>18.500000000000004?Te=.011036530162093841:Te=-.11500797478569702:Te=.03702229366129399:Te=.07242026683784307:e[189]>1e-35?Te=.03331407112090286:e[9]>33.50000000000001?e[201]>1e-35?Te=.08979610115743614:e[7]>57.50000000000001?e[1]>20.500000000000004?Te=-.02608892716555304:Te=.09609599320761308:e[9]>105.50000000000001?Te=-.06848127135991534:Te=.0023675721254089715:e[86]>1e-35?Te=-.11049635625500497:Te=-.004847764219432233;let Oe;e[125]>1e-35?e[0]>3969.5000000000005?Oe=-.09462233499115416:Oe=.05235324508465096:e[17]>1e-35?e[49]>1e-35?e[10]>19.500000000000004?Oe=-.030700661288166148:Oe=.0870883677166864:e[10]>3.5000000000000004?e[3]>18.500000000000004?e[0]>3544.5000000000005?e[188]>1e-35?e[9]>7.500000000000001?Oe=.03149547314036763:Oe=-.08166208257451366:e[0]>5850.500000000001?Oe=-.10228136324773157:e[102]>1e-35?Oe=-.10572585290676295:e[8]>726.5000000000001?e[5]>3657.5000000000005?Oe=.01782894842128785:e[13]>1e-35?Oe=.002680190260979968:Oe=.1773965720476949:e[2]>72.50000000000001?Oe=.09090831938627947:e[1]>59.50000000000001?Oe=-.12297206702816128:e[0]>4977.500000000001?Oe=.09899015653118268:Oe=-.022207141540838887:e[4]>32.50000000000001?e[1]>34.50000000000001?Oe=-.0675900954187773:Oe=.012336403425364092:Oe=-.0017002325391924573:e[6]>7.500000000000001?e[1]>17.500000000000004?Oe=-.02671721777458802:Oe=-.09242452991958029:e[284]>1e-35?Oe=-.08585691288582491:Oe=.013332890564324447:e[4]>14.500000000000002?Oe=-.005245022074799553:e[23]>1e-35?Oe=-.020036720167235768:e[1]>29.500000000000004?e[114]>1e-35?Oe=-.09289852307936758:e[116]>1e-35?Oe=-.09686573010015055:e[8]>804.5000000000001?Oe=.03812547148215318:Oe=.005162744968176633:e[9]>43.50000000000001?Oe=-.059246106396159376:Oe=.050370113808135275:Oe=.000794041852811028;let xt;e[3]>7.500000000000001?xt=.0004981426543104341:e[9]>114.50000000000001?xt=.05666010099424601:e[129]>1e-35?e[6]>3.5000000000000004?xt=-.019061766497948867:xt=.07193491146561211:e[186]>1e-35?e[0]>2653.5000000000005?xt=-.006044199577160493:xt=.1147136801028133:e[6]>85.50000000000001?e[8]>847.5000000000001?xt=.11486607015912494:e[9]>16.500000000000004?xt=-.08686820858087294:xt=.06119632492911875:e[127]>1e-35?e[0]>2723.5000000000005?e[0]>3682.5000000000005?e[1]>38.50000000000001?xt=-.022230207980026437:xt=.1056683690528792:xt=-.05859530800943035:xt=.06970608927597141:e[7]>3.5000000000000004?e[105]>1e-35?xt=.08073568184886762:e[107]>1e-35?e[2]>6.500000000000001?xt=-.05177544573528314:xt=.05370469772149028:e[1]>35.50000000000001?e[0]>4106.500000000001?e[9]>46.50000000000001?e[0]>4633.500000000001?xt=.15159657923771555:xt=-.0060542654587671055:e[9]>5.500000000000001?xt=-.042808028205051786:e[1]>48.50000000000001?xt=-.010449538258110742:xt=.10026907521968294:xt=-.04249349329714756:e[9]>42.50000000000001?e[1]>19.500000000000004?e[8]>852.5000000000001?xt=-.02272452389409874:xt=-.11202691218244319:e[5]>1809.5000000000002?xt=-.04460413584255906:xt=.08196329474205256:e[10]>69.50000000000001?xt=.10221481166238167:xt=.0004063052701699382:e[243]>1e-35?xt=-.07563941678849846:e[18]>1e-35?xt=.02563513231103432:xt=-.004740081147303786;let Wt;e[84]>1e-35?e[9]>6.500000000000001?e[2]>43.50000000000001?Wt=.057446442918106:Wt=-.04404018270156349:Wt=-.09282976714550464:e[0]>384.50000000000006?e[204]>1e-35?e[1]>62.50000000000001?Wt=-.05930486238817954:e[1]>29.500000000000004?Wt=.06955866121256543:e[8]>597.5000000000001?Wt=-.06538593556505168:Wt=.06212512595497445:Wt=.00021102929959182257:e[9]>90.50000000000001?Wt=.0958061289119631:e[102]>1e-35?Wt=.07172059675638813:e[1]>47.50000000000001?Wt=-.03879798603977766:e[297]>1e-35?Wt=.054948234271956144:e[282]>1e-35?e[2]>6.500000000000001?Wt=.003805910996312012:Wt=.09304295674749524:e[11]>1e-35?e[18]>1e-35?Wt=.11252376801858695:e[288]>1e-35?Wt=-.10293901912180432:Wt=.014669268837893872:e[1]>42.50000000000001?Wt=-.05988274123836837:e[145]>1e-35?Wt=.06142784665288495:e[3]>1.5000000000000002?e[4]>4.500000000000001?e[1]>21.500000000000004?e[1]>27.500000000000004?e[9]>24.500000000000004?Wt=.038791154988529926:e[10]>22.500000000000004?e[2]>19.500000000000004?Wt=-.03366718308159971:Wt=.11936550608549797:e[1]>31.500000000000004?Wt=-.07454716789539667:Wt=.027859650621164217:e[10]>10.500000000000002?Wt=-.11806374092321247:Wt=-.03506042229223101:Wt=-.0007080765837654515:e[10]>6.500000000000001?Wt=-.028077713664996503:e[2]>7.500000000000001?Wt=.15803724124216814:Wt=.0351381284833169:Wt=-.07877953381054767;let Lt;e[131]>1e-35?e[282]>1e-35?e[4]>23.500000000000004?Lt=.14144941521975005:Lt=.0007727806714190652:e[9]>1.5000000000000002?e[8]>2134.5000000000005?e[2]>34.50000000000001?Lt=.10514088112381886:e[7]>18.500000000000004?Lt=-.10370643555956745:Lt=.04093594315421388:e[6]>15.500000000000002?e[4]>9.500000000000002?e[10]>27.500000000000004?e[10]>71.50000000000001?Lt=-.0508129468802936:e[224]>1e-35?Lt=-.037816066368733595:e[10]>43.50000000000001?Lt=.07793408602607932:Lt=.017646166646099453:e[9]>3.5000000000000004?e[9]>29.500000000000004?e[17]>1e-35?Lt=.036972453794202324:Lt=-.08727431092411866:e[8]>427.50000000000006?e[8]>1278.5000000000002?Lt=.09475302525132188:Lt=-.03580104945898193:Lt=.08349488283861875:e[10]>3.5000000000000004?e[0]>1847.5000000000002?e[0]>4280.500000000001?e[2]>27.500000000000004?Lt=-.1282448778804823:Lt=-.014395808269207212:Lt=-.008940927190750592:Lt=-.1459118815453748:e[0]>4897.500000000001?Lt=-.09733068457286576:e[1]>57.50000000000001?Lt=.06575271409540207:Lt=-.019556422817450115:Lt=-.10623959222984136:e[18]>1e-35?Lt=.11280940901275241:e[8]>319.50000000000006?e[2]>6.500000000000001?Lt=.008125645893104896:Lt=-.11084368630465868:Lt=.0584398731508786:e[0]>350.50000000000006?e[3]>83.50000000000001?Lt=-.05854904579626861:e[4]>5.500000000000001?Lt=.02985784951394175:Lt=-.03247600140149334:Lt=-.11152899295304973:Lt=-.00035424577714215764;let sr;e[32]>1e-35?e[17]>1e-35?e[8]>359.50000000000006?e[8]>804.5000000000001?sr=-.06563670567578264:sr=.067656954313663:sr=-.10388217548685377:e[8]>2302.5000000000005?sr=.07190621943790435:e[4]>67.50000000000001?sr=.060020507643618604:e[4]>38.50000000000001?sr=-.08707253184321638:e[2]>11.500000000000002?e[2]>16.500000000000004?e[1]>31.500000000000004?e[1]>59.50000000000001?sr=-.06568134366461277:e[8]>1075.5000000000002?sr=-.004768057709758692:sr=.11785959165999467:sr=-.05080221682879267:sr=.14814206127494542:sr=-.07241946332311736:e[253]>1e-35?sr=-.058893562861261274:e[4]>61.50000000000001?e[283]>1e-35?e[10]>23.500000000000004?sr=-.02471195342450034:sr=.11866056464409412:e[10]>44.50000000000001?e[1]>16.500000000000004?e[8]>2640.0000000000005?sr=-.10741850739482771:sr=.010051635824944:sr=.12502069436017124:e[8]>1971.5000000000002?e[1]>23.500000000000004?e[308]>1e-35?sr=.10511236013756364:e[10]>10.500000000000002?e[1]>53.50000000000001?sr=-.08992396138178163:sr=.010944365997007212:sr=.06221307021813793:sr=.1286024087559141:e[127]>1e-35?sr=.06568148624531012:e[10]>40.50000000000001?sr=-.07567979134643352:e[5]>5647.500000000001?sr=.07594672895572069:sr=-.018158016446439187:e[6]>55.50000000000001?sr=.009293422430111872:e[4]>45.50000000000001?sr=-.017749818406964022:e[2]>46.50000000000001?sr=.01714136511113982:sr=-724762291423549e-19;let cr;e[1]>24.500000000000004?e[103]>1e-35?e[8]>48.50000000000001?e[17]>1e-35?cr=-.048689215588703864:e[9]>27.500000000000004?e[0]>3916.5000000000005?cr=.07084726276890757:cr=-.11232323677722932:cr=.04812773089510436:cr=.11757502216780046:e[5]>1464.5000000000002?e[5]>1505.5000000000002?e[167]>1e-35?cr=.07470606002425358:e[1]>53.50000000000001?e[132]>1e-35?cr=.0879462816013881:cr=-.002966662093626573:e[306]>1e-35?cr=-.04588085188342676:cr=.0031910005157084823:e[3]>10.500000000000002?e[10]>20.500000000000004?cr=-.006600332774461143:cr=.1272481351557754:cr=-.09030973597154808:e[284]>1e-35?e[1]>38.50000000000001?e[10]>2.5000000000000004?cr=.011884312066620044:cr=.11678751052403374:e[4]>8.500000000000002?cr=.03627129613273813:cr=-.12132783497902287:cr=-.006784372643244717:e[18]>1e-35?e[3]>4.500000000000001?e[3]>6.500000000000001?e[0]>5453.500000000001?cr=-.06830131718398992:e[0]>5147.500000000001?cr=.062360406249609306:e[4]>4.500000000000001?cr=-.013162203864592055:cr=-.07153029184927609:cr=.07628618062271557:cr=-.12085065687320373:e[190]>1e-35?cr=-.045816889524231186:e[137]>1e-35?cr=-.07956001795911584:e[199]>1e-35?e[0]>3853.5000000000005?cr=.025895337822752502:cr=-.06503949350616421:e[10]>227.50000000000003?cr=-.09989456525790491:e[10]>130.50000000000003?cr=.08616651057030683:cr=.0001234981796706021;let Ut;e[8]>1014.5000000000001?e[9]>137.50000000000003?Ut=-.08778879924617534:e[8]>1022.5000000000001?e[285]>1e-35?e[9]>64.50000000000001?Ut=.04955806187281689:e[0]>3670.5000000000005?e[10]>32.50000000000001?Ut=-.141732381961068:Ut=-.0317152307496497:Ut=-.02074638849097191:e[0]>93.50000000000001?e[0]>3072.5000000000005?e[10]>100.50000000000001?e[4]>24.500000000000004?e[8]>1336.5000000000002?Ut=.12191801556691254:Ut=-.0003444689085397977:Ut=.005739668504631604:e[146]>1e-35?e[308]>1e-35?Ut=.015237524791728777:e[6]>61.50000000000001?e[4]>63.50000000000001?Ut=-.05676033995381961:Ut=.10933961076803381:e[4]>26.500000000000004?Ut=-.11667582544549814:e[8]>1765.5000000000002?Ut=.032174455312047705:Ut=-.0755016390126608:e[293]>1e-35?Ut=-.08234885407658332:e[9]>41.50000000000001?e[0]>3830.5000000000005?Ut=.026571311956824436:e[15]>1e-35?Ut=.06175459479851121:Ut=-.018778084411148754:e[9]>40.50000000000001?Ut=-.09420232889965811:Ut=-.004578248021263184:e[2]>1.5000000000000002?Ut=.005453714644971445:Ut=-.03907138175699279:Ut=-.055296364182154736:e[23]>1e-35?Ut=.036555134842143476:e[0]>4188.500000000001?e[6]>29.500000000000004?Ut=-.09358146510580179:Ut=.060524657996178094:Ut=-.11245101144669545:e[125]>1e-35?e[9]>1.5000000000000002?Ut=-.12698331085931538:Ut=.006059605604079918:e[2]>196.50000000000003?Ut=-.09451315810804783:Ut=.0011390147031687425;let It;e[8]>2830.5000000000005?e[1]>31.500000000000004?e[9]>32.50000000000001?e[5]>1234.5000000000002?e[8]>3794.5000000000005?It=.05517359070460923:It=-.04758751221404857:It=-.09482078194138792:e[8]>2992.5000000000005?e[1]>101.50000000000001?It=.1040436595565776:e[9]>21.500000000000004?It=.04032250517675179:e[107]>1e-35?It=.05978752253058374:e[210]>1e-35?e[4]>37.50000000000001?It=.1192453009230486:e[1]>51.50000000000001?It=.0443376336292195:It=-.07967674833321865:e[5]>2117.5000000000005?e[9]>10.500000000000002?It=-.10025078607591283:e[0]>2882.5000000000005?e[18]>1e-35?It=-.08999822408398037:It=.017533219253893447:e[9]>1.5000000000000002?e[4]>12.500000000000002?It=-.061850439226075:It=.08849196353361093:It=.10536348167793089:e[92]>1e-35?It=.04894947712119185:e[9]>16.500000000000004?It=.05900227903883853:e[9]>5.500000000000001?It=-.11946594348916476:It=-.03652096348071964:e[1]>41.50000000000001?It=-.07411603110840567:It=-.00021033247574340914:e[10]>22.500000000000004?e[9]>68.50000000000001?It=.08493634342741495:e[11]>1e-35?It=-.10899097825564363:It=-.006156708838964173:e[8]>3198.5000000000005?e[2]>41.50000000000001?It=.08356655906359918:e[7]>25.500000000000004?It=-.09475076526194888:e[10]>5.500000000000001?It=-.01999406228763778:It=.06696212545889428:e[6]>20.500000000000004?It=.14713592661393468:It=.0459917279002218:It=.00027445928493734093;let fr;e[223]>1e-35?e[1]>31.500000000000004?e[8]>634.5000000000001?fr=-.06904501553217077:fr=.05696231672035904:fr=-.1124703178077813:e[99]>1e-35?e[1]>89.50000000000001?fr=-.05074261170009721:e[1]>57.50000000000001?e[8]>969.5000000000001?fr=-.011419256378538392:e[0]>3830.5000000000005?fr=.140315841503076:fr=.02403434913963024:e[1]>31.500000000000004?e[8]>65.50000000000001?e[2]>10.500000000000002?fr=-.04027822909411164:fr=.03176085103667189:fr=.06779515865838849:e[4]>15.500000000000002?fr=.0762878389015175:e[8]>175.50000000000003?e[0]>3030.5000000000005?e[8]>1041.5000000000002?fr=.06124039747298539:fr=-.04312732764434027:fr=.09161522761808062:fr=-.09663512235460074:e[280]>1e-35?e[6]>45.50000000000001?e[1]>46.50000000000001?fr=.11211681010488772:e[13]>1e-35?fr=.06725735814960367:fr=-.046744031455827846:e[10]>44.50000000000001?e[0]>3400.5000000000005?e[0]>4004.5000000000005?e[2]>22.500000000000004?fr=.11743605068905603:fr=-.011309033539148687:fr=-.07896094707523052:fr=.12862714793172117:e[10]>1.5000000000000002?e[8]>455.50000000000006?e[0]>4706.500000000001?fr=-.09218756798869711:e[10]>19.500000000000004?e[0]>1894.5000000000002?e[0]>3719.5000000000005?fr=.02836295848998302:fr=.12210680366745175:fr=-.058302317470509096:e[5]>4144.500000000001?fr=.06123341960495106:fr=-.03840046906926525:fr=-.05221474543453495:fr=.03988215485860711:fr=-.00033074684693083496;let zo=xmt(t+r+n+i+o+a+l+c+u+f+m+h+p+g+y+x+b+E+_+k+B+N+M+Z+he+ee+G+q+ie+z+j+U+V+K+ae+re+le+ce+De+be+qe+Re+Xe+ft+at+lt+oe+Ne+Ae+Ge+Y+ne+Fe+Se+Ce+Ue+Ve+tt+Ct+Pt+yt+Kt+Xt+lr+ge+Me+Je+rt+St+bt+Mt+Ot+wt+kt+_t+qt+$t+Zt+dr+xr+ur+mr+nr+hr+Ie+O+de+ye+J+F+Te+Oe+xt+Wt+Lt+sr+cr+Ut+It+fr);return[1-zo,zo]}s(c8e,"multilineModelPredict");function xmt(e){if(e<0){let t=Math.exp(e);return t/(1+t)}return 1/(1+Math.exp(-e))}s(xmt,"sigmoid");var vmt={javascript:["//"],typescript:["//"],typescriptreact:["//"],javascriptreact:["//"],vue:["//","-->"],php:["//","#"],dart:["//"],go:["//"],cpp:["//"],scss:["//"],csharp:["//"],java:["//"],c:["//"],rust:["//"],python:["#"],markdown:["#","-->"],css:["*/"]},u8e={javascript:1,javascriptreact:2,typescript:3,typescriptreact:4,python:5,go:6,ruby:7};function f8e(e,t,r,n=!0){let i=e.split(`
`);if(n&&(i=i.filter(l=>l.trim().length>0)),Math.abs(t)>i.length||t>=i.length)return!1;t<0&&(t=i.length+t);let o=i[t];return(vmt[r]??[]).some(l=>o.includes(l))}s(f8e,"hasComment");var yO=class{static{s(this,"PromptFeatures")}constructor(t,r){let[n,i]=this.firstAndLast(t),o=this.firstAndLast(t.trimEnd());this.language=r,this.length=t.length,this.firstLineLength=n.length,this.lastLineLength=i.length,this.lastLineRstripLength=i.trimEnd().length,this.lastLineStripLength=i.trim().length,this.rstripLength=t.trimEnd().length,this.stripLength=t.trim().length,this.rstripLastLineLength=o[1].length,this.rstripLastLineStripLength=o[1].trim().length,this.secondToLastLineHasComment=f8e(t,-2,r),this.rstripSecondToLastLineHasComment=f8e(t.trimEnd(),-2,r),this.prefixEndsWithNewline=t.endsWith(`
`),this.lastChar=t.slice(-1),this.rstripLastChar=t.trimEnd().slice(-1),this.firstChar=t[0],this.lstripFirstChar=t.trimStart().slice(0,1)}firstAndLast(t){let r=t.split(`
`),n=r.length,i=r[0],o=r[n-1];return o==""&&n>1&&(o=r[n-2]),[i,o]}},Hre=class{static{s(this,"MultilineModelFeatures")}constructor(t,r,n){this.language=n,this.prefixFeatures=new yO(t,n),this.suffixFeatures=new yO(r,n)}constructFeatures(){let t=new Array(14).fill(0);t[0]=this.prefixFeatures.length,t[1]=this.prefixFeatures.firstLineLength,t[2]=this.prefixFeatures.lastLineLength,t[3]=this.prefixFeatures.lastLineRstripLength,t[4]=this.prefixFeatures.lastLineStripLength,t[5]=this.prefixFeatures.rstripLength,t[6]=this.prefixFeatures.rstripLastLineLength,t[7]=this.prefixFeatures.rstripLastLineStripLength,t[8]=this.suffixFeatures.length,t[9]=this.suffixFeatures.firstLineLength,t[10]=this.suffixFeatures.lastLineLength,t[11]=this.prefixFeatures.secondToLastLineHasComment?1:0,t[12]=this.prefixFeatures.rstripSecondToLastLineHasComment?1:0,t[13]=this.prefixFeatures.prefixEndsWithNewline?1:0;let r=new Array(Object.keys(u8e).length+1).fill(0);r[u8e[this.language]??0]=1;let n=new Array(Object.keys(fu).length+1).fill(0);n[fu[this.prefixFeatures.lastChar]??0]=1;let i=new Array(Object.keys(fu).length+1).fill(0);i[fu[this.prefixFeatures.rstripLastChar]??0]=1;let o=new Array(Object.keys(fu).length+1).fill(0);o[fu[this.suffixFeatures.firstChar]??0]=1;let a=new Array(Object.keys(fu).length+1).fill(0);return a[fu[this.suffixFeatures.lstripFirstChar]??0]=1,t.concat(r,n,i,o,a)}};function bmt(e,t){return new Hre(e.prefix,e.suffix,t)}s(bmt,"constructMultilineFeatures");function d8e(e,t){let r=bmt(e,t).constructFeatures();return c8e(r)[1]}s(d8e,"requestMultilineScore");d();d();d();d();async function*TA(e,t){for await(let r of e)yield t(r)}s(TA,"asyncIterableMap");async function*m8e(e,t){for await(let r of e)await t(r)&&(yield r)}s(m8e,"asyncIterableFilter");async function*_S(e,t){for await(let r of e){let n=await t(r);n!==void 0&&(yield n)}}s(_S,"asyncIterableMapFilter");async function*h8e(...e){for(let t of e)yield*t}s(h8e,"asyncIterableConcat");d();async function SS(e,t,r,n){let i=dn.createAndMarkAsIssued({messageId:t,conversationId:r});return await e.get(or).updateExPValuesAndAssignments(n,i)}s(SS,"createTelemetryWithExpWithId");function fc(e,{turn:t,conversation:r}={},n){return SS(e,t?.telemetryId??"",r?.telemetryId??"",n)}s(fc,"createTelemetryWithExpWithTurn");function RS(e,t,r,n,i,o,a,l){let c=e.turns[e.turns.length-1].skills.map(m=>m.skillId).sort(),u={source:"user",turnIndex:(e.turns.length-1).toString(),uiKind:t,skillIds:c.join(",")},f={promptTokenLen:n,messageCharLen:r};return i&&(u.suggestion=i),o&&(u.suggestionId=o),l.length>0&&(u.skillResolutionsJson=JSON.stringify(Emt(l))),a=a.extendedBy(u,f),a}s(RS,"extendUserMessageTelemetryData");function Emt(e){return e.map(t=>({skillId:t.skillId,resolution:t.resolution,fileStatus:t.files?.map(r=>r.status),tokensPreEliding:t.tokensPreEliding??0,resolutionTimeMs:t.resolutionTimeMs??0,processingTimeMs:t.processingTimeMs??0}))}s(Emt,"mapSkillResolutionsForTelemetry");function p8e(e,t,r,n,i,o,a){return n!=null&&(a=a.extendedBy({offTopic:n.toString()})),CO(e,o,t,r,{uiKind:t,headerRequestId:i},{},a).properties.messageId}s(p8e,"createUserMessageTelemetryData");function g8e(e,t,r,n,i,o,a,l){let c=Tmt(n);return CO(e,a,r,n,{source:"model",turnIndex:(t.turns.length-1).toString(),headerRequestId:o,uiKind:r,codeBlockLanguages:JSON.stringify({...c})},{messageCharLen:n.length,numCodeBlocks:c.length,numTokens:i},l).properties.messageId}s(g8e,"createModelMessageTelemetryData");function A8e(e,t,r,n,i,o,a){CO(e,o,r,n,{source:"offTopic",turnIndex:t.turns.length.toString(),userMessageId:i,uiKind:r},{messageCharLen:n.length},a)}s(A8e,"createOffTopicMessageTelemetryData");function y8e(e,t,r,n,i,o,a,l,c){let u=CO(e,l,r,n,{source:"suggestion",suggestion:o,turnIndex:(t.turns.length-1).toString(),uiKind:r,suggestionId:a},{promptTokenLen:i,messageCharLen:n.length},c);return Imt(e,r,o,u.properties.messageId,u.properties.conversationId,a,c,l),u.properties.messageId}s(y8e,"createSuggestionMessageTelemetryData");var C8e={synonymTimeMs:0,rankingTimeMs:0,chunkCount:0,localSnippetCount:0,embeddingsTimeMs:0,rerankingTimeMs:0};async function x8e(e,t,r){let n=await fc(e.ctx,e),i=e.conversation.source==="inline"?"conversationInline":"conversationPanel";Cf(e.ctx,void 0,{conversationId:e.conversation.telemetryId,turnIndex:(e.conversation.turns.length-1).toString(),userMessageId:e.turn.telemetryId,provider:t,uiKind:i},r,"index.codesearch",n)}s(x8e,"telemetryIndexCodesearch");function CO(e,t,r,n,i,o,a){let l=a??dn.createAndMarkAsIssued(),c={messageText:n,...i};if(!("messageId"in i)&&!("messageId"in l.properties)){let h=_r();i.messageId=h,c.messageId=h}t&&(i.languageId=t.detectedLanguageId,o.documentLength=t.getText().length,o.documentLineCount=t.lineCount);let u=l.extendedBy(i,o),f=l.extendedBy(c),m=v0(r);return jt(e,`${m}.message`,u),jt(e,`${m}.messageText`,f,1),u}s(CO,"telemetryMessage");function v8e(e,t,r,n){Cf(e,n,{uiKind:t},{},"conversation.suggestionShown",r)}s(v8e,"createSuggestionShownTelemetryData");function Imt(e,t,r,n,i,o,a,l){Cf(e,l,{suggestion:r,messageId:n,conversationId:i,suggestionId:o,uiKind:t},{},"conversation.suggestionSelected",a)}s(Imt,"createSuggestionSelectedTelemetryData");function Cf(e,t,r,n,i,o){let a=o??dn.createAndMarkAsIssued();t&&(r.languageId=t.detectedLanguageId,n.documentLength=t.getText().length,n.documentLineCount=t.lineCount);let l=a.extendedBy(r,n);return jt(e,i,l),l}s(Cf,"telemetryUserAction");function H8(e,t,r){let n=r.extendedBy({messagesJson:JSON.stringify(t)});return jt(e,"engine.messages",n,1)}s(H8,"logEngineMessages");function v0(e){switch(e){case"agentPanel":return"copilotAgentConversation";case"editsPanel":return"copilotEditsPanel";case"conversationInline":return"inlineConversation";case"conversationPanel":default:return"conversation"}}s(v0,"telemetryPrefixForUiKind");function Tmt(e){let t=e.split(`
`),r=[],n=[];for(let i=0;i<t.length;i++){let o=t[i];o.startsWith("```")&&(n.length>0&&o==="```"?r.push(n.pop()):n.length===0&&n.push(o.substring(3)))}return r}s(Tmt,"getCodeBlocks");function b8e(e){return e=="conversationInline"?"conversation-inline":"conversation-panel"}s(b8e,"uiKindToIntent");function Y5(e){return e==="inline"?"conversationInline":"conversationPanel"}s(Y5,"conversationSourceToUiKind");function E8e(e,t,r,n,i){let o={conversationId:t.conversation.telemetryId,turnIndex:(t.conversation.turns.length-1).toString(),roundId:r.toString(),uiKind:"agentPanel"},a={totalTimeMs:n};T8e(e,"round",i.extendedBy(o,a))}s(E8e,"createAgentRoundTelemetryData");function I8e(e,t,r,n,i,o,a,l){let c={conversationId:t.conversation.telemetryId,turnIndex:(t.conversation.turns.length-1).toString(),roundId:i.toString(),toolName:r.name,toolType:r.type,toolProviderId:r.toolProvider.id,toolCallId:n,toolCallStatus:a,uiKind:"agentPanel"},u={totalTimeMs:o};T8e(e,"toolCall",l.extendedBy(c,u))}s(I8e,"createToolInvocationTelemetryData");function T8e(e,t,r){return jt(e,`${v0("agentPanel")}.${t}`,r)}s(T8e,"logAgenticEvent");d();var mu=new Gt("streamChoices"),jre=class{constructor(){this.logprobs=[];this.top_logprobs=[];this.text=[];this.tokens=[];this.text_offset=[];this.copilot_annotations=new zre;this.tool_calls=[];this.function_call=new $re;this.copilot_references=[];this.yielded=!1}static{s(this,"APIJsonDataStreaming")}append(t){if(t.text&&this.text.push(t.text),t.delta?.content&&t.delta.role!=="function"&&this.text.push(t.delta.content),t.logprobs&&(this.tokens.push(t.logprobs.tokens??[]),this.text_offset.push(t.logprobs.text_offset??[]),this.logprobs.push(t.logprobs.token_logprobs??[]),this.top_logprobs.push(t.logprobs.top_logprobs??[])),t.copilot_annotations&&this.copilot_annotations.update(t.copilot_annotations),t.delta?.copilot_annotations&&this.copilot_annotations.update(t.delta.copilot_annotations),t.delta?.tool_calls&&t.delta.tool_calls.length>0)for(let r of t.delta.tool_calls){let n=r.index;this.tool_calls[n]||(this.tool_calls[n]=new Vre),this.tool_calls[n].update(r)}t.delta?.function_call&&this.function_call.update(t.delta.function_call),t?.finish_reason&&(this.finish_reason=t.finish_reason)}};function wmt(e){let t=e.split(`
`),r=t.pop();return[t.filter(n=>n!=""),r]}s(wmt,"splitChunk");var Vre=class{constructor(){this.arguments=[]}static{s(this,"StreamingToolCall")}update(t){t.function.name&&(this.name=t.function.name),this.arguments.push(t.function.arguments)}},$re=class{constructor(){this.arguments=[]}static{s(this,"StreamingFunctionCall")}update(t){t.name&&(this.name=t.name),this.arguments.push(t.arguments)}},zre=class{constructor(){this.current={}}static{s(this,"StreamCopilotAnnotations")}update(t){Object.entries(t).forEach(([r,n])=>{n.forEach(i=>this.update_namespace(r,i))})}update_namespace(t,r){this.current[t]||(this.current[t]=[]);let n=this.current[t],i=n.findIndex(o=>o.id===r.id);i>=0?n[i]=r:n.push(r)}for(t){return this.current[t]??[]}},K5=class e{constructor(t,r,n,i,o,a,l){this.ctx=t;this.expectedNumChoices=r;this.response=n;this.body=i;this.telemetryData=o;this.dropCompletionReasons=a;this.cancellationToken=l;this.requestId=J5(this.response);this.stats=new Yre;this.solutions={}}static{s(this,"SSEProcessor")}static create(t,r,n,i,o,a){let l=n.body();if(l===null)throw new Error("No response body available");return typeof l.setEncoding=="function"?l.setEncoding("utf8"):l=l.pipeThrough(new TextDecoderStream),new e(t,r,n,l,i,o??[],a)}async*processSSE(t=()=>{}){try{yield*this.processSSEInner(t)}finally{this.cancel(),mu.debug(this.ctx,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),mu.debug(this.ctx,"request stats:",this.stats)}}async*processSSEInner(t){let r="",n=null,i,o;e:for await(let a of this.body){if(this.maybeCancel("after awaiting body chunk"))return;mu.debug(this.ctx,"chunk",a.toString());let[l,c]=wmt(r+a.toString());r=c;for(let u of l){let f=u.slice(5).trim();if(f=="[DONE]"){yield*this.finishSolutions(n,i,o,t);return}n=null;let m;try{m=JSON.parse(f)}catch{mu.error(this.ctx,"Error parsing JSON stream data",u);continue}if(m.copilot_confirmation&&_mt(m.copilot_confirmation)&&await t("",{text:"",requestId:this.requestId,copilotConfirmation:m.copilot_confirmation}),m.copilot_references&&await t("",{text:"",requestId:this.requestId,copilotReferences:m.copilot_references}),m.choices===void 0){!m.copilot_references&&!m.copilot_confirmation&&(m.error!==void 0?mu.error(this.ctx,"Error in response:",m.error.message):mu.error(this.ctx,"Unexpected response with no choices or error: "+f)),m.copilot_errors&&await t("",{text:"",requestId:this.requestId,copilotErrors:m.copilot_errors});continue}if(this.requestId.created==0&&(this.requestId=J5(this.response,m),this.requestId.created===0&&m.choices?.length&&mu.error(this.ctx,'Request id invalid, should have "completionId" and "created":',this.requestId)),i===void 0&&m.model&&(i=m.model),o===void 0&&m.usage&&(o=m.usage),this.allSolutionsDone()){r="";break e}for(let h=0;h<m.choices?.length;h++){let p=m.choices[h];mu.debug(this.ctx,"choice",p),this.stats.add(p.index),p.index in this.solutions||(this.solutions[p.index]=new jre);let g=this.solutions[p.index];if(g==null)continue;g.append(p);let y=this.asSolutionDecision(),x=p.text?.indexOf(`
`)>-1||p.delta?.content?.indexOf(`
`)>-1;if(p.finish_reason||x){let E=g.text.join("");if(y=this.asSolutionDecision(await t(E,{text:E,index:p.index,requestId:this.requestId,annotations:g.copilot_annotations,copilotReferences:g.copilot_references,getAPIJsonData:s(()=>kS(g),"getAPIJsonData"),finished:!!p.finish_reason,telemetryData:this.telemetryData})),this.maybeCancel("after awaiting finishedCb"))return}if(p.finish_reason&&g.function_call.name!==void 0){n=p.finish_reason;continue}if(p.finish_reason&&(y.yieldSolution=!0,y.continueStreaming=!1),!y.yieldSolution)continue;let b=p.finish_reason??"client-trimmed";if(jt(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:b,engineName:i??"",engineChoiceSource:B5(this.ctx,this.telemetryData).engineChoiceSource})),this.dropCompletionReasons.includes(p.finish_reason)?this.solutions[p.index]=null:g.yielded||(this.stats.markYielded(p.index),yield{solution:g,finishOffset:y.finishOffset,reason:p.finish_reason,requestId:this.requestId,index:p.index,model:i,usage:o},g.yielded=!0),this.maybeCancel("after yielding finished choice"))return;y.continueStreaming||(this.solutions[p.index]=null)}}}for(let[a,l]of Object.entries(this.solutions)){let c=Number(a);if(l!=null&&(jt(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:"Iteration Done",engineName:i??""})),this.stats.markYielded(c),yield{solution:l,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:c,model:i,usage:o},this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{let a=JSON.parse(r);a.error!==void 0&&mu.error(this.ctx,`Error in response: ${a.error.message}`,a.error)}catch{mu.error(this.ctx,`Error parsing extraData: ${r}`)}}asSolutionDecision(t){return t===void 0?{yieldSolution:!1,continueStreaming:!0}:typeof t=="number"?{yieldSolution:!0,continueStreaming:!1,finishOffset:t}:t}async*finishSolutions(t,r,n,i){for(let[o,a]of Object.entries(this.solutions)){let l=Number(o);if(a==null)continue;let c=a.text.join("");if(await i(c,{text:c,index:l,requestId:this.requestId,annotations:a.copilot_annotations,copilotReferences:a.copilot_references,getAPIJsonData:s(()=>kS(a),"getAPIJsonData"),finished:!0,telemetryData:this.telemetryData}),!a.yielded&&(this.stats.markYielded(l),jt(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:t??"DONE",engineName:r??""})),yield{solution:a,finishOffset:void 0,reason:t??"DONE",requestId:this.requestId,index:l,model:r,usage:n},this.maybeCancel("after yielding on DONE")))return}}maybeCancel(t){return this.cancellationToken?.isCancellationRequested?(mu.debug(this.ctx,"Cancelled: "+t),this.cancel(),!0):!1}cancel(){this.body&&"destroy"in this.body&&typeof this.body.destroy=="function"?this.body.destroy():this.body instanceof ReadableStream&&this.body.cancel()}allSolutionsDone(){let t=Object.values(this.solutions);return t.length==this.expectedNumChoices&&t.every(r=>r==null)}};function xO(e,t,r){let n=t.solution.text.join(""),i=!1;t.finishOffset!==void 0&&(mu.debug(e,`solution ${t.index}: early finish at offset ${t.finishOffset}`),n=n.substring(0,t.finishOffset),i=!0),mu.info(e,`solution ${t.index} returned. finish reason: [${t.reason}]`),mu.debug(e,`solution ${t.index} details: finishOffset: [${t.finishOffset}] completionId: [{${t.requestId.completionId}}] created: [{${t.requestId.created}}]`);let o=kS(t.solution);return vO(e,n,o,t.index,t.requestId,i,r)}s(xO,"prepareSolutionForReturn");function kS(e){let t=e.text.join(""),r=Smt(e),n=Rmt(e),i=e.copilot_annotations.current,o={text:t,tokens:e.text,tool_calls:r,function_call:n,copilot_annotations:i,finish_reason:e.finish_reason??"stop"};if(e.logprobs.length===0)return o;let a=e.logprobs.reduce((f,m)=>f.concat(m),[]),l=e.top_logprobs.reduce((f,m)=>f.concat(m),[]),c=e.text_offset.reduce((f,m)=>f.concat(m),[]),u=e.tokens.reduce((f,m)=>f.concat(m),[]);return{...o,logprobs:{token_logprobs:a,top_logprobs:l,text_offset:c,tokens:u}}}s(kS,"convertToAPIJsonData");function _mt(e){return typeof e.title=="string"&&typeof e.message=="string"&&!!e.confirmation}s(_mt,"isCopilotConfirmation");function Smt(e){let t=[];for(let r of e.tool_calls)if(r.name){let n=r.arguments.length>0?JSON.parse(r.arguments.join("")):{};t.push({type:"function",function:{name:r.name,arguments:n},approxNumTokens:r.arguments.length+1})}return t}s(Smt,"extractToolCalls");function Rmt(e){if(e.function_call.name){let t=e.function_call.arguments.length>0?JSON.parse(e.function_call.arguments.join("")):{};return{name:e.function_call.name,arguments:t}}}s(Rmt,"extractFunctionCall");var Yre=class{constructor(){this.choices=new Map}static{s(this,"ChunkStats")}getChoiceStats(t){let r=this.choices.get(t);return r||(r=new Kre,this.choices.set(t,r)),r}add(t){this.getChoiceStats(t).increment()}markYielded(t){this.getChoiceStats(t).markYielded()}toString(){return Array.from(this.choices.entries()).map(([t,r])=>`${t}: ${r.yieldedTokens} -> ${r.seenTokens}`).join(", ")}},Kre=class{constructor(){this.yieldedTokens=-1;this.seenTokens=0}static{s(this,"ChoiceStats")}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}};d();function bO(e,t){return e!==null&&typeof e=="object"&&t in e}s(bO,"hasKey");function b0(e,t){return bO(e,t)?e[t]:void 0}s(b0,"getKey");var _8e=Ze(ii());var Js=new Gt("fetchCompletions");function J5(e,t){return{headerRequestId:e.headers.get("x-request-id")||"",completionId:t&&t.id?t.id:"",created:t&&t.created?t.created:0,serverExperiments:e.headers.get("X-Copilot-Experiment")||"",deploymentId:e.headers.get("azureml-model-deployment")||""}}s(J5,"getRequestId");function j8(e){let t=e.headers.get("openai-processing-ms");return t?parseInt(t,10):0}s(j8,"getProcessingTime");function S8e(e){switch(e){case"ghostText":return"copilot-ghost";case"synthesize":return"copilot-panel"}}s(S8e,"uiKindToIntent");var hu=class{static{s(this,"OpenAIFetcher")}};function kmt(e,t,r,n){return a8(e,t,"proxy","v1/engines",r,n)}s(kmt,"getProxyEngineUrl");function EO(e,t,r,n){for(let[i,o]of Object.entries(e)){if(r.includes(i))continue;let a=o;if(i==="extra"&&n){let l={...a};for(let c of n)delete l[c];a=l}t.properties[`request.option.${i}`]=JSON.stringify(a)??"undefined"}}s(EO,"sanitizeRequestOptionTelemetry");async function w8e(e,t,r,n,i,o,a,l,c,u,f){let m=e.get(Ki),h=kmt(e,a,r,n),p=c.extendedBy({endpoint:n,engineName:r,uiKind:l},o8(t));EO(o,p,["prompt","suffix"],["context"]),p.properties.headerRequestId=i,jt(e,"request.sent",p);let g=ia(),y=S8e(l);return Qx(e,h,a.token,y,i,o,u,f).then(x=>{let b=J5(x,void 0);p.extendWithRequestId(b);let E=ia()-g;return p.measurements.totalTimeMs=E,Js.info(e,`Request ${i} at <${h}> finished with ${x.status} status after ${E}ms`),p.properties.status=String(x.status),Js.debug(e,"request.response properties",p.properties),Js.debug(e,"request.response measurements",p.measurements),Js.debug(e,"prompt:",t),jt(e,"request.response",p),x}).catch(x=>{if(kc(x))throw jt(e,"request.cancel",p),x;m.setWarning(b0(x,"message")??"");let b=p.extendedBy({error:"Network exception"});jt(e,"request.shownWarning",b),p.properties.message=String(b0(x,"name")??""),p.properties.code=String(b0(x,"code")??""),p.properties.errno=String(b0(x,"errno")??""),p.properties.type=String(b0(x,"type")??"");let E=ia()-g;throw p.measurements.totalTimeMs=E,Js.info(e,`Request ${i} at <${h}> rejected with ${String(x)} after ${E}ms`),Js.debug(e,"request.error properties",p.properties),Js.debug(e,"request.error measurements",p.measurements),jt(e,"request.error",p),x}).finally(()=>{V3e(e,t,p)})}s(w8e,"fetchWithInstrumentation");async function Bmt(e,t,r,n,i,o,a,l,c,u){let f=c.extendedBy({endpoint:"chat/completions",engineModelId:r,uiKind:l});EO(o,f,["messages"]),f.properties.headerRequestId=i,jt(e,"request.sent",f);let m=ia(),h=S8e(l),p={..._5(e)};try{let g=await Qx(e,n,a.token,h,i,o,u,p),y=J5(g,void 0);f.extendWithRequestId(y);let x=ia()-m;return f.measurements.totalTimeMs=x,Js.info(e,`Request ${i} at <${n}> finished with ${g.status} status after ${x}ms`),Js.debug(e,"request.response properties",f.properties),Js.debug(e,"request.response measurements",f.measurements),Js.debug(e,"messages:",JSON.stringify(t)),jt(e,"request.response",f),g}catch(g){if(kc(g))throw jt(e,"request.cancel",f),g;let y=f.extendedBy({error:"Network exception"});jt(e,"request.shownWarning",y),f.properties.message=String(b0(g,"name")??""),f.properties.code=String(b0(g,"code")??""),f.properties.errno=String(b0(g,"errno")??""),f.properties.type=String(b0(g,"type")??"");let x=ia()-m;throw f.measurements.totalTimeMs=x,Js.info(e,`Request ${i} at <${n}> rejected with ${String(g)} after ${x}ms`),Js.debug(e,"request.error properties",f.properties),Js.debug(e,"request.error measurements",f.measurements),jt(e,"request.error",f),g}finally{H8(e,t,f)}}s(Bmt,"fetchChatWithInstrumentation");function Jre(e){return m8e(e,t=>t.completionText.trim().length>0)}s(Jre,"postProcessChoices");var Dmt="github.copilot.completions.quotaExceeded",BS=class extends hu{static{s(this,"LiveOpenAIFetcher")}#e;async fetchAndStreamCompletions(t,r,n,i,o){if(this.#e)return{type:"canceled",reason:this.#e};let a=t.get(Ki),l="completions",c=await t.get(en).getToken(),u=await this.fetchWithParameters(t,l,r,c,n,o);if(u==="not-sent")return{type:"canceled",reason:"before fetch request"};if(o?.isCancellationRequested){let p=u.body();try{p&&"destroy"in p&&typeof p.destroy=="function"?p.destroy():p instanceof ReadableStream&&p.cancel()}catch(g){Js.exception(t,g,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(u.status!==200){let p=this.createTelemetryData(l,t,r);return this.handleError(t,a,p,u,c)}let m=K5.create(t,r.count,u,n,[],o).processSSE(i),h=TA(m,p=>xO(t,p,n));return{type:"success",choices:Jre(h),getProcessingTime:s(()=>j8(u),"getProcessingTime")}}async fetchAndStreamChat(t,r,n,i,o,a,l,c={},u){if(this.#e)return{type:"canceled",reason:this.#e};let f="https://copilot-proxy.githubusercontent.com/chat/completions",m={messages:r,model:l.id,stream:!0,...c},h=n.extendedBy({endpoint:f,model:l.name}),p=t.get(Ki),g=await t.get(en).getToken(),y=await Bmt(t,r,l.id,f,o,m,g,i,h,u);if(u?.isCancellationRequested){let _=y.body();try{_&&"destroy"in _&&typeof _.destroy=="function"?_.destroy():_ instanceof ReadableStream&&_.cancel()}catch(k){Js.exception(t,k,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(y.status!==200){let _=dn.createAndMarkAsIssued({endpoint:f,engineName:l.name,uiKind:i,headerRequestId:o});return this.handleError(t,p,_,y,g)}let b=K5.create(t,1,y,h,[],_8e.CancellationToken.None).processSSE(),E=TA(b,_=>xO(t,_,n));return{type:"success",choices:Jre(E),getProcessingTime:s(()=>j8(y),"getProcessingTime")}}async fetchAndStreamSpeculation(t,r,n,i,o){if(this.#e)return{type:"canceled",reason:this.#e};let a=t.get(Ki),l="speculation",c=await t.get(en).getToken(),u={prompt:{prefix:r.prompt,suffix:"",isFimEnabled:!1},speculation:r.speculation,ourRequestId:_r(),engineModelId:r.engineModelId,uiKind:r.uiKind,headers:r.headers,stops:r.stops},f=await this.fetchSpeculationWithParameters(t,l,u,c,n,o);if(f==="not-sent")return{type:"canceled",reason:"before fetch request"};if(o?.isCancellationRequested){let g=f.body();try{g&&"destroy"in g&&typeof g.destroy=="function"?g.destroy():g instanceof ReadableStream&&g.cancel()}catch(y){Js.exception(t,y,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(f.status!==200){let g=this.createTelemetryData(l,t,u);return this.handleError(t,a,g,f,c)}let h=K5.create(t,1,f,n,[],o).processSSE(i),p=TA(h,g=>xO(t,g,n));return{type:"success",choices:Jre(p),getProcessingTime:s(()=>j8(f),"getProcessingTime")}}createTelemetryData(t,r,n){return dn.createAndMarkAsIssued({endpoint:t,engineName:n.engineModelId,uiKind:n.uiKind,headerRequestId:n.ourRequestId})}async fetchSpeculationWithParameters(t,r,n,i,o,a){let l={prompt:n.prompt.prefix,speculation:n.speculation,temperature:0,stream:!0,stop:n.stops??[]};return await IS(0),a?.isCancellationRequested?"not-sent":await w8e(t,n.prompt,n.engineModelId,r,n.ourRequestId,l,i,n.uiKind,o,a,n.headers)}async fetchWithParameters(t,r,n,i,o,a){let l=t.get(or).disableLogProb(o),c=t.get(or).enablePromptContextProxyField(o),u={prompt:n.prompt.prefix,suffix:n.prompt.suffix,max_tokens:TO(t),temperature:V8(t,n.count),top_p:IO(t),n:n.count,stop:R8e(t,n.languageId),stream:!0,extra:n.extra};(n.requestLogProbs||!l)&&(u.logprobs=2);let f=AA(n.repoInfo);return f!==void 0&&(u.nwo=f),n.postOptions&&Object.assign(u,n.postOptions),c&&n.prompt.context&&(u.extra.context=n.prompt.context),await IS(0),a?.isCancellationRequested?"not-sent":await w8e(t,n.prompt,n.engineModelId,r,n.ourRequestId,u,i,n.uiKind,o,a,n.headers)}async handleError(t,r,n,i,o){let a=await i.text();if(i.status===402){this.#e="monthly free code completions exhausted",r.setError("Completions limit reached",{command:Dmt,title:"Learn More"});let c=Ks(t,u=>{this.#e=void 0,(u.envelope.limited_user_quotas?.completions??1)>0&&(r.forceNormal(),c.dispose())});return{type:"failed",reason:this.#e}}if(i.status===466)return r.setError(a),Js.info(t,a),{type:"failed",reason:`client not supported: ${a}`};if(i.clientError&&!i.headers.get("x-github-request-id")){let l=`Last response was a ${i.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;Js.error(t,l),r.setWarning(l),n.properties.error=`Response status was ${i.status} with no x-github-request-id header`}else i.clientError?(Js.warn(t,`Response status was ${i.status}:`,a),r.setWarning(`Last response was a ${i.status} error: ${a}`),n.properties.error=`Response status was ${i.status}: ${a}`):(r.setWarning(`Last response was a ${i.status} error`),n.properties.error=`Response status was ${i.status}`);return n.properties.status=String(i.status),jt(t,"request.shownWarning",n),i.status===401||i.status===403?(t.get(en).resetToken(i.status),{type:"failed",reason:`token expired or invalid: ${i.status}`}):i.status===429?(setTimeout(()=>{this.#e=void 0},10*1e3),this.#e="rate limited",Js.warn(t,"Rate limited by server. Denying completions for the next 10 seconds."),{type:"failed",reason:this.#e}):i.status===499?(Js.info(t,"Cancelled by server"),{type:"failed",reason:"canceled by server"}):(Js.error(t,"Unhandled status from server:",i.status,a),{type:"failed",reason:`unhandled status from server: ${i.status} ${a}`})}};function vO(e,t,r,n,i,o,a){return j3e(e,t,r,i,n),{completionText:t,meanLogProb:Pmt(e,r),meanAlternativeLogProb:Nmt(e,r),choiceIndex:n,requestId:i,blockFinished:o,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:a,copilotAnnotations:r.copilot_annotations,clientCompletionId:_r(),finishReason:r.finish_reason}}s(vO,"convertToAPIChoice");function Pmt(e,t){if(t?.logprobs?.token_logprobs)try{let r=0,n=0,i=50;for(let o=0;o<t.logprobs.token_logprobs.length-1&&i>0;o++,i--)r+=t.logprobs.token_logprobs[o],n+=1;return n>0?r/n:void 0}catch(r){kn.exception(e,r,"Error calculating mean prob")}}s(Pmt,"calculateMeanLogProb");function Nmt(e,t){if(t?.logprobs?.top_logprobs)try{let r=0,n=0,i=50;for(let o=0;o<t.logprobs.token_logprobs.length-1&&i>0;o++,i--){let a={...t.logprobs.top_logprobs[o]};delete a[t.logprobs.tokens[o]],r+=Math.max(...Object.values(a)),n+=1}return n>0?r/n:void 0}catch(r){kn.exception(e,r,"Error calculating mean prob")}}s(Nmt,"calculateMeanAlternativeLogProb");function V8(e,t){return sh(e)||t<=1?0:t<10?.2:t<20?.4:.8}s(V8,"getTemperatureForSamples");var Lmt={markdown:[`
`],python:[`
def `,`
class `,`
if `,`
#`]};function R8e(e,t){return Lmt[t??""]??[`
`,"\n```"]}s(R8e,"getStops");function IO(e){return 1}s(IO,"getTopP");function TO(e){return F_}s(TO,"getMaxSolutionTokens");var Xre=class e{constructor(t,r){this.index=t;this.documentPrefix=r;this.startOffset=0;this.text="";this.trimCount=0}static{s(this,"StreamingCompletion")}updateText(t){this.text=t}get addedToPrefix(){return this.text.substring(0,this.startOffset)}get effectivePrefix(){return this.documentPrefix+this.addedToPrefix}get effectiveText(){return this.text.substring(this.startOffset)}get isFirstCompletion(){return this.trimCount===0}get firstNewlineOffset(){let t=[...this.text.matchAll(/\r?\n/g)];return t.length>0&&t[0].index===0&&t.shift(),t.length>0?t[0].index:-1}trimAt(t){let r=new e(this.index,this.documentPrefix);return r.startOffset=this.startOffset,r.text=this.text.substring(0,this.startOffset+t),r.trimCount=this.trimCount,this.startOffset+=t,this.trimCount++,r}},wO=class{constructor(t,r,n,i,o,a){this.ctx=t;this.prefix=r;this.languageId=n;this.initialSingleLine=i;this.trimmerLookahead=o;this.cacheFunction=a;this.lineLimit=3;this.completions=new Map}static{s(this,"StreamedCompletionSplitter")}getFinishedCallback(){return async(t,r)=>{let n=r.index??0,i=this.getCompletion(n,t);if(i.isFirstCompletion&&this.initialSingleLine&&i.firstNewlineOffset>=0){let o={yieldSolution:!0,continueStreaming:!0,finishOffset:i.firstNewlineOffset};return i.trimAt(o.finishOffset),r.finished&&await this.trimAll(r,i),o}return r.finished?await this.trimAll(r,i):await this.trimOnce(r,i)}}getCompletion(t,r){let n=this.completions.get(t);return n||(n=new Xre(t,this.prefix),this.completions.set(t,n)),n.updateText(r),n}async trimOnce(t,r){let n=await this.trim(r);return n===void 0?{yieldSolution:!1,continueStreaming:!0}:r.isFirstCompletion?(r.trimAt(n),{yieldSolution:!0,continueStreaming:!0,finishOffset:n}):(this.cacheCompletion(t,r,n),{yieldSolution:!1,continueStreaming:!0})}async trimAll(t,r){let n,i;do n=await this.trim(r),r.isFirstCompletion?(i=n,r.trimAt(n??r.effectiveText.length)):this.cacheCompletion(t,r,n);while(n!==void 0);return i!==void 0?{yieldSolution:!0,continueStreaming:!0,finishOffset:i}:{yieldSolution:!1,continueStreaming:!0}}async trim(t){return await new AO(this.languageId,t.effectivePrefix,t.effectiveText,this.lineLimit,this.trimmerLookahead).getCompletionTrimOffset()}cacheCompletion(t,r,n){let i=r.trimAt(n??r.effectiveText.length);if(i.effectiveText.trim()==="")return;let o=vO(this.ctx,i.effectiveText.trimEnd(),t.getAPIJsonData(),i.index,t.requestId,n!==void 0,t.telemetryData);o.copilotAnnotations=this.adjustedAnnotations(o,r,i),o.generatedChoiceIndex=i.trimCount,this.cacheFunction(i.addedToPrefix,o)}adjustedAnnotations(t,r,n){if(t.copilotAnnotations===void 0)return;let i=n.addedToPrefix.length,a=i+t.completionText.length>=r.text.length,l={};for(let[c,u]of Object.entries(t.copilotAnnotations)){let f=u.filter(m=>m.start_offset-i<t.completionText.length&&m.stop_offset-i>0).map(m=>{let h={...m};return h.start_offset-=i,h.stop_offset-=i,a||(h.stop_offset=Math.min(h.stop_offset,t.completionText.length)),h});f.length>0&&(l[c]=f)}return Object.keys(l).length>0?l:void 0}};d();var _O=new Gt("getCompletions");function SO(e,t,r){r.telemetry.markAsDisplayed(),r.telemetry.properties.reason=$8(r.resultType),jt(e,`${t}.shown`,r.telemetry)}s(SO,"telemetryShown");function k8e(e,t,r){let n=t+".accepted",i=e.get(yf);i.previousLabel=1,i.previousLabelTimestamp=Date.now(),jt(e,n,r)}s(k8e,"telemetryAccepted");function B8e(e,t,r){let n=t+".rejected",i=e.get(yf);i.previousLabel=0,i.previousLabelTimestamp=Date.now(),jt(e,n,r)}s(B8e,"telemetryRejected");function fg(e,t={}){return{...t,telemetryBlob:e}}s(fg,"mkCanceledResultTelemetry");function Xs(e){let t={headerRequestId:e.properties.headerRequestId,copilot_trackingId:e.properties.copilot_trackingId};return e.properties.sku!==void 0&&(t.sku=e.properties.sku),e.properties.opportunityId!==void 0&&(t.opportunityId=e.properties.opportunityId),e.properties.organizations_list!==void 0&&(t.organizations_list=e.properties.organizations_list),e.properties.enterprise_list!==void 0&&(t.enterprise_list=e.properties.enterprise_list),e.properties.clientCompletionId!==void 0&&(t.clientCompletionId=e.properties.clientCompletionId),t["abexp.assignmentcontext"]=e.filtersAndExp.exp.assignmentContext,t}s(Xs,"mkBasicResultTelemetry");function D8e(e,t){if(t.type!=="promptOnly"){if(t.type==="success"){let r=ia()-t.telemetryBlob.issuedTime,n=$8(t.resultType),i=JSON.stringify(t.performanceMetrics),o={...t.telemetryData,reason:n,performanceMetrics:i},{foundOffset:a}=t.telemetryBlob.measurements,l=t.performanceMetrics?.map(([c,u])=>`
${u.toFixed(2)} ${c}`).join("")??"";return _O.debug(e,`ghostText produced from ${n} in ${Math.round(r)}ms with foundOffset ${a}${l}`),ZZ(e,"ghostText.produced",o,{timeToProduceMs:r,foundOffset:a}),t.value}if(_O.debug(e,"No ghostText produced -- "+t.type+": "+t.reason),t.type==="canceled"){jt(e,"ghostText.canceled",t.telemetryData.telemetryBlob.extendedBy({reason:t.reason,cancelledNetworkRequest:t.telemetryData.cancelledNetworkRequest?"true":"false"}));return}ZZ(e,`ghostText.${t.type}`,{...t.telemetryData,reason:t.reason},{})}}s(D8e,"handleGhostTextResultTelemetry");function $8(e){switch(e){case 0:return"network";case 1:return"cache";case 3:return"cycling";case 2:return"typingAsSuggested";case 4:return"async"}}s($8,"resultTypeToString");d();d();d();async function Fmt(e){if(e.isCancellationRequested)return;let t=new $5,r=e.onCancellationRequested(()=>{t.resolve(),r.dispose()});await t.promise}s(Fmt,"cancellationTokenToPromise");async function P8e(e,t){if(t){let r=Fmt(t);await Promise.race([e,r])}else await e}s(P8e,"raceCancellation");async function N8e(e,t){let r=new Map,n=[];for(let[i,o]of e.entries()){let a=(async()=>{let l;o instanceof Promise?l=await Mmt(o,t):l=await Qmt(o,t),r.set(i,l)})();n.push(a)}return await Promise.allSettled(n.values()),r}s(N8e,"resolveAll");async function Mmt(e,t){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},i=(async()=>{try{let o=await e;if(t?.isCancellationRequested)return;n={status:"full",resolutionTime:0,value:Array.isArray(o)?o:[o]}}catch(o){if(t?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:o}}})();return await P8e(i,t),n.resolutionTime=performance.now()-r,n}s(Mmt,"resolvePromise");async function Qmt(e,t){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},i=(async()=>{try{for await(let o of e){if(t?.isCancellationRequested)return;n.status!="partial"&&(n={status:"partial",resolutionTime:0,value:[]}),n.value.push(o)}t?.isCancellationRequested||(n.status!=="partial"?n={status:"full",resolutionTime:0,value:[]}:n.status="full")}catch(o){if(t?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:o}}})();return await P8e(i,t),n.resolutionTime=performance.now()-r,n}s(Qmt,"resolveIterable");d();var Omt={maxSnippetLength:3e3,maxSnippetCount:7,enabledFeatures:"Deferred",timeBudgetMs:7,doAggregateSnippets:!0},Umt="ms-vscode.cpptools",qmt="CppCompletionContextProvider";function L8e(e,t,r,n){(t.includes(qmt)||t.length===1&&t[0]==="*")&&M8e(e,r,n)}s(L8e,"fillInCppVSActiveExperiments");function F8e(e,t,r,n){(t.length===1&&t[0]==="*"||t.includes(Umt))&&M8e(e,r,n)}s(F8e,"fillInCppVSCodeActiveExperiments");function M8e(e,t,r){try{let n=Omt,i=e.get(or).cppContextProviderParams(r);if(i)try{n=JSON.parse(i)}catch(o){kn.error(e,"Failed to parse cppContextProviderParams",o)}for(let[o,a]of Object.entries(n))t.set(o,a)}catch(n){kn.exception(e,n,"fillInCppActiveExperiments")}}s(M8e,"addActiveExperiments");d();function RO(e,t,r){try{let n=e.get(or).csharpContextProviderParams(r);if(n){let i=JSON.parse(n);for(let[o,a]of Object.entries(i))t.set(o,a)}}catch(n){return kn.debug(e,"Failed to get the active C# experiments for the Context Provider API",n),!1}return!0}s(RO,"fillInCSharpActiveExperiments");d();var X5="fallbackContextProvider",PS={mlcpMaxContextItems:20,mlcpMaxSymbolMatches:20};function Q8e(e,t,r,n){(t.length===1&&t[0]==="*"||t.includes(X5))&&Wmt(e,r,n)}s(Q8e,"fillInMultiLanguageActiveExperiments");function Wmt(e,t,r){try{let n=PS,i=e.get(or).multiLanguageContextProviderParams(r);if(i)try{n=JSON.parse(i)}catch(o){kn.error(e,"Failed to parse multiLanguageContextProviderParams",o)}for(let[o,a]of Object.entries(n))t.set(o,a)}catch(n){kn.exception(e,n,"fillInMultiLanguageActiveExperiments")}}s(Wmt,"addActiveExperiments");function O8e(e){let t={mlcpMaxContextItems:PS.mlcpMaxContextItems,mlcpMaxSymbolMatches:PS.mlcpMaxSymbolMatches};for(let[r,n]of Object.entries(e))r in t&&(t[r]=n);return t}s(O8e,"getMultiLanguageContextProviderParamsFromActiveExperiments");d();var U8e=I.Object({importance:I.Optional(I.Integer({minimum:0,maximum:100})),id:I.Optional(I.String()),origin:I.Optional(I.Union([I.Literal("request"),I.Literal("update")]))}),q8e=I.Intersect([I.Object({name:I.String(),value:I.String()}),U8e]),W8e=I.Intersect([I.Object({uri:I.String(),value:I.String(),additionalUris:I.Optional(I.Array(I.String()))}),U8e]),Gmt=[q8e,W8e],Hmt=I.Union(Gmt),jmt=new Map([["Trait",hs.Compile(q8e)],["CodeSnippet",hs.Compile(W8e)]]),Vmt=s(e=>e,"ensureTypesAreEqual");Vmt(!0);var $mt=I.Object({contextItems:I.Array(Hmt)}),zmt=I.Object({selector:I.Array(I.Union([I.String(),I.Object({language:I.Optional(I.String()),scheme:I.Optional(I.String()),pattern:I.Optional(I.String())})]))}),Zre=I.Object({id:I.String()}),Ymt=I.Intersect([Zre,zmt]),Kmt=I.Intersect([Zre,$mt]),G8e=I.Object({providers:I.Array(Ymt)}),H8e=I.Object({providers:I.Array(Zre)}),ene=I.Object({providers:I.Array(Kmt),updating:I.Optional(I.Array(I.String()))}),kO=I.Intersect([u3e,I.Object({contextItems:I.Optional(ene)})]);function BO(e,t){return e.map(r=>{let n=r.data.filter(i=>i.type===t);return n.length>0?{...r,data:n}:void 0}).filter(r=>r!==void 0)}s(BO,"filterContextItemsByType");function j8e(e){let t=[],r=0;return e.forEach(n=>{let i=!1;for(let[o,a]of jmt.entries())if(a.Check(n)){t.push({...n,type:o}),i=!0;break}i||r++}),[t,r]}s(j8e,"filterSupportedContextItems");function Jmt(e){return e.length>0&&e.replaceAll(/[^a-zA-Z0-9-]/g,"").length===e.length}s(Jmt,"validateContextItemId");function V8e(e,t){let r=new Set,n=[];for(let i of t){let o=i.id??_r();if(!Jmt(o)){let a=_r();kn.error(e,`Invalid context item ID ${o}, replacing with ${a}`),o=a}if(r.has(o)){let a=_r();kn.error(e,`Duplicate context item ID ${o}, replacing with ${a}`),o=a}r.add(o),n.push({...i,id:o})}return n}s(V8e,"addOrValidateContextItemsIDs");d();var Bl=class{constructor(t=()=>new tne){this.createStatistics=t;this.statistics=new un(25)}static{s(this,"ContextProviderStatistics")}getStatisticsForCompletion(t){let r=this.statistics.get(t);if(r)return r;let n=this.createStatistics();return this.statistics.set(t,n),n}getPreviousStatisticsForCompletion(t){let r=Array.from(this.statistics.keys());for(let n=r.length-1;n>=0;n--){let i=r[n];if(i!==t)return this.statistics.peek(i)}}},tne=class{constructor(){this._expectations=new Map;this._lastResolution=new Map;this._statistics=new Map}static{s(this,"PerCompletionContextProviderStatistics")}addExpectations(t,r){let n=this._expectations.get(t)??[];this._expectations.set(t,[...n,...r])}clearExpectations(){this._expectations.clear()}setLastResolution(t,r){this._lastResolution.set(t,r)}get(t){return this._statistics.get(t)}computeMatch(t){try{for(let[r,n]of this._expectations){if(n.length===0)continue;let i=this._lastResolution.get(r)??"none";if(i==="none"||i==="error"){this._statistics.set(r,{usage:"none",resolution:i});continue}let o=[];for(let[u,f]of n){let m={id:u.id,type:u.type};if(u.origin&&(m.origin=u.origin),f==="content_excluded"){o.push({...m,usage:"none_content_excluded"});continue}let h=t.find(p=>p.source===u);h===void 0?o.push({...m,usage:"error"}):o.push({...m,usage:h.expectedTokens>0&&h.expectedTokens===h.actualTokens?"full":h.actualTokens>0?"partial":"none",expectedTokens:h.expectedTokens,actualTokens:h.actualTokens})}let l=o.reduce((u,f)=>f.usage==="full"?u+1:f.usage==="partial"?u+.5:u,0)/n.length,c=l===1?"full":l===0?"none":"partial";this._statistics.set(r,{resolution:i,usage:c,usageDetails:o})}}finally{this.clearExpectations(),this._lastResolution.clear()}}};function $8e(e){return e.map(t=>{if(!(t.source===void 0||t.expectedTokens===void 0||t.actualTokens===void 0))return{source:t.source,expectedTokens:t.expectedTokens,actualTokens:t.actualTokens}}).filter(t=>t!==void 0)}s($8e,"componentStatisticsToPromptMatcher");var z8e=Ze(ii());var ul=class{static{s(this,"ContextProviderRegistry")}},Z5=class{static{s(this,"DefaultContextProviders")}},z8=class extends Z5{constructor(){super();this.ids=[]}static{s(this,"DefaultContextProvidersContainer")}setIds(r){this.ids=r}getIds(){return this.ids}},rne=class extends ul{constructor(r,n){super();this.ctx=r;this.match=n;this._providers=[]}static{s(this,"CoreContextProviderRegistry")}registerContextProvider(r){if(r.id.includes(",")||r.id.includes("*"))throw new Error(`A context provider id cannot contain a comma or an asterisk. The id ${r.id} is invalid.`);if(this._providers.find(n=>n.id===r.id))throw new Error(`A context provider with id ${r.id} has already been registered`);this._providers.push(r)}unregisterContextProvider(r){this._providers=this._providers.filter(n=>n.id!==r)}get providers(){return this._providers.slice()}async resolveAllProviders(r,n,i,o,a){if(o?.isCancellationRequested)return kn.debug(this.ctx,"Resolving context providers cancelled"),[];let l=new Map;RO(this.ctx,l,i);let c=[];if(this._providers.length===0)return c;let u=await this.matchProviders(n,i),f=u.filter(b=>b[1]>0),m=u.filter(b=>b[1]<=0);if(F8e(this.ctx,f.map(b=>b[0].id),l,i),Q8e(this.ctx,f.map(b=>b[0].id),l,i),m.forEach(([b,E])=>{let _={providerId:b.id,matchScore:E,resolution:"none",resolutionTimeMs:0,data:[]};c.push(_)}),f.length===0)return c;if(o?.isCancellationRequested)return kn.debug(this.ctx,"Resolving context providers cancelled"),[];let h=new z8e.CancellationTokenSource;if(o){let b=o.onCancellationRequested(E=>{h.cancel(),b.dispose()})}let p=x_(this.ctx)&&!aF(this.ctx)?0:Xmt(this.ctx,i),g=Date.now()+p;p>0&&setTimeout(()=>{h.cancel(),h.dispose()},p);let y=new Map;for(let[b]of f){let E={completionId:r,documentContext:n,activeExperiments:l,timeBudget:p,timeoutEnd:g,data:a},_=this.ctx.get(Bl).getPreviousStatisticsForCompletion(r)?.get(b.id);_&&(E.previousUsageStatistics=_);let k=b.resolver.resolve(E,h.token);y.set(b.id,k)}let x=await N8e(y,h.token);for(let[b,E]of f){let _=x.get(b.id);if(_)if(this.ctx.get(Bl).getStatisticsForCompletion(r).setLastResolution(b.id,_.status),_.status==="error")yM(_.reason)||kn.error(this.ctx,`Error resolving context from ${b.id}: `,_.reason),c.push({providerId:b.id,matchScore:E,resolution:_.status,resolutionTimeMs:_.resolutionTime,data:[]});else{(_.status==="none"||_.status==="partial")&&kn.info(this.ctx,`Context provider ${b.id} exceeded time budget of ${p}ms`);let[k,B]=j8e(_.value??[]);B&&kn.error(this.ctx,`Dropped ${B} context items from ${b.id} due to invalid schema`);let N=V8e(this.ctx,k),M={providerId:b.id,matchScore:E,resolution:_.status,resolutionTimeMs:_.resolutionTime,data:N};c.push(M)}else kn.error(this.ctx,`Context provider ${b.id} not found in results`)}return c.sort((b,E)=>E.matchScore-b.matchScore)}async matchProviders(r,n){let i=PO(this.ctx,n),o=i.length===1&&i[0]==="*";return await Promise.all(this._providers.map(async l=>{if(!o&&!i.includes(l.id))return[l,0];let c=await this.match(this.ctx,l.selector,r);return[l,c]}))}},nne=class extends ul{constructor(r){super();this.delegate=r;this._cachedContextItems=new un(5)}static{s(this,"CachedContextProviderRegistry")}registerContextProvider(r){this.delegate.registerContextProvider(r)}unregisterContextProvider(r){this.delegate.unregisterContextProvider(r)}get providers(){return this.delegate.providers}async resolveAllProviders(r,n,i,o,a){let l=this._cachedContextItems.get(r);if(r&&l&&l.length>0)return l;let c=await this.delegate.resolveAllProviders(r,n,i,o,a);return c.length>0&&r&&this._cachedContextItems.set(r,c),c}};function DO(e,t){return new nne(new rne(e,t))}s(DO,"getContextProviderRegistry");function Y8e(e,t,r){let n=e.get(Bl).getStatisticsForCompletion(t);return r.map(o=>{let{providerId:a,resolution:l,resolutionTimeMs:c,matchScore:u,data:f}=o,m=n.get(a),h=m?.usage??"none";(u<=0||l==="none"||l==="error")&&(h="none");let p={providerId:a,resolution:l,resolutionTimeMs:c,usage:h,usageDetails:m?.usageDetails,matched:u>0,numResolvedItems:f.length},g=m?.usageDetails!==void 0?m?.usageDetails.filter(x=>x.usage==="full"||x.usage==="partial"||x.usage==="partial_content_excluded").length:void 0,y=m?.usageDetails!==void 0?m?.usageDetails.filter(x=>x.usage==="partial"||x.usage==="partial_content_excluded").length:void 0;return g!==void 0&&(p.numUsedItems=g),y!==void 0&&(p.numPartiallyUsedItems=y),p})}s(Y8e,"telemetrizeContextItems");function K8e(e){return e.matchScore>0&&e.resolution!=="error"}s(K8e,"matchContextItems");function PO(e,t){let r=ine(e,t),n=Vn(e,Rt.ContextProviders)??[];if(r.length===1&&r[0]==="*"||n.length===1&&n[0]==="*")return["*"];let i=e.get(Z5).getIds();return Array.from(new Set([...i,...r,...n]))}s(PO,"getActiveContextProviders");function ine(e,t){return x_(e)?["*"]:e.get(or).contextProviders(t)}s(ine,"getExpContextProviders");function one(e,t){return PO(e,t).length>0}s(one,"useContextProviderAPI");function Xmt(e,t){let r=Vn(e,Rt.ContextProviderTimeBudget);return r!==void 0&&typeof r=="number"?r:e.get(or).contextProviderTimeBudget(t)}s(Xmt,"getContextProviderTimeBudget");var Vd=class{constructor(t){this.ctx=t;this.scheduledResolutions=new un(25)}static{s(this,"ContextProviderBridge")}schedule(t,r,n,i,o){let a=this.ctx.get(ul),{textDocument:l,originalPosition:c,originalOffset:u,originalVersion:f,editsWithPosition:m}=t,h=a.resolveAllProviders(r,{uri:l.uri,languageId:l.detectedLanguageId,version:f,offset:u,position:c,proposedEdits:m.length>0?m:void 0},n,i,o?.data);this.scheduledResolutions.set(r,h)}async resolution(t){let r=this.scheduledResolutions.get(t);return r?await r:[]}};d();d();var NO=class{constructor(t,r,n){this.languageId=t;this.nodeMatch=r;this.nodeTypesWithBlockOrStmtChild=n}static{s(this,"BaseBlockParser")}async getNodeMatchAtPosition(t,r,n){let i=await yA(this.languageId,t);try{let a=i.rootNode.descendantForIndex(r);for(;a;){let l=this.nodeMatch[a.type];if(l){if(!this.nodeTypesWithBlockOrStmtChild.has(a.type))break;let c=this.nodeTypesWithBlockOrStmtChild.get(a.type);if((c==""?a.namedChildren[0]:a.childForFieldName(c))?.type==l)break}a=a.parent}return a?n(a):void 0}finally{i.delete()}}getNextBlockAtPosition(t,r,n){return this.getNodeMatchAtPosition(t,r,i=>{let o=i.children.reverse().find(a=>a.type==this.nodeMatch[i.type]);if(o){if(this.languageId=="python"&&o.parent){let a=o.parent.type==":"?o.parent.parent:o.parent,l=a?.nextSibling;for(;l&&l.type=="comment";){let c=l.startPosition.row==o.endPosition.row&&l.startPosition.column>=o.endPosition.column,u=l.startPosition.row>a.endPosition.row&&l.startPosition.column>a.startPosition.column;if(c||u)o=l,l=l.nextSibling;else break}}if(!(o.endIndex>=o.tree.rootNode.endIndex-1&&(o.hasError()||o.parent.hasError())))return n(o)}})}async isBlockBodyFinished(t,r,n){let i=(t+r).trimEnd(),o=await this.getNextBlockAtPosition(i,n,a=>a.endIndex);if(o!==void 0&&o<i.length){let a=o-t.length;return a>0?a:void 0}}getNodeStart(t,r){let n=t.trimEnd();return this.getNodeMatchAtPosition(n,r,i=>i.startIndex)}},LO=class extends NO{constructor(r,n,i,o,a){super(r,o,a);this.blockEmptyMatch=n;this.lineMatch=i}static{s(this,"RegexBasedBlockParser")}isBlockStart(r){return this.lineMatch.test(r.trimStart())}async isBlockBodyEmpty(r,n){let i=await this.getNextBlockAtPosition(r,n,o=>{o.startIndex<n&&(n=o.startIndex);let a=r.substring(n,o.endIndex).trim();return a==""||a.replace(/\s/g,"")==this.blockEmptyMatch});return i===void 0||i}async isEmptyBlockStart(r,n){return n=X8e(r,n),this.isBlockStart(Zmt(r,n))&&this.isBlockBodyEmpty(r,n)}};function Zmt(e,t){let r=e.lastIndexOf(`
`,t-1),n=e.indexOf(`
`,t);return n<0&&(n=e.length),e.slice(r+1,n)}s(Zmt,"getLineAtOffset");function X8e(e,t){let r=t;for(;r>0&&/\s/.test(e.charAt(r-1));)r--;return r}s(X8e,"rewindToNearestNonWs");function J8e(e,t){let r=e.startIndex,n=e.startIndex-e.startPosition.column,i=t.substring(n,r);if(/^\s*$/.test(i))return i}s(J8e,"indent");function eht(e,t,r){if(t.startPosition.row<=e.startPosition.row)return!1;let n=J8e(e,r),i=J8e(t,r);return n!==void 0&&i!==void 0&&n.startsWith(i)}s(eht,"outdented");var dg=class extends NO{constructor(r,n,i,o,a,l,c){super(r,n,i);this.startKeywords=o;this.blockNodeType=a;this.emptyStatementType=l;this.curlyBraceLanguage=c}static{s(this,"TreeSitterBasedBlockParser")}isBlockEmpty(r,n){let i=r.text.trim();return this.curlyBraceLanguage&&(i.startsWith("{")&&(i=i.slice(1)),i.endsWith("}")&&(i=i.slice(0,-1)),i=i.trim()),!!(i.length==0||this.languageId=="python"&&(r.parent?.type=="class_definition"||r.parent?.type=="function_definition")&&r.children.length==1&&Lve(r.parent))}async isEmptyBlockStart(r,n){if(n>r.length)throw new RangeError("Invalid offset");for(let o=n;o<r.length&&r.charAt(o)!=`
`;o++)if(/\S/.test(r.charAt(o)))return!1;n=X8e(r,n);let i=await yA(this.languageId,r);try{let o=i.rootNode.descendantForIndex(n-1);if(o==null||this.curlyBraceLanguage&&o.type=="}")return!1;if((this.languageId=="javascript"||this.languageId=="typescript")&&o.parent&&o.parent.type=="object"&&o.parent.text.trim()=="{")return!0;if(this.languageId=="typescript"){let f=o;for(;f.parent;){if(f.type=="function_signature"||f.type=="method_signature"){let m=o.nextSibling;return m&&f.hasError()&&eht(f,m,r)?!0:!f.children.find(p=>p.type==";")&&f.endIndex<=n}f=f.parent}}let a=null,l=null,c=null,u=o;for(;u!=null;){if(u.type==this.blockNodeType){l=u;break}if(this.nodeMatch[u.type]){c=u;break}if(u.type=="ERROR"){a=u;break}u=u.parent}if(l!=null){if(!l.parent||!this.nodeMatch[l.parent.type])return!1;if(this.languageId=="python"){let f=l.previousSibling;if(f!=null&&f.hasError()&&(f.text.startsWith('"""')||f.text.startsWith("'''")))return!0}return this.isBlockEmpty(l,n)}if(a!=null){if(a.previousSibling?.type=="module"||a.previousSibling?.type=="internal_module"||a.previousSibling?.type=="def")return!0;let f=[...a.children].reverse(),m=f.find(p=>this.startKeywords.includes(p.type)),h=f.find(p=>p.type==this.blockNodeType);if(m){switch(this.languageId){case"python":{m.type=="try"&&o.type=="identifier"&&o.text.length>4&&(h=f.find(y=>y.hasError())?.children.find(y=>y.type=="block"));let p,g=0;for(let y of a.children){if(y.type==":"&&g==0){p=y;break}y.type=="("&&(g+=1),y.type==")"&&(g-=1)}if(p&&m.endIndex<=p.startIndex&&p.nextSibling){if(m.type=="def"){let y=p.nextSibling;if(y.type=='"'||y.type=="'"||y.type=="ERROR"&&(y.text=='"""'||y.text=="'''"))return!0}return!1}break}case"javascript":{let p=f.find(x=>x.type=="formal_parameters");if(m.type=="class"&&p)return!0;let g=f.find(x=>x.type=="{");if(g&&g.startIndex>m.endIndex&&g.nextSibling!=null||f.find(x=>x.type=="do")&&m.type=="while"||m.type=="=>"&&m.nextSibling&&m.nextSibling.type!="{")return!1;break}case"typescript":{let p=f.find(y=>y.type=="{");if(p&&p.startIndex>m.endIndex&&p.nextSibling!=null||f.find(y=>y.type=="do")&&m.type=="while"||m.type=="=>"&&m.nextSibling&&m.nextSibling.type!="{")return!1;break}}return h&&h.startIndex>m.endIndex?this.isBlockEmpty(h,n):!0}}if(c!=null){let f=this.nodeMatch[c.type],m=c.children.slice().reverse().find(h=>h.type==f);if(m)return this.isBlockEmpty(m,n);if(this.nodeTypesWithBlockOrStmtChild.has(c.type)){let h=this.nodeTypesWithBlockOrStmtChild.get(c.type),p=h==""?c.children[0]:c.childForFieldName(h);if(p&&p.type!=this.blockNodeType&&p.type!=this.emptyStatementType)return!1}return!0}return!1}finally{i.delete()}}},tht={python:new dg("python",{class_definition:"block",elif_clause:"block",else_clause:"block",except_clause:"block",finally_clause:"block",for_statement:"block",function_definition:"block",if_statement:"block",try_statement:"block",while_statement:"block",with_statement:"block"},new Map,["def","class","if","elif","else","for","while","try","except","finally","with"],"block",null,!1),javascript:new dg("javascript",{arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",method_definition:"statement_block",try_statement:"statement_block",while_statement:"statement_block",with_statement:"statement_block",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),typescript:new dg("typescript",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),tsx:new dg("typescriptreact",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),go:new LO("go","{}",/\b(func|if|else|for)\b/,{communication_case:"block",default_case:"block",expression_case:"block",for_statement:"block",func_literal:"block",function_declaration:"block",if_statement:"block",labeled_statement:"block",method_declaration:"block",type_case:"block"},new Map),ruby:new LO("ruby","end",/\b(BEGIN|END|case|class|def|do|else|elsif|for|if|module|unless|until|while)\b|->/,{begin_block:"}",block:"}",end_block:"}",lambda:"block",for:"do",until:"do",while:"do",case:"end",do:"end",if:"end",method:"end",module:"end",unless:"end",do_block:"end"},new Map),c_sharp:new dg("csharp",{},new Map([]),[],"block",null,!0),java:new dg("java",{},new Map([]),[],"block",null,!0),php:new dg("php",{},new Map([]),[],"block",null,!0),cpp:new dg("cpp",{},new Map([]),[],"block",null,!0)};function sne(e){if(!uf(e))throw new Error(`Language ${e} is not supported`);return tht[fM(e)]}s(sne,"getBlockParser");async function Z8e(e,t,r){return uf(e)?sne(e).isEmptyBlockStart(t,r):!1}s(Z8e,"isEmptyBlockStart");async function e6e(e,t,r,n){if(uf(e))return sne(e).isBlockBodyFinished(t,r,n)}s(e6e,"isBlockBodyFinished");async function t6e(e,t,r){if(uf(e))return sne(e).getNodeStart(t,r)}s(t6e,"getNodeStart");var lRr=new Gt("parseBlock");function NS(e,t,r,n){let i=t.getText(No.range(No.position(0,0),r))+(n?`
`:""),o=t.offsetAt(r)+(n?1:0),a=t.detectedLanguageId;return l=>e6e(a,i,l,o)}s(NS,"parsingBlockFinished");function MO(e,t){return Z8e(e.detectedLanguageId,e.getText(),e.offsetAt(t))}s(MO,"isEmptyBlockStartUtil");async function r6e(e,t,r,n){let o=t.getText(No.range(No.position(0,0),r))+n,a=await t6e(t.detectedLanguageId,o,t.offsetAt(r));if(a)return t.positionAt(a)}s(r6e,"getNodeStartUtil");var rht=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map(e=>e+"\\b")),nht=new RegExp(`^(${rht.join("|")})`);function iht(e){return nht.test(e.trimLeft().toLowerCase())}s(iht,"isContinuationLine");function FO(e){let t=/^(\s*)([^]*)$/.exec(e);if(t&&t[2]&&t[2].length>0)return t[1].length}s(FO,"indentationOfLine");function LS(e,t){let r=e.getText(),n=e.offsetAt(t);return ane(r,n,e.detectedLanguageId)}s(LS,"contextIndentation");function ane(e,t,r){let n=e.slice(0,t).split(`
`),i=e.slice(t).split(`
`);function o(f,m,h){let p=m,g,y;for(;g===void 0&&p>=0&&p<f.length;)g=FO(f[p]),y=p,p+=h;if(r==="python"&&h===-1){p++;let x=f[p].trim();if(x.endsWith('"""')){if(!(x.startsWith('"""')&&x!=='"""'))for(p--;p>=0&&!f[p].trim().startsWith('"""');)p--;if(p>=0)for(g=void 0,p--;g===void 0&&p>=0;)g=FO(f[p]),y=p,p--}}return[g,y]}s(o,"seekNonBlank");let[a,l]=o(n,n.length-1,-1),c=(()=>{if(!(a===void 0||l===void 0))for(let f=l-1;f>=0;f--){let m=FO(n[f]);if(m!==void 0&&m<a)return m}})(),[u]=o(i,1,1);return{prev:c,current:a??0,next:u}}s(ane,"contextIndentationFromText");var oht=!1;function sht(e,t,r){let n=e.split(`
`),i=r!==void 0,o=r?.split(`
`).pop(),a=0;if(i&&o?.trim()!=""&&n[0].trim()!==""&&a++,!i&&oht&&n[0].trim()===""&&a++,i||a++,n.length===a)return"continue";let l=Math.max(t.current,t.next??0);for(let c=a;c<n.length;c++){let u=n[c];c==0&&o!==void 0&&(u=o+u);let f=FO(u);if(f!==void 0&&(f<l||f===l&&!iht(u)))return n.slice(0,c).join(`
`).length}return"continue"}s(sht,"completionCutOrContinue");function n6e(e,t){return async r=>{let n=sht(r,e,t);return n==="continue"?void 0:n}}s(n6e,"indentationBlockFinished");d();d();d();function i6e(e,t){return{...mM,useSubsetMatching:lne(e,t)}}s(i6e,"getCppSimilarFilesOptions");function o6e(e){return mM.maxTopSnippets}s(o6e,"getCppNumberOfSnippets");var aht=new Map([["cpp",i6e]]);function QO(e,t,r){let n=aht.get(r);return n?n(e,t):{...Nee,useSubsetMatching:lne(e,t)}}s(QO,"getSimilarFilesOptions");var lht=new Map([["cpp",o6e]]);function s6e(e,t){let r=lht.get(t);return r?r(e):Mve}s(s6e,"getNumberOfSnippets");function lne(e,t){return(t.filtersAndExp.exp.variables.copilotsubsetmatching||Vn(e,Rt.UseSubsetMatching))??!1}s(lne,"useSubsetMatching");d();d();var cht=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function uht(e){return cht.has(e.code??"")||e.name==="RangeError"&&e.message==="WebAssembly.Memory(): could not allocate memory"}s(uht,"isOomError");function OO(e,t,r,n=kn){if(!kc(t)){if(t instanceof Error){let i=t;uht(i)?e.get(Ki).setWarning("Out of memory"):i.code==="EMFILE"||i.code==="ENFILE"?e.get(Ki).setWarning("Too many open files"):i.code==="CopilotPromptLoadFailure"?e.get(Ki).setWarning("Corrupted Copilot installation"):`${i.code}`.startsWith("CopilotPromptWorkerExit")?e.get(Ki).setWarning("Worker unexpectedly exited"):i.syscall==="uv_cwd"&&i.code==="ENOENT"&&e.get(Ki).setWarning("Current working directory does not exist")}n.exception(e,t,r)}}s(OO,"handleException");function a6e(e){process.addListener("uncaughtException",r=>{OO(e,r,"uncaughtException")});let t=!1;process.addListener("unhandledRejection",r=>{if(!t)try{t=!0,OO(e,r,"unhandledRejection")}finally{t=!1}})}s(a6e,"registerDefaultHandlers");d();d();var fht="content_excluded";async function l6e(e,t,r,n){let i=BO(r,"CodeSnippet");if(i.length===0)return[];let o=new Set,a=i.flatMap(f=>f.data.map(m=>(o.add(m.uri),m.additionalUris?.forEach(h=>o.add(h)),{providerId:f.providerId,data:m}))),l=e.get(Vr),c=new Map;await Promise.all(Array.from(o).map(async f=>{c.set(f,await l.getTextDocumentValidation({uri:f}))}));let u=e.get(Bl).getStatisticsForCompletion(t);return a.filter(f=>{let h=[f.data.uri,...f.data.additionalUris??[]].every(p=>c.get(p)?.status==="valid");return h?u.addExpectations(f.providerId,[[f.data,"included"]]):u.addExpectations(f.providerId,[[f.data,fht]]),h}).map(f=>f.data)}s(l6e,"getCodeSnippetsFromContextItems");function c6e(e,t){let r=e.get(Vr);return t.map(n=>({snippet:n,relativePath:r.getRelativePath(n)}))}s(c6e,"addRelativePathToCodeSnippets");d();function Dl(e){if(e.children)return Array.isArray(e.children)?e.children.join(""):e.children}s(Dl,"Text");function mg(e){if(e.children)return Array.isArray(e.children)?e.children.join(""):e.children}s(mg,"Code");function Y8(e){return e.children}s(Y8,"Chunk");d();function Wn(e,t,r){let n=[];Array.isArray(t.children)?n=t.children:t.children&&(n=[t.children]);let i={...t,children:n};return r&&(i.key=r),{type:e,props:i}}s(Wn,"functionComponentFunction");function wA(e){return{type:"f",children:e}}s(wA,"fragmentFunction");wA.isFragmentFunction=!0;var u6e=s((e,t)=>{let[r,n]=t.useState(),[i,o]=t.useState();if(t.useData(pu,u=>{u.codeSnippets!==r&&n(u.codeSnippets),u.document.uri!==i?.uri&&o(u.document)}),!r||r.length===0||!i)return;let a=c6e(e.ctx,r),l=new Map;for(let u of a){let f=u.relativePath??u.snippet.uri,m=l.get(f);m===void 0&&(m=[],l.set(f,m)),m.push(u)}let c=[];for(let[u,f]of l.entries()){let m=f.filter(h=>h.snippet.value.length>0);m.length>0&&c.push({chunkElements:m.map(h=>h.snippet),importance:Math.max(...m.map(h=>h.snippet.importance??0)),uri:u})}if(c.length!==0)return c.sort((u,f)=>f.importance-u.importance),c.reverse(),c.map(u=>{let f=[];return f.push(Wn(Dl,{expElidableTextWeight:1,children:`Compare ${u.chunkElements.length>1?"these snippets":"this snippet"} from ${u.uri}:`})),u.chunkElements.forEach((m,h)=>{f.push(Wn(mg,{source:m,expElidableTextWeight:.99,children:m.value},m.id)),u.chunkElements.length>1&&h<u.chunkElements.length-1&&f.push(Wn(Dl,{expElidableTextWeight:.5,children:"---"}))}),Wn(Y8,{children:f})})},"CodeSnippets");d();d();d();d();d();d();function h6e(e,t){let r=Object.create(null);for(let n of e){let i=t(n),o=r[i];o||(o=r[i]=[]),o.push(n)}return r}s(h6e,"groupBy");var d6e,m6e,f6e=class{constructor(t,r){this.toKey=r;this._map=new Map;this[d6e]="SetWithKey";for(let n of t)this.add(n)}static{s(this,"SetWithKey")}get size(){return this._map.size}add(t){let r=this.toKey(t);return this._map.set(r,t),this}delete(t){return this._map.delete(this.toKey(t))}has(t){return this._map.has(this.toKey(t))}*entries(){for(let t of this._map.values())yield[t,t]}keys(){return this.values()}*values(){for(let t of this._map.values())yield t}clear(){this._map.clear()}forEach(t,r){this._map.forEach(n=>t.call(r,n,n,this))}[(m6e=Symbol.iterator,d6e=Symbol.toStringTag,m6e)](){return this.values()}};d();var cne=class{static{s(this,"ErrorHandler")}constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?UO.isErrorNoTelemetry(t)?new UO(t.message+`
`+t.stack):new Error(t.message+`
`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(r=>{r(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},p6e=new cne;function Fv(e){p6e.onUnexpectedError(e)}s(Fv,"onBugIndicatingError");function K8(e){dht(e)||p6e.onUnexpectedError(e)}s(K8,"onUnexpectedError");var une="Canceled";function dht(e){return e instanceof hg?!0:e instanceof Error&&e.name===une&&e.message===une}s(dht,"isCancellationError");var hg=class extends Error{static{s(this,"CancellationError")}constructor(){super(une),this.name=this.message}};function MS(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}s(MS,"illegalArgument");function g6e(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}s(g6e,"illegalState");var UO=class e extends Error{static{s(this,"ErrorNoTelemetry")}constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let r=new e;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},vn=class e extends Error{static{s(this,"BugIndicatingError")}constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};d();function fne(e,t){let r=this,n=!1,i;return function(){if(n)return i;if(n=!0,t)try{i=e.apply(r,arguments)}finally{t()}else i=e.apply(r,arguments);return i}}s(fne,"createSingleCallFunction");d();d();d();function _A(e,t){let r=xf(e,t);return r===-1?void 0:e[r]}s(_A,"findLastMonotonous");function xf(e,t,r=0,n=e.length){let i=r,o=n;for(;i<o;){let a=Math.floor((i+o)/2);t(e[a])?i=a+1:o=a}return i-1}s(xf,"findLastIdxMonotonous");function A6e(e,t){let r=Mv(e,t);return r===e.length?void 0:e[r]}s(A6e,"findFirstMonotonous");function Mv(e,t,r=0,n=e.length){let i=r,o=n;for(;i<o;){let a=Math.floor((i+o)/2);t(e[a])?o=a:i=a+1}return i}s(Mv,"findFirstIdxMonotonousOrArrLen");var QS=class e{constructor(t){this._array=t;this._findLastMonotonousLastIdx=0}static{s(this,"MonotonousArray")}static{this.assertInvariants=!1}findLastMonotonous(t){if(e.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=xf(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};function Qv(e,t,r=(n,i)=>n===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(!r(e[n],t[n]))return!1;return!0}s(Qv,"equals");function*J8(e,t){let r,n;for(let i of e)n!==void 0&&t(n,i)?r.push(i):(r&&(yield r),r=[i]),n=i;r&&(yield r)}s(J8,"groupAdjacentBy");function C6e(e,t){for(let r=0;r<=e.length;r++)t(r===0?void 0:e[r-1],r===e.length?void 0:e[r])}s(C6e,"forEachAdjacent");function x6e(e,t){for(let r=0;r<e.length;r++)t(r===0?void 0:e[r-1],e[r],r+1===e.length?void 0:e[r+1])}s(x6e,"forEachWithNeighbors");function v6e(e){return e.filter(t=>!!t)}s(v6e,"coalesce");function b6e(e,t){for(let r of t)e.push(r)}s(b6e,"pushMany");var E6e;(l=>{function e(c){return c<0}l.isLessThan=e,s(e,"isLessThan");function t(c){return c<=0}l.isLessThanOrEqual=t,s(t,"isLessThanOrEqual");function r(c){return c>0}l.isGreaterThan=r,s(r,"isGreaterThan");function n(c){return c===0}l.isNeitherLessOrGreaterThan=n,s(n,"isNeitherLessOrGreaterThan"),l.greaterThan=1,l.lessThan=-1,l.neitherLessOrGreaterThan=0})(E6e||={});function vf(e,t){return(r,n)=>t(e(r),e(n))}s(vf,"compareBy");var bf=s((e,t)=>e-t,"numberComparator");function I6e(e){return(t,r)=>-e(t,r)}s(I6e,"reverseOrder");var qO=class{constructor(t){this.items=t;this.firstIdx=0;this.lastIdx=this.items.length-1}static{s(this,"ArrayQueue")}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(t){let r=this.firstIdx;for(;r<this.items.length&&t(this.items[r]);)r++;let n=r===this.firstIdx?null:this.items.slice(this.firstIdx,r);return this.firstIdx=r,n}takeFromEndWhile(t){let r=this.lastIdx;for(;r>=0&&t(this.items[r]);)r--;let n=r===this.lastIdx?null:this.items.slice(r+1,this.lastIdx+1);return this.lastIdx=r,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){let t=this.items[this.firstIdx];return this.firstIdx++,t}removeLast(){let t=this.items[this.lastIdx];return this.lastIdx--,t}takeCount(t){let r=this.items.slice(this.firstIdx,this.firstIdx+t);return this.firstIdx+=t,r}},y6e=class e{constructor(t){this.iterate=t}static{s(this,"CallbackIterable")}static{this.empty=new e(t=>{})}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new e(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new e(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(i=>((n||E6e.isGreaterThan(t(i,r)))&&(n=!1,r=i),!0)),r}};d();var dne;(_=>{function e(k){return k&&typeof k=="object"&&typeof k[Symbol.iterator]=="function"}_.is=e,s(e,"is");let t=Object.freeze([]);function r(){return t}_.empty=r,s(r,"empty");function*n(k){yield k}_.single=n,s(n,"single");function i(k){return e(k)?k:n(k)}_.wrap=i,s(i,"wrap");function o(k){return k||t}_.from=o,s(o,"from");function*a(k){for(let B=k.length-1;B>=0;B--)yield k[B]}_.reverse=a,s(a,"reverse");function l(k){return!k||k[Symbol.iterator]().next().done===!0}_.isEmpty=l,s(l,"isEmpty");function c(k){return k[Symbol.iterator]().next().value}_.first=c,s(c,"first");function u(k,B){let N=0;for(let M of k)if(B(M,N++))return!0;return!1}_.some=u,s(u,"some");function f(k,B){for(let N of k)if(B(N))return N}_.find=f,s(f,"find");function*m(k,B){for(let N of k)B(N)&&(yield N)}_.filter=m,s(m,"filter");function*h(k,B){let N=0;for(let M of k)yield B(M,N++)}_.map=h,s(h,"map");function*p(k,B){let N=0;for(let M of k)yield*B(M,N++)}_.flatMap=p,s(p,"flatMap");function*g(...k){for(let B of k)yield*B}_.concat=g,s(g,"concat");function y(k,B,N){let M=N;for(let Z of k)M=B(M,Z);return M}_.reduce=y,s(y,"reduce");function*x(k,B,N=k.length){for(B<-k.length&&(B=0),B<0&&(B+=k.length),N<0?N+=k.length:N>k.length&&(N=k.length);B<N;B++)yield k[B]}_.slice=x,s(x,"slice");function b(k,B=Number.POSITIVE_INFINITY){let N=[];if(B===0)return[N,k];let M=k[Symbol.iterator]();for(let Z=0;Z<B;Z++){let he=M.next();if(he.done)return[N,_.empty()];N.push(he.value)}return[N,{[Symbol.iterator](){return M}}]}_.consume=b,s(b,"consume");async function E(k){let B=[];for await(let N of k)B.push(N);return Promise.resolve(B)}_.asyncToArray=E,s(E,"asyncToArray")})(dne||={});d();var mne=class{constructor(t,r){this.uri=t;this.value=r}static{s(this,"ResourceMapEntry")}};function hht(e){return Array.isArray(e)}s(hht,"isEntries");var w6e,WO=class e{constructor(t,r){this[w6e]="ResourceMap";if(t instanceof e)this.map=new Map(t.map),this.toKey=r??e.defaultToKey;else if(hht(t)){this.map=new Map,this.toKey=r??e.defaultToKey;for(let[n,i]of t)this.set(n,i)}else this.map=new Map,this.toKey=t??e.defaultToKey}static{s(this,"ResourceMap")}static{this.defaultToKey=s(t=>t.toString(),"defaultToKey")}set(t,r){return this.map.set(this.toKey(t),new mne(t,r)),this}get(t){return this.map.get(this.toKey(t))?.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,r){typeof r<"u"&&(t=t.bind(r));for(let[n,i]of this.map)t(i.value,i.uri,this)}*values(){for(let t of this.map.values())yield t.value}*keys(){for(let t of this.map.values())yield t.uri}*entries(){for(let t of this.map.values())yield[t.uri,t.value]}*[(w6e=Symbol.toStringTag,Symbol.iterator)](){for(let[,t]of this.map)yield[t.uri,t.value]}},_6e,T6e=class{constructor(t,r){this[_6e]="ResourceSet";!t||typeof t=="function"?this._map=new WO(t):(this._map=new WO(r),t.forEach(this.add,this))}static{s(this,"ResourceSet")}get size(){return this._map.size}add(t){return this._map.set(t,t),this}clear(){this._map.clear()}delete(t){return this._map.delete(t)}forEach(t,r){this._map.forEach((n,i)=>t.call(r,i,i,this))}has(t){return this._map.has(t)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(_6e=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};var S6e,hne=class{constructor(){this[S6e]="LinkedMap";this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}static{s(this,"LinkedMap")}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,r=0){let n=this._map.get(t);if(n)return r!==0&&this.touch(n,r),n.value}set(t,r,n=0){let i=this._map.get(t);if(i)i.value=r,n!==0&&this.touch(i,n);else{switch(i={key:t,value:r,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let r=this._map.get(t);if(r)return this._map.delete(t),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,r){let n=this._state,i=this._head;for(;i;){if(r?t.bind(r)(i.value,i.key,this):t(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this,r=this._state,n=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}values(){let t=this,r=this._state,n=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}entries(){let t=this,r=this._state,n=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}[(S6e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>t;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let r=this._tail,n=this.size;for(;r&&n>t;)this._map.delete(r.key),r=r.previous,n--;this._tail=r,this._size=n,r&&(r.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let r=t.next,n=t.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}t.next=void 0,t.previous=void 0,this._state++}touch(t,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==1&&r!==2)){if(r===1){if(t===this._head)return;let n=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(r===2){if(t===this._tail)return;let n=t.next,i=t.previous;t===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((r,n)=>{t.push([n,r])}),t}fromJSON(t){this.clear();for(let[r,n]of t)this.set(r,n)}},pne=class extends hne{static{s(this,"Cache")}constructor(t,r=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,r=2){return super.get(t,r)}peek(t){return super.get(t,0)}set(t,r){return super.set(t,r,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},GO=class extends pne{static{s(this,"LRUCache")}constructor(t,r=1){super(t,r)}trim(t){this.trimOld(t)}set(t,r){return super.set(t,r),this.checkTrim(),this}};var X8=class{constructor(){this.map=new Map}static{s(this,"SetMap")}add(t,r){let n=this.map.get(t);n||(n=new Set,this.map.set(t,n)),n.add(r)}delete(t,r){let n=this.map.get(t);n&&(n.delete(r),n.size===0&&this.map.delete(t))}forEach(t,r){let n=this.map.get(t);n&&n.forEach(r)}get(t){let r=this.map.get(t);return r||new Set}};var pht=!1,Z8=null;var R6e=class e{constructor(){this.livingDisposables=new Map}static{s(this,"DisposableTracker")}static{this.idx=0}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:e.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let i=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,i),i}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,t).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let c=new Map,u=[...this.livingDisposables.values()].filter(m=>m.source!==null&&!this.getRootParent(m,c).isSingleton);if(u.length===0)return;let f=new Set(u.map(m=>m.value));if(n=u.filter(m=>!(m.parent&&f.has(m.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function i(c){function u(m,h){for(;m.length>0&&h.some(p=>typeof p=="string"?p===m[0]:m[0].match(p));)m.shift()}s(u,"removePrefix");let f=c.source.split(`
`).map(m=>m.trim().replace("at ","")).filter(m=>m!=="");return u(f,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),f.reverse()}s(i,"getStackTracePath");let o=new X8;for(let c of n){let u=i(c);for(let f=0;f<=u.length;f++)o.add(u.slice(0,f).join(`
`),c)}n.sort(vf(c=>c.idx,bf));let a="",l=0;for(let c of n.slice(0,t)){l++;let u=i(c),f=[];for(let m=0;m<u.length;m++){let h=u[m];h=`(shared with ${o.get(u.slice(0,m+1).join(`
`)).size}/${n.length} leaks) at ${h}`;let g=o.get(u.slice(0,m).join(`
`)),y=h6e([...g].map(x=>i(x)[m]),x=>x);delete y[u[m]];for(let[x,b]of Object.entries(y))f.unshift(` - stacktraces of ${b.length} other leaks continue with ${x}`);f.unshift(h)}a+=`
==================== Leaking disposable ${l}/${n.length}: ${c.value.constructor.name} ====================
${f.join(`
`)}
============================================================
`}return n.length>t&&(a+=`
... and ${n.length-t} more leaking disposables
`),{leaks:n,details:a}}};function ght(e){Z8=e}s(ght,"setDisposableTracker");if(pht){let e="__is_disposable_tracked__";ght(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==Cs.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Cs.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function e6(e){return Z8?.trackDisposable(e),e}s(e6,"trackDisposable");function t6(e){Z8?.markAsDisposed(e)}s(t6,"markAsDisposed");function gne(e,t){Z8?.setParent(e,t)}s(gne,"setParentOfDisposable");function Aht(e,t){if(Z8)for(let r of e)Z8.setParent(r,t)}s(Aht,"setParentOfDisposables");function k6e(e){return typeof e=="object"&&e!==null&&typeof e.dispose=="function"&&e.dispose.length===0}s(k6e,"isDisposable");function HO(e){if(dne.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}s(HO,"dispose");function B6e(...e){let t=_a(()=>HO(e));return Aht(e,t),t}s(B6e,"combinedDisposable");function _a(e){let t=e6({dispose:fne(()=>{t6(t),e()})});return t}s(_a,"toDisposable");var E0=class e{constructor(){this._toDispose=new Set;this._isDisposed=!1;e6(this)}static{s(this,"DisposableStore")}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(t6(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{HO(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return gne(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),gne(t,null))}},Cs=class{constructor(){this._store=new E0;e6(this),gne(this._store,this)}static{s(this,"Disposable")}static{this.None=Object.freeze({dispose(){}})}dispose(){t6(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};d();var xs=class e{static{s(this,"Node")}static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},OS=class{constructor(){this._first=xs.Undefined;this._last=xs.Undefined;this._size=0}static{s(this,"LinkedList")}get size(){return this._size}isEmpty(){return this._first===xs.Undefined}clear(){let t=this._first;for(;t!==xs.Undefined;){let r=t.next;t.prev=xs.Undefined,t.next=xs.Undefined,t=r}this._first=xs.Undefined,this._last=xs.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,r){let n=new xs(t);if(this._first===xs.Undefined)this._first=n,this._last=n;else if(r){let o=this._last;this._last=n,n.prev=o,o.next=n}else{let o=this._first;this._first=n,n.next=o,o.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==xs.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==xs.Undefined){let t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==xs.Undefined&&t.next!==xs.Undefined){let r=t.prev;r.next=t.next,t.next.prev=r}else t.prev===xs.Undefined&&t.next===xs.Undefined?(this._first=xs.Undefined,this._last=xs.Undefined):t.next===xs.Undefined?(this._last=this._last.prev,this._last.next=xs.Undefined):t.prev===xs.Undefined&&(this._first=this._first.next,this._first.prev=xs.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==xs.Undefined;)yield t.element,t=t.next}};d();var yht=globalThis.performance&&typeof globalThis.performance.now=="function",r6=class e{static{s(this,"StopWatch")}static create(t){return new e(t)}constructor(t){this._now=yht&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var D6e=!1,Cht=!1,Ov;(z=>{z.None=s(()=>Cs.None,"None");function t(j){if(Cht){let{onDidAddListener:U}=j,V=US.create(),K=0;j.onDidAddListener=()=>{++K===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),V.print()),U?.()}}}s(t,"_addLeakageTraceLogic");function r(j,U){return p(j,()=>{},0,void 0,!0,void 0,U)}z.defer=r,s(r,"defer");function n(j){return(U,V=null,K)=>{let ae=!1,re;return re=j(le=>{if(!ae)return re?re.dispose():ae=!0,U.call(V,le)},null,K),ae&&re.dispose(),re}}z.once=n,s(n,"once");function i(j,U){return z.once(z.filter(j,U))}z.onceIf=i,s(i,"onceIf");function o(j,U,V){return m((K,ae=null,re)=>j(le=>K.call(ae,U(le)),null,re),V)}z.map=o,s(o,"map");function a(j,U,V){return m((K,ae=null,re)=>j(le=>{U(le),K.call(ae,le)},null,re),V)}z.forEach=a,s(a,"forEach");function l(j,U,V){return m((K,ae=null,re)=>j(le=>U(le)&&K.call(ae,le),null,re),V)}z.filter=l,s(l,"filter");function c(j){return j}z.signal=c,s(c,"signal");function u(...j){return(U,V=null,K)=>{let ae=B6e(...j.map(re=>re(le=>U.call(V,le))));return h(ae,K)}}z.any=u,s(u,"any");function f(j,U,V,K){let ae=V;return o(j,re=>(ae=U(ae,re),ae),K)}z.reduce=f,s(f,"reduce");function m(j,U){let V,K={onWillAddFirstListener(){V=j(ae.fire,ae)},onDidRemoveLastListener(){V?.dispose()}};U||t(K);let ae=new Ef(K);return U?.add(ae),ae.event}s(m,"snapshot");function h(j,U){return U instanceof Array?U.push(j):U&&U.add(j),j}s(h,"addAndReturnDisposable");function p(j,U,V=100,K=!1,ae=!1,re,le){let ce,De,be,qe=0,Re,Xe={leakWarningThreshold:re,onWillAddFirstListener(){ce=j(at=>{qe++,De=U(De,at),K&&!be&&(ft.fire(De),De=void 0),Re=s(()=>{let lt=De;De=void 0,be=void 0,(!K||qe>1)&&ft.fire(lt),qe=0},"doFire"),typeof V=="number"?(clearTimeout(be),be=setTimeout(Re,V)):be===void 0&&(be=0,queueMicrotask(Re))})},onWillRemoveListener(){ae&&qe>0&&Re?.()},onDidRemoveLastListener(){Re=void 0,ce.dispose()}};le||t(Xe);let ft=new Ef(Xe);return le?.add(ft),ft.event}z.debounce=p,s(p,"debounce");function g(j,U=0,V){return z.debounce(j,(K,ae)=>K?(K.push(ae),K):[ae],U,void 0,!0,void 0,V)}z.accumulate=g,s(g,"accumulate");function y(j,U=(K,ae)=>K===ae,V){let K=!0,ae;return l(j,re=>{let le=K||!U(re,ae);return K=!1,ae=re,le},V)}z.latch=y,s(y,"latch");function x(j,U,V){return[z.filter(j,U,V),z.filter(j,K=>!U(K),V)]}z.split=x,s(x,"split");function b(j,U=!1,V=[],K){let ae=V.slice(),re=j(De=>{ae?ae.push(De):ce.fire(De)});K&&K.add(re);let le=s(()=>{ae?.forEach(De=>ce.fire(De)),ae=null},"flush"),ce=new Ef({onWillAddFirstListener(){re||(re=j(De=>ce.fire(De)),K&&K.add(re))},onDidAddFirstListener(){ae&&(U?setTimeout(le):le())},onDidRemoveLastListener(){re&&re.dispose(),re=null}});return K&&K.add(ce),ce.event}z.buffer=b,s(b,"buffer");function E(j,U){return s((K,ae,re)=>{let le=U(new k);return j(function(ce){let De=le.evaluate(ce);De!==_&&K.call(ae,De)},void 0,re)},"fn")}z.chain=E,s(E,"chain");let _=Symbol("HaltChainable");class k{constructor(){this.steps=[]}static{s(this,"ChainableSynthesis")}map(U){return this.steps.push(U),this}forEach(U){return this.steps.push(V=>(U(V),V)),this}filter(U){return this.steps.push(V=>U(V)?V:_),this}reduce(U,V){let K=V;return this.steps.push(ae=>(K=U(K,ae),K)),this}latch(U=(V,K)=>V===K){let V=!0,K;return this.steps.push(ae=>{let re=V||!U(ae,K);return V=!1,K=ae,re?ae:_}),this}evaluate(U){for(let V of this.steps)if(U=V(U),U===_)break;return U}}function B(j,U,V=K=>K){let K=s((...ce)=>le.fire(V(...ce)),"fn"),ae=s(()=>j.on(U,K),"onFirstListenerAdd"),re=s(()=>j.removeListener(U,K),"onLastListenerRemove"),le=new Ef({onWillAddFirstListener:ae,onDidRemoveLastListener:re});return le.event}z.fromNodeEventEmitter=B,s(B,"fromNodeEventEmitter");function N(j,U,V=K=>K){let K=s((...ce)=>le.fire(V(...ce)),"fn"),ae=s(()=>j.addEventListener(U,K),"onFirstListenerAdd"),re=s(()=>j.removeEventListener(U,K),"onLastListenerRemove"),le=new Ef({onWillAddFirstListener:ae,onDidRemoveLastListener:re});return le.event}z.fromDOMEventEmitter=N,s(N,"fromDOMEventEmitter");function M(j,U){return new Promise(V=>n(j)(V,null,U))}z.toPromise=M,s(M,"toPromise");function Z(j){let U=new Ef;return j.then(V=>{U.fire(V)},()=>{U.fire(void 0)}).finally(()=>{U.dispose()}),U.event}z.fromPromise=Z,s(Z,"fromPromise");function he(j,U){return j(V=>U.fire(V))}z.forward=he,s(he,"forward");function ee(j,U,V){return U(V),j(K=>U(K))}z.runAndSubscribe=ee,s(ee,"runAndSubscribe");class G{constructor(U,V){this._observable=U;this._counter=0;this._hasChanged=!1;let K={onWillAddFirstListener:s(()=>{U.addObserver(this),this._observable.reportChanges()},"onWillAddFirstListener"),onDidRemoveLastListener:s(()=>{U.removeObserver(this)},"onDidRemoveLastListener")};V||t(K),this.emitter=new Ef(K),V&&V.add(this.emitter)}static{s(this,"EmitterObserver")}beginUpdate(U){this._counter++}handlePossibleChange(U){}handleChange(U,V){this._hasChanged=!0}endUpdate(U){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function q(j,U){return new G(j,U).emitter.event}z.fromObservable=q,s(q,"fromObservable");function ie(j){return(U,V,K)=>{let ae=0,re=!1,le={beginUpdate(){ae++},endUpdate(){ae--,ae===0&&(j.reportChanges(),re&&(re=!1,U.call(V)))},handlePossibleChange(){},handleChange(){re=!0}};j.addObserver(le),j.reportChanges();let ce={dispose(){j.removeObserver(le)}};return K instanceof E0?K.add(ce):Array.isArray(K)&&K.push(ce),ce}}z.fromObservableLight=ie,s(ie,"fromObservableLight")})(Ov||={});var Ane=class e{constructor(t){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${t}_${e._idPool++}`,e.all.add(this)}static{s(this,"EventProfiling")}static{this.all=new Set}static{this._idPool=0}start(t){this._stopWatch=new r6,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},P6e=-1;var yne=class e{constructor(t,r,n=(e._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t;this.threshold=r;this.name=n;this._warnCountdown=0}static{s(this,"LeakageMonitor")}static{this._idPool=1}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[o,a]=this.getMostFrequentStack(),l=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(l),console.warn(o);let c=new Cne(l,o);this._errorHandler(c)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,i]of this._stacks)(!t||r<i)&&(t=[n,i],r=i);return t}},US=class e{constructor(t){this.value=t}static{s(this,"Stacktrace")}static create(){let t=new Error;return new e(t.stack??"")}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},Cne=class extends Error{static{s(this,"ListenerLeakError")}constructor(t,r){super(t),this.name="ListenerLeakError",this.stack=r}},xne=class extends Error{static{s(this,"ListenerRefusalError")}constructor(t,r){super(t),this.name="ListenerRefusalError",this.stack=r}},xht=0,n6=class{constructor(t){this.value=t;this.id=xht++}static{s(this,"UniqueContainer")}},vht=2,bht=s((e,t)=>{if(e instanceof n6)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},"forEachListener"),Ef=class{constructor(t){this._size=0;this._options=t,this._leakageMon=P6e>0||this._options?.leakWarningThreshold?new yne(t?.onListenerError??K8,this._options?.leakWarningThreshold??P6e):void 0,this._perfMon=this._options?._profName?new Ane(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}static{s(this,"Emitter")}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(D6e){let t=this._listeners;queueMicrotask(()=>{bht(t,r=>r.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(t,r,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let c=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(c);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],f=new xne(`${c}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||K8)(f),Cs.None}if(this._disposed)return Cs.None;r&&(t=t.bind(r));let i=new n6(t),o,a;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=US.create(),o=this._leakageMon.check(i.stack,this._size+1)),D6e&&(i.stack=a??US.create()),this._listeners?this._listeners instanceof n6?(this._deliveryQueue??=new vne,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let l=_a(()=>{o?.(),this._removeListener(i)});return n instanceof E0?n.add(l):Array.isArray(n)&&n.push(l),l},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let r=this._listeners,n=r.indexOf(t);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[n]=void 0;let i=this._deliveryQueue.current===this;if(this._size*vht<=r.length){let o=0;for(let a=0;a<r.length;a++)r[a]?r[o++]=r[a]:i&&o<this._deliveryQueue.end&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);r.length=o}}_deliver(t,r){if(!t)return;let n=this._options?.onListenerError||K8;if(!n){t.value(r);return}try{t.value(r)}catch(i){n(i)}}_deliverQueue(t){let r=t.current._listeners;for(;t.i<t.end;)this._deliver(r[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof n6)this._deliver(this._listeners,t);else{let r=this._deliveryQueue;r.enqueue(this,t,this._listeners.length),this._deliverQueue(r)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var vne=class{constructor(){this.i=-1;this.end=0}static{s(this,"EventDeliveryQueuePrivate")}enqueue(t,r,n){this.i=0,this.end=n,this.current=t,this.value=r}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};var N6e=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),jO;(n=>{function e(i){return i===n.None||i===n.Cancelled||i instanceof i6?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}n.isCancellationToken=e,s(e,"isCancellationToken"),n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ov.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:N6e})})(jO||={});var i6=class{constructor(){this._isCancelled=!1;this._emitter=null}static{s(this,"MutableToken")}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?N6e:(this._emitter||(this._emitter=new Ef),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},SA=class{constructor(t){this._token=void 0;this._parentListener=void 0;this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}static{s(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new i6),this._token}cancel(){this._token?this._token instanceof i6&&this._token.cancel():this._token=jO.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof i6&&this._token.dispose():this._token=jO.None}};function L6e(e){return e}s(L6e,"identity");var VO=class{constructor(t,r){this.lastCache=void 0;this.lastArgKey=void 0;typeof t=="function"?(this._fn=t,this._computeKey=L6e):(this._fn=r,this._computeKey=t.getCacheKey)}static{s(this,"LRUCachedFunction")}get(t){let r=this._computeKey(t);return this.lastArgKey!==r&&(this.lastArgKey=r,this.lastCache=this._fn(t)),this.lastCache}},RA=class{constructor(t,r){this._map=new Map;this._map2=new Map;typeof t=="function"?(this._fn=t,this._computeKey=L6e):(this._fn=r,this._computeKey=t.getCacheKey)}static{s(this,"CachedFunction")}get cachedValues(){return this._map}get(t){let r=this._computeKey(t);if(this._map2.has(r))return this._map2.get(r);let n=this._fn(t);return this._map.set(t,n),this._map2.set(r,n),n}};d();d();var pg=class{constructor(t){this.executor=t;this._didRun=!1}static{s(this,"Lazy")}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};d();function Uv(e){return e<0?0:e>4294967295?4294967295:e|0}s(Uv,"toUint32");function bne(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}s(bne,"escapeRegExpCharacters");function gg(e){return e.split(/\r\n|\r|\n/)}s(gg,"splitLines");function qS(e,t){let r=Math.min(e.length,t.length),n;for(n=0;n<r;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return r}s(qS,"commonPrefixLength");function s6(e,t){let r=Math.min(e.length,t.length),n,i=e.length-1,o=t.length-1;for(n=0;n<r;n++)if(e.charCodeAt(i-n)!==t.charCodeAt(o-n))return n;return r}s(s6,"commonSuffixLength");var Iht=/^[\t\n\r\x20-\x7E]*$/;function Ene(e){return Iht.test(e)}s(Ene,"isBasicASCII");var vBr=String.fromCharCode(65279);function O6e(e){return e.charAt(0).toUpperCase()+e.slice(1)}s(O6e,"uppercaseFirstLetter");var F6e=class e{static{s(this,"GraphemeBreakTree")}static{this._INSTANCE=null}static getInstance(){return e._INSTANCE||(e._INSTANCE=new e),e._INSTANCE}constructor(){this._data=Tht()}getGraphemeBreakType(t){if(t<32)return t===10?3:t===13?2:4;if(t<127)return 0;let r=this._data,n=r.length/3,i=1;for(;i<=n;)if(t<r[3*i])i=2*i;else if(t>r[3*i+1])i=2*i+1;else return r[3*i+2];return 0}};function Tht(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}s(Tht,"getGraphemeBreakRawData");var M6e=class e{constructor(t){this.confusableDictionary=t}static{s(this,"AmbiguousCharacters")}static{this.ambiguousCharacterData=new pg(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new VO({getCacheKey:JSON.stringify},t=>{function r(f){let m=new Map;for(let h=0;h<f.length;h+=2)m.set(f[h],f[h+1]);return m}s(r,"arrayToMap");function n(f,m){let h=new Map(f);for(let[p,g]of m)h.set(p,g);return h}s(n,"mergeMaps");function i(f,m){if(!f)return m;let h=new Map;for(let[p,g]of f)m.has(p)&&h.set(p,g);return h}s(i,"intersectMaps");let o=this.ambiguousCharacterData.value,a=t.filter(f=>!f.startsWith("_")&&f in o);a.length===0&&(a=["_default"]);let l;for(let f of a){let m=r(o[f]);l=i(l,m)}let c=r(o._common),u=n(c,l);return new e(u)})}static getInstance(t){return e.cache.get(Array.from(t))}static{this._locales=new pg(()=>Object.keys(e.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return e._locales.value}isAmbiguous(t){return this.confusableDictionary.has(t)}containsAmbiguousCharacter(t){for(let r=0;r<t.length;r++){let n=t.codePointAt(r);if(typeof n=="number"&&this.isAmbiguous(n))return!0}return!1}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},Q6e=class e{static{s(this,"InvisibleCharacters")}static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(e.getRawData())),this._data}static isInvisibleCharacter(t){return e.getData().has(t)}static containsInvisibleCharacter(t){for(let r=0;r<t.length;r++){let n=t.codePointAt(r);if(typeof n=="number"&&e.isInvisibleCharacter(n))return!0}return!1}static get codePoints(){return e.getData()}};d();d();function U6e(e,t){if(e.length===0||t.length===0)return{score:e.length+t.length};let r=Array.from({length:e.length}).map(()=>Array.from({length:t.length}).map(()=>0));for(let n=0;n<e.length;n++)r[n][0]=n;for(let n=0;n<t.length;n++)r[0][n]=n;for(let n=0;n<t.length;n++)for(let i=0;i<e.length;i++)r[i][n]=Math.min((i==0?n:r[i-1][n])+1,(n==0?i:r[i][n-1])+1,(i==0||n==0?Math.max(i,n):r[i-1][n-1])+(e[i]==t[n]?0:1));return{score:r[e.length-1][t.length-1]}}s(U6e,"findEditDistanceScore");var q6e=50;function wht(e){let t=e*4,r=e*.1;return Math.floor(t+r)}s(wht,"approximateMaxCharacters");function WS(e,t){let[r,n]=t.useState(),[i,o]=t.useState(),[a,l]=t.useState(0),[c,u]=t.useState(),[f,m]=t.useState();t.useData(pu,p=>{let g=p.document;(p.document.uri!==r?.uri||g.getText()!==r?.getText())&&n(g),p.position!==i&&o(p.position),p.suffixMatchThreshold!==c&&u(p.suffixMatchThreshold),p.maxPromptTokens!==a&&l(p.maxPromptTokens),p.tokenizer!==f&&m(p.tokenizer)});let h=wht(a);return Wn(wA,{children:[Wn(_ht,{document:r,position:i,maxCharacters:h}),Wn(Ine,{document:r,position:i,suffixMatchThreshold:c,maxCharacters:h,tokenizer:f})]})}s(WS,"CurrentFile");function _ht(e){if(e.document===void 0||e.position===void 0)return Wn(Dl,{});let t=e.document.getText({start:{line:0,character:0},end:e.position});return t.length>e.maxCharacters&&(t=t.slice(-e.maxCharacters)),Wn(mg,{children:t})}s(_ht,"BeforeCursor");function Ine(e,t){let[r,n]=t.useState("");if(e.document===void 0||e.position===void 0)return Wn(Dl,{});let i=e.document.getText({start:e.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}});i.length>e.maxCharacters&&(i=i.slice(0,e.maxCharacters));let o=i.replace(/^.*/,"").trimStart();if(o==="")return Wn(Dl,{});if(r===o)return Wn(mg,{children:r});let a=o;if(r!==""){let l=Do(e.tokenizer),c=l.takeFirstTokens(o,q6e);c.tokens.length>0&&100*U6e(c.tokens,l.takeFirstTokens(r,q6e).tokens)?.score<(e.suffixMatchThreshold??hM)*c.tokens.length&&(a=r)}return a!==r&&n(a),Wn(mg,{children:a})}s(Ine,"AfterCursor");d();var $O=class{static{s(this,"WishlistElision")}elide(t,r,n,i,o){if(r<=0)throw new Error("Prefix limit must be greater than 0");let[a,l]=this.preparePrefixBlocks(t,o),{elidedSuffix:c,adjustedPrefixTokenLimit:u}=this.elideSuffix(n,i,r,l,o),f=this.elidePrefix(a,u,l,o);return{blocks:[c,...f],cycles:1}}preparePrefixBlocks(t,r){let n=0,i=new Set;return[t.map((a,l)=>{let c=0,f=a.value.split(/([^\n]*\n+)/).filter(h=>h!=="").map(h=>{let p=r.tokenLength(h);return c+=p,n+=p,{line:h,componentPath:a.componentPath,tokens:p}}),m=a.componentPath;if(i.has(m))throw new Error(`Duplicate component path in prefix blocks: ${m}`);return i.add(m),{...a,tokens:c,markedForRemoval:!1,originalIndex:l,lines:f}}),n]}elideSuffix(t,r,n,i,o){let a=t.value;if(a.length===0||r<=0)return{elidedSuffix:{...t,tokens:0,elidedValue:"",elidedTokens:0},adjustedPrefixTokenLimit:n+Math.max(0,r)};i<n&&(r=r+(n-i),n=i);let l=o.takeFirstTokens(a,r);return{elidedSuffix:{...t,value:a,tokens:o.tokenLength(a),elidedValue:l.text,elidedTokens:l.tokens.length},adjustedPrefixTokenLimit:n+Math.max(0,r-l.tokens.length)}}elidePrefix(t,r,n,i){let o=this.removeLowWeightPrefixBlocks(t,r,n),a=o.filter(f=>!f.markedForRemoval).flatMap(f=>f.lines);if(a.length===0)return[];let[l,c]=this.trimPrefixLinesToFit(a,r,i),u=c;return o.map(f=>{if(f.markedForRemoval)return u+f.tokens<=r&&!f.chunks?(u+=f.tokens,{...f,elidedValue:f.value,elidedTokens:f.tokens}):{...f,elidedValue:"",elidedTokens:0};let m=l.filter(p=>p.componentPath===f.componentPath&&p.line!=="").map(p=>p.line).join(""),h=f.tokens;return m!==f.value&&(h=m!==""?i.tokenLength(m):0),{...f,elidedValue:m,elidedTokens:h}})}removeLowWeightPrefixBlocks(t,r,n){let i=n;t.sort((o,a)=>o.weight-a.weight);for(let o of t){if(i<=r)break;if(o.weight!==1&&!(o.chunks&&o.markedForRemoval))if(o.chunks&&o.chunks.size>0)for(let a of t)!a.markedForRemoval&&a.chunks&&[...o.chunks].every(l=>a.chunks?.has(l))&&(a.markedForRemoval=!0,i-=a.tokens);else o.markedForRemoval=!0,i-=o.tokens}return t.sort((o,a)=>o.originalIndex-a.originalIndex)}trimPrefixLinesToFit(t,r,n){let i=0,o=[];for(let a=t.length-1;a>=0;a--){let l=t[a],c=l.tokens;if(i+c<=r)o.unshift(l),i+=c;else break}if(o.length===0){let a=t[t.length-1];if(a&&a.line.length>0){let c=n.takeLastTokens(a.line,r);return o.push({line:c.text,componentPath:a.componentPath,tokens:c.tokens.length}),[o,c.tokens.length]}let l=`Cannot fit prefix within limit of ${r} tokens`;throw new Error(l)}return[o,i]}};function Tne(e){return e.map(t=>t.elidedValue).join("")}s(Tne,"makePrompt");function G6e(e){return e.filter(t=>t.type==="prefix").map(t=>t.elidedValue).join("")}s(G6e,"makePrefixPrompt");function H6e(e){return e.filter(t=>t.type==="context").map(t=>t.elidedValue).join("").trim()}s(H6e,"makeContextPrompt");var zO=class{constructor(t="[...]",r=`
`,n=!1,i=60){this.ellipsis=t;this.delimiter=r;this.turnOffChunks=n;this.aroundCursorLines=i}static{s(this,"ElidableTextElision")}elide(t,r,n,i,o){let a=this.aroundCursorLines,l;if(n.value.length===0||i<=o.tokenLength(this.ellipsis))l=[],r=r+Math.max(0,i);else{let p=Math.floor(this.aroundCursorLines/2),y=W6e([n],o,p).elide(i,this.ellipsis,!0,"removeLeastDesirable",o,"bottomToTop");a-=Math.min(p,y.getLines().map(x=>x.value===1).length),r=r+Math.max(0,i-o.tokenLength(y.getText())),l=y.getLines()}let u=W6e(t.map(p=>this.turnOffChunks?{...p,chunks:void 0}:p),o,0,a).elide(r),f=r-o.tokenLength(u.getText()),m=[...u.getLines(),...l],h=[n,...t];return{cycles:1,blocks:h.map((p,g)=>{let y=m.filter(x=>x.metadata?.get("componentPath")===p.componentPath);if(y.length===0)return{...p,tokens:o.tokenLength(p.value),elidedValue:"",elidedTokens:0};{let x=y.map(b=>b.text).join(this.delimiter);return g===h.length-1&&f>0&&x.trim()===this.ellipsis?x=this.ellipsis+this.delimiter+o.takeLastTokens(p.value,f-o.tokenLength(this.ellipsis+this.delimiter)).text:g!==0&&g!==h.length-1&&(x=x.endsWith(this.delimiter)?x:x+this.delimiter),{...p,tokens:o.tokenLength(p.value),elidedValue:x,elidedTokens:o.tokenLength(x)}}})}}},j6e=(r=>(r.componentPath="componentPath",r[r.chunk=BM]="chunk",r))(j6e||{});function W6e(e,t,r=0,n=0){let i=new zt(e.map(o=>{let a=new Map([["componentPath",o.componentPath],[j6e.chunk,o.chunks]]);return o.isCode?new zt([[y0(o.value,!0,!0,a,t),o.expElidableTextWeight]]):new zt([[o.value,o.expElidableTextWeight]],a,t)}));return r>0&&i.lines.forEach((o,a)=>{a+1<=r&&o.setValue(1)}),n>0&&i.lines.forEach((o,a)=>{a+1>=i.lines.length-n&&o.setValue(1)}),i}s(W6e,"prepareWeightedBlocks");var YO=class{constructor(t,r="o200k_base",n){this.delegate=t;this.approximateTokenizer=new GF(r,n)}static{s(this,"ApproximateElision")}elide(t,r,n,i,o){let{blocks:[a,...l]}=this.delegate.elide(t,r,n,i,this.approximateTokenizer),c=Tne(l);if(o.tokenLength(c+a.elidedValue)>r+i){let{blocks:f}=this.delegate.elide(t,r,n,i,o);return{blocks:f,cycles:2}}else return{blocks:[a,...l],cycles:1}}};d();var KO=class{constructor(t,r=wne()){this.snapshot=t;this.transformers=r}static{s(this,"SnapshotWalker")}walkSnapshot(t){this.walkSnapshotNode(this.snapshot,void 0,t,{})}walkSnapshotNode(t,r,n,i){let o=this.transformers.reduce((l,c)=>c(t,r,l),{...i});if(n(t,r,o))for(let l of t.children??[])this.walkSnapshotNode(l,t,n,o)}};function wne(){return[(e,t,r)=>{r.weight===void 0&&(r.weight=1);let n=e.props?.weight??1,i=typeof n=="number"?Math.max(0,Math.min(1,n)):1;return{...r,weight:i*r.weight}},(e,t,r)=>{r.expElidableTextWeight===void 0&&(r.expElidableTextWeight=1);let n=e.props?.expElidableTextWeight??1,i=typeof n=="number"?Math.max(0,Math.min(1,n)):1;return{...r,expElidableTextWeight:i*r.expElidableTextWeight}},(e,t,r)=>{if(e.name===Y8.name){let n=r.chunks?new Set(r.chunks):new Set;return n.add(e.path),{...r,chunks:n}}return r},(e,t,r)=>e.props?.source!==void 0?{...r,source:e.props.source}:r,(e,t,r)=>e.name===mg.name?{...r,isCode:!0}:r]}s(wne,"defaultTransformers");d();var GS={abap:{lineComment:{start:'"',end:""},markdownLanguageIds:["abap","sap-abap"]},aspdotnet:{lineComment:{start:"<%--",end:"--%>"}},bat:{lineComment:{start:"REM",end:""}},bibtex:{lineComment:{start:"%",end:""},markdownLanguageIds:["bibtex"]},blade:{lineComment:{start:"#",end:""}},BluespecSystemVerilog:{lineComment:{start:"//",end:""}},c:{lineComment:{start:"//",end:""},markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";",end:""},markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["coffeescript","coffee","cson","iced"]},cpp:{lineComment:{start:"//",end:""},markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"]},csharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["csharp","cs"]},css:{lineComment:{start:"/*",end:"*/"}},cuda:{lineComment:{start:"//",end:""}},dart:{lineComment:{start:"//",end:""}},dockerfile:{lineComment:{start:"#",end:""},markdownLanguageIds:["dockerfile","docker"]},dotenv:{lineComment:{start:"#",end:""}},elixir:{lineComment:{start:"#",end:""}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%",end:""},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"]},go:{lineComment:{start:"//",end:""},markdownLanguageIds:["go","golang"]},graphql:{lineComment:{start:"#",end:""}},groovy:{lineComment:{start:"//",end:""}},haml:{lineComment:{start:"-#",end:""}},handlebars:{lineComment:{start:"{{!",end:"}}"},markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"]},haskell:{lineComment:{start:"--",end:""},markdownLanguageIds:["haskell","hs"]},hlsl:{lineComment:{start:"//",end:""}},html:{lineComment:{start:"<!--",end:"-->"},markdownLanguageIds:["html","xhtml"]},ini:{lineComment:{start:";",end:""}},java:{lineComment:{start:"//",end:""},markdownLanguageIds:["java","jsp"]},javascript:{lineComment:{start:"//",end:""},markdownLanguageIds:["javascript","js"]},javascriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},jsonc:{lineComment:{start:"//",end:""}},jsx:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#",end:""},markdownLanguageIds:["julia","jl"]},kotlin:{lineComment:{start:"//",end:""},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%",end:""},markdownLanguageIds:["tex"]},legend:{lineComment:{start:"//",end:""}},less:{lineComment:{start:"//",end:""}},lua:{lineComment:{start:"--",end:""},markdownLanguageIds:["lua","pluto"]},makefile:{lineComment:{start:"#",end:""},markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:"[]: #",end:""},markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec","mm","objc","obj-c"]},"objective-cpp":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#",end:""},markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//",end:""}},powershell:{lineComment:{start:"#",end:""},markdownLanguageIds:["powershell","ps","ps1"]},pug:{lineComment:{start:"//",end:""}},python:{lineComment:{start:"#",end:""},markdownLanguageIds:["python","py","gyp"]},ql:{lineComment:{start:"//",end:""}},r:{lineComment:{start:"#",end:""}},razor:{lineComment:{start:"<!--",end:"-->"},markdownLanguageIds:["cshtml","razor","razor-cshtml"]},ruby:{lineComment:{start:"#",end:""},markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"]},rust:{lineComment:{start:"//",end:""},markdownLanguageIds:["rust","rs"]},sass:{lineComment:{start:"//",end:""}},scala:{lineComment:{start:"//",end:""}},scss:{lineComment:{start:"//",end:""}},shellscript:{lineComment:{start:"#",end:""},markdownLanguageIds:["bash","sh","zsh"]},slang:{lineComment:{start:"//",end:""}},slim:{lineComment:{start:"/",end:""}},solidity:{lineComment:{start:"//",end:""},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--",end:""}},stylus:{lineComment:{start:"//",end:""}},svelte:{lineComment:{start:"<!--",end:"-->"}},swift:{lineComment:{start:"//",end:""}},systemverilog:{lineComment:{start:"//",end:""}},terraform:{lineComment:{start:"#",end:""}},tex:{lineComment:{start:"%",end:""}},typescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["typescript","ts"]},typescriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["tsx"]},vb:{lineComment:{start:"'",end:""},markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//",end:""}},"vue-html":{lineComment:{start:"<!--",end:"-->"}},vue:{lineComment:{start:"//",end:""}},xml:{lineComment:{start:"<!--",end:"-->"}},xsl:{lineComment:{start:"<!--",end:"-->"}},yaml:{lineComment:{start:"#",end:""},markdownLanguageIds:["yaml","yml"]}},_ne={};for(let[e,t]of Object.entries(GS))if(t.markdownLanguageIds)for(let r of t.markdownLanguageIds)_ne[r]=e;else _ne[e]=e;function $6e(e){return _ne[e]}s($6e,"mdCodeBlockLangToLanguageId");var Sht={start:"//",end:""},Rht=["php","plaintext"],Sne={html:"<!DOCTYPE html>",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function z6e(e){return Object.values(Sne).includes(e.trim())}s(z6e,"isShebangLine");function kht({source:e}){return e.startsWith("#!")||e.startsWith("<!DOCTYPE")}s(kht,"hasLanguageMarker");function Bht(e,t){let r=GS[t]?GS[t].lineComment:Sht;if(r){let n=r.end==""?"":" "+r.end;return`${r.start} ${e}${n}`}return""}s(Bht,"comment");function JO(e,t){if(e==="")return"";let r=e.endsWith(`
`),i=(r?e.slice(0,-1):e).split(`
`).map(o=>Bht(o,t)).join(`
`);return r?i+`
`:i}s(JO,"commentBlockAsSingles");function Y6e(e){let{languageId:t}=e;return Rht.indexOf(t)===-1&&!kht(e)?t in Sne?Sne[t]:`Language: ${t}`:""}s(Y6e,"getLanguageMarker");function K6e(e){return e.relativePath?`Path: ${e.relativePath}`:""}s(K6e,"getPathMarker");function HS(e){return e===""||e.endsWith(`
`)?e:e+`
`}s(HS,"newLineEnded");function J6e(e){return V6e(typeof e=="string"?e:"plaintext")}s(J6e,"getLanguage");function V6e(e){return GS[e]!==void 0?{languageId:e,...GS[e]}:{languageId:e,lineComment:{start:"//",end:""}}}s(V6e,"_getLanguage");var Dht=5;function Rne(e){return e.children}s(Rne,"CompletionsContext");var XO=class{constructor(){this.renderId=0}static{s(this,"CompletionsPromptRenderer")}render(t,r,n){let i=this.renderId++,o=performance.now();try{if(n?.isCancellationRequested)return{status:"cancelled"};let a=r.delimiter??"",l=r.tokenizer??"o200k_base",{prefixBlocks:c,suffixBlock:u,componentStatistics:f}=this.processSnapshot(t,a,r.languageId,r.separateContext),{prefixTokenLimit:m,suffixTokenLimit:h}=this.getPromptLimits(u,r),p=performance.now(),[g,y]=Lht(r),{blocks:[x,...b],cycles:E}=g.elide(c,m,u,h,Do(l)),_=performance.now(),k=r.separateContext?G6e(b):Tne(b),B=r.separateContext?H6e(b):void 0,N=x.elidedValue,M=b.reduce((he,ee)=>he+ee.elidedTokens,0),Z=M+x.elidedTokens;return f.push(...Nht([...b,x])),{prefix:k,prefixTokens:M,suffix:N,suffixTokens:x.elidedTokens,context:B,tokens:Z,status:"ok",metadata:{renderId:i,rendererName:"completions",tokenizer:l,elisionStrategy:y,elisionCycles:E,actualTokens:Z,elisionTimeMs:_-p,renderTimeMs:performance.now()-o,componentStatistics:f,updateDataTimeMs:f.reduce((he,ee)=>he+(ee.updateDataTimeMs??0),0),status:"ok"}}}catch(a){return{status:"error",error:a}}}getPromptLimits(t,r){let n=t?.value??"",i=r.promptTokenLimit,o=r.suffixPercent;if(n.length==0||o==0)return{prefixTokenLimit:i,suffixTokenLimit:0};i=n.length>0?i-Dht:i;let a=Math.ceil(i*(o/100));return{prefixTokenLimit:i-a,suffixTokenLimit:a}}processSnapshot(t,r,n,i){let o=[],a=[],l=[],c=!1,u=!1;if(new KO(t,Pht).walkSnapshot((h,p,g)=>{if(h===t||(h.name===WS.name?c=!0:h.name===Ine.name&&(u=!0),h.statistics.updateDataTimeMs&&h.statistics.updateDataTimeMs>0&&l.push({componentPath:h.path,updateDataTimeMs:h.statistics.updateDataTimeMs}),h.value===void 0||h.value===""))return!0;let y=g.chunks,x=g.isCode;if(u)a.push({value:X6e(h.value),type:"suffix",weight:g.weight,expElidableTextWeight:g.expElidableTextWeight,componentPath:h.path,nodeStatistics:h.statistics,chunks:y,source:g.source,isCode:x});else{let b=h.value.endsWith(r)?h.value:h.value+r,E=g.isInCompletionsContext?this.contextValue(b,i,n):h.value;o.push({type:g.isInCompletionsContext?"context":"prefix",value:X6e(E),weight:g.weight,expElidableTextWeight:g.expElidableTextWeight,componentPath:h.path,nodeStatistics:h.statistics,chunks:y,source:g.source,isCode:x})}return!0}),!c)throw new Error(`Node of type ${WS.name} not found`);if(a.length>1)throw new Error("Only one suffix is allowed");let m=a.length===1?a[0]:{componentPath:"",value:"",weight:1,expElidableTextWeight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:m,componentStatistics:l}}contextValue(t,r,n){return r||z6e(t)?t:JO(t,n)}},Pht=[...wne(),(e,t,r)=>e.name===Rne.name?{...r,isInCompletionsContext:!0}:r];function Nht(e){return e.map(t=>{let r={componentPath:t.componentPath};return t.tokens!==0&&(r.expectedTokens=t.tokens,r.actualTokens=t.elidedTokens),t.nodeStatistics.updateDataTimeMs!==void 0&&(r.updateDataTimeMs=t.nodeStatistics.updateDataTimeMs),t.source&&(r.source=t.source),r})}s(Nht,"computeComponentStatistics");function X6e(e){return e.replace(/\r\n?/g,`
`)}s(X6e,"normalizeLineEndings");function Lht(e){let t=e.elisionStrategy,r=e.elisionStrategy==="wishlist"?new $O:new zO(e.ellipsis,e.delimiter,e.elisionStrategy==="elidableTextWithoutChunks",e.aroundCursorLines);return e.approximateElision?[new YO(r,e.tokenizer,e.languageId),"approximate"+O6e(t)]:[r,t]}s(Lht,"chooseElisionStrategy");d();var Z6e=s((e,t)=>{let[r,n]=t.useState();if(t.useData(pu,i=>{n(i.telemetryData)}),r&&e.by(e.ctx,r))return e.children},"Gated");d();var e9e=s((e,t)=>{let[r,n]=t.useState();if(t.useData(pu,i=>{i.document.uri!==r?.uri&&n(i.document)}),r){let i=e.ctx.get(Vr),o=i.getRelativePath(r),a={uri:r.uri,source:r.getText(),relativePath:o,languageId:r.detectedLanguageId},l=i.findNotebook(r);return a.relativePath&&!l?Wn(Fht,{docInfo:a}):Wn(Mht,{docInfo:a})}},"DocumentMarker"),Fht=s(e=>Wn(Dl,{children:K6e(e.docInfo)}),"PathMarker"),Mht=s(e=>Wn(Dl,{children:Y6e(e.docInfo)}),"LanguageMarker");d();d();d();var r9e={maxFiles:5,maxEditsPerFile:5,diffContextLines:3,editMergeLineDistance:3};function n9e(e,t){return Object.values(e).flatMap(r=>r.edits).sort((r,n)=>r.timestamp-n.timestamp).slice(t===void 0?0:-t)}s(n9e,"getAllRecentEditsByTimestamp");function i9e(e,t){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r++;let n=e.length-1,i=t.length-1;for(;n>=r&&i>=r&&e[n]===t[i];)n--,i--;return r>n&&r>i?null:{start:r,endPrev:n,endNew:i}}s(i9e,"findChangeSpan");function Qht(e,t,r,n,i,o,a){let l=Math.max(0,n-a),c=Math.min(r.length,o+a+1);return{file:e,pre:l,post:c,before:t.slice(l,n),removed:t.slice(n,i+1),added:r.slice(n,o+1),after:r.slice(o+1,c)}}s(Qht,"getDiff");function o9e(e,t=!1,r=!1,n=!1){let i=[];i.push(`--- a/${e.file}`),i.push(`+++ b/${e.file}`);let o=e.before.length+e.removed.length+e.after.length,a=e.before.length+e.added.length+e.after.length;i.push(`@@ -${e.pre+1},${o} +${e.pre+1},${a} @@`);for(let l of e.before)i.push(" "+l);if(r)for(let l of e.added)i.push("+"+l);if(!t){let l=n?" --- IGNORE ---":"";for(let c of e.removed)i.push("-"+c+l)}if(!r)for(let l of e.added)i.push("+"+l);for(let l of e.after)i.push(" "+l);return i.join(`
`)+`
`}s(o9e,"unifiedDiff");function s9e(e,t=!1){let{before:r,removed:n,added:i,after:o}=e,a=[];return a.push(">>>>>>> SEARCH"),a.push(...r),t?a.push("..."):a.push(...n),a.push(...o),a.push("======="),a.push(...r),a.push(...i),a.push(...o),a.push("<<<<<<<<< REPLACE"),a.join(`
`)}s(s9e,"aidersDiff");function a9e(e,t=!1){let{before:r,removed:n,added:i,after:o}=e,a=t?["..."]:n.map(f=>`${f} --- DO NOT REPLY WITH CODE FROM THIS LINE ---`),l=[...r,...a,...o],c=[...r,...i,...o],u=[];return u.push("--- User edited code: ---"),u.push(...l),a.length===0?u.push(`--- and added ${i.length} line${i.length===1?"":"s"} to make: ---`):i.length===0?u.push(`--- and deleted ${a.length} line${a.length===1?"":"s"} to make: ---`):u.push("--- and replaced it with: ---"),u.push(...c),u.push("--- End of edit ---"),u.join(`
`)}s(a9e,"findReplaceDiff");function t9e(e,t){for(let r of t){let n=e.slice(0,r.startLine),i=e.slice(r.endLine+1),o=r.diff.added?r.diff.added:[];e=[...n,...o,...i]}return e}s(t9e,"applyEditsToLines");function Oht(e,t,r){let{added:n}=t.diff,i=t.startLine,o=t.startLine+n.length,a=e.startLine,l=e.endLine+1;return a<=o+r&&l>=i-r}s(Oht,"editsOverlap");function Uht(e,t,r,n,i=r9e){let o=[...t];if(o.length>0){let a=o[o.length-1];if(Oht(r,a,i.editMergeLineDistance)){let c=t9e(e.split(`
`),o.slice(0,-1)),u=i9e(c,n);u&&(r=l9e(r.file,c,n,u,i),o=[...o.slice(0,-1),r])}else o.push(r)}else o.push(r);if(o.length>i.maxEditsPerFile){let a=o.slice(0,o.length-i.maxEditsPerFile);o=o.slice(o.length-i.maxEditsPerFile,o.length),e=t9e(e.split(`
`),a).join(`
`)}return{originalContent:e,edits:o}}s(Uht,"updateEdits");function l9e(e,t,r,n,i){let{start:o,endPrev:a,endNew:l}=n;if(!i||typeof i.diffContextLines!="number")throw new Error("Invalid configuration passed to buildIncomingEdit");let c=Qht(e,t,r,o,a,l,i.diffContextLines);return{file:e,startLine:o,endLine:a,diff:c,timestamp:performance.now()}}s(l9e,"buildIncomingEdit");function qht(e,t){let r={...e},n=Object.entries(e).filter(([o])=>e[o].edits.length).sort(([o,a],[l,c])=>a.edits[a.edits.length-1].timestamp-c.edits[c.edits.length-1].timestamp),i=Math.max(0,n.length-t);if(i)for(let o=0;o<i;o++){let a=n[o][0];delete r[a]}return r}s(qht,"trimOldFilesFromState");function c9e(e={},t,r,n={}){if(r.length>2*1024*1024)return e;let i={...r9e,...n},o=e[t];if(!o)return{...e,[t]:{originalContent:r,currentContent:r,edits:[]}};if(o.currentContent===r)return e;let a=o.currentContent.split(`
`),l=r.split(`
`),c=i9e(a,l);if(!c)return{...e,[t]:{...o,currentContent:r}};let u=l9e(t,a,l,c,i),{originalContent:f,edits:m}=Uht(o.originalContent,o.edits,u,l,i),h={...e,[t]:{originalContent:f,currentContent:r,edits:m}};return qht(h,i.maxFiles)}s(c9e,"recentEditsReducer");d();d();d();d();d();d();function jS(e,t="Unreachable"){throw new Error(t)}s(jS,"assertNever");function Pl(e,t="unexpected state"){if(!e)throw new vn(`Assertion Failed: ${t}`)}s(Pl,"assert");function I0(e){if(!e()){debugger;e(),K8(new vn("Assertion Failed"))}}s(I0,"assertFn");function eC(e,t){let r=0;for(;r<e.length-1;){let n=e[r],i=e[r+1];if(!t(n,i))return!1;r++}return!0}s(eC,"checkAdjacentItems");d();var kA=s((e,t)=>e===t,"strictEquals");d();var T0=class{constructor(t,r,n){this.owner=t;this.debugNameSource=r;this.referenceFn=n}static{s(this,"DebugNameData")}getDebugName(t){return m9e(t,this)}},u9e=new Map,kne=new WeakMap;function m9e(e,t){let r=kne.get(e);if(r)return r;let n=Wht(e,t);if(n){let i=u9e.get(n)??0;i++,u9e.set(n,i);let o=i===1?n:`${n}#${i}`;return kne.set(e,o),o}}s(m9e,"getDebugName");function Wht(e,t){let r=kne.get(e);if(r)return r;let n=t.owner?Hht(t.owner)+".":"",i,o=t.debugNameSource;if(o!==void 0)if(typeof o=="function"){if(i=o(),i!==void 0)return n+i}else return n+o;let a=t.referenceFn;if(a!==void 0&&(i=ZO(a),i!==void 0))return n+i;if(t.owner!==void 0){let l=Ght(t.owner,e);if(l!==void 0)return n+l}}s(Wht,"computeDebugName");function Ght(e,t){for(let r in e)if(e[r]===t)return r}s(Ght,"findKey");var f9e=new Map,d9e=new WeakMap;function Hht(e){let t=d9e.get(e);if(t)return t;let r=jht(e),n=f9e.get(r)??0;n++,f9e.set(r,n);let i=n===1?r:`${r}#${n}`;return d9e.set(e,i),i}s(Hht,"formatOwner");function jht(e){let t=e.constructor;return t?t.name:"Object"}s(jht,"getClassName");function ZO(e){let t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t);return(n?n[1]:void 0)?.trim()}s(ZO,"getFunctionName");d();var qv;function tU(e){qv?qv instanceof eU?qv.loggers.push(e):qv=new eU([qv,e]):qv=e}s(tU,"addLogger");function Qs(){return qv}s(Qs,"getLogger");var Bne;function h9e(e){Bne=e}s(h9e,"setLogObservableFn");function p9e(e){Bne&&Bne(e)}s(p9e,"logObservable");var eU=class{constructor(t){this.loggers=t}static{s(this,"ComposedLogger")}handleObservableCreated(t){for(let r of this.loggers)r.handleObservableCreated(t)}handleOnListenerCountChanged(t,r){for(let n of this.loggers)n.handleOnListenerCountChanged(t,r)}handleObservableUpdated(t,r){for(let n of this.loggers)n.handleObservableUpdated(t,r)}handleAutorunCreated(t){for(let r of this.loggers)r.handleAutorunCreated(t)}handleAutorunDisposed(t){for(let r of this.loggers)r.handleAutorunDisposed(t)}handleAutorunDependencyChanged(t,r,n){for(let i of this.loggers)i.handleAutorunDependencyChanged(t,r,n)}handleAutorunStarted(t){for(let r of this.loggers)r.handleAutorunStarted(t)}handleAutorunFinished(t){for(let r of this.loggers)r.handleAutorunFinished(t)}handleDerivedDependencyChanged(t,r,n){for(let i of this.loggers)i.handleDerivedDependencyChanged(t,r,n)}handleDerivedCleared(t){for(let r of this.loggers)r.handleDerivedCleared(t)}handleBeginTransaction(t){for(let r of this.loggers)r.handleBeginTransaction(t)}handleEndTransaction(t){for(let r of this.loggers)r.handleEndTransaction(t)}};var g9e;function A9e(e){g9e=e}s(A9e,"_setRecomputeInitiallyAndOnChange");var y9e;function C9e(e){y9e=e}s(C9e,"_setKeepObserved");var Dne;function x9e(e){Dne=e}s(x9e,"_setDerivedOpts");var rU=class{static{s(this,"ConvenientObservable")}get TChange(){return null}reportChanges(){this.get()}read(t){return t?t.readObservable(this):this.get()}map(t,r){let n=r===void 0?void 0:t,i=r===void 0?t:r;return Dne({owner:n,debugName:s(()=>{let o=ZO(i);if(o!==void 0)return o;let l=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());if(l)return`${this.debugName}.${l[2]}`;if(!n)return`${this.debugName} (mapped)`},"debugName"),debugReferenceFn:i},o=>i(this.read(o),o))}flatten(){return Dne({owner:void 0,debugName:s(()=>`${this.debugName} (flattened)`,"debugName")},t=>this.read(t).read(t))}recomputeInitiallyAndOnChange(t,r){return t.add(g9e(this,r)),this}keepObserved(t){return t.add(y9e(this)),this}get debugValue(){return this.get()}},tC=class extends rU{constructor(){super();this.observers=new Set;Qs()?.handleObservableCreated(this)}static{s(this,"BaseObservable")}addObserver(r){let n=this.observers.size;this.observers.add(r),n===0&&this.onFirstObserverAdded(),n!==this.observers.size&&Qs()?.handleOnListenerCountChanged(this,this.observers.size)}removeObserver(r){let n=this.observers.delete(r);n&&this.observers.size===0&&this.onLastObserverRemoved(),n&&Qs()?.handleOnListenerCountChanged(this,this.observers.size)}onFirstObserverAdded(){}onLastObserverRemoved(){}log(){let r=!!Qs();return p9e(this),r||Qs()?.handleObservableCreated(this),this}};function iU(e,t){let r=new a6(e,t);try{e(r)}finally{r.finish()}}s(iU,"transaction");function Pne(e,t,r){e?t(e):iU(t,r)}s(Pne,"subtransaction");var a6=class{constructor(t,r){this._fn=t;this._getDebugName=r;this.updatingObservers=[];Qs()?.handleBeginTransaction(this)}static{s(this,"TransactionImpl")}getDebugName(){return this._getDebugName?this._getDebugName():ZO(this._fn)}updateObserver(t,r){this.updatingObservers.push({observer:t,observable:r}),t.beginUpdate(r)}finish(){let t=this.updatingObservers;for(let r=0;r<t.length;r++){let{observer:n,observable:i}=t[r];n.endUpdate(i)}this.updatingObservers=null,Qs()?.handleEndTransaction(this)}};function Ih(e,t){let r;return typeof e=="string"?r=new T0(void 0,e,void 0):r=new T0(e,void 0,void 0),new nU(r,t,kA)}s(Ih,"observableValue");var nU=class extends tC{constructor(r,n,i){super();this._debugNameData=r;this._equalityComparator=i;this._value=n,Qs()?.handleObservableUpdated(this,{hadValue:!1,newValue:n,change:void 0,didChange:!0,oldValue:void 0})}static{s(this,"ObservableValue")}get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}get(){return this._value}set(r,n,i){if(i===void 0&&this._equalityComparator(this._value,r))return;let o;n||(n=o=new a6(()=>{},()=>`Setting ${this.debugName}`));try{let a=this._value;this._setValue(r),Qs()?.handleObservableUpdated(this,{oldValue:a,newValue:r,change:i,didChange:!0,hadValue:!0});for(let l of this.observers)n.updateObserver(l,this),l.handleChange(this,i)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(r){this._value=r}};d();d();function Wv(e){return new l6(new T0(void 0,void 0,e),e,void 0,void 0)}s(Wv,"autorun");function Nne(e,t){return new l6(new T0(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,void 0)}s(Nne,"autorunOpts");function oU(e,t){return new l6(new T0(e.owner,e.debugName,e.debugReferenceFn??t),t,e.createEmptyChangeSummary,e.handleChange)}s(oU,"autorunHandleChanges");function Lne(e,t){let r=new E0,n=oU({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,createEmptyChangeSummary:e.createEmptyChangeSummary,handleChange:e.handleChange},(i,o)=>{r.clear(),t(i,o,r)});return _a(()=>{n.dispose(),r.dispose()})}s(Lne,"autorunWithStoreHandleChanges");function Fne(e){let t=new E0,r=Nne({owner:void 0,debugName:void 0,debugReferenceFn:e},n=>{t.clear(),e(n,t)});return _a(()=>{r.dispose(),t.dispose()})}s(Fne,"autorunWithStore");var l6=class{constructor(t,r,n,i){this._debugNameData=t;this._runFn=r;this.createChangeSummary=n;this._handleChange=i;this.state=2;this.updateCount=0;this.disposed=!1;this.dependencies=new Set;this.dependenciesToBeRemoved=new Set;this._isRunning=!1;this.changeSummary=this.createChangeSummary?.(),Qs()?.handleAutorunCreated(this),this._runIfNeeded(),e6(this)}static{s(this,"AutorunObserver")}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}dispose(){this.disposed=!0;for(let t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),Qs()?.handleAutorunDisposed(this),t6(this)}_runIfNeeded(){if(this.state===3)return;let t=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=t,this.state=3;try{if(!this.disposed){Qs()?.handleAutorunStarted(this);let r=this.changeSummary;try{this.changeSummary=this.createChangeSummary?.(),this._isRunning=!0,this._runFn(this,r)}catch(n){Fv(n)}finally{this._isRunning=!1}}}finally{this.disposed||Qs()?.handleAutorunFinished(this);for(let r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(t){this.state===3&&(this.state=1),this.updateCount++}endUpdate(t){try{if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let r of this.dependencies)if(r.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3)}finally{this.updateCount--}I0(()=>this.updateCount>=0)}handlePossibleChange(t){this.state===3&&this._isDependency(t)&&(this.state=1)}handleChange(t,r){if(this._isDependency(t)){Qs()?.handleAutorunDependencyChanged(this,t,r);try{(this._handleChange?this._handleChange({changedObservable:t,change:r,didChange:s(i=>i===t,"didChange")},this.changeSummary):!0)&&(this.state=2)}catch(n){Fv(n)}}}_isDependency(t){return this.dependencies.has(t)&&!this.dependenciesToBeRemoved.has(t)}readObservable(t){if(!this._isRunning)throw new vn("The reader object cannot be used outside its compute function!");if(this.disposed)return t.get();t.addObserver(this);let r=t.get();return this.dependencies.add(t),this.dependenciesToBeRemoved.delete(t),r}};(t=>t.Observer=l6)(Wv||={});d();function sU(e,t){return new Gv(new T0(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,e.equalsFn??kA)}s(sU,"derivedOpts");x9e(sU);var Gv=class extends tC{constructor(r,n,i,o,a=void 0,l){super();this._debugNameData=r;this._computeFn=n;this.createChangeSummary=i;this._handleChange=o;this._handleLastObserverRemoved=a;this._equalityComparator=l;this.state=0;this.value=void 0;this.updateCount=0;this.dependencies=new Set;this.dependenciesToBeRemoved=new Set;this.changeSummary=void 0;this._isUpdating=!1;this._isComputing=!1;this._removedObserverToCallEndUpdateOn=null;this._isReaderValid=!1;this.changeSummary=this.createChangeSummary?.()}static{s(this,"Derived")}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}onLastObserverRemoved(){this.state=0,this.value=void 0,Qs()?.handleDerivedCleared(this);for(let r of this.dependencies)r.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(this._isComputing,this.observers.size===0){let n;try{this._isReaderValid=!0,n=this._computeFn(this,this.createChangeSummary?.())}finally{this._isReaderValid=!1}return this.onLastObserverRemoved(),n}else{do{if(this.state===1){for(let n of this.dependencies)if(n.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){if(this.state===3)return;let r=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=r;let n=this.state!==0,i=this.value;this.state=3;let o=!1;this._isComputing=!0;try{let a=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this._isReaderValid=!0,this.value=this._computeFn(this,a)}finally{this._isReaderValid=!1;for(let l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}o=n&&!this._equalityComparator(i,this.value),Qs()?.handleObservableUpdated(this,{oldValue:i,newValue:this.value,change:void 0,didChange:o,hadValue:n})}catch(a){Fv(a)}if(this._isComputing=!1,o)for(let a of this.observers)a.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(r){if(this._isUpdating)throw new vn("Cyclic deriveds are not supported yet!");this.updateCount++,this._isUpdating=!0;try{let n=this.updateCount===1;if(this.state===3&&(this.state=1,!n))for(let i of this.observers)i.handlePossibleChange(this);if(n)for(let i of this.observers)i.beginUpdate(this)}finally{this._isUpdating=!1}}endUpdate(r){if(this.updateCount--,this.updateCount===0){let n=[...this.observers];for(let i of n)i.endUpdate(this);if(this._removedObserverToCallEndUpdateOn){let i=[...this._removedObserverToCallEndUpdateOn];this._removedObserverToCallEndUpdateOn=null;for(let o of i)o.endUpdate(this)}}I0(()=>this.updateCount>=0)}handlePossibleChange(r){if(this.state===3&&this.dependencies.has(r)&&!this.dependenciesToBeRemoved.has(r)){this.state=1;for(let n of this.observers)n.handlePossibleChange(this)}}handleChange(r,n){if(this.dependencies.has(r)&&!this.dependenciesToBeRemoved.has(r)){Qs()?.handleDerivedDependencyChanged(this,r,n);let i=!1;try{i=this._handleChange?this._handleChange({changedObservable:r,change:n,didChange:s(a=>a===r,"didChange")},this.changeSummary):!0}catch(a){Fv(a)}let o=this.state===3;if(i&&(this.state===1||o)&&(this.state=2,o))for(let a of this.observers)a.handlePossibleChange(this)}}readObservable(r){if(!this._isReaderValid)throw new vn("The reader object cannot be used outside its compute function!");r.addObserver(this);let n=r.get();return this.dependencies.add(r),this.dependenciesToBeRemoved.delete(r),n}addObserver(r){let n=!this.observers.has(r)&&this.updateCount>0;super.addObserver(r),n&&(this._removedObserverToCallEndUpdateOn&&this._removedObserverToCallEndUpdateOn.has(r)?this._removedObserverToCallEndUpdateOn.delete(r):r.beginUpdate(this))}removeObserver(r){this.observers.has(r)&&this.updateCount>0&&(this._removedObserverToCallEndUpdateOn||(this._removedObserverToCallEndUpdateOn=new Set),this._removedObserverToCallEndUpdateOn.add(r)),super.removeObserver(r)}};d();d();function Mne(...e){let t,r,n;return e.length===3?[t,r,n]=e:[r,n]=e,new rC(new T0(t,void 0,n),r,n,()=>rC.globalTransaction,kA)}s(Mne,"observableFromEvent");var rC=class extends tC{constructor(r,n,i,o,a){super();this._debugNameData=r;this.event=n;this._getValue=i;this._getTransaction=o;this._equalityComparator=a;this.hasValue=!1;this.handleEvent=s(r=>{let n=this._getValue(r),i=this.value,o=!this.hasValue||!this._equalityComparator(i,n),a=!1;o&&(this.value=n,this.hasValue&&(a=!0,Pne(this._getTransaction(),l=>{Qs()?.handleObservableUpdated(this,{oldValue:i,newValue:n,change:void 0,didChange:o,hadValue:this.hasValue});for(let c of this.observers)l.updateObserver(c,this),c.handleChange(this,void 0)},()=>{let l=this.getDebugName();return"Event fired"+(l?`: ${l}`:"")})),this.hasValue=!0),a||Qs()?.handleObservableUpdated(this,{oldValue:i,newValue:n,change:void 0,didChange:o,hadValue:this.hasValue})},"handleEvent")}static{s(this,"FromEventObservable")}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let r=this.getDebugName();return"From Event"+(r?`: ${r}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}};(r=>{r.Observer=rC;function t(n,i){let o=!1;rC.globalTransaction===void 0&&(rC.globalTransaction=n,o=!0);try{i()}finally{o&&(rC.globalTransaction=void 0)}}r.batchEventsGlobally=t,s(t,"batchEventsGlobally")})(Mne||={});function b9e(e){let t=new aU(!1,void 0);return e.addObserver(t),_a(()=>{e.removeObserver(t)})}s(b9e,"keepObserved");C9e(b9e);function E9e(e,t){let r=new aU(!0,t);return e.addObserver(r),t?t(e.get()):e.reportChanges(),_a(()=>{e.removeObserver(r)})}s(E9e,"recomputeInitiallyAndOnChange");A9e(E9e);var aU=class{constructor(t,r){this._forceRecompute=t;this._handleValue=r;this._counter=0}static{s(this,"KeepAliveObserver")}beginUpdate(t){this._counter++}endUpdate(t){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(t.get()):t.reportChanges())}handlePossibleChange(t){}handleChange(t,r){}};function If(e,t,r,n){let i=new lU(r,n);return sU({debugReferenceFn:r,owner:e,onLastObserverRemoved:s(()=>{i.dispose(),i=new lU(r)},"onLastObserverRemoved")},a=>(i.setItems(t.read(a)),i.getItems()))}s(If,"mapObservableArrayCached");var lU=class{constructor(t,r){this._map=t;this._keySelector=r;this._cache=new Map;this._items=[]}static{s(this,"ArrayMap")}dispose(){this._cache.forEach(t=>t.store.dispose()),this._cache.clear()}setItems(t){let r=[],n=new Set(this._cache.keys());for(let i of t){let o=this._keySelector?this._keySelector(i):i,a=this._cache.get(o);if(a)n.delete(o);else{let l=new E0;a={out:this._map(i,l),store:l},this._cache.set(o,a)}r.push(a.out)}for(let i of n)this._cache.get(i).store.dispose(),this._cache.delete(i);this._items=r}getItems(){return this._items}};function Qne(e,t){let r;return Lne({createEmptyChangeSummary:s(()=>({deltas:[],didChange:!1}),"createEmptyChangeSummary"),handleChange:s((n,i)=>{if(n.didChange(e)){let o=n.change;o!==void 0&&i.deltas.push(o),i.didChange=!0}return!0},"handleChange")},(n,i)=>{let o=e.read(n),a=r;i.didChange&&(r=o,t(o,a,i.deltas))})}s(Qne,"runOnChange");d();d();d();var cU;function I9e(e){cU||(cU=new $S,tU(cU)),cU.addFilteredObj(e)}s(I9e,"logObservableToConsole");var $S=class{constructor(){this.indentation=0;this.changedObservablesSets=new WeakMap}static{s(this,"ConsoleObservableLogger")}addFilteredObj(t){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(t)}_isIncluded(t){return this._filteredObjects?.has(t)??!0}textToConsoleArgs(t){return Vht([c6(Yht("| ",this.indentation)),t])}formatInfo(t){return t.hadValue?t.didChange?[c6(" "),$d(VS(t.oldValue,70),{color:"red",strikeThrough:!0}),c6(" "),$d(VS(t.newValue,60),{color:"green"})]:[c6(" (unchanged)")]:[c6(" "),$d(VS(t.newValue,60),{color:"green"}),c6(" (initial)")]}handleObservableCreated(t){if(t instanceof Gv){let r=t;if(this.changedObservablesSets.set(r,new Set),!1){let i=[];r.__debugUpdating=i;let o=r.beginUpdate;r.beginUpdate=l=>(i.push(l),o.apply(r,[l]));let a=r.endUpdate;r.endUpdate=l=>{let c=i.indexOf(l);return c===-1&&console.error("endUpdate called without beginUpdate",r.debugName,l.debugName),i.splice(c,1),a.apply(r,[l])}}}}handleOnListenerCountChanged(t,r){}handleObservableUpdated(t,r){if(this._isIncluded(t)){if(t instanceof Gv){this._handleDerivedRecomputed(t,r);return}console.log(...this.textToConsoleArgs([u6("observable value changed"),$d(t.debugName,{color:"BlueViolet"}),...this.formatInfo(r)]))}}formatChanges(t){if(t.size!==0)return $d(" (changed deps: "+[...t].map(r=>r.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(t,r,n){this._isIncluded(t)&&this.changedObservablesSets.get(t)?.add(r)}_handleDerivedRecomputed(t,r){if(!this._isIncluded(t))return;let n=this.changedObservablesSets.get(t);n&&(console.log(...this.textToConsoleArgs([u6("derived recomputed"),$d(t.debugName,{color:"BlueViolet"}),...this.formatInfo(r),this.formatChanges(n),{data:[{fn:t._debugNameData.referenceFn??t._computeFn}]}])),n.clear())}handleDerivedCleared(t){this._isIncluded(t)&&console.log(...this.textToConsoleArgs([u6("derived cleared"),$d(t.debugName,{color:"BlueViolet"})]))}handleFromEventObservableTriggered(t,r){this._isIncluded(t)&&console.log(...this.textToConsoleArgs([u6("observable from event triggered"),$d(t.debugName,{color:"BlueViolet"}),...this.formatInfo(r),{data:[{fn:t._getValue}]}]))}handleAutorunCreated(t){this._isIncluded(t)&&this.changedObservablesSets.set(t,new Set)}handleAutorunDisposed(t){}handleAutorunDependencyChanged(t,r,n){this._isIncluded(t)&&this.changedObservablesSets.get(t).add(r)}handleAutorunStarted(t){let r=this.changedObservablesSets.get(t);r&&(this._isIncluded(t)&&console.log(...this.textToConsoleArgs([u6("autorun"),$d(t.debugName,{color:"BlueViolet"}),this.formatChanges(r),{data:[{fn:t._debugNameData.referenceFn??t._runFn}]}])),r.clear(),this.indentation++)}handleAutorunFinished(t){this.indentation--}handleBeginTransaction(t){let r=t.getDebugName();r===void 0&&(r=""),this._isIncluded(t)&&console.log(...this.textToConsoleArgs([u6("transaction"),$d(r,{color:"BlueViolet"}),{data:[{fn:t._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}};function Vht(e){let t=new Array,r=[],n="";function i(a){if("length"in a)for(let l of a)l&&i(l);else"text"in a?(n+=`%c${a.text}`,t.push(a.style),a.data&&r.push(...a.data)):"data"in a&&r.push(...a.data)}s(i,"process"),i(e);let o=[n,...t];return o.push(...r),o}s(Vht,"consoleTextToArgs");function c6(e){return $d(e,{color:"black"})}s(c6,"normalText");function u6(e){return $d(Kht(`${e}: `,10),{color:"black",bold:!0})}s(u6,"formatKind");function $d(e,t={color:"black"}){function r(i){return Object.entries(i).reduce((o,[a,l])=>`${o}${a}:${l};`,"")}s(r,"objToCss");let n={color:t.color};return t.strikeThrough&&(n["text-decoration"]="line-through"),t.bold&&(n["font-weight"]="bold"),{text:e,style:r(n)}}s($d,"styled");function VS(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return e===null?"null":Array.isArray(e)?$ht(e,t):zht(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}s(VS,"formatValue");function $ht(e,t){let r="[ ",n=!0;for(let i of e){if(n||(r+=", "),r.length-5>t){r+="...";break}n=!1,r+=`${VS(i,t-r.length)}`}return r+=" ]",r}s($ht,"formatArray");function zht(e,t){if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString){let i=e.toString();return i.length<=t?i:i.substring(0,t-3)+"..."}let r="{ ",n=!0;for(let[i,o]of Object.entries(e)){if(n||(r+=", "),r.length-5>t){r+="...";break}n=!1,r+=`${i}: ${VS(o,t-r.length)}`}return r+=" }",r}s(zht,"formatObject");function Yht(e,t){let r="";for(let n=1;n<=t;n++)r+=e;return r}s(Yht,"repeat");function Kht(e,t){for(;e.length<t;)e+=" ";return e}s(Kht,"padStr");h9e(I9e);var Jht=!1;Jht&&tU(new $S);d();function Ag(e,t,r){let n=new Map(Object.entries(t).map(([o,a])=>[a,o])),i=new Map(Object.keys(t).map(o=>[o,void 0]));return oU({owner:e,createEmptyChangeSummary:s(()=>({}),"createEmptyChangeSummary"),handleChange:s((o,a)=>{let l=n.get(o.changedObservable);return a[l]===void 0&&(a[l]={value:void 0,changes:[]}),a[l].changes.push(o.change),!0},"handleChange")},(o,a)=>{for(let[l,c]of Object.entries(t)){let u=c.read(o);a[l]===void 0&&(a[l]={value:u,changes:[],previous:i.get(l)}),a[l].value=u,a[l].previous=i.get(l)===void 0?void 0:i.get(l),i.set(l,u)}r(a)})}s(Ag,"autorunWithChanges");var uU=class extends Cs{constructor(r,n=!1){super();this.recentEditMap={};this.recentEdits=[];this.recentEditsReducerConfig={};this.workspace=r,this._started=!1,n||this.start()}static{s(this,"RecentEditsProvider")}getRecentEdits(){return this.start(),this.recentEdits}updateRecentEdits(r,n,i){this.recentEditMap=c9e(this.recentEditMap,r,n,i),this.recentEdits=n9e(this.recentEditMap)}setConfig(r){this.recentEditsReducerConfig=r}start(){this._started||(this._started=!0,If(this,this.workspace.openDocuments,(r,n)=>{n.add(Ag(this,{value:r.value,selection:r.selection,languageId:r.languageId},i=>{let o=i.value.value.value&&!this.recentEditMap[r.id.toString()],a=i.value.changes.length>0;if(o||a){let l=i.value.value.value;this.updateRecentEdits(r.id.toString(),l,this.recentEditsReducerConfig)}}))},r=>r.id).recomputeInitiallyAndOnChange(this._store))}};d();function T9e(e,t,r){return e.get(One).safeStartIfApplicable(t,r)}s(T9e,"startRecentEditsPromptFeatureIfApplicable");var One=class{static{s(this,"RecentEditsPromptFeatureLifecycle")}};function Xht(e,t,r){return Vn(e,Rt.RecentEditsInPrompt)??t.recentEditsInPrompt(r)}s(Xht,"isRecentEditsActive");var w9e=s((e,t)=>{let r=e.get(or);return Xht(e,r,t)},"recentEditsPredicate"),Une=new WeakMap;function Zht(e,t=!1,r=void 0,n){if(t&&(r===void 0||n.activeDocDistanceLimitFromCursor===void 0))throw new Error("cursorLine and activeDocDistanceLimitFromCursor are required when filterByCursorLine is true");let i=e.startLine-1,o=e.endLine-1;if(t&&(Math.abs(i-r)<=n.activeDocDistanceLimitFromCursor||Math.abs(o-r)<=n.activeDocDistanceLimitFromCursor))return null;if(Une.has(e))return Une.get(e);let a=e.diff.removed.filter(u=>u.trim().length>0),l=e.diff.added.filter(u=>u.trim().length>0),c;if(n.removeDeletedLines&&l.length===0)c=null;else if(a.length===0&&l.length===0)c=null;else if(a.join("").trim()===l.join("").trim())c=null;else if(e.diff.added.length>100||e.diff.removed.length>100)c=null;else if(n.summarizationFormat==="aiders-diff")c=s9e(e.diff);else if(n.summarizationFormat==="diff")c=o9e(e.diff,n.removeDeletedLines,n.insertionsBeforeDeletions,n.appendNoReplyMarker);else if(n.summarizationFormat==="find-replace")c=a9e(e.diff);else throw new Error(`Unknown summarization format: ${n.summarizationFormat}`);return Une.set(e,c),c}s(Zht,"summarizeEdit");var _9e=s((e,t)=>{let[r,n]=t.useState();return t.useData(pu,i=>{if(!i.document)return;let o=i.telemetryData,a=e.ctx.get(or);T9e(e.ctx,o,a);let l=Vn(e.ctx,Rt.RecentEditsRemoveDeletedLines)??a.recentEditsRemoveDeletedLines(o),c=Vn(e.ctx,Rt.InsertionsBeforeDeletions)??a.recentEditsInsertionsBeforeDeletions(o),u=Vn(e.ctx,Rt.RecentEditsAppendNoReplyMarker)??a.recentEditsAppendNoReplyMarker(o),f=Vn(e.ctx,Rt.RecentEditsActiveDocDistanceLimitFromCursor)??a.recentEditsActiveDocDistanceLimitFromCursor(o),h={summarizationFormat:Vn(e.ctx,Rt.RecentEditsSummarizationFormat)??a.recentEditsSummarizationFormat(o),removeDeletedLines:l,insertionsBeforeDeletions:c,appendNoReplyMarker:u,activeDocDistanceLimitFromCursor:f},p=Vn(e.ctx,Rt.RecentEditsEditCount)??a.recentEditsEditCount(o),g=Vn(e.ctx,Rt.RecentEditsMaxFiles)??a.recentEditsMaxFiles(o),y=Vn(e.ctx,Rt.RecentEditsContextLines)??a.recentEditsContextLines(o),x=Vn(e.ctx,Rt.RecentEditsEditMergeLineDistance)??a.recentEditsEditMergeLineDistance(o),b=e.ctx.get(uU);b.setConfig({maxFiles:g,maxEditsPerFile:p,diffContextLines:y,editMergeLineDistance:x});let E=b.getRecentEdits(),_=new Set,k=e.ctx.get(Vr),B=[];for(let M=E.length-1;M>=0&&!(B.length>=p);M--){let Z=!_.has(E[M].file);if(_.size+(Z?1:0)>g)break;let ee=E[M],G=ee.file===i.document?.uri,q=G?i.position.line:void 0,ie=Zht(ee,G,q,h);if(ie){_.add(ee.file);let z=k.getRelativePath({uri:ee.file});B.unshift(HS(`File: ${z}`)+HS(ie))}}if(B.length===0){n(void 0);return}let N=HS("These are recently edited files. Do not suggest code that has been deleted.")+B.join("")+HS("End of recent edits");n(N)}),r?Wn(Dl,{children:r}):void 0},"RecentEdits");d();d();function S9e(e,t,r){let n=BO(r,"Trait");for(let o of n)ept(e,t,o.data,o.providerId);return n.flatMap(o=>o.data).sort((o,a)=>(o.importance??0)-(a.importance??0))}s(S9e,"getTraitsFromContextItems");function ept(e,t,r,n){let i=e.get(Bl).getStatisticsForCompletion(t);r.forEach(o=>{i.addExpectations(n,[[o,"included"]])})}s(ept,"setupExpectationsForTraits");function R9e(e){return e.map(t=>({name:t.name,value:t.value}))}s(R9e,"convertRelatedFileTraitsToTraits");function k9e(e){return e.promptTextOverride?{kind:"string",value:e.promptTextOverride}:{kind:"name-value",name:e.name,value:e.value}}s(k9e,"addKindToRelatedFileTrait");var tpt=new Map([["TargetFrameworks","targetFrameworks"],["LanguageVersion","languageVersion"]]);function fU(e,t,r,n,i,o){if(r.length>0){let a={};a.detectedLanguageId=n,a.languageId=i;for(let c of r){let u=tpt.get(c.name);u&&(a[u]=c.value)}let l=o.extendedBy(a,{});return jt(t,e,l)}}s(fU,"ReportTraitsTelemetry");d();d();d();var qne=new un;function B9e(e){return[...e].sort((t,r)=>{let n=qne.get(t.uri)??0;return(qne.get(r.uri)??0)-n})}s(B9e,"sortByAccessTimes");var D9e=s(e=>e.get(Vr).onDidFocusTextDocument(t=>{t&&qne.set(t.document.uri.toString(),Date.now())}),"registerDocumentTracker");var dU=class{constructor(t){this.docManager=t}static{s(this,"OpenTabFiles")}async truncateDocs(t,r,n,i){let o=new Map,a=0;for(let l of t)if(!(a+l.getText().length>Hv.MAX_NEIGHBOR_AGGREGATE_LENGTH)&&(l.uri.startsWith("file:")&&r.startsWith("file:")&&l.uri!==r&&mU(n,l.detectedLanguageId)&&(o.set(l.uri.toString(),{uri:l.uri.toString(),relativePath:this.docManager.getRelativePath(l),source:l.getText()}),a+=l.getText().length),o.size>=i))break;return o}async getNeighborFiles(t,r,n){let i=new Map,o=new Map;return i=await this.truncateDocs(B9e(await this.docManager.textDocuments()),t,r,n),o.set("opentabs",Array.from(i.keys()).map(a=>a.toString())),{docs:i,neighborSource:o}}};d();d();function P9e(e,t,r){return async function(...n){return await Promise.race([e.apply(this,n),new Promise(i=>{setTimeout(i,t,r)})])}}s(P9e,"shortCircuit");d();function npt(...e){return JSON.stringify(e,(t,r)=>typeof r=="object"?r:String(r))}s(npt,"defaultHash");function Wne(e,t={}){let{hash:r=npt,cache:n=new Map}=t;return function(...i){let o=r.apply(this,i);if(n.has(o))return n.get(o);let a=e.apply(this,i);return a instanceof Promise&&(a=a.catch(l=>{throw n.delete(o),l})),n.set(o,a),a}}s(Wne,"memoize");var N9e={entries:[],traits:[]},hU={entries:new Map,traits:[]},Gne=class extends un{constructor(r,n=2*60*1e3){super(r);this.defaultEvictionTimeMs=n;this._cacheTimestamps=new Map}static{s(this,"LRUExpirationCacheMap")}bumpRetryCount(r){let n=this._cacheTimestamps.get(r);return n?++n.retryCount:(this._cacheTimestamps.set(r,{timestamp:Date.now(),retryCount:0}),0)}has(r){return this.isValid(r)?super.has(r):(this.deleteExpiredEntry(r),!1)}get(r){let n=super.get(r);if(this.isValid(r))return n;this.deleteExpiredEntry(r)}set(r,n){let i=super.set(r,n);return this.isValid(r)||this._cacheTimestamps.set(r,{timestamp:Date.now(),retryCount:0}),i}clear(){super.clear(),this._cacheTimestamps.clear()}isValid(r){let n=this._cacheTimestamps.get(r);return n!==void 0&&Date.now()-n.timestamp<this.defaultEvictionTimeMs}deleteExpiredEntry(r){this._cacheTimestamps.has(r)&&this._cacheTimestamps.delete(r),super.deleteKey(r)}},fl=new Gt("relatedFiles"),ipt=1e3,pU=class extends Error{static{s(this,"RelatedFilesProviderFailure")}constructor(){super("The provider failed providing the list of relatedFiles")}},jv=class e{constructor(t){this.context=t}static{s(this,"RelatedFilesProvider")}async getRelatedFiles(t,r,n){let i=await this.getRelatedFilesResponse(t,r,n);if(i===void 0)return;let o={entries:new Map,traits:i.traits??[]};for(let a of i.entries){let l=o.entries.get(a.type);l||(l=new Map,o.entries.set(a.type,l));for(let c of a.uris)try{fl.debug(this.context,`Processing ${c}`);let u=await this.getFileContent(c);if(!u||u.length==0){fl.debug(this.context,`Skip ${c} due to empty content or loading issue.`);continue}if(await this.isContentExcluded(c,u)){fl.debug(this.context,`Skip ${c} due content exclusion.`);continue}u=e.dropBOM(u),l.set(c,u)}catch(u){fl.warn(this.context,u)}}return o}async getFileContent(t){try{return this.context.get(xo).readFileString(t)}catch(r){fl.debug(this.context,r)}}async isContentExcluded(t,r){try{return(await this.context.get(Hc).evaluate(t,r)).isBlocked}catch(n){fl.exception(this.context,n,"isContentExcluded")}return!0}static dropBOM(t){return t.charCodeAt(0)===65279?t.slice(1):t}},opt=3,L9e=new Gne(ipt);async function F9e(e,t,r,n,i){let o=performance.now(),a;try{a=await i.getRelatedFiles(t,r,n)}catch(c){fl.exception(e,c,".getRelatedFiles"),a=void 0}a===void 0&&(L9e.bumpRetryCount(t.uri)>=opt?a=hU:a=void 0);let l=performance.now()-o;if(fl.debug(e,a!==void 0?`Fetched ${[...a.entries.values()].map(c=>c.size).reduce((c,u)=>c+u,0)} related files for '${t.uri}' in ${l}ms.`:`Failing fetching files for '${t.uri}' in ${l}ms.`),a===void 0)throw new pU;return a}s(F9e,"getRelatedFiles");var Hne=Wne(F9e,{cache:L9e,hash:s((e,t,r,n,i)=>`${t.uri}`,"hash")});Hne=P9e(Hne,200,hU);async function M9e(e,t,r,n,i,o=!1){let a=e.get(jv),l=hU;try{let c={uri:t.uri,clientLanguageId:t.clientLanguageId,data:i};l=o?await F9e(e,c,r,n,a):await Hne(e,c,r,n,a)}catch(c){l=hU,c instanceof pU&&jt(e,"getRelatedFilesList",r)}return fU("related.traits",e,R9e(l.traits),t.detectedLanguageId,t.clientLanguageId,r),fl.debug(e,l!=null?`Fetched following traits ${l.traits.map(c=>`{${c.name} : ${c.value}}`).join("")} for '${t.uri}'`:`Failing fecthing traits for '${t.uri}'.`),l}s(M9e,"getRelatedFilesAndTraits");function mU(e,t){return Q_(e)===Q_(t)}s(mU,"considerNeighborFile");var Hv=class e{static{s(this,"NeighborSource")}static{this.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5}static{this.MAX_NEIGHBOR_FILES=20}static{this.EXCLUDED_NEIGHBORS=["node_modules","dist","site-packages"]}static defaultEmptyResult(){return{docs:new Map,neighborSource:new Map,traits:[]}}static reset(){e.instance=void 0}static async getNeighborFilesAndTraits(t,r,n,i,o,a,l){let c=t.get(Vr);e.instance===void 0&&(e.instance=new dU(c));let u={...await e.instance.getNeighborFiles(r,n,e.MAX_NEIGHBOR_FILES),traits:[]};if(spt(t,i))return u;let f=await c.getTextDocument({uri:r});if(!f)return fl.debug(t,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: failed to get the document ${r}`),u;let m=c.getWorkspaceFolder(f);if(!m)return fl.debug(t,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: ${r} is not under the workspace folder`),u;let h=await M9e(t,f,i,o,a,l);return h.entries.size===0?(fl.debug(t,"neighborFiles.getNeighborFilesAndTraits",`0 related files found for ${r}`),u.traits.push(...h.traits),u):(h.entries.forEach((p,g)=>{let y=[];p.forEach((x,b)=>{let E=e.getRelativePath(b,m.uri);if(!E||u.docs.has(b))return;let _={relativePath:E,uri:b,source:x};y.unshift(_),u.docs.set(b,_)}),y.length>0&&u.neighborSource.set(g,y.map(x=>x.uri.toString()))}),u.traits.push(...h.traits),u)}static basename(t){return decodeURIComponent(t.replace(/[#?].*$/,"").replace(/^.*[/:]/,""))}static getRelativePath(t,r){let n=r.toString().replace(/[#?].*/,"").replace(/\/?$/,"/");return t.toString().startsWith(n)?t.toString().slice(n.length):e.basename(t)}};function spt(e,t){return e.get(or).excludeRelatedFiles(t)||Vn(e,Rt.ExcludeRelatedFiles)}s(spt,"isExcludeRelatedFilesActive");function Q9e(e,t){return e.get(or).includeNeighboringFiles(t)||Vn(e,Rt.IncludeNeighboringFiles)}s(Q9e,"isIncludeNeighborFilesActive");var O9e=s((e,t)=>{let[r,n]=t.useState(),[i,o]=t.useState([]),[a,l]=t.useState();t.useData(pu,async m=>{m.document.uri!==r?.uri&&o([]),n(m.document);let h=m.turnOffSimilarFiles?Hv.defaultEmptyResult():await Hv.getNeighborFilesAndTraits(e.ctx,m.document.uri,m.document.detectedLanguageId,m.telemetryData,m.cancellationToken,m.data),p=await c(m.telemetryData,m.document,m,h);o(p);let g=h.traits.filter(y=>y.includeInPrompt).map(k9e);l(f(g,m.document))});async function c(m,h,p,g){let y=gU(e.ctx,m,h.detectedLanguageId);return(await u(y,m,h,p,g)).filter(b=>b.snippet.length>0).sort((b,E)=>b.score-E.score).map(b=>({..._ve(b),score:b.score}))}s(c,"produceSimilarFiles");async function u(m,h,p,g,y){let x=m.similarFilesOptions||QO(e.ctx,h,p.detectedLanguageId),E=e.ctx.get(Vr).getRelativePath(p),_={uri:p.uri,source:p.getText(),offset:p.offsetAt(g.position),relativePath:E,languageId:p.detectedLanguageId};return await Fve(_,Array.from(y.docs.values()),x)}s(u,"findSimilarSnippets");function f(m,h){if(m.length>0&&h!==void 0)return`Consider this related information:
`+m.map(p=>p.kind==="string"?p.value:`${p.name}: ${p.value}`).join(`
`)}return s(f,"produceTraitsText"),Wn(wA,{children:[a!==void 0?Wn(Dl,{children:a}):void 0,...i.map((m,h)=>Wn(apt,{snippet:m}))]})},"SimilarFiles"),apt=s((e,t)=>Wn(Y8,{children:[Wn(Dl,{expElidableTextWeight:1,children:e.snippet.headline}),Wn(mg,{expElidableTextWeight:.99,children:e.snippet.snippet})]}),"SimilarFile");d();var U9e=s((e,t)=>{let[r,n]=t.useState(),[i,o]=t.useState();if(t.useData(pu,a=>{a.traits!==r&&n(a.traits);let l=Q_(a.document.detectedLanguageId);l!==i&&o(l)}),!(!r||r.length===0||!i))return Wn(wA,{children:[Wn(Dl,{expElidableTextWeight:1,children:`Consider this related information:
`}),...r.map(a=>Wn(Dl,{source:a,expElidableTextWeight:.99,children:`${a.name}: ${a.value}`},a.id))]})},"Traits");d();d();d();var AU=class{constructor(t){this.states=t;this.currentIndex=0;this.stateChanged=!1}static{s(this,"UseState")}useState(t){let r=this.currentIndex;if(this.states[r]===void 0){let i=typeof t=="function"?t():t;this.states[r]=i}let n=s(i=>{let o=typeof i=="function"?i(this.states[r]):i;this.states[r]=o,this.stateChanged=!0},"setState");return this.currentIndex++,[this.states[r],n]}hasChanged(){return this.stateChanged}},yU=class{constructor(t){this.measureUpdateTime=t;this.consumers=[]}static{s(this,"UseData")}useData(t,r){this.consumers.push(n=>{if(t(n))return r(n)})}async updateData(t){if(this.consumers.length>0){let r=performance.now();for(let n of this.consumers)await n(t);this.measureUpdateTime(performance.now()-r)}}};var CU=class{constructor(t){this.lifecycleData=new Map;this.vTree=this.virtualizeElement(t,"$",0)}static{s(this,"VirtualPromptReconciler")}reconcile(t){if(!this.vTree)throw new Error("No tree to reconcile, make sure to pass a valid prompt");return t?.isCancellationRequested?this.vTree:(this.vTree=this.reconcileNode(this.vTree,"$",0,t),this.vTree)}reconcileNode(t,r,n,i){if(!t.children&&!t.lifecycle)return t;let o=t;if(t.lifecycle?.isRemountRequired()){let l=this.collectChildPaths(t);o=this.virtualizeElement(t.component,r,n);let c=this.collectChildPaths(o);this.cleanupState(l,c)}else if(t.children){let l=[];for(let c=0;c<t.children.length;c++){let u=t.children[c];if(u){let f=this.reconcileNode(u,t.path,c,i);f!==void 0&&l.push(f)}}o.children=l}return o}virtualizeElement(t,r,n){if(!(typeof t>"u")){if(typeof t=="string"||typeof t=="number")return{name:typeof t,path:`${r}[${n}]`,props:{value:t},component:t};if(lpt(t.type)){let i=t.type(t.props.children),o=r!=="$"?`[${n}]`:"",a=`${r}${o}.${i.type}`,l=i.children.map((c,u)=>this.virtualizeElement(c,a,u));return this.ensureUniqueKeys(l),{name:i.type,path:a,children:l.flat().filter(c=>c!==void 0),component:t}}return this.virtualizeFunctionComponent(r,n,t,t.type)}}virtualizeFunctionComponent(t,r,n,i){let o=n.props.key?`["${n.props.key}"]`:`[${r}]`,a=`${t}${o}.${i.name}`,l=new Vne(this.getOrCreateLifecycleData(a)),c=i(n.props,l),m=(Array.isArray(c)?c:[c]).map((h,p)=>this.virtualizeElement(h,a,p)).flat().filter(h=>h!==void 0);return this.ensureUniqueKeys(m),{name:i.name,path:a,props:n.props,children:m,component:n,lifecycle:l}}ensureUniqueKeys(t){let r=new Map;for(let i of t){if(!i)continue;let o=i.props?.key;o&&r.set(o,(r.get(o)||0)+1)}let n=Array.from(r.entries()).filter(([i,o])=>o>1).map(([i])=>i);if(n.length>0)throw new Error(`Duplicate keys found: ${n.join(", ")}`)}collectChildPaths(t){let r=[];if(t?.children)for(let n of t.children)n&&(r.push(n.path),r.push(...this.collectChildPaths(n)));return r}cleanupState(t,r){for(let n of t)r.includes(n)||this.lifecycleData.delete(n)}getOrCreateLifecycleData(t){return this.lifecycleData.has(t)||this.lifecycleData.set(t,new jne([])),this.lifecycleData.get(t)}createPipe(){return{pump:s(async t=>{await this.pumpData(t)},"pump")}}async pumpData(t){if(!this.vTree)throw new Error("No tree to pump data into. Pumping data before initializing?");await this.recursivelyPumpData(t,this.vTree)}async recursivelyPumpData(t,r){if(!r)throw new Error("Can't pump data into undefined node.");await r.lifecycle?.dataHook.updateData(t);for(let n of r.children||[])await this.recursivelyPumpData(t,n)}},jne=class{static{s(this,"PromptElementLifecycleData")}constructor(t){this.state=t,this._updateTimeMs=0}getUpdateTimeMsAndReset(){let t=this._updateTimeMs;return this._updateTimeMs=0,t}},Vne=class{constructor(t){this.lifecycleData=t;this.stateHook=new AU(t.state),this.dataHook=new yU(r=>{t._updateTimeMs=r})}static{s(this,"PromptElementLifecycle")}useState(t){return this.stateHook.useState(t)}useData(t,r){this.dataHook.useData(t,r)}isRemountRequired(){return this.stateHook.hasChanged()}};function lpt(e){return typeof e=="function"&&"isFragmentFunction"in e}s(lpt,"isFragmentFunction");var zS=class{static{s(this,"VirtualPrompt")}constructor(t){this.reconciler=new CU(t)}snapshotNode(t,r){if(!t)return;if(r?.isCancellationRequested)return"cancelled";let n=[];for(let i of t.children??[]){let o=this.snapshotNode(i,r);if(o==="cancelled")return"cancelled";o!==void 0&&n.push(o)}return{value:t.props?.value?.toString(),name:t.name,path:t.path,props:t.props,children:n,statistics:{updateDataTimeMs:t.lifecycle?.lifecycleData.getUpdateTimeMsAndReset()}}}snapshot(t){try{let r=this.reconciler.reconcile(t);if(t?.isCancellationRequested)return{snapshot:void 0,status:"cancelled"};if(!r)throw new Error("Invalid virtual prompt tree");let n=this.snapshotNode(r,t);return n==="cancelled"||t?.isCancellationRequested?{snapshot:void 0,status:"cancelled"}:{snapshot:n,status:"ok"}}catch(r){return{snapshot:void 0,status:"error",error:r}}}createPipe(){return this.reconciler.createPipe()}};var Th=class{static{s(this,"CompletionsPromptFactory")}};function xU(e,t){return new $ne(new zne(new Yne(e,t)))}s(xU,"createCompletionsPromptFactory");var $ne=class extends Th{constructor(r){super();this.delegate=r}static{s(this,"SequentialCompletionsPromptFactory")}prompt(r,n){return this.lastPromise=this.promptAsync(r,n),this.lastPromise}async promptAsync(r,n){if(await this.lastPromise,n?.isCancellationRequested)return f6;try{return await this.delegate.prompt(r,n)}catch{return Kne}}},cpt=1200,zne=class extends Th{constructor(r){super();this.delegate=r}static{s(this,"TimeoutHandlingCompletionsPromptFactory")}async prompt(r,n){let i=new Mn.CancellationTokenSource,o=i.token;return n?.onCancellationRequested(()=>{i.cancel()}),await Promise.race([this.delegate.prompt(r,o),new Promise(a=>{setTimeout(()=>{i.cancel(),a(j9e)},cpt)})])}};function pu(e){if(!e||typeof e!="object")return!1;let t=e;return!(!t.document||!t.position||t.position.line===void 0||t.position.character===void 0||!t.telemetryData)}s(pu,"isCompletionRequestData");var Yne=class extends Th{constructor(r,n){super();this.ctx=r;this.renderer=new XO;this.virtualPrompt=n??new zS(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe()}static{s(this,"ComponentsCompletionsPromptFactory")}async prompt(r,n){try{return await this.createPromptUnsafe(r,n)}catch(i){return this.errorPrompt(i)}}async createPromptUnsafe({completionId:r,completionState:n,telemetryData:i,promptOpts:o},a){let{maxPromptLength:l,suffixPercent:c,suffixMatchThreshold:u}=gU(this.ctx,i,n.textDocument.detectedLanguageId),f=await this.failFastPrompt(n.textDocument,n.position,c??0,a);if(f)return f;let m=performance.now(),{traits:h,codeSnippets:p,turnOffSimilarFiles:g,resolvedContextItems:y}=await this.resolveContext(r,n,i,a,o);if(await this.updateComponentData(n.textDocument,n.position,h,p,i,g,l??M_,a,o,u,o?.tokenizer),a?.isCancellationRequested)return f6;let x=this.virtualPrompt.snapshot(a),b=x.status;if(b==="cancelled")return f6;if(b==="error")return this.errorPrompt(x.error);let E=this.renderer.render(x.snapshot,{delimiter:`
`,tokenizer:o?.tokenizer,promptTokenLimit:l??M_,suffixPercent:c??pM,separateContext:o?.separateContext??!1,elisionStrategy:this.ctx.get(or).completionsElisionStrategy(i),approximateElision:this.ctx.get(or).approximateElision(i),languageId:n.textDocument.detectedLanguageId},a);if(E.status==="cancelled")return f6;if(E.status==="error")return this.errorPrompt(E.error);let[_,k]=d6(E.prefix),B={...E,prefix:_},N;if(one(this.ctx,i)){let Z=$8e(E.metadata.componentStatistics);this.ctx.get(Bl).getStatisticsForCompletion(r).computeMatch(Z),N=Y8e(this.ctx,r,y),kn.debug(this.ctx,`Context providers telemetry: '${JSON.stringify(N)}'`)}let M=performance.now();return this.resetIfEmpty(E),this.successPrompt(B,M,m,k,N)}async updateComponentData(r,n,i,o,a,l,c,u,f={},m,h){let p=this.createRequestData(r,n,a,u,f,c,i,o,l,m,h);await this.pipe.pump(p)}async resolveContext(r,n,i,o,a={}){let l=[],c,u,f=!1;if(one(this.ctx,i)){l=await this.ctx.get(Vd).resolution(r);let{textDocument:m}=n,h=l.filter(K8e);upt(this.ctx,m.detectedLanguageId,h,i)||(f=!0),c=S9e(this.ctx,r,h),fU("contextProvider.traits",this.ctx,c,m.detectedLanguageId,m.detectedLanguageId,i),u=await l6e(this.ctx,r,h,m.detectedLanguageId)}return{traits:c,codeSnippets:u,turnOffSimilarFiles:f,resolvedContextItems:l}}async failFastPrompt(r,n,i,o){if(o?.isCancellationRequested)return f6;if((await this.ctx.get(Hc).evaluate(r.uri,r.getText(),"UPDATE")).isBlocked)return H9e;if((i>0?r.getText().length:r.offsetAt(n))<W9e)return G9e}completionsPrompt(){return Wn(wA,{children:[Wn(Rne,{children:[Wn(e9e,{ctx:this.ctx,weight:.7,expElidableTextWeight:.9}),Wn(U9e,{weight:.6,expElidableTextWeight:.5}),Wn(u6e,{ctx:this.ctx,weight:.9,expElidableTextWeight:.7}),Wn(O9e,{ctx:this.ctx,weight:.8,expElidableTextWeight:.6}),Wn(Z6e,{ctx:this.ctx,by:w9e,children:Wn(_9e,{ctx:this.ctx,weight:.99,expElidableTextWeight:.9})})]}),Wn(WS,{weight:1,expElidableTextWeight:1})]})}createRequestData(r,n,i,o,a,l,c,u,f,m,h){return{document:r,position:n,telemetryData:i,cancellationToken:o,data:a.data,traits:c,codeSnippets:u,turnOffSimilarFiles:f,suffixMatchThreshold:m,maxPromptTokens:l,tokenizer:h}}resetIfEmpty(r){r.prefix.length===0&&r.suffix.length===0&&this.reset()}successPrompt(r,n,i,o,a){return{type:"prompt",prompt:{prefix:r.prefix,prefixTokens:r.prefixTokens,suffix:r.suffix,suffixTokens:r.suffixTokens,context:r.context,isFimEnabled:r.suffix.length>0},computeTimeMs:n-i,trailingWs:o,neighborSource:new Map,metadata:r.metadata,contextProvidersTelemetry:a}}errorPrompt(r){return Ea(this.ctx,r,"PromptComponents.CompletionsPromptFactory"),this.reset(),Kne}reset(){this.virtualPrompt=new zS(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe()}};function upt(e,t,r,n){let i=["cpp","c"];return Q9e(e,n)||i.includes(t)||!r.some(a=>a.data.some(l=>l.type==="CodeSnippet"))}s(upt,"similarFilesEnabled");async function q9e(e){try{await hee}catch(t){OO(e,t,"initializeTokenizers")}}s(q9e,"waitForTokenizers");var W9e=10,G9e={type:"contextTooShort"},H9e={type:"copilotContentExclusion"},Kne={type:"promptError"},f6={type:"promptCancelled"},j9e={type:"promptTimeout"};function d6(e){let t=e.split(`
`),r=t[t.length-1],n=r.length-r.trimEnd().length,i=e.slice(0,e.length-n),o=e.slice(i.length);return[r.length==n?i:e,o]}s(d6,"trimLastLine");function m6(e,t,r,n,i,o={}){let l=e.get(Vr).findNotebook(r.textDocument),c=l?.getCellFor(r.textDocument);l&&c&&(r=dpt(r,l,c)),n.extendWithConfigProperties(e),n.sanitizeKeys();let u=e.get(or).enablePromptContextProxyField(n);return e.get(Th).prompt({completionId:t,completionState:r,telemetryData:n,promptOpts:{...o,separateContext:u}},i)}s(m6,"extractPrompt");function fpt(e,t){let r=e.document.detectedLanguageId,n=e.document.getText();return r===t?n:JO(n,t)}s(fpt,"addNeighboringCellsToPrompt");function dpt(e,t,r){let i=t.getCells().filter(l=>l.index<r.index&&mU(r.document.detectedLanguageId,l.document.detectedLanguageId)),o=i.length>0?i.map(l=>fpt(l,r.document.detectedLanguageId)).join(`
`)+`
`:"",a={line:0,character:0};return e.applyEdits([{newText:o,range:{start:a,end:a}}])}s(dpt,"applyEditsForNotebook");function gU(e,t,r){let i=e.get(or).maxPromptCompletionTokens(t)-TO(e),o=s6e(t,r),a=QO(e,t,r),l={maxPromptLength:i,similarFilesOptions:a,numberOfSnippets:o},c=e.get(or).suffixPercent(t),u=e.get(or).suffixMatchThreshold(t);return c>0&&u>0&&(l={...l,suffixPercent:c,suffixMatchThreshold:u}),l}s(gU,"getPromptOptions");d();d();var V9e=2.98410452738298,$9e=-.838732736843507,z9e=1.50314646255716,Y9e=-.237798634012662,vU={python:.314368072478742},K9e={"0.01":.225800751784931,"0.02":.290204307767402,"0.03":.333153496466045,"0.05":.404516749849559,"0.1":.513216040545626,"0.2":.626904979128674,"0.3":.694880719658273,"0.4":.743100684947291,"0.5":.782524520571946,"0.6":.816856186092243,"0.7":.84922977716585,"0.8":.883694877241999,"0.9":.921859050950077,"0.95":.944571268106974,"0.99":.969535563141733};var mpt={link:s(e=>Math.exp(e)/(1+Math.exp(e)),"link"),unlink:s(e=>Math.log(e/(1-e)),"unlink")};function hpt(e,t){let r=Math.min(...Array.from(t.keys()).filter(a=>a>=e)),n=Math.max(...Array.from(t.keys()).filter(a=>a<e)),i=t.get(r),o=t.get(n);return o+(i-o)*(e-n)/(r-n)}s(hpt,"linearInterpolation");var h6=class{static{s(this,"Regressor")}constructor(t,r,n){this.name=t,this.coefficient=r,this.transformation=n||(i=>i)}contribution(t){return this.coefficient*this.transformation(t)}},Jne=class{constructor(t,r,n){this.link=mpt;if(this.intercept=t,this.coefficients=r,this.logitsToQuantiles=new Map,this.logitsToQuantiles.set(0,0),this.logitsToQuantiles.set(1,1),n)for(let i in n)this.logitsToQuantiles.set(n[i],Number(i))}static{s(this,"LogisticRegression")}predict(t,r){let n=this.intercept;for(let i of this.coefficients){let o=r[i.name];if(o===void 0)return NaN;n+=i.contribution(o)}return this.link.link(n)}quantile(t,r){let n=this.predict(t,r);return hpt(n,this.logitsToQuantiles)}},J9e=new Jne(V9e,[new h6("compCharLen",$9e,e=>Math.log(1+e)),new h6("meanLogProb",z9e),new h6("meanAlternativeLogProb",Y9e)].concat(Object.entries(vU).map(e=>new h6(e[0],e[1]))),K9e);function X9e(e,t){let r={...t.measurements};return Object.keys(vU).forEach(n=>{r[n]=t.properties["customDimensions.languageId"]==n?1:0}),J9e.predict(e,r)}s(X9e,"ghostTextScoreConfidence");function Z9e(e,t){let r={...t.measurements};return Object.keys(vU).forEach(n=>{r[n]=t.properties["customDimensions.languageId"]==n?1:0}),J9e.quantile(e,r)}s(Z9e,"ghostTextScoreQuantile");d();d();var ppt=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60}];function bU(e){let t=e.slice();return t.reverse(),eTe(t)||eTe(t.filter(r=>r.trim().length>0))}s(bU,"isRepetitive");function eTe(e){let t=gpt(e);for(let r of ppt){if(e.length<r.last_tokens_to_consider)continue;if(r.last_tokens_to_consider-1-t[r.last_tokens_to_consider-1]<=r.max_token_sequence_length)return!0}return!1}s(eTe,"isRepeatedPattern");function gpt(e){let t=Array(e.length).fill(0);t[0]=-1;let r=-1;for(let n=1;n<e.length;n++){for(;r>=0&&e[r+1]!==e[n];)r=t[r];e[r+1]===e[n]&&r++,t[n]=r}return t}s(gpt,"kmp_prefix_function");function Apt(e,t,r,n){let i="}";try{i=Nve(t.detectedLanguageId)??"}"}catch{}return ypt({getLineText:s(o=>t.lineAt(o).text,"getLineText"),getLineCount:s(()=>t.lineCount,"getLineCount")},r,n,i)}s(Apt,"maybeSnipCompletion");function ypt(e,t,r,n){let i=Cpt(r),o=i.lines;if(o.length===1)return r;for(let a=1;a<o.length;a++){let l=!0,c=0,u=0;for(let f=0;f+a+u<o.length;f++){let m;for(;;){let y=t.line+1+f+c;if(m=y>=e.getLineCount()?void 0:e.getLineText(y),m!==void 0&&m.trim()==="")c++;else break}let h,p;for(;h=a+f+u,p=h>=o.length?void 0:o[h],p!==void 0&&p.trim()==="";)u++;let g=h===o.length-1;if(!p||!(m&&(g?m.startsWith(p)||p.startsWith(m):m===p&&p.trim()===n))){l=!1;break}}if(l)return o.slice(0,a).join(i.newLineCharacter)}return r}s(ypt,"maybeSnipCompletionImpl");function Cpt(e){let t=e.includes(`\r
`)?`\r
`:`
`;return{lines:e.split(t),newLineCharacter:t}}s(Cpt,"splitByNewLine");function xpt(e,t,r,n){let i="",o=t.line+1,a=n?r.trim():r;for(;i===""&&o<e.lineCount;){if(i=e.lineAt(o).text,n&&(i=i.trim()),i===a)return!0;o++}return!1}s(xpt,"matchesNextLine");function YS(e,t,r,n,i,o){if(bU(n.tokens)){let l=dn.createAndMarkAsIssued();l.extendWithRequestId(n.requestId),jt(e,"repetition.detected",l,1),o.info(e,"Filtered out repetitive solution");return}let a={...n};if(xpt(t,r,a.completionText,!i)){let l=dn.createAndMarkAsIssued();l.extendWithRequestId(n.requestId),jt(e,"completion.alreadyInDocument",l),jt(e,"completion.alreadyInDocument",l.extendedBy({completionTextJson:JSON.stringify(a.completionText)}),1),o.info(e,"Filtered out solution matching next line");return}return a.completionText=Apt(e,t,r,a.completionText),a.completionText?a:void 0}s(YS,"postProcessChoiceInContext");function tTe(e,t,r){let i=e.lineAt(t.line).text.substring(t.character);if(i.length>0){if(r.completionText.indexOf(i)!==-1)return i.length;{let o=-1,a=0;for(let l of i){let c=r.completionText.indexOf(l,o+1);if(c>o)a++,o=c;else break}return a}}return 0}s(tTe,"checkSuffix");var iTe=Ze(n5());var Li=new Gt("ghostText");async function oTe(e,t,r,n,i,o,a){Li.debug(e,`Getting ${o} from network`),r=r.extendedBy();let l=t.isCycling?3:1,c=V8(e,l),u={language:t.languageId,next_indent:t.indentation.next??0,trim_by_indentation:Uve(t.blockMode),prompt_tokens:t.prompt.prefixTokens??0,suffix_tokens:t.prompt.suffixTokens??0},f={n:l,temperature:c},m=Vn(e,Rt.ModelAlwaysTerminatesSingleline)??e.get(or).modelAlwaysTerminatesSingleline(r),h=t.blockMode==="moremultiline"&&z5.isSupported(t.languageId)&&!m;!t.multiline&&!h?f.stop=[`
`]:t.stop&&(f.stop=t.stop);let p=Date.now(),g={endpoint:"completions",uiKind:"ghostText",temperature:JSON.stringify(c),n:JSON.stringify(l),stop:JSON.stringify(f.stop)??"unset",logit_bias:JSON.stringify(null)};Object.assign(r.properties,g);try{let y={prompt:t.prompt,languageId:t.languageId,repoInfo:t.repoInfo,ourRequestId:t.ourRequestId,engineModelId:t.engineModelId,count:l,uiKind:"ghostText",postOptions:f,headers:t.headers,extra:u},x=await e.get(hu).fetchAndStreamCompletions(e,y,r,i,n);return x.type==="failed"?{type:"failed",reason:x.reason,telemetryData:Xs(r)}:x.type==="canceled"?(Li.debug(e,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:x.reason,telemetryData:fg(r)}):a(p,x.getProcessingTime(),x.choices)}catch(y){if(kc(y))return{type:"canceled",reason:"network request aborted",telemetryData:fg(r,{cancelledNetworkRequest:!0})};if(Li.exception(e,y,"Error on ghost text request"),e.get(ou).notifyUser(e,y),JI(e))throw y;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:Xs(r)}}}s(oTe,"genericGetCompletionsFromNetwork");function Xne(e,t,r){if(r||(r=[]),e.completionText=e.completionText.trimEnd(),!!e.completionText&&r.findIndex(n=>n.completionText.trim()===e.completionText.trim())===-1)return t.requestForNextLine&&(e.completionText=`
`+e.completionText),e}s(Xne,"postProcessChoices");async function Ept(e,t,r,n,i){return oTe(e,t,r,n,i,"completions",async(o,a,l)=>{let u=await l[Symbol.asyncIterator]().next();if(u.done)return Li.debug(e,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:Xs(r)};if(n?.isCancellationRequested)return Li.debug(e,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:fg(r)};let f=u.value;if(f===void 0)return Li.debug(e,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:Xs(r)};aTe(e,"performance",f,o,a),Li.debug(e,`Awaited first result, id: ${f.choiceIndex}`);let m=Xne(f,t);m&&(IU(e,t,{multiline:t.multiline,choices:[m]},r),Li.debug(e,`GhostText first completion (index ${m?.choiceIndex}): ${JSON.stringify(m?.completionText)}`));let h=(async()=>{let p=m!==void 0?[m]:[];for await(let g of l){if(g===void 0)continue;Li.debug(e,`GhostText later completion (index ${g?.choiceIndex}): ${JSON.stringify(g.completionText)}`);let y=Xne(g,t,p);y&&(p.push(y),IU(e,t,{multiline:t.multiline,choices:[y]},r))}})();return sh(e)&&await h,m?{type:"success",value:[EU(m,{forceSingleLine:!1}),h],telemetryData:Xs(r),telemetryBlob:r,resultType:0}:{type:"empty",reason:"got undefined processedFirstChoice",telemetryData:Xs(r)}})}s(Ept,"getCompletionsFromNetwork");async function Ipt(e,t,r,n,i){return oTe(e,t,r,n,i,"all completions",async(o,a,l)=>{let c=[];for await(let u of l){if(n?.isCancellationRequested)return Li.debug(e,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:fg(r)};let f=Xne(u,t,c);f&&c.push(f)}return c.length>0&&(IU(e,t,{multiline:t.multiline,choices:c},r),aTe(e,"cyclingPerformance",c[0],o,a)),{type:"success",value:[c,Promise.resolve()],telemetryData:Xs(r),telemetryBlob:r,resultType:3}})}s(Ipt,"getAllCompletionsFromNetwork");function EU(e,t){let r={...e};if(t.forceSingleLine){let{completionText:n}=r,i=n.match(/^\r?\n/);i?r.completionText=i[0]+n.split(`
`)[1]:r.completionText=n.split(`
`)[0]}return r}s(EU,"makeGhostAPIChoice");function rTe(e){return t=>{let r=t?.split(`
`)??[];if(r.length>e+1)return r.slice(0,e+1).join(`
`).length}}s(rTe,"takeNLines");async function Tpt(e,t,r,n,i,o,a,l,c){let u=e.get(hh).forLanguage(e,t.textDocument.detectedLanguageId,c);switch(u){case"server":return o&&l?{blockMode:"parsing",requestMultiline:!0,finishedCb:rTe(1),stop:[`
`]}:{blockMode:"server",requestMultiline:!0,finishedCb:s(f=>{},"finishedCb")};case"parsing":case"parsingandserver":case"moremultiline":default:{let f;try{f=await Ppt(e,u,t.textDocument,t.position,i,o,a,r)}catch(m){Li.exception(e,m,".getGhostTextStrategy"),f={requestMultiline:!1}}if(f.requestMultiline){let m;return r.trailingWs.length>0&&!r.prompt.prefix.endsWith(r.trailingWs)?m=No.position(t.position.line,Math.max(t.position.character-r.trailingWs.length,0)):m=t.position,{blockMode:u,requestMultiline:!0,finishedCb:nTe(e,u,t.textDocument,m,f.blockPosition,a,!0,r.prompt,c)}}return o&&l?{blockMode:"parsing",requestMultiline:!0,finishedCb:rTe(1),stop:[`
`]}:{blockMode:u,requestMultiline:!1,finishedCb:nTe(e,u,t.textDocument,t.position,f.blockPosition,a,!1,r.prompt,c)}}}}s(Tpt,"getGhostTextStrategy");function nTe(e,t,r,n,i,o,a,l,c){if(t==="moremultiline"&&z5.isSupported(r.detectedLanguageId)){let u=r.getText(No.range(No.position(0,0),n))+(o?`
`:""),f=i==="empty-block"||i==="block-end"?e.get(or).longLookaheadSize(c):e.get(or).shortLookaheadSize(c);return new wO(e,u,r.detectedLanguageId,!a,f,(m,h)=>{let p={prefix:u+m,prompt:{...l,prefix:l.prefix+m}};IU(e,p,{multiline:!0,choices:[h]},h.telemetryData)}).getFinishedCallback()}return a?NS(e,r,n,o):u=>{}}s(nTe,"buildFinishedCallback");var wpt={isCycling:!1,promptOnly:!1,isSpeculative:!1};async function _pt(e,t,r,n,i,o){let a=n.issuedTime,l=[];function c(k){let B=ia();l.push([k,B-a]),a=B}s(c,"recordPerformance"),c("telemetry");let u=e.get(zd),f=u.clientCompletionId,m=e.get(or);if(i?.isCancellationRequested)return{type:"abortedBeforeIssued",reason:"cancelled before extractPrompt",telemetryData:Xs(n)};let h=Rpt(t.textDocument,t.position);if(h===void 0)return Li.debug(e,"Breaking, invalid middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line",telemetryData:Xs(n)};let p=e.get(bh).isEnabled(n)?e.get(bh):void 0,g=i,y=new Mn.CancellationTokenSource;p&&(i=y.token);let x=B5(e,n),b={...wpt,...o,tokenizer:x.tokenizer},E=await m6(e,r,t,n,i,b);return c("prompt"),E.type==="copilotContentExclusion"?(Li.debug(e,"Copilot not available, due to content exclusion"),{type:"abortedBeforeIssued",reason:"Copilot not available due to content exclusion",telemetryData:Xs(n)}):E.type==="contextTooShort"?(Li.debug(e,"Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context",telemetryData:Xs(n)}):E.type==="promptError"?(Li.debug(e,"Error while building the prompt"),{type:"abortedBeforeIssued",reason:"Error while building the prompt",telemetryData:Xs(n)}):b.promptOnly?{type:"promptOnly",reason:"Breaking, promptOnly set to true",prompt:E}:E.type==="promptCancelled"?(Li.debug(e,"Cancelled during extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled during extractPrompt",telemetryData:Xs(n)}):E.type==="promptTimeout"?(Li.debug(e,"Timeout during extractPrompt"),{type:"abortedBeforeIssued",reason:"Timeout",telemetryData:Xs(n)}):E.prompt.prefix.length===0&&E.prompt.suffix.length===0?(Li.debug(e,"Error empty prompt"),{type:"abortedBeforeIssued",reason:"Empty prompt",telemetryData:Xs(n)}):i?.isCancellationRequested?(Li.debug(e,"Cancelled after extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled after extractPrompt",telemetryData:Xs(n)}):e.get(Ki).withProgress(async()=>{let[k]=d6(t.textDocument.getText(No.range(No.position(0,0),t.position))),B=m.triggerCompletionAfterAccept(n),N=e.get(zd).hasAcceptedCurrentCompletion(k,E.prompt.suffix),M=Vn(e,Rt.MultilineAfterAccept)??m.enableMultilineAfterAccept(n),Z=B&&!M?N:void 0,he=E.prompt;Z&&(E.prompt={...E.prompt,prefix:E.prompt.prefix+`
`});let ee=await Tpt(e,t,E,b.isCycling,h,N,Z??!1,M,n);if(c("strategy"),i?.isCancellationRequested)return Li.debug(e,"Cancelled after requestMultiline"),{type:"abortedBeforeIssued",reason:"Cancelled after requestMultiline",telemetryData:Xs(n)};let G=Spt(e,k,he,ee.requestMultiline,n);c("cache");let q=D5(e,t.textDocument.uri),ie={blockMode:ee.blockMode,languageId:t.textDocument.detectedLanguageId,repoInfo:q,engineModelId:x.modelId,ourRequestId:r,prefix:k,prompt:E.prompt,multiline:ee.requestMultiline,indentation:LS(t.textDocument,t.position),isCycling:b.isCycling,headers:x.headers,requestForNextLine:Z,stop:ee.stop};ie.headers={...ie.headers,"X-Copilot-Async":p?"true":"false","X-Copilot-Speculative":b.isSpeculative?"true":"false"};let z=Upt(e,t.textDocument,ie,t.position,E,n,x,b),j=Vn(e,Rt.EnableSpeculativeRequests),U=m.enableSpeculativeRequests(n),V=(j??U)&&!b.isSpeculative&&!b.isCycling,K=Promise.resolve();if(p&&G===void 0&&!b.isCycling&&p.shouldWaitForAsyncCompletions(k,E.prompt)){let be=await p.getFirstMatchingRequestWithTimeout(r,k,E.prompt,b.isSpeculative,z);if(c("asyncWait"),be){let qe=!ee.requestMultiline;G=[[EU(be[0],{forceSingleLine:qe})],4],K=be[1]}if(g?.isCancellationRequested)return Li.debug(e,"Cancelled before requesting a new completion"),{type:"abortedBeforeIssued",reason:"Cancelled after waiting for async completion",telemetryData:Xs(z)}}let ae=ee.blockMode==="moremultiline"&&z5.isSupported(t.textDocument.detectedLanguageId);if(G!==void 0&&(G[0]=G[0].map(be=>YS(e,t.textDocument,t.position,be,ae,Li)).filter(be=>be!==void 0)),G!==void 0&&G[0].length===0)return Li.debug(e,`Found empty inline suggestions locally via ${$8(G[1])}`),{type:"empty",reason:"cached results empty after post-processing",telemetryData:Xs(z)};if(G!==void 0&&G[0].length>0&&(!b.isCycling||G[0].length>1))Li.debug(e,`Found inline suggestions locally via ${$8(G[1])}`);else{if(b.isCycling){let be=await Ipt(e,ie,z,i,ee.finishedCb);if(be.type==="success"){let qe=G?.[0]??[];be.value[0].forEach(Re=>{qe.findIndex(Xe=>Xe.completionText.trim()===Re.completionText.trim())===-1&&qe.push(Re)}),G=[qe,3]}else if(G===void 0)return be}else{if(i?.isCancellationRequested)return Li.debug(e,"Cancelled before contextual filter"),{type:"canceled",reason:"before contextual filter",telemetryData:fg(z)};if(!m.disableContextualFilter(n)&&z.measurements.contextualFilterScore<35/100)return Li.debug(e,"Cancelled by contextual filter"),{type:"canceled",reason:"contextualFilterScore below threshold",telemetryData:fg(z)};let be=p?(Re,Xe)=>(p.updateCompletion(r,Re),ee.finishedCb(Re,Xe)):ee.finishedCb,qe=Ept(e,ie,z,i,be);if(p){p.queueCompletionRequest(r,k,E.prompt,y,qe);let Re=await p.getFirstMatchingRequest(r,k,E.prompt,b.isSpeculative);if(Re===void 0)return{type:"empty",reason:"received no results from async completions",telemetryData:Xs(z)};G=[[Re[0]],4],K=Re[1]}else{let Re=await qe;if(Re.type!=="success")return Re;G=[[Re.value[0]],0],K=Re.value[1]}}c("network")}if(G===void 0)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:Xs(z)};let[re,le]=G,ce=re.map(be=>YS(e,t.textDocument,t.position,be,ae,Li)).filter(be=>be!==void 0),De=[];for(let be of ce){let qe=Opt(e,t.textDocument,ie,be,z),Re=h?tTe(t.textDocument,t.position,be):0,ft={completion:Lpt(be.choiceIndex,be.completionText,E.trailingWs),telemetry:qe,isMiddleOfTheLine:h,suffixCoverage:Re,copilotAnnotations:be.copilotAnnotations};De.push(ft)}if(g?.isCancellationRequested)return Li.debug(e,"Cancelled after post processing completions"),{type:"canceled",reason:"after post processing completions",telemetryData:fg(z)};if(z.properties.clientCompletionId=De?.[0]?.telemetry?.properties.clientCompletionId,z.measurements.foundOffset=De?.[0]?.telemetry?.measurements?.foundOffset??-1,Li.debug(e,`Produced ${De.length} results from ${$8(le)} at ${z.measurements.foundOffset} offset`),f!==u.clientCompletionId){let be=u.getCompletionsForUserTyping(k,E.prompt.suffix);if(be&&be.length>0)return Li.debug(e,"Current completion changed before returning"),{type:"canceled",reason:"current completion changed before returning",telemetryData:fg(z)}}if(V&&De.length>0&&le!==2){t=t.applyEdits([{newText:De[0].completion.completionText,range:{start:t.position,end:t.position}}]);let be=new Mn.CancellationTokenSource().token;K.then(()=>{Zne(e,t,be,{isSpeculative:!0,opportunityId:b.opportunityId})})}return b.isSpeculative||u.setGhostText(k,E.prompt.suffix,ce,le),c("complete"),{type:"success",value:[De,le],telemetryData:Xs(z),telemetryBlob:z,resultType:le,performanceMetrics:l}})}s(_pt,"getGhostTextWithoutAbortHandling");async function Zne(e,t,r,n){let i=_r(),o=await Qpt(e,t.textDocument,i,n);try{return e.get(Vd).schedule(t,i,o,r,n),await _pt(e,t,i,o,r,n)}catch(a){if(kc(a))return{type:"canceled",reason:"aborted at unknown location",telemetryData:fg(o,{cancelledNetworkRequest:!0})};throw a}}s(Zne,"getGhostText");function Spt(e,t,r,n,i){let o=e.get(zd).getCompletionsForUserTyping(t,r.suffix),a=Mpt(e,t,r,n,i);if(o&&o.length>0){let l=(a??[]).filter(c=>!o.some(u=>u.completionText===c.completionText));return[o.concat(l),2]}if(a&&a.length>0)return[a,1]}s(Spt,"getLocalInlineSuggestion");function Rpt(e,t){let r=kpt(t,e),n=Bpt(t,e);return r&&!n?void 0:r&&n}s(Rpt,"isInlineSuggestion");function kpt(e,t){return t.lineAt(e).text.substr(e.character).trim().length!=0}s(kpt,"isMiddleOfTheLine");function Bpt(e,t){let n=t.lineAt(e).text.substr(e.character).trim();return/^\s*[)>}\]"'`]*\s*[:{;,]?\s*$/.test(n)}s(Bpt,"isValidMiddleOfTheLinePosition");function Dpt(e,t){return t.lineAt(e).text.trim().length===0}s(Dpt,"isNewLine");var BA=class e{constructor(t=!1){this.requestMultilineOverride=t}static{s(this,"ForceMultiLine")}static{this.default=new e}};async function Ppt(e,t,r,n,i,o,a,l){if(e.get(BA).requestMultilineOverride)return{requestMultiline:!0};if(r.lineCount>=8e3)jt(e,"ghostText.longFileMultilineSkip",dn.createAndMarkAsIssued({languageId:r.detectedLanguageId,lineCount:String(r.lineCount),currentLine:String(n.line)}));else{if(t=="moremultiline"&&z5.isSupported(r.detectedLanguageId)){let f=await l8e(r,n);return o||f==="empty-block"?{requestMultiline:!0,blockPosition:f}:{requestMultiline:!1,blockPosition:f}}if(a){let f=LS(r,n),m=f.current>0?r.lineAt(n).text[0]:void 0,h={range:{start:n,end:n},newText:`
`+(m?m.repeat(f.current):"")};r=r.applyEdits([h])}if(["typescript","typescriptreact"].includes(r.detectedLanguageId)&&Dpt(n,r))return{requestMultiline:!0};let u=!1;return!i&&uf(r.detectedLanguageId)?u=await MO(r,n):i&&uf(r.detectedLanguageId)&&(u=await MO(r,n)||await MO(r,r.lineAt(n).range.end)),u||["javascript","javascriptreact","python"].includes(r.detectedLanguageId)&&(u=d8e(l.prompt,r.detectedLanguageId)>.5),{requestMultiline:u}}return{requestMultiline:!1}}s(Ppt,"shouldRequestMultiline");function IU(e,t,r,n){if(Vn(e,Rt.EnablePrefixCache)??e.get(or).enablePrefixCompletionsCache(n)){e.get(Eh).append(t.prefix,r.choices);return}let i={...t.prompt};t.requestForNextLine&&(i.prefix=i.prefix.slice(0,-1));let o=dJ(i),a=e.get(Af).get(o);a&&a.multiline===r.multiline?e.get(Af).set(o,{multiline:a.multiline,choices:a.choices.concat(r.choices)}):e.get(Af).set(o,r),Li.debug(e,`Appended ${r.choices.length} cached ghost text for key: ${o}, multiline: ${r.multiline}, total number of suggestions: ${(a?.choices.length??0)+r.choices.length}`)}s(IU,"appendToCache");function Npt(e,t,r){let n=e.get(Af).get(t);if(n&&!(r&&!n.multiline))return n.choices}s(Npt,"getCachedChoices");function Lpt(e,t,r){if(r.length>0){if(t.startsWith(r))return{completionIndex:e,completionText:t,displayText:t.substring(r.length),displayNeedsWsOffset:!1};{let n=t.substring(0,t.length-t.trimStart().length);return r.startsWith(n)?{completionIndex:e,completionText:t,displayText:t.trimStart(),displayNeedsWsOffset:!0}:{completionIndex:e,completionText:t,displayText:t,displayNeedsWsOffset:!1}}}else return{completionIndex:e,completionText:t,displayText:t,displayNeedsWsOffset:!1}}s(Lpt,"adjustLeadingWhitespace");var Fpt=50;function Mpt(e,t,r,n,i){if(Vn(e,Rt.EnablePrefixCache)??e.get(or).enablePrefixCompletionsCache(i)){let o=e.get(Eh).findAll(t);return o.length===0?(Li.debug(e,"Found no completions in prefix cache"),[]):(Li.debug(e,`Found ${o.length} completions in prefix cache`),o.map(a=>EU(a,{forceSingleLine:!n})))}for(let o=0;o<Fpt;o++){let a=[],l=r.prefix.substring(0,r.prefix.length-o),c=dJ({prefix:l,suffix:r.suffix}),u=Npt(e,c,n);if(!u)continue;Li.debug(e,`Got completions from cache at ${o} characters back for key: ${c}, multiline: ${n}`);let f=r.prefix.substring(l.length);for(let m of u){let h=m.completionText;if(!h.startsWith(f)||h.length<=f.length)continue;h=h.substring(f.length);let p=EU({...m,completionText:h},{forceSingleLine:!n});p.telemetryData.measurements.foundOffset=o,p.completionText!==""&&a.push(p)}if(Li.debug(e,`Found ${a.length} matching completions from cache at ${o} characters back`),a.length>0)return a}return[]}s(Mpt,"getCompletionsFromCache");async function Qpt(e,t,r,n){let i={headerRequestId:r};n?.opportunityId&&(i.opportunityId=n.opportunityId),n?.selectedCompletionInfo?.text&&(i.completionsActive="true"),n?.isSpeculative&&(i.reason="speculative");let o=dn.createAndMarkAsIssued(i);return await e.get(or).updateExPValuesAndAssignments({uri:t.uri,languageId:t.detectedLanguageId},o)}s(Qpt,"createTelemetryWithExp");function Opt(e,t,r,n,i){let o=n.requestId,a={choiceIndex:n.choiceIndex.toString(),clientCompletionId:n.clientCompletionId};n.generatedChoiceIndex!==void 0&&(a.originalChoiceIndex=a.choiceIndex,a.choiceIndex=(1e4*(n.generatedChoiceIndex+1)+n.choiceIndex).toString());let l=n.completionText.split(`
`).length,c={compCharLen:n.completionText.length,numLines:r.requestForNextLine?l-1:l};n.meanLogProb&&(c.meanLogProb=n.meanLogProb),n.meanAlternativeLogProb&&(c.meanAlternativeLogProb=n.meanAlternativeLogProb);let u=n.telemetryData.extendedBy(a,c);return u.issuedTime=i.issuedTime,u.measurements.timeToProduceMs=performance.now()-i.issuedTime,sTe(u,t),u.extendWithRequestId(o),u.measurements.confidence=X9e(e,u),u.measurements.quantile=Z9e(e,u),Li.debug(e,`Extended telemetry for ${n.telemetryData.properties.headerRequestId} with retention confidence ${u.measurements.confidence} (expected as good or better than about ${u.measurements.quantile} of all suggestions)`),u}s(Opt,"telemetryWithAddData");function Upt(e,t,r,n,i,o,a,l){let c={languageId:t.detectedLanguageId};r.requestForNextLine!==void 0&&(c.requestForNextLine=r.requestForNextLine.toString()),c.isSpeculative=l.isSpeculative.toString();let u=o.extendedBy(c);sTe(u,t);let f=r.repoInfo;u.properties.gitRepoInformation=f===void 0?"unavailable":f===0?"pending":"available",f!==void 0&&f!==0&&(u.properties.gitRepoUrl=f.url,u.properties.gitRepoHost=f.hostname,u.properties.gitRepoOwner=f.owner,u.properties.gitRepoName=f.repo,u.properties.gitRepoPath=f.pathname),u.properties.engineName=a.modelId,u.properties.engineChoiceSource=a.engineChoiceSource,u.properties.isMultiline=JSON.stringify(r.multiline),u.properties.isCycling=JSON.stringify(r.isCycling);let m=t.lineAt(n.line),h=t.getText(No.range(m.range.start,n)),p=t.getText(No.range(n,m.range.end)),g=Array.from(i.neighborSource.entries()).map(E=>[E[0],E[1].map(_=>(0,iTe.SHA256)(_).toString())]),y={beforeCursorWhitespace:JSON.stringify(h.trim()===""),afterCursorWhitespace:JSON.stringify(p.trim()===""),neighborSource:JSON.stringify(g),blockMode:r.blockMode},x={...o8(i.prompt),promptEndPos:t.offsetAt(n),promptComputeTimeMs:i.computeTimeMs};i.metadata&&(y.promptMetadata=JSON.stringify(i.metadata)),i.contextProvidersTelemetry&&(y.contextProviders=JSON.stringify(i.contextProvidersTelemetry));let b=u.extendedBy(y,x);return b.measurements.contextualFilterScore=a8e(e,b,i.prompt),jt(e,"ghostText.issued",b),u}s(Upt,"telemetryIssued");function sTe(e,t){e.measurements.documentLength=t.getText().length,e.measurements.documentLineCount=t.lineCount}s(sTe,"addDocumentTelemetry");function aTe(e,t,r,n,i){let o=Date.now()-n,a=o-i,l=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:o,processingTimeMs:i,deltaMs:a,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN});l.extendWithRequestId(r.requestId),jt(e,`ghostText.${t}`,l)}s(aTe,"telemetryPerformance");var zd=class{constructor(){this.choices=[]}static{s(this,"CurrentGhostText")}get clientCompletionId(){return this.choices[0]?.clientCompletionId}setGhostText(t,r,n,i){i!==2&&(this.prefix=t,this.suffix=r,this.choices=n)}getCompletionsForUserTyping(t,r){let n=this.getRemainingPrefix(t,r);if(n!==void 0&&lTe(this.choices[0].completionText,n))return qpt(this.choices,n)}hasAcceptedCurrentCompletion(t,r){let n=this.getRemainingPrefix(t,r);if(n===void 0)return!1;let i=n===this.choices?.[0].completionText,o=this.choices?.[0].finishReason;return i&&o==="stop"}getRemainingPrefix(t,r){if(!(this.prefix===void 0||this.suffix===void 0||this.choices.length===0)&&this.suffix===r&&t.startsWith(this.prefix))return t.substring(this.prefix.length)}};function qpt(e,t){return e.filter(r=>lTe(r.completionText,t)).map(r=>({...r,completionText:r.completionText.substring(t.length)}))}s(qpt,"adjustChoicesStart");function lTe(e,t){return e.startsWith(t)&&e.length>t.length}s(lTe,"startsWithAndExceeds");d();d();d();var Vv=class{constructor(t,r,n){this._referenceCount=0;this._isDisposed=!1;this._offset=n;let i=t.get(Vr);this._tracker=i.onDidChangeTextDocument(o=>{if(o.document.uri===r){for(let a of o.contentChanges)if(a.rangeOffset+a.rangeLength<=this.offset){let l=a.text.length-a.rangeLength;this._offset=this._offset+l}}})}static{s(this,"ChangeTracker")}get offset(){return this._offset}push(t,r){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout(()=>{t(),this._referenceCount--,this._referenceCount===0&&(this._tracker.dispose(),this._isDisposed=!0)},r)}};d();var eie=class e{constructor(t,r,n=[],i,o,a){this._textDocument=t;this._position=r;this.originalPosition=i??Mn.Position.create(r.line,r.character),this.originalVersion=o??t.version,this.originalOffset=a??t.offsetAt(this.originalPosition),this._editsWithPosition=[...n]}static{s(this,"CompletionState")}get textDocument(){return this._textDocument}get position(){return this._position}get editsWithPosition(){return[...this._editsWithPosition]}updateState(t,r,n){return new e(t,r,n??this.editsWithPosition,this.originalPosition,this.originalVersion,this.originalOffset)}updatePosition(t){return this.updateState(this._textDocument,t)}addSelectedCompletionInfo(t){if(this.editsWithPosition.find(n=>n.source==="selectedCompletionInfo"))throw new Error("Selected completion info already applied");let r={range:t.range,newText:t.text};return this.applyEdits([r],!0)}applyEdits(t,r=!1){if(r&&t.length>1)throw new Error("Selected completion info should be a single edit");let n=this._textDocument,i=this._position,o=n.offsetAt(i),a=this.editsWithPosition;for(let{range:l,newText:c}of t){let u=n.getText(l),f=n.offsetAt(l.end);if(n=n.applyEdits([{range:l,newText:c}]),o<n.offsetAt(l.start)){let h={range:l,newText:c,positionAfterEdit:Mn.Position.create(i.line,i.character)};r&&(h.source="selectedCompletionInfo"),a.push(h);continue}o<f&&(o=f),o+=c.length-u.length,i=n.positionAt(o);let m={range:l,newText:c,positionAfterEdit:Mn.Position.create(i.line,i.character)};r&&(m.source="selectedCompletionInfo"),a.push(m)}return this.updateState(n,i,a)}};function yg(e,t){return new eie(e,t)}s(yg,"createCompletionState");d();function tie(e,t,r=(n,i)=>n===i?0:1){if(t.length===0||e.length===0)return{distance:t.length,startOffset:0,endOffset:0};let n=new Array(t.length+1).fill(0),i=new Array(t.length+1).fill(0),o=new Array(e.length+1).fill(0),a=new Array(e.length+1).fill(0),l=t[0];for(let u=0;u<e.length+1;u++)u===0?n[u]=1:n[u]=r(e[u-1],l,u-1,0),i[u]=u>0?u-1:0;for(let u=1;u<t.length;u++){let f=o;o=n,n=f,f=a,a=i,i=f,l=t[u],n[0]=u+1;for(let m=1;m<e.length+1;m++){let h=1+o[m],p=1+n[m-1],g=r(e[m-1],l,m-1,u)+o[m-1];n[m]=Math.min(p,h,g),n[m]===g?i[m]=a[m-1]:n[m]===h?i[m]=a[m]:i[m]=i[m-1]}}let c=0;for(let u=0;u<e.length+1;u++)n[u]<n[c]&&(c=u);return{distance:n[c],startOffset:i[c],endOffset:c}}s(tie,"editDistance");function Wpt(){return new Map}s(Wpt,"emptyLexDictionary");function Gpt(e){let t=new Array(e.size);for(let[r,n]of e)t[n]=r;return t}s(Gpt,"reverseLexDictionary");function*Hpt(e){let t="",r;(l=>(l[l.Word=0]="Word",l[l.Space=1]="Space",l[l.Other=2]="Other"))(r||={});let n=0;for(let i of e){let o;new RegExp("(\\p{L}|\\p{Nd}|_)","u").test(i)?o=0:i===" "?o=1:o=2,o===n&&o!==2?t+=i:(t.length>0&&(yield t),t=i,n=o)}t.length>0&&(yield t)}s(Hpt,"lexGeneratorWords");function cTe(e,t,r,n){let i=[],o=0;for(let a of r(e))n(a)&&(t.has(a)||t.set(a,t.size),i.push([t.get(a),o])),o+=a.length;return[i,t]}s(cTe,"lexicalAnalyzer");function uTe(e){return e!==" "}s(uTe,"notSingleSpace");function fTe(e,t,r=Hpt){let[n,i]=cTe(e,Wpt(),r,uTe),[o,a]=cTe(t,i,r,uTe);if(o.length===0||n.length===0)return{lexDistance:o.length,startOffset:0,endOffset:0,haystackLexLength:n.length,needleLexLength:o.length};let l=Gpt(a),c=o.length,u=l[o[0][0]],f=l[o[c-1][0]];function m(y,x,b,E){if(E===0||E===c-1){let _=l[n[b][0]];return E==0&&_.endsWith(u)||E==c-1&&_.startsWith(f)?0:1}else return y===x?0:1}s(m,"compare");let h=tie(n.map(y=>y[0]),o.map(y=>y[0]),m),p=n[h.startOffset][1],g=h.endOffset<n.length?n[h.endOffset][1]:e.length;return g>0&&e[g-1]===" "&&--g,{lexDistance:h.distance,startOffset:p,endOffset:g,haystackLexLength:n.length,needleLexLength:o.length}}s(fTe,"lexEditDistance");d();function dTe(e,t){return e.compType==="partial"?e.acceptedLength:t.length}s(dTe,"computeCompCharLen");function mTe(e,t){return t.compType==="partial"?e.substring(0,t.acceptedLength):e}s(mTe,"computeCompletionText");function hTe(e,t,r){return e.displayText!==e.insertText&&e.insertText.trim()===e.displayText||r===3?t:t-e.range.end.character+e.range.start.character}s(hTe,"computePartialLength");var nC=new Gt("postInsertion"),pTe=[{seconds:15,captureCode:!1,captureRejection:!1},{seconds:30,captureCode:!0,captureRejection:!0},{seconds:120,captureCode:!1,captureRejection:!1},{seconds:300,captureCode:!1,captureRejection:!1},{seconds:600,captureCode:!1,captureRejection:!1}],gTe=50,jpt=1500,Vpt=.5,$pt=500,rie={triggerPostInsertionSynchroneously:!1,captureCode:!1,captureRejection:!1};async function ATe(e,t,r,n,i){let o=await e.get(On).getOrReadTextDocumentWithFakeClientProperties({uri:t});if(o.status!=="valid")return nC.info(e,`Could not get document for ${t}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1},capturedCode:"",terminationOffset:0};let a=o.document,l=a.getText(),c=l.substring(0,n),u=a.positionAt(n),f=await m6(e,r.properties.headerRequestId,yg(a,u),r),m=f.type==="prompt"?f.prompt:{prefix:c,suffix:"",isFimEnabled:!1};if(m.isFimEnabled&&i!==void 0){let h=l.substring(n,i);return m.suffix=l.substring(i),{prompt:m,capturedCode:h,terminationOffset:0}}else{let h=l.substring(n),p=ane(c,n,a.detectedLanguageId),y=await n6e(p,void 0)(h),x=Math.min(l.length,n+(y?y*2:$pt)),b=l.substring(n,x);return{prompt:m,capturedCode:b,terminationOffset:y??-1}}}s(ATe,"captureCode");function TU(e,t,r,n,i){i.forEach(({completionText:c,completionTelemetryData:u})=>{nC.debug(e,`${t}.rejected choiceIndex: ${u.properties.choiceIndex}`),B8e(e,t,u)});let o=new Vv(e,n,r-1),a=new Vv(e,n,r),l=s(async c=>{nC.debug(e,`Original offset: ${r}, Tracked offset: ${o.offset}`);let{completionTelemetryData:u}=i[0],{prompt:f,capturedCode:m,terminationOffset:h}=await ATe(e,n,u,o.offset+1,a.offset),p;f.isFimEnabled?p={hypotheticalPromptPrefixJson:JSON.stringify(f.prefix),hypotheticalPromptSuffixJson:JSON.stringify(f.suffix)}:p={hypotheticalPromptJson:JSON.stringify(f.prefix)};let g=u.extendedBy({...p,capturedCodeJson:JSON.stringify(m)},{timeout:c.seconds,insertionOffset:r,trackedOffset:o.offset,terminationOffsetInCapturedCode:h});nC.debug(e,`${t}.capturedAfterRejected choiceIndex: ${u.properties.choiceIndex}`,g),jt(e,t+".capturedAfterRejected",g,1)},"checkInCode");pTe.filter(c=>c.captureRejection).map(c=>o.push(rf(e,()=>l(c),"postRejectionTasks"),c.seconds*1e3))}s(TU,"postRejectionTasks");function $v(e,t,r,n,i,o,a,l){let c=o.extendedBy({compType:a.compType},{compCharLen:dTe(a,r)});nC.debug(e,`${t}.accepted choiceIndex: ${c.properties.choiceIndex}`),k8e(e,t,c);let u=r;r=mTe(r,a);let f=r.trim(),m=new Vv(e,i,n),h=new Vv(e,i,n+r.length),p=s(async g=>{await Jpt(e,t,f,n,i,g,c,m,h)},"stillInCodeCheck");if(rie.triggerPostInsertionSynchroneously&&sh(e)){let g=p({seconds:0,captureCode:rie.captureCode,captureRejection:rie.captureRejection});e.get(Ro).register(g)}else pTe.map(g=>m.push(rf(e,()=>p(g),"postInsertionTasks"),g.seconds*1e3));rf(e,zpt,"post insertion citation check")(e,i,u,r,n,l)}s($v,"postInsertionTasks");async function zpt(e,t,r,n,i,o){if(!o||(o.ip_code_citations?.length??0)<1)return;let a=await e.get(Vr).getTextDocument({uri:t});if(a){let l=nie(a.getText(),n,gTe,i);l.stillInCodeHeuristic&&(i=l.foundOffset)}for(let l of o.ip_code_citations){let c=Ypt(r.length,n.length,l.start_offset);if(c===void 0){nC.info(e,`Full completion for ${t} contains a reference matching public code, but the partially inserted text did not include the match.`);continue}let u=i+c,f=a?.positionAt(u),m=i+Kpt(r.length,n.length,l.stop_offset),h=a?.positionAt(m),p=f&&h?a?.getText({start:f,end:h}):"<unknown>";await e.get(gf).handleIPCodeCitation(e,{inDocumentUri:t,offsetStart:u,offsetEnd:m,version:a?.version,location:f&&h?{start:f,end:h}:void 0,matchingText:p,details:l.details.citations})}}s(zpt,"citationCheck");function Ypt(e,t,r){if(!(t<e&&r>t))return r}s(Ypt,"computeCitationStart");function Kpt(e,t,r){return t<e?Math.min(r,t):r}s(Kpt,"computeCitationEnd");function nie(e,t,r,n){let i=e.substring(Math.max(0,n-r),Math.min(e.length,n+t.length+r)),o=fTe(i,t),a=o.lexDistance/o.needleLexLength,{distance:l}=tie(i.substring(o.startOffset,o.endOffset),t);return{relativeLexEditDistance:a,charEditDistance:l,completionLexLength:o.needleLexLength,foundOffset:o.startOffset+Math.max(0,n-r),lexEditDistance:o.lexDistance,stillInCodeHeuristic:a<=Vpt?1:0}}s(nie,"find");async function Jpt(e,t,r,n,i,o,a,l,c){let u=await e.get(On).getOrReadTextDocument({uri:i});if(u.status==="valid"){let m=u.document.getText(),h=nie(m,r,gTe,l.offset);h.stillInCodeHeuristic||(h=nie(m,r,jpt,l.offset)),nC.debug(e,`stillInCode: ${h.stillInCodeHeuristic?"Found":"Not found"}! Completion '${r}' in file ${i}. lexEditDistance fraction was ${h.relativeLexEditDistance}. Char edit distance was ${h.charEditDistance}. Inserted at ${n}, tracked at ${l.offset}, found at ${h.foundOffset}. choiceIndex: ${a.properties.choiceIndex}`);let p=a.extendedBy({},{timeout:o.seconds,insertionOffset:n,trackedOffset:l.offset}).extendedBy({},h);if(jt(e,t+".stillInCode",p),o.captureCode){let{prompt:g,capturedCode:y,terminationOffset:x}=await ATe(e,i,p,l.offset,c.offset),b;g.isFimEnabled?b={hypotheticalPromptPrefixJson:JSON.stringify(g.prefix),hypotheticalPromptSuffixJson:JSON.stringify(g.suffix)}:b={hypotheticalPromptJson:JSON.stringify(g.prefix)};let E=a.extendedBy({...b,capturedCodeJson:JSON.stringify(y)},{timeout:o.seconds,insertionOffset:n,trackedOffset:l.offset,terminationOffsetInCapturedCode:x});nC.debug(e,`${t}.capturedAfterAccepted choiceIndex: ${a.properties.choiceIndex}`,p),jt(e,t+".capturedAfterAccepted",E,1)}}}s(Jpt,"checkStillInCode");var iie=new Gt("ghostText"),w0=class{static{s(this,"LastGhostText")}#e;#t;#i=[];get position(){return this.#e}get shownCompletions(){return this.#i||[]}get uri(){return this.#t}resetState(){this.#t=void 0,this.#e=void 0,this.#i=[]}setState({uri:t},r){this.#t=t,this.#e=r,this.#i=[]}resetPartialAcceptanceState(){this.partiallyAcceptedLength=0}};function Xpt(e){let t=[];return e.shownCompletions.forEach(r=>{if(r.displayText&&r.telemetry){let n,i;e.partiallyAcceptedLength?(n=r.displayText.substring(e.partiallyAcceptedLength-1),i=r.telemetry.extendedBy({compType:"partial"},{compCharLen:n.length})):(n=r.displayText,i=r.telemetry);let o={completionText:n,completionTelemetryData:i,offset:r.offset};t.push(o)}}),t}s(Xpt,"computeRejectedCompletions");function oie(e,t){let r=e.get(w0);if(!r.position||!r.uri)return;let n=Xpt(r);n.length>0&&TU(e,"ghostText",t??n[0].offset,r.uri,n),r.resetState(),r.resetPartialAcceptanceState()}s(oie,"rejectLastShown");function yTe(e,t,r,n){let i=e.get(w0);return i.position&&i.uri&&!(i.position.line===r.line&&i.position.character===r.character&&i.uri.toString()===t.uri.toString())&&n!==2&&oie(e,t.offsetAt(i.position)),i.setState(t,r),i.index}s(yTe,"setLastShown");function CTe(e,t){let r=e.get(w0);if(r.index=t.index,!r.shownCompletions.find(n=>n.index===t.index)&&(t.uri===r.uri&&r.position?.line===t.position.line&&r.position?.character==t.position.character&&r.shownCompletions.push(t),t.displayText)){let n=t.resultType!==0;iie.debug(e,`[${t.telemetry.properties.headerRequestId}] shown choiceIndex: ${t.telemetry.properties.choiceIndex}, fromCache ${n}`),t.telemetry.measurements.compCharLen=t.displayText.length,SO(e,"ghostText",t)}}s(CTe,"handleGhostTextShown");function wU(e,t){let r=e.get(w0);r.resetState(),iie.debug(e,"Ghost text post insert");let n=r.partiallyAcceptedLength?{compType:"partial",acceptedLength:t.displayText.length}:{compType:"full"};return r.resetPartialAcceptanceState(),$v(e,"ghostText",t.displayText,t.offset,t.uri,t.telemetry,n,t.copilotAnnotations)}s(wU,"handleGhostTextPostInsert");function xTe(e,t,r,n=0){let i=e.get(w0);r===t.insertText.length&&i.resetState(),iie.debug(e,"Ghost text partial post insert");let o=hTe(t,r,n);if(o)return i.partiallyAcceptedLength=r,$v(e,"ghostText",t.displayText,t.offset,t.uri,t.telemetry,{compType:"partial",acceptedLength:o},t.copilotAnnotations)}s(xTe,"handlePartialGhostTextPostInsert");function vTe(e){let t=new M8;return t.set(lg,e),t.set(Hp,new Hp),t.set(po,new po),t.set(Eh,new Eh),t.set(Af,new Af),t.set(Zp,new Zp),t.set(or,new or(t)),t.set(tg,new tg),t.set(ic,new ic(t)),t.set(Ms,new Ms),t.set(af,new af),t.set(ou,new ou),t.set(yf,new yf),t.set(hu,new BS),t.set(hh,new A8),t.set(ch,new I_),t.set(Ro,new Ro),t.set(On,new On(t)),t.set(Th,xU(t)),t.set(w0,new w0),t.set(zd,new zd),t.set(BA,BA.default),t.set(IA,new IA(t)),t.set(Dd,new Dd(t)),t.set(Ia,new Ia),t.set(bh,new bh(t)),t.set(Go,new Go),t}s(vTe,"createCommonContext");d();d();var _U=class extends Error{static{s(this,"FetchSpeculationCanceledException")}constructor(t){super(t),this.name="FetchSpeculationCanceledException"}};d();var p6=class extends Error{static{s(this,"FetchSpeculationFailedException")}constructor(t){super(t),this.name="FetchSpeculationFailedException"}};var nWr=I.Object({prompt:I.String(),speculation:I.String(),languageId:I.String(),stops:I.Array(I.String())}),zv=class{static{s(this,"SpeculationFetcher")}constructor(t){this.ctx=t}async fetchSpeculation(t,r){let i={prompt:t.prompt,speculation:t.speculation,engineModelId:"copilot-centralus-h100",uiKind:"editsPanel",stops:t.stops},o=await this.ctx.get(or).updateExPValuesAndAssignments(),a=await this.ctx.get(hu).fetchAndStreamSpeculation(this.ctx,i,o,(l,c)=>{},r);switch(a.type){case"success":return a;case"canceled":throw new _U(a.reason);case"failed":throw new p6(a.reason)}}};d();d();var bTe=Ze(require("node:util"));function ETe(e,...t){return`[${e}] ${Zpt(t)}`}s(ETe,"formatLogMessage");function Zpt(e){return bTe.default.formatWithOptions({maxStringLength:1/0},...e)}s(Zpt,"format");function SU(e){return I3e(e)}s(SU,"verboseLogging");var RU=class extends Ga{constructor(r){super();this.console=r}static{s(this,"ConsoleLog")}logIt(r,n,i,...o){n==1?this.console.error(`[${i}]`,...o):(n==2||SU(r))&&this.console.warn(`[${i}]`,...o)}};d();var ITe=require("node:util");var g6=class extends ig{static{s(this,"TelemetryLogSenderImpl")}sendError(t,r,...n){tv(t,"log",dn.createAndMarkAsIssued({context:r,level:iv[1],message:egt(...n)}),1)}sendException(t,r,n){Ea(t,r,n)}};function egt(...e){return e.map(t=>(0,ITe.inspect)(t)).join(" ")}s(egt,"telemetryMessage");d();var QNe=Ze(require("crypto")),ONe=Ze(require("fs")),UNe=Ze(FNe()),qNe=require("tls"),WNe=Ze(MNe());var T9=new Gt("certificates"),Xa=class{static{s(this,"RootCertificateReader")}};function aG(e,t=process.platform){return new kle(e,[new Ble,new Dle,tTt(e,t)])}s(aG,"getRootCertificateReader");function tTt(e,t){switch(t){case"linux":return new Ple(e);case"darwin":return new Nle(e);case"win32":return new Lle(e);default:return new Fle}}s(tTt,"createPlatformReader");var Rle=class extends Xa{constructor(r,n){super();this.ctx=r;this.delegate=n}static{s(this,"ErrorHandlingCertificateReader")}async getAllRootCAs(){try{return await this.delegate.getAllRootCAs()}catch(r){return T9.warn(this.ctx,"Failed to read root certificates:",r),[]}}},kle=class extends Xa{constructor(r,n){super();this.ctx=r;this.delegates=n.map(i=>new Rle(r,i))}static{s(this,"CachingRootCertificateReader")}async getAllRootCAs(){return this.certificates||(this.certificates=this.removeExpiredCertificates((await Promise.all(this.delegates.map(r=>r.getAllRootCAs()))).flat())),this.certificates}removeExpiredCertificates(r){let n=Date.now(),i=r.filter(o=>{try{let a=new QNe.X509Certificate(o),l=Date.parse(a.validTo);return isNaN(l)||l>n}catch(a){return T9.warn(this.ctx,"Failed to parse certificate",o,a),!1}});return r.length!==i.length&&T9.info(this.ctx,`Removed ${r.length-i.length} expired certificates`),i}},Ble=class extends Xa{static{s(this,"NodeTlsRootCertificateReader")}getAllRootCAs(){return qNe.rootCertificates}},Dle=class extends Xa{static{s(this,"EnvironmentVariableRootCertificateReader")}async getAllRootCAs(){let t=process.env.NODE_EXTRA_CA_CERTS;return t?await GNe(t):[]}},Ple=class extends Xa{constructor(r){super();this.ctx=r}static{s(this,"LinuxRootCertificateReader")}async getAllRootCAs(){let r=[];for(let n of["/etc/ssl/certs/ca-certificates.crt","/etc/ssl/certs/ca-bundle.crt"]){let i=await GNe(n);T9.debug(this.ctx,`Read ${i.length} certificates from ${n}`),r=r.concat(i)}return r}},Nle=class extends Xa{constructor(r){super();this.ctx=r}static{s(this,"MacRootCertificateReader")}getAllRootCAs(){let r=UNe.get();return T9.debug(this.ctx,`Read ${r.length} certificates from Mac keychain`),r}},Lle=class extends Xa{constructor(r){super();this.ctx=r}static{s(this,"WindowsRootCertificateReader")}getAllRootCAs(){let r=WNe.all();return T9.debug(this.ctx,`Read ${r.length} certificates from Windows store`),r}},Fle=class extends Xa{static{s(this,"UnsupportedPlatformRootCertificateReader")}getAllRootCAs(){return Promise.reject(new Error("No certificate reader available for unsupported platform"))}};async function GNe(e){try{let r=(await ONe.promises.readFile(e,{encoding:"utf8"})).match(/-----BEGIN CERTIFICATE-----[\s\S]*?-----END CERTIFICATE-----/g);if(!r)return[];let n=r.filter(o=>o.length>0),i=new Set(n);return Array.from(i)}catch(t){if(t instanceof Error&&"code"in t&&t.code==="ENOENT")return[];throw t}}s(GNe,"readCertsFromFile");d();var tLe=Ze(require("http"));var wTt=407,gc=new Gt("proxySocketFactory"),Ug=class{static{s(this,"ProxySocketFactory")}},_b=class extends Error{static{s(this,"ProxySocketError")}constructor(t,r,n){super(t),this.code=r?.code,this.syscall=r?.syscall,this.errno=r?.errno,/^Failed to establish a socket connection to proxies:/.test(r?.message??"")?this.code="ProxyFailedToEstablishSocketConnection":/^InitializeSecurityContext:/.test(r?.message??"")?this.code="ProxyInitializeSecurityContext":r?.message==="Miscellaneous failure (see text): Server not found in Kerberos database"?this.code="ProxyKerberosServerNotFound":/^Unspecified GSS failure. {2}Minor code may provide more information: No Kerberos credentials available/.test(r?.message??"")&&(this.code="ProxyGSSFailureNoKerberosCredentialsAvailable"),n!==void 0&&(this.code=n)}};function lG(e){return new Ole(e,new Ule(e))}s(lG,"getProxySocketFactory");var Ole=class extends Ug{constructor(r,n,i=new hk,o=process.platform){super();this.ctx=r;this.delegate=n;this.kerberosLoader=i;this.platform=o;this.successfullyAuthorized=new un(20)}static{s(this,"KerberosProxySocketFactory")}async createSocket(r,n){this.successfullyAuthorized.get(this.getProxyCacheKey(n))&&(gc.debug(this.ctx,"Proxy authorization already successful once, skipping 407 rountrip"),await this.reauthorize(r,n));try{return await this.delegate.createSocket(r,n)}catch(i){if(i instanceof _b&&i.code===`ProxyStatusCode${wTt}`){gc.debug(this.ctx,"Proxy authorization required, trying to authorize first time");let o=await this.authorizeAndCreateSocket(r,n);if(o)return gc.debug(this.ctx,"Proxy authorization successful, caching result"),jt(this.ctx,"proxy.kerberosAuthorized"),this.successfullyAuthorized.set(this.getProxyCacheKey(n),!0),o}throw i}}async reauthorize(r,n){let i=await this.authorize(n);i&&(gc.debug(this.ctx,"Proxy re-authorization successful, received token"),r.headers["Proxy-Authorization"]="Negotiate "+i)}async authorizeAndCreateSocket(r,n){let i=await this.authorize(n);if(gc.debug(this.ctx,"Proxy authorization successful, received token"),i)return gc.debug(this.ctx,"Trying to create socket with proxy authorization"),r.headers["Proxy-Authorization"]="Negotiate "+i,await this.delegate.createSocket(r,n)}async authorize(r){gc.debug(this.ctx,"Loading kerberos module");let n=await this.kerberosLoader.load(),i=this.computeSpn(r);gc.debug(this.ctx,"Initializing kerberos client using spn",i);let o=await n.initializeClient(i);gc.debug(this.ctx,"Perform client side kerberos step");let a=await o.step("");return gc.debug(this.ctx,"Received kerberos server response"),a}computeSpn(r){let n=r.kerberosServicePrincipal;if(n)return gc.debug(this.ctx,"Using configured kerberos spn",n),n;let i=this.platform==="win32"?`HTTP/${r.host}`:`HTTP@${r.host}`;return gc.debug(this.ctx,"Using default kerberos spn",i),i}getProxyCacheKey(r){return r.host+":"+r.port}},Ule=class extends Ug{constructor(r){super();this.ctx=r}static{s(this,"TunnelingProxySocketFactory")}async createSocket(r,n){let i=this.createConnectRequestOptions(r,n);return new Promise((o,a)=>{gc.debug(this.ctx,"Attempting to establish connection to proxy");let l=tLe.request(i);l.useChunkedEncodingByDefault=!1,l.once("connect",(c,u,f)=>{gc.debug(this.ctx,"Socket Connect returned status code",c.statusCode),l.removeAllListeners(),u.removeAllListeners(),c.statusCode!==200?(u.destroy(),a(new _b(`tunneling socket could not be established, statusCode=${c.statusCode}`,void 0,`ProxyStatusCode${c.statusCode}`))):f.length>0?(u.destroy(),a(new _b(`got non-empty response body from proxy, length=${f.length}`,void 0,"ProxyNonEmptyResponseBody"))):(gc.debug(this.ctx,"Successfully established tunneling connection to proxy"),o(u))}),l.once("error",c=>{gc.debug(this.ctx,"Proxy socket connection error",c.message),l.removeAllListeners(),a(new _b(`tunneling socket could not be established, cause=${c.message}`,c))}),l.on("timeout",()=>{gc.debug(this.ctx,"Proxy socket connection timeout"),a(new _b(`tunneling socket could not be established, proxy socket connection timeout while connecting to ${i.host}:${i.port}`,void 0,"ProxyTimeout"))}),l.end()})}createConnectRequestOptions(r,n){let i=`${r.hostname}:${r.port}`,o={...n,method:"CONNECT",path:i,agent:!1,headers:{host:i,"Proxy-Connection":"keep-alive"},timeout:r.timeout};return r.localAddress&&(o.localAddress=r.localAddress),this.configureProxyAuthorization(o,r),o}configureProxyAuthorization(r,n){r.headers["Proxy-Authorization"]=[],r.proxyAuth&&r.headers["Proxy-Authorization"].push("Basic "+Buffer.from(r.proxyAuth).toString("base64")),n.headers&&n.headers["Proxy-Authorization"]&&r.headers["Proxy-Authorization"].push(n.headers["Proxy-Authorization"])}},hk=class{static{s(this,"KerberosLoader")}load(){return Promise.resolve().then(()=>Ze(eLe()))}};d();var oLe=require("node:os");var _Tt=new Gt("repository"),Sb="\\\\",sLe="(?:[#;].*)",S9=`(?:[^"${Sb}]|${Sb}.)`,STt="[0-9A-Za-z-]",rLe=`[A-Za-z]${STt}*`,aLe=`\\s*${sLe}?$`,lLe=`(?:[^"${Sb};#]|${Sb}.)`,RTt=`(?:"${S9}*"|"${S9}*(?<strCont>${Sb})$)`,kTt=`(?:${lLe}|${RTt})+`,BTt=`(?:(?<cont>${Sb})$)`,cLe=`(?<value>${kTt})${BTt}?${aLe}`,nLe=new RegExp(`^${cLe}`),DTt=new RegExp(`^(?<value>${S9}*(?:(?<strCont>${Sb})$|(?<quote>")))`),PTt=new RegExp(`^\\s*(?:(?<key>${rLe})\\s*=\\s*${cLe}|(?<soloKey>${rLe})${aLe})`),NTt=new RegExp(`(?<value>${lLe}+)|"(?<string>${S9}*)"`,"g"),iLe="[-.0-9A-Za-z]+",LTt=`\\s+"(?<ext>${S9}*)"`,FTt=`\\s+"(?<extOnly>${S9}*)"`,MTt=new RegExp(`^\\s*\\[(?:(?<simple>${iLe})${LTt}|${FTt}|(?<simpleOnly>${iLe}))\\]`),QTt=new RegExp(`^\\s*${sLe}$`),qle=class{constructor(t){this.content=t;this.stopped=!1;this.section="";this.line="";this.lineNum=0;this.lines=[];this.linesWithErrors=[]}static{s(this,"GitConfigParser")}parse(t){for(this.stopped=!1,this.section="",this.line="",this.linesWithErrors=[],this.configValueHandler=t,this.lines=this.content.split(/\r?\n/),this.lineNum=0;!this.stopped&&this.lineNum<this.lines.length;this.lineNum++)this.line=this.lines[this.lineNum],this.parseSectionStart(),this.parseConfigPair(),this.parseComment(),/^\s*$/.test(this.line)||this.errorAt(this.lineNum+1)}stop(){this.stopped=!0}hasErrors(){return this.linesWithErrors.length>0}errorAt(t){this.linesWithErrors.push(t)}parseSectionStart(){let t=this.line.match(MTt);t&&(t.groups?.simple?this.section=t.groups.simple.toLowerCase()+"."+this.unescapeBaseValue(t.groups.ext):t.groups?.extOnly?this.section="."+this.unescapeBaseValue(t.groups.extOnly):this.section=t.groups.simpleOnly.toLowerCase(),this.line=this.line.slice(t[0].length))}unescapeBaseValue(t){return t.replace(/\\(.)/g,"$1")}parseConfigPair(){let t=this.line.match(PTt);if(t){if(t.groups?.key){let r=this.handleContinued(t);this.configValueHandler?.(this.nameWithSection(t.groups.key.toLowerCase()),r)}else t.groups?.soloKey&&this.configValueHandler?.(this.nameWithSection(t.groups.soloKey.toLowerCase()),"");this.line=""}}handleContinued(t){let r=t,n=[this.matchedValue(r)];for(;r?.groups?.cont||r?.groups?.strCont;){if(this.line=this.lines[++this.lineNum],this.lineNum>=this.lines.length){this.errorAt(this.lineNum);break}r.groups.strCont?(r=this.line.match(DTt),r?(n.push(this.matchedValue(r)),r.groups?.quote&&(r=this.line.slice(r[0].length).match(nLe),r?n.push(this.matchedValue(r)):this.errorAt(this.lineNum+1))):this.errorAt(this.lineNum+1)):(r=this.line.match(nLe),r?n.push(this.matchedValue(r)):this.errorAt(this.lineNum+1))}return this.normalizeValue(n.join(""))}matchedValue(t){return t.groups.strCont?t.groups.value.slice(0,-1):t.groups.value}normalizeValue(t){let r=!1,n=[...t.matchAll(NTt)].map(i=>i.groups?.value?(r=!0,this.unescapeValue(i.groups.value.replace(/\s/g," "))):(r=!1,this.unescapeValue(i.groups.string))).join("");return r?n.trimEnd():n}unescapeValue(t){let r={n:`
`,t:" ",b:"\b"};return t.replace(/\\(.)/g,(n,i)=>r[i]||i)}nameWithSection(t){return this.section?this.section+"."+t:t}parseComment(){QTt.test(this.line)&&(this.line="")}},cG=class extends vh{static{s(this,"GitParsingConfigLoader")}async getConfig(t,r){let n=await IA.getRepoConfigLocation(t,r);if(!n)return;let i=await this.getParsedConfig(t,n);if(i)return this.mergeConfig(await this.baseConfig(t,n),i)}mergeConfig(...t){return t.filter(r=>r!==void 0).reduce((r,n)=>r.concat(n),new Nv)}async getParsedConfig(t,r,n=!0){let i=await this.tryLoadConfig(t,r,n);if(!i)return;let o=new qle(i),a=new Nv;return o.parse((l,c)=>a.add(l,c)),a}async tryLoadConfig(t,r,n){try{return await t.get(xo).readFileString(r)}catch(i){(n||!(i instanceof Error)||i.code!=="ENOENT")&&_Tt.warn(t,`Failed to load git config from ${JSON.stringify(r)}:`,i);return}}async baseConfig(t,r){let n=await this.commondirConfigUri(t,r),i=Bo(this.xdgConfigUri(),"git","config"),o=Bo(this.homeUri(),".gitconfig");return this.mergeConfig(await this.getParsedConfig(t,i,!1),await this.getParsedConfig(t,o,!1),n?await this.getParsedConfig(t,n,!1):void 0)}async commondirConfigUri(t,r){if(Pi(r).toLowerCase()!=="config.worktree")return;let n=of(r),i=Bo(n,"commondir");try{let o=(await t.get(xo).readFileString(i)).trimEnd();return Bo(nv(n,o),"config")}catch{return}}xdgConfigUri(){return typeof process<"u"&&process.env.XDG_CONFIG_HOME?ll(process.env.XDG_CONFIG_HOME):Bo(this.homeUri(),".config")}homeUri(){return ll((0,oLe.homedir)())}};d();var uLe=require("child_process");var uG=class extends vh{static{s(this,"GitCLIConfigLoader")}runCommand(t,r,n){return new Promise((i,o)=>{(0,uLe.execFile)(r,n,{cwd:t},(a,l)=>{a?o(a):i(l)})})}async tryRunCommand(t,r,n,i){try{return await this.runCommand(r,n,i)}catch(o){_Ie.info(t,`Failed to run command '${n}' in ${r}:`,o);return}}async getConfig(t,r){let n=Xo(r);if(n===void 0)return;let i=await this.tryRunCommand(t,n,"git",["-c","safe.directory=*","config","--list","--null",...this.extraArgs()]);return i?this.extractConfig(i):void 0}extractConfig(t){let r=new Nv;for(let n of t.split("\0").filter(i=>i)){let i=n.split(`
`,1)[0],o=n.slice(i.length+1);r.add(i,o)}return r}extraArgs(){return[]}};d();var dLe=Ze(require("node:events"));var fLe="onWorkspaceChanged",Lf=class{constructor(){this.emitter=new dLe.default}static{s(this,"WorkspaceNotifier")}onChange(t){this.emitter.on(fLe,t)}emit(t){this.emitter.emit(fLe,t)}};function mLe(e){let t=vTe(e);return OTt(t),t.set(Xa,aG(t)),t.set(Ug,lG(t)),t.set(vh,new aO([new uG,new cG])),t.set(Lf,new Lf),t.set(zv,new zv(t)),t}s(mLe,"createProductionContext");function OTt(e){e.set(wd,wd.fromEnvironment(!1)),e.set(ig,new g6),e.set(Ga,new RU(console))}s(OTt,"setupRudimentaryLogging");var qKr=new Gt("context");d();d();var Kr=new Gt("chat");d();d();var ml=(o=>(o.System="system",o.User="user",o.Assistant="assistant",o.Function="function",o.Tool="tool",o))(ml||{});function ln(e){return e?(e=Ff(e),typeof e=="string"?e:e.map(t=>"text"in t?t.text:"").join("")):""}s(ln,"getTextPart");var hLe=s((e,t)=>I.Unsafe({type:"string",enum:e,description:t?.description}),"StringEnum"),pLe=I.Optional(I.Object({agentSlug:I.String(),state:I.Union([I.Literal("accepted"),I.Literal("dismissed")]),confirmation:I.Any()}));function LC(e){if(typeof e.function.arguments=="string")try{return JSON.parse(e.function.arguments)}catch{return{}}return e.function.arguments}s(LC,"parseToolCallArguments");function gLe(e){return typeof e.function.arguments=="object"&&(e.function.arguments=JSON.stringify(e.function.arguments)),e}s(gLe,"toOpenAIToolCall");function ALe(e,t,r,n,i,o,a,l){let c=JSON.parse(JSON.stringify(t));return r.tool_calls&&(c.tool_calls=r.tool_calls),H8(e,[c],l),{message:t,choiceIndex:n,requestId:i,blockFinished:o,finishReason:a,tokens:r.tokens,numTokens:r.tokens.length,tool_calls:r.tool_calls,function_call:r.function_call,telemetryData:l}}s(ALe,"convertToChatCompletion");function Wle(e){return Array.isArray(e)&&e.every(t=>"type"in t&&!("role"in t))}s(Wle,"isChatCompletionContentPartArray");function fG(e){return Array.isArray(e)&&e.every(t=>"role"in t)}s(fG,"isChatMessageArray");function Ff(e){if(typeof e=="string")return e;if(Wle(e))return e;if(fG(e)){let t=e.filter(n=>n.role==="assistant"),r=[];for(let n of t)Array.isArray(n.content)?r.push(...n.content):r.push({type:"text",text:n.content});return r}return""}s(Ff,"resolveAsChatMessageContent");function pk(e,t){return(typeof e=="string"||Wle(e))&&(e=[{role:"assistant",content:e}]),e.push(t),e}s(pk,"appendChatMessageContent");function Gle(e,t){if(e){if(typeof e=="string"||Wle(e))return[{role:"assistant",content:e}];if(fG(e))return t?e:e.filter(r=>r.role!=="tool").map(r=>r.tool_calls?{...r,tool_calls:void 0,tool_call_id:void 0}:r)}else return[];return[]}s(Gle,"resolveResponseAsChatMessages");d();var Hle=new Gt("streamMessages");function yLe(e,t,r){let n=t.solution.text.join(""),i=!1;t.finishOffset!==void 0&&(Hle.debug(e,`message ${t.index}: early finish at offset ${t.finishOffset}`),n=n.substring(0,t.finishOffset),i=!0),Hle.info(e,`message ${t.index} returned. finish reason: [${t.reason}]`),Hle.debug(e,`message ${t.index} details: finishOffset: [${t.finishOffset}] completionId: [{${t.requestId.completionId}}] created: [{${t.requestId.created}}]`);let o=kS(t.solution),a={role:"assistant",content:n};return ALe(e,a,o,t.index,t.requestId,i,t.reason??"",r)}s(yLe,"prepareChatCompletionForReturn");var cm=new Gt("fetchChat"),dG=class{static{s(this,"OpenAIChatMLFetcher")}async fetchAndStreamChat(t,r,n,i,o){let a=await this.fetchWithParameters(t,r.endpoint,r,n,o);if(a==="not-sent")return{type:"canceled",reason:"before fetch request"};if(o?.isCancellationRequested){let l=a.body();try{l.destroy()}catch(c){cm.exception(t,c,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(a.status!==200){let l=this.createTelemetryData(r.endpoint,t,r);return this.handleError(t,l,a)}if(r.postOptions?.stream===!1){let l=await a.text(),c=JSON.parse(l),u=c.choices!=null?c.choices[0].message:{role:"assistant",content:""},f=a.headers.get("X-Request-ID")??_r(),m={blockFinished:!1,choiceIndex:0,finishReason:"stop",message:u,tokens:ln(u.content).split(" "),requestId:{headerRequestId:f,completionId:c.id?c.id:"",created:c.created?Number(c.created):0,deploymentId:"",serverExperiments:""},telemetryData:n,numTokens:0},h=ln(u.content);return await i(h,{text:h,copilotReferences:c.copilot_references}),{type:"success",chatCompletions:async function*(){yield m}(),getProcessingTime:s(()=>j8(a),"getProcessingTime")}}else{let c=K5.create(t,r.count,a,n,[],o).processSSE(i);return{type:"success",chatCompletions:TA(c,f=>yLe(t,f,n)),getProcessingTime:s(()=>j8(a),"getProcessingTime")}}}createTelemetryData(t,r,n){return dn.createAndMarkAsIssued({endpoint:t,engineName:n.engineName,uiKind:n.uiKind,headerRequestId:n.ourRequestId})}async fetchWithParameters(t,r,n,i,o){let a={messages:n.messages,tools:n.tools,tool_choice:n.tool_choice,model:n.model,temperature:V8(t,n.count),top_p:IO(t),n:n.count,stop:[`
`],copilot_thread_id:n.copilot_thread_id},l=AA(n.repoInfo);return l!==void 0&&(a.nwo=l),n.postOptions&&Object.assign(a,n.postOptions),n.intent&&(a.intent=n.intent,n.intent_model&&(a.intent_model=n.intent_model),n.intent_tokenizer&&(a.intent_tokenizer=n.intent_tokenizer),n.intent_threshold&&(a.intent_threshold=n.intent_threshold),n.intent_content&&(a.intent_content=n.intent_content)),o?.isCancellationRequested?"not-sent":await UTt(t,n.messages,n.capiUrl,n.engineName,r,n.ourRequestId,a,n.authToken,n.uiKind,i,n.llmInteraction,o)}async handleError(t,r,n){if(n.clientError&&!n.headers.get("x-github-request-id")){let o=`Last response was a ${n.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;cm.error(t,o),r.properties.error=`Response status was ${n.status} with no x-github-request-id header`}else r.properties.error=`Response status was ${n.status}`;if(r.properties.status=String(n.status),jt(t,"request.shownWarning",r),n.status===401)try{let o=await n.text(),a=JSON.parse(o);if(a.authorize_url)return{type:"authRequired",reason:"not authorized",authUrl:a.authorize_url}}catch{}if(n.status===401||n.status===403)return t.get(en).resetToken(n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`,code:n.status};if(n.status===499)return cm.info(t,"Cancelled by server"),{type:"failed",reason:"canceled by server",code:n.status};let i=await n.text();if(n.status===466)return cm.info(t,i),{type:"failed",reason:`client not supported: ${i}`,code:n.status};if(n.status===400&&i.includes("off_topic"))return{type:"failed",reason:"filtered as off_topic by intent classifier: message was not programming related",code:n.status};if(n.status===400&&i.includes("model_not_supported"))return{type:"failed",reason:"model is not supported.",code:n.status};if(n.status==400&&i.includes("model_max_prompt_tokens_exceeded"))return{type:"failed",reason:"model max prompt tokens exceeded.",code:n.status};if(n.status===424)return{type:"failedDependency",reason:i};if(n.status===402){if(i.includes("free_quota_exceeded")){let l=n.headers.get("retry-after");return{type:"failed",reason:l?`You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait until ${new Date(l).toLocaleString()} for your limit to reset.`:"You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait for your limit to reset.",code:n.status}}else if(i.includes("overage_limit_reached"))return{type:"failed",reason:"You cannot accrue additional overages at this time. Please contact [GitHub Support](https://support.github.com/contact) to continue using Copilot.",code:n.status};return{type:"failed",reason:"Quota Exceeded.",code:n.status}}return cm.error(t,"Unhandled status from server:",n.status,i),{type:"failed",reason:`unhandled status from server: ${n.status} ${i}`,code:n.status}}};async function UTt(e,t,r,n,i,o,a,l,c,u,f,m){let h=Bo(r,n,i);if(!l)throw new Error(`Failed to send request to ${h} due to missing key`);let p=u.extendedBy({endpoint:i,engineName:n,uiKind:c});EO(a,p,["messages"]),p.properties.headerRequestId=o,jt(e,"request.sent",p);let g=ia(),y=b8e(c),x={..._5(e),...f.toCapiHeaders()};return a.messages?.some(b=>Array.isArray(b.content)?b.content.some(E=>"image_url"in E):!1)&&(x["Copilot-Vision-Request"]="true"),a.messages&&a.messages.forEach(b=>{qTt(b)&&b.tool_calls&&(b.tool_calls=b.tool_calls.map(E=>gLe(E)))}),Qx(e,h,l,y,o,a,m,x).then(b=>{let E=J5(b,void 0);p.extendWithRequestId(E);let _=ia()-g;return p.measurements.totalTimeMs=_,cm.info(e,`Request ${o} at <${h}> finished with ${b.status} status after ${_}ms`),cm.debug(e,"request.response properties",p.properties),cm.debug(e,"request.response measurements",p.measurements),cm.debug(e,"messages:",JSON.stringify(t)),jt(e,"request.response",p),b}).catch(b=>{if(kc(b))throw b;let E=p.extendedBy({error:"Network exception"});jt(e,"request.shownWarning",E),p.properties.message=String(b0(b,"name")??""),p.properties.code=String(b0(b,"code")??""),p.properties.errno=String(b0(b,"errno")??""),p.properties.type=String(b0(b,"type")??"");let _=ia()-g;throw p.measurements.totalTimeMs=_,cm.info(e,`Request ${o} at <${h}> rejected with ${String(b)} after ${_}ms`),cm.debug(e,"request.error properties",p.properties),cm.debug(e,"request.error measurements",p.measurements),jt(e,"request.error",p),b}).finally(()=>{H8(e,t,p)})}s(UTt,"fetchWithInstrumentation");function qTt(e){return"tool_calls"in e}s(qTt,"isChatMessageWithToolCalls");var ka=class{constructor(t){this.ctx=t;this.fetcher=new dG}static{s(this,"ChatMLFetcher")}async fetchResponse(t,r,n,i){let o=_r(),a={n:t.num_suggestions??1,temperature:t.temperature??0,stop:t.stop,top_p:t.topP??1,copilot_thread_id:t.copilot_thread_id},l=t.modelConfiguration;l&&(a.max_tokens=l.maxResponseTokens,a.stream=!!l.stream),t.logitBias&&(a.logit_bias=t.logitBias);let c=await this.ctx.get(en).getToken(),u=f8(this.ctx,c),f=t.endpoint??"completions",m=t.authToken??c.token,h={messages:t.messages,repoInfo:void 0,ourRequestId:o,capiUrl:u,engineName:t.engineName??"chat",endpoint:f,count:t.num_suggestions??1,uiKind:t.uiKind,postOptions:a,authToken:m,...t.intentParams,llmInteraction:t.llmInteraction};return l&&(h.model=l.modelId),t.tools&&t.tools?.length>0&&(l===void 0||l.toolCalls)&&(h.tools=t.tools,h.tool_choice=t.tool_choice??"auto"),await this.fetch(h,i,r,n)}async fetch(t,r,n,i){try{let o=await this.fetcher.fetchAndStreamChat(this.ctx,t,i.extendedBy({uiKind:t.uiKind}),r||(()=>{}),n);switch(o.type){case"success":return await this.processSuccessfulResponse(t,o,t.ourRequestId,i);case"canceled":return this.processCanceledResponse(o,t.ourRequestId);case"failed":case"failedDependency":return this.processFailedResponse(o,t.ourRequestId);case"authRequired":return{type:"agentAuthRequired",reason:"Agent authentication required.",authUrl:o.authUrl,requestId:t.ourRequestId}}}catch(o){return this.processError(o,t.ourRequestId)}}async processSuccessfulResponse(t,r,n,i){let o=[],a=_S(r.chatCompletions,c=>this.postProcess(c,i));Kr.debug(this.ctx,`Process success response for request ${t.ourRequestId} with chatParams: ${JSON.stringify(t,null,2)}`);let l=0;for await(let c of a)Kr.debug(this.ctx,`Received choice #${l} for request ${t.ourRequestId}: ${JSON.stringify(c,null,2)}`),o.push(c),l++;if(o.length==1){let c=o[0];switch(c.finishReason){case"stop":return{type:"success",value:ln(c.message?.content)??"",toolCalls:c.tool_calls,requestId:n,numTokens:c.numTokens};case"tool_calls":return{type:"tool_calls",toolCalls:c.tool_calls,requestId:n};case"content_filter":return{type:"filtered",reason:"Response got filtered.",requestId:n};case"length":return{type:"length",reason:"Response too long.",requestId:n};case"DONE":return{type:"no_finish_reason",reason:"No finish reason received.",requestId:n};default:return{type:"unknown",reason:"Unknown finish reason received.",requestId:n}}}else if(o.length>1){let c=o.filter(u=>u.finishReason=="stop"||u.finishReason=="tool_calls");if(c.length>0)return{type:"successMultiple",value:c.map(u=>ln(u.message.content)),toolCalls:c.map(u=>u.tool_calls).filter(u=>u),requestId:n}}return{type:"no_choices",reason:"Response contained no choices.",requestId:n}}postProcess(t,r){return bU(t.tokens)?(r.extendWithRequestId(t.requestId),jt(this.ctx,"conversation.repetition.detected",r,0),t.finishReason!==""?t:void 0):t.message?t:void 0}processCanceledResponse(t,r){return Kr.debug(this.ctx,"Cancelled after awaiting fetchConversation"),{type:"canceled",reason:t.reason,requestId:r}}processFailedResponse(t,r){return t?.reason.includes("filtered as off_topic by intent classifier")?{type:"offTopic",reason:t.reason,requestId:r}:t?.reason.includes("model is not supported")?{type:"model_not_supported",reason:t.reason,requestId:r}:t?.reason.includes("model max prompt tokens exceeded")?{type:"model_max_prompt_tokens_exceeded",reason:t.reason,requestId:r}:{type:"failed",reason:t.reason,requestId:r,code:t.type==="failed"?t.code:void 0}}processError(t,r){return kc(t)?{type:"canceled",reason:"network request aborted",requestId:r}:(Kr.exception(this.ctx,t,"Error on conversation request"),{type:"failed",reason:"Error on conversation request. Check the log for more details.",requestId:r})}};d();var qg=class{constructor(t){this.ctx=t}static{s(this,"AbstractClientToolConfirmationInvoker")}};d();var FC=class{constructor(t){this.ctx=t}static{s(this,"AbstractClientToolInvoker")}};d();d();var Wg=class{constructor(t){this.ctx=t}static{s(this,"DefaultTextDocumentProvider")}async getByUri(t){return await this.ctx.get(On).getOrReadTextDocument({uri:t})}};var WTt=".github/copilot-instructions.md",GTt=".github/git-commit-instructions.md",HTt="global-copilot-instructions",jTt="global-git-commit-instructions",Gg=class{static{s(this,"CustomInstructionsService")}constructor(){this.globalCopilotInstructions=void 0,this.globalGitCommitInstructions=void 0}setGlobalCopilotInstructions(t,r){t&&t.trim()?this.globalCopilotInstructions={instruction:t.trim(),languageId:r}:this.globalCopilotInstructions=void 0}setGlobalGitCommitInstructions(t,r){t&&t.trim()?this.globalGitCommitInstructions={instruction:t.trim(),languageId:r}:this.globalGitCommitInstructions=void 0}getGlobalCopilotInstructions(){return this.globalCopilotInstructions}getGlobalGitCommitInstructions(){return this.globalGitCommitInstructions}getGlobalInstructions(t={}){let r=[];return t.includeCodeGenerationInstructions&&this.globalCopilotInstructions&&r.push({kind:1,content:[this.globalCopilotInstructions],reference:HTt}),t.includeCommitMessageGenerationInstructions&&this.globalGitCommitInstructions&&r.push({kind:1,content:[this.globalGitCommitInstructions],reference:jTt}),r}async _collectInstructionsFromFile(t,r,n,i,o,a){try{let l=Bo(r.uri,n),c=await t.getByUri(l);if(c.status!=="valid"||!c.document)return;let u=c.document.getText().trim();u&&o.push({kind:a,content:[{instruction:u,languageId:i}],reference:l})}catch{}}async readFromWorkspaces(t,r,n={}){let i=[];if(!r.length)return i;let o=new Wg(t),a=r.flatMap(l=>{let c=[];return n.includeCodeGenerationInstructions!==!1&&c.push(this._collectInstructionsFromFile(o,l,WTt,n.languageId,i,0)),n.includeCommitMessageGenerationInstructions&&c.push(this._collectInstructionsFromFile(o,l,GTt,void 0,i,0)),c});return await Promise.all(a),i}};d();var Ac=class{constructor(t){this.ctx=t}static{s(this,"EditProgressReporter")}},mG=class extends Ac{constructor(){super(...arguments);this.items=[]}static{s(this,"LibTestEditProgressReporter")}reset(){this.items=[]}async reportTurn(r,n){this.items.push({editConversationId:r.editConversationId,editTurnId:r.editTurnId,...n})}};d();d();d();function hG(){return _r()}s(hG,"uuidV4");d();var MC=class extends Error{static{s(this,"CopilotEditsCancelledByUserException")}constructor(){super("Operation cancelled by user"),this.name="CopilotEditsCancelledByUserException"}};d();var QC=class extends Error{static{s(this,"CopilotEditsProcessCodeBlockException")}constructor(t){super(t),this.name="CopilotEditsProcessCodeBlockException"}};d();d();d();var gk="filepath:",Ul="...existing code...",Rb="copilot-edited-file";d();function OC(e){let t=e.matchAll(/^\s*(```+)/gm),r=Math.max(3,...Array.from(t,n=>n[1].length+1));return"`".repeat(r)}s(OC,"getFenceForCodeBlock");var Mf=class{constructor(t){this.params=t;this.params.noFilePath===void 0&&(this.params.noFilePath=!1)}static{s(this,"CodeBlock")}renderAsArray(){let t=OC(this.params.code),r=[`${t}${this.params.languageId}`];return!this.params.noFilePath&&this.params.uri&&r.push(`// ${gk} ${Wa(this.params.uri)}`),r.push(this.params.shouldTrim?this.params.code.trim():this.params.code,t),r}renderAsString(t=`
`){return this.renderAsArray().join(t)}};var jle=class{constructor(t){this.props=t}static{s(this,"CodeBlockChangeDescription")}render(){if(this.props.markdownBeforeBlock)return["This is the description of what the code block changes:","<changeDescription>",this.props.markdownBeforeBlock,"","</changeDescription>",""].join(`
`)}},pG=class{constructor(t){this.props=t;this.shouldTrim=!0}static{s(this,"CodeMapperPrompt")}async render(){let t=await this.props.textDocumentProvider.getByUri(this.props.uri.toString());return[{role:"system",content:this.buildSystemMessage(t)},{role:"user",content:this.buildUserMessage(t)}]}transformToSpeculationPrompt(t,r,n){return t.reduce((o,a)=>{if(a.role==="system"){let l=ln(a.content).endsWith(`
`)?ln(a.content):`${ln(a.content)}
`;return`${o}<SYSTEM>
${l}
End your response with </${Rb}>.
</SYSTEM>
`}return o+ln(a.content)},"")+`
The resulting document:
<${Rb}>
${n}${r}
`}buildSystemMessage(t){if(t.status!=="valid")return"";let r=[];return r.push("You are an AI programming assistant that is specialized in applying code changes to an existing document.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.",`The user has a code block that represents a suggestion for a code change and a ${t.document.detectedLanguageId} file opened in a code editor.`,"Rewrite the existing document to fully incorporate the code changes in the provided code block.","For the response, always follow these instructions:","1. Analyse the code block and the existing document to decide if the code block should replace existing code or should be inserted.","2. If necessary, break up the code block into multiple parts and insert each part at the appropriate location.","3. Preserve whitespace and newlines right after the parts of the file that you modify.",`4. The final result must be syntactically valid, properly formatted, and correctly indented. It should not contain any \`${Ul}\` comments.`,"5. Finally, provide the fully rewritten file. You must output the complete file."),r.join(`
`)}buildUserMessage(t){let r=[];if(t.status!=="valid")return"";if(t.document.getText().length>0){let a=new Mf({code:t.document.getText(),languageId:t.document.detectedLanguageId,noFilePath:!0,shouldTrim:this.shouldTrim});r.push(`I have the following code open in the editor, starting from line 1 to line ${t.document.lineCount}.`,...a.renderAsArray())}else r.push("I am in an empty editor.");let i=new jle({markdownBeforeBlock:this.props.markdownBeforeBlock}).render();i&&r.push(i);let o=new Mf({code:this.props.codeBlock,languageId:t.document.detectedLanguageId,noFilePath:!0,shouldTrim:this.shouldTrim});return r.push("This is the code block that represents the suggested code change:",...o.renderAsArray(),"<userPrompt>","Provide the fully rewritten file, incorporating the suggested code change. You must produce the complete file.","</userPrompt>"),r.join(`
`)}};var R9=class{static{s(this,"CodeMapper")}constructor(t){this.ctx=t,this.logger=new Gt("CopilotEditsCodeMapper")}async mapCode(t,r,n,i=!1){if(!t.resource)throw new QC("No uri found in code block");if(r.isCancellationRequested)throw new MC;if(!t.code.includes(Ul))if(this.logger.debug(this.ctx,`Code block for uri ${t.resource} does not contain existing code marker`),i)this.logger.debug(this.ctx,`Running in agent mode, continue to do the speculation for ${t.resource}`);else return n&&await this.reportCodeBlock(t,n),t.code;let o=await this.ctx.get(On).getOrReadTextDocument({uri:t.resource});if(o.status==="notfound")return n&&await this.reportCodeBlock(t,n),t.code;if(o.status==="invalid"){let b=`Failed to find file ${t.resource} with status ${o.status} and reason ${o.reason}`,E=new QC(b);throw this.logger.error(this.ctx,b,E),E}let a=new pG({documentContext:{document:o},codeBlock:t.code,uri:t.resource,markdownBeforeBlock:t.markdownBeforeBlock,textDocumentProvider:new Wg(this.ctx)}),l=await a.render(),c=o.document.detectedLanguageId,u=OC(t.code),f=o.document.getText();if(f.length>0){let b=OC(f);b.length>u.length&&(u=b)}let m=a.transformToSpeculationPrompt(l,c,u);n&&await n({fileGenerationStatus:"edit-plan-generated",uri:t.resource,basename:Pi(t.resource),editDescription:t.markdownBeforeBlock});let h=hG(),p={prompt:m,speculation:o.document.getText(),languageId:c,stops:[`${u}
</${Rb}>`,`${u}\r
</${Rb}>`,`</${Rb}>`]};this.logger.debug(this.ctx,`Send speculation request ${h} with params: ${JSON.stringify(p,null,2)}`);let g=await this.ctx.get(zv).fetchSpeculation(p,r),y=[];for await(let b of g.choices)y.push(b.completionText);this.logger.debug(this.ctx,`Received speculation response ${h} with completions: ${JSON.stringify(y,null,2)}`);let x=y.find(b=>b.length>0);if(x)return n&&await n({fileGenerationStatus:"updated-code-generated",uri:t.resource,basename:Pi(t.resource),partialText:x,languageId:c,markdownCodeFence:OC(x)}),x;{let b=`No valid completion found for uri ${t.resource}`;throw new QC(b)}}async reportCodeBlock(t,r){await r({fileGenerationStatus:"edit-plan-generated",uri:t.resource,basename:Pi(t.resource),editDescription:t.markdownBeforeBlock}),await r({fileGenerationStatus:"updated-code-generated",partialText:t.code,uri:t.resource,basename:Pi(t.resource)})}};d();var zc=class extends Error{constructor(r){super(r.message);this.editConversationError=r;this.name="EditConversationException"}static{s(this,"EditConversationException")}};d();d();var UC=class{static{s(this,"CapiErrorTranslator")}static translateErrorMessage(t,r){switch(t){case 466:return"Oops, your plugin is out of date. Please update it.";case 401:return"Oops, you are not authorized. Please sign in.";case 402:return r||"Oops, you need to upgrade your plan.";case 413:return"Oops, your request is too large. Please try again with a smaller input.";case 429:return"Oops, you reached the rate limit. Please try again later.";default:return"Sorry, an error occurred while generating a response."}}};d();d();var gG=class extends Error{static{s(this,"EditTurnNotFoundException")}constructor(t){super(t),this.name="EditTurnNotFoundException"}};var qC=class{constructor(t,r){this.request=t;this.id=_r();this.timestamp=Date.now();this.status="in-progress";this.workingSet=[];r&&r.length>0&&(this.workingSet=r)}static{s(this,"EditTurn")}},Vle=class{constructor(t=[]){this.turns=[];this.turns=t}static{s(this,"EditTurnManager")}addTurn(t){this.turns.push(t)}deleteTurn(t){this.turns=this.turns.filter(r=>r.id!==t)}getLastTurn(){if(this.turns.length!==0)return this.turns[this.turns.length-1]}hasTurn(t){return this.turns.some(r=>r.id===t)}getTurns(){return[...this.turns]}},AG=class{constructor(t=[],r="panel",n="en"){this._id=_r();this._timestamp=Date.now();this.source="panel";this.userLanguage="en";this.source=r,this.userLanguage=n,this.turnsManager=new Vle(t)}static{s(this,"EditConversation")}get id(){return this._id}get timestamp(){return this._timestamp}getUserLanguage(){return this.userLanguage}getTurns(){return this.turnsManager.getTurns()}getSource(){return this.source}addTurn(t){this.turnsManager.addTurn(t)}deleteTurn(t){this.turnsManager.deleteTurn(t)}getLastTurn(){let t=this.turnsManager.getLastTurn();if(t===void 0)throw new gG(`No turns in the conversation ${this._id}`);return t}hasTurn(t){return this.turnsManager.hasTurn(t)}};var yG=class{static{s(this,"EditCodeResultProcessor")}static processResult(t,r){switch(r.type){case"success":return r.value;case"offTopic":{t.currentTurn.status="off-topic";let n="Sorry, but I can only assist with programming related questions.";throw t.currentTurn.response={message:n,type:"offtopic-detection"},new zc({message:n,responseIsFiltered:!0})}case"canceled":throw t.currentTurn.status="cancelled",t.currentTurn.response={message:b5,type:"user"},new zc({message:b5});case"failed":throw t.currentTurn.status="error",t.currentTurn.response={message:r.reason,type:"server"},new zc({message:UC.translateErrorMessage(r.code,r.reason),code:r.code});case"filtered":throw t.currentTurn.status="filtered",new zc({message:"Oops, your response got filtered.",responseIsFiltered:!0});case"length":throw t.currentTurn.status="error",new zc({message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0});case"agentAuthRequired":throw t.currentTurn.status="error",t.currentTurn.response={message:"Authorization required",type:"server"},new zc({message:"Authorization required",responseIsFiltered:!1});case"no_choices":throw t.currentTurn.status="error",t.currentTurn.response={message:"No choices returned",type:"server"},new zc({message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"no_finish_reason":throw t.currentTurn.status="error",t.currentTurn.response={message:"No finish reason",type:"server"},new zc({message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"model_not_supported":throw t.currentTurn.status="error",t.currentTurn.response={message:"Model not supported",type:"server"},new zc({message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1});case"model_max_prompt_tokens_exceeded":throw t.currentTurn.status="error",t.currentTurn.response={message:"Model max prompt tokens exceeded",type:"server"},new zc({message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",code:400,reason:"model_max_prompt_tokens_exceeded",responseIsFiltered:!1});case"successMultiple":case"tool_calls":case"unknown":throw t.currentTurn.status="error",new zc({message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1})}}};d();async function*xLe(e){yield e}s(xLe,"stringToAsyncIterable");d();d();var KA=class{static{s(this,"CopilotEditsPromptUriUtils")}static pathToUri(t,r){let n=t.mapToUriInWorkingSet(r);return n||ll(r)}static uriToPath(t){let r=Xo(t);if(r)return r;throw new Error(`Unsupported URI scheme: ${t.split(":")[0]}`)}static posixFilePathToUri(t){return process.platform==="win32"?`file:///c:${t}`:`file://${t}`}};var CG=class{constructor(t){this.props=t;this.exampleFilePath=this.getExampleFilePath("/path/to/file"),this.tsExampleFilePath=this.getExampleFilePath("/Users/someone/proj01/example.ts")}static{s(this,"EditCodePrompt")}async render(){let t=await this.getValidFilesInWorkingSet(),r=[{role:"system",content:this.buildSystemMessage(t)}];if(this.props.history&&this.props.history.length>0)for(let n of this.props.history)r.push({role:"user",content:n.request.message}),n.response&&n.response.type==="model"&&r.push({role:"assistant",content:n.response.message});return r.push({role:"user",content:this.buildUserMessage(t)}),r}getExampleFilePath(t){return this.getFilePath(KA.posixFilePathToUri(t))}getFilePath(t){return KA.uriToPath(t)}async getValidFilesInWorkingSet(){let t=new Map;if(this.props.workingSet===void 0||this.props.workingSet===null||this.props.workingSet.length===0)return t;for(let r of this.props.workingSet){let n=await this.props.textDocumentProvider.getByUri(r.uri);n.status==="valid"&&t.set(r.uri,n.document)}return t}buildSystemMessage(t){let r=[];return r.push("You are an AI programming assistant.",'When asked for your name, you must respond with "GitHub Copilot".',"Follow the user's requirements carefully & to the letter.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.",t.size>0?"The user has a request for modifying one or more files.":["If the user asks a question, then answer it.",`If you need to change existing files and it's not clear which files should be changed, then refuse and answer with "Please add the files to be modified to the working set"`].join(`
`),"1. Please come up with a solution that you first describe step-by-step.","2. Group your changes by file. Use the file path as the header.","3. For each file, give a short summary of what needs to be changed followed by a code block that contains the code changes.","4. Each file's code block must start with a comment containing the filepath.","5. Use a single code block per file that needs to be modified, even if there are multiple changes for a file.","6. The user is very smart and can understand how to merge your code blocks into their files, you just need to provide minimal hints.","7. Avoid repeating existing code, instead use comments to represent regions of unchanged code. The user prefers that you are as concise as possible. For example: ",["<file>","````languageId",`// ${gk} ${this.exampleFilePath}`,`// ${Ul}`,"{ changed code }",`// ${Ul}`,"{ changed code }",`// ${Ul}`,"````","</file>"].join(`
`),"8. If you generate edits for a Markdown file, use four backticks for the outer code block.",""),this.props.userLanguage&&r.push(`Respond in the following locale: ${this.props.userLanguage}`),this.props.modelName&&r.push(`You use the ${this.props.modelName} large language model.`),r.push("Here is an example of how you should format a code block belonging to the file example.ts in your response:","<example>",[`### ${this.tsExampleFilePath}`,"","Add a new property 'age' and a new method 'getAge' to the class Person.","","<file>","```typescript",`// ${gk} ${this.tsExampleFilePath}`,"class Person {",` // ${Ul}`," age: number;",` // ${Ul}`," getAge() {"," return this.age;"," }","}","```","</file>"].join(`
`),"</example>"),r.join(`
`)}buildUserMessage(t){let r=[];if(t.size>0){r.push("The user has provided the following files as input. Always make changes to these files unless the user asks to create a new file.","Untitled files are files that are not yet named. Make changes to them like regular files.");for(let[n,i]of t){let o=new Mf({code:i.getText(),languageId:i.detectedLanguageId,uri:n});r.push("<file>",...o.renderAsArray(),"</file>")}}return r.push("<reminder>",`Avoid repeating existing code, instead use a line comment with \`${Ul}\` to represent regions of unchanged code.`,"Each file's code block must start with a line comment containing the filepath. This includes Markdown files.","For existing files, make sure the filepath exactly matches the filepath of the original file."),this.props.workspaceFolder&&r.push(`When suggesting to create new files, pick a location inside \`${this.getFilePath(this.props.workspaceFolder)}\``),r.push("</reminder>"),r.push("<prompt>",`${this.props.userMessage}`,"</prompt>"),r.join(`
`)}};d();d();var xG=class{constructor(t){this._source=t;this._buffer="";this._atEnd=!1}static{s(this,"PartialAsyncTextReader")}get endOfStream(){return this._buffer.length===0&&this._atEnd}async extendBuffer(){if(this._atEnd)return;let{value:t,done:r}=await this._source.next();r?this._atEnd=!0:this._buffer+=t}async waitForLength(t){for(;this._buffer.length<t&&!this._atEnd;)await this.extendBuffer()}async peek(t){return await this.waitForLength(t),this._buffer.substring(0,t)}async read(t){await this.waitForLength(t);let r=this._buffer.substring(0,t);return this._buffer=this._buffer.substring(t),r}async readUntil(t){let r="";for(;!this.endOfStream;){let n=this.readImmediateExcept(t);if(r+=n,await this.peek(1)===t)break}return r}async readLineIncludingLF(){let t=await this.readUntil(`
`);return t+=await this.read(1),t}async readLine(){let t=await this.readUntil(`
`);return await this.read(1),t}readImmediateExcept(t){let r=this._buffer.indexOf(t);return this.readImmediate(r===-1?this._buffer.length:r)}readImmediate(t){let r=this._buffer.substring(0,t);return this._buffer=this._buffer.substring(t),r}};var $le="<file>",Ak="```",Ck="###",$Tt=/^(`+)([^ \n]*)/,yk="filepath:";async function*bLe(e,t){let r=new xG(e[Symbol.asyncIterator]()),n=[];for(;!r.endOfStream;){for(;!r.endOfStream;){let y=await r.peek(Math.max(Ak.length,$le.length,Ck.length));if(y.startsWith($le)||y.startsWith(Ak))break;if(y.startsWith(Ck)){let x=await r.readLineIncludingLF(),b=x.substring(Ck.length).trim();await t(b)?n.length=0:n.push(x)}else await vLe(r,n)}if(r.endOfStream)break;let i=await r.readLineIncludingLF(),o=i.startsWith($le);for(;!r.endOfStream&&!i.startsWith(Ak);)i=await r.readLineIncludingLF();if(r.endOfStream)break;let a=i.match($Tt),l=a?a[2]:void 0,c=J6e(l?$6e(l):void 0),u=[`${c.lineComment.start} ${yk}`,`:: ${yk}`,`<!-- ${yk}`,`// ${yk}`,`# ${yk}`],f=Math.max(...u.map(y=>y.length)),m=c.lineComment.end??"",h="</file>",p,g=[];for(;!r.endOfStream;){let y=await r.peek(Math.max(Ak.length,f));if(y.startsWith(Ak)){let x=await r.readLineIncludingLF();if(!o)break;if(await r.peek(h.length)===h){await r.readLineIncludingLF();break}else{g.push(x);continue}}if(!p&&u.some(x=>y.startsWith(x))){let x=await r.readLineIncludingLF(),b=u.reduce((E,_)=>y.startsWith(_)?x.substring(_.length):E,x);b=b.split("-->")[0].trim(),b.endsWith(m)&&(b=b.substring(0,b.length-m.length)),b=b.trim(),p=await t(b);continue}await vLe(r,g)}yield{resource:p,language:l,code:g.join(""),markdownBeforeBlock:n.join("")},n.length=0}}s(bLe,"getCodeBlocksFromResponse");async function vLe(e,t){for(;!e.endOfStream;){let r=e.readImmediateExcept(`
`);if(r.length>0&&t?.push(r),await e.peek(1)===`
`){e.readImmediate(1),t?.push(`
`);break}}}s(vLe,"pipeOneLine");function ELe(e){if(e.startsWith(`${Ck} `))return"";let t=e.indexOf(`
${Ck} `);return t===-1?"":e.substring(0,t)+`
`}s(ELe,"parseOverallDescription");d();d();var vG=class extends Error{static{s(this,"EditConversationNotFoundException")}constructor(t){super(t),this.name="EditConversationNotFoundException"}};var zTt=new Gt("CopilotEditsConversations"),Za=class{constructor(t){this.editConversations=new un(50);this.ctx=t}static{s(this,"EditConversations")}create(t="panel",r){let n=new AG([],t,r);return this.editConversations.set(n.id,n),n}destroy(t){this.editConversations.delete(t)!==!0&&zTt.warn(this.ctx,`Edit code conversation ${t} does not exist`)}addTurn(t,r){return this.get(t).addTurn(r),r}deleteTurn(t,r){this.get(t).deleteTurn(r)}get(t){return this.getEditConversation(t)}getEditConversation(t){let r=this.editConversations.get(t);if(!r)throw new vG(`Conversation with id ${t} does not exist`);return r}getAll(){return Array.from(this.editConversations.values())}findByTurnId(t){let r=this.getAll();for(let n of r)if(n.hasTurn(t))return n}};d();d();var ca=class{static{s(this,"ModelConfigurationProvider")}},bG=class extends ca{constructor(r){super();this.ctx=r}static{s(this,"DefaultModelConfigurationProvider")}async getBestChatModelConfig(r,n){let i=[];for(let o of r){let a=await this.getFirstMatchingChatModelConfiguration(o,n);a&&i.push(a)}if(i.length>0){let o=i.find(a=>a.isExperimental);return o||i[0]}throw Kr.error(this.ctx,`No model configuration found for families: ${r.join(", ")}. Available models: ${JSON.stringify(await this.ctx.get(lf).getMetadata())}`),new Error("No model configuration found")}async getFirstMatchingModelMetadata(r){let n=await this.ctx.get(lf).getMetadata(),i=KTt(n,r);if(i.length>0)return i[0]}async getFirstMatchingChatModelConfiguration(r,n){let i=await this.getFirstMatchingModelMetadata({family:r,type:"chat",supports:n});if(i!==void 0)return r===ei.Gpt35turbo||r===ei.Gpt4oMini?{modelId:i.id,uiName:i.name,modelFamily:r,maxRequestTokens:Yle(6144,i),maxResponseTokens:zle(2048,i),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:i.capabilities.tokenizer,isExperimental:i.isExperimental??!1,stream:i.capabilities.supports?.streaming??!1,toolCalls:i.capabilities.supports?.tool_calls??!1}:r===ei.Gpt4||r===ei.Gpt4turbo?{modelId:i.id,uiName:i.name,modelFamily:r,maxRequestTokens:Yle(10240,i),maxResponseTokens:zle(4096,i),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:i.capabilities.tokenizer,isExperimental:i.isExperimental??!1,stream:i.capabilities.supports?.streaming??!1,toolCalls:i.capabilities.supports?.tool_calls??!1}:r===ei.Gpt4o?{modelId:i.id,uiName:i.name,modelFamily:r,maxRequestTokens:await YTt(this.ctx,i),maxResponseTokens:zle(4096,i),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:i.capabilities.tokenizer,isExperimental:i.isExperimental??!1,stream:i.capabilities.supports?.streaming??!1,toolCalls:i.capabilities.supports?.tool_calls??!1}:{modelId:i.id,uiName:i.name,modelFamily:r,maxRequestTokens:i.capabilities.limits?.max_prompt_tokens??8192,maxResponseTokens:i.capabilities.limits?.max_output_tokens??4096,baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:i.capabilities.tokenizer,isExperimental:i.isExperimental??!1,stream:i.capabilities.supports?.streaming??!1,toolCalls:i.capabilities.supports?.tool_calls??!1}}async getFirstMatchingEmbeddingModelConfiguration(r){let n=await this.getFirstMatchingModelMetadata({family:r,type:"embeddings"});if(n!==void 0)switch(r){case NF.textEmbedding3Small:return{modelId:n.id,modelFamily:r,maxBatchSize:n.capabilities.limits?.max_inputs??16,maxTokens:8191,tokenizer:"cl100k_base"}}}};async function YTt(e,t){let r=e.get(or),n=await r.updateExPValuesAndAssignments(),i=r.ideChatMaxRequestTokens(n);return i===-1&&(i=16384),Yle(i,t)}s(YTt,"getExpRequestTokens");function Yle(e,t){return t.capabilities.limits?.max_prompt_tokens?Math.min(e,t.capabilities.limits.max_prompt_tokens):e}s(Yle,"getRequestTokens");function zle(e,t){return t.capabilities.limits?.max_output_tokens?Math.min(e,t.capabilities.limits.max_output_tokens):e}s(zle,"getResponseTokens");function KTt(e,t){return e.filter(r=>r.capabilities.type!==t.type||r.capabilities.family!==t.family?!1:r.capabilities.supports===void 0||t.supports===void 0?!0:Object.keys(t.supports).every(n=>t.supports?.[n]===r.capabilities.supports?.[n]))}s(KTt,"filterModelsByCapabilities");var yo=class{static{s(this,"ModelPickerUtils")}static async getModelConfiguration(t,r,n,i){return n?t.get(ca).getBestChatModelConfig([n]):t.get(ca).getBestChatModelConfig(kd(r),i)}static transformMessages(t,r){return r===ei.O1Ga||r===ei.O1Mini?t.map(n=>n.role!=="user"?{role:"user",content:n.content}:n):t}};var JA=class{constructor(t,r){this.chatFetcher=r;this.ctx=t,this.chatFetcher=this.chatFetcher??new ka(t)}static{s(this,"CopilotEditsService")}async createOrContinueEditConversation(t,r){try{await this.reportBegin(t);let n=await this.getEditCodeResult(t,r),i=yG.processResult(t,n);await this.parseAndSendProgressBack(t,i,r),t.currentTurn.response={message:i,type:"model"},t.currentTurn.status="success",await this.reportEnd(t)}catch(n){if(n instanceof MC)await this.reportEnd(t,{message:b5});else if(n instanceof zc)await this.reportEnd(t,n.editConversationError);else{let i=n instanceof Error?n.message:String(n);t.currentTurn.status="error",t.currentTurn.response={message:i,type:"meta"},await this.reportEnd(t,{message:i})}}return[]}async getEditCodeResult(t,r){await this.abortIfCancelled(t,r);let n=await this.buildEditCodePromptMessages(t),i=await this.ctx.get(or).updateExPValuesAndAssignments();await this.abortIfCancelled(t,r);let o=await yo.getModelConfiguration(this.ctx,"edits",t.userSelectedModel),a=yo.transformMessages(n,o.modelFamily);return await this.abortIfCancelled(t,r),await this.chatFetcher.fetchResponse({modelConfiguration:o,messages:a,uiKind:"editsPanel",intentParams:{intent:!0},temperature:.1,llmInteraction:t.toLlmInteraction()},r,i)}async buildEditCodePromptMessages(t){let r=t.currentTurn,n=await yo.getModelConfiguration(this.ctx,"edits",t.userSelectedModel),i=t.editConversation.getTurns(),o=i.length>1?i.slice(0,-1):[];return await new CG({userMessage:r.request.message,workspaceFolder:r.workspaceFolder,workingSet:r.workingSet,userLanguage:t.editConversation.getUserLanguage(),textDocumentProvider:new Wg(this.ctx),modelName:n.uiName,history:o}).render()}async abortIfCancelled(t,r){if(r.isCancellationRequested)throw t.currentTurn.status="cancelled",t.currentTurn.response={message:b5,type:"user"},new MC;this.ctx.get(Za).get(t.editConversationId)}async parseAndSendProgressBack(t,r,n){try{let i=xLe(r),o=new R9(this.ctx),a=s(async u=>KA.pathToUri(t,u),"createUri"),l=[],c=ELe(r);c&&await this.ctx.get(Ac).reportTurn(t,{fileGenerationStatus:"overall-description-generated",editDescription:c}),await this.abortIfCancelled(t,n);for await(let u of bLe(i,a))l.push(o.mapCode(u,n,async f=>{await this.ctx.get(Ac).reportTurn(t,f)}));await Promise.all(l),l.length===0&&await this.reportNoCodeBlocks(t,r)}catch(i){if(i instanceof QC||i instanceof p6)t.currentTurn.status="error",t.currentTurn.response={message:i.message,type:"meta"},await this.reportEnd(t,{message:i.message});else if(i instanceof MC)t.currentTurn.status="cancelled",t.currentTurn.response={message:b5,type:"user"},await this.reportEnd(t,{message:b5});else throw i}}async reportNoCodeBlocks(t,r){await this.ctx.get(Ac).reportTurn(t,{fileGenerationStatus:"no-code-blocks-found",rawResponse:r})}async reportBegin(t){await this.ctx.get(Ac).reportTurn(t,{fileGenerationStatus:"edit-conversation-begin"})}async reportEnd(t,r){await this.ctx.get(Ac).reportTurn(t,{fileGenerationStatus:"edit-conversation-end",error:r})}};d();var TLe="github.com",ILe=`https://${TLe}`,k9=class extends ps{constructor(r,n={}){super();this.env=n;this.recalculateUrlDefaults(ILe),Ks(r,i=>this.onCopilotToken(r,i))}static{s(this,"DefaultNetworkConfiguration")}onCopilotToken(r,n){this.updateServiceEndpoints(r,n.envelope.endpoints)}getLastKnownEndpointUrl(r,n){return this.join((this.lastEndpoints??CF)[r],n)}getAuthAuthority(){return this.baseUrlObject.host}getAPIUrl(r){return this.join(this.apiUrl,r)}getLoginReachabilityUrl(){return this.loginReachabilityUrl}getTelemetryUrl(r){return this.join(this.telemetryUrl,r)}setTelemetryUrlForTesting(r){this.telemetryUrl=r}getExperimentationUrl(r){return this.join(this.experimentationUrl,r)}validateBaseUrl(r,n){return this.isPermittedUrl(r,n)?!0:(r.get(Ha).showWarningMessage(`Ignoring invalid or unsupported authentication URL "${n}".`),!1)}updateBaseUrl(r,n){n||=ILe;let i=this.baseUrlObject;this.validateBaseUrl(r,n)&&this.withTelemetryReInitialization(r,()=>{if(this.recalculateUrlDefaults(n),i.href!==this.baseUrlObject.href)try{r.get(en).resetToken()}catch(o){if(!(o instanceof yS))throw o}})}updateBaseUrlFromTokenEndpoint(r,n){try{let i=new URL(n);i.hostname.startsWith("api.")?this.updateBaseUrl(r,`https://${i.hostname.substring(4)}`):this.updateBaseUrl(r)}catch{this.updateBaseUrl(r)}}updateServiceEndpoints(r,n){this.lastEndpoints=n,n&&this.isPermittedUrl(r,n.telemetry)&&this.withTelemetryReInitialization(r,()=>{this.telemetryUrl=this.join(n.telemetry,"telemetry"),this.experimentationUrl=this.join(n.telemetry,"telemetry")})}withTelemetryReInitialization(r,n){let i=this.telemetryUrl;if(n(),i===this.telemetryUrl)return;let o=r.get(af);o.isInitialized&&o.reInitialize(r)}recalculateUrlDefaults(r){let n=this.parseUrls(r);this.baseUrlObject=n.base;let i=n.api,o=this.baseUrlObject.host!==TLe;this.apiUrl=i.href,this.loginReachabilityUrl=this.join(this.baseUrlObject.href,"/login/device"),this.telemetryUrl=this.join(o?this.prefixWith("copilot-telemetry-service.",this.baseUrlObject).href:CF.telemetry,"/telemetry"),this.experimentationUrl=this.telemetryUrl}parseUrls(r){if(this.env.CODESPACES==="true"&&this.env.GITHUB_TOKEN&&this.env.GITHUB_SERVER_URL&&this.env.GITHUB_API_URL&&!this.env.GITHUB_COPILOT_TOKEN&&!this.env.GH_COPILOT_TOKEN)try{return{base:new URL(this.env.GITHUB_SERVER_URL),api:new URL(this.env.GITHUB_API_URL)}}catch{}let n=new URL(r),i=this.prefixWith("api.",n);return{base:n,api:i}}isPermittedUrl(r,n){return this.isValidUrl(n)&&this.hasSupportedProtocol(r,n)}isValidUrl(r){try{if(r)return new URL(r),!0}catch{}return!1}hasSupportedProtocol(r,n){let i=new URL(n).protocol;return i==="https:"||!xF(r)&&i==="http:"}join(r,n){return n?new URL(n,r).href:r}prefixWith(r,n){return new URL(`${n.protocol}//${r}${n.host}`)}};d();var _tn=new Gt("exp");function wLe(e){let t=e.get(or);t.registerStaticFilters(ZTt(e)),t.registerDynamicFilter("X-Copilot-OverrideEngine",()=>Vn(e,Rt.DebugOverrideEngine)||Vn(e,Rt.DebugOverrideEngineLegacy)),t.registerDynamicFilter("X-VSCode-ExtensionName",()=>wF()?"copilot-web":e.get(gn).getEditorPluginInfo().name),t.registerDynamicFilter("X-VSCode-ExtensionVersion",()=>Kle(!e.get(po).isProduction()&&e.get(gn).getEditorPluginInfo().name==="copilot"?"1.999.0":e.get(gn).getEditorPluginInfo().version)),t.registerDynamicFilter("X-VSCode-ExtensionRelease",()=>JTt(e)),t.registerDynamicFilter("X-VSCode-Build",()=>e.get(gn).getEditorInfo().name),t.registerDynamicFilter("X-VSCode-AppVersion",()=>Kle(e.get(gn).getEditorInfo().version)),t.registerDynamicFilter("X-VSCode-TargetPopulation",()=>XTt(e)),t.registerDynamicFilterGroup(()=>{let r={};for(let n of e.get(gn).getRelatedPluginInfo()){let i=pd+n.name.replace(/[^A-Za-z]/g,"").toLowerCase();if(!Object.values(W7).includes(i)){gF(e,{reason:`A filter could not be registered for the unrecognized related plugin "${n.name}".`});continue}r[i]=Kle(n.version)}return r})}s(wLe,"setupExperimentationService");function JTt(e){let t=e.get(gn).getEditorPluginInfo();return t.name==="copilot"&&Sd(e)==="nightly"||t.name==="copilot-intellij"&&t.version.endsWith("nightly")?"nightly":"stable"}s(JTt,"getPluginRelease");function XTt(e){let t=e.get(gn).getEditorInfo();return t.name==="vscode"&&t.version.endsWith("-insider")?"insider":"public"}s(XTt,"getTargetPopulation");function ZTt(e){return ewt(e)}s(ZTt,"createAllFilters");function ewt(e){let t=e.get(Ds);return{"X-MSEdge-ClientId":t.machineId,"X-Copilot-ClientVersion":rv(e)}}s(ewt,"createDefaultFilters");function Kle(e){return e.split("-")[0]}s(Kle,"trimVersionSuffix");d();var xk=(r=>(r.enabled="enabled",r.disabled="disabled",r))(xk||{}),Qf=class{static{s(this,"McpManager")}};d();d();d();var Jle=class{constructor(t,r){this.baseDebounceTime=t;this.expectedTotalTime=r;this.providerInvocationTime=Date.now()}static{s(this,"DelaySession")}getDebounceTime(){let t=this.expectedTotalTime===void 0?this.baseDebounceTime:Math.min(this.baseDebounceTime,this.expectedTotalTime),r=Date.now()-this.providerInvocationTime;return Math.max(0,t-r)}getArtificalDelay(){if(this.expectedTotalTime===void 0)return 0;let t=Date.now()-this.providerInvocationTime;return Math.max(0,this.expectedTotalTime-t)}},EG=class{constructor(){this._recentUserActions=[]}static{s(this,"Delayer")}createDelaySession(){let n=this._getExpectedTotalTime(200);return new Jle(200,n)}handleAcceptance(){this._recordUserAction("accepted")}handleRejection(){this._recordUserAction("rejected")}_recordUserAction(t){this._recentUserActions.push({time:Date.now(),kind:t}),this._recentUserActions=this._recentUserActions.slice(-10)}_getExpectedTotalTime(t){let l=Date.now(),c=1;for(let f of this._recentUserActions){let m=l-f.time;if(m>6e5)continue;let h=Math.exp(-m/6e5),p=f.kind==="rejected"?1.5:.8;c*=1+(p-1)*h}let u=t*c;return u=Math.min(3e3,Math.max(50,u)),u}};d();d();d();var Oo;(n=>{function e(i){return new Xle(i)}n.ok=e,s(e,"ok");function t(i){return new Zle(i)}n.error=t,s(t,"error");function r(i){return n.error(new Error(i))}n.fromString=r,s(r,"fromString")})(Oo||={});var Xle=class e{constructor(t){this.val=t}static{s(this,"ResultOk")}map(t){return new e(t(this.val))}flatMap(t){return t(this.val)}isOk(){return!0}isError(){return!1}},Zle=class{constructor(t){this.err=t}static{s(this,"ResultError")}map(t){return this}flatMap(t){return this}isOk(){return!1}isError(){return!0}};d();d();d();var Vt=class e{constructor(t,r){this.start=t;this.endExclusive=r;if(t>r)throw new vn(`Invalid range: ${this.toString()}`)}static{s(this,"OffsetRange")}static fromTo(t,r){return new e(t,r)}static addRange(t,r){let n=0;for(;n<r.length&&r[n].endExclusive<t.start;)n++;let i=n;for(;i<r.length&&r[i].start<=t.endExclusive;)i++;if(n===i)r.splice(n,0,t);else{let o=Math.min(t.start,r[n].start),a=Math.max(t.endExclusive,r[i-1].endExclusive);r.splice(n,i-n,new e(o,a))}}static tryCreate(t,r){if(!(t>r))return new e(t,r)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,r){return new e(t,t+r)}static emptyAt(t){return new e(t,t)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}containsRange(t){return this.start<=t.start&&t.endExclusive<=this.endExclusive}contains(t){return this.start<=t&&t<this.endExclusive}join(t){return new e(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){let r=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);if(r<=n)return new e(r,n)}intersectionLength(t){let r=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);return Math.max(0,n-r)}intersects(t){let r=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);return r<n}intersectsOrTouches(t){let r=Math.max(this.start,t.start),n=Math.min(this.endExclusive,t.endExclusive);return r<=n}isBefore(t){return this.endExclusive<=t.start}isAfter(t){return this.start>=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new vn(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new vn(`Invalid clipping range: ${this.toString()}`);return t<this.start?this.endExclusive-(this.start-t)%this.length:t>=this.endExclusive?this.start+(t-this.start)%this.length:t}map(t){let r=[];for(let n=this.start;n<this.endExclusive;n++)r.push(t(n));return r}forEach(t){for(let r=this.start;r<this.endExclusive;r++)t(r)}};d();d();var mn=class e{static{s(this,"Position")}constructor(t,r){this.lineNumber=t,this.column=r}with(t=this.lineNumber,r=this.column){return t===this.lineNumber&&r===this.column?this:new e(t,r)}delta(t=0,r=0){return this.with(this.lineNumber+t,this.column+r)}equals(t){return e.equals(this,t)}static equals(t,r){return!t&&!r?!0:!!t&&!!r&&t.lineNumber===r.lineNumber&&t.column===r.column}isBefore(t){return e.isBefore(this,t)}static isBefore(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<r.column}isBeforeOrEqual(t){return e.isBeforeOrEqual(this,t)}static isBeforeOrEqual(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<=r.column}static compare(t,r){let n=t.lineNumber|0,i=r.lineNumber|0;if(n===i){let o=t.column|0,a=r.column|0;return o-a}return n-i}clone(){return new e(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(t){return new e(t.lineNumber,t.column)}static isIPosition(t){return t&&typeof t.lineNumber=="number"&&typeof t.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}};var yr=class e{static{s(this,"Range")}constructor(t,r,n,i){t>n||t===n&&r>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=t,this.endColumn=r):(this.startLineNumber=t,this.startColumn=r,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return e.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(t,r){return!(r.lineNumber<t.startLineNumber||r.lineNumber>t.endLineNumber||r.lineNumber===t.startLineNumber&&r.column<t.startColumn||r.lineNumber===t.endLineNumber&&r.column>t.endColumn)}static strictContainsPosition(t,r){return!(r.lineNumber<t.startLineNumber||r.lineNumber>t.endLineNumber||r.lineNumber===t.startLineNumber&&r.column<=t.startColumn||r.lineNumber===t.endLineNumber&&r.column>=t.endColumn)}containsRange(t){return e.containsRange(this,t)}static containsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>t.endColumn)}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<=t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>=t.endColumn)}plusRange(t){return e.plusRange(this,t)}static plusRange(t,r){let n,i,o,a;return r.startLineNumber<t.startLineNumber?(n=r.startLineNumber,i=r.startColumn):r.startLineNumber===t.startLineNumber?(n=r.startLineNumber,i=Math.min(r.startColumn,t.startColumn)):(n=t.startLineNumber,i=t.startColumn),r.endLineNumber>t.endLineNumber?(o=r.endLineNumber,a=r.endColumn):r.endLineNumber===t.endLineNumber?(o=r.endLineNumber,a=Math.max(r.endColumn,t.endColumn)):(o=t.endLineNumber,a=t.endColumn),new e(n,i,o,a)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,r){let n=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,a=t.endColumn,l=r.startLineNumber,c=r.startColumn,u=r.endLineNumber,f=r.endColumn;return n<l?(n=l,i=c):n===l&&(i=Math.max(i,c)),o>u?(o=u,a=f):o===u&&(a=Math.min(a,f)),n>o||n===o&&i>a?null:new e(n,i,o,a)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(t,r){return!t&&!r?!0:!!t&&!!r&&t.startLineNumber===r.startLineNumber&&t.startColumn===r.startColumn&&t.endLineNumber===r.endLineNumber&&t.endColumn===r.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(t){return new mn(t.endLineNumber,t.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(t){return new mn(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,r){return new e(this.startLineNumber,this.startColumn,t,r)}setStartPosition(t,r){return new e(t,r,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,r=t){return new e(t.lineNumber,t.column,r.lineNumber,r.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<t.startColumn)}static areIntersecting(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<=r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<=t.startColumn)}static compareRangesUsingStarts(t,r){if(t&&r){let o=t.startLineNumber|0,a=r.startLineNumber|0;if(o===a){let l=t.startColumn|0,c=r.startColumn|0;if(l===c){let u=t.endLineNumber|0,f=r.endLineNumber|0;if(u===f){let m=t.endColumn|0,h=r.endColumn|0;return m-h}return u-f}return l-c}return o-a}return(t?1:0)-(r?1:0)}static compareRangesUsingEnds(t,r){return t.endLineNumber===r.endLineNumber?t.endColumn===r.endColumn?t.startLineNumber===r.startLineNumber?t.startColumn-r.startColumn:t.startLineNumber-r.startLineNumber:t.endColumn-r.endColumn:t.endLineNumber-r.endLineNumber}static spansMultipleLines(t){return t.endLineNumber>t.startLineNumber}toJSON(){return this}};var Cr=class e{static{s(this,"LineRange")}static fromRange(t){return new e(t.startLineNumber,t.endLineNumber)}static fromRangeInclusive(t){return new e(t.startLineNumber,t.endLineNumber+1)}static subtract(t,r){return r?t.startLineNumber<r.startLineNumber&&r.endLineNumberExclusive<t.endLineNumberExclusive?[new e(t.startLineNumber,r.startLineNumber),new e(r.endLineNumberExclusive,t.endLineNumberExclusive)]:r.startLineNumber<=t.startLineNumber&&t.endLineNumberExclusive<=r.endLineNumberExclusive?[]:r.endLineNumberExclusive<t.endLineNumberExclusive?[new e(Math.max(r.endLineNumberExclusive,t.startLineNumber),t.endLineNumberExclusive)]:[new e(t.startLineNumber,Math.min(r.startLineNumber,t.endLineNumberExclusive))]:[t]}static joinMany(t){if(t.length===0)return[];let r=new kb(t[0].slice());for(let n=1;n<t.length;n++)r=r.getUnion(new kb(t[n].slice()));return r.ranges}static join(t){if(t.length===0)throw new vn("lineRanges cannot be empty");let r=t[0].startLineNumber,n=t[0].endLineNumberExclusive;for(let i=1;i<t.length;i++)r=Math.min(r,t[i].startLineNumber),n=Math.max(n,t[i].endLineNumberExclusive);return new e(r,n)}static ofLength(t,r){return new e(t,t+r)}static deserialize(t){return new e(t[0],t[1])}constructor(t,r){if(t>r)throw new vn(`startLineNumber ${t} cannot be after endLineNumberExclusive ${r}`);this.startLineNumber=t,this.endLineNumberExclusive=r}contains(t){return this.startLineNumber<=t&&t<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(t){return new e(this.startLineNumber+t,this.endLineNumberExclusive+t)}deltaLength(t){return new e(this.startLineNumber,this.endLineNumberExclusive+t)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(t){return new e(Math.min(this.startLineNumber,t.startLineNumber),Math.max(this.endLineNumberExclusive,t.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(t){let r=Math.max(this.startLineNumber,t.startLineNumber),n=Math.min(this.endLineNumberExclusive,t.endLineNumberExclusive);if(r<=n)return new e(r,n)}intersectsStrict(t){return this.startLineNumber<t.endLineNumberExclusive&&t.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(t){return this.startLineNumber<=t.endLineNumberExclusive&&t.startLineNumber<=this.endLineNumberExclusive}equals(t){return this.startLineNumber===t.startLineNumber&&this.endLineNumberExclusive===t.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new yr(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new yr(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(t){let r=[];for(let n=this.startLineNumber;n<this.endLineNumberExclusive;n++)r.push(t(n));return r}forEach(t){for(let r=this.startLineNumber;r<this.endLineNumberExclusive;r++)t(r)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(t){return this.startLineNumber<=t&&t<this.endLineNumberExclusive}toOffsetRange(){return new Vt(this.startLineNumber-1,this.endLineNumberExclusive-1)}distanceToRange(t){return this.endLineNumberExclusive<=t.startLineNumber?t.startLineNumber-this.endLineNumberExclusive:t.endLineNumberExclusive<=this.startLineNumber?this.startLineNumber-t.endLineNumberExclusive:0}distanceToLine(t){return this.contains(t)?0:t<this.startLineNumber?this.startLineNumber-t:t-this.endLineNumberExclusive}addMargin(t,r){return new e(this.startLineNumber-t,this.endLineNumberExclusive+r)}},kb=class e{constructor(t=[]){this._normalizedRanges=t}static{s(this,"LineRangeSet")}get ranges(){return this._normalizedRanges}addRange(t){if(t.length===0)return;let r=Mv(this._normalizedRanges,i=>i.endLineNumberExclusive>=t.startLineNumber),n=xf(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(r===n)this._normalizedRanges.splice(r,0,t);else if(r===n-1){let i=this._normalizedRanges[r];this._normalizedRanges[r]=i.join(t)}else{let i=this._normalizedRanges[r].join(this._normalizedRanges[n-1]).join(t);this._normalizedRanges.splice(r,n-r,i)}}contains(t){let r=_A(this._normalizedRanges,n=>n.startLineNumber<=t);return!!r&&r.endLineNumberExclusive>t}intersects(t){let r=_A(this._normalizedRanges,n=>n.startLineNumber<t.endLineNumberExclusive);return!!r&&r.endLineNumberExclusive>t.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;let r=[],n=0,i=0,o=null;for(;n<this._normalizedRanges.length||i<t._normalizedRanges.length;){let a=null;if(n<this._normalizedRanges.length&&i<t._normalizedRanges.length){let l=this._normalizedRanges[n],c=t._normalizedRanges[i];l.startLineNumber<c.startLineNumber?(a=l,n++):(a=c,i++)}else n<this._normalizedRanges.length?(a=this._normalizedRanges[n],n++):(a=t._normalizedRanges[i],i++);o===null?o=a:o.endLineNumberExclusive>=a.startLineNumber?o=new Cr(o.startLineNumber,Math.max(o.endLineNumberExclusive,a.endLineNumberExclusive)):(r.push(o),o=a)}return o!==null&&r.push(o),new e(r)}subtractFrom(t){let r=Mv(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),n=xf(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(r===n)return new e([t]);let i=[],o=t.startLineNumber;for(let a=r;a<n;a++){let l=this._normalizedRanges[a];l.startLineNumber>o&&i.push(new Cr(o,l.startLineNumber)),o=l.endLineNumberExclusive}return o<t.endLineNumberExclusive&&i.push(new Cr(o,t.endLineNumberExclusive)),new e(i)}toString(){return this._normalizedRanges.map(t=>t.toString()).join(", ")}getIntersection(t){let r=[],n=0,i=0;for(;n<this._normalizedRanges.length&&i<t._normalizedRanges.length;){let o=this._normalizedRanges[n],a=t._normalizedRanges[i],l=o.intersect(a);l&&!l.isEmpty&&r.push(l),o.endLineNumberExclusive<a.endLineNumberExclusive?n++:i++}return new e(r)}getWithDelta(t){return new e(this._normalizedRanges.map(r=>r.delta(t)))}};d();var _Le=-1;function B9(){return _Le!==-1?_Le:Date.now()}s(B9,"now");function SLe(e,t){return e.endLineNumberExclusive<=t.startLineNumber?t.startLineNumber-e.endLineNumberExclusive:t.endLineNumberExclusive<=e.startLineNumber?e.startLineNumber-t.endLineNumberExclusive:0}s(SLe,"lineRangeDistance");d();d();var um=class e{constructor(t){this.edits=t;let r=-1;for(let n of t){if(!(n.replaceRange.start>=r))throw new vn(`Edits must be disjoint and sorted. Found ${n} after ${r}`);r=n.replaceRange.endExclusive}}static{s(this,"OffsetEdit")}static{this.empty=new e([])}static fromJson(t){return new e(t.map(el.fromJson))}static from(t){let r=t.map(i=>new el(Vt.ofStartAndLength(i.rangeOffset,i.rangeLength),i.text));return r.reverse(),new e(r)}static single(t,r){return new e([new el(t,r)])}normalize(){let t=[],r;for(let n of this.edits)n.newText.length===0&&n.replaceRange.length===0||(r&&r.replaceRange.endExclusive===n.replaceRange.start?r=new el(r.replaceRange.join(n.replaceRange),r.newText+n.newText):(r&&t.push(r),r=n));return r&&t.push(r),new e(t)}normalizeEOL(t){return new e(this.edits.map(r=>r.normalizeEOL(t)))}isNoop(t){return this.edits.every(r=>r.isNoop(t))}toString(){return`[${this.edits.map(r=>r.toString()).join(", ")}]`}apply(t){let r=[],n=0;for(let i of this.edits)r.push(t.substring(n,i.replaceRange.start)),r.push(i.newText),n=i.replaceRange.endExclusive;return r.push(t.substring(n)),r.join("")}compose(t){return twt(this,t)}inverse(t){let r=[],n=0;for(let i of this.edits)r.push(new el(Vt.ofStartAndLength(i.replaceRange.start+n,i.newText.length),t.substring(i.replaceRange.start,i.replaceRange.endExclusive))),n+=i.newText.length-i.replaceRange.length;return new e(r)}getNewTextRanges(){let t=[],r=0;for(let n of this.edits)t.push(Vt.ofStartAndLength(n.replaceRange.start+r,n.newText.length)),r+=n.newText.length-n.replaceRange.length;return t}get isEmpty(){return this.edits.length===0}tryRebase(t){let r=[],n=0,i=0,o=0;for(;i<this.edits.length||n<t.edits.length;){let a=t.edits[n],l=this.edits[i];if(l)a?l.replaceRange.intersects(a.replaceRange)?i++:l.replaceRange.start<a.replaceRange.start?(r.push(new el(l.replaceRange.delta(o),l.newText)),i++):(n++,o+=a.newText.length-a.replaceRange.length):(r.push(new el(l.replaceRange.delta(o),l.newText)),i++);else break}return new e(r)}removeCommonSuffixPrefix(t){let r=[];for(let n of this.edits){let i=n.removeCommonSuffixPrefix(t);i.isEmpty||r.push(i)}return new e(r)}applyToOffset(t){let r=0;for(let n of this.edits)if(n.replaceRange.start<=t){if(t<n.replaceRange.endExclusive)return n.replaceRange.start+r;r+=n.newText.length-n.replaceRange.length}else break;return t+r}applyToOffsetRange(t){return new Vt(this.applyToOffset(t.start),this.applyToOffset(t.endExclusive))}applyToOffsetOrUndefined(t){let r=0;for(let n of this.edits)if(n.replaceRange.start<=t){if(t<n.replaceRange.endExclusive)return;r+=n.newText.length-n.replaceRange.length}else break;return t+r}applyToOffsetRangeOrUndefined(t){let r=this.applyToOffsetOrUndefined(t.start);if(r===void 0)return;let n=this.applyToOffsetOrUndefined(t.endExclusive);if(n!==void 0)return new Vt(r,n)}applyInverseToOffset(t){let r=0;for(let n of this.edits){let i=n.newText.length;if(n.replaceRange.start<=t-r){if(t-r<n.replaceRange.start+i)return n.replaceRange.start;r+=i-n.replaceRange.length}else break}return t-r}},el=class e{constructor(t,r){this.replaceRange=t;this.newText=r}static{s(this,"SingleOffsetEdit")}static delete(t){return new e(t,"")}static fromJson(t){return new e(Vt.ofStartAndLength(t.pos,t.len),t.txt)}toString(){return`${this.replaceRange} -> "${this.newText}"`}removeCommonSuffixPrefix(t){let r=t.substring(this.replaceRange.start,this.replaceRange.endExclusive),n=qS(r,this.newText),i=Math.min(r.length-n,this.newText.length-n,s6(r,this.newText)),o=new Vt(this.replaceRange.start+n,this.replaceRange.endExclusive-i),a=this.newText.substring(n,this.newText.length-i);return new e(o,a)}normalizeEOL(t){let r=this.newText.replace(/\r\n|\n/g,t);return new e(this.replaceRange,r)}isNoop(t){return this.newText===t.substring(this.replaceRange.start,this.replaceRange.endExclusive)}get isEmpty(){return this.newText.length===0&&this.replaceRange.length===0}};function twt(e,t){if(e=e.normalize(),t=t.normalize(),e.isEmpty)return t;if(t.isEmpty)return e;let r=[...e.edits],n=[],i=0;for(let o of t.edits){for(;;){let u=r[0];if(!u||u.replaceRange.start+i+u.newText.length>=o.replaceRange.start)break;r.shift(),n.push(u),i+=u.newText.length-u.replaceRange.length}let a=i,l,c;for(;;){let u=r[0];if(!u||u.replaceRange.start+i>o.replaceRange.endExclusive)break;l||(l=u),c=u,r.shift(),i+=u.newText.length-u.replaceRange.length}if(!l)n.push(new el(o.replaceRange.delta(-i),o.newText));else{let u="",f=o.replaceRange.start-(l.replaceRange.start+a);f>0&&(u=l.newText.slice(0,f));let m=c.replaceRange.endExclusive+i-o.replaceRange.endExclusive;if(m>0){let g=new el(Vt.ofStartAndLength(c.replaceRange.endExclusive,0),c.newText.slice(-m));r.unshift(g),i-=g.newText.length-g.replaceRange.length}let h=u+o.newText,p=new Vt(Math.min(l.replaceRange.start,o.replaceRange.start-a),o.replaceRange.endExclusive-i);n.push(new el(p,h))}}for(;;){let o=r.shift();if(!o)break;n.push(o)}return new um(n).normalize()}s(twt,"joinEdits");var Is=class e{constructor(t){this.edits=t;Pl(eC(t,(r,n)=>r.range.endExclusive<=n.range.start))}static{s(this,"Edit")}static deserialize(t){return new e(t.map(r=>qs.deserialize(r)))}static{this.empty=new e([])}static create(t){return new e(t)}static single(t){return new e([t])}static replace(t,r){return new e([qs.replace(t,r)])}static insert(t,r){return new e([qs.insert(t,r)])}static fromOffsetEdit(t){return new e(t.edits.map(r=>qs.replace(r.replaceRange,r.newText)))}static compose(t){let r;for(let n of t)r===void 0?r=n:r=r.compose(n);return r??e.empty}static trySwap(t,r){let n=t.inverse((a,l)=>" ".repeat(l-a)),i=r.tryRebase(n);if(!i)return;let o=t.tryRebase(i);if(o)return{e1:i,e2:o}}toOffsetEdit(){return new um(this.edits.map(t=>new el(t.range,t.newText)))}compose(t){return rwt(this,t)}getNewRanges(){return this.toOffsetEdit().getNewTextRanges()}apply(t){let r="",n=0;for(let i of this.edits)r+=t.substring(n,i.range.start),r+=i.newText,n=i.range.endExclusive;return r+=t.substring(n),r}normalize(){let t=[],r;for(let n of this.edits)if(!(n.newText.length===0&&n.range.length===0))if(r&&r.range.endExclusive===n.range.start){let i=r.data?.merge(n.data)??void 0;r=qs.replaceWithData(r.range.join(n.range),r.newText+n.newText,i)}else r&&t.push(r),r=n;return r&&t.push(r),new e(t)}normalizeOnSource(t){let r=this.apply(t),i=qs.replace(Vt.ofLength(t.length),r).removeCommonSuffixAndPrefix(t);return i.isNeutral()?e.empty:i.toEdit()}toString(){return this.edits.map(t=>t.toString()).join("")}decompose(t){if(t===void 0){let i=[],o=0;for(let a of this.edits)i.push(qs.replaceWithData(Vt.ofStartAndLength(a.range.start+o,a.range.length),a.newText,a.data)),o+=a.newText.length-a.range.length;return new IG(i)}if(this.edits.length!==t.arrayLength)throw MS(`Number of edits ${this.edits.length} does not match ${t.arrayLength}`);let r=[],n=this.edits.slice();for(let i=0;i<this.edits.length;++i){let o=t.mapIndexBack(i),a=n[o];r.push(a);for(let l=o;l<n.length;++l){let c=a.newText.length-a.range.length,u=n[l];n[l]=qs.replaceWithData(Vt.ofStartAndLength(u.range.start+c,u.range.length),u.newText,u.data)}}return new IG(r)}getRange(){if(this.edits.length!==0)return this.edits[0].range.join(this.edits[this.edits.length-1].range)}isEmpty(){return this.edits.length===0}applyInverseToOffsetRange(t){let r=this.toOffsetEdit(),n=r.applyInverseToOffset(t.start),i=r.applyInverseToOffset(t.endExclusive);return new Vt(n,i)}serialize(){return this.edits.map(t=>t.serialize())}equals(t){if(this.edits.length!==t.edits.length)return!1;for(let r=0;r<this.edits.length;++r)if(!this.edits[r].equals(t.edits[r]))return!1;return!0}inverse(t){let r=[],n=0;for(let i of this.edits)r.push(qs.replace(Vt.ofStartAndLength(i.range.start+n,i.newText.length),t(i.range.start,i.range.endExclusive))),n+=i.newText.length-i.range.length;return new e(r)}inverseOnString(t){return this.inverse((r,n)=>t.substring(r,n))}mapData(t){return e.create(this.edits.map(r=>r.mapData(t)))}tryRebase(t){let r=[],n=0,i=0,o=0;for(;i<this.edits.length||n<t.edits.length;){let a=t.edits[n],l=this.edits[i];if(l)if(!a)r.push(qs.replace(l.range.delta(o),l.newText)),i++;else{if(l.range.intersectsOrTouches(a.range))return;l.range.start<a.range.start?(r.push(qs.replace(l.range.delta(o),l.newText)),i++):(n++,o+=a.newText.length-a.range.length)}else break}return new e(r)}};function rwt(e,t){if(e=e.normalize(),t=t.normalize(),e.isEmpty())return t;if(t.isEmpty())return e;let r=[...e.edits],n=[],i=0;for(let o of t.edits){for(;;){let u=r[0];if(!u||u.range.start+i+u.newText.length>=o.range.start)break;r.shift(),n.push(u),i+=u.newText.length-u.range.length}let a=i,l,c;for(;;){let u=r[0];if(!u||u.range.start+i>o.range.endExclusive)break;l||(l=u),c=u,r.shift(),i+=u.newText.length-u.range.length}if(!l)n.push(qs.replaceWithData(o.range.delta(-i),o.newText,o.data));else{let u=o.range.start-a-l.range.start;u>0&&n.push(qs.replaceWithData(Vt.emptyAt(l.range.start),l.newText.slice(0,u),l.data));let f=c.range.endExclusive+i-o.range.endExclusive;if(f>0){let h=qs.replaceWithData(Vt.emptyAt(c.range.endExclusive),c.newText.slice(-f),c.data);r.unshift(h),i-=h.newText.length-h.range.length}let m=new Vt(Math.min(l.range.start,o.range.start-a),o.range.endExclusive-i);n.push(qs.replaceWithData(m,o.newText,o.data))}}for(;;){let o=r.shift();if(!o)break;n.push(o)}return Is.create(n).normalize()}s(rwt,"joinEdits");var qs=class e{constructor(t,r,n){this.range=t;this.newText=r;this.data=n}static{s(this,"SingleEdit")}static deserialize(t){return new e(new Vt(t[0],t[1]),t[2],void 0)}static replace(t,r){return new e(t,r,void 0)}static insert(t,r){return new e(new Vt(t,t),r,void 0)}static delete(t){return new e(t,"",void 0)}static replaceWithData(t,r,n){return new e(t,r,n)}static insertWithData(t,r,n){return new e(new Vt(t,t),r,n)}static deleteWithData(t,r){return new e(t,"",r)}static fromSingleOffsetEdit(t){return new e(t.replaceRange,t.newText,void 0)}toString(){return`${this.range}->${JSON.stringify(this.newText)}`}serialize(){return[this.range.start,this.range.endExclusive,this.newText]}toEdit(){return Is.create([this])}equals(t){return this.range.equals(t.range)&&this.newText===t.newText}removeCommonSuffixAndPrefix(t){return this.removeCommonSuffix(t).removeCommonPrefix(t)}removeCommonPrefix(t){let r=this.range.substring(t),n=nwt(r,this.newText);return n===0?this:e.replaceWithData(this.range.deltaStart(n),this.newText.substring(n),this.data)}removeCommonSuffix(t){let r=this.range.substring(t),n=iwt(r,this.newText);return n===0?this:e.replaceWithData(this.range.deltaEnd(-n),this.newText.substring(0,this.newText.length-n),this.data)}isNeutral(){return this.newText.length===0&&this.range.length===0}mapData(t){return new e(this.range,this.newText,t(this.data))}};function nwt(e,t){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r++;return r}s(nwt,"commonPrefixLength");function iwt(e,t){let r=0;for(;r<e.length&&r<t.length&&e[e.length-1-r]===t[t.length-1-r];)r++;return r}s(iwt,"commonSuffixLength");var Yc=class e{constructor(t,r){this.base=t;this.edit=r}static{s(this,"RootedEdit")}getEditedState(){return this.base.apply(this.edit)}rebase(t){return I0(()=>null.base.equals(this.base.apply(t))),I0(()=>null.base.apply(null.edit).equals(this.base.apply(t).apply(this.edit))),null}toString(){return jg.fromEdit(this).toString()}normalize(){return new e(this.base,this.edit.normalizeOnSource(this.base.value))}equals(t){return this.base.equals(t.base)&&this.edit.equals(t.edit)}},IG=class e{constructor(t){this.edits=t}static{s(this,"SingleEdits")}static{this.empty=new e([])}compose(){return Is.compose(this.edits.map(t=>t.toEdit()))}apply(t){return this.compose().apply(t)}isEmpty(){return this.edits.length===0}toEdits(){return new Hg(this.edits.map(t=>t.toEdit()))}},Hg=class e{constructor(t){this.edits=t}static{s(this,"Edits")}static{this.empty=new e([])}static single(t){return new e([t])}compose(){return Is.compose(this.edits)}add(t){return new e([...this.edits,t])}apply(t){return this.compose().apply(t)}isEmpty(){return this.edits.length===0}swap(t){let r=t,n=[];for(let i of this.edits){let o=Is.trySwap(r,i);if(!o)return;n.push(o.e1),r=o.e2}return{edits:new e(n),editLast:r}}mapData(t){return new e(this.edits.map(r=>r.mapData(t)))}serialize(){return this.edits.map(t=>t.serialize())}static deserialize(t){return new e(t.map(r=>Is.deserialize(r)))}toHumanReadablePatch(t){let r=t,n=[];for(let i of this.edits){let o=Fo.fromEdit(new Yc(r,i));n.push(o.humanReadablePatch(r.getLines())),r=r.apply(i)}return n.join(`
---
`)}};d();var D9=class e{constructor(t){this.edits=t}static{s(this,"TextEdit")}static fromEdit(t,r){let n=t.edits.map(i=>new XA(r.getTransformer().getRange(i.range),i.newText));return new e(n)}toEdit(t){let r=this.edits.map(n=>qs.replace(t.getTransformer().getOffsetRange(n.range),n.newText));return Is.create(r)}mapEdits(t){return new e(this.edits.map(t))}},XA=class e{constructor(t,r){this.range=t;this.newText=r}static{s(this,"SingleTextEdit")}static joinEdits(t,r){if(t.length===0)throw new vn;if(t.length===1)return t[0];let n=t[0].range.getStartPosition(),i=t[t.length-1].range.getEndPosition(),o="";for(let a=0;a<t.length;a++){let l=t[a];if(o+=l.newText,a<t.length-1){let c=t[a+1],u=yr.fromPositions(l.range.getEndPosition(),c.range.getStartPosition()),f=r.getValueOfRange(u);o+=f}}return new e(yr.fromPositions(n,i),o)}static fromSingleEdit(t,r){return new e(r.getTransformer().getRange(t.range),t.newText)}extendToCoverRange(t,r){if(this.range.containsRange(t))return this;let n=this.range.plusRange(t),i=r.getValueOfRange(yr.fromPositions(n.getStartPosition(),this.range.getStartPosition())),o=r.getValueOfRange(yr.fromPositions(this.range.getEndPosition(),n.getEndPosition())),a=i+this.newText+o;return new e(n,a)}extendToFullLine(t){let r=new yr(this.range.startLineNumber,1,this.range.endLineNumber,t.getTransformer().getLineLength(this.range.endLineNumber)+1);return this.extendToCoverRange(r,t)}toSingleEdit(t){let n=t.getTransformer().getOffsetRange(this.range);return qs.replace(n,this.newText)}};var Fo=class e{constructor(t){this.edits=t;Pl(eC(t,(r,n)=>r.lineRange.endLineNumberExclusive<=n.lineRange.startLineNumber))}static{s(this,"LineEdit")}static{this.empty=new e([])}static deserialize(t){return new e(t.map(r=>Oh.deserialize(r)))}static fromEdit(t){let r=D9.fromEdit(t.edit,t.base);return e.fromTextEdit(r,t.base)}static fromTextEdit(t,r){let n=t.edits,i=[],o=[];for(let a=0;a<n.length;a++){let l=n[a],c=a+1<n.length?n[a+1]:void 0;if(o.push(l),c&&c.range.startLineNumber===l.range.endLineNumber)continue;let u=XA.joinEdits(o,r);o.length=0;let f=Oh.fromSingleTextEdit(u,r);i.push(f)}return new e(i)}static createFromUnsorted(t){let r=t.slice();return r.sort(vf(n=>n.lineRange.startLineNumber,bf)),new e(r)}isEmpty(){return this.edits.length===0}toEdit(t){let r=[];for(let n of this.edits){let i=n.toSingleEdit(t);r.push(i)}return Is.create(r)}toString(){return this.edits.map(t=>t.toString()).join(",")}serialize(){return this.edits.map(t=>t.serialize())}getNewLineRanges(){let t=[],r=0;for(let n of this.edits)t.push(Cr.ofLength(n.lineRange.startLineNumber+r,n.newLines.length)),r+=n.newLines.length-n.lineRange.length;return t}mapLineNumber(t){let r=0;for(let n of this.edits){if(n.lineRange.endLineNumberExclusive>t)break;r+=n.newLines.length-n.lineRange.length}return t+r}mapLineRange(t){return new Cr(this.mapLineNumber(t.startLineNumber),this.mapLineNumber(t.endLineNumberExclusive))}mapBackLineRange(t,r){return this.inverse(r).mapLineRange(t)}touches(t){return this.edits.some(r=>t.edits.some(n=>r.lineRange.intersect(n.lineRange)))}rebase(t){return new e(this.edits.map(r=>new Oh(t.mapLineRange(r.lineRange),r.newLines)))}humanReadablePatch(t){let r=[];function n(l,c,u,f){let m=u==="unmodified"?" ":u==="deleted"?"-":"+";f===void 0&&(f="[[[[[ WARNING: LINE DOES NOT EXIST ]]]]]");let h=l===-1?" ":l.toString().padStart(3," "),p=c===-1?" ":c.toString().padStart(3," ");r.push(`${m} ${h} ${p} ${f}`)}s(n,"pushLine");function i(){r.push("---")}s(i,"pushSeperator");let o=0,a=!0;for(let l of J8(this.edits,(c,u)=>SLe(c.lineRange,u.lineRange)<=5)){a?a=!1:i();let c=l[0].lineRange.startLineNumber-2;for(let u of l){for(let h=Math.max(1,c);h<u.lineRange.startLineNumber;h++)n(h,h+o,"unmodified",t[h-1]);let f=u.lineRange,m=u.newLines;for(let h of f.mapToLineArray(p=>p)){let p=t[h-1];n(h,-1,"deleted",p)}for(let h=0;h<m.length;h++){let p=m[h];n(-1,f.startLineNumber+o+h,"added",p)}c=f.endLineNumberExclusive,o+=u.newLines.length-u.lineRange.length}for(let u=c;u<=Math.min(c+2,t.length);u++)n(u,u+o,"unmodified",t[u-1])}return r.join(`
`)}apply(t){let r=[],n=0;for(let i of this.edits){for(;n<i.lineRange.startLineNumber-1;)r.push(t[n]),n++;for(let o of i.newLines)r.push(o);n=i.lineRange.endLineNumberExclusive-1}for(;n<t.length;)r.push(t[n]),n++;return r}inverse(t){let r=this.getNewLineRanges();return new e(this.edits.map((n,i)=>new Oh(r[i],t.slice(n.lineRange.startLineNumber-1,n.lineRange.endLineNumberExclusive-1))))}},Oh=class e{constructor(t,r){this.lineRange=t;this.newLines=r}static{s(this,"SingleLineEdit")}static deserialize(t){return new e(Cr.ofLength(t[0],t[1]-t[0]),t[2])}static fromSingleTextEdit(t,r){let n=gg(t.newText),i=t.range.startLineNumber,o=r.getValueOfRange(yr.fromPositions(new mn(t.range.startLineNumber,1),t.range.getStartPosition()));n[0]=o+n[0];let a=t.range.endLineNumber+1,l=r.getTransformer().getLineLength(t.range.endLineNumber)+1,c=r.getValueOfRange(yr.fromPositions(t.range.getEndPosition(),new mn(t.range.endLineNumber,l)));n[n.length-1]=n[n.length-1]+c;let u=t.range.startColumn===r.getTransformer().getLineLength(t.range.startLineNumber)+1,f=t.range.endColumn===1;return u&&n[0].length===o.length&&(i++,n.shift()),n.length>0&&i<a&&f&&n[n.length-1].length===c.length&&(a--,n.pop()),new e(new Cr(i,a),n)}toLineEdit(){return new Fo([this])}toSingleTextEdit(t){if(this.newLines.length===0){let r=t.getTransformer().textLength;if(this.lineRange.endLineNumberExclusive===r.lineCount+2){let n;if(this.lineRange.startLineNumber>1){let o=this.lineRange.startLineNumber-1,a=t.getTransformer().getLineLength(o)+1;n=new mn(o,a)}else n=new mn(1,1);let i=r.addToPosition(new mn(1,1));return new XA(yr.fromPositions(n,i),"")}else return new XA(new yr(this.lineRange.startLineNumber,1,this.lineRange.endLineNumberExclusive,1),"")}else if(this.lineRange.isEmpty){let r,n,i,o=this.lineRange.startLineNumber;return o===t.getTransformer().textLength.lineCount+2?(r=o-1,n=t.getTransformer().getLineLength(r)+1,i=this.newLines.map(a=>`
`+a).join("")):(r=o,n=1,i=this.newLines.map(a=>a+`
`).join("")),new XA(yr.fromPositions(new mn(r,n)),i)}else{let r=this.lineRange.endLineNumberExclusive-1,n=t.getTransformer().getLineLength(r)+1,i=new yr(this.lineRange.startLineNumber,1,r,n),o=this.newLines.join(`
`);return new XA(i,o)}}toSingleEdit(t){let r=this.toSingleTextEdit(t),n=t.getTransformer().getOffsetRange(r.range);return qs.replace(n,r.newText)}toString(){return`${this.lineRange}->${JSON.stringify(this.newLines)}`}serialize(){return[this.lineRange.startLineNumber,this.lineRange.endLineNumberExclusive,this.newLines]}removeCommonSuffixPrefixLines(t){let r=this.lineRange.startLineNumber,n=this.lineRange.endLineNumberExclusive,i=0;for(;r<n&&i<this.newLines.length&&this.newLines[i]===t.getLineAt(r);)r++,i++;let o=0;for(;r<n&&o+i<this.newLines.length&&this.newLines[this.newLines.length-1-o]===t.getLineAt(n-1);)n--,o++;return i===0&&o===0?this:new e(new Cr(r,n),this.newLines.slice(i,this.newLines.length-o))}},owt;(t=>{function e(r){return Array.isArray(r)&&r.length===3&&typeof r[0]=="number"&&typeof r[1]=="number"&&Array.isArray(r[2])&&r[2].every(n=>typeof n=="string")}t.is=e,s(e,"is")})(owt||={});var jg=class e{constructor(t,r){this.base=t;this.edit=r}static{s(this,"RootedLineEdit")}static fromEdit(t){let r=Fo.fromEdit(t);return new e(t.base,r)}toString(){return this.edit.humanReadablePatch(this.base.getLines())}toEdit(){return this.edit.toEdit(this.base)}toRootedEdit(){return new Yc(this.base,this.toEdit())}getEditedState(){let t=this.base.getLines();return this.edit.apply(t)}removeCommonSuffixPrefixLines(){let t=s(n=>!n.lineRange.isEmpty||n.newLines.length>0,"isNotEmptyEdit"),r=this.edit.edits.map(n=>n.removeCommonSuffixPrefixLines(this.base)).filter(n=>t(n));return new e(this.base,new Fo(r))}};d();var TG=class e{constructor(t){this._indexMap=t}static{s(this,"Permutation")}get arrayLength(){return this._indexMap.length}static createSortPermutation(t,r){let n=Array.from(t.keys()).sort((i,o)=>r(t[i],t[o]));return new e(n)}apply(t){if(t.length!==this.arrayLength)throw MS(`Permutation must be applied on an array of same length. Received length: ${t.length}. Expected length: ${this.arrayLength}`);return t.map((r,n)=>t[this._indexMap[n]])}mapIndexBack(t){let r=this._indexMap.at(t);if(r===void 0)throw MS(`Given index must be within original array length. Received: ${t}. Expected: 0 <= x < ${this.arrayLength}`);return r}inverse(){let t=this._indexMap.slice();for(let r=0;r<this._indexMap.length;r++)t[this._indexMap[r]]=r;return new e(t)}};d();d();var Lk=Ze(Gh());function HFe(e){return e.map(l7t).join(`
`)}s(HFe,"stringifyChatMessages");function l7t({role:e,content:t}){if(e!==Lk.Raw.ChatRole.User&&e!==Lk.Raw.ChatRole.System)return"omitted because of non-user and non-system role";let r=e===Lk.Raw.ChatRole.User?"User":"System",n=t.at(0);return n?.type!==Lk.Raw.ChatCompletionContentPartKind.Text?"omitted because of non-text content":`${r}
------
${n.text}
==================`}s(l7t,"stringifyMessage");d();d();var c7t=Symbol("MicrotaskDelay");function u7t(e){let t=new SA,r=e(t.token),n=new Promise((i,o)=>{let a=t.token.onCancellationRequested(()=>{a.dispose(),o(new hg)});Promise.resolve(r).then(l=>{a.dispose(),t.dispose(),i(l)},l=>{a.dispose(),t.dispose(),o(l)})});return new class{cancel(){t.cancel(),t.dispose()}then(i,o){return n.then(i,o)}catch(i){return this.then(void 0,i)}finally(i){return n.finally(i)}}}s(u7t,"createCancelablePromise");function i2(e,t){return t?new Promise((r,n)=>{let i=setTimeout(()=>{o.dispose(),r()},e),o=t.onCancellationRequested(()=>{clearTimeout(i),o.dispose(),n(new hg)})}):u7t(r=>i2(e,r))}s(i2,"timeout");var ZG=class{constructor(t,r){this._isDisposed=!1;this._token=-1,typeof t=="function"&&typeof r=="number"&&this.setIfNotSet(t,r)}static{s(this,"TimeoutTimer")}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(t,r){if(this._isDisposed)throw new vn("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,t()},r)}setIfNotSet(t,r){if(this._isDisposed)throw new vn("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,t()},r))}};var Fk=class{static{s(this,"DeferredPromise")}get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((t,r)=>{this.completeCallback=t,this.errorCallback=r})}complete(t){return new Promise(r=>{this.completeCallback(t),this.outcome={outcome:0,value:t},r()})}error(t){return new Promise(r=>{this.errorCallback(t),this.outcome={outcome:1,value:t},r()})}cancel(){return this.error(new hg)}},f7t;(r=>{async function e(n){let i,o=await Promise.all(n.map(a=>a.then(l=>l,l=>{i||(i=l)})));if(typeof i<"u")throw i;return o}r.settled=e,s(e,"settled");function t(n){return new Promise(async(i,o)=>{try{await n(i,o)}catch(a){o(a)}})}r.withAsyncBody=t,s(t,"withAsyncBody")})(f7t||={});var Mk=class e{static{s(this,"AsyncIterableObject")}static fromArray(t){return new e(r=>{r.emitMany(t)})}static fromPromise(t){return new e(async r=>{r.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new e(async r=>{await Promise.all(t.map(async n=>{for await(let i of n)r.emitOne(i)}))})}static{this.EMPTY=e.fromArray([])}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new Ef,queueMicrotask(async()=>{let n={emitOne:s(i=>this.emitOne(i),"emitOne"),emitMany:s(i=>this.emitMany(i),"emitMany"),reject:s(i=>this.reject(i),"reject")};try{await Promise.resolve(t(n)),this.resolve()}catch(i){this.reject(i)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:s(async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Ov.toPromise(this._onStateChanged.event)}while(!0)},"next"),return:s(async()=>(this._onReturn?.(),{done:!0,value:void 0}),"return")}}static map(t,r){return new e(async n=>{for await(let i of t)n.emitOne(r(i))})}map(t){return e.map(this,t)}static filter(t,r){return new e(async n=>{for await(let i of t)r(i)&&n.emitOne(i)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,r=>!!r)}coalesce(){return e.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return e.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};var eH=class{constructor(t){this._deferred=new Fk;this._asyncIterable=new Mk(i=>{if(r){i.reject(r);return}return n&&i.emitMany(n),this._errorFn=o=>i.reject(o),this._emitFn=o=>i.emitOne(o),this._deferred.p},t);let r,n;this._emitFn=i=>{n||(n=[]),n.push(i)},this._errorFn=i=>{r||(r=i)}}static{s(this,"AsyncIterableSource")}get asyncIterable(){return this._asyncIterable}resolve(){this._deferred.complete()}reject(t){this._errorFn(t),this._deferred.complete()}emitOne(t){this._emitFn(t)}};d();d();d();d();d();var rH=!1,nH=!1,tH=!1,d7t=!1,m7t=!1,jFe=!1,h7t=!1,p7t=!1,g7t=!1,A7t=!1;var o2,s2=globalThis,dm;typeof s2.vscode<"u"&&typeof s2.vscode.process<"u"?dm=s2.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(dm=process);var VFe=typeof dm?.versions?.electron=="string",y7t=VFe&&dm?.type==="renderer";typeof dm=="object"?(rH=dm.platform==="win32",nH=dm.platform==="darwin",tH=dm.platform==="linux",d7t=tH&&!!dm.env.SNAP&&!!dm.env.SNAP_REVISION,h7t=VFe,g7t=!!dm.env.CI||!!dm.env.BUILD_ARTIFACTSTAGINGDIRECTORY,m7t=!0):typeof navigator=="object"&&!y7t?(o2=navigator.userAgent,rH=o2.indexOf("Windows")>=0,nH=o2.indexOf("Macintosh")>=0,p7t=(o2.indexOf("Macintosh")>=0||o2.indexOf("iPad")>=0||o2.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,tH=o2.indexOf("Linux")>=0,A7t=o2?.indexOf("Mobi")>=0,jFe=!0):console.error("Unable to resolve platform.");var Vce=0;nH?Vce=1:rH?Vce=3:tH&&(Vce=2);var Qb=rH,$Fe=nH;var C7t=jFe&&typeof s2.importScripts=="function",Nin=C7t?s2.origin:void 0;var Yg=o2;var x7t=typeof s2.postMessage=="function"&&!s2.importScripts,Lin=(()=>{if(x7t){let e=[];s2.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){let o=e[n];if(o.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),o.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),s2.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var v7t=!!(Yg&&Yg.indexOf("Chrome")>=0),Fin=!!(Yg&&Yg.indexOf("Firefox")>=0),Min=!!(!v7t&&Yg&&Yg.indexOf("Safari")>=0),Qin=!!(Yg&&Yg.indexOf("Edg/")>=0),Oin=!!(Yg&&Yg.indexOf("Android")>=0);var Ob,$ce=globalThis.vscode;if(typeof $ce<"u"&&typeof $ce.process<"u"){let e=$ce.process;Ob={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Ob={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Ob={get platform(){return Qb?"win32":$Fe?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var Qk=Ob.cwd,zFe=Ob.env,YFe=Ob.platform,jin=Ob.arch;var E7t=65,I7t=97,T7t=90,w7t=122,ZC=46,Wl=47,_u=92,JC=58,_7t=63,iH=class extends Error{static{s(this,"ErrorInvalidArgType")}constructor(t,r,n){let i;typeof r=="string"&&r.indexOf("not ")===0?(i="must not be",r=r.replace(/^not /,"")):i="must be";let o=t.indexOf(".")!==-1?"property":"argument",a=`The "${t}" ${o} ${i} of type ${r}`;a+=`. Received type ${typeof n}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}};function S7t(e,t){if(e===null||typeof e!="object")throw new iH(t,"Object",e)}s(S7t,"validateObject");function fa(e,t){if(typeof e!="string")throw new iH(t,"string",e)}s(fa,"validateString");var Su=YFe==="win32";function li(e){return e===Wl||e===_u}s(li,"isPathSeparator");function zce(e){return e===Wl}s(zce,"isPosixPathSeparator");function XC(e){return e>=E7t&&e<=T7t||e>=I7t&&e<=w7t}s(XC,"isWindowsDeviceRoot");function oH(e,t,r,n){let i="",o=0,a=-1,l=0,c=0;for(let u=0;u<=e.length;++u){if(u<e.length)c=e.charCodeAt(u);else{if(n(c))break;c=Wl}if(n(c)){if(!(a===u-1||l===1))if(l===2){if(i.length<2||o!==2||i.charCodeAt(i.length-1)!==ZC||i.charCodeAt(i.length-2)!==ZC){if(i.length>2){let f=i.lastIndexOf(r);f===-1?(i="",o=0):(i=i.slice(0,f),o=i.length-1-i.lastIndexOf(r)),a=u,l=0;continue}else if(i.length!==0){i="",o=0,a=u,l=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",o=2)}else i.length>0?i+=`${r}${e.slice(a+1,u)}`:i=e.slice(a+1,u),o=u-a-1;a=u,l=0}else c===ZC&&l!==-1?++l:l=-1}return i}s(oH,"normalizeString");function R7t(e){return e?`${e[0]==="."?"":"."}${e}`:""}s(R7t,"formatExt");function KFe(e,t){S7t(t,"pathObject");let r=t.dir||t.root,n=t.base||`${t.name||""}${R7t(t.ext)}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}s(KFe,"_format");var da={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let o;if(i>=0){if(o=e[i],fa(o,`paths[${i}]`),o.length===0)continue}else t.length===0?o=Qk():(o=zFe[`=${t}`]||Qk(),(o===void 0||o.slice(0,2).toLowerCase()!==t.toLowerCase()&&o.charCodeAt(2)===_u)&&(o=`${t}\\`));let a=o.length,l=0,c="",u=!1,f=o.charCodeAt(0);if(a===1)li(f)&&(l=1,u=!0);else if(li(f))if(u=!0,li(o.charCodeAt(1))){let m=2,h=m;for(;m<a&&!li(o.charCodeAt(m));)m++;if(m<a&&m!==h){let p=o.slice(h,m);for(h=m;m<a&&li(o.charCodeAt(m));)m++;if(m<a&&m!==h){for(h=m;m<a&&!li(o.charCodeAt(m));)m++;(m===a||m!==h)&&(c=`\\\\${p}\\${o.slice(h,m)}`,l=m)}}}else l=1;else XC(f)&&o.charCodeAt(1)===JC&&(c=o.slice(0,2),l=2,a>2&&li(o.charCodeAt(2))&&(u=!0,l=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(n){if(t.length>0)break}else if(r=`${o.slice(l)}\\${r}`,n=u,u&&t.length>0)break}return r=oH(r,!n,"\\",li),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){fa(e,"path");let t=e.length;if(t===0)return".";let r=0,n,i=!1,o=e.charCodeAt(0);if(t===1)return zce(o)?"\\":e;if(li(o))if(i=!0,li(e.charCodeAt(1))){let l=2,c=l;for(;l<t&&!li(e.charCodeAt(l));)l++;if(l<t&&l!==c){let u=e.slice(c,l);for(c=l;l<t&&li(e.charCodeAt(l));)l++;if(l<t&&l!==c){for(c=l;l<t&&!li(e.charCodeAt(l));)l++;if(l===t)return`\\\\${u}\\${e.slice(c)}\\`;l!==c&&(n=`\\\\${u}\\${e.slice(c,l)}`,r=l)}}}else r=1;else XC(o)&&e.charCodeAt(1)===JC&&(n=e.slice(0,2),r=2,t>2&&li(e.charCodeAt(2))&&(i=!0,r=3));let a=r<t?oH(e.slice(r),!i,"\\",li):"";return a.length===0&&!i&&(a="."),a.length>0&&li(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){fa(e,"path");let t=e.length;if(t===0)return!1;let r=e.charCodeAt(0);return li(r)||t>2&&XC(r)&&e.charCodeAt(1)===JC&&li(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let o=0;o<e.length;++o){let a=e[o];fa(a,"path"),a.length>0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&li(r.charCodeAt(0))){++i;let o=r.length;o>1&&li(r.charCodeAt(1))&&(++i,o>2&&(li(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&li(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return da.normalize(t)},relative(e,t){if(fa(e,"from"),fa(t,"to"),e===t)return"";let r=da.resolve(e),n=da.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;i<e.length&&e.charCodeAt(i)===_u;)i++;let o=e.length;for(;o-1>i&&e.charCodeAt(o-1)===_u;)o--;let a=o-i,l=0;for(;l<t.length&&t.charCodeAt(l)===_u;)l++;let c=t.length;for(;c-1>l&&t.charCodeAt(c-1)===_u;)c--;let u=c-l,f=a<u?a:u,m=-1,h=0;for(;h<f;h++){let g=e.charCodeAt(i+h);if(g!==t.charCodeAt(l+h))break;g===_u&&(m=h)}if(h!==f){if(m===-1)return n}else{if(u>f){if(t.charCodeAt(l+h)===_u)return n.slice(l+h+1);if(h===2)return n.slice(l+h)}a>f&&(e.charCodeAt(i+h)===_u?m=h:h===2&&(m=3)),m===-1&&(m=0)}let p="";for(h=i+m+1;h<=o;++h)(h===o||e.charCodeAt(h)===_u)&&(p+=p.length===0?"..":"\\..");return l+=m,p.length>0?`${p}${n.slice(l,c)}`:(n.charCodeAt(l)===_u&&++l,n.slice(l,c))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=da.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===_u){if(t.charCodeAt(1)===_u){let r=t.charCodeAt(2);if(r!==_7t&&r!==ZC)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(XC(t.charCodeAt(0))&&t.charCodeAt(1)===JC&&t.charCodeAt(2)===_u)return`\\\\?\\${t}`;return e},dirname(e){fa(e,"path");let t=e.length;if(t===0)return".";let r=-1,n=0,i=e.charCodeAt(0);if(t===1)return li(i)?e:".";if(li(i)){if(r=n=1,li(e.charCodeAt(1))){let l=2,c=l;for(;l<t&&!li(e.charCodeAt(l));)l++;if(l<t&&l!==c){for(c=l;l<t&&li(e.charCodeAt(l));)l++;if(l<t&&l!==c){for(c=l;l<t&&!li(e.charCodeAt(l));)l++;if(l===t)return e;l!==c&&(r=n=l+1)}}}}else XC(i)&&e.charCodeAt(1)===JC&&(r=t>2&&li(e.charCodeAt(2))?3:2,n=r);let o=-1,a=!0;for(let l=t-1;l>=n;--l)if(li(e.charCodeAt(l))){if(!a){o=l;break}}else a=!1;if(o===-1){if(r===-1)return".";o=r}return e.slice(0,o)},basename(e,t){t!==void 0&&fa(t,"suffix"),fa(e,"path");let r=0,n=-1,i=!0,o;if(e.length>=2&&XC(e.charCodeAt(0))&&e.charCodeAt(1)===JC&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(o=e.length-1;o>=r;--o){let c=e.charCodeAt(o);if(li(c)){if(!i){r=o+1;break}}else l===-1&&(i=!1,l=o+1),a>=0&&(c===t.charCodeAt(a)?--a===-1&&(n=o):(a=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=r;--o)if(li(e.charCodeAt(o))){if(!i){r=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname(e){fa(e,"path");let t=0,r=-1,n=0,i=-1,o=!0,a=0;e.length>=2&&e.charCodeAt(1)===JC&&XC(e.charCodeAt(0))&&(t=n=2);for(let l=e.length-1;l>=t;--l){let c=e.charCodeAt(l);if(li(c)){if(!o){n=l+1;break}continue}i===-1&&(o=!1,i=l+1),c===ZC?r===-1?r=l:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:KFe.bind(null,"\\"),parse(e){fa(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let r=e.length,n=0,i=e.charCodeAt(0);if(r===1)return li(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(li(i)){if(n=1,li(e.charCodeAt(1))){let m=2,h=m;for(;m<r&&!li(e.charCodeAt(m));)m++;if(m<r&&m!==h){for(h=m;m<r&&li(e.charCodeAt(m));)m++;if(m<r&&m!==h){for(h=m;m<r&&!li(e.charCodeAt(m));)m++;m===r?n=m:m!==h&&(n=m+1)}}}}else if(XC(i)&&e.charCodeAt(1)===JC){if(r<=2)return t.root=t.dir=e,t;if(n=2,li(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let o=-1,a=n,l=-1,c=!0,u=e.length-1,f=0;for(;u>=n;--u){if(i=e.charCodeAt(u),li(i)){if(!c){a=u+1;break}continue}l===-1&&(c=!1,l=u+1),i===ZC?o===-1?o=u:f!==1&&(f=1):o!==-1&&(f=-1)}return l!==-1&&(o===-1||f===0||f===1&&o===l-1&&o===a+1?t.base=t.name=e.slice(a,l):(t.name=e.slice(a,o),t.base=e.slice(a,l),t.ext=e.slice(o,l))),a>0&&a!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},k7t=(()=>{if(Su){let e=/\\/g;return()=>{let t=Qk().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Qk()})(),Da={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let i=n>=0?e[n]:k7t();fa(i,`paths[${n}]`),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===Wl)}return t=oH(t,!r,"/",zce),r?`/${t}`:t.length>0?t:"."},normalize(e){if(fa(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===Wl,r=e.charCodeAt(e.length-1)===Wl;return e=oH(e,!t,"/",zce),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return fa(e,"path"),e.length>0&&e.charCodeAt(0)===Wl},join(...e){if(e.length===0)return".";let t;for(let r=0;r<e.length;++r){let n=e[r];fa(n,"path"),n.length>0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":Da.normalize(t)},relative(e,t){if(fa(e,"from"),fa(t,"to"),e===t||(e=Da.resolve(e),t=Da.resolve(t),e===t))return"";let r=1,n=e.length,i=n-r,o=1,a=t.length-o,l=i<a?i:a,c=-1,u=0;for(;u<l;u++){let m=e.charCodeAt(r+u);if(m!==t.charCodeAt(o+u))break;m===Wl&&(c=u)}if(u===l)if(a>l){if(t.charCodeAt(o+u)===Wl)return t.slice(o+u+1);if(u===0)return t.slice(o+u)}else i>l&&(e.charCodeAt(r+u)===Wl?c=u:u===0&&(c=0));let f="";for(u=r+c+1;u<=n;++u)(u===n||e.charCodeAt(u)===Wl)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(o+c)}`},toNamespacedPath(e){return e},dirname(e){if(fa(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===Wl,r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===Wl){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&fa(t,"ext"),fa(e,"path");let r=0,n=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){let c=e.charCodeAt(o);if(c===Wl){if(!i){r=o+1;break}}else l===-1&&(i=!1,l=o+1),a>=0&&(c===t.charCodeAt(a)?--a===-1&&(n=o):(a=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===Wl){if(!i){r=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname(e){fa(e,"path");let t=-1,r=0,n=-1,i=!0,o=0;for(let a=e.length-1;a>=0;--a){let l=e.charCodeAt(a);if(l===Wl){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),l===ZC?t===-1?t=a:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||n===-1||o===0||o===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:KFe.bind(null,"/"),parse(e){fa(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let r=e.charCodeAt(0)===Wl,n;r?(t.root="/",n=1):n=0;let i=-1,o=0,a=-1,l=!0,c=e.length-1,u=0;for(;c>=n;--c){let f=e.charCodeAt(c);if(f===Wl){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),f===ZC?i===-1?i=c:u!==1&&(u=1):i!==-1&&(u=-1)}if(a!==-1){let f=o===0&&r?1:o;i===-1||u===0||u===1&&i===a-1&&i===o+1?t.base=t.name=e.slice(f,a):(t.name=e.slice(f,i),t.base=e.slice(f,a),t.ext=e.slice(i,a))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Da.win32=da.win32=da;Da.posix=da.posix=Da;var $in=Su?da.normalize:Da.normalize,zin=Su?da.isAbsolute:Da.isAbsolute,Yin=Su?da.join:Da.join,Kin=Su?da.resolve:Da.resolve,Jin=Su?da.relative:Da.relative,Xin=Su?da.dirname:Da.dirname,JFe=Su?da.basename:Da.basename,XFe=Su?da.extname:Da.extname,Zin=Su?da.format:Da.format,eon=Su?da.parse:Da.parse,ton=Su?da.toNamespacedPath:Da.toNamespacedPath,ron=Su?da.sep:Da.sep,non=Su?da.delimiter:Da.delimiter;var D7t=/^\w[\w\d+.-]*$/,P7t=/^\//,N7t=/^\/\//;function L7t(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!D7t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!P7t.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(N7t.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(L7t,"_validateUri");function F7t(e,t){return!e&&!t?"file":e}s(F7t,"_schemeFix");function M7t(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==jh&&(t=jh+t):t=jh;break}return t}s(M7t,"_referenceResolution");var Vo="",jh="/",Q7t=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,t3=class e{static{s(this,"URI")}static isUri(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,r,n,i,o,a=!1){typeof t=="object"?(this.scheme=t.scheme||Vo,this.authority=t.authority||Vo,this.path=t.path||Vo,this.query=t.query||Vo,this.fragment=t.fragment||Vo):(this.scheme=F7t(t,a),this.authority=r||Vo,this.path=M7t(this.scheme,n||Vo),this.query=i||Vo,this.fragment=o||Vo,L7t(this,a))}get fsPath(){return Yce(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:o,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=Vo),n===void 0?n=this.authority:n===null&&(n=Vo),i===void 0?i=this.path:i===null&&(i=Vo),o===void 0?o=this.query:o===null&&(o=Vo),a===void 0?a=this.fragment:a===null&&(a=Vo),r===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&a===this.fragment?this:new e3(r,n,i,o,a)}static parse(t,r=!1){let n=Q7t.exec(t);return n?new e3(n[2]||Vo,sH(n[4]||Vo),sH(n[5]||Vo),sH(n[7]||Vo),sH(n[9]||Vo),r):new e3(Vo,Vo,Vo,Vo,Vo)}static file(t){let r=Vo;if(Qb&&(t=t.replace(/\\/g,jh)),t[0]===jh&&t[1]===jh){let n=t.indexOf(jh,2);n===-1?(r=t.substring(2),t=jh):(r=t.substring(2,n),t=t.substring(n)||jh)}return new e3("file",r,t,Vo,Vo)}static from(t,r){return new e3(t.scheme,t.authority,t.path,t.query,t.fragment,r)}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return Qb&&t.scheme==="file"?n=e.file(da.join(Yce(t,!0),...r)).path:n=Da.join(t.path,...r),t.with({path:n})}toString(t=!1){return Kce(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let r=new e3(t);return r._formatted=t.external??null,r._fsPath=t._sep===tMe?t.fsPath??null:null,r}}else return t}[Symbol.for("debug.description")](){return`URI(${this.toString()})`}};var tMe=Qb?1:void 0,e3=class extends t3{constructor(){super(...arguments);this._formatted=null;this._fsPath=null}static{s(this,"Uri")}get fsPath(){return this._fsPath||(this._fsPath=Yce(this,!1)),this._fsPath}toString(r=!1){return r?Kce(this,!0):(this._formatted||(this._formatted=Kce(this,!1)),this._formatted)}toJSON(){let r={$mid:1};return this._fsPath&&(r.fsPath=this._fsPath,r._sep=tMe),this._formatted&&(r.external=this._formatted),this.path&&(r.path=this.path),this.scheme&&(r.scheme=this.scheme),this.authority&&(r.authority=this.authority),this.query&&(r.query=this.query),this.fragment&&(r.fragment=this.fragment),r}},rMe={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function ZFe(e,t,r){let n,i=-1;for(let o=0;o<e.length;o++){let a=e.charCodeAt(o);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||r&&a===91||r&&a===93||r&&a===58)i!==-1&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n!==void 0&&(n+=e.charAt(o));else{n===void 0&&(n=e.substr(0,o));let l=rMe[a];l!==void 0?(i!==-1&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=l):i===-1&&(i=o)}}return i!==-1&&(n+=encodeURIComponent(e.substring(i))),n!==void 0?n:e}s(ZFe,"encodeURIComponentFast");function O7t(e){let t;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=rMe[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}s(O7t,"encodeURIComponentMinimal");function Yce(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,Qb&&(r=r.replace(/\//g,"\\")),r}s(Yce,"uriToFsPath");function Kce(e,t){let r=t?O7t:ZFe,n="",{scheme:i,authority:o,path:a,query:l,fragment:c}=e;if(i&&(n+=i,n+=":"),(o||i==="file")&&(n+=jh,n+=jh),o){let u=o.indexOf("@");if(u!==-1){let f=o.substr(0,u);o=o.substr(u+1),u=f.lastIndexOf(":"),u===-1?n+=r(f,!1,!1):(n+=r(f.substr(0,u),!1,!1),n+=":",n+=r(f.substr(u+1),!1,!0)),n+="@"}o=o.toLowerCase(),u=o.lastIndexOf(":"),u===-1?n+=r(o,!1,!0):(n+=r(o.substr(0,u),!1,!0),n+=o.substr(u))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){let u=a.charCodeAt(1);u>=65&&u<=90&&(a=`/${String.fromCharCode(u+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){let u=a.charCodeAt(0);u>=65&&u<=90&&(a=`${String.fromCharCode(u+32)}:${a.substr(2)}`)}n+=r(a,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),c&&(n+="#",n+=t?c:ZFe(c,!1,!1)),n}s(Kce,"_asFormatted");function nMe(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+nMe(e.substr(3)):e}}s(nMe,"decodeURIComponentGraceful");var eMe=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function sH(e){return e.match(eMe)?e.replace(eMe,t=>nMe(t)):e}s(sH,"percentDecode");d();var Vh=class e{constructor(t){this.uri=t;this._uri=t3.parse(ac(this.uri))}static{s(this,"DocumentId")}static{this._cache=new RA({getCacheKey:JSON.stringify},t=>new e(t.uri))}static create(t){return e._cache.get({uri:t})}get path(){return this._uri.path}get fragment(){return this._uri.fragment}toString(){return this.uri}get baseName(){return JFe(this.uri)}get extension(){return XFe(this.uri)}toUri(){return this._uri}};d();var Ub;(r=>{r.PlainText="plaintext";function t(n){return n}r.create=t,s(t,"create")})(Ub||={});d();d();var Gl=class e{constructor(t,r){this.lineCount=t;this.columnCount=r}static{s(this,"TextLength")}static{this.zero=new e(0,0)}static lengthDiffNonNegative(t,r){return r.isLessThan(t)?e.zero:t.lineCount===r.lineCount?new e(0,r.columnCount-t.columnCount):new e(r.lineCount-t.lineCount,r.columnCount)}static betweenPositions(t,r){return t.lineNumber===r.lineNumber?new e(0,r.column-t.column):new e(r.lineNumber-t.lineNumber,r.column-1)}static fromPosition(t){return new e(t.lineNumber-1,t.column-1)}static ofRange(t){return e.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let r=0,n=0;for(let i of t)i===`
`?(r++,n=0):n++;return new e(r,n)}isZero(){return this.lineCount===0&&this.columnCount===0}isLessThan(t){return this.lineCount!==t.lineCount?this.lineCount<t.lineCount:this.columnCount<t.columnCount}isGreaterThan(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>t.columnCount}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}equals(t){return this.lineCount===t.lineCount&&this.columnCount===t.columnCount}compare(t){return this.lineCount!==t.lineCount?this.lineCount-t.lineCount:this.columnCount-t.columnCount}add(t){return t.lineCount===0?new e(this.lineCount,this.columnCount+t.columnCount):new e(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new yr(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new yr(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new yr(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Cr.ofLength(1,this.lineCount)}addToPosition(t){return this.lineCount===0?new mn(t.lineNumber,t.column+this.columnCount):new mn(t.lineNumber+this.lineCount,this.columnCount+1)}addToRange(t){return yr.fromPositions(this.addToPosition(t.getStartPosition()),this.addToPosition(t.getEndPosition()))}toString(){return`${this.lineCount},${this.columnCount}`}};var Hl=class e{constructor(t){this.value=t}static{s(this,"StringValue")}apply(t){return new e(t.apply(this.value))}equals(t){return this.value===t.value}getTransformer(){return this._transformer||(this._transformer=new Jce(this.value)),this._transformer}getValueOfRange(t){return this.getTransformer().getOffsetRange(t).substring(this.value)}getLines(){return gg(this.value)}getLineAt(t){return this.getLines()[t-1]}toString(){return this.value}getTextLength(){return this.getTransformer().textLength}},Jce=class{constructor(t){this.text=t;this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let r=0;r<t.length;r++)t.charAt(r)===`
`&&(this.lineStartOffsetByLineIdx.push(r+1),r>0&&t.charAt(r-1)==="\r"?this.lineEndOffsetByLineIdx.push(r-1):this.lineEndOffsetByLineIdx.push(r));this.lineEndOffsetByLineIdx.push(t.length)}static{s(this,"PositionOffsetTransformer")}getOffset(t){return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}getOffsetRange(t){return new Vt(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getPosition(t){let r=xf(this.lineStartOffsetByLineIdx,o=>o<=t),n=r+1,i=t-this.lineStartOffsetByLineIdx[r]+1;return new mn(n,i)}getRange(t){return yr.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getTextLength(t){return Gl.ofRange(this.getRange(t))}get textLength(){let t=this.lineStartOffsetByLineIdx.length-1;return new Gl(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}};var Ok=class e{constructor(t,r){this.firstEditStrategy=t;this.maxLinesPerEdit=r}static{s(this,"StatelessNextEditOptions")}doesFitMaxLinesPerEdit(t){return this.maxLinesPerEdit===void 0||t.lineRange.length<=this.maxLinesPerEdit&&t.newLines.length<=this.maxLinesPerEdit}serialize(){return{firstEditStrategy:this.firstEditStrategy,maxLinesPerEdit:this.maxLinesPerEdit}}static deserialize(t){return new e(t.firstEditStrategy,t.maxLinesPerEdit)}},aH=class e{constructor(t,r,n,i,o){this.id=t;this.documents=r;this.activeDocumentIdx=n;this.xtabEditHistory=i;this.options=o;this.seqid=String(++e.ID);this.cancellationTokenSource=new SA;this.liveDependentants=0;this.fetchIssued=!1;this._result=new Fk;Pl(r.length>0),Pl(n>=0&&n<r.length)}static{s(this,"StatelessNextEditRequest")}static{this.ID=0}get result(){return this._result.p}setResult(t){this._result.complete(t)}setResultError(t){this._result.error(t)}hasDocument(t){return this.documents.find(r=>r.id===t)!==void 0}static deserialize(t){return new e(t.id,t.documents.map(r=>Uk.deserialize(r)),t.activeDocumentIdx,[],Ok.deserialize(t.options))}getActiveDocument(){return this.documents[this.activeDocumentIdx]}serialize(){return{id:this.id,documents:this.documents.map(t=>t.serialize()),activeDocumentIdx:this.activeDocumentIdx,options:this.options.serialize()}}toString(){return this.toMarkdown()}toMarkdown(){return`### StatelessNextEditRequest
${this.documents.map((r,n)=>` * [${n+1}/${this.documents.length}] ${n===this.activeDocumentIdx?"(active document) ":""}`+r.toMarkdown()).join(`
`)}`}},Uk=class e{constructor(t,r,n,i,o,a,l,c,u,f,m,h,p=i.length,g=new Cr(1,i.length+1),y=void 0){this.id=t;this.workspaceRoot=r;this.languageId=n;this.documentLinesBeforeEdit=i;this.recentEdit=o;this.recentlyEditedInLinesAfterEditRange=a;this.documentBeforeEdits=l;this.recentEdits=c;this.documentAfterEditsNoShortening=u;this.toEditOnDocumentAfterEditsNoShortening=f;this.toOffsetOnDocumentAfterEditsNoShortening=m;this.toProjectedOffset=h;this.lineCountBeforeClipping=p;this.clippingRange=g;this.lastSelectionInAfterEdit=y;this.recentlyEditedInLinesAfterEdit=this.recentlyEditedInLinesAfterEditRange===void 0?void 0:Cr.fromRangeInclusive(this.recentlyEditedInLinesAfterEditRange);this.documentAfterEdits=new Hl(this.recentEdits.apply(this.documentBeforeEdits.value));this.documentAfterEditsLines=this.documentAfterEdits.getLines()}static{s(this,"StatelessNextEditDocument")}static deserialize(t){return new e(Vh.create(t.id),t.workspaceRoot?t3.parse(t.workspaceRoot):void 0,Ub.create(t.languageId),t.documentLinesBeforeEdit,Fo.deserialize(t.recentEdit),t.recentlyEditedInLinesAfterEditRange?yr.lift(t.recentlyEditedInLinesAfterEditRange):void 0,new Hl(t.documentBeforeEdits),Hg.deserialize(t.recentEdits),new Hl(t.documentAfterEditsNoShortening),r=>{throw new Error("Deserializing serialized document does not implement translation of line edit to edit")},r=>{throw new Error("Deserializing serialized document does not implement translation of offsets")},r=>{throw new Error("Deserializing serialized document does not implement translation of offsets")},t.lineCountBeforeClipping,Cr.deserialize(t.clippingRange))}serialize(){return{id:this.id.uri,workspaceRoot:this.workspaceRoot?.toString(),languageId:this.languageId,documentLinesBeforeEdit:this.documentLinesBeforeEdit,recentEdit:this.recentEdit.serialize(),recentlyEditedInLinesAfterEditRange:this.recentlyEditedInLinesAfterEditRange?.toJSON(),documentBeforeEdits:this.documentBeforeEdits.value,recentEdits:this.recentEdits.serialize(),documentAfterEditsNoShortening:this.documentAfterEditsNoShortening.value,lineCountBeforeClipping:this.lineCountBeforeClipping,clippingRange:this.clippingRange.serialize()}}getDisplayPath(){return this.id.uri}toString(){return this.toMarkdown()}toMarkdown(){let t=[];return t.push(`StatelessNextEditDocument: **${this.id.uri}**
`),t.push("```patch"),t.push(this.recentEdit.humanReadablePatch(this.documentLinesBeforeEdit)),t.push("```"),t.push(""),t.join(`
`)}};var Si=class e{constructor(t,r){this.nextEdit=t;this.telemetry=r}static{s(this,"StatelessNextEditResult")}static noEdit(t,r){let n=Oo.error(t),i=r.build(n);return new e(n,i)}static edit(t,r){let n=Oo.ok(t),i=r.build(n);return new e(n,i)}},r3=class{constructor(t){this._request=t;this.startTime=Date.now(),this.requestUuid=t.id}static{s(this,"StatelessNextEditTelemetryBuilder")}build(t){let n=Date.now()-this.startTime,i=this._prompt?HFe(this._prompt):void 0,o=i?.split(`
`).length,a=i?.length,l=t.isOk(),c=t.isOk()?void 0:t.err.kind,u;if(!t.isOk())switch(t.err.kind){case"activeDocumentHasNoEdits":case"noSuggestions":break;case"gotCancelled":case"filteredOut":u=t.err.message;break;case"fetchFailure":case"uncategorized":case"unexpected":u=t.err.error.stack?t.err.error.stack:t.err.error.message;break;default:jS(t.err)}return{hadStatelessNextEditProviderCall:!0,firstEditStrategy:this._request.options.firstEditStrategy,maxLinesPerEdit:this._request.options.maxLinesPerEdit,hasNextEdit:l,noNextEditReasonKind:c,noNextEditReasonMessage:u,statelessNextEditProviderDuration:n,logProbThreshold:this._logProbThreshold,promptLineCount:o,promptCharCount:a,isDefaultEndpoint:this._isDefaultEndpoint,debounceTime:this._debounceTime,fetchStartedAt:this._fetchStartedAt,ttft:this._ttft,fetchTime:this._fetchTime,fetchResult:this._fetchResult,fetchError:this._fetchError,hadLowLogProbSuggestion:this._hadLowLogProbSuggestion,response:this._response,nonTerminatingError:this._nonTerminatingError,nEditsSuggested:this._nEditsSuggested,nextEditLogprob:this._nextEditLogProb,kthEditPicked:this._kthEditPicked,lineDistanceToMostRecentEdit:this._lineDistanceToMostRecentEdit,firstPickStrategyOverride:this._firstPickStrategyOverride}}setLogProbThreshold(t){return this._logProbThreshold=t,this}setHadLowLogProbSuggestion(t){return this._hadLowLogProbSuggestion=t,this}setPrompt(t){return this._prompt=t,this}setIsDefaultEndpoint(t){return this._isDefaultEndpoint=t,this}setDebounceTime(t){return this._debounceTime=t,this}setFetchStartedAt(){return this._fetchStartedAt=Date.now(),this}get fetchStartedAt(){return this._fetchStartedAt}setTtft(t){return this._ttft=t,this}setFetchResultIfNotSet(t,r){return this._fetchResult===void 0&&(this._fetchResult=t,this._fetchError=r,Pl(this._fetchStartedAt!==void 0,"fetchStartedAt must be set before setting fetchTime"),this._fetchTime=Date.now()-this._fetchStartedAt),this}get fetchResult(){return this._fetchResult}get fetchError(){return this._fetchError}get fetchTime(){return this._fetchTime}setResponse(t){return this._response=t,this}setNonTerminatingError(t){return this._nonTerminatingError=t,this}setNextEditLogProb(t){return this._nextEditLogProb=t,this}setNEditsSuggested(t){return this._nEditsSuggested=t,this}setKthEditPicked(t){return this._kthEditPicked=t,this}setLineDistanceToMostRecentEdit(t){return this._lineDistanceToMostRecentEdit=t,this}setFirstPickStrategyOverride(t){return this._firstPickStrategyOverride=t,this}};function U7t(e,...t){let r=e;for(let n of t)r=n(r);return r}s(U7t,"chainStatelessNextEditProviders");var O9=class{constructor(t,r){this.ID=t;this._providers=r;let n={ID:this.ID,provideNextEdit:s((i,o)=>this.provideNextEditBase(i,o),"provideNextEdit")};this._impl=U7t(n,...this._providers)}static{s(this,"ChainedStatelessNextEditProvider")}provideNextEdit(t,r){return this._impl.provideNextEdit(t,r)}},U9=class{constructor(t){this._baseProvider=t}static{s(this,"EditFilterAspect")}get ID(){return this._baseProvider.ID}async provideNextEdit(t,r){let n=await this._baseProvider.provideNextEdit(t,r);if(n.nextEdit.isError())return n;let i=n.nextEdit.val,o=i.permutation===void 0?i.edit.edits:i.permutation.apply(i.edit.edits),a=this.filterEdit(t.getActiveDocument(),o);if(a.length===o.length)return n;if(a.length===0)return new Si(Oo.error({kind:"filteredOut",message:"uncategorized"}),n.telemetry);let l=TG.createSortPermutation(a,vf(u=>u.lineRange.startLineNumber,bf)),c=new Fo(l.apply(a));return new Si(Oo.ok({edit:c,permutation:l.inverse()}),n.telemetry)}},q9=class extends U9{static{s(this,"IgnoreTriviaWhitespaceChangesAspect")}filterEdit(t,r){return r.filter(i=>!this._isWhitespaceOnlyChange(i,t.documentAfterEditsLines))}_isWhitespaceOnlyChange(t,r){let n=t.lineRange.toOffsetRange().slice(r),i=t.newLines,o=i.length===0;if(o&&n.every(a=>a.trim()==="")||!o&&i.every(a=>a.trim()===""))return!0;if(n.length!==i.length)return!1;for(let a=0;a<n.length;a++){let l=n[a],c=i[a];if(l.trim()!==c.trim())return!1}return!0}},W9=class extends U9{static{s(this,"IgnoreEditsAtClippingBorderAspect")}filterEdit(t,r){return r.filter(i=>!this._isAtClippingBorder(i,t.clippingRange,t.lineCountBeforeClipping))}_isAtClippingBorder(t,r,n){return r.startLineNumber>1&&t.lineRange.startLineNumber===1||r.endLineNumberExclusive<n&&t.lineRange.endLineNumberExclusive===r.length}};d();d();var q7t=Object.freeze({abap:{lineComment:{start:"'"},markdownLanguageIds:["abap","sap-abap"]},bat:{lineComment:{start:"REM"},alternativeLineComments:[{start:"::"}],aliases:["Batch","bat"],extensions:[".bat",".cmd"]},bibtex:{lineComment:{start:"%"},aliases:["BibTeX","bibtex"],extensions:[".bib"]},blade:{lineComment:{start:"#"}},c:{lineComment:{start:"//"},aliases:["C","c"],extensions:[".c",".i"],markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";"},aliases:["Clojure","clojure"],extensions:[".clj",".cljs",".cljc",".cljx",".clojure",".edn"],markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//"},aliases:["CoffeeScript","coffeescript","coffee"],extensions:[".coffee",".cson",".iced"],markdownLanguageIds:["coffeescript","coffee","cson","iced"],blockComment:["###","###"]},cpp:{lineComment:{start:"//"},aliases:["C++","Cpp","cpp"],extensions:[".cpp",".cc",".cxx",".c++",".hpp",".hh",".hxx",".h++",".h",".ii",".ino",".inl",".ipp",".ixx",".tpp",".txx",".hpp.in",".h.in"],markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"],blockComment:["/*","*/"]},csharp:{lineComment:{start:"//"},aliases:["C#","csharp"],extensions:[".cs",".csx",".cake"],markdownLanguageIds:["csharp","cs"],blockComment:["/*","*/"]},css:{lineComment:{start:"/*",end:"*/"},aliases:["CSS","css"],extensions:[".css"],blockComment:["/*","*/"]},dart:{lineComment:{start:"//"},aliases:["Dart"],extensions:[".dart"],blockComment:["/*","*/"]},dockerfile:{lineComment:{start:"#"},aliases:["Docker","Dockerfile","Containerfile"],extensions:[".dockerfile",".containerfile"],markdownLanguageIds:["dockerfile","docker"]},elixir:{lineComment:{start:"#"}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%"},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//"},aliases:["F#","FSharp","fsharp"],extensions:[".fs",".fsi",".fsx",".fsscript"],markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"],blockComment:["(*","*)"]},go:{lineComment:{start:"//"},aliases:["Go"],extensions:[".go"],markdownLanguageIds:["go","golang"],blockComment:["/*","*/"]},groovy:{lineComment:{start:"//"},aliases:["Groovy","groovy"],extensions:[".groovy",".gvy",".gradle",".jenkinsfile",".nf"],blockComment:["/*","*/"]},haml:{lineComment:{start:"-#"}},handlebars:{lineComment:{start:"{{!",end:"}}"},extensions:[".hbs",".handlebars"],markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"],blockComment:["{{!--","--}}"]},haskell:{lineComment:{start:"--"},markdownLanguageIds:["haskell","hs"]},html:{lineComment:{start:"<!--",end:"-->"},aliases:["HTML","htm","html","xhtml"],extensions:[".html",".htm",".shtml",".xhtml",".xht",".mdoc",".jsp",".asp",".aspx",".jshtm",".volt",".ejs",".rhtml"],markdownLanguageIds:["html","xhtml"],blockComment:["<!--","-->"]},ini:{lineComment:{start:";"},blockComment:[";"," "]},java:{lineComment:{start:"//"},extensions:[".java",".class"],markdownLanguageIds:["java","jsp"],blockComment:["/*","*/"]},javascript:{lineComment:{start:"//"},aliases:["JavaScript","javascript","js"],extensions:[".js",".es6",".mjs",".cjs",".pac"],markdownLanguageIds:["javascript","js"],blockComment:["/*","*/"]},javascriptreact:{lineComment:{start:"//"},aliases:["JavaScript JSX","JavaScript React","jsx"],extensions:[".jsx"],markdownLanguageIds:["jsx"]},json:{extensions:[".json"],lineComment:{start:"//"},blockComment:["/*","*/"]},jsonc:{lineComment:{start:"//"}},jsx:{lineComment:{start:"//"},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#"},aliases:["Julia","julia"],extensions:[".jl"],markdownLanguageIds:["julia","jl"],blockComment:["#=","=#"]},kotlin:{lineComment:{start:"//"},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%"},aliases:["LaTeX","latex"],extensions:[".tex",".ltx",".ctx"],markdownLanguageIds:["tex"]},less:{lineComment:{start:"//"},aliases:["Less","less"],extensions:[".less"],blockComment:["/*","*/"]},lua:{lineComment:{start:"--"},aliases:["Lua","lua"],extensions:[".lua"],markdownLanguageIds:["lua","pluto"],blockComment:["--[[","]]"]},makefile:{lineComment:{start:"#"},aliases:["Makefile","makefile"],extensions:[".mak",".mk"],markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:"//"},aliases:["Markdown","markdown"],extensions:[".md",".mkd",".mdwn",".mdown",".markdown",".markdn",".mdtxt",".mdtext",".workbook"],markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//"},aliases:["Objective-C"],extensions:[".m"],markdownLanguageIds:["objectivec","mm","objc","obj-c"],blockComment:["/*","*/"]},"objective-cpp":{lineComment:{start:"//"},aliases:["Objective-C++"],extensions:[".mm"],markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#"},aliases:["Perl","perl"],extensions:[".pl",".pm",".pod",".t",".PL",".psgi"],markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//"},aliases:["PHP","php"],extensions:[".php",".php4",".php5",".phtml",".ctp"],blockComment:["/*","*/"]},powershell:{lineComment:{start:"#"},aliases:["PowerShell","powershell","ps","ps1"],extensions:[".ps1",".psm1",".psd1",".pssc",".psrc"],markdownLanguageIds:["powershell","ps","ps1"],blockComment:["<#","#>"]},pug:{lineComment:{start:"//"}},python:{lineComment:{start:"#"},aliases:["Python","py"],extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi",".pyi",".ipy",".pyt"],markdownLanguageIds:["python","py","gyp"],blockComment:['"""','"""']},ql:{lineComment:{start:"//"}},r:{lineComment:{start:"#"},aliases:["R","r"],extensions:[".r",".rhistory",".rprofile",".rt"]},razor:{lineComment:{start:"<!--",end:"-->"},aliases:["Razor","razor"],extensions:[".cshtml",".razor"],markdownLanguageIds:["cshtml","razor","razor-cshtml"],blockComment:["<!--","-->"]},ruby:{lineComment:{start:"#"},aliases:["Ruby","rb"],extensions:[".rb",".rbx",".rjs",".gemspec",".rake",".ru",".erb",".podspec",".rbi"],markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"],blockComment:["=begin","=end"]},rust:{lineComment:{start:"//"},aliases:["Rust","rust"],extensions:[".rs"],markdownLanguageIds:["rust","rs"],blockComment:["/*","*/"]},sass:{lineComment:{start:"//"}},scala:{lineComment:{start:"//"}},scss:{lineComment:{start:"//"},aliases:["SCSS","scss"],extensions:[".scss"],blockComment:["/*","*/"]},shellscript:{lineComment:{start:"#"},aliases:["Shell Script","shellscript","bash","fish","sh","zsh","ksh","csh"],extensions:[".sh",".bash",".bashrc",".bash_aliases",".bash_profile",".bash_login",".ebuild",".profile",".bash_logout",".xprofile",".xsession",".xsessionrc",".Xsession",".zsh",".zshrc",".zprofile",".zlogin",".zlogout",".zshenv",".zsh-theme",".fish",".ksh",".csh",".cshrc",".tcshrc",".yashrc",".yash_profile"],markdownLanguageIds:["bash","sh","zsh"]},slim:{lineComment:{start:"/"}},solidity:{lineComment:{start:"//"},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--"},aliases:["SQL"],extensions:[".sql",".dsql"],blockComment:["/*","*/"]},stylus:{lineComment:{start:"//"}},svelte:{lineComment:{start:"<!--",end:"-->"}},swift:{lineComment:{start:"//"},aliases:["Swift","swift"],extensions:[".swift"],blockComment:["/*","*/"]},terraform:{lineComment:{start:"#"}},tex:{lineComment:{start:"%"},aliases:["TeX","tex"],extensions:[".sty",".cls",".bbx",".cbx"]},typescript:{lineComment:{start:"//"},aliases:["TypeScript","ts","typescript"],extensions:[".ts",".cts",".mts"],markdownLanguageIds:["typescript","ts"],blockComment:["/*","*/"]},typescriptreact:{lineComment:{start:"//"},aliases:["TypeScript JSX","TypeScript React","tsx"],extensions:[".tsx"],markdownLanguageIds:["tsx"],blockComment:["/*","*/"]},vb:{lineComment:{start:"'"},aliases:["Visual Basic","vb"],extensions:[".vb",".brs",".vbs",".bas",".vba"],markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//"}},"vue-html":{lineComment:{start:"<!--",end:"-->"}},vue:{lineComment:{start:"//"},extensions:[".vue"]},xml:{lineComment:{start:"<!--",end:"-->"},aliases:["XML","xml"],extensions:[".xml",".xsd",".ascx",".atom",".axml",".axaml",".bpmn",".cpt",".csl",".csproj",".csproj.user",".dita",".ditamap",".dtd",".ent",".mod",".dtml",".fsproj",".fxml",".iml",".isml",".jmx",".launch",".menu",".mxml",".nuspec",".opml",".owl",".proj",".props",".pt",".publishsettings",".pubxml",".pubxml.user",".rbxlx",".rbxmx",".rdf",".rng",".rss",".shproj",".storyboard",".svg",".targets",".tld",".tmx",".vbproj",".vbproj.user",".vcxproj",".vcxproj.filters",".wsdl",".wxi",".wxl",".wxs",".xaml",".xbl",".xib",".xlf",".xliff",".xpdl",".xul",".xoml"],blockComment:["<!--","-->"]},xsl:{lineComment:{start:"<!--",end:"-->"},aliases:["XSL","xsl"],extensions:[".xsl",".xslt"]},yaml:{lineComment:{start:"#"},markdownLanguageIds:["yaml","yml"]}}),W7t=new Map(Object.entries(q7t).map(([e,t])=>[e,{languageId:e,...t}]));function oMe(e){return Xce(typeof e=="string"?e:typeof e>"u"?"plaintext":e.languageId)}s(oMe,"getLanguage");function Xce(e){return W7t.get(e.toLowerCase())??{languageId:e,lineComment:{start:"//"}}}s(Xce,"_getLanguage");d();var G9=class e{static{s(this,"TextEdit")}static isTextEdit(t){return t instanceof e?!0:t?Ru.isRange(t)&&typeof t.newText=="string":!1}static replace(t,r){return new e(t,r)}static insert(t,r){return e.replace(new Ru(t,t),r)}static delete(t){return e.replace(t,"")}static setEndOfLine(t){let r=new e(new Ru(new Eo(0,0),new Eo(0,0)),"");return r.newEol=t,r}get range(){return this._range}set range(t){if(t&&!Ru.isRange(t))throw n3("range");this._range=t}get newText(){return this._newText||""}set newText(t){if(t&&typeof t!="string")throw n3("newText");this._newText=t}get newEol(){return this._newEol}set newEol(t){if(t&&typeof t!="number")throw n3("newEol");this._newEol=t}constructor(t,r){this._range=t,this._newText=r}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};var Eo=class e{static{s(this,"Position")}static Min(...t){if(t.length===0)throw new TypeError;let r=t[0];for(let n=1;n<t.length;n++){let i=t[n];i.isBefore(r)&&(r=i)}return r}static Max(...t){if(t.length===0)throw new TypeError;let r=t[0];for(let n=1;n<t.length;n++){let i=t[n];i.isAfter(r)&&(r=i)}return r}static isPosition(t){if(!t)return!1;if(t instanceof e)return!0;let{line:r,character:n}=t;return typeof r=="number"&&typeof n=="number"}get line(){return this._line}get character(){return this._character}constructor(t,r){if(t<0)throw n3("line must be non-negative");if(r<0)throw n3("character must be non-negative");this._line=t,this._character=r}isBefore(t){return this._line<t._line?!0:t._line<this._line?!1:this._character<t._character}isBeforeOrEqual(t){return this._line<t._line?!0:t._line<this._line?!1:this._character<=t._character}isAfter(t){return!this.isBeforeOrEqual(t)}isAfterOrEqual(t){return!this.isBefore(t)}isEqual(t){return this._line===t._line&&this._character===t._character}compareTo(t){return this._line<t._line?-1:this._line>t.line?1:this._character<t._character?-1:this._character>t._character?1:0}translate(t,r=0){if(t===null||r===null)throw n3();let n;return typeof t>"u"?n=0:typeof t=="number"?n=t:(n=typeof t.lineDelta=="number"?t.lineDelta:0,r=typeof t.characterDelta=="number"?t.characterDelta:0),n===0&&r===0?this:new e(this.line+n,this.character+r)}with(t,r=this.character){if(t===null||r===null)throw n3();let n;return typeof t>"u"?n=this.line:typeof t=="number"?n=t:(n=typeof t.line=="number"?t.line:this.line,r=typeof t.character=="number"?t.character:this.character),n===this.line&&r===this.character?this:new e(n,r)}toJSON(){return{line:this.line,character:this.character}}[Symbol.for("debug.description")](){return`(${this.line}:${this.character})`}},Ru=class e{static{s(this,"Range")}static isRange(t){return t instanceof e?!0:t?Eo.isPosition(t.start)&&Eo.isPosition(t.end):!1}get start(){return this._start}get end(){return this._end}constructor(t,r,n,i){let o,a;if(typeof t=="number"&&typeof r=="number"&&typeof n=="number"&&typeof i=="number"?(o=new Eo(t,r),a=new Eo(n,i)):Eo.isPosition(t)&&Eo.isPosition(r)&&(o=t,a=r),!o||!a)throw new Error("Invalid arguments");o.isBefore(a)?(this._start=o,this._end=a):(this._start=a,this._end=o)}contains(t){return e.isRange(t)?this.contains(t.start)&&this.contains(t.end):Eo.isPosition(t)?!(t.isBefore(this._start)||this._end.isBefore(t)):!1}isEqual(t){return this._start.isEqual(t._start)&&this._end.isEqual(t._end)}intersection(t){let r=Eo.Max(t.start,this._start),n=Eo.Min(t.end,this._end);if(!r.isAfter(n))return new e(r,n)}union(t){if(this.contains(t))return this;if(t.contains(this))return t;let r=Eo.Min(t.start,this._start),n=Eo.Max(t.end,this.end);return new e(r,n)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(t,r=this.end){if(t===null||r===null)throw n3();let n;return t?Eo.isPosition(t)?n=t:(n=t.start||this.start,r=t.end||this.end):n=this.start,n.isEqual(this._start)&&r.isEqual(this.end)?this:new e(n,r)}toJSON(){return[this.start,this.end]}[Symbol.for("debug.description")](){return G7t(this)}};function n3(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}s(n3,"illegalArgument");function G7t(e){return e.isEmpty?`[${e.start.line}:${e.start.character})`:`[${e.start.line}:${e.start.character} -> ${e.end.line}:${e.end.character})`}s(G7t,"getDebugDescriptionOfRange");d();function sMe(e){let r=e.split(/\r?\n/).map(H7t),n=r.filter(o=>o===1).length,i=r.filter(o=>o===2).length;return n>i}s(sMe,"looksLikeCode");function H7t(e){if(e.length===0)return 0;let t=0,r=0;if(["==","!=","===","!==",">=","<=","&&","||",">>",">>>","<<","<<<","+=","-=","*=","/=","%=","<<=","<<<=",">>=",">>>=","++","--","=>","->","...","??","??="].some(i=>e.includes(i))||e.match(/^\s/)||e.match(/^[;{}()\[\]`~?]/))return 1;e.charAt(0).match(/[A-Z]/)&&(t+=1),e[e.length-1]==="."&&(t+=1),Ene(e)||(t+=1);{Ene(e.charAt(0))&&!e.charAt(0).match(/[A-Z]/)&&(r+=1),e.match(/^\s/)&&(r+=1);let o=[";","{","}","(",")","[","]","`","~","#","$","%","^","&","*","_","=","+","\\","|","<",">"].map(a=>e.includes(a)?1:0).filter(a=>a).length;r+=o}return t>r?2:r>t?1:0}s(H7t,"guessLineType");var H9;(r=>{function e(n){return n.length===0?[]:n.split(/\r\n|\r|\n/g)}r.fromString=e,s(e,"fromString");function t(n){if(n.lineCount===0)return[];let i=[];for(let o=0;o<n.lineCount;o++)i.push(n.lineAt(o).text);return i}r.fromDocument=t,s(t,"fromDocument")})(H9||={});function j7t(e){return e.replace(/^\s+/g,"")}s(j7t,"trimLeadingWhitespace");function Zce(e,t){switch(t){case"java":return!!e.match(/^\s*import\s/);case"typescript":case"typescriptreact":case"javascript":case"javascriptreact":return!!e.match(/^\s*import[\s{*]|^\s*[var|const|let].*=\s*require\(/);case"php":return!!e.match(/^\s*use/);case"rust":return!!e.match(/^\s*use\s+[\w:{}, ]+\s*(as\s+\w+)?;/);case"python":return!!e.match(/^\s*from\s+[\w.]+\s+import\s+[\w, *]+$/)||!!e.match(/^\s*import\s+[\w, ]+$/);default:return!1}}s(Zce,"isImportStatement");var V7t=new RA(e=>{let t=oMe(e),{start:r,end:n}=t.lineComment,i=`(?:${bne(r)})`,o=n?`(?:${bne(n)})?`:"";return new RegExp(`${i}(.*)${o}$`)});function e0e(e,t){let r=e.match(V7t.get(t));if(!r)return;let n=r.index;if(typeof n>"u")return;let i=e.substring(0,n),o=r[0],a=j7t(r[1]||"");return{content:i,commentWithTokens:o,commentWithoutTokens:a}}s(e0e,"extractEndLineComment");function cH(e,t){let r=e0e(e,t);if(!(r&&r.content.trim().length>0&&sMe(r.commentWithoutTokens)))return r}s(cH,"extractExplicativeEndLineComment");var j9=class e extends U9{static{s(this,"IgnoreImportChangesAspect")}static isImportChange(t,r,n){return t.newLines.some(i=>Zce(i,r))||$7t(t,n).some(i=>Zce(i,r))}filterEdit(t,r){let n=t.languageId;return r.filter(o=>!e.isImportChange(o,n,t.documentLinesBeforeEdit))}};function $7t(e,t){return v6e(e.lineRange.mapToLineArray(r=>t[r-1]))}s($7t,"getOldLines");d();var r0e=Ze(Gh());d();d();d();var $h;(i=>{i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function n(o){return o[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=n,s(n,"getServiceDependencies")})($h||={});var Kg=qf("instantiationService");function z7t(e,t,r){t[$h.DI_TARGET]===t?t[$h.DI_DEPENDENCIES].push({id:e,index:r}):(t[$h.DI_DEPENDENCIES]=[{id:e,index:r}],t[$h.DI_TARGET]=t)}s(z7t,"storeServiceDependency");function qf(e){if($h.serviceIds.has(e))return $h.serviceIds.get(e);let t=s(function(r,n,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");z7t(t,r,i)},"id");return t.toString=()=>e,$h.serviceIds.set(e,t),t}s(qf,"createDecorator");d();d();var Wf=class{static{s(this,"SyncDescriptor")}constructor(t,r=[],n=!1){this.ctor=t,this.staticArguments=r,this.supportsDelayedInstantiation=n}};d();var t0e=class{constructor(t,r){this.key=t;this.data=r;this.incoming=new Map;this.outgoing=new Map}static{s(this,"Node")}},qk=class{constructor(t){this._hashFn=t;this._nodes=new Map}static{s(this,"Graph")}roots(){let t=[];for(let r of this._nodes.values())r.outgoing.size===0&&t.push(r);return t}insertEdge(t,r){let n=this.lookupOrInsertNode(t),i=this.lookupOrInsertNode(r);n.outgoing.set(i.key,i),i.incoming.set(n.key,n)}removeNode(t){let r=this._hashFn(t);this._nodes.delete(r);for(let n of this._nodes.values())n.outgoing.delete(r),n.incoming.delete(r)}lookupOrInsertNode(t){let r=this._hashFn(t),n=this._nodes.get(r);return n||(n=new t0e(r,t),this._nodes.set(r,n)),n}lookup(t){return this._nodes.get(this._hashFn(t))}isEmpty(){return this._nodes.size===0}toString(){let t=[];for(let[r,n]of this._nodes)t.push(`${r}
(-> incoming)[${[...n.incoming.keys()].join(", ")}]
(outgoing ->)[${[...n.outgoing.keys()].join(",")}]
`);return t.join(`
`)}findCycleSlow(){for(let[t,r]of this._nodes){let n=new Set([t]),i=this._findCycle(r,n);if(i)return i}}_findCycle(t,r){for(let[n,i]of t.outgoing){if(r.has(n))return[...r,n].join(" -> ");r.add(n);let o=this._findCycle(i,r);if(o)return o;r.delete(n)}}};d();var qb=class{constructor(...t){this._entries=new Map;for(let[r,n]of t)this.set(r,n)}static{s(this,"ServiceCollection")}set(t,r){let n=this._entries.get(t);return this._entries.set(t,r),n}has(t){return this._entries.has(t)}get(t){return this._entries.get(t)}};var Y7t=!1,uH=class extends Error{static{s(this,"CyclicDependencyError")}constructor(t){super("cyclic dependency between services"),this.message=t.findCycleSlow()??`UNABLE to detect cycle, dumping graph:
${t.toString()}`}},fH=class e{constructor(t=new qb,r=!1,n,i=Y7t){this._services=t;this._strict=r;this._parent=n;this._enableTracing=i;this._isDisposed=!1;this._servicesToMaybeDispose=new Set;this._children=new Set;this._activeInstantiations=new Set;this._services.set(Kg,this),this._globalGraph=i?n?._globalGraph??new qk(o=>o):void 0}static{s(this,"InstantiationService")}dispose(){if(!this._isDisposed){this._isDisposed=!0,HO(this._children),this._children.clear();for(let t of this._servicesToMaybeDispose)k6e(t)&&t.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(t,r){this._throwIfDisposed();let n=this,i=new class extends e{dispose(){n._children.delete(i),super.dispose()}}(t,this._strict,this,this._enableTracing);return this._children.add(i),r?.add(i),i}invokeFunction(t,...r){this._throwIfDisposed();let n=Wk.traceInvocation(this._enableTracing,t),i=!1;try{return t({get:s(a=>{if(i)throw g6e("service accessor is only valid during the invocation of its target method");let l=this._getOrCreateServiceInstance(a,n);if(!l)throw new Error(`[invokeFunction] unknown service '${a}'`);return l},"get")},...r)}finally{i=!0,n.stop()}}createInstance(t,...r){this._throwIfDisposed();let n,i;return t instanceof Wf?(n=Wk.traceCreation(this._enableTracing,t.ctor),i=this._createInstance(t.ctor,t.staticArguments.concat(r),n)):(n=Wk.traceCreation(this._enableTracing,t),i=this._createInstance(t,r,n)),n.stop(),i}_createInstance(t,r=[],n){let i=$h.getServiceDependencies(t).sort((l,c)=>l.index-c.index),o=[];for(let l of i){let c=this._getOrCreateServiceInstance(l.id,n);c||this._throwIfStrict(`[createInstance] ${t.name} depends on UNKNOWN service ${l.id}.`,!1),o.push(c)}let a=i.length>0?i[0].index:r.length;if(r.length!==a){console.trace(`[createInstance] First service dependency of ${t.name} at position ${a+1} conflicts with ${r.length} static arguments`);let l=a-r.length;l>0?r=r.concat(new Array(l)):r=r.slice(0,a)}return Reflect.construct(t,r.concat(o))}_setCreatedServiceInstance(t,r){if(this._services.get(t)instanceof Wf)this._services.set(t,r);else if(this._parent)this._parent._setCreatedServiceInstance(t,r);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(t){let r=this._services.get(t);return!r&&this._parent?this._parent._getServiceInstanceOrDescriptor(t):r}_getOrCreateServiceInstance(t,r){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(t));let n=this._getServiceInstanceOrDescriptor(t);return n instanceof Wf?this._safeCreateAndCacheServiceInstance(t,n,r.branch(t,!0)):(r.branch(t,!1),n)}_safeCreateAndCacheServiceInstance(t,r,n){if(this._activeInstantiations.has(t))throw new Error(`illegal state - RECURSIVELY instantiating service '${t}'`);this._activeInstantiations.add(t);try{return this._createAndCacheServiceInstance(t,r,n)}finally{this._activeInstantiations.delete(t)}}_createAndCacheServiceInstance(t,r,n){let i=new qk(c=>c.id.toString()),o=0,a=[{id:t,desc:r,_trace:n}],l=new Set;for(;a.length;){let c=a.pop();if(!l.has(String(c.id))){if(l.add(String(c.id)),i.lookupOrInsertNode(c),o++>1e3)throw new uH(i);for(let u of $h.getServiceDependencies(c.desc.ctor)){let f=this._getServiceInstanceOrDescriptor(u.id);if(f||this._throwIfStrict(`[createInstance] ${t} depends on ${u.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(c.id),String(u.id)),f instanceof Wf){let m={id:u.id,desc:f,_trace:c._trace.branch(u.id,!0)};i.insertEdge(c,m),a.push(m)}}}}for(;;){let c=i.roots();if(c.length===0){if(!i.isEmpty())throw new uH(i);break}for(let{data:u}of c){if(this._getServiceInstanceOrDescriptor(u.id)instanceof Wf){let m=this._createServiceInstanceWithOwner(u.id,u.desc.ctor,u.desc.staticArguments,u.desc.supportsDelayedInstantiation,u._trace);this._setCreatedServiceInstance(u.id,m)}i.removeNode(u)}}return this._getServiceInstanceOrDescriptor(t)}_createServiceInstanceWithOwner(t,r,n=[],i,o){if(this._services.get(t)instanceof Wf)return this._createServiceInstance(t,r,n,i,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(t,r,n,i,o);throw new Error(`illegalState - creating UNKNOWN service instance ${r.name}`)}_createServiceInstance(t,r,n=[],i,o,a){if(i)throw new Error("Delayed instantiation not supported");{let l=this._createInstance(r,n,o);return a.add(l),l}}_throwIfStrict(t,r){if(r&&console.warn(t),this._strict)throw new Error(t)}};var Wk=class e{constructor(t,r){this.type=t;this.name=r;this._start=Date.now();this._dep=[]}static{s(this,"Trace")}static{this.all=new Set}static{this._None=new class extends e{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(t,r){return t?new e(2,r.name||new Error().stack.split(`
`).slice(3,4).join(`
`)):e._None}static traceCreation(t,r){return t?new e(1,r.name):e._None}static{this._totals=0}branch(t,r){let n=new e(3,t.toString());return this._dep.push([t,r,n]),n}stop(){let t=Date.now()-this._start;e._totals+=t;let r=!1;function n(o,a){let l=[],c=new Array(o+1).join(" ");for(let[u,f,m]of a._dep)if(f&&m){r=!0,l.push(`${c}CREATES -> ${u}`);let h=n(o+1,m);h&&l.push(h)}else l.push(`${c}uses -> ${u}`);return l.join(`
`)}s(n,"printChild");let i=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${t.toFixed(2)}ms (grand total ${e._totals.toFixed(2)}ms)`];(t>2||r)&&e.all.add(i.join(`
`))}};var dH=class{constructor(t){this._isSealed=!1;this._collection=Array.isArray(t)?new qb(...t):t??new qb}static{s(this,"InstantiationServiceBuilder")}define(t,r){if(this._isSealed)throw new Error("This accessor is sealed and cannot be modified anymore.");this._collection.set(t,r)}seal(){if(this._isSealed)throw new Error("This accessor is sealed and cannot be seal again anymore.");return this._isSealed=!0,new fH(this._collection,!0)}};var hH=qf("ITelemetrySender"),zh=qf("IChatMLFetcher");var mH=class{constructor(){this._stream=new eH;this._seenAnnotationTypes=new Set}static{s(this,"FetchStreamSource")}get stream(){return this._stream.asyncIterable}update(t,r){r.codeVulnAnnotations&&(!((t.match(/(^|\n)```/g)?.length??0)%2===1)||t.match(/(^|\n)```\w*\s*$/))&&(r.codeVulnAnnotations=void 0),r.codeVulnAnnotations&&(r.codeVulnAnnotations=r.codeVulnAnnotations.filter(n=>!this._seenAnnotationTypes.has(n.details.type)),r.codeVulnAnnotations.forEach(n=>this._seenAnnotationTypes.add(n.details.type))),this._stream.emitOne({text:t,delta:r})}resolve(){this._stream.resolve()}};d();var a2=qf("IParserService");d();var V9=class{static{s(this,"DiffChange")}constructor(t,r,n,i){this.originalStart=t,this.originalLength=r,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}},Gk=class{constructor(t,r=!0){this.lines=t;this.trimWhitespace=r}static{s(this,"LineSequence")}getElements(){let t=[];for(let r=0,n=this.lines.length;r<n;r++)t[r]=this.trimWhitespace?this.lines[r].trim():this.lines[r];return t}getCharCount(){let t=0;for(let r of this.lines)t+=r.length;return t}},Hk=class{static{s(this,"CharSequence")}constructor(t){this._chars=t.split("")}getElements(){return this._chars}},i3=class{static{s(this,"Debug")}static Assert(t,r){if(!t)throw new Error(r)}},o3=class{static{s(this,"MyArray")}static Copy(t,r,n,i,o){for(let a=0;a<o;a++)n[i+a]=t[r+a]}static Copy2(t,r,n,i,o){for(let a=0;a<o;a++)n[i+a]=t[r+a]}};var pH=class{static{s(this,"DiffChangeHelper")}constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new V9(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},jk=class e{static{s(this,"LcsDiff")}constructor(t,r){let[n,i]=e._getElements(t),[o,a]=e._getElements(r);this._originalStringElements=n,this._originalElementsOrHash=i,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _getElements(t){let r=t.getElements(),n=new Int32Array(r.length);for(let i=0,o=r.length;i<o;i++)n[i]=this._stringHash(r[i],0);return[r,n]}static _numberHash(t,r){return(r<<5)-r+t|0}static _stringHash(t,r){r=this._numberHash(149417,r);for(let n=0,i=t.length;n<i;n++)r=this._numberHash(t.charCodeAt(n),r);return r}ElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._originalStringElements[t]===this._modifiedStringElements[r]}ComputeDiff(){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1)}_ComputeDiff(t,r,n,i){return this.ComputeDiffRecursive(t,r,n,i)}ComputeDiffRecursive(t,r,n,i){for(;t<=r&&n<=i&&this.ElementsAreEqual(t,n);)t++,n++;for(;r>=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let f;return n<=i?(i3.Assert(t===r+1,"originalStart should only be one more than originalEnd"),f=[new V9(t,0,n,i-n+1)]):t<=r?(i3.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new V9(t,r-t+1,n,0)]):(i3.Assert(t===r+1,"originalStart should only be one more than originalEnd"),i3.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}let o=[0],a=[0],l=this.ComputeRecursionPoint(t,r,n,i,o,a),c=o[0],u=a[0];if(l!==null)return l;{let f=this.ComputeDiffRecursive(t,c,n,u),m=this.ComputeDiffRecursive(c+1,r,u+1,i);return this.ConcatenateChanges(f,m)}}WALKTRACE(t,r,n,i,o,a,l,c,u,f,m,h,p,g,y,x,b){let E=null,_=null,k=new pH,B=r,N=n,M=p[0]-x[0]-i,Z=-1073741824,he=this.m_forwardHistory.length-1;do{let ee=M+t;ee===B||ee<N&&u[ee-1]<u[ee+1]?(m=u[ee+1],g=m-M-i,m<Z&&k.MarkNextChange(),Z=m,k.AddModifiedElement(m+1,g),M=ee+1-t):(m=u[ee-1]+1,g=m-M-i,m<Z&&k.MarkNextChange(),Z=m-1,k.AddOriginalElement(m,g+1),M=ee-1-t),he>=0&&(u=this.m_forwardHistory[he],t=u[0],B=1,N=u.length-1)}while(--he>=-1);E=k.getReverseChanges(),k=new pH,B=a,N=l,M=p[0]-x[0]-c,Z=1073741824,he=b?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let ee=M+o;ee===B||ee<N&&f[ee-1]>=f[ee+1]?(m=f[ee+1]-1,g=m-M-c,m>Z&&k.MarkNextChange(),Z=m+1,k.AddOriginalElement(m+1,g+1),M=ee+1-o):(m=f[ee-1],g=m-M-c,m>Z&&k.MarkNextChange(),Z=m,k.AddModifiedElement(m+1,g+1),M=ee-1-o),he>=0&&(f=this.m_reverseHistory[he],o=f[0],B=1,N=f.length-1)}while(--he>=-1);return _=k.getChanges(),this.ConcatenateChanges(E,_)}ComputeRecursionPoint(t,r,n,i,o,a){let l=0,c=0,u=0,f=0,m=0,h=0;t--,n--,o[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=r-t+(i-n),g=p+1,y=new Int32Array(g),x=new Int32Array(g),b=i-n,E=r-t,_=t-n,k=r-i,N=(E-b)%2===0;y[b]=t,x[E]=r;for(let M=1;M<=p/2+1;M++){let Z=0,he=0;u=this.ClipDiagonalBound(b-M,M,b,g),f=this.ClipDiagonalBound(b+M,M,b,g);for(let ee=u;ee<=f;ee+=2){ee===u||ee<f&&y[ee-1]<y[ee+1]?l=y[ee+1]:l=y[ee-1]+1,c=l-(ee-b)-_;let G=l;for(;l<r&&c<i&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(y[ee]=l,l+c>Z+he&&(Z=l,he=c),!N&&Math.abs(ee-E)<=M-1&&l>=x[ee])return o[0]=l,a[0]=c,G<=x[ee]&&M<=1448?this.WALKTRACE(b,u,f,_,E,m,h,k,y,x,l,r,o,c,i,a,N):null}m=this.ClipDiagonalBound(E-M,M,E,g),h=this.ClipDiagonalBound(E+M,M,E,g);for(let ee=m;ee<=h;ee+=2){ee===m||ee<h&&x[ee-1]>=x[ee+1]?l=x[ee+1]-1:l=x[ee-1],c=l-(ee-E)-k;let G=l;for(;l>t&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(x[ee]=l,N&&Math.abs(ee-b)<=M&&l<=y[ee])return o[0]=l,a[0]=c,G>=y[ee]&&M<=1448?this.WALKTRACE(b,u,f,_,E,m,h,k,y,x,l,r,o,c,i,a,N):null}if(M<=1447){let ee=new Int32Array(f-u+2);ee[0]=b-u+1,o3.Copy2(y,u,ee,1,f-u+1),this.m_forwardHistory.push(ee),ee=new Int32Array(h-m+2),ee[0]=E-m+1,o3.Copy2(x,m,ee,1,h-m+1),this.m_reverseHistory.push(ee)}}return this.WALKTRACE(b,u,f,_,E,m,h,k,y,x,l,r,o,c,i,a,N)}ConcatenateChanges(t,r){let n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){let i=new Array(t.length+r.length-1);return o3.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],o3.Copy(r,1,i,t.length,r.length-1),i}else{let i=new Array(t.length+r.length);return o3.Copy(t,0,i,0,t.length),o3.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(i3.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),i3.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){let i=t.originalStart,o=t.originalLength,a=t.modifiedStart,l=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(o=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(l=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new V9(i,o,a,l),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t<i)return t;let o=n,a=i-n-1,l=r%2===0;if(t<0){let c=o%2===0;return l===c?0:1}else{let c=a%2===0;return l===c?i-1:i-2}}};d();d();function aMe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}s(aMe,"isObject");function gH(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}s(gH,"assertType");function lMe(e){let t=new Set;return JSON.stringify(e,(r,n)=>{if(aMe(n)||Array.isArray(n)){if(t.has(n))return"[Circular]";t.add(n)}return typeof n=="bigint"?`[BigInt ${n.toString()}]`:n})}s(lMe,"safeStringify");var AH=!1,o0e=!0,K7t=200,Vk=class{constructor(t,r){this.ID=t;this._parserService=r;this.dependsOnSelection=!0}static{s(this,"AbstractNearbyCursorInlineEditProvider")}async provideNextEdit(t,r){let n=new r3(t),i=t.getActiveDocument(),o=Wb(i);if(!o||!o.isEmpty())return Si.noEdit({kind:"uncategorized",error:new Error("Selection is not empty")},n);let a=i.documentLinesBeforeEdit,l=i.recentEdit.apply(a),c=[];for(let E of t.documents)E.id!==i.id&&(c.push(`RELATED DOC: ${E.getDisplayPath()}`),c.push("```patch"),c.push(...t_t(E)),c.push("```"),c.push(""));c.push(`ORIGINAL VERSION: ${i.getDisplayPath()}`),c.push("```"),c.push(...a),c.push("```"),c.push("");let u="// ...rest of the lines omitted...",f=new Cr(1,Math.max(1,o.startLineNumber-1)),m=i.recentEdit.edits.length>0?i.recentEdit.edits[i.recentEdit.edits.length-1].lineRange.endLineNumberExclusive-1:0,h;if(m>0&&m>=f.endLineNumberExclusive){let E=m<l.length;c.push(`IN PROGRESS VERSION ${E?" PREFIX":""}: ${i.getDisplayPath()}`),c.push("```"),c.push(...l.slice(0,m)),E&&(c.push(u),h={editRange:new Cr(f.endLineNumberExclusive,m+1),omittedMessage:u}),c.push("```"),c.push("")}c.push(`NEXT VERSION: ${i.getDisplayPath()}`),c.push("```"),c.push(...l.slice(0,f.endLineNumberExclusive-1)),c.push("");let p=l.slice(f.endLineNumberExclusive-1).join(`
`),g=await this.fetchUntilConvergence(c.join(`
`),p,r);if(r.isCancellationRequested)return Si.noEdit({kind:"gotCancelled",message:"afterFetchCall"},n);if(g.isError())return g.err.kind==="cancel"?Si.noEdit({kind:"gotCancelled",message:"afterFetchCall"},n):Si.noEdit({kind:"fetchFailure",error:new Error(lMe(g.err))},n);let{result:y}=g.val;if(y.trim().length===0)return Si.noEdit({kind:"noSuggestions"},n);let x=yH(i.languageId,l,f,void 0,y,h),b=await l0e(this._parserService,x,i,{requireEditWithinNLines:5});if(b){let E=new Fo([b]);return Si.edit({edit:E},n)}else return Si.noEdit({kind:"filteredOut",message:"uncategorized"},n)}};Vk=f0([Vs(1,a2)],Vk);var $9=class extends Vk{constructor(r,n){super($9.ID,r);this._chatMLFetcher=n}static{s(this,"MiniNearbyCursorInlineEditProvider")}static{this.ID="MiniNearbyCursorInlineEditProvider"}async fetchUntilConvergence(r,n,i){if(i.isCancellationRequested)return Oo.error({kind:"cancel"});let o=await s0e(this.ID,this._chatMLFetcher,[{role:r0e.OpenAI.ChatRole.System,content:`
Please no talking.
You must only provide code.
Simply provide the code that follows most logically.
You don't change code if not necessary.
You see the same file multiple times, but only the last one is the final version.
`.trim()},{role:r0e.OpenAI.ChatRole.User,content:r}],{convergence:n},i);if(o.isError())return o;let{ignored:a,result:l,headersTime:c}=o.val;return l=l.replace(/^```[^\n]*\n/,""),Oo.ok({ignored:a,result:l,headersTime:c})}};$9=f0([Vs(0,a2),Vs(1,zh)],$9);async function s0e(e,t,r,n,i){let o=new mH,a=!1,l,c=o.stream.map(y=>({choices:[{index:0,finish_reason:null,logprobs:null,text:y.delta.text}]})),u=X7t(c,n),f=t.fetchOne(r,async(y,x,b)=>(typeof l>"u"&&(l=Date.now()),o.update(y,b),a?y.length:void 0),{id:"copilot-nes-v",name:"proxy-4o-mini"},{},i);(async()=>{try{await f}finally{o.resolve()}})();let{ignored:m,result:h,shouldCancelRequest:p}=await u;typeof l>"u"&&(l=Date.now()),p&&(a=!0);let g=await f;return g.type!=="success"?Oo.error({kind:"failure",err:new Error(`Fetch failed (${g.type}, ${g.reason})`)}):Oo.ok({headersTime:l,ignored:m,result:h})}s(s0e,"fetchUntilConvergence");function Wb(e){let t=new Vt(0,0);return e.lastSelectionInAfterEdit&&!e.lastSelectionInAfterEdit.equals(t)?e.documentAfterEdits.getTransformer().getRange(e.lastSelectionInAfterEdit):e.recentEdit.edits.length===0?null:J7t(e)}s(Wb,"getOrDeduceSelectionFromLastEdit");function J7t(e){let t=e.recentEdit.edits[e.recentEdit.edits.length-1],r=t.lineRange,i=e.recentEdit.getNewLineRanges()[e.recentEdit.edits.length-1].endLineNumberExclusive-1,o=t.newLines[t.newLines.length-1]??"";if(r.length===0)return new yr(i,o.length+1,i,o.length+1);let a=e.documentLinesBeforeEdit[r.endLineNumberExclusive-2],l=s6(a,o),c=o.length-l+1;return new yr(i,c,i,c)}s(J7t,"deduceSelectionFromLastEdit");async function X7t(e,t){let r=Z7t(e,t.ignoreReplyTextBefore),n=t.convergence,i=t.maxCompletionLineCount??20,o=t.convergenceNonWhitespaceCharOverlap??40,a=n.replace(/\s/g,""),l=[],c=[],u=[],f=[],m=s(h=>{let p=c[0];return{ignored:l[0]??"",result:p.substring(0,p.lastIndexOf(`
`)+1),shouldCancelRequest:!0}},"returnEarly");for await(let h of r){if(h.kind==="ignore"){l[h.index]=(l[h.index]??"")+h.text;continue}let p=h.text;if(c[h.index]=c[h.index]??"",c[h.index]+=p,f[h.index]=f[h.index]??"",f[h.index]+=p.replace(/\s/g,""),u[h.index]=u[h.index]??0,u[h.index]+=p.split(`
`).length-1,p.indexOf(`
`)===-1||h.index!==0)continue;if(u[h.index]>i)return m(`too many lines: ${u[h.index]}`);let g=c[h.index];if(n.startsWith(g))continue;let y=g.split(`
`).slice(-4,-1);if(y.length<3||n.indexOf(y.join(`
`)+`
`)<=0)continue;let b=f[h.index].substring(f[h.index].length-o);if(a.indexOf(b)>0)return m("convergence!")}return{ignored:l[0]??"",result:c[0]??"",shouldCancelRequest:!1}}s(X7t,"fetchCompletionUntilConvergence");function Z7t(e,t){let r=[],n=[];return new Mk(async i=>{for await(let o of e)for(let a of o.choices){let l=a.index,c=a.text??"";if(!t||r[l]){i.emitOne({kind:"completion",index:l,text:c});continue}n[l]=(n[l]??"")+c;let u=n[l].match(t);!u||typeof u.index>"u"||(r[l]=!0,i.emitOne({kind:"ignore",index:l,text:n[l].substring(0,u.index+u[0].length)}),i.emitOne({kind:"completion",index:a.index,text:n[l].substring(u.index+u[0].length)}),n[l]=void 0)}for(let o=0;o<n.length;o++)typeof n[o]<"u"&&i.emitOne({kind:"ignore",index:o,text:n[o]})})}s(Z7t,"getTextAfterFirstPattern");function e_t(e,t,r){let n=t.startLineNumber,i=t.endLineNumberExclusive,o=r.slice(0);for(;n+1<i&&o.length>0;){let a=e[i-2],l=o[o.length-1];if(a!==l)break;i--,o.pop()}for(;n+1<i&&o.length>0;){let a=e[n-1],l=o[0];if(a!==l)break;n++,o.shift()}return new Oh(new Cr(n,i),o)}s(e_t,"createReducedLineEdit");var z9=class{constructor(t,r,n,i){this.languageId=t;this.oldLines=r;this.oldLines=r,this.edit=e_t(r,n,i);let o=new Fo([this.edit]);this.newLines=o.apply(r)}static{s(this,"PossibleEdit")}hasEditWithinFirstLines(t){let r=this.oldLines.slice(this.edit.lineRange.startLineNumber-1,this.edit.lineRange.endLineNumberExclusive-1),n=this.edit.newLines;return o(r,n)<t;function o(a,l){for(let c=0;c<Math.min(a.length,l.length);c++)if(a[c]!==l[c])return c;return Math.min(a.length,l.length)}}resolveDiff(){let t=s((m,h,p)=>m.map(g=>{let y=h.lines.slice(g.originalStart,g.originalStart+g.originalLength),x=p.lines.slice(g.modifiedStart,g.modifiedStart+g.modifiedLength),b=y.join(`
`),E=x.join(`
`),{editDistance:_}=f(b,E);return new n0e(g.originalStart,g.originalLength,g.modifiedStart,g.modifiedLength,_)}),"computeEditDistances"),r=s(m=>{let h=0;for(let p of m)h+=p.editDistance;return{editDistance:h}},"computeDiffMetrics"),n=!1,i=new Gk(this.oldLines,n),o=new Gk(this.newLines,n),a=new jk(i,o),l=t(a.ComputeDiff(),i,o),c=r(l),u=[];{let m=0;for(let h of l)u=u.concat(this.oldLines.slice(m,h.originalStart)),u=u.concat(this.newLines.slice(h.modifiedStart,h.modifiedStart+h.modifiedLength)),m=h.originalStart+h.originalLength;u=u.concat(this.oldLines.slice(m))}if(Qv(this.newLines,u))return new i0e(this.languageId,this.oldLines,this.edit,this.newLines,l,c);return uMe(this.languageId,this.oldLines,u);function f(m,h){let p=new Hk(m),g=new Hk(h),x=new jk(p,g).ComputeDiff(),b=0,E=0;for(let N of x)b+=N.originalLength,E+=N.modifiedLength;let _=m.length,k=h.length,B=b+E;return{aChanged:b,bChanged:E,aLength:_,bLength:k,editDistance:B}}}},n0e=class{constructor(t,r,n,i,o){this.originalStart=t;this.originalLength=r;this.modifiedStart=n;this.modifiedLength=i;this.editDistance=o}static{s(this,"DiffChangeWithEditDistance")}},i0e=class{constructor(t,r,n,i,o,a){this.languageId=t;this.oldLines=r;this.edit=n;this.newLines=i;this.diff=o;this.diffMetrics=a;this.parseErrorCount="unknown"}static{s(this,"PossibleEditWithDiff")}toLineEdit(t){if(t==="single")return new Fo([this.edit]);{let r=this.groupInHunks();return new Fo(r.map(n=>{let i=n[0],o=n[n.length-1];return new Oh(new Cr(i.originalStart+1,o.originalStart+o.originalLength+1),this.newLines.slice(i.modifiedStart,o.modifiedStart+o.modifiedLength))}))}}eliminateLargeChangeHunks(){if(!o0e)return this;let t=this.groupInHunks(),r=[];for(let n of t)n.every(o=>o.originalLength===0)||n.reduce((a,l)=>a+l.editDistance,0)>K7t&&(r=r.concat(n));if(r.length===this.diff.length)return null;if(r.length>0){let n=this._recreateNewLinesWithoutDiffs(r);return this._createPossibleEditFromLines(n)}return this}containWithinLines(t){let r=this.groupInHunks(),n=[];for(let i of r)for(let o of i){let a=o.originalStart+1,l=o.originalStart+o.originalLength+1;if(!a0e(new Cr(a,l),t)){n=n.concat(i);break}}if(n.length===this.diff.length)return null;if(n.length>0){let i=this._recreateNewLinesWithoutDiffs(n);return this._createPossibleEditFromLines(i).containWithinLines(t)}return this}groupInHunks(){let t=[];for(let r of this.diff){let n=t.length>0?t[t.length-1]:null;if(!n){t.push([r]);continue}let i=n[n.length-1],o=this.oldLines.slice(i.originalStart+i.originalLength,r.originalStart);if(o.length>1){t.push([r]);continue}if(o[0].trim().length>10){t.push([r]);continue}if(n.reduce((c,u)=>c+u.originalLength,0)>1){t.push([r]);continue}n.push(r)}return t}_recreateNewLinesWithoutDiffs(t){let r=[],n=0;for(let i of t)r=r.concat(this.newLines.slice(n,i.modifiedStart)),r=r.concat(this.oldLines.slice(i.originalStart,i.originalStart+i.originalLength)),n=i.modifiedStart+i.modifiedLength;return r=r.concat(this.newLines.slice(n)),r}async resolveParseErrorCountIfPossible(t,r){let n=new Fo([this.edit]),i=r(n);this.parseErrorCount=await $k(t,this.languageId,i)}eliminateEmptyLineChanges(){let t=s(r=>this._createPossibleEditFromLines(r).eliminateEmptyLineChanges(),"recurseWithNewLines");for(let r of this.diff){let n=this.oldLines.slice(r.originalStart,r.originalStart+r.originalLength),i=this.newLines.slice(r.modifiedStart,r.modifiedStart+r.modifiedLength);if(r.modifiedLength===0){if(n.every(a=>a.trim().length===0)){let a=this.newLines.slice(0);return a.splice(r.modifiedStart,0,...n),t(a)}continue}if(r.originalLength===0){if(i.every(a=>a.trim().length===0)){let a=this.newLines.slice(0);return a.splice(r.modifiedStart,r.modifiedLength),t(a)}continue}for(let o=0;o<n.length&&o<i.length;o++){let a=n[o],l=i[o],c=a.trim().length===0,u=l.trim().length===0;if(!(c&&u)){if(!c&&!u)break;if(c){let f=this.newLines.slice(0);return f.splice(r.modifiedStart+o,0,a),t(f)}if(u){let f=this.newLines.slice(0);return f.splice(r.modifiedStart+o,1),t(f)}}}for(let o=1;o<=n.length&&o<=i.length;o++){let a=n[n.length-o],l=i[i.length-o],c=a.trim().length===0,u=l.trim().length===0;if(!(c&&u)){if(!c&&!u)break;if(c){let f=this.newLines.slice(0);return f.splice(r.modifiedStart+r.modifiedLength-o+1,0,a),t(f)}if(u){let f=this.newLines.slice(0);return f.splice(r.modifiedStart+r.modifiedLength-o,1),t(f)}}}}return this}eliminateInsertedOrDeletedComments(){let t=[],r=0,n=!1;for(let i of this.diff){t=t.concat(this.newLines.slice(r,i.modifiedStart));let o=this.oldLines.slice(i.originalStart,i.originalStart+i.originalLength),a=this.newLines.slice(i.modifiedStart,i.modifiedStart+i.modifiedLength),{hasChanges:l,newDiffModifiedLines:c}=this._eliminateCommentsDiff(o,a);n=n||l,t=t.concat(c),r=i.modifiedStart+i.modifiedLength}return t=t.concat(this.newLines.slice(r)),n?this._createPossibleEditFromLines(t):this}_eliminateCommentsDiff(t,r){if(r.length===0){let c=!1,u=!1;for(let f of t){if(f.trim().length===0)continue;let m=cH(f,this.languageId);m&&m.content.trim().length===0?c=!0:u=!0}if(c&&!u)return{hasChanges:!0,newDiffModifiedLines:t}}let n=t.map(c=>cH(c,this.languageId)),i=r.map(c=>cH(c,this.languageId)),o=n.filter(c=>!!c).length,a=i.filter(c=>!!c).length;if(o===0&&a===0)return{hasChanges:!1,newDiffModifiedLines:r};if(o>0)return{hasChanges:!1,newDiffModifiedLines:r};let l=!1;for(let c=0;c<r.length;c++){let u=r[c],f=i[c];if(!f)continue;let{content:m}=f;r[c]=u.substring(0,m.length).trimEnd(),l=!0}return{hasChanges:l,newDiffModifiedLines:r}}_createPossibleEditFromLines(t){return uMe(this.languageId,this.oldLines,t)}};function a0e(e,t){return t.startLineNumber<e.startLineNumber&&e.startLineNumber<t.endLineNumberExclusive&&e.endLineNumberExclusive<=t.endLineNumberExclusive}s(a0e,"editIsInsideEditWindow");function uMe(e,t,r){let i=t.length+1,o=r.slice(0);return new z9(e,t,new Cr(1,i),o).resolveDiff()}s(uMe,"createPossibleEditFromLines");function yH(e,t,r,n,i,o){if(i.trim().length===0)return[];let a=H9.fromString(i.trimEnd()),l=o?a.some(x=>x.indexOf(o.omittedMessage)>=0):!1,c=[],u=s((x,b)=>{c.push(new z9(e,t,x,b))},"generateEdit");function f(){n&&u(n,a)}s(f,"generateEditCompletionRange");function m(){if(l)return;let b=new Cr(r.endLineNumberExclusive,t.length+1);b.length>a.length+5||u(b,a)}s(m,"generateEditAllDoc");function h(){for(let x=1;x<a.length;x++){let E=a.slice(a.length-x).join(`
`);for(let _=r.endLineNumberExclusive-1;_<t.length;_++){let B=t.slice(_,_+x).join(`
`);E===B&&u(new Cr(r.endLineNumberExclusive,_+1),a.slice(0,a.length-x))}}}s(h,"generateEditsUsingOverlappingLines");function p(){if(!o||!l)return;let x=[];for(let b of a){if(b.indexOf(o.omittedMessage)>=0){u(o.editRange,x.map(E=>E));return}x.push(b)}}if(s(p,"generateEditWhenReplyContainsOmittedMessage"),f(),p(),m(),h(),!i.endsWith(`
`)){let x=i.substring(0,i.lastIndexOf(`
`)+1);c.push(...yH(e,t,r,n,x,o))}return g(c);function g(x){return y(x,s(E=>E.edit.lineRange.startLineNumber+","+E.edit.lineRange.endLineNumberExclusive+","+E.edit.newLines.join("|"),"keyfn"))}function y(x,b){let E=new Set,_=[];for(let k of x){let B=b(k);E.has(B)||(E.add(B),_.push(k))}return _}}s(yH,"generatePossibleEdits");async function l0e(e,t,r,n){let a=t.filter(m=>m.hasEditWithinFirstLines(n.requireEditWithinNLines)).map(m=>m.resolveDiff()).map(m=>m.eliminateEmptyLineChanges()),l=AH?await $k(e,r.languageId,r.documentAfterEditsNoShortening.value):"unknown";if(AH){let m=s(h=>{let p=r.documentAfterEditsNoShortening;return r.toEditOnDocumentAfterEditsNoShortening(h).apply(p.value)},"applyToDocumentNoShortening");await Promise.all(a.map(h=>h.resolveParseErrorCountIfPossible(e,m)))}let c=a.filter(m=>l==="unknown"?m.parseErrorCount===0:m.parseErrorCount!=="unknown"&&m.parseErrorCount<=l),u=c.length>0?c:a;u.sort((m,h)=>m.parseErrorCount===h.parseErrorCount?0:m.parseErrorCount==="unknown"?1:h.parseErrorCount==="unknown"?-1:m.parseErrorCount-h.parseErrorCount);let f=s(m=>m.diffMetrics.editDistance,"score");return u.sort((m,h)=>f(m)-f(h)),u.length>0?u[0].edit:null}s(l0e,"selectBestEdit");function t_t(e){let r=[],n=e.documentLinesBeforeEdit,i=0,o=0,a=-1,l=s((c,u)=>{c>a+1&&r.push("[...]"),u?r.push(`-${n[c]}`):r.push(`${n[c]}`),a=c},"addOldLineIndex");for(let c of e.recentEdit.edits){for(;i<c.lineRange.startLineNumber-1;)Math.min(c.lineRange.startLineNumber-i-1,o>0?i-o-2:1073741824)<=2&&l(i,!1),i++;for(;i<c.lineRange.endLineNumberExclusive-1;)l(i,!0),i++;r.push(c.newLines.map(u=>`+${u}`).join(`
`)),o=c.lineRange.endLineNumberExclusive}for(;i<n.length;)i-o+2<=2&&l(i,!1),i++;return r.push("[...]"),r}s(t_t,"summariseDocDiff");function fMe(e){let t=[];for(let r of e.recentEdit.edits){let n=e.documentLinesBeforeEdit.slice(r.lineRange.startLineNumber-1,r.lineRange.endLineNumberExclusive-1),i=r.newLines;if(n.filter(a=>a.trim().length>0).length===0&&i.filter(a=>a.trim().length>0).length===0)continue;let o=r.lineRange.startLineNumber+e.clippingRange.startLineNumber-1;t.push(`@@ -${o},${n.length} +${o},${i.length} @@`),t.push(...n.map(a=>`-${a}`)),t.push(...i.map(a=>`+${a}`))}return t}s(fMe,"summarizeEditsAsUnifiedDiff");async function $k(e,t,r){return await e.getTreeSitterAST({languageId:t,getText:s(()=>r,"getText")})?.getParseErrorCount()??"unknown"}s($k,"getParseErrorCount");d();var l2=Ze(Gh());d();var zk=qf("ITokenizerProvider");var s3=class extends l2.PromptRenderer{constructor(r,n,i={validate:!0},o,a,l){let c=o.acquireTokenizer({tokenizer:l.tokenizerName}),u={modelMaxPromptTokens:l.tokenBudget};super(u,r,n,c);this.options=i;this._instantiationService=a}static{s(this,"PromptRenderer")}static create(r,n,i,o={validate:!0}){return r.invokeFunction(a=>{let l=a.get(zk);return new s3(n,i,o,l,r,a.get(zh))})}createElement(r,...n){return this._instantiationService.createInstance(r.ctor,r.props,...n)}async render(r,n,i){let o=await super.render(r,n);i={...{trace:!0},...i};for(let c=1;c<o.messages.length;c++){let u=o.messages[c],f=o.messages[c-1];if(u.role===l2.Raw.ChatRole.System&&f.role===l2.Raw.ChatRole.System){let m=f.content.at(-1),h=u.content.at(0);m&&h&&m.type===l2.Raw.ChatCompletionContentPartKind.Text&&h.type===l2.Raw.ChatCompletionContentPartKind.Text?(m.text=m.text.trimEnd()+`
`+h.text,f.content=f.content.concat(u.content.slice(1))):(f.content.push({type:l2.Raw.ChatCompletionContentPartKind.Text,text:`
`}),f.content=f.content.concat(u.content)),o.messages.splice(c,1),c--}}let l=o.messages[o.messages.length-1];if(this.options.validate&&l&&l.role!==l2.Raw.ChatRole.User)throw new Error("Sorry, this message is too long. Please try a shorter question.");return{...o,references:[]}}async countTokens(r){return(await super.render(void 0,r)).tokenCount}};s3=f0([Vs(3,zk),Vs(4,Kg),Vs(5,zh)],s3);d();var dMe=Ze(Gh());var CH=class extends dMe.PromptElement{static{s(this,"SafetyRules")}render(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null))}};d();d();var Gb=class{constructor(t){this.text=t;this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let r=0;r<t.length;r++)t.charAt(r)===`
`&&(this.lineStartOffsetByLineIdx.push(r+1),r>0&&t.charAt(r-1)==="\r"?this.lineEndOffsetByLineIdx.push(r-1):this.lineEndOffsetByLineIdx.push(r));this.lineEndOffsetByLineIdx.push(t.length)}static{s(this,"PositionOffsetTransformer")}getOffset(t){return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}getOffsetRange(t){return new Vt(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getPosition(t){let r=xf(this.lineStartOffsetByLineIdx,o=>o<=t),n=r+1,i=t-this.lineStartOffsetByLineIdx[r]+1;return new mn(n,i)}getRange(t){return yr.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getTextLength(t){return Gl.ofRange(this.getRange(t))}get textLength(){let t=this.lineStartOffsetByLineIdx.length-1;return new Gl(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}};var c0e=class{static{s(this,"AbstractDocument")}rangeToOffsetRange(t){return new Vt(this.getOffsetAtPosition(t.start),this.getOffsetAtPosition(t.end))}offsetRangeToRange(t){return new Ru(this.getPositionAtOffset(t.start),this.getPositionAtOffset(t.endExclusive))}},Yh=class extends c0e{constructor(r){super();this.value=r;this._transformer=new Gb(this.value)}static{s(this,"StringTextDocument")}getText(){return this.value}getLineText(r){let n=this._transformer.getOffset(new mn(r+1,1)),i=n+this.getLineLength(r);return this.value.substring(n,i)}getLineLength(r){return this._transformer.getLineLength(r+1)}getLineCount(){return this._transformer.textLength.lineCount+1}getTextInOffsetRange(r){return r.substring(this.value)}getPositionAtOffset(r){return r_t(this._transformer.getPosition(r))}getOffsetAtPosition(r){return r=this._validatePosition(r),this._transformer.getOffset(n_t(r))}_validatePosition(r){if(r.line<0)return new Eo(0,0);let n=this._transformer.textLength.lineCount+1;if(r.line>=n){let o=this._transformer.getLineLength(n);return new Eo(n-1,o)}if(r.character<0)return new Eo(r.line,0);let i=this._transformer.getLineLength(r.line+1);return r.character>i?new Eo(r.line,i):r}};function r_t(e){return new Eo(e.lineNumber-1,e.column-1)}s(r_t,"corePositionToVSCodePosition");function n_t(e){return new mn(e.line+1,e.character+1)}s(n_t,"vsCodePositionToCorePosition");d();d();function mMe(e){if(e.length===0)return 1/0;let t=e[0];for(let r=1;r<e.length;r++)t=Math.min(t,e[r]);return t}s(mMe,"min");d();function u0e(e,t){let r=t(e);return{...r,range:[r.range.start,r.range.endExclusive],children:r.children?.map(n=>u0e(n,t))}}s(u0e,"toAstNode");function hMe(e,t){let r=Mv(t,a=>a.endExclusive>=e.start),n=xf(t,a=>a.start<=e.endExclusive)+1;if(r===n)return[e];let i=[],o=e.start;for(let a=r;a<n;a++){let l=t[a];l.start>o&&i.push(new Vt(o,l.start)),o=l.endExclusive}return o<e.endExclusive&&i.push(new Vt(o,e.endExclusive)),i}s(hMe,"subtractRange");d();d();d();var xH=class{static{s(this,"PrefixSumComputer")}constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(t,r){t=Uv(t);let n=this.values,i=this.prefixSum,o=r.length;return o===0?!1:(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+o),this.values.set(r,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,r){return t=Uv(t),r=Uv(r),this.values[t]===r?!1:(this.values[t]=r,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,r){t=Uv(t),r=Uv(r);let n=this.values,i=this.prefixSum;if(t>=n.length)return!1;let o=n.length-t;return r>=o&&(r=o),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+r),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Uv(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),t>=this.values.length&&(t=this.values.length-1);for(let n=r;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let r=0,n=this.values.length-1,i=0,o=0,a=0;for(;r<=n;)if(i=r+(n-r)/2|0,o=this.prefixSum[i],a=o-this.values[i],t<a)n=i-1;else if(t>=o)r=i+1;else break;return new f0e(i,t-a)}};var f0e=class{constructor(t,r){this.index=t;this.remainder=r;this._prefixSumIndexOfResultBrand=void 0;this.index=t,this.remainder=r}static{s(this,"PrefixSumIndexOfResult")}};var Yk=class{static{s(this,"PositionOffsetTransformer")}constructor(t){this._lines=gg(t),this._eol=t.charAt(this._lines[0].length)==="\r"?`\r
`:`
`;let r=new Uint32Array(this._lines.length);for(let n=0;n<this._lines.length;n++)r[n]=this._lines[n].length+this._eol.length;this._lineStarts=new xH(r)}_getText(){return this._lines.join(this._eol)}applyOffsetEdits(t){let{edits:r}=t;for(let n=r.length-1;n>=0;n--){let i=r[n],o=this.toRange(i.replaceRange);this._acceptDeleteRange(o),this._acceptInsertText(o.start,i.newText)}}_acceptDeleteRange(t){if(t.start.line===t.end.line){if(t.start.character===t.end.character)return;this._setLineText(t.start.line,this._lines[t.start.line].substring(0,t.start.character)+this._lines[t.start.line].substring(t.end.character));return}this._setLineText(t.start.line,this._lines[t.start.line].substring(0,t.start.character)+this._lines[t.end.line].substring(t.end.character)),this._lines.splice(t.start.line+1,t.end.line-t.start.line),this._lineStarts.removeValues(t.start.line+1,t.end.line-t.start.line)}_acceptInsertText(t,r){if(r.length===0)return;let n=gg(r);if(n.length===1){this._setLineText(t.line,this._lines[t.line].substring(0,t.character)+n[0]+this._lines[t.line].substring(t.character));return}n[n.length-1]+=this._lines[t.line].substring(t.character),this._setLineText(t.line,this._lines[t.line].substring(0,t.character)+n[0]);let i=new Uint32Array(n.length-1);for(let o=1;o<n.length;o++)this._lines.splice(t.line+1+o-1,0,n[o]),i[o-1]=n[o].length+this._eol.length;this._lineStarts.insertValues(t.line+1,i)}_setLineText(t,r){this._lines[t]=r,this._lineStarts.setValue(t,this._lines[t].length+this._eol.length)}getLineCount(){return this._lines.length}getOffset(t){return t=this.validatePosition(t),this._lineStarts.getPrefixSum(t.line-1)+t.character}getPosition(t){t=Math.floor(t),t=Math.max(0,t);let r=this._lineStarts.getIndexOf(t),n=this._lines[r.index].length;return new Eo(r.index,Math.min(r.remainder,n))}toRange(t){return new Ru(this.getPosition(t.start),this.getPosition(t.endExclusive))}toOffsetRange(t){return new Vt(this.getOffset(t.start),this.getOffset(t.end))}toOffsetEdit(t){let r=t.map(n=>new G9(this.validateRange(n.range),n.newText));return new um(r.map(n=>new el(this.toOffsetRange(n.range),n.newText)))}toTextEdits(t){return t.edits.map(r=>new G9(this.toRange(r.replaceRange),r.newText))}validatePosition(t){if(!(t instanceof Eo))throw new Error("Invalid argument");if(this._lines.length===0)return t.with(0,0);let{line:r,character:n}=t,i=!1;if(r<0)r=0,n=0,i=!0;else if(r>=this._lines.length)r=this._lines.length-1,n=this._lines[r].length,i=!0;else{let o=this._lines[r].length;n<0?(n=0,i=!0):n>o&&(n=o,i=!0)}return i?new Eo(r,n):t}validateRange(t){return new Ru(this.validatePosition(t.start),this.validatePosition(t.end))}};var vH=class{constructor(t,r){this.originalText=t;this.edits=r;this._positionOffsetTransformer=new pg(()=>new Yk(this.text));this._originalPositionOffsetTransformer=new pg(()=>new Yk(this.originalText));this._text=new pg(()=>this.edits.apply(this.originalText))}static{s(this,"ProjectedText")}get positionOffsetTransformer(){return this._positionOffsetTransformer.value}get originalPositionOffsetTransformer(){return this._originalPositionOffsetTransformer.value}get text(){return this._text.value}get lineCount(){return this.positionOffsetTransformer.getLineCount()}get isOriginal(){return this.edits.isEmpty||this.edits.isNoop(this.originalText)}project(t){return this.edits.applyToOffset(t)}projectOffsetRange(t){return this.edits.applyToOffsetRange(t)}projectRange(t){let r=this.originalPositionOffsetTransformer.toOffsetRange(t),n=this.projectOffsetRange(r);return this.positionOffsetTransformer.toRange(n)}projectOffsetEdit(t){return t.tryRebase(this.edits)}projectBack(t){return this.edits.applyInverseToOffset(t)}projectBackOffsetEdit(t){return t.tryRebase(this.edits.inverse(this.originalText))}projectBackTextEdit(t){let r=this.positionOffsetTransformer.toOffsetEdit(t),n=this.projectBackOffsetEdit(r);return this.originalPositionOffsetTransformer.toTextEdits(n)}};var d0e=class{constructor(t,r,n,i,o){this.parent=t;this.overlayNode=r;this.range=n;this.children=i;this._document=o}static{s(this,"RemovableNode")}get kind(){return this.overlayNode.kind}get text(){return this._document.getTextInOffsetRange(this.range)}},jb=class extends vH{constructor(r,n){super(r.getText(),n);this.baseDocument=r}static{s(this,"ProjectedDocument")}getLanguageId(){return this.baseDocument.languageId}};function EH(e,t,r){let n=[],i=[],o=[];for(let l=0;l<r.length;l++){let{document:c,overlayNodeRoot:u,selection:f}=r[l],m=c.getText(),h=f?c.rangeToOffsetRange(f):void 0,p=pMe(u,c),g=m0e.fromRootNode(p,m),y=h0e.fromNode(g,!!t.tryPreserveTypeChecking,!!t.alwaysUseEllipsisForElisions);h&&y.visitAll(M=>M.node.range.intersectsOrTouches(h)?(M.node.children.length===0&&M.markAsSurviving(),!0):!1),n.push(y),i.push(y.getTextFragment());let x=s(M=>h?M.range.endExclusive<h.start?h.start-M.range.endExclusive:M.range.start>h.endExclusive?3*(M.range.start-h.endExclusive):0:0,"distanceScoreToSelection"),b=new RA(M=>h?M.children.length===0?M.range.intersectsOrTouches(h)?0:Number.MAX_SAFE_INTEGER:mMe(M.children.map(Z=>b.get(Z)))+1:0),E=new RA(M=>{let Z=M.parent?E.get(M.parent):Number.MAX_SAFE_INTEGER,he=b.get(M);return Math.min(Z,he)}),_=!!t.tryPreserveTypeChecking,k=s(M=>_&&M.node?.kind==="import_statement"?0:100*E.get(M)+M.depth+10*(x(M)/m.length),"costFn"),B=typeof t.costFnOverride=="object"?t.costFnOverride.createCostFn(c):t.costFnOverride;if(B!==void 0){let M=k;k=s(Z=>{let he=M(Z);return he===!1?!1:Z.node?B(Z.node,he,c):he},"costFn")}let N=y.getDescendantsAndSelf();for(let M of N){if(!M.node.node)continue;let Z=k(M.node);Z!==!1&&o.push({idx:l,node:M,cost:Z})}}o.sort(vf(l=>l.cost,bf));for(let{node:l,idx:c}of o){if(l.markAsSurviving(),n.reduce((f,m)=>f+m.getTextFragment().length,0)>e)break;i[c]=n[c].getTextFragment()}let a=[];for(let l=0;l<i.length;l++){let c=i[l],{document:u}=r[l],f=new jb(u,c.toTextEditFromOriginal(u.getText().length)),m=f,h=n[l];m.getVisualization=()=>({$fileExtension:"ast.w",source:{value:f.originalText,decorations:hMe(Vt.ofLength(f.originalText.length),f.edits.edits.map(p=>p.replaceRange)).map(p=>({range:[p.start,p.endExclusive],color:"lime"}))},root:u0e(h,p=>({label:(p.node.node?.kind||"unknown")+` (${o.find(g=>g.node===p)?.cost})`,range:p.node.range,children:p.childNodes,isMarked:p._surviving}))}),a.push(f)}return a}s(EH,"summarizeDocumentsSyncImpl");function pMe(e,t,r=void 0){let n=new Vt(e.startIndex,e.endIndex),i=[],o=new d0e(r,e,n,i,t);for(let a of e.children)i.push(pMe(a,t,o));return o}s(pMe,"createRemovableNodeFromOverlayNode");var m0e=class e{constructor(t,r,n,i,o,a){this.node=t;this.range=r;this.children=n;this.depth=i;this.parent=o;this.document=a}static{s(this,"TextNode")}static fromRootNode(t,r){let n=new Vt(0,r.length);if(t.range.equals(n))return e.fromNode(t,r);let i=new Vt(0,t.range.start),o=new Vt(t.range.endExclusive,r.length),a=[],l=new e(void 0,n,a,0,null,r);return i.isEmpty||a.push(new e(void 0,i,[],0,l,r)),a.push(e.fromNode(t,r,1,null)),o.isEmpty||a.push(new e(void 0,o,[],0,l,r)),l}static fromNode(t,r,n=0,i=null){let o=[],a=new e(t,t.range,o,n,i,r);if(t.children.length>0){let l=t.range.start;for(let u of t.children){let f=new Vt(l,u.range.start);f.isEmpty||o.push(new e(void 0,f,[],n,a,r)),o.push(e.fromNode(u,r,n+1,a)),l=u.range.endExclusive}let c=new Vt(l,t.range.endExclusive);c.isEmpty||o.push(new e(void 0,c,[],n,a,r))}return a}getLeadingWs(){return i_t(this.document,this.range)}getTrailingWs(){return o_t(this.document,this.range)}};function i_t(e,t){let r=t.substring(e),n=r.length-r.trimStart().length;return r.substring(0,n)}s(i_t,"getLeadingWs");function o_t(e,t){let r=t.substring(e),n=r.length-r.trimEnd().length;return r.substring(r.length-n)}s(o_t,"getTrailingWs");var h0e=class e{constructor(t,r,n,i,o){this.node=t;this.parent=r;this.childNodes=n;this._tryPreserveTypeChecking=i;this._alwaysUseEllipsisForElisions=o;this._surviving=!1;this._textFragment=null}static{s(this,"SurvivingTextNode")}static fromNode(t,r,n){return e.fromNodeParent(t,null,r,n)}static fromNodeParent(t,r,n,i){let o=[],a=new e(t,r,o,n,i);for(let l of t.children){let c=e.fromNodeParent(l,a,n,i);o.push(c)}return a}visitAll(t){if(t(this))for(let r of this.childNodes)r.visitAll(t)}markAsSurviving(){this._surviving||(this._surviving=!0,this.parent&&this.parent.markAsSurviving(),this.invalidate())}invalidate(){this._textFragment&&(this._textFragment=null,this.parent&&this.parent.invalidate())}getTextFragment(){return this._textFragment||(this._textFragment=this._computeSummarization()),this._textFragment}_computeSummarization(){if(this.childNodes.length===0&&(this._surviving||!this.node.node))return new a3(this.node.range,this.node.document);if(!this._surviving)return new Hb("");let t=Array.from(J8(this.childNodes.map(n=>({node:n,fragment:n.getTextFragment()})),(n,i)=>n.fragment.length===0==(i.fragment.length===0)));for(let n=0;n<t.length;n++){let i=t[n],o=i[0].fragment.length===0;if(o&&n>0&&n<t.length-1){let a=t[n-1].at(-1),l=t[n+1].at(0);if(a.fragment instanceof a3&&l.fragment instanceof a3){let c=a.fragment.trimEnd(),u=l.fragment.trimStart();if(c.endsWith("{")&&u.startsWith("}")){t[n-1][t[n-1].length-1].fragment=c,i.length=1,i[0].fragment=new Hb(this._tryPreserveTypeChecking?"/ * ... * /":"\u2026"),t[n+1][0].fragment=u;continue}}}if(this._alwaysUseEllipsisForElisions&&o&&(n>0||n<t.length-1)){i.length=1;let a=i.at(0).node.node.getLeadingWs(),l=a.lastIndexOf(`
`);l!==-1&&(a=a.substring(l+1));let c=i.at(-1).node.node.getTrailingWs();i[0].fragment=new Hb(a+(this._tryPreserveTypeChecking?"/ * ... * /":"\u2026")+c)}}let r=[];for(let n of t)for(let i of n)s_t(r,i.fragment);return bH.from(r)}getDescendantsAndSelf(){let t=[];return this._getDescendantsAndSelf(t),t}_getDescendantsAndSelf(t){t.push(this);for(let r of this.childNodes)r._getDescendantsAndSelf(t)}},Kk=class{static{s(this,"TextFragment")}toString(){return this.text}toTextEditFromOriginal(t){let r=[],n=0,i="";function o(l){(n!==l||i.length>0)&&(r.push(new el(new Vt(n,l),i)),i="")}s(o,"emit");function a(l){if(l instanceof bH)for(let c of l.fragments)a(c);else l instanceof Hb?i+=l.text:l instanceof a3&&(o(l.range.start),n=l.range.endExclusive)}return s(a,"process"),a(this),o(t),new um(r)}},Hb=class extends Kk{constructor(r){super();this.text=r}static{s(this,"LiteralTextFragment")}get length(){return this.text.length}},a3=class e extends Kk{constructor(r,n){super();this.range=r;this.originalText=n}static{s(this,"OriginalTextFragment")}get length(){return this.range.length}get text(){return this.range.substring(this.originalText)}trimStart(){let r=this.text.trimStart();return r.length===this.length?this:new e(new Vt(this.range.endExclusive-r.length,this.range.endExclusive),this.originalText)}trimEnd(){let r=this.text.trimEnd();return r.length===this.length?this:new e(new Vt(this.range.start,this.range.start+r.length),this.originalText)}startsWith(r){return this.text.startsWith(r)}endsWith(r){return this.text.endsWith(r)}tryJoin(r){return this.range.endExclusive===r.range.start?new e(new Vt(this.range.start,r.range.endExclusive),this.originalText):null}},bH=class e extends Kk{constructor(r){super();this.fragments=r;this.length=this.fragments.reduce((r,n)=>r+n.length,0)}static{s(this,"ConcatenatedTextFragment")}static from(r){return r.length===0?new Hb(""):r.length===1?r[0]:new e(r)}get text(){return this.fragments.map(r=>r.text).join("")}};function s_t(e,t){if(t.length===0)return;let r=e[e.length-1];if(r&&r instanceof a3&&t instanceof a3){let n=r.tryJoin(t);if(n){e[e.length-1]=n;return}}e.push(t)}s(s_t,"pushFragment");d();var IH=Ze(Gh());function Jk(e){if(Array.isArray(e))return e.map(r=>Jk(r));let t=(0,IH.toMode)(IH.OutputMode.OpenAI,e);if("copilot_references"in e&&(t.copilot_references=e.copilot_references),"copilot_confirmations"in e&&(t.copilot_confirmations=e.copilot_confirmations),typeof t.content=="string")t.content=t.content.trimEnd();else for(let r of t.content)r.type==="text"&&(r.text=r.text.trimEnd());return t}s(Jk,"rawMessageToCAPI");d();d();var TH=class{constructor(t,r,n,i){this.startIndex=t;this.endIndex=r;this.kind=n;this.children=i;if(t>r)throw new vn("startIndex must be less than endIndex");let o=t;for(let a of i){if(a.startIndex<o)throw new vn("Invalid child startIndex");if(a.endIndex>r)throw new vn("Invalid child endIndex");o=Math.max(a.endIndex,o)}}static{s(this,"OverlayNode")}toString(){let t=[];function r(n,i=""){t.push(`${i}${n.kind} [${n.startIndex}, ${n.endIndex}]`),n.children.forEach(o=>r(o,i+" "))}return s(r,"toString"),r(this),t.join(`
`)}};function AMe(e,t,r){let n=e.getText().split(/\r\n|\r|\n/g),i=r||{tabSize:4},o={getLineCount:s(()=>n.length,"getLineCount"),getLineContent:s(a=>n[a-1],"getLineContent"),getOptions:s(()=>i,"getOptions")};try{let a=a_t(o,t),[l]=yMe(e,a,void 0);return l.adjust(e,CMe(t)),l.toOverlayNode(e,!0)}catch{return new wH(1,e.getLineCount(),[]).toOverlayNode(e,!0)}}s(AMe,"getStructureUsingIndentation");function yMe(e,t,r){if(typeof r<"u"&&r>=t.length)throw new Error(`Invalid region index ${r}`);let n=typeof r>"u"?1:t.getStartLineNumber(r),i=typeof r>"u"?e.getLineCount():t.getEndLineNumber(r),o=[],a=null;for(r=typeof r>"u"?0:r+1;r<t.length;){let l=t.getStartLineNumber(r),c=t.getEndLineNumber(r);if(l>i||c>i)break;let u=a;if([a,r]=yMe(e,t,r),u&&a.startLineNumber<=u.endLineNumber)throw new vn("Invalid Folding Ranges: overlapping children");if(a.startLineNumber<n)throw new vn("Invalid Folding Ranges: child starts before parent");o.push(a)}return[new wH(n,i,o),r]}s(yMe,"createFoldingRangeTree");var wH=class{constructor(t,r,n){this.startLineNumber=t;this.endLineNumber=r;this.children=n;if(t>r)throw new vn("Invalid Folding Ranges: startLineNumber > endLineNumber")}static{s(this,"FoldingRangeNode")}adjust(t,r){r?this._adjustOffside():this._adjustRegular(t,t.getLineCount())}_adjustOffside(){this.startLineNumber++;for(let t of this.children)t._adjustOffside()}_adjustRegular(t,r){if(this.endLineNumber<r){let n=t.getLineText(this.endLineNumber).trim(),i=/^[\}\]\)];?$/.test(n),o=/^<\/\w/.test(n);(i||o)&&this.endLineNumber++}for(let n=this.children.length-1;n>=0;n--){let i=this.children[n],o=n+1<this.children.length?this.children[n+1].startLineNumber-1:r;i._adjustRegular(t,o)}}toOverlayNode(t,r){let n=[],i=r&&this.startLineNumber===1?1:this.startLineNumber+1;for(let o of this.children){for(let a=i;a<o.startLineNumber;a++){let l=p0e(t,a,a,"LINE",[]);l&&n.push(l)}n.push(o.toOverlayNode(t,!1)),i=o.endLineNumber+1}for(let o=i;o<this.endLineNumber;o++){let a=p0e(t,o,o,"LINE",[]);a&&n.push(a)}return p0e(t,this.startLineNumber,this.endLineNumber,"FOLD",n)}};function p0e(e,t,r,n,i){let o=e.getOffsetAtPosition(new Eo(t-1,0)),a=r<e.getLineCount()?new Eo(r,0):new Eo(r-1,e.getLineLength(r-1)),l=e.getOffsetAtPosition(a);return new TH(o,l,n,i)}s(p0e,"createOverlayNode");function a_t(e,t){return l_t(e,CMe(t))}s(a_t,"generateFoldingRegions");function CMe(e){return["clojure","coffeescript","fsharp","latex","markdown","pug","python","sql","yaml"].includes(e)}s(CMe,"isOffSide");function l_t(e,t){let r=e.getOptions().tabSize,n=new g0e,i=[],o=e.getLineCount()+1;i.push({indent:-1,endAbove:o,line:o});for(let a=e.getLineCount();a>0;a--){let l=e.getLineContent(a),c=u_t(l,r),u=i[i.length-1];if(c===-1){t&&(u.endAbove=a);continue}if(u.indent>c){do i.pop(),u=i[i.length-1];while(u.indent>c);let f=u.endAbove-1;f-a>=1&&n.insertFirst(a,f,c)}u.indent===c?u.endAbove=a:i.push({indent:c,endAbove:a,line:a})}return n.toIndentRanges()}s(l_t,"_computeRanges");var c_t=65535,Vb=16777215,gMe=4278190080,g0e=class{static{s(this,"RangesCollector")}constructor(){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0}insertFirst(t,r,n){if(t>Vb||r>Vb)return;let i=this._length;this._startIndexes[i]=t,this._endIndexes[i]=r,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(){let t=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let n=this._length-1,i=0;n>=0;n--,i++)t[i]=this._startIndexes[n],r[i]=this._endIndexes[n];return new A0e(t,r)}};function u_t(e,t){let r=0,n=0,i=e.length;for(;n<i;){let o=e.charCodeAt(n);if(o===32)r++;else if(o===9)r=r-r%t+t;else break;n++}return n===i?-1:r}s(u_t,"computeIndentLevel");var A0e=class{static{s(this,"FoldingRegions")}constructor(t,r){this._startIndexes=t,this._endIndexes=r,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let t=[],r=s((n,i)=>{let o=t[t.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=i},"isInsideLast");for(let n=0,i=this._startIndexes.length;n<i;n++){let o=this._startIndexes[n],a=this._endIndexes[n];if(o>Vb||a>Vb)throw new Error("startLineNumber or endLineNumber must not exceed "+Vb);for(;t.length>0&&!r(o,a);)t.pop();let l=t.length>0?t[t.length-1]:-1;t.push(n),this._startIndexes[n]=o+((l&255)<<24),this._endIndexes[n]=a+((l&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(t){return this._startIndexes[t]&Vb}getEndLineNumber(t){return this._endIndexes[t]&Vb}getParentIndex(t){this.ensureParentIndices();let r=((this._startIndexes[t]&gMe)>>>24)+((this._endIndexes[t]&gMe)>>>16);return r===c_t?-1:r}contains(t,r){return this.getStartLineNumber(t)<=r&&this.getEndLineNumber(t)>=r}findIndex(t){let r=0,n=this._startIndexes.length;if(n===0)return-1;for(;r<n;){let i=Math.floor((r+n)/2);t<this.getStartLineNumber(i)?n=i:r=i+1}return r-1}findRange(t){let r=this.findIndex(t);if(r>=0){if(this.getEndLineNumber(r)>=t)return r;for(r=this.getParentIndex(r);r!==-1;){if(this.contains(r,t))return r;r=this.getParentIndex(r)}}return-1}};d();function $b(e){return e instanceof Error?e:typeof e=="string"?new Error(e):new Error(`An unexpected error occurred: ${e}`)}s($b,"fromUnknown");var hl=Ze(Gh());var _H="current-version",Gf="next-version",vMe=2,bMe=10,EMe=.7,f_t=/```[^\n]*\n/,c2=class extends O9{constructor(r,n,i){super(c2.ID,[o=>new j9(o),o=>new q9(o),o=>new W9(o)]);this.fetcher=r;this._parserService=n;this._instantiationService=i;this.dependsOnSelection=!0;this.showNextEditPreference="always";this._delayer=new EG}static{s(this,"GhNearbyNesProvider")}static{this.ID="GhNearbyNesProvider"}canReuseResult(r,n){if(r.getActiveDocument().id!==n.getActiveDocument().id||r.documents.length!==n.documents.length)return!1;let i=new Map(r.documents.map(a=>[a.id,a]));for(let a of n.documents){let l=i.get(a.id);if(!l||!o(l,a))return!1}return!0;function o(a,l){if(a.documentAfterEditsNoShortening.value!==l.documentAfterEditsNoShortening.value)return!1;let c=Wb(a),u=c?y0e(a,c):null,f=Wb(l),m=f?y0e(l,f):null;return!u||!m?!0:Math.abs(u.line-m.line)<Math.min(vMe,bMe)}}handleAcceptance(){this._delayer.handleAcceptance()}handleRejection(){this._delayer.handleRejection()}async provideNextEditBase(r,n){let i=new r3(r),o=this._delayer.createDelaySession(),a;try{a=await this.doGetNextEdit(r,i,o,n)}catch(c){return Si.noEdit({kind:"unexpected",error:$b(c)},i)}let l=o.getArtificalDelay();return l>0&&await i2(l),a}async doGetNextEdit(r,n,i,o){return r.documents.some(c=>{if(c.recentEdit.edits.length===0)return!1;for(let u of c.recentEdit.edits)if(!u.lineRange.isEmpty||u.newLines.length>0)return!0;return!1})?await this.sendRequestAndProcessResult(r,i,o,n):Si.noEdit({kind:"activeDocumentHasNoEdits"},n)}async sendRequestAndProcessResult(r,n,i,o){let a=await this.createPrompt(r,i);if(!a)return Si.noEdit({kind:"noSuggestions"},o);if(!a.editWindowIsInPrompt)return Si.noEdit({kind:"filteredOut",message:"promptTooLarge"},o);if(await this.debounce(n,o),i.isCancellationRequested){let k={kind:"gotCancelled",message:"afterDebounce"};return Si.noEdit(k,o)}let{summarizedEditWindow:l,editWindowAllowedEditLineRange:c,allowedEditLineRange:u,maxCompletionLineCount:f,messages:m,completionPrefixRange:h,completionRange:p,convergence:g,activeDocument:y,activeDocumentLines:x}=a;o.setFetchStartedAt(),r.fetchIssued=!0;let b=await s0e(this.ID,this.fetcher,Jk(m),{convergence:g,ignoreReplyTextBefore:f_t,maxCompletionLineCount:f,convergenceNonWhitespaceCharOverlap:1e3},i);if(o.setFetchResultIfNotSet(b.isOk()?"success":b.err.kind==="cancel"||i.isCancellationRequested?"cancelled":"failure"),i.isCancellationRequested)return Si.noEdit({kind:"gotCancelled",message:"afterFetchCall"},o);if(b.isError())return b.err.kind==="cancel"?Si.noEdit({kind:"gotCancelled",message:"afterFetchCall"},o):Si.noEdit({kind:"fetchFailure",error:$b(b.err.err)},o);let{result:E}=b.val;if(E.length===0){let k=`<${Gf}>
`,B=b.val.ignored.indexOf(k);B>=0&&(E=b.val.ignored.substring(B+k.length))}if(E=d_t(E),E.trim().length===0)return Si.noEdit({kind:"noSuggestions"},o);let _;if(l&&c&&u){let k=m_t(y,l,c,E);if(!k||k.edits.length===0)return Si.noEdit({kind:"filteredOut",message:"Content is identical or cannot get clean diff within edit window"},o);let B=h_t(l,k);if(B.edits.length===0)return Si.noEdit({kind:"filteredOut",message:"No-op edit or could not map back to original document"},o);if(AH){let Z=await $k(this._parserService,y.languageId,y.documentAfterEditsNoShortening.value),he=B.apply(y.documentAfterEditsNoShortening.value);if(await $k(this._parserService,y.languageId,he)>Z)return Si.noEdit({kind:"filteredOut",message:"More parse errors after edit"},o)}_=p_t(y,B);let N=_.edits[0].lineRange.startLineNumber,M=_.edits[_.edits.length-1].lineRange.endLineNumberExclusive;if(!a0e(new Cr(N,M),u))return Si.noEdit({kind:"filteredOut",message:"Outside edit window after projection"},o)}else{let k=yH(y.languageId,x,h,p,E,void 0),B=await l0e(this._parserService,k,y,{requireEditWithinNLines:100});if(!B)return Si.noEdit({kind:"filteredOut",message:"Could not identify best edit"},o);_=new Fo([B])}return g_t(y,_)?Si.noEdit({kind:"filteredOut",message:"Undo of recent edit"},o):A_t(y,_)?Si.noEdit({kind:"filteredOut",message:"Deletion of recent insertion"},o):y_t(y,_)?Si.noEdit({kind:"filteredOut",message:"uncategorized"},o):C_t(y,_)?Si.noEdit({kind:"filteredOut",message:"uncategorized"},o):Si.edit({edit:_},o)}async debounce(r,n){let i=r.getDebounceTime();n.setDebounceTime(i),await i2(i)}async createPrompt(r,n){let i=r.getActiveDocument(),a=i.documentAfterEdits.value.includes(`\r
`)?`\r
`:`
`,l=i.documentAfterEdits.value.split(a),c=Wb(i);if(c===null)return;let u=y0e(i,c),f=new Yh(i.documentAfterEditsNoShortening.value),m=await b_t(this._parserService,{getText:s(()=>f.getText(),"getText"),languageId:i.languageId}),{firstEditableLineInShortenedDocument:h,lastEditableLineInShortenedDocument:p,editWindow:g}=function(){let he=x_t(i.documentAfterEditsLines,c.startLineNumber),ee=Math.max(1,Math.min(he,c.startLineNumber-vMe)),G=c.startLineNumber-ee,q=Math.min(l.length,c.endLineNumber+bMe),ie=q-c.endLineNumber,z=u.line-G,j=u.line+ie,U=new Ru(z,0,j,f.getLineLength(j));return{firstEditableLineInShortenedDocument:ee,lastEditableLineInShortenedDocument:q,editWindow:U}}(),y=EH(0,{alwaysUseEllipsisForElisions:!0},[{overlayNodeRoot:m,document:f,selection:g}])[0],x=new Cr(1,h),b=new Cr(h,p+1),E=y.text,{messages:_,prediction:k,editWindowIsInPrompt:B}=await this._renderPrompt({request:r,activeDocumentSlice:E,languageId:i.languageId},n),N=E.split(/\r\n|\r|\n/).length,M=y.projectRange(g),Z=y.positionOffsetTransformer.toOffsetRange(M);return{summarizedEditWindow:y,editWindowAllowedEditLineRange:new Cr(M.start.line+1,M.end.line+2),allowedEditLineRange:new Cr(h,p+1),messages:_,prediction:k,editWindowIsInPrompt:B,activeDocument:i,activeDocumentLines:l,completionPrefixRange:x,completionRange:b,convergence:E,expectedConvergencePrefix:Z.start,maxCompletionLineCount:N+20}}async _renderPrompt(r,n){let o=await s3.create(this._instantiationService,x0e,r).render(void 0,n,{trace:!1}),a=o.metadata.get(DH)?.prediction,l=!!o.metadata.get(RH);return{messages:o.messages,prediction:a,editWindowIsInPrompt:l}}};c2=f0([Vs(0,zh),Vs(1,a2),Vs(2,Kg)],c2);function d_t(e){function t(r,n,i){let o=r.lastIndexOf(n);if(o===-1)return r;let a=r.slice(0,o);return a.trim().length>0?a+i:a}return s(t,"getStringBeforeLastPattern"),e=t(e,"\n```",`
`),e=t(e,`\`\`\`</${Gf}>`,`
`),e=t(e,`\`\`\`
</${Gf}>`,`
`),e=t(e,`</${Gf}>`,`
`),e}s(d_t,"removeSuffixFromReply");function y0e(e,t){let r=e.documentAfterEdits.getTransformer().getOffset(t.getEndPosition()),n=e.toOffsetOnDocumentAfterEditsNoShortening(r);return new Yh(e.documentAfterEditsNoShortening.value).getPositionAtOffset(n)}s(y0e,"getCursorPositionInOuterDocument");function m_t(e,t,r,n){let i=H9.fromString(t.text),o=H9.fromString(n.trimEnd()),l=new z9(e.languageId,i,new Cr(1,i.length+1),o).resolveDiff().eliminateEmptyLineChanges().eliminateInsertedOrDeletedComments().eliminateEmptyLineChanges(),c=t.isOriginal?l:l.containWithinLines(r);if(!c)return null;let u=o0e?c.eliminateLargeChangeHunks():c;return u?u.toLineEdit("multiple-hunks"):null}s(m_t,"generateSummarizedEditWindowEdit");function h_t(e,t){let r=t.toEdit(new Hl(e.text));return e.projectBackOffsetEdit(r.toOffsetEdit())}s(h_t,"convertSummarizedEditWindowEditToOuterDocumentEdit");function p_t(e,t){let r=t.edits.map(i=>{let o=i.replaceRange.start,a=e.toProjectedOffset(o);return qs.replace(new Vt(a,a+i.replaceRange.length),i.newText)}),n=new Yc(e.documentAfterEdits,Is.create(r));return Fo.fromEdit(n)}s(p_t,"convertOuterDocumentEditToProjectedEdit");function g_t(e,t){let r=t.toEdit(e.documentAfterEdits),n=IMe(e.documentAfterEdits.value,r),i=new SH,o=e.documentBeforeEdits.value;for(let a of e.recentEdits.edits)i=i.combine(IMe(o,a)),o=a.apply(o);return!!i.isUndoneBy(n)}s(g_t,"editWouldUndo");function A_t(e,t){let r=t.toEdit(e.documentAfterEdits);if(r=r.normalizeOnSource(e.documentAfterEdits.value),!RMe(r))return!1;for(let n=e.recentEdits.edits.length-1;n>=0;n--){let i=e.recentEdits.edits[n],o=r.tryRebase(i);if(!o)return!0;r=o}return!1}s(A_t,"editWouldDeleteWhatWasJustInserted");function y_t(e,t){let r=t.toEdit(e.documentAfterEdits);if(r=r.normalizeOnSource(e.documentAfterEdits.value),!RMe(r))return!1;for(let n of r.edits){let i=e.documentAfterEdits.value.substring(n.range.start,n.range.endExclusive);if(e0e(i,e.languageId))return!0}return!1}s(y_t,"editWouldDeleteAComment");function C_t(e,t){if(t.edits.length!==1)return!1;let r=t.edits[0];if(!r.lineRange.isEmpty)return!1;let n=s(l=>l.trim().length>5,"isSignificantLine"),i=new Set(r.newLines.filter(n));if(i.size<=1)return!1;let o=new Set(e.documentAfterEditsLines.filter(n));return C0e(o,i)/i.size>.8}s(C_t,"editWouldDuplicateExistingLines");function RMe(e){let t=e.edits.reduce((n,i)=>n+i.range.length,0);return e.edits.reduce((n,i)=>n+i.newText.length,0)===0&&t>0}s(RMe,"editIsDeletion");function x_t(e,t){for(;t>0;){if(e[t-1].trim().length>0)return t;t--}return 1}s(x_t,"findLineNumberAboveWithContent");var SH=class e{constructor(t=new Set,r=new Set){this.inserted=t;this.deleted=r}static{s(this,"InformationDelta")}combine(t){return new e(wMe(this.inserted,t.inserted),wMe(this.deleted,t.deleted))}isUndoneBy(t){let r=_Me(t.inserted,t.deleted),n=_Me(t.deleted,t.inserted),i=C0e(n,this.inserted),o=C0e(r,this.deleted);return n.size>6&&i/n.size>EMe||r.size>6&&o/r.size>EMe}};function IMe(e,t){let r=new Set,n=new Set,i=s(a=>{if(!a)return;let l=e.substring(a.start,a.endExclusive);for(let c of l.split(/\r\n|\r|\n/)){c=c.trim();for(let u of TMe(c))n.add(u)}},"tryAddDeleted"),o=s(a=>{for(let l of a.split(/\r\n|\r|\n/)){l=l.trim();for(let c of TMe(l))r.add(c)}},"tryAddInserted");for(let a of t.edits){let l=a.removeCommonPrefix(e).removeCommonSuffix(e),c=a.removeCommonSuffix(e).removeCommonPrefix(e);l.isNeutral()||(i(l.range),i(c.range),i(l.range.intersect(c.range)),o(v_t(l.newText,c.newText)))}return new SH(r,n)}s(IMe,"getInformationDelta");function v_t(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++){let i=e.slice(0,e.length-n),o=t.slice(n);if(i===o)return i}return""}s(v_t,"trimOverlap");function TMe(e){let t=[];for(let r=4;r<e.length;r++){let n=e.slice(r-4,r);t.push(n)}return t}s(TMe,"to4grams");function wMe(e,t){let r=new Set;for(let n of e)r.add(n);for(let n of t)r.add(n);return r}s(wMe,"setUnion");function _Me(e,t){let r=new Set;for(let n of e)t.has(n)||r.add(n);return r}s(_Me,"setMinus");function C0e(e,t){let r=0;for(let n of e)t.has(n)&&r++;return r}s(C0e,"setIntersectionCount");async function b_t(e,t){let n=await e.getTreeSitterAST(t)?.getStructure();return n||AMe(new Yh(t.getText()),t.languageId,void 0)}s(b_t,"getStructure");var x0e=class extends hl.PromptElement{static{s(this,"GHNearbyPrompt")}async render(t,r){let{request:n,activeDocumentSlice:i,languageId:o}=this.props,a=[`<${Gf}>`,`\`\`\`${o}`,`${i}`,"```",`</${Gf}>`].join(`
`),l=(0,hl.useKeepWith)();return vscpp(vscppf,null,vscpp("meta",{value:new DH(a)}),vscpp(hl.SystemMessage,{priority:1e3},vscpp(CH,null),this._getInstructions()),vscpp(hl.UserMessage,{priority:900},"These are the files I'm working on, before I started making changes to them:",vscpp("br",null),"<original_code>",vscpp("br",null),n.documents.map((c,u)=>c.id===n.getActiveDocument().id?vscpp(l,{priority:300},vscpp(hl.Chunk,{priority:300},vscpp(kH,{doc:c}))):vscpp(hl.Chunk,{priority:100+u},vscpp(kH,{doc:c}))),vscpp("br",null),"</original_code>",vscpp("br",null),vscpp("br",null),"This is a sequence of edits that I made on these files, starting from the oldest to the newest:",vscpp("br",null),"<edits_to_original_code>",vscpp("br",null),n.documents.map((c,u)=>c.id===n.getActiveDocument().id?vscpp(l,{priority:300},vscpp(hl.Chunk,{priority:300},vscpp(BH,{doc:c}))):vscpp(hl.Chunk,{priority:200+u},vscpp(BH,{doc:c}))),vscpp("br",null),"</edits_to_original_code>",vscpp("br",null),vscpp("br",null),vscpp(l,{priority:300},vscpp(hl.Chunk,{priority:300},vscpp("meta",{local:!0,value:new RH}),"Here is the piece of code I am currently editing in"," ",n.getActiveDocument().getDisplayPath(),":",vscpp("br",null),vscpp("br",null),"<",_H,">",vscpp("br",null),"```",o,vscpp("br",null),i,vscpp("br",null),"```",vscpp("br",null),"</",_H,">",vscpp("br",null),vscpp("br",null),"Based on my most recent edits, what will I do next? Rewrite the code between <",_H,"> and </",_H,"> based on what I will do next. Do not skip any lines. Do not be lazy.",vscpp("br",null)))))}_getInstructions(){switch("v1"){case"v1":return vscpp(vscppf,null,"The programmer will provide you with a set of recently viewed files, their recent edits, and a snippet of code that is being actively edited.",vscpp("br",null),vscpp("br",null),"When helping the programmer, your goals are:",vscpp("br",null),"- Make only the necessary changes as indicated by the context.",vscpp("br",null),"- Avoid unnecessary rewrites and make only the necessary changes, using ellipses to indicate partial code where appropriate.",vscpp("br",null),"- Ensure all specified additions, modifications, and new elements (e.g., methods, parameters, function calls) are included in the response.",vscpp("br",null),"- Adhere strictly to the provided pattern, structure, and content, including matching the exact structure and formatting of the expected response.",vscpp("br",null),"- Maintain the integrity of the existing code while making necessary updates.",vscpp("br",null),"- Provide complete and detailed code snippets without omissions, ensuring all necessary parts such as additional classes, methods, or specific steps are included.",vscpp("br",null),"- Keep the programmer on the pattern that you think they are on.",vscpp("br",null),"- Consider what edits need to be made next, if any.",vscpp("br",null),vscpp("br",null),"When responding to the programmer, you must follow these rules:",vscpp("br",null),"- Only answer with the updated code. The programmer will copy and paste your code as is in place of the programmer's provided snippet.",vscpp("br",null),"- Match the expected response exactly, even if it includes errors or corruptions, to ensure consistency.",vscpp("br",null),"- Do not alter method signatures, add or remove return values, or modify existing logic unless explicitly instructed.",vscpp("br",null),"- You must ONLY reply using the tag: <",Gf,">.");case"v2":return vscpp(vscppf,null,"The programmer will provide you with a set of recently viewed files, their recent edits, and a snippet of code that is being actively edited.",vscpp("br",null),vscpp("br",null),"When helping the programmer, your goals are:",vscpp("br",null),"- Keep the programmer on the pattern that you think they are on.",vscpp("br",null),"- Consider what edits need to be made next, if any.",vscpp("br",null),"- Ensure that all necessary conditional logic and key-value pairs are preserved in the updated code.",vscpp("br",null),vscpp("br",null),"When responding to the programmer, you must follow these rules:",vscpp("br",null),"- Only answer with the updated code. The programmer will copy and paste your code as is in place of the programmer's provided snippet.",vscpp("br",null),"- Avoid introducing unnecessary variables or methods that are not part of the original code structure.",vscpp("br",null),"- You must ONLY reply using the tag: <",Gf,">.",vscpp("br",null),"- Provide a complete and functional code snippet without placeholders or incomplete sections unless explicitly required.");default:return vscpp(vscppf,null,"The programmer will provide you with a set of recently viewed files, their recent edits, and a snippet of code that is currently edited.",vscpp("br",null),vscpp("br",null),"When helping the programmer, your goals are:",vscpp("br",null),"- Keep the programmer on the pattern that you think they are on. Some examples are:",vscpp("br",null),"- Further implementing a class, method, or variable.",vscpp("br",null),"- Improving quality of the code.",vscpp("br",null),"- Making sure the programmer does not get distracted - make sure the next changes are relevant.",vscpp("br",null),"- Consider what edits need to be made next, if any.",vscpp("br",null),"- If you think changes should be made, ask yourself if this is really what needs to happen. If you are confident about it, then continue with the edits.",vscpp("br",null),vscpp("br",null),"When responding to the programmer, you must follow these rules:",vscpp("br",null),"- Only answer with the updated code. The programmer will copy and paste your code as is in place of the programmer's provided snippet.",vscpp("br",null),"- You must ONLY reply using the tag: <",Gf,">.:",vscpp("br",null),"- If you see further edits to make to the programmer's code, you must provide the updated code in the <",Gf,"> tag.:",vscpp("br",null),"- If the programmer's code is already correct and requires no further edits, simply answer with <",Gf,">IDENTICAL</",Gf,">.",vscpp("br",null),"- Make sure that the indentation level of any new code is correct and consistent with the existing code.",vscpp("br",null),vscpp("br",null),"Remember, you must ONLY respond using the tag: <",Gf,">.")}}},RH=class extends hl.PromptMetadata{static{s(this,"EditWindowMarkerMetadata")}},kH=class extends hl.PromptElement{static{s(this,"OriginalDocument")}async render(t,r){let{doc:n}=this.props,i=[];for(let o=0;o<n.documentLinesBeforeEdit.length;o++){let a=n.documentLinesBeforeEdit[o];i.push(`${n.clippingRange.startLineNumber+o}\u2502${a}`)}return vscpp(vscppf,null,n.getDisplayPath(),":",vscpp("br",null),i.join(`
`))}},BH=class extends hl.PromptElement{static{s(this,"DocumentDiffs")}async render(t,r){let{doc:n}=this.props,i=[];return i.push("```"),i.push(`---${n.getDisplayPath()}:`),i.push(`+++${n.getDisplayPath()}:`),i.push(...fMe(n)),i.push("```"),vscpp(vscppf,null,i.join(`
`))}},DH=class extends hl.PromptMetadata{constructor(r){super();this.prediction=r}static{s(this,"PredictionMetadata")}};d();d();function kMe(e,t){let r=[];for(let[n,i]of e.entries())i===t&&r.push(n);return r}s(kMe,"findIndexes");function E_t(e,t,r,n=10){if(t.length===0)return t;let i=[...t],o=t.length-1;for(;o>=0&&t[o].trim()==="";)o--;if(o<0)return t;let a=kMe(r,t[o]).slice(0,n);for(let m of a){let h=!1,p=o;for(;p>=0&&m>=0;){let g=t[p],y=r[m];if(g===y)p--,m--;else if(y.trim()==="")m--;else{h=!0;break}}if(!h&&m===-1&&p!==t.length-1){t=t.slice(0,p+1);break}else t=[...i]}if(!t.length)return t;let l=0;for(;t.length&&t[l].trim()==="";)l++;let c=[...t],f=kMe(e,t[l]).slice(-n).reverse();for(let m of f){let h=!1,p=l;for(;p<t.length&&m<e.length;){let g=t[p],y=e[m];if(g===y)p++,m++;else if(y.trim()==="")m++;else{h=!0;break}}if(!h&&m===e.length&&p!==0){t=t.slice(p);break}else t=[...c]}return t}s(E_t,"deduplicateEditRegion");function BMe(e,t,r){let n=e.getLines(),i=n.slice(0,t[0]),o=n.slice(t[1]+1);return{updatedEditWindow:E_t(i,r.split(/\r?\n/),o).join(`
`)}}s(BMe,"postProcessUpdatedEditWindow");d();var v0e={id:"xtab-274-2-full-ft",name:"xtab-4o-mini-finetuned"};d();var PH=Ze(Gh());function DMe(e){return e?typeof e=="string"?e:Array.isArray(e)?e.map(t=>t.type===PH.Raw.ChatCompletionContentPartKind.Text?t.text:"").join(""):e.type===PH.Raw.ChatCompletionContentPartKind.Text?e.text:"":""}s(DMe,"getTextPart");function I_t(e){return{type:PH.Raw.ChatCompletionContentPartKind.Text,text:e}}s(I_t,"toTextPart");function b0e(e){return[I_t(e)]}s(b0e,"toTextParts");d();var NH=qf("IDiffService");var _0e=Ze(Gh());d();var LH="<|cursor|>",zb="<|code_to_edit|>",Y9="<|/code_to_edit|>",NMe="<|area_around_code_to_edit|>",LMe="<|/area_around_code_to_edit|>",T_t="<|current_file_content|>",w_t="<|/current_file_content|>",__t="<|edit_diff_history|>",S_t="<|/edit_diff_history|>",R_t="<|recently_viewed_code_snippets|>",k_t="<|/recently_viewed_code_snippets|>",B_t="<|recently_viewed_code_snippet|>",D_t="<|/recently_viewed_code_snippet|>",FMe=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the ${zb} and ${Y9} tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
You have access to the following information to help you make informed suggestions:
- recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest, with line numbers in the form #| to help you understand the edit diff history. It's possible these are entirely irrelevant to the developer's change.
- current_file_content: The content of the file the developer is currently working on, providing the broader context of the code. Line numbers in the form #| are included to help you understand the edit diff history.
- edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
- area_around_code_to_edit: The context showing the code surrounding the section to be edited.
- cursor position marked as ${LH}: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
Your task is to predict and complete the changes the developer would have made next in the ${zb} section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
# Steps
1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
# Output Format
- Provide only the revised code within the tags. If no changes are necessary, simply return the original code from within the ${zb} and ${Y9} tags.
- There are line numbers in the form #| in the code displayed to you above, but these are just for your reference. Please do not include the numbers of the form #| in your response.
- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the ${zb} or ${Y9} tags.
\`\`\`
// Your revised code goes here
\`\`\`
# Notes
- Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.
- Don't include the line numbers of the form #| in your response.`;function MMe(e,t,r,n){let i=e.getActiveDocument(),o=L_t(e,n),a=P_t(e,n,2e3),l=i.workspaceRoot===void 0?i.id.path:i.id.path.startsWith(i.workspaceRoot.path)?i.id.path.substring(i.workspaceRoot.path.length+1):i.id.path;return`
\`\`\`
${R_t}
${o}
${k_t}
${T_t}
current_file_path: ${l}
${t}
${w_t}
${__t}
${a}
${S_t}
${r}
\`\`\`
The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${l}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${LH}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${zb}\` and \`${Y9}\` tags with the following format, but do not include the tags themselves.
\`\`\`
// Your revised code goes here
\`\`\`
`.trim()}s(MMe,"getUserPrompt");function P_t(e,t,r){let n=[];for(let a of e.xtabEditHistory.reverse()){let l=N_t(a);if(l===null)continue;let c=t(l);if(r-=c,r<0)break;n.push(l)}let i=n.reverse(),o=i.join(`
`);return i.length>0&&(o+=`
`),o}s(P_t,"getEditDiffHistory");function N_t(e){let t=[],r=Fo.fromEdit(e.edit);for(let i of r.edits){let o=e.edit.base.getLines().slice(i.lineRange.startLineNumber-1,i.lineRange.endLineNumberExclusive-1),a=i.newLines;if(o.filter(c=>c.trim().length>0).length===0&&a.filter(c=>c.trim().length>0).length===0)continue;let l=i.lineRange.startLineNumber-1;t.push(`@@ -${l},${o.length} +${l},${a.length} @@`),t.push(...o.map(c=>`-${c}`)),t.push(...a.map(c=>`+${c}`))}return t.length===0?null:[`--- ${e.docId.path}`,`+++ ${e.docId.path}`,...t].join(`
`)}s(N_t,"generateDocDiff");function PMe(e,t,r=!1){let n=r?`code_snippet_file_path: ${e} (truncated)`:`code_snippet_file_path: ${e}`;return[B_t,n,t,D_t].join(`
`)}s(PMe,"formatCodeSnippet");function L_t(e,t,r=2e3,n=!1){r=r||Number.POSITIVE_INFINITY;let i=e.getActiveDocument(),a=e.documents.filter(u=>u.id!==i.id).map(u=>({path:u.id.path,content:u.documentAfterEdits.value})),l=[],c=0;for(let u=a.length-1;u>=0;u--){let f=a[u],m=f.content.split(/\r?\n/);n&&(m=m.map((x,b)=>`${b+1}|${x}`));let h=m.map(x=>t(x)+1),p=t(PMe(f.path,"",!0)),g=h.reduce((x,b)=>x+b,0)+p,y=!1;for(;m.length>0&&c+g>r;)m.pop(),g-=h.pop()||0,y=!0;m.length>0&&(c+=g,l.push(PMe(f.path,m.join(`
`),y)))}return l.join(`
`)}s(L_t,"getRecentCodeSnippets");function E0e(e,t,r){if(!e.length)return[0,0];let n=r*4,i=0,o=t?e.length-1:0;for(;i<n;)if(i+=e[o].length+1,t){if(o--,o<0)break}else if(o++,o>=e.length)break;return t?[o+1,e.length]:[0,o]}s(E0e,"truncateCode");var QMe=2,OMe=10,I0e=15,T0e=1e3,w0e=2e3;var Jg=class extends O9{constructor(r,n){super(Jg.ID,[i=>new j9(i),i=>new q9(i),i=>new W9(i)]);this.diffService=r;this._chatMLFetcher=n;this.documentShorteningStrategy="noShortening";this.dependsOnSelection=!0;this.showNextEditPreference="always"}static{s(this,"XtabProvider")}static{this.ID="XtabProvider"}static{this.DEBOUNCE_MS=200}async provideNextEditBase(r,n){let i=new r3(r);try{if(r.xtabEditHistory.length===0)return Si.noEdit({kind:"activeDocumentHasNoEdits"},i);let o=await this.doGetNextEdit(r,n,i);return new Si(o,i.build(o))}catch(o){return Si.noEdit({kind:"unexpected",error:$b(o)},i)}}async doGetNextEdit(r,n,i){let o=r.getActiveDocument(),a=Wb(o);if(a===null)return Oo.error({kind:"uncategorized",error:$b(new Error("NoSelection"))});let l=s(K=>Math.floor(K.length/4),"computeTokens"),c=new mn(a.endLineNumber,a.endColumn),u=o.documentAfterEdits.getTransformer().getOffset(c),f=o.documentAfterEdits.value,m=f.substring(0,u)+LH+f.substring(u),h=c.lineNumber-1,p=m.split(/\r?\n/),g=Math.max(0,h-I0e),y=Math.min(p.length,h+I0e+1),x=QMe,b=OMe,E=Math.max(0,h-x),_=Math.min(p.length,h+b+1),k=o.documentAfterEdits.getTransformer().getOffsetRange(new yr(E,0,_,0)),B;B=f.split(/\r?\n/).slice(E,_);let N=[E,_],M=p.slice(E,_),Z=[NMe,...p.slice(g,E),zb,...M,Y9,...p.slice(_,y),LMe].join(`
`),he=Z,ee;{let K=l(Z),ae=0;if(K>=w0e)ee=Z,ae=g;else{let re=Math.floor((w0e-K)/2),[le]=E0e(p.slice(0,g),!0,re),[,ce]=E0e(p.slice(y),!1,re);ae=Math.max(le,h-T0e);let De=Math.min(ce+y,h+T0e+1);ee=[...p.slice(ae,g),Z,...p.slice(y,De)].join(`
`)}}let G=MMe(r,ee,he,l),q=[{role:_0e.Raw.ChatRole.System,content:b0e(FMe)},{role:_0e.Raw.ChatRole.User,content:b0e(G)}];if(i.setPrompt(q),await this.debounce(i),n.isCancellationRequested)return Oo.error({kind:"gotCancelled",message:"afterDebounce"});r.fetchIssued=!0;let ie=new r6,z,j=await this._chatMLFetcher.fetchOne(Jk(q),async(K,ae,re)=>{z===void 0&&(z=ie.elapsed())},{id:v0e.id,name:v0e.name},{temperature:0},n);if(j.type==="canceled")return Oo.error({kind:"gotCancelled",message:"afterFetchCall"});if(j.type!=="success")return Oo.error({kind:"fetchFailure",error:$b(j)});z&&i.setTtft(z),i.setResponse(j.value);let U=Jg.getBacktickSection(j.value);return await this.generateReturnEditFormat(o,k,B.join(`
`),U,N,i)}async generateReturnEditFormat(r,n,i,o,a,l){let{updatedEditWindow:c}=BMe(r.documentAfterEdits,a,o),u=await this.diffService.computeDiff(i,c,{ignoreTrimWhitespace:!1,maxComputationTimeMs:0,computeMoves:!1}),f=c.split(/\r?\n/),m=u.changes.map(h=>new Oh(new Cr(a[0]+h.original.startLineNumber,a[0]+h.original.endLineNumberExclusive),f.slice(h.modified.startLineNumber-1,h.modified.endLineNumberExclusive-1)));return m.length<1?Oo.error({kind:"noSuggestions"}):Oo.ok({editWindow:n,edit:new Fo(m)})}static getBacktickSection(r){return r.replace(/^\`\`\`[a-zA-Z]*\r?\n/,"").replace(/(\r?\n)\`\`\`$/,"")}async debounce(r){let n=Date.now()-r.startTime,i=Math.max(0,Jg.DEBOUNCE_MS-n);r.setDebounceTime(i),await i2(i)}};Jg=f0([Vs(0,NH),Vs(1,zh)],Jg);d();var Xg=class{static{s(this,"ObservableWorkspace")}getDocument(t){return Promise.resolve(this.openDocuments.get().find(r=>r.id===t))}};var FH=class extends Cs{constructor(r,n,i,o,a,l){super();this.id=r;this.workspaceRoot=l;this.value=Ih(this,n),this.selection=Ih(this,i),this.languageId=Ih(this,o),this._register(_a(a))}static{s(this,"MutableObservableDocument")}applyEdit(r,n=void 0){let i=this.value.get().apply(r);this.value.set(i,n,r)}updateSelection(r,n=void 0){this.selection.set(r,n)}};d();var MH=class e extends Cs{constructor(r,n=e.MAX_HISTORY_SIZE){super();this.maxHistorySize=n;this.idToEntry=new Map,this.history=new OS,If(this,r.openDocuments,(i,o)=>{o.add(Ag(this,{rootedEdits:i.value},a=>{if(a.rootedEdits.changes.length<1||a.rootedEdits.previous===void 0)return;Pl(a.rootedEdits.changes.length===1,`Expected 1 edit change but got ${a.rootedEdits.changes.length}`);let l=a.rootedEdits.changes[0];if(l.edits.length===0)return;let c=this.idToEntry.get(i.id),u=a.rootedEdits.previous,f=new Yc(u,l);if(c===void 0){this.pushToHistory(i.id,f);return}let m=c.entry.edit,h=Fo.fromEdit(m),p=Fo.fromEdit(f);if(!p.isEmpty()&&!h.isEmpty()&&h.edits[0].lineRange.startLineNumber===p.edits[0].lineRange.startLineNumber){c.removeFromHistory();let g=m.edit.compose(l),y=new Yc(m.base,g);this.pushToHistory(i.id,y)}else this.pushToHistory(i.id,f)}))},i=>i.id).recomputeInitiallyAndOnChange(this._store)}static{s(this,"NesXtabHistoryTracker")}static{this.MAX_HISTORY_SIZE=50}getHistory(){return[...this.history]}pushToHistory(r,n){let i={docId:r,edit:n},o=this.history.push(i);if(this.idToEntry.set(r,{entry:i,removeFromHistory:o}),this.history.size>this.maxHistorySize){let a=this.history.shift();if(a!==void 0){let l=this.idToEntry.get(a.docId);l!==void 0&&a===l.entry&&this.idToEntry.delete(a.docId)}}}};d();d();d();d();var S0e=class e{constructor(t){this.edits=t;I0(()=>eC(t,(r,n)=>r.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}static{s(this,"TextEdit")}static fromOffsetEdit(t,r){let n=t.edits.map(i=>new Zg(r.getTransformer().getRange(i.replaceRange),i.newText));return new e(n)}static single(t,r){return new e([new Zg(t,r)])}static insert(t,r){return new e([new Zg(yr.fromPositions(t,t),r)])}normalize(){let t=[];for(let r of this.edits)if(t.length>0&&t[t.length-1].range.getEndPosition().equals(r.range.getStartPosition())){let n=t[t.length-1];t[t.length-1]=new Zg(n.range.plusRange(r.range),n.text+r.text)}else r.isEmpty||t.push(r);return new e(t)}mapPosition(t){let r=0,n=0,i=0;for(let o of this.edits){let a=o.range.getStartPosition();if(t.isBeforeOrEqual(a))break;let l=o.range.getEndPosition(),c=Gl.ofText(o.text);if(t.isBefore(l)){let u=new mn(a.lineNumber+r,a.column+(a.lineNumber+r===n?i:0)),f=c.addToPosition(u);return QH(u,f)}a.lineNumber+r!==n&&(i=0),r+=c.lineCount-(o.range.endLineNumber-o.range.startLineNumber),c.lineCount===0?l.lineNumber!==a.lineNumber?i+=c.columnCount-(l.column-1):i+=c.columnCount-(l.column-a.column):i=c.columnCount,n=l.lineNumber+r}return new mn(t.lineNumber+r,t.column+(t.lineNumber+r===n?i:0))}mapRange(t){function r(a){return a instanceof mn?a:a.getStartPosition()}s(r,"getStart");function n(a){return a instanceof mn?a:a.getEndPosition()}s(n,"getEnd");let i=r(this.mapPosition(t.getStartPosition())),o=n(this.mapPosition(t.getEndPosition()));return QH(i,o)}inverseMapPosition(t,r){return this.inverse(r).mapPosition(t)}inverseMapRange(t,r){return this.inverse(r).mapRange(t)}apply(t){let r="",n=new mn(1,1);for(let o of this.edits){let a=o.range,l=a.getStartPosition(),c=a.getEndPosition(),u=QH(n,l);u.isEmpty()||(r+=t.getValueOfRange(u)),r+=o.text,n=c}let i=QH(n,t.endPositionExclusive);return i.isEmpty()||(r+=t.getValueOfRange(i)),r}applyToString(t){let r=new k0e(t);return this.apply(r)}inverse(t){let r=this.getNewRanges();return new e(this.edits.map((n,i)=>new Zg(r[i],t.getValueOfRange(n.range))))}getNewRanges(){let t=[],r=0,n=0,i=0;for(let o of this.edits){let a=Gl.ofText(o.text),l=mn.lift({lineNumber:o.range.startLineNumber+n,column:o.range.startColumn+(o.range.startLineNumber===r?i:0)}),c=a.createRange(l);t.push(c),n=c.endLineNumber-o.range.endLineNumber,i=c.endColumn-o.range.endColumn,r=o.range.endLineNumber}return t}toSingle(t){if(this.edits.length===0)throw new vn;if(this.edits.length===1)return this.edits[0];let r=this.edits[0].range.getStartPosition(),n=this.edits[this.edits.length-1].range.getEndPosition(),i="";for(let o=0;o<this.edits.length;o++){let a=this.edits[o];if(i+=a.text,o<this.edits.length-1){let l=this.edits[o+1],c=yr.fromPositions(a.range.getEndPosition(),l.range.getStartPosition()),u=t.getValueOfRange(c);i+=u}}return new Zg(yr.fromPositions(r,n),i)}equals(t){return Qv(this.edits,t.edits,(r,n)=>r.equals(n))}},Zg=class e{constructor(t,r){this.range=t;this.text=r}static{s(this,"SingleTextEdit")}static joinEdits(t,r){if(t.length===0)throw new vn;if(t.length===1)return t[0];let n=t[0].range.getStartPosition(),i=t[t.length-1].range.getEndPosition(),o="";for(let a=0;a<t.length;a++){let l=t[a];if(o+=l.text,a<t.length-1){let c=t[a+1],u=yr.fromPositions(l.range.getEndPosition(),c.range.getStartPosition()),f=r.getValueOfRange(u);o+=f}}return new e(yr.fromPositions(n,i),o)}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(t,r){return t.range.equalsRange(r.range)&&t.text===r.text}toSingleEditOperation(){return{range:this.range,text:this.text}}toEdit(){return new S0e([this])}equals(t){return e.equals(this,t)}extendToCoverRange(t,r){if(this.range.containsRange(t))return this;let n=this.range.plusRange(t),i=r.getValueOfRange(yr.fromPositions(n.getStartPosition(),this.range.getStartPosition())),o=r.getValueOfRange(yr.fromPositions(this.range.getEndPosition(),n.getEndPosition())),a=i+this.text+o;return new e(n,a)}extendToFullLine(t){let r=new yr(this.range.startLineNumber,1,this.range.endLineNumber,t.getTransformer().getLineLength(this.range.endLineNumber)+1);return this.extendToCoverRange(r,t)}removeCommonPrefix(t){let r=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),n=this.text.replaceAll(`\r
`,`
`),i=qS(r,n),o=Gl.ofText(r.substring(0,i)).addToPosition(this.range.getStartPosition()),a=n.substring(i),l=yr.fromPositions(o,this.range.getEndPosition());return new e(l,a)}isEffectiveDeletion(t){let r=this.text.replaceAll(`\r
`,`
`),n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),i=qS(r,n);r=r.substring(i),n=n.substring(i);let o=s6(r,n);return r=r.substring(0,r.length-o),n=n.substring(0,n.length-o),r===""}};function QH(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return yr.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new vn("start must be before end");return new yr(e.lineNumber,e.column,t.lineNumber,t.column)}s(QH,"rangeFromPositions");var OH=class{constructor(){this._transformer=void 0}static{s(this,"AbstractText")}get endPositionExclusive(){return this.length.addToPosition(new mn(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getLineLength(t){return this.getValueOfRange(new yr(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Gb(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new yr(t,1,t,Number.MAX_SAFE_INTEGER))}getLines(){let t=this.getValue();return gg(t)}},R0e=class extends OH{constructor(r,n){Pl(n>=1);super();this._getLineContent=r;this._lineCount=n}static{s(this,"LineBasedText")}getValueOfRange(r){if(r.startLineNumber===r.endLineNumber)return this._getLineContent(r.startLineNumber).substring(r.startColumn-1,r.endColumn-1);let n=this._getLineContent(r.startLineNumber).substring(r.startColumn-1);for(let i=r.startLineNumber+1;i<r.endLineNumber;i++)n+=`
`+this._getLineContent(i);return n+=`
`+this._getLineContent(r.endLineNumber).substring(0,r.endColumn-1),n}getLineLength(r){return this._getLineContent(r).length}get length(){let r=this._getLineContent(this._lineCount);return new Gl(this._lineCount-1,r.length)}},Yb=class extends R0e{static{s(this,"ArrayText")}constructor(t){super(r=>t[r-1],t.length)}},k0e=class extends OH{constructor(r){super();this.value=r;this._t=new Gb(this.value)}static{s(this,"StringText")}getValueOfRange(r){return this._t.getOffsetRange(r).substring(this.value)}get length(){return this._t.textLength}};d();var K9=class{constructor(t,r,n){this.changes=t;this.moves=r;this.hitTimeout=n}static{s(this,"LinesDiff")}},J9=class e{static{s(this,"MovedText")}constructor(t,r){this.lineRangeMapping=t,this.changes=r}flip(){return new e(this.lineRangeMapping.flip(),this.changes.map(t=>t.flip()))}};d();var mm=class e{static{s(this,"LineRangeMapping")}static inverse(t,r,n){let i=[],o=1,a=1;for(let c of t){let u=new e(new Cr(o,c.original.startLineNumber),new Cr(a,c.modified.startLineNumber));u.modified.isEmpty||i.push(u),o=c.original.endLineNumberExclusive,a=c.modified.endLineNumberExclusive}let l=new e(new Cr(o,r+1),new Cr(a,n+1));return l.modified.isEmpty||i.push(l),i}static clip(t,r,n){let i=[];for(let o of t){let a=o.original.intersect(r),l=o.modified.intersect(n);a&&!a.isEmpty&&l&&!l.isEmpty&&i.push(new e(a,l))}return i}constructor(t,r){this.original=t,this.modified=r}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}get changedLineCount(){return Math.max(this.original.length,this.modified.length)}toRangeMapping(){let t=this.original.toInclusiveRange(),r=this.modified.toInclusiveRange();if(t&&r)return new ku(t,r);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new vn("not a valid diff");return new ku(new yr(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new yr(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new ku(new yr(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new yr(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,r){if(UMe(this.original.endLineNumberExclusive,t)&&UMe(this.modified.endLineNumberExclusive,r))return new ku(new yr(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new yr(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ku(yr.fromPositions(new mn(this.original.startLineNumber,1),X9(new mn(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),yr.fromPositions(new mn(this.modified.startLineNumber,1),X9(new mn(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ku(yr.fromPositions(X9(new mn(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),X9(new mn(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),yr.fromPositions(X9(new mn(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),r),X9(new mn(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));throw new vn}};function X9(e,t){if(e.lineNumber<1)return new mn(1,1);if(e.lineNumber>t.length)return new mn(t.length,t[t.length-1].length+1);let r=t[e.lineNumber-1];return e.column>r.length+1?new mn(e.lineNumber,r.length+1):e}s(X9,"normalizePosition");function UMe(e,t){return e>=1&&e<=t.length}s(UMe,"isValidLineNumber");var l3=class e extends mm{static{s(this,"DetailedLineRangeMapping")}static fromRangeMappings(t){let r=Cr.join(t.map(i=>Cr.fromRangeInclusive(i.originalRange))),n=Cr.join(t.map(i=>Cr.fromRangeInclusive(i.modifiedRange)));return new e(r,n,t)}constructor(t,r,n){super(t,r),this.innerChanges=n}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},ku=class e{static{s(this,"RangeMapping")}static fromEdit(t){let r=t.getNewRanges();return t.edits.map((i,o)=>new e(i.range,r[o]))}static fromEditJoin(t){let r=t.getNewRanges(),n=t.edits.map((i,o)=>new e(i.range,r[o]));return e.join(n)}static join(t){if(t.length===0)throw new vn("Cannot join an empty list of range mappings");let r=t[0];for(let n=1;n<t.length;n++)r=r.join(t[n]);return r}static assertSorted(t){for(let r=1;r<t.length;r++){let n=t[r-1],i=t[r];if(!(n.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&n.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new vn("Range mappings must be sorted")}}constructor(t,r){this.originalRange=t,this.modifiedRange=r}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let r=t.getValueOfRange(this.modifiedRange);return new Zg(this.originalRange,r)}join(t){return new e(this.originalRange.plusRange(t.originalRange),this.modifiedRange.plusRange(t.modifiedRange))}};function B0e(e,t,r,n=!1){let i=[];for(let o of J8(e.map(a=>M_t(a,t,r)),(a,l)=>a.original.overlapOrTouch(l.original)||a.modified.overlapOrTouch(l.modified))){let a=o[0],l=o[o.length-1];i.push(new l3(a.original.join(l.original),a.modified.join(l.modified),o.map(c=>c.innerChanges[0])))}return I0(()=>!n&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||r.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==t.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:eC(i,(o,a)=>a.original.startLineNumber-o.original.endLineNumberExclusive===a.modified.startLineNumber-o.modified.endLineNumberExclusive&&o.original.endLineNumberExclusive<a.original.startLineNumber&&o.modified.endLineNumberExclusive<a.modified.startLineNumber)),i}s(B0e,"lineRangeMappingFromRangeMappings");function M_t(e,t,r){let n=0,i=0;e.modifiedRange.endColumn===1&&e.originalRange.endColumn===1&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(i=-1),e.modifiedRange.startColumn-1>=r.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(n=1);let o=new Cr(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+i),a=new Cr(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+i);return new l3(o,a,[e])}s(M_t,"getLineRangeMapping");d();var t1=class e{constructor(t,r){this.diffs=t;this.hitTimeout=r}static{s(this,"DiffAlgorithmResult")}static trivial(t,r){return new e([new $o(Vt.ofLength(t.length),Vt.ofLength(r.length))],!1)}static trivialTimedOut(t,r){return new e([new $o(Vt.ofLength(t.length),Vt.ofLength(r.length))],!0)}},$o=class e{constructor(t,r){this.seq1Range=t;this.seq2Range=r}static{s(this,"SequenceDiff")}static invert(t,r){let n=[];return C6e(t,(i,o)=>{n.push(e.fromOffsetPairs(i?i.getEndExclusives():e1.zero,o?o.getStarts():new e1(r,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+r)))}),n}static fromOffsetPairs(t,r){return new e(new Vt(t.offset1,r.offset1),new Vt(t.offset2,r.offset2))}static assertSorted(t){let r;for(let n of t){if(r&&!(r.seq1Range.endExclusive<=n.seq1Range.start&&r.seq2Range.endExclusive<=n.seq2Range.start))throw new vn("Sequence diffs must be sorted");r=n}}swap(){return new e(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersectsOrTouches(t){return this.seq1Range.intersectsOrTouches(t.seq1Range)||this.seq2Range.intersectsOrTouches(t.seq2Range)}intersect(t){let r=this.seq1Range.intersect(t.seq1Range),n=this.seq2Range.intersect(t.seq2Range);if(!(!r||!n))return new e(r,n)}getStarts(){return new e1(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new e1(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},e1=class e{constructor(t,r){this.offset1=t;this.offset2=r}static{s(this,"OffsetPair")}static{this.zero=new e(0,0)}static{this.max=new e(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new e(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},c3=class e{static{s(this,"InfiniteTimeout")}static{this.instance=new e}isValid(){return!0}},UH=class{constructor(t){this.timeout=t;this.startTime=Date.now();this.valid=!0;if(t<=0)throw new vn("timeout must be positive")}static{s(this,"DateTimeout")}isValid(){return!(Date.now()-this.startTime<this.timeout)&&this.valid&&(this.valid=!1),this.valid}disable(){this.timeout=Number.MAX_SAFE_INTEGER,this.isValid=()=>!0,this.valid=!0}};d();d();var Z9=class{constructor(t,r){this.width=t;this.height=r;this.array=[];this.array=new Array(t*r)}static{s(this,"Array2D")}get(t,r){return this.array[t+r*this.width]}set(t,r,n){this.array[t+r*this.width]=n}};function Zk(e){return e===32||e===9}s(Zk,"isSpace");var Xk=class e{constructor(t,r,n){this.range=t;this.lines=r;this.source=n;this.histogram=[];let i=0;for(let o=t.startLineNumber-1;o<t.endLineNumberExclusive-1;o++){let a=r[o];for(let c=0;c<a.length;c++){i++;let u=a[c],f=e.getKey(u);this.histogram[f]=(this.histogram[f]||0)+1}i++;let l=e.getKey(`
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=i}static{s(this,"LineRangeFragment")}static{this.chrKeys=new Map}static getKey(t){let r=this.chrKeys.get(t);return r===void 0&&(r=this.chrKeys.size,this.chrKeys.set(t,r)),r}computeSimilarity(t){let r=0,n=Math.max(this.histogram.length,t.histogram.length);for(let i=0;i<n;i++)r+=Math.abs((this.histogram[i]??0)-(t.histogram[i]??0));return 1-r/(this.totalCount+t.totalCount)}};var qH=class{static{s(this,"DynamicProgrammingDiffing")}compute(t,r,n=c3.instance,i){if(t.length===0||r.length===0)return t1.trivial(t,r);let o=new Z9(t.length,r.length),a=new Z9(t.length,r.length),l=new Z9(t.length,r.length);for(let g=0;g<t.length;g++)for(let y=0;y<r.length;y++){if(!n.isValid())return t1.trivialTimedOut(t,r);let x=g===0?0:o.get(g-1,y),b=y===0?0:o.get(g,y-1),E;t.getElement(g)===r.getElement(y)?(g===0||y===0?E=0:E=o.get(g-1,y-1),g>0&&y>0&&a.get(g-1,y-1)===3&&(E+=l.get(g-1,y-1)),E+=i?i(g,y):1):E=-1;let _=Math.max(x,b,E);if(_===E){let k=g>0&&y>0?l.get(g-1,y-1):0;l.set(g,y,k+1),a.set(g,y,3)}else _===x?(l.set(g,y,0),a.set(g,y,1)):_===b&&(l.set(g,y,0),a.set(g,y,2));o.set(g,y,_)}let c=[],u=t.length,f=r.length;function m(g,y){(g+1!==u||y+1!==f)&&c.push(new $o(new Vt(g+1,u),new Vt(y+1,f))),u=g,f=y}s(m,"reportDecreasingAligningPositions");let h=t.length-1,p=r.length-1;for(;h>=0&&p>=0;)a.get(h,p)===3?(m(h,p),h--,p--):a.get(h,p)===1?h--:p--;return m(-1,-1),c.reverse(),new t1(c,!1)}};d();var eT=class{static{s(this,"MyersDiffAlgorithm")}compute(t,r,n=c3.instance){if(t.length===0||r.length===0)return t1.trivial(t,r);let i=t,o=r;function a(y,x){for(;y<i.length&&x<o.length&&i.getElement(y)===o.getElement(x);)y++,x++;return y}s(a,"getXAfterSnake");let l=0,c=new D0e;c.set(0,a(0,0));let u=new P0e;u.set(0,c.get(0)===0?null:new WH(null,0,0,c.get(0)));let f=0;e:for(;;){if(l++,!n.isValid())return t1.trivialTimedOut(i,o);let y=-Math.min(l,o.length+l%2),x=Math.min(l,i.length+l%2);for(f=y;f<=x;f+=2){let b=0,E=f===x?-1:c.get(f+1),_=f===y?-1:c.get(f-1)+1;b++;let k=Math.min(Math.max(E,_),i.length),B=k-f;if(b++,k>i.length||B>o.length)continue;let N=a(k,B);c.set(f,N);let M=k===E?u.get(f+1):u.get(f-1);if(u.set(f,N!==k?new WH(M,k,B,N-k):M),c.get(f)===i.length&&c.get(f)-f===o.length)break e}}let m=u.get(f),h=[],p=i.length,g=o.length;for(;;){let y=m?m.x+m.length:0,x=m?m.y+m.length:0;if((y!==p||x!==g)&&h.push(new $o(new Vt(y,p),new Vt(x,g))),!m)break;p=m.x,g=m.y,m=m.prev}return h.reverse(),new t1(h,!1)}},WH=class{constructor(t,r,n,i){this.prev=t;this.x=r;this.y=n;this.length=i}static{s(this,"SnakePath")}},D0e=class{constructor(){this.positiveArr=new Int32Array(10);this.negativeArr=new Int32Array(10)}static{s(this,"FastInt32Array")}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,r){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[t]=r}else{if(t>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[t]=r}}},P0e=class{constructor(){this.positiveArr=[];this.negativeArr=[]}static{s(this,"FastArrayNegativeIndices")}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,r){t<0?(t=-t-1,this.negativeArr[t]=r):this.positiveArr[t]=r}};d();d();var u3=class{constructor(t,r,n){this.lines=t;this.range=r;this.considerWhitespaceChanges=n;this.elements=[];this.firstElementOffsetByLineIdx=[];this.lineStartOffsets=[];this.trimmedWsLengthsByLineIdx=[];this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let o=t[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,o=o.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!n){let u=o.trimStart();l=o.length-u.length,o=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);let c=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,o.length):o.length;for(let u=0;u<c;u++)this.elements.push(o.charCodeAt(u));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}static{s(this,"LinesSliceCharSequence")}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new Vt(0,this.length))}getText(t){return this.elements.slice(t.start,t.endExclusive).map(r=>String.fromCharCode(r)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let r=GMe(t>0?this.elements[t-1]:-1),n=GMe(t<this.elements.length?this.elements[t]:-1);if(r===7&&n===8)return 0;if(r===8)return 150;let i=0;return r!==n&&(i+=10,r===0&&n===1&&(i+=1)),i+=WMe(r),i+=WMe(n),i}translateOffset(t,r="right"){let n=xf(this.firstElementOffsetByLineIdx,o=>o<=t),i=t-this.firstElementOffsetByLineIdx[n];return new mn(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(i===0&&r==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(t){let r=this.translateOffset(t.start,"right"),n=this.translateOffset(t.endExclusive,"left");return n.isBefore(r)?yr.fromPositions(n,n):yr.fromPositions(r,n)}findWordContaining(t){if(t<0||t>=this.elements.length||!tT(this.elements[t]))return;let r=t;for(;r>0&&tT(this.elements[r-1]);)r--;let n=t;for(;n<this.elements.length&&tT(this.elements[n]);)n++;return new Vt(r,n)}findSubWordContaining(t){if(t<0||t>=this.elements.length||!tT(this.elements[t]))return;let r=t;for(;r>0&&tT(this.elements[r-1])&&!qMe(this.elements[r]);)r--;let n=t;for(;n<this.elements.length&&tT(this.elements[n])&&!qMe(this.elements[n]);)n++;return new Vt(r,n)}countLinesIn(t){return this.translateOffset(t.endExclusive).lineNumber-this.translateOffset(t.start).lineNumber}isStronglyEqual(t,r){return this.elements[t]===this.elements[r]}extendToFullLines(t){let r=_A(this.firstElementOffsetByLineIdx,i=>i<=t.start)??0,n=A6e(this.firstElementOffsetByLineIdx,i=>t.endExclusive<=i)??this.elements.length;return new Vt(r,n)}};function tT(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}s(tT,"isWordChar");function qMe(e){return e>=65&&e<=90}s(qMe,"isUpperCase");var Q_t={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function WMe(e){return Q_t[e]}s(WMe,"getCategoryBoundaryScore");function GMe(e){return e===10?8:e===13?7:Zk(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}s(GMe,"getCategory");function jMe(e,t,r,n,i,o){let{moves:a,excludedChanges:l}=U_t(e,t,r,o);if(!o.isValid())return[];let c=e.filter(f=>!l.has(f)),u=q_t(c,n,i,t,r,o);return b6e(a,u),a=W_t(a),a=a.filter(f=>{let m=f.original.toOffsetRange().slice(t).map(p=>p.trim());return m.join(`
`).length>=15&&O_t(m,p=>p.length>=2)>=2}),a=G_t(e,a),a}s(jMe,"computeMovedLines");function O_t(e,t){let r=0;for(let n of e)t(n)&&r++;return r}s(O_t,"countWhere");function U_t(e,t,r,n){let i=[],o=e.filter(c=>c.modified.isEmpty&&c.original.length>=3).map(c=>new Xk(c.original,t,c)),a=new Set(e.filter(c=>c.original.isEmpty&&c.modified.length>=3).map(c=>new Xk(c.modified,r,c))),l=new Set;for(let c of o){let u=-1,f;for(let m of a){let h=c.computeSimilarity(m);h>u&&(u=h,f=m)}if(u>.9&&f&&(a.delete(f),i.push(new mm(c.range,f.range)),l.add(c.source),l.add(f.source)),!n.isValid())return{moves:i,excludedChanges:l}}return{moves:i,excludedChanges:l}}s(U_t,"computeMovesFromSimpleDeletionsToSimpleInsertions");function q_t(e,t,r,n,i,o){let a=[],l=new X8;for(let h of e)for(let p=h.original.startLineNumber;p<h.original.endLineNumberExclusive-2;p++){let g=`${t[p-1]}:${t[p+1-1]}:${t[p+2-1]}`;l.add(g,{range:new Cr(p,p+3)})}let c=[];e.sort(vf(h=>h.modified.startLineNumber,bf));for(let h of e){let p=[];for(let g=h.modified.startLineNumber;g<h.modified.endLineNumberExclusive-2;g++){let y=`${r[g-1]}:${r[g+1-1]}:${r[g+2-1]}`,x=new Cr(g,g+3),b=[];l.forEach(y,({range:E})=>{for(let k of p)if(k.originalLineRange.endLineNumberExclusive+1===E.endLineNumberExclusive&&k.modifiedLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive){k.originalLineRange=new Cr(k.originalLineRange.startLineNumber,E.endLineNumberExclusive),k.modifiedLineRange=new Cr(k.modifiedLineRange.startLineNumber,x.endLineNumberExclusive),b.push(k);return}let _={modifiedLineRange:x,originalLineRange:E};c.push(_),b.push(_)}),p=b}if(!o.isValid())return[]}c.sort(I6e(vf(h=>h.modifiedLineRange.length,bf)));let u=new kb,f=new kb;for(let h of c){let p=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,g=u.subtractFrom(h.modifiedLineRange),y=f.subtractFrom(h.originalLineRange).getWithDelta(p),x=g.getIntersection(y);for(let b of x.ranges){if(b.length<3)continue;let E=b,_=b.delta(-p);a.push(new mm(_,E)),u.addRange(E),f.addRange(_)}}a.sort(vf(h=>h.original.startLineNumber,bf));let m=new QS(e);for(let h=0;h<a.length;h++){let p=a[h],g=m.findLastMonotonous(N=>N.original.startLineNumber<=p.original.startLineNumber),y=_A(e,N=>N.modified.startLineNumber<=p.modified.startLineNumber),x=Math.max(p.original.startLineNumber-g.original.startLineNumber,p.modified.startLineNumber-y.modified.startLineNumber),b=m.findLastMonotonous(N=>N.original.startLineNumber<p.original.endLineNumberExclusive),E=_A(e,N=>N.modified.startLineNumber<p.modified.endLineNumberExclusive),_=Math.max(b.original.endLineNumberExclusive-p.original.endLineNumberExclusive,E.modified.endLineNumberExclusive-p.modified.endLineNumberExclusive),k;for(k=0;k<x;k++){let N=p.original.startLineNumber-k-1,M=p.modified.startLineNumber-k-1;if(N>n.length||M>i.length||u.contains(M)||f.contains(N)||!HMe(n[N-1],i[M-1],o))break}k>0&&(f.addRange(new Cr(p.original.startLineNumber-k,p.original.startLineNumber)),u.addRange(new Cr(p.modified.startLineNumber-k,p.modified.startLineNumber)));let B;for(B=0;B<_;B++){let N=p.original.endLineNumberExclusive+B,M=p.modified.endLineNumberExclusive+B;if(N>n.length||M>i.length||u.contains(M)||f.contains(N)||!HMe(n[N-1],i[M-1],o))break}B>0&&(f.addRange(new Cr(p.original.endLineNumberExclusive,p.original.endLineNumberExclusive+B)),u.addRange(new Cr(p.modified.endLineNumberExclusive,p.modified.endLineNumberExclusive+B))),(k>0||B>0)&&(a[h]=new mm(new Cr(p.original.startLineNumber-k,p.original.endLineNumberExclusive+B),new Cr(p.modified.startLineNumber-k,p.modified.endLineNumberExclusive+B)))}return a}s(q_t,"computeUnchangedMoves");function HMe(e,t,r){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let i=new eT().compute(new u3([e],new yr(1,1,1,e.length),!1),new u3([t],new yr(1,1,1,t.length),!1),r),o=0,a=$o.invert(i.diffs,e.length);for(let f of a)f.seq1Range.forEach(m=>{Zk(e.charCodeAt(m))||o++});function l(f){let m=0;for(let h=0;h<e.length;h++)Zk(f.charCodeAt(h))||m++;return m}s(l,"countNonWsChars");let c=l(e.length>t.length?e:t);return o/c>.6&&c>10}s(HMe,"areLinesSimilar");function W_t(e){if(e.length===0)return e;e.sort(vf(r=>r.original.startLineNumber,bf));let t=[e[0]];for(let r=1;r<e.length;r++){let n=t[t.length-1],i=e[r],o=i.original.startLineNumber-n.original.endLineNumberExclusive,a=i.modified.startLineNumber-n.modified.endLineNumberExclusive;if(o>=0&&a>=0&&o+a<=2){t[t.length-1]=n.join(i);continue}t.push(i)}return t}s(W_t,"joinCloseConsecutiveMoves");function G_t(e,t){let r=new QS(e);return t=t.filter(n=>{let i=r.findLastMonotonous(l=>l.original.startLineNumber<n.original.endLineNumberExclusive)||new mm(new Cr(1,1),new Cr(1,1)),o=_A(e,l=>l.modified.startLineNumber<n.modified.endLineNumberExclusive);return i!==o}),t}s(G_t,"removeMovesInSameDiff");d();function N0e(e,t,r){let n=r;return n=VMe(e,t,n),n=VMe(e,t,n),n=H_t(e,t,n),n}s(N0e,"optimizeSequenceDiffs");function VMe(e,t,r){if(r.length===0)return r;let n=[];n.push(r[0]);for(let o=1;o<r.length;o++){let a=n[n.length-1],l=r[o];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){let c=l.seq1Range.start-a.seq1Range.endExclusive,u;for(u=1;u<=c&&!(e.getElement(l.seq1Range.start-u)!==e.getElement(l.seq1Range.endExclusive-u)||t.getElement(l.seq2Range.start-u)!==t.getElement(l.seq2Range.endExclusive-u));u++);if(u--,u===c){n[n.length-1]=new $o(new Vt(a.seq1Range.start,l.seq1Range.endExclusive-c),new Vt(a.seq2Range.start,l.seq2Range.endExclusive-c));continue}l=l.delta(-u)}n.push(l)}let i=[];for(let o=0;o<n.length-1;o++){let a=n[o+1],l=n[o];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){let c=a.seq1Range.start-l.seq1Range.endExclusive,u;for(u=0;u<c&&!(!e.isStronglyEqual(l.seq1Range.start+u,l.seq1Range.endExclusive+u)||!t.isStronglyEqual(l.seq2Range.start+u,l.seq2Range.endExclusive+u));u++);if(u===c){n[o+1]=new $o(new Vt(l.seq1Range.start+c,a.seq1Range.endExclusive),new Vt(l.seq2Range.start+c,a.seq2Range.endExclusive));continue}u>0&&(l=l.delta(u))}i.push(l)}return n.length>0&&i.push(n[n.length-1]),i}s(VMe,"joinSequenceDiffsByShifting");function H_t(e,t,r){if(!e.getBoundaryScore||!t.getBoundaryScore)return r;for(let n=0;n<r.length;n++){let i=n>0?r[n-1]:void 0,o=r[n],a=n+1<r.length?r[n+1]:void 0,l=new Vt(i?i.seq1Range.endExclusive+1:0,a?a.seq1Range.start-1:e.length),c=new Vt(i?i.seq2Range.endExclusive+1:0,a?a.seq2Range.start-1:t.length);o.seq1Range.isEmpty?r[n]=$Me(o,e,t,l,c):o.seq2Range.isEmpty&&(r[n]=$Me(o.swap(),t,e,c,l).swap())}return r}s(H_t,"shiftSequenceDiffs");function $Me(e,t,r,n,i){let a=1;for(;e.seq1Range.start-a>=n.start&&e.seq2Range.start-a>=i.start&&r.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let l=0;for(;e.seq1Range.start+l<n.endExclusive&&e.seq2Range.endExclusive+l<i.endExclusive&&r.isStronglyEqual(e.seq2Range.start+l,e.seq2Range.endExclusive+l)&&l<100;)l++;if(a===0&&l===0)return e;let c=0,u=-1;for(let f=-a;f<=l;f++){let m=e.seq2Range.start+f,h=e.seq2Range.endExclusive+f,p=e.seq1Range.start+f,g=t.getBoundaryScore(p)+r.getBoundaryScore(m)+r.getBoundaryScore(h);g>u&&(u=g,c=f)}return e.delta(c)}s($Me,"shiftDiffToBetterPosition");function zMe(e,t,r){let n=[];for(let i of r){let o=n[n.length-1];if(!o){n.push(i);continue}i.seq1Range.start-o.seq1Range.endExclusive<=2||i.seq2Range.start-o.seq2Range.endExclusive<=2?n[n.length-1]=new $o(o.seq1Range.join(i.seq1Range),o.seq2Range.join(i.seq2Range)):n.push(i)}return n}s(zMe,"removeShortMatches");function L0e(e,t,r,n,i=!1){let o=$o.invert(r,e.length),a=[],l=new e1(0,0);function c(f,m){if(f.offset1<l.offset1||f.offset2<l.offset2)return;let h=n(e,f.offset1),p=n(t,f.offset2);if(!h||!p)return;let g=new $o(h,p),y=g.intersect(m),x=y.seq1Range.length,b=y.seq2Range.length;for(;o.length>0;){let E=o[0];if(!(E.seq1Range.intersects(g.seq1Range)||E.seq2Range.intersects(g.seq2Range)))break;let k=n(e,E.seq1Range.start),B=n(t,E.seq2Range.start),N=new $o(k,B),M=N.intersect(E);if(x+=M.seq1Range.length,b+=M.seq2Range.length,g=g.join(N),g.seq1Range.endExclusive>=E.seq1Range.endExclusive)o.shift();else break}(i&&x+b<g.seq1Range.length+g.seq2Range.length||x+b<(g.seq1Range.length+g.seq2Range.length)*2/3)&&a.push(g),l=g.getEndExclusives()}for(s(c,"scanWord");o.length>0;){let f=o.shift();f.seq1Range.isEmpty||(c(f.getStarts(),f),c(f.getEndExclusives().delta(-1),f))}return j_t(r,a)}s(L0e,"extendDiffsToEntireWordIfAppropriate");function j_t(e,t){let r=[];for(;e.length>0||t.length>0;){let n=e[0],i=t[0],o;n&&(!i||n.seq1Range.start<i.seq1Range.start)?o=e.shift():o=t.shift(),r.length>0&&r[r.length-1].seq1Range.endExclusive>=o.seq1Range.start?r[r.length-1]=r[r.length-1].join(o):r.push(o)}return r}s(j_t,"mergeSequenceDiffs");function YMe(e,t,r){let n=r;if(n.length===0)return n;let i=0,o;do{o=!1;let l=[n[0]];for(let c=1;c<n.length;c++){let m=function(p,g){let y=new Vt(f.seq1Range.endExclusive,u.seq1Range.start);return e.getText(y).replace(/\s/g,"").length<=4&&(p.seq1Range.length+p.seq2Range.length>5||g.seq1Range.length+g.seq2Range.length>5)};var a=m;s(m,"shouldJoinDiffs");let u=n[c],f=l[l.length-1];m(f,u)?(o=!0,l[l.length-1]=l[l.length-1].join(u)):l.push(u)}n=l}while(i++<10&&o);return n}s(YMe,"removeVeryShortMatchingLinesBetweenDiffs");function KMe(e,t,r){let n=r;if(n.length===0)return n;let i=0,o;do{o=!1;let c=[n[0]];for(let u=1;u<n.length;u++){let h=function(g,y){let x=new Vt(m.seq1Range.endExclusive,f.seq1Range.start);if(e.countLinesIn(x)>5||x.length>500)return!1;let E=e.getText(x).trim();if(E.length>20||E.split(/\r\n|\r|\n/).length>1)return!1;let _=e.countLinesIn(g.seq1Range),k=g.seq1Range.length,B=t.countLinesIn(g.seq2Range),N=g.seq2Range.length,M=e.countLinesIn(y.seq1Range),Z=y.seq1Range.length,he=t.countLinesIn(y.seq2Range),ee=y.seq2Range.length,G=2*40+50;function q(ie){return Math.min(ie,G)}return s(q,"cap"),Math.pow(Math.pow(q(_*40+k),1.5)+Math.pow(q(B*40+N),1.5),1.5)+Math.pow(Math.pow(q(M*40+Z),1.5)+Math.pow(q(he*40+ee),1.5),1.5)>(G**1.5)**1.5*1.3};var l=h;s(h,"shouldJoinDiffs");let f=n[u],m=c[c.length-1];h(m,f)?(o=!0,c[c.length-1]=c[c.length-1].join(f)):c.push(f)}n=c}while(i++<10&&o);let a=[];return x6e(n,(c,u,f)=>{let m=u;function h(E){return E.length>0&&E.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}s(h,"shouldMarkAsChanged");let p=e.extendToFullLines(u.seq1Range),g=e.getText(new Vt(p.start,u.seq1Range.start));h(g)&&(m=m.deltaStart(-g.length));let y=e.getText(new Vt(u.seq1Range.endExclusive,p.endExclusive));h(y)&&(m=m.deltaEnd(y.length));let x=$o.fromOffsetPairs(c?c.getEndExclusives():e1.zero,f?f.getStarts():e1.max),b=m.intersect(x);a.length>0&&b.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(b):a.push(b)}),a}s(KMe,"removeVeryShortMatchingTextBetweenLongDiffs");d();var eB=class{constructor(t,r){this.trimmedHash=t;this.lines=r}static{s(this,"LineSequence")}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){let r=t===0?0:JMe(this.lines[t-1]),n=t===this.lines.length?0:JMe(this.lines[t]);return 1e3-(r+n)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(`
`)}isStronglyEqual(t,r){return this.lines[t]===this.lines[r]}};function JMe(e){let t=0;for(;t<e.length&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9);)t++;return t}s(JMe,"getIndentation");var GH=class{constructor(){this.dynamicProgrammingDiffing=new qH;this.myersDiffingAlgorithm=new eT}static{s(this,"DefaultLinesDiffComputer")}computeDiff(t,r,n){if(t.length<=1&&Qv(t,r,(B,N)=>B===N))return new K9([],[],!1);if(t.length===1&&t[0].length===0||r.length===1&&r[0].length===0)return new K9([new l3(new Cr(1,t.length+1),new Cr(1,r.length+1),[new ku(new yr(1,1,t.length,t[t.length-1].length+1),new yr(1,1,r.length,r[r.length-1].length+1))])],[],!1);let i=n.maxComputationTimeMs===0?c3.instance:new UH(n.maxComputationTimeMs),o=!n.ignoreTrimWhitespace,a=new Map;function l(B){let N=a.get(B);return N===void 0&&(N=a.size,a.set(B,N)),N}s(l,"getOrCreateHash");let c=t.map(B=>l(B.trim())),u=r.map(B=>l(B.trim())),f=new eB(c,t),m=new eB(u,r),h=f.length+m.length<1700?this.dynamicProgrammingDiffing.compute(f,m,i,(B,N)=>t[B]===r[N]?r[N].length===0?.1:1+Math.log(1+r[N].length):.99):this.myersDiffingAlgorithm.compute(f,m,i),p=h.diffs,g=h.hitTimeout;p=N0e(f,m,p),p=YMe(f,m,p);let y=[],x=s(B=>{if(o)for(let N=0;N<B;N++){let M=b+N,Z=E+N;if(t[M]!==r[Z]){let he=this.refineDiff(t,r,new $o(new Vt(M,M+1),new Vt(Z,Z+1)),i,o,n);for(let ee of he.mappings)y.push(ee);he.hitTimeout&&(g=!0)}}},"scanForWhitespaceChanges"),b=0,E=0;for(let B of p){I0(()=>B.seq1Range.start-b===B.seq2Range.start-E);let N=B.seq1Range.start-b;x(N),b=B.seq1Range.endExclusive,E=B.seq2Range.endExclusive;let M=this.refineDiff(t,r,B,i,o,n);M.hitTimeout&&(g=!0);for(let Z of M.mappings)y.push(Z)}x(t.length-b);let _=B0e(y,new Yb(t),new Yb(r)),k=[];return n.computeMoves&&(k=this.computeMoves(_,t,r,c,u,i,o,n)),I0(()=>{function B(M,Z){if(M.lineNumber<1||M.lineNumber>Z.length)return!1;let he=Z[M.lineNumber-1];return!(M.column<1||M.column>he.length+1)}s(B,"validatePosition");function N(M,Z){return!(M.startLineNumber<1||M.startLineNumber>Z.length+1||M.endLineNumberExclusive<1||M.endLineNumberExclusive>Z.length+1)}s(N,"validateRange");for(let M of _){if(!M.innerChanges)return!1;for(let Z of M.innerChanges)if(!(B(Z.modifiedRange.getStartPosition(),r)&&B(Z.modifiedRange.getEndPosition(),r)&&B(Z.originalRange.getStartPosition(),t)&&B(Z.originalRange.getEndPosition(),t)))return!1;if(!N(M.modified,r)||!N(M.original,t))return!1}return!0}),new K9(_,k,g)}computeMoves(t,r,n,i,o,a,l,c){return jMe(t,r,n,i,o,a).map(m=>{let h=this.refineDiff(r,n,new $o(m.original.toOffsetRange(),m.modified.toOffsetRange()),a,l,c),p=B0e(h.mappings,new Yb(r),new Yb(n),!0);return new J9(m,p)})}refineDiff(t,r,n,i,o,a){let c=V_t(n).toRangeMapping2(t,r),u=new u3(t,c.originalRange,o),f=new u3(r,c.modifiedRange,o),m=u.length+f.length<500?this.dynamicProgrammingDiffing.compute(u,f,i):this.myersDiffingAlgorithm.compute(u,f,i),h=!1,p=m.diffs;h&&$o.assertSorted(p),p=N0e(u,f,p),h&&$o.assertSorted(p),p=L0e(u,f,p,(y,x)=>y.findWordContaining(x)),h&&$o.assertSorted(p),a.extendToSubwords&&(p=L0e(u,f,p,(y,x)=>y.findSubWordContaining(x),!0),h&&$o.assertSorted(p)),p=zMe(u,f,p),h&&$o.assertSorted(p),p=KMe(u,f,p),h&&$o.assertSorted(p);let g=p.map(y=>new ku(u.translateRange(y.seq1Range),f.translateRange(y.seq2Range)));return h&&ku.assertSorted(g),{mappings:g,hitTimeout:m.hitTimeout}}};function V_t(e){return new mm(new Cr(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new Cr(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}s(V_t,"toLineRangeMapping");var HH=class{static{s(this,"DiffServiceImpl")}constructor(){}dispose(){}async computeDiff(t,r,n){let i=await $_t(t,r,n);return{identical:i.identical,quitEarly:i.quitEarly,changes:a(i.changes),moves:i.moves.map(l=>new J9(new mm(new Cr(l[0],l[1]),new Cr(l[2],l[3])),a(l[4])))};function a(l){return l.map(c=>new l3(new Cr(c[0],c[1]),new Cr(c[2],c[3]),c[4]?.map(u=>new ku(new yr(u[0],u[1],u[2],u[3]),new yr(u[4],u[5],u[6],u[7])))))}}};async function $_t(e,t,r){let n=e.split(/\r\n|\r|\n/),i=t.split(/\r\n|\r|\n/),a=new GH().computeDiff(n,i,r),l=a.changes.length>0?!1:e===t;function c(u){return u.map(f=>[f.original.startLineNumber,f.original.endLineNumberExclusive,f.modified.startLineNumber,f.modified.endLineNumberExclusive,f.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return s(c,"getLineChanges"),{identical:l,quitEarly:a.hitTimeout,changes:c(a.changes),moves:a.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,c(u.changes)])}}s($_t,"computeDiff");d();var F0e=Ze(require("crypto"));var tB=F0e.randomUUID.bind(F0e);var sQe=Ze(Gh()),q0e=Ze(vk());d();var jH=qf("ISnippyService");d();d();var rB=new RegExp("[_\\p{L}\\p{Nd}]+|====+|----+|####+|////+|\\*\\*\\*\\*+|[\\p{P}\\p{S}]","gu"),VH=65;function z_t(e){let t=0,r;rB.lastIndex=0;do if(r=rB.exec(e),r&&(t+=1),t>=VH)break;while(r);return t}s(z_t,"lexemeLength");function Y_t(e,t){let r=0,n;rB.lastIndex=0;do if(n=rB.exec(e),n&&(r+=1,r>=t))return rB.lastIndex;while(n);return e.length}s(Y_t,"offsetFirstLexemes");function XMe(e,t){let r=e.split("").reverse().join(""),n=Y_t(r,t);return r.length-n}s(XMe,"offsetLastLexemes");function M0e(e){return z_t(e)>=VH}s(M0e,"hasMinLexemeLength");d();d();var ZMe;(t=>{function e(r){return typeof r=="object"&&r!==null&&typeof r.matched_source=="string"&&typeof r.occurrences=="string"&&typeof r.capped=="boolean"&&typeof r.cursor=="string"&&typeof r.github_url=="string"}t.is=e,s(e,"is")})(ZMe||={});var Q0e;(t=>{function e(r){return typeof r=="object"&&r!==null&&typeof r.kind=="string"&&typeof r.reason=="string"&&typeof r.code=="number"&&typeof r.msg=="string"}t.is=e,s(e,"is")})(Q0e||={});var eQe;(t=>{function e(r){return typeof r=="object"&&r!==null&&"snippets"in r&&Array.isArray(r.snippets)&&r.snippets.every(ZMe.is)}t.is=e,s(e,"is")})(eQe||={});var O0e;(t=>{function e(r){if(Q0e.is(r))return Oo.error(r);if(eQe.is(r))return Oo.ok(r)}t.to=e,s(e,"to")})(O0e||={});var tQe;(t=>{function e(r){return typeof r=="object"&&r!==null&&typeof r.commit_id=="string"&&typeof r.license=="string"&&typeof r.nwo=="string"&&typeof r.path=="string"&&typeof r.url=="string"}t.is=e,s(e,"is")})(tQe||={});var rQe;(t=>{function e(r){return typeof r=="object"&&r!==null&&typeof r.has_next_page=="boolean"&&typeof r.cursor=="string"}t.is=e,s(e,"is")})(rQe||={});var nQe;(t=>{function e(r){return typeof r=="object"&&r!==null&&typeof r.count=="object"&&Object.values(r.count).every(n=>typeof n=="string")}t.is=e,s(e,"is")})(nQe||={});var iQe;(t=>{function e(r){return typeof r=="object"&&r!==null&&"file_matches"in r&&Array.isArray(r.file_matches)&&r.file_matches.every(tQe.is)&&"page_info"in r&&rQe.is(r.page_info)&&"license_stats"in r&&nQe.is(r.license_stats)}t.is=e,s(e,"is")})(iQe||={});var U0e;(t=>{function e(r){if(Q0e.is(r))return Oo.error(r);if(iQe.is(r))return Oo.ok(r)}t.to=e,s(e,"to")})(U0e||={});var $H=class e{static{s(this,"SnippyFetchService")}static{this.TWIRP_URL="twirp/github.snippy.v1.SnippyAPI"}constructor(t){this.ctx=t}async fetchMatch(t){let r={source:t};return this.fetch("Match",r,O0e.to)}async fetchFilesForMatch(t){let r={cursor:t};return this.fetch("FilesForMatch",r,U0e.to)}async fetch(t,r,n){let i=this.ctx.get(fn),o=await this.ctx.get(en).getToken(),a=a8(this.ctx,o,"origin-tracker",`${e.TWIRP_URL}/${t}`),l={Authorization:`Bearer ${o.token}`,...Vu(this.ctx),"X-GitHub-Api-Version":Vm},c=i.makeAbortController(),u=await i.fetch(a,{method:"POST",headers:l,json:r,signal:c.signal});if(!u.ok)throw new Error(`Failed with status ${u.status} and body: ${await u.text()}`);let f=await u.json();return n(f)}};var oQe=new Gt("[CODE REFERENCING]"),rT=class{constructor(t,r){this.instantiationService=r;this.ctx=t,this.fetcher=this.instantiationService.createInstance($H,this.ctx)}static{s(this,"SnippyService")}async handlePostInsertion(t,r,n){let i=this.computeSourceToCheck(r,n);if(!i)return;let a=await this.ctx.get(Vr).getTextDocument({uri:t.toString()});if(!a){oQe.error(this.ctx,"Unable to raise IP code citation notification: could not determine document version.");return}let l=a.version,c;try{c=await this.fetcher.fetchMatch(i.source)}catch(p){throw p}if(!c)throw new Error(`Failed to parse match response: ${c}`);if(c.isError())throw new Error(`Failed to match: ${c.err}`);if(c.val.snippets.length===0)return;let{snippets:u}=c.val,f=u.map(async p=>{let g=await this.fetcher.fetchFilesForMatch(p.cursor);if(!g||g.isError())return;let{file_matches:y,license_stats:x}=g.val;return{match:p,files:y,licenseStats:x}}),h=(await Promise.all(f)).filter(p=>!!p);if(h.length===0){oQe.error(this.ctx,"Should never happen as per https://github.com/github/copilot-client/blob/34cae5c581d662525eb3305d58f0762e952f866d/extension/src/codeReferencing/handlePostInsertion.ts#L138");return}for(let p of h){let g=new Set(Object.keys(p.licenseStats?.count??{}));g.delete("NOASSERTION")&&g.add("unknown");let y=Array.from(g).sort(),x=`${p.match.matched_source.slice(0,100).replace(/[\r\n\t]+|^[ \t]+/gm," ").trim()}...`,b={inDocumentUri:t.toString(),offsetStart:i.startOffset,offsetEnd:i.endOffset,matchingText:x,location:{start:{line:i.startPosition.lineNumber,character:i.startPosition.column},end:{line:i.endPosition.lineNumber,character:i.endPosition.column}},version:l,details:y.map(E=>({license:E,url:`${p.match.github_url}`}))};await this.ctx.get(gf).handleIPCodeCitation(this.ctx,b)}}computeSourceToCheck(t,r){if(r.newText==="")return;let n=Is.single(r),o=n.getNewRanges().reduce((h,p)=>h.join(p)),a=t.apply(n),l=o.start,c=a.value.substring(o.start,o.endExclusive);if(!M0e(c)){let h=a.value.slice(0,o.start),p=XMe(h,VH);l=p,c=a.value.slice(p,o.start+r.newText.length)}if(!M0e(c))return;let u=a.getTransformer(),f=u.getPosition(l),m=u.getPosition(o.endExclusive);return{source:c,startOffset:l,endOffset:o.endExclusive,startPosition:f,endPosition:m}}};rT=f0([Vs(1,Kg)],rT);async function aQe(e){let t=new dH;return t.define(hH,new W0e(e)),t.define(NH,new HH),t.define(a2,new Wf(G0e,[!0])),t.define(jH,new Wf(rT,[e])),t.define(zh,await H0e.Create(e)),t.define(zk,new Wf(j0e)),t.seal()}s(aQe,"createInstantiationService");var W0e=class{constructor(t){this.ctx=t;this.ctx=t}static{s(this,"TelemetrySender")}sendTelemetryEvent(t,r,n){let i=Object.fromEntries(Object.entries(r??{}).filter(([l,c])=>c!==void 0)),o=Object.fromEntries(Object.entries(n??{}).filter(([l,c])=>c!==void 0)),a=dn.createAndMarkAsIssued(i,o);jt(this.ctx,t,a)}},G0e=class{static{s(this,"ParserServiceImpl")}getTreeSitterAST(t){}},H0e=class e{constructor(t,r){this.ctx=t;this.modelConfiguration=r}static{s(this,"CLSChatMLFetcher")}static async Create(t){let r=await yo.getModelConfiguration(t,"nesStubs");return new e(t,r)}get tokenBudget(){return this.modelConfiguration.maxRequestTokens}get tokenizerName(){return this.modelConfiguration.tokenizer}async fetchOne(t,r,n,i,o){let a=t.map(u=>e.chatMessageToClsChatMessage(u)),l=tB(),c=await this.ctx.get(hu).fetchAndStreamChat(this.ctx,a,ng.createEmptyConfigForTesting(),"nextEditSuggestion",l,async(u,f)=>{if(r)return await r(u,0,{text:f.text})},n,i,o);if(c.type==="success"){let u=[];if(r)for await(let m of c.choices)if(m.finishReason!=="snippy")await r(m.completionText,0,{text:m.completionText}),u.push(m.completionText);else return{type:"filtered",reason:"snippy",category:"snippy",requestId:l,serverRequestId:m.requestId.headerRequestId};let f=u.join("");return{type:"success",value:f}}else return{type:e.clsResponseTypeToResponseType(c.type),reason:c.type}}static chatMessageToClsChatMessage(t){switch(t.role){case"system":return{role:"system",content:DMe(t.content)};case"user":if(typeof t.content!="string"&&t.content.some(r=>r.type!=="text"))throw new Error("CLS only supports text content in user messages");return{role:"user",content:t.content};default:throw new Error(`Unsupported chat role: ${t.role}`)}}static clsResponseTypeToResponseType(t){switch(t){case"success":return"success";case"successMultiple":return"success";case"offTopic":return"offTopic";case"canceled":return"canceled";case"filtered":return"filtered";case"length":return"length";case"failed":return"failed";case"agentAuthRequired":return"agent_unauthorized";default:return"unknown"}}},j0e=class e{constructor(){this.tokenizers=new Map;this.cl100kTokenizer=new zH("cl100k_base")}static{s(this,"CLSTokenizerProvider")}acquireTokenizer(t){let r=this.tokenizers.get(t.tokenizer);return r||(r=new zH(e.typeToName(t.tokenizer)),this.tokenizers.set(t.tokenizer,r)),r}static typeToName(t){switch(t){case"cl100k_base":return"cl100k_base";case"o200k_base":return"o200k_base";case"llama3":throw new Error("Llama3 tokenizer is not supported");default:throw new Error(`Unknown tokenizer type: ${t}`)}}},zH=class{constructor(t){this.mode=sQe.OutputMode.Raw;this.tokenizer=Do(t)}static{s(this,"CLSTokenizer")}tokenLength(t){if(typeof t=="string")return this.tokenizer.tokenLength(t);if(t.type===q0e.ChatCompletionContentPartKind.Text)return this.tokenizer.tokenLength(t.text);throw new Error(`Unsupported content part type: ${t.type}`)}countMessageTokens(t){let r=0;if(typeof t.content=="string")return this.tokenLength(t.content);if(Array.isArray(t.content))for(let n of t.content)if(n.type===q0e.ChatCompletionContentPartKind.Text)r+=this.tokenLength(n.text);else throw new Error(`Unsupported message content part type: ${n.type}`);else throw new Error("Unsupported message content type");return r}countMessagesTokens(t){let r=0;for(let n of t)r+=this.countMessageTokens(n);return r}countToolTokens(t){throw new Error("Method not implemented.")}};d();d();var YH=class extends Cs{constructor(r){super();this.workspace=r;this._garbageCollector=new z0e(20);this._documentCaches=new Map;If(this,r.openDocuments,(n,i)=>{let o=new V0e(n.id,n.value.get(),this._garbageCollector);this._documentCaches.set(o.docId,o),i.add(Ag(this,{value:n.value,selection:n.selection,languageId:n.languageId},a=>{for(let l of a.value.changes)o.handleEdit(l)})),i.add(_a(()=>{this._documentCaches.delete(n.id)}))}).recomputeInitiallyAndOnChange(this._store)}static{s(this,"RejectionCollector")}reject(r,n){let i=this._documentCaches.get(r);i&&i.reject(n)}isRejected(r,n){let i=this._documentCaches.get(r);return i?i.isRejected(n):!1}},V0e=class{constructor(t,r,n){this.docId=t;this._garbageCollector=n;this._rejectedEdits=new Set}static{s(this,"DocumentRejectionTracker")}handleEdit(t){for(let r of[...this._rejectedEdits])r.handleEdit(t)}reject(t){if(this.isRejected(t))return;let r=new $0e(t.toEdit(),()=>{this._rejectedEdits.delete(r)});this._rejectedEdits.add(r),this._garbageCollector.put(r)}isRejected(t){for(let r of this._rejectedEdits)if(r.isRejected(t))return!0;return!1}},$0e=class{constructor(t,r){this._edit=t;this._onDispose=r}static{s(this,"RejectedEdit")}handleEdit(t){let r=this._edit.tryRebase(t);r?this._edit=r:this.dispose()}isRejected(t){return this._edit.equals(t.toEdit())}dispose(){this._onDispose()}},z0e=class{constructor(t){this._maxSize=t;this._disposables=[]}static{s(this,"LRUGarbageCollector")}put(t){this._disposables.push(t),this._disposables.length>this._maxSize&&this._disposables.shift().dispose()}dispose(){for(let t of this._disposables)t.dispose();this._disposables=[]}};d();d();d();var nB=class{constructor(t,r){this.prev=null;this.next=null;this.key=t,this.value=r}static{s(this,"Node")}},KH=class{static{s(this,"LRUCache")}constructor(t=10){if(t<1)throw new Error("Cache size must be at least 1");this._capacity=t,this._cache=new Map,this._head=new nB("",null),this._tail=new nB("",null),this._head.next=this._tail,this._tail.prev=this._head}_addNode(t){t.prev=this._head,t.next=this._head.next,this._head.next.prev=t,this._head.next=t}_removeNode(t){let r=t.prev,n=t.next;r.next=n,n.prev=r}_moveToHead(t){this._removeNode(t),this._addNode(t)}_popTail(){let t=this._tail.prev;return this._removeNode(t),t}clear(){this._cache.clear(),this._head.next=this._tail,this._tail.prev=this._head}deleteKey(t){let r=this._cache.get(t);if(r)return this._removeNode(r),this._cache.delete(t),r.value}get(t){let r=this._cache.get(t);if(r)return this._moveToHead(r),r.value}keys(){let t=[],r=this._head.next;for(;r!==this._tail;)t.push(r.key),r=r.next;return t}getValues(){let t=[],r=this._head.next;for(;r!==this._tail;)t.push(r.value),r=r.next;return t}put(t,r){let n=this._cache.get(t);if(n)n.value=r,this._moveToHead(n);else if(n=new nB(t,r),this._cache.set(t,n),this._addNode(n),this._cache.size>this._capacity){let i=this._popTail();return this._cache.delete(i.key),[i.key,i.value]}}};var JH=class extends Cs{constructor(r){super();this.workspace=r;this._documentCaches=new Map;this._sharedCache=new KH(50);If(this,r.openDocuments,(n,i)=>{let o=new Y0e(n.id,n.value.get(),this._sharedCache);this._documentCaches.set(o.docId,o),i.add(Ag(this,{value:n.value,selection:n.selection,languageId:n.languageId},a=>{for(let l of a.value.changes)o.handleEdit(l)})),i.add(_a(()=>{this._documentCaches.delete(n.id)}))}).recomputeInitiallyAndOnChange(this._store)}static{s(this,"NextEditCache")}setNextEdits(r,n,i){let o=this._documentCaches.get(r);o&&o.setNextEdits(n,i)}lookupNextEdit(r){let n=this._documentCaches.get(r);if(n)return n.lookupNextEdit()}},Y0e=class{constructor(t,r,n){this.docId=t;this._sharedCache=n;this._value=r}static{s(this,"DocumentEditCache")}handleEdit(t){this._value=this._value.apply(t)}setNextEdits(t,r){let n=this._value;for(let i=0;i<t.edits.length;i++){let o=t.edits[i],a=this._getKey(n.value);this._sharedCache.put(a,{edit:o,subsequentN:i,source:r,documentBeforeEdit:n}),n=n.apply(o.toEdit())}}lookupNextEdit(){let t=this._getKey(this._value.value),r=this._sharedCache.get(t);if(r)return r}_getKey(t){return JSON.stringify([this.docId.uri,t])}};d();var XH=class e{constructor(t){this._providerId=t;this._isFromCache=!1;this._wasPreviouslyRejected=!1;this._isShown=!1;this._acceptance="notAccepted";this._startTime=Date.now(),this._requestN=++e.requestN}static{s(this,"NextEditProviderTelemetryBuilder")}static{this.requestN=0}build(){let t,r,n,i,o,a;if(this._request){let c=this._request.getActiveDocument();t=this._request.documents.length,r=this._request.documents.reduce((u,f)=>u+f.recentEdits.edits.length,0),n=c.recentEdits.edits.length,i=c.languageId,o=c.lineCountBeforeClipping,a=c.clippingRange.length}let l=this._statelessNextEditTelemetry?.fetchStartedAt===void 0?void 0:this._statelessNextEditTelemetry.fetchStartedAt-this._startTime;return{opportunityId:this._opportunityId||"",headerRequestId:this._headerRequestId||"",requestN:this._requestN,providerId:this._providerId,nextEditProviderDuration:this._duration||0,isFromCache:this._isFromCache,subsequentEditOrder:this._subsequentEditOrder,documentShorteningStrategy:this._documentShorteningStrategy,documentsCount:t,editsCount:r,activeDocumentEditsCount:n,activeDocumentLanguageId:i,activeDocumentOriginalLineCount:o,activeDocumentShortenedLineCount:a,fetchStartedAfterMs:l,wasPreviouslyRejected:this._wasPreviouslyRejected,isShown:this._isShown,acceptance:this._acceptance,...this._statelessNextEditTelemetry}}setOpportunityId(t){return this._opportunityId=t,this}setHeaderRequestId(t){return this._headerRequestId=t,this}setIsFromCache(){return this._isFromCache=!0,this}setSubsequentEditOrder(t){return this._subsequentEditOrder=t,this}setDocumentShorteningStrategy(t){return this._documentShorteningStrategy=t,this}setRequest(t){return this._request=t,this}setStatelessNextEditTelemetry(t){return this._statelessNextEditTelemetry=t,this}setWasPreviouslyRejected(){return this._wasPreviouslyRejected=!0,this}markEndTime(){return this._duration=Date.now()-this._startTime,this}setAsShown(){return this._isShown=!0,this}setAcceptance(t){return this._acceptance=t,this}},nT=class{constructor(t){this.telemetrySender=t;this._map=new Map}static{s(this,"TelemetrySender")}markNextEditResultAsShown(t){let r=this._map.get(t);r&&r.builder.setAsShown()}scheduleSendingTelemetry(t,r){let n=setTimeout(()=>{this._doSendTelemetry(r),this._map.delete(t)},12e4);this._map.set(t,{builder:r,timeout:n})}sendTelemetryFor(t,r){let n=this._map.get(t);if(!n)return;this._map.delete(t),clearTimeout(n.timeout);let i=n.builder;i.setAcceptance(r),this._doSendTelemetry(i)}sendTelemetry(t){this._doSendTelemetry(t)}_doSendTelemetry(t){let r=t.build(),{opportunityId:n,headerRequestId:i,requestN:o,providerId:a,hadStatelessNextEditProviderCall:l,statelessNextEditProviderDuration:c,nextEditProviderDuration:u,isFromCache:f,subsequentEditOrder:m,documentShorteningStrategy:h,activeDocumentLanguageId:p,activeDocumentOriginalLineCount:g,activeDocumentShortenedLineCount:y,wasPreviouslyRejected:x,isShown:b,acceptance:E,logProbThreshold:_,documentsCount:k,editsCount:B,activeDocumentEditsCount:N,promptLineCount:M,promptCharCount:Z,isDefaultEndpoint:he,hadLowLogProbSuggestion:ee,nonTerminatingError:G,nEditsSuggested:q,kthEditPicked:ie,lineDistanceToMostRecentEdit:z,debounceTime:j,hasNextEdit:U,nextEditLogprob:V,maxLinesPerEdit:K,noNextEditReasonKind:ae,noNextEditReasonMessage:re,firstEditStrategy:le,firstPickStrategyOverride:ce,fetchTime:De,fetchResult:be,fetchError:qe,fetchStartedAfterMs:Re}=r;this._sendTelemetryToBoth({opportunityId:n,headerRequestId:i,providerId:a,documentShorteningStrategy:h,activeDocumentLanguageId:p,acceptance:E,nonTerminatingError:G,noNextEditReasonKind:ae,noNextEditReasonMessage:re,firstEditStrategy:le,firstPickStrategyOverride:ce,fetchResult:be,fetchError:qe},{requestN:o,hadStatelessNextEditProviderCall:this._boolToNum(l),statelessNextEditProviderDuration:c,nextEditProviderDuration:u,isFromCache:this._boolToNum(f),subsequentEditOrder:m,isDefaultEndpoint:this._boolToNum(he),activeDocumentOriginalLineCount:g,activeDocumentShortenedLineCount:y,wasPreviouslyRejected:this._boolToNum(x),isShown:this._boolToNum(b),logProbThreshold:_,documentsCount:k,editsCount:B,activeDocumentEditsCount:N,promptLineCount:M,promptCharCount:Z,hadLowLogProbSuggestion:this._boolToNum(ee),nEditsSuggested:q,kthEditPicked:ie,lineDistanceToMostRecentEdit:z,debounceTime:j,fetchStartedAfterMs:Re,fetchTime:De,hasNextEdit:this._boolToNum(U),nextEditLogprob:V,maxLinesPerEdit:K})}_sendTelemetryToBoth(t,r){this.telemetrySender.sendTelemetryEvent("copilot-nes/provideInlineEdit",t,r)}_boolToNum(t){return t===void 0?void 0:t?1:0}};nT=f0([Vs(0,hH)],nT);d();var iT=class{constructor(t){this.result=t}static{s(this,"NextEditResult")}};var Kb=!1,lQe=300,oT=class extends Cs{constructor(r,n,i,o,a,l,c){super();this._workspace=r;this._statelessNextEditProvider=n;this._historyContextProvider=i;this._xtabHistoryTracker=o;this._parseService=a;this._instantiationService=l;this._snippyService=c;this._rejectionCollector=new YH(this._workspace);this._nextEditCache=new JH(this._workspace);this._recentlyShownCache=new X0e;this._pendingStatelessNextEditRequest=null;this._lastShownTime=0;this._lastRejectionTime=0;this._lastTriggerTime=0;If(this,this._workspace.openDocuments,(u,f)=>{f.add(Qne(u.value,m=>{this._cancelPendingRequestDueToDocChange(u.id,m)}))}).recomputeInitiallyAndOnChange(this._store),this._telemetrySender=this._instantiationService.createInstance(nT)}static{s(this,"NextEditProvider")}get lastRejectionTime(){return this._lastRejectionTime}get lastTriggerTime(){return this._lastTriggerTime}_cancelPendingRequestDueToDocChange(r,n){if(this._pendingStatelessNextEditRequest===null)return;let i=this._pendingStatelessNextEditRequest.getActiveDocument();i.id===r&&i.documentAfterEditsNoShortening.value!==n.value&&this._pendingStatelessNextEditRequest.cancellationTokenSource.cancel()}async getNextEdit(r,n,i){this._lastTriggerTime=Date.now();let o=await this._workspace.getDocument(r);if(!o)return{result:void 0};let a=o.value.get(),l=new XH(this._statelessNextEditProvider.ID);l.setOpportunityId(n.requestUuid??tB());let c=this._recentlyShownCache.get(r,a),u=this._nextEditCache.lookupNextEdit(r),f,m,h,p;if(c)f=c[0],p=c[1],m=a,l.setHeaderRequestId(p.headerRequestId),l.setIsFromCache(),await i2(lQe);else if(u)f=u.edit,p=u.source,m=u.documentBeforeEdit,l.setHeaderRequestId(p.headerRequestId),l.setIsFromCache(),l.setSubsequentEditOrder(u.subsequentN),await i2(lQe);else{p=new J0e,l.setHeaderRequestId(p.headerRequestId);let x=o.value.get();m=x;let b=await this.fetchNextEdit(p,r,l,i),E=x.value!==o.value.get().value;if(b.isError())switch(b.err.kind){case"activeDocumentHasNoEdits":case"noSuggestions":case"gotCancelled":case"filteredOut":case"uncategorized":break;case"fetchFailure":case"unexpected":h=b.err.error;break;default:jS(b.err)}else if(!E){let _=b.val;_.isEmpty()||(f=_.edits[0],(!this._statelessNextEditProvider.dependsOnSelection||_.edits.length>1)&&this._nextEditCache.setNextEdits(r,_,p))}}if(l.markEndTime(),h)throw this._telemetrySender.sendTelemetry(l),h;if(!f)return this._telemetrySender.sendTelemetry(l),new iT(void 0);if(this._rejectionCollector.isRejected(r,f))return l.setWasPreviouslyRejected(),this._telemetrySender.sendTelemetry(l),new iT(void 0);Pl(m!==void 0,"should be defined if edit is defined");let g=this._statelessNextEditProvider.showNextEditPreference??"aroundEdit",y=new iT({edit:f,showRangePreference:g,documentBeforeEdits:m});return this._telemetrySender.scheduleSendingTelemetry(y,l),f.isNeutral()||this._recentlyShownCache.add(r,a,[f,p]),y}async _shortenDocument(r,n){let i=r.lastEdit.getEditedState(),{document:o,clippedRange:a}=n==="noShortening"?this.getProjectedDocumentNoShortening(r.lastEdit):n==="clipping"?this.getProjectedDocumentClipping(r.lastEdit):await this.getProjectedDocumentSummarizedDocument(r.languageId,r.lastEdit),l=Is.fromOffsetEdit(o.edits).inverseOnString(o.originalText),{edits:c,editLast:u}=K0e(r.lastEdits.swap(l)),f=c.compose(),m=new jb(new Yh(r.lastEdits.apply(o.originalText)),u.toOffsetEdit().inverse(c.apply(o.text))),h=new Hl(o.text),g=jg.fromEdit(new Yc(h,f)).removeCommonSuffixPrefixLines(),y=c.edits.at(-1)?.getNewRanges().at(0),x;y&&(x=new Hl(m.text).getTransformer().getRange(y));let b=r.lastSelection?m.projectOffsetRange(r.lastSelection):void 0,E=this._workspace.getWorkspaceRoot(r.docId),_=s(M=>{let he=new jg(new Hl(m.text),M).toEdit();return cQe(he,m)},"toEditOnDocumentAfterEditsNoShortening"),k=s(M=>m.projectBack(M),"toOffsetOnDocumentAfterEditsNoShortening"),B=s(M=>m.project(M),"toProjectedOffset"),N=new Uk(r.docId,E,r.languageId,g.base.getLines(),g.edit,x,h,c,i,_,k,B,r.lastEdit.base.getTextLength().lineCount,a,b);return{recentEdit:r.lastEdit,nextEditDoc:N,projectedDocument:m}}async fetchNextEdit(r,n,i,o){let a=await this._historyContextProvider.getHistoryContext(n);if(!a)return Oo.error({kind:"unexpected",error:new Error("DocumentMissingInHistoryContext")});let l=K0e(a.getDocumentAndIdx(n)),c=this.getDocumentShorteningStrategy();i.setDocumentShorteningStrategy(c);let u=await Promise.all(a.documents.map(M=>this._shortenDocument(M,c))),f=u[l.idx],m=this._xtabHistoryTracker.getHistory(),h=new aH(r.headerRequestId,u.map(M=>M.nextEditDoc),l.idx,m,this.nextEditOptions),p=this._findExistingPendingRequest(h),g,y;if(p){g=p,Kb&&console.log(`=> reusing an existing request ${g.seqid}`),i.setHeaderRequestId(p.id),i.setIsFromCache(),i.setRequest(g);let M=this._hookupCancellation(g,o);try{y=await g.result}finally{M.dispose()}}else{g=h,this._pendingStatelessNextEditRequest&&(this._pendingStatelessNextEditRequest.cancellationTokenSource.cancel(),this._pendingStatelessNextEditRequest=null),this._pendingStatelessNextEditRequest=g;let M=s(()=>{this._pendingStatelessNextEditRequest===g&&(this._pendingStatelessNextEditRequest=null)},"removeFromPending");i.setRequest(g);let Z=this._hookupCancellation(g,o);try{y=await this._statelessNextEditProvider.provideNextEdit(g,g.cancellationTokenSource.token),g.setResult(y)}catch(he){throw g.setResultError(he),he}finally{Z.dispose(),M()}}i.setStatelessNextEditTelemetry(y.telemetry);let x=y.nextEdit;if(x.isError())return x;let b=x.val.edit;if(b.edits.length===0)return Oo.error({kind:"noSuggestions"});let _=new jg(new Hl(f.projectedDocument.text),b).toEdit(),k=cQe(_,f.projectedDocument),B=_.edits.length===k.edits.length?x.val.permutation:void 0,N=k.decompose(B);return Oo.ok(N)}_hookupCancellation(r,n){let i=new E0,o=!1,a=s(()=>{o||(o=!0,r.liveDependentants--)},"removeDependant"),l=i.add(new ZG);return i.add(n.onCancellationRequested(()=>{if(a(),r.liveDependentants>0){Kb&&console.log(`=> ignoring UI cancellation signal for ${r.seqid} because others depend on this request`);return}if(!r.fetchIssued){Kb&&console.log(`=> canceling ${r.seqid} due to UI cancellation signal`),r.cancellationTokenSource.cancel();return}l.setIfNotSet(()=>{if(r.liveDependentants>0){Kb&&console.log(`=> ignoring timer cancellation signal for ${r.seqid} because others depend on this request`);return}Kb&&console.log(`=> canceling ${r.seqid} due to timer after UI cancellation signal`),r.cancellationTokenSource.cancel()},500)})),i.add(_a(()=>{a()})),r.liveDependentants++,i}_findExistingPendingRequest(r){if(this._statelessNextEditProvider.canReuseResult&&this._pendingStatelessNextEditRequest&&!this._pendingStatelessNextEditRequest.cancellationTokenSource.token.isCancellationRequested&&this._statelessNextEditProvider.canReuseResult(this._pendingStatelessNextEditRequest,r))return this._pendingStatelessNextEditRequest}handleShown(r){this._lastShownTime=Date.now(),this._telemetrySender.markNextEditResultAsShown(r)}handleAcceptance(r,n){this._telemetrySender.sendTelemetryFor(n,"accepted"),this.runSnippy(r,n),this._statelessNextEditProvider.handleAcceptance?.()}handleRejection(r,n){gH(n.result,"@ulugbekna: undefined edit cannot be rejected?"),Date.now()-this._lastShownTime>1e3&&n.result&&(this._recentlyShownCache.remove(n.result.edit),this._rejectionCollector.reject(r,n.result.edit)),this._lastRejectionTime=Date.now(),this._telemetrySender.sendTelemetryFor(n,"rejected")}getProjectedDocumentNoShortening(r){return{document:new jb(new Yh(r.base.value),new um([])),clippedRange:new Cr(1,r.base.getTextLength().lineCount+1)}}getProjectedDocumentClipping(r){let n=r.base.getTransformer(),i=n.getRange(r.edit.getRange()??new Vt(0,0)),o=Cr.fromRange(i);function a(m,h){return new Cr(m.startLineNumber-h,m.endLineNumberExclusive+h)}s(a,"extendRange");let l=new Cr(1,n.textLength.lineCount+1),c=K0e(l.intersect(a(o,100))),u=Cr.subtract(l,c);return{document:new jb(new Yh(r.base.value),new um(u.map(m=>el.delete(n.getOffsetRange(new yr(m.startLineNumber,1,m.endLineNumberExclusive,1)))))),clippedRange:c}}getDocumentShorteningStrategy(){return this._statelessNextEditProvider.documentShorteningStrategy??"clipping"}get nextEditOptions(){return new Ok("firstByLineNumber",8)}async getProjectedDocumentSummarizedDocument(r,n){let i=await Z_t(this._parseService,{getText:s(()=>n.base.value,"getText"),languageId:r});if(!i)return this.getProjectedDocumentClipping(n);let o=new Yh(n.base.value),a=n.edit.edits.at(0)?.range??new Vt(0,0),l;if(n.edit.edits.length!==0){let p=n.edit.edits.at(0),g=n.edit.edits.at(-1);l=o.offsetRangeToRange(new Vt(p.range.start,g.range.endExclusive))}let c=uQe(o.offsetRangeToRange(a)),u=EH(200*50,{costFnOverride:s((p,g,y)=>{let x=uQe(y.offsetRangeToRange(p.range)),b=X_t(c,x);return b>100?!1:b},"costFnOverride")},[{overlayNodeRoot:i,document:o,selection:l}])[0],f=u.projectBack(1)-1,m=n.base.getTransformer().getPosition(f).lineNumber,h=new Cr(m,m+u.lineCount);return{document:u,clippedRange:h}}async runSnippy(r,n){n.result!==void 0&&this._snippyService.handlePostInsertion(r.toUri(),n.result.documentBeforeEdits,n.result.edit)}};oT=f0([Vs(4,a2),Vs(5,Kg),Vs(6,jH)],oT);function cQe(e,t){let r=t.projectBackOffsetEdit(e.toOffsetEdit());return Is.fromOffsetEdit(r)}s(cQe,"projectBackEdit");function uQe(e){return new Cr(e.start.line+1,e.end.line+1)}s(uQe,"lineRangeFromVSCodeRange");function X_t(e,t){return e.endLineNumberExclusive<=t.startLineNumber?t.startLineNumber-e.endLineNumberExclusive:t.endLineNumberExclusive<=e.startLineNumber?e.startLineNumber-t.endLineNumberExclusive:0}s(X_t,"lineRangeDist");async function Z_t(e,t){return await e.getTreeSitterAST(t)?.getStructure()}s(Z_t,"getStructure");function K0e(e){if(!e)throw new vn("expected value to be defined, but it was not");return e}s(K0e,"assertDefined");var J0e=class{constructor(){this.headerRequestId=tB()}static{s(this,"NextEditFetchRequest")}},X0e=class{constructor(){this._cache=new GO(10)}static{s(this,"RecentlyShownCache")}add(t,r,n){let i=this._key(t,r);this._cache.set(i,n)}get(t,r){let n=this._key(t,r);return this._cache.get(n)}remove(t){for(let r of this._cache)if(r[1][0]===t){this._cache.delete(r[0]);break}}_key(t,r){return t.uri+";"+r.value}};d();d();d();d();var Jb=0;function ZH(e){return e===0}s(ZH,"lengthIsZero");var Hf=2**26;function sT(e,t){return e*Hf+t}s(sT,"toLength");function u2(e){let t=e,r=Math.floor(t/Hf),n=t-r*Hf;return new Gl(r,n)}s(u2,"lengthToObj");function iB(e,t){let r=e+t;return t>=Hf&&(r=r-e%Hf),r}s(iB,"lengthAdd");function fQe(e,t){return e.reduce((r,n)=>iB(r,t(n)),Jb)}s(fQe,"sumLengths");function Z0e(e,t){return e===t}s(Z0e,"lengthEquals");function oB(e,t){let r=e,n=t;if(n-r<=0)return Jb;let o=Math.floor(r/Hf),a=Math.floor(n/Hf),l=n-a*Hf;if(o===a){let c=r-o*Hf;return sT(0,l-c)}else return sT(a-o,l)}s(oB,"lengthDiffNonNegative");function dQe(e,t){let r=e,n=Math.floor(r/Hf),i=r-n*Hf,o=t,a=Math.floor(o/Hf),l=o-a*Hf;return new yr(n+1,i+1,a+1,l+1)}s(dQe,"lengthsToRange");d();var aT=class{constructor(t,r,n){this.startOffset=t;this.endOffset=r;this.newLength=n}static{s(this,"TextEditInfo")}toString(){return`[${u2(this.startOffset)}...${u2(this.endOffset)}) -> ${u2(this.newLength)}`}};function hQe(e,t){if(e.length===0)return t;if(t.length===0)return e;let r=new qO(mQe(e)),n=mQe(t);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let i=r.dequeue();function o(u){if(u===void 0){let m=r.takeWhile(h=>!0)||[];return i&&m.unshift(i),m}let f=[];for(;i&&!ZH(u);){let[m,h]=i.splitAt(u);f.push(m),u=oB(m.lengthAfter,u),i=h??r.dequeue()}return ZH(u)||f.push(new sB(!1,u,u)),f}s(o,"nextS0ToS1MapWithS1LengthOf");let a=[];function l(u,f,m){if(a.length>0&&Z0e(a[a.length-1].endOffset,u)){let h=a[a.length-1];a[a.length-1]=new aT(h.startOffset,f,iB(h.newLength,m))}else a.push({startOffset:u,endOffset:f,newLength:m})}s(l,"pushEdit");let c=Jb;for(let u of n){let f=o(u.lengthBefore);if(u.modified){let m=fQe(f,p=>p.lengthBefore),h=iB(c,m);l(c,h,u.lengthAfter),c=h}else for(let m of f){let h=c;c=iB(c,m.lengthBefore),m.modified&&l(h,c,m.lengthAfter)}}return a}s(hQe,"combineTextEditInfos");var sB=class e{constructor(t,r,n){this.modified=t;this.lengthBefore=r;this.lengthAfter=n}static{s(this,"LengthMapping")}splitAt(t){let r=oB(t,this.lengthAfter);return Z0e(r,Jb)?[this,void 0]:this.modified?[new e(this.modified,this.lengthBefore,t),new e(this.modified,Jb,r)]:[new e(this.modified,t,t),new e(this.modified,r,r)]}toString(){return`${this.modified?"M":"U"}:${u2(this.lengthBefore)} -> ${u2(this.lengthAfter)}`}};function mQe(e){let t=[],r=Jb;for(let n of e){let i=oB(r,n.startOffset);ZH(i)||t.push(new sB(!1,i,i));let o=oB(n.startOffset,n.endOffset);t.push(new sB(!0,o,n.newLength)),r=n.endOffset}return t}s(mQe,"toLengthMapping");var aB=class e{constructor(t){this.edits=t}static{s(this,"TextLengthEdit")}static{this.empty=new e([])}static fromTextEdit(t){let r=t.edits.map(n=>new ej(n.range,Gl.ofText(n.newText)));return new e(r)}static _fromTextEditInfo(t){let r=t.map(n=>{let i=u2(n.newLength);return new ej(dQe(n.startOffset,n.endOffset),new Gl(i.lineCount,i.columnCount))});return new e(r)}_toTextEditInfo(){return this.edits.map(t=>new aT(sT(t.range.startLineNumber-1,t.range.startColumn-1),sT(t.range.endLineNumber-1,t.range.endColumn-1),sT(t.newLength.lineCount,t.newLength.columnCount)))}compose(t){let r=this._toTextEditInfo(),n=t._toTextEditInfo(),i=hQe(r,n);return e._fromTextEditInfo(i)}getRange(){if(this.edits.length!==0)return yr.fromPositions(this.edits[0].range.getStartPosition(),this.edits.at(-1).range.getEndPosition())}toString(){return`[${this.edits.join(", ")}]`}},ej=class{constructor(t,r){this.range=t;this.newLength=r}static{s(this,"SingleTextEditLength")}toString(){return`{ range: ${this.range}, newLength: ${this.newLength} }`}};d();var tj=class{constructor(t){this.documents=t;Pl(t.length>0)}static{s(this,"HistoryContext")}getMostRecentDocument(){return this.documents.at(-1)}getDocument(t){return this.documents.find(r=>r.docId===t)}getDocumentAndIdx(t){let r=this.documents.findIndex(n=>n.docId.uri===t.uri);if(r!==-1)return{doc:this.documents[r],idx:r}}},rj=class{constructor(t,r,n,i,o){this.docId=t;this.languageId=r;this.base=n;this.lastEdits=i;this.lastSelection=o;this.lastEdit=new Yc(this.base,this.lastEdits.compose())}static{s(this,"DocumentHistory")}};d();var nj=class extends Cs{constructor(){super();this.branch=Ih("branchName",void 0);this._register(Fne((r,n)=>{this.init(n)}))}static{s(this,"ObservableGitStub")}async init(r){}};var oj=class extends Cs{constructor(r,n=!1){super();this._documentState=new Map;this._lastDocuments=new tue(50);this.workspace=r,this._lastGitCheckout=void 0,this._started=!1,n||this.start()}static{s(this,"NesHistoryContextProvider")}start(){if(this._started)return;this._started=!0;let r=new nj;this._register(Wv(n=>{n.readObservable(r.branch)!==void 0&&(this._lastGitCheckout=B9(),this._documentState.forEach(o=>o.applyAllEdits()))})),If(this,this.workspace.openDocuments,(n,i)=>{let o=n.selection.get().at(0),a=new eue(n.id,n.value.get().value,n.languageId.get(),o);this._documentState.set(a.docId,a),o&&this._lastDocuments.push(a),i.add(Ag(this,{value:n.value,selection:n.selection,languageId:n.languageId},l=>{l.languageId.changes.length>0&&(a.languageId=l.languageId.value);let c=this._isAwaitingGitCheckoutCooldown();for(let u of l.value.changes)this._lastDocuments.push(a),a.handleEdit(u,c);l.selection.changes.length>0&&(a.handleSelection(l.selection.value.at(0)),this._lastDocuments.push(a))})),i.add(_a(()=>{let l=this._documentState.get(n.id);l&&this._lastDocuments.remove(l),this._documentState.delete(n.id)}))},n=>n.id).recomputeInitiallyAndOnChange(this._store)}async getHistoryContext(r,n=5,i=100){let o=this._documentState.get(r);if(!o||!this._lastDocuments.has(o)||!await this.workspace.getDocument(r))return;let a=[],l=!1;for(let c of this._lastDocuments.getItemsReversed()){let u=c.getRecentEdit(n,i);if(u!==void 0){if(u.editCount===0&&l)break;if(await this.workspace.getDocument(c.docId)&&(c.docId===r&&(l=!0),a.push(u.history),n-=u.editCount,n<=0))break}}if(a.reverse(),!!a.some(c=>c.docId===r))return new tj(a)}_isAwaitingGitCheckoutCooldown(){if(!this._lastGitCheckout)return!1;let r=B9()-this._lastGitCheckout<2*1e3;return r||(this._lastGitCheckout=void 0),r}getRecentDocumentUris(){return this._lastDocuments.getItems().map(r=>r.docId.uri)}},eue=class e{constructor(t,r,n,i){this.docId=t;this.languageId=n;this._edits=[];this._isUserDocument=!1;this._baseValue=new Hl(r),this._currentValue=this._baseValue,this.handleSelection(i)}static{s(this,"DocumentState")}static{this.MAX_EDITED_LINES_PER_EDIT=10}static{this.MAX_EDITED_CHARS_PER_EDIT=5e3}getSelection(){return this._selection}handleSelection(t){t&&(this._isUserDocument=!0),this._selection=t}handleEdit(t,r){if(t.isEmpty())return;this._currentValue=this._currentValue.apply(t);let n=D9.fromEdit(t,this._currentValue),i=aB.fromTextEdit(n);if(r){this._baseValue=this._currentValue,this._edits=[];return}function o(l){return ij(l.edits,c=>c.newText.length)}s(o,"editInsertSize");let a=this._edits.at(-1);a&&o(a.edit)<200&&eSt(t,a.edit)?(a.edit=a.edit.compose(t),a.textLengthEdit=a.textLengthEdit.compose(i),a.instant=B9(),a.edit.isEmpty()&&this._edits.pop()):this._edits.push({edit:t,textLengthEdit:i,instant:B9()})}getRecentEdit(t,r){if(!this._isUserDocument)return;let{editCount:n}=this._applyStaleEdits(t,r),i=new Hg(this._edits.map(o=>o.edit));return{history:new rj(this.docId,this.languageId,this._baseValue,i,this._selection),editCount:n}}applyAllEdits(){this._baseValue=this._currentValue,this._edits=[]}_applyStaleEdits(t,r){let n=this._currentValue,i=Is.empty,o=aB.empty,a,l=0,c=Is.empty;for(a=this._edits.length-1;a>=0;a--){let u=this._edits[a];if(B9()-u.instant>10*60*1e3)break;let f=u.textLengthEdit.compose(o),m=f.getRange();gH(m,"we only compose non-empty Edits");let h=m.endLineNumber-m.startLineNumber;if(r>0&&h>r)break;let p=ij(u.textLengthEdit.edits,B=>B.range.endLineNumber-B.range.startLineNumber+B.newLength.lineCount);if(p>e.MAX_EDITED_LINES_PER_EDIT||ij(u.edit.edits,B=>B.newText.length)>e.MAX_EDITED_CHARS_PER_EDIT||ij(u.edit.edits,B=>B.range.length)>e.MAX_EDITED_CHARS_PER_EDIT)break;if(a===this._edits.length-1)c=u.edit;else{let B=Is.trySwap(u.edit,c);if(B)c=B.e1;else{if(p>=2)break;c=u.edit.compose(c)}}let x=u.edit.inverseOnString(n.value);n=n.apply(x);let b=u.edit.compose(i),E=Fo.fromEdit(new Yc(n,b)),k=new jg(n,E).removeCommonSuffixPrefixLines().edit.edits.length;if(k>t)break;l=k,i=b,o=f}for(let u=0;u<=a;u++){let f=this._edits[u];this._baseValue=this._baseValue.apply(f.edit)}return this._edits=this._edits.slice(a+1),{editCount:l}}toString(){return new Hg(this._edits.map(t=>t.edit)).toHumanReadablePatch(this._baseValue)}};function ij(e,t){let r=0;for(let n of e)r+=t(n);return r}s(ij,"sum");function eSt(e,t){let r=t.getNewRanges();return e.edits.every(n=>tSt(n.range,r))}s(eSt,"editExtends");function tSt(e,t){return t.some(r=>e.start===r.endExclusive||e.endExclusive===r.start)}s(tSt,"doesTouch");var tue=class{constructor(t){this.maxSize=t;this._arr=[]}static{s(this,"FifoSet")}push(t){let r=this._arr.indexOf(t);r!==-1?this._arr.splice(r,1):this._arr.length>=this.maxSize&&this._arr.shift(),this._arr.push(t)}remove(t){let r=this._arr.indexOf(t);r!==-1&&this._arr.splice(r,1)}getItems(){return this._arr}getItemsReversed(){let t=[...this._arr];return t.reverse(),t}has(t){return this._arr.indexOf(t)!==-1}};var pQe=10,Kh=class{constructor(t){this.lastResultsById=new un(pQe);this.lastResultsByUri=new un(pQe);this.ctx=t}static{s(this,"NextEditSuggestionsManager")}async handleNextEditRequest(t,r,n){let i=await(this.nextEditProvider??=this.createNextEditProvider()),o=this.lastResultsByUri.get(t);o&&(this.lastResultsByUri.delete(t),this.lastResultsById.delete(o.resultId),i.handleRejection(o.documentId,o.nextEditResult));let a=Vh.create(t),l=await i.getNextEdit(a,{triggerKind:1},n);if(l.result==null)return;let c=await this.ctx.get(Vr).getTextDocument({uri:t});if(!c)return;let u=c.positionAt(l.result.edit.range.start),f=c.positionAt(l.result.edit.range.endExclusive),m=_r(),h={resultId:m,nextEditResult:l,documentId:a};return this.lastResultsById.set(m,h),this.lastResultsByUri.set(t,h),[{edit:{text:l.result?.edit.newText??"",range:{start:u,end:f},textDocument:{uri:t,version:r}},id:m}]}async handleAcceptance(t){let r=await this.nextEditProvider,n=this.lastResultsById.get(t);!r||!n||n.resultId===t&&(this.lastResultsByUri.delete(n.resultId),this.lastResultsById.delete(n.resultId),await r.handleAcceptance(n.documentId,n.nextEditResult))}async handleShown(t){let r=await this.nextEditProvider,n=this.lastResultsById.get(t);!r||!n||n.resultId===t&&r.handleShown(n.nextEditResult)}async createNextEditProvider(){let t=await aQe(this.ctx),r;try{let o=await this.ctx.get(or).updateExPValuesAndAssignments(),a=rSt(this.ctx,o);r=t.createInstance(a?Jg:c2)}catch{r=t.createInstance(c2)}let n=this.ctx.get(Xg),i=new oj(n);return t.createInstance(oT,n,r,i,new MH(n))}};function rSt(e,t){let r=Vn(e,Rt.NESXTab);return r!==void 0?r:e.get(or).enableNESXTab(t)}s(rSt,"shouldUseXTab");d();var gQe=Ze(ii());var sj=class extends Xg{constructor(r,n=!1){super();this._openDocuments=Ih(this,[]);this.openDocuments=this._openDocuments;this._documents=new Map;this._started=!1;this.ctx=r,this._started=!1,n||this.start()}static{s(this,"ObservableLspWorkspace")}start(){if(this._started)return;this._started=!0;let r=this.ctx.get(Vr);for(let n of r.getTextDocumentsUnsafe())n&&this.addLspDocument(n.uri,n.clientLanguageId,n.getText());r.onDidOpenTextDocument(async n=>{this.addLspDocument(n.document.uri,n.document.languageId,n.document.text)}),r.onDidCloseTextDocument(async n=>{this.removeClosedLspDocument(n.document.uri)}),r.onDidChangeTextDocument(async n=>{this.onDidChangeLspDocument(n.document.uri,n.contentChanges)})}addLspDocument(r,n,i){let o=Vh.create(r);return this.addDocument({id:o,initialValue:i,languageId:Ub.create(n)},void 0)}onDidChangeLspDocument(r,n){let i=Vh.create(r),o=this._documents.get(i);o&&o.applyLspContentChanges(n)}onUserPositionChange(r,n){let i=Vh.create(r),o=this._documents.get(i);o&&o.updateSelectionFromLspPosition(n)}removeClosedLspDocument(r){let n=Vh.create(r);this._documents.get(n)?.dispose()}addDocument(r,n=void 0){let i=this._documents.get(r.id);if(i)return i;let o=new rue(r.id,new Hl(r.initialValue??""),[],r.languageId??Ub.PlainText,()=>{this._documents.delete(r.id);let a=this._openDocuments.get(),l=a.filter(c=>c.id!==o.id);l.length!==a.length&&this._openDocuments.set(l,n,{added:[],removed:[o]})},r.workspaceRoot);return this._documents.set(r.id,o),this._openDocuments.set([...this._openDocuments.get(),o],n,{added:[o],removed:[]}),o}async getDocument(r){if(await this.ctx.get(Vr).getTextDocument(r))return this._documents.get(r)}clear(){this._openDocuments.set([],void 0,{added:[],removed:this._openDocuments.get()});for(let r of this._documents.values())r.dispose();this._documents.clear()}getWorkspaceRoot(r){return this._documents.get(r)?.workspaceRoot}},rue=class extends FH{static{s(this,"MutableObservableLspDocument")}constructor(t,r,n,i,o,a){super(t,r,n,i,o,a)}applyLspContentChanges(t){let r=this.editFromLspContentChanges(t);this.applyEdit(r.compose(),void 0)}updateSelectionFromLspPosition(t){let r=this.value.get().getTransformer().getOffset(new mn(t.lineNumber+1,t.column+1));this.updateSelection([new Vt(r,r)])}editFromLspContentChanges(t){return new Hg(t.map(n=>this.editFromLspContentChange(n)))}editFromLspContentChange(t){if(gQe.TextDocumentContentChangeEvent.isIncremental(t)){let r=this.value.get().getTransformer(),n=r.getOffset(new mn(t.range.start.line+1,t.range.start.character+1)),i=r.getOffset(new mn(t.range.end.line+1,t.range.end.character+1));if(n>i)throw new vn(`Invalid range: [${n}, ${i}) from ${JSON.stringify(t.range)}`);return Is.replace(new Vt(n,i),t.text)}throw new Error("Full replacement edits are not supported")}};d();var f3=require("fs"),AQe=require("os"),yQe=Ze(require("path")),lT=require("process");var yc=class{static{s(this,"PersistenceManager")}},nue=class extends yc{constructor(r){super();this.directory=r}static{s(this,"FilePersistenceManager")}async read(r,n){try{return(await this.readJsonObject(r))[n]}catch{return}}async update(r,n,i){await f3.promises.mkdir(this.directory,{recursive:!0,mode:448});let o=`${this.directory}/${r}.json`,a=await this.readJsonObject(r);a[n]=i,await f3.promises.writeFile(o,JSON.stringify(a)+`
`,{encoding:"utf8"})}async delete(r,n){let i=`${this.directory}/${r}.json`;try{let o=await this.readJsonObject(r);delete o[n];let a=JSON.stringify(o)+`
`;a===`{}
`?await f3.promises.rm(i):await f3.promises.writeFile(i,a,{encoding:"utf8"})}catch{}}async deleteSetting(r){let n=`${this.directory}/${r}.json`;try{await f3.promises.rm(n)}catch{}}async listSettings(){try{return(await f3.promises.readdir(this.directory)).filter(n=>n.endsWith(".json")).map(n=>n.slice(0,-5))}catch{return[]}}async listKeys(r){return Object.keys(await this.readJsonObject(r))}async readJsonObject(r){let n=`${this.directory}/${r}.json`;try{let i=await f3.promises.readFile(n,{encoding:"utf8"});return JSON.parse(i)}catch{return{}}}};function nSt(){return lT.env.XDG_CONFIG_HOME&&yQe.isAbsolute(lT.env.XDG_CONFIG_HOME)?lT.env.XDG_CONFIG_HOME+"/github-copilot":(0,AQe.platform)()==="win32"?lT.env.USERPROFILE+"\\AppData\\Local\\github-copilot":lT.env.HOME+"/.config/github-copilot"}s(nSt,"getXdgConfigPath");function CQe(){return new nue(nSt())}s(CQe,"makeXdgPersistenceManager");d();var xQe=require("crypto"),r1=Ze(require("fs/promises")),vQe=require("os"),f2=Ze(require("path"));var d2=class{constructor(t){this.ctx=t;this.logger=new Gt("ripgrep")}static{s(this,"RipgrepPathResolver")}async resolvePath(){if(this.rgPath)return this.rgPath;let t=process.platform,r=process.arch;return this.rgPath=await this.resolvePathByOs(t,r),this.rgPath}async resolvePathByOs(t,r){if(this.logger.debug(this.ctx,`Start resolving ripgrep path for platform: ${t} and architecture: ${r}`),r!=="arm64"&&r!=="x64")throw new Error(`Unsupported architecture: ${r}`);let n=t==="win32"?"rg.exe":"rg";this.logger.debug(this.ctx,`__filename is ${__filename}, __dirname is ${__dirname}`);let i=f2.extname(__filename)===".ts"?f2.resolve(__dirname,"../../../packages/ripgrep/bin"):f2.resolve(__dirname,"./bin"),o=f2.resolve(i,t,r,n);if("pkg"in process){this.logger.debug(this.ctx,"Running inside pkg binary, start to copy ripgrep to a temporary location");let a=await r1.readFile(o),l=(0,xQe.createHash)("sha256").update(a).digest("hex"),c=f2.join((0,vQe.homedir)(),".cache/pkg",l);await r1.mkdir(c,{recursive:!0});let u=Pi(ll(o)),f=f2.join(c,u);try{await r1.stat(f)}catch{await r1.copyFile(o,f),this.logger.debug(this.ctx,`Copied ripgrep to ${f}`)}o=f,t!=="win32"&&await r1.chmod(o,493).catch(m=>{this.logger.error(this.ctx,`Failed to set executable permission for ${o}: ${m}`)})}return o}};d();var bQe=require("child_process"),iue=require("perf_hooks");var m2=new Gt("ripgrepProcessManager"),Jh=class{constructor(t,r,n){this.ctx=t;this.defaultTimeoutInMs=30*1e3;this.maxProcesses=4;this.maxPendingTasks=20;this.taskQueue=[];this.activeProcesses=new Set;this.maxProcesses=r??this.maxProcesses,this.maxPendingTasks=n??this.maxPendingTasks,m2.debug(this.ctx,`initialized with maxProcesses: ${this.maxProcesses} and maxPendingTasks: ${this.maxPendingTasks}`)}static{s(this,"RipgrepProcessManager")}dispose(){m2.debug(this.ctx,`Disposing ripgrep process manager with ${this.activeProcesses.size} active processes`),this.activeProcesses.forEach(t=>{if(!t.killed)try{t.kill()}catch(r){m2.error(this.ctx,"Failed to kill process. ",r)}}),this.activeProcesses.clear()}execute(t,r,n,i,o){return new Promise((a,l)=>{if(this.taskQueue.length>=this.maxPendingTasks){m2.error(this.ctx,`Task queue limit reached: ${this.maxPendingTasks}`),l(new Error(`Task queue limit of ${this.maxPendingTasks} reached`));return}if(o!==void 0&&o<=0){m2.error(this.ctx,`Invalid timeout value: ${o}`),l(new Error(`Invalid timeout value: ${o}`));return}m2.debug(this.ctx,`Adding task to queue: ${t} ${r.join(" ")}`),this.taskQueue.push({id:hG(),command:t,args:r,options:i,resolve:a,reject:l,timeoutInMs:o??this.defaultTimeoutInMs,token:n});let c=this.taskQueue.map(u=>this.getTaskSimpleInfo(u)).join(`
`);m2.debug(this.ctx,`Current task queue length: ${this.taskQueue.length}, task list: ${c}`),this.runNextTask()})}runNextTask(){if(this.taskQueue.length===0||this.activeProcesses.size>=this.maxProcesses)return;let t=this.taskQueue.shift(),r=iue.performance.now();m2.debug(this.ctx,`Starting task: ${this.getTaskSimpleInfo(t)}`);try{let n=(0,bQe.spawn)(t.command,t.args,t.options);this.activeProcesses.add(n);let i="",o="",a,l=s(()=>{a&&clearTimeout(a),this.activeProcesses.delete(n),n.stdout?.removeAllListeners(),n.stderr?.removeAllListeners(),n.removeAllListeners()},"cleanup");t.timeoutInMs&&(a=setTimeout(()=>{n.killed||(n.kill(),t.reject(new Error(`Process timed out after ${t.timeoutInMs} ms. Partial output: ${i}`))),l(),this.runNextTask()},t.timeoutInMs)),t.token&&t.token.onCancellationRequested(()=>{n.killed||(n.kill(),t.reject(new Error("Process was cancelled. Partial output: "+i))),l(),this.runNextTask()}),n.stdout?.on("data",c=>{i+=c.toString()}),n.stderr?.on("data",c=>{o+=c.toString()}),n.on("close",c=>{let f=iue.performance.now()-r;m2.debug(this.ctx,`Task ${t.id} completed in ${f} ms`),l(),c===0?t.resolve(i):c===1?t.resolve(""):t.reject(new Error(`Process exited with code ${c}: ${o}`)),this.runNextTask()}),n.on("error",c=>{l(),t.reject(new Error(`Failed to start process: ${c.message}`)),this.runNextTask()})}catch(n){t.reject(new Error(`Error spawning process: ${n.message}`)),this.runNextTask()}}getTaskSimpleInfo(t){return`${t.id} - ${t.command} ${t.args.join(" ")}`}};d();d();d();var EQe=Ze(require("node:events"));var aj="onWorkspaceWatcherChanged";var lj=class{constructor(t,r){this.ctx=t;this.workspaceFolder=r;this.emitter=new EQe.default;this.status="created",this.startWatching()}static{s(this,"WorkspaceWatcher")}onFileChange(t){this.emitter.on(aj,rf(this.ctx,t,"WorkspaceWatcher.onFileChange"))}onFilesCreated(t){this.emitter.emit(aj,{type:"create",documents:t,workspaceFolder:this.workspaceFolder})}onFilesUpdated(t){this.emitter.emit(aj,{type:"update",documents:t,workspaceFolder:this.workspaceFolder})}onFilesDeleted(t){this.emitter.emit(aj,{type:"delete",documents:t,workspaceFolder:this.workspaceFolder})}};var Jc=class{constructor(t){this.ctx=t;this.watchers=new un(25)}static{s(this,"WorkspaceWatcherProvider")}getWatcher(t){let r=this.watchers.get(t.uri);if(r)return r;let n=this.getParentFolder(t.uri);return n?this.watchers.get(n):void 0}getParentFolder(t){return[...this.watchers.keys()].find(n=>{let i=n.replace(/[#?].*/,"").replace(/\/?$/,"/");return t!==n&&t.startsWith(i)})}hasWatcher(t){return this.getParentFolder(t.uri)||this.getWatcher(t)!==void 0}startWatching(t){if(Kr.debug(this.ctx,`WorkspaceWatcherProvider - Start watching workspace ${t.uri}`),this.hasWatcher(t)){this.getWatcher(t)?.startWatching();return}let r=this.createWatcher(t);this.watchers.set(t.uri,r)}stopWatching(t){this.getWatcher(t)?.stopWatching()}terminateSubfolderWatchers(t){let r=[];for(let o of this.watchers.values())r.push(o.workspaceFolder);let n=t.uri.replace(/[#?].*/,"").replace(/\/?$/,"/"),i=r.filter(o=>o.uri!==t.uri&&o.uri.startsWith(n));for(let o of i)this.terminateWatching(o);return i}terminateWatching(t){if(this.getWatcher(t)?.status!=="stopped")return this.stopWatching(t),this.watchers.delete(t.uri);this.watchers.delete(t.uri)}onFileChange(t,r){this.getWatcher(t)?.onFileChange(r)}async getWatchedFiles(t){return await this.getWatcher(t)?.getWatchedFiles()??[]}getStatus(t){return this.getWatcher(t)?.status}};var cT=class{static{s(this,"WorkspaceLifecycleListener")}start(){}onWorkspaceAdded(t){}onWorkspaceRemoved(t){}onWorkspaceSubfoldersTerminated(t,r){}onFileChange(t){}},iSt="workspaceLifecycleManager",Xc=new Gt(iSt),n1=class e{constructor(t){this.ctx=t;this.activeListeners=[];this.watchedWorkspaces=[];this.ctx=t;let r=Ks(t,async()=>{r.dispose(),await this.start()})}static{s(this,"WorkspaceLifecycleManager")}async start(){for(let t of this.activeListeners)await t.isEnabled()?t.isStarted()?Xc.debug(this.ctx,`listener ${t.constructor.name} is already started`):(Xc.debug(this.ctx,`starting listener ${t.constructor.name}`),await t.start()):Xc.debug(this.ctx,`listener ${t.constructor.name} is not enabled`);Xc.debug(this.ctx,"WorkspaceLifecycleManager started"),this.ctx.get(Lf).onChange(t=>{this.onWorkspacesAdded(t.added,this.ctx),this.onWorkspacesRemoved(t.removed,this.ctx)}),await this.onWorkspacesAdded(this.ctx.get(Vr).getWorkspaceFolders(),this.ctx)}static isSubfolder(t,r){let n=t.uri,i=r.uri.replace(/[#?].*/,"").replace(/\/?$/,"/");return n!==i&&n.startsWith(i)}async onWorkspacesAdded(t,r){if(!t.length){Xc.debug(r,"No workspaces to add.");return}Xc.debug(r,`Adding workspaces: ${t.map(l=>l.uri).join(", ")}`);let n=[...this.watchedWorkspaces,...t];Xc.debug(r,`Combined workspaces: ${n.map(l=>l.uri).join(", ")}`);let i=n.filter((l,c,u)=>u.findIndex(f=>f.uri===l.uri)===c&&!u.some(f=>e.isSubfolder(l,f)));Xc.debug(r,`Filtered workspaces: ${i.map(l=>l.uri).join(", ")}`);let o=i.filter(l=>!this.watchedWorkspaces.some(c=>c.uri===l.uri));Xc.debug(r,`New workspaces: ${o.map(l=>l.uri).join(", ")}`);let a=this.watchedWorkspaces.filter(l=>!i.some(c=>c.uri===l.uri));Xc.debug(r,`Removed workspaces: ${a.map(l=>l.uri).join(", ")}`),this.watchedWorkspaces=i;for(let l of a){Xc.debug(r,`Terminating watching for removed workspace: ${l.uri}`),r.get(Jc).terminateWatching(l);for(let u of this.activeListeners)Xc.debug(r,`Notifying listener of removed workspace: ${l.uri}`),await u.onWorkspaceRemoved(l)}for(let l of o){if(!l.uri)continue;Xc.debug(r,`Starting to watch new workspace: ${l.uri}`);let c=r.get(Jc);if(c.shouldStartWatching(l)){c.startWatching(l);let u=c.terminateSubfolderWatchers(l);if(u.length){Xc.debug(r,`Terminated subfolder watchers for workspace: ${l.uri}, Subfolders: ${u.map(f=>f.uri).join(", ")}`);for(let f of this.activeListeners)await f.onWorkspaceSubfoldersTerminated(l,u)}for(let f of this.activeListeners)Xc.debug(r,`Adding file change listener for workspace: ${l.uri}`),c.onFileChange(l,f.onFileChange.bind(f))}}for(let l of this.activeListeners)for(let c of o)Xc.debug(r,`Notifying ${l.constructor.name} of added workspace: ${c.uri}`),await l.onWorkspaceAdded(c)}async onWorkspacesRemoved(t,r){if(t.length)for(let n of t){if(!n.uri)continue;r.get(Jc).terminateWatching(n),this.watchedWorkspaces=this.watchedWorkspaces.filter(o=>o.uri!==n.uri);for(let o of this.activeListeners)await o.onWorkspaceRemoved(n)}}addListener(t){this.activeListeners.push(t)}removeListener(t){this.activeListeners=this.activeListeners.filter(r=>r!==t)}removeAllListeners(){this.activeListeners=[]}};function cj(e){e.set(n1,new n1(e))}s(cj,"setupWorkspaceLifecycleListener");d();d();var pl=class extends Error{static{s(this,"CanceledError")}constructor(){super("Canceled"),this.name="Canceled"}};d();var uj=class{constructor(){this._tools=new Map}static{s(this,"ToolRegistry")}registerTool(t){this._tools.set(t.id,t)}unregisterTool(t){return this._tools.delete(t)}getTool(t){return this._tools.get(t)}listTools(){return Array.from(this._tools.values())}};d();d();d();d();var m3={id:"copilot",displayName:"Copilot Language Server",description:"Copilot Language Server tool provider",isFirstPartyTool:!0},i1={id:"copilot-editor",displayName:"Editor",description:"Editor tool provider",isFirstPartyTool:!0},oue=class{static{s(this,"LanguageModelTool")}constructor(t){this.type=t.type,this.toolProvider=t.toolProvider,this.name=t.name,this.displayName=t.displayName??this.name,this.description=t.description,this.displayDescription=t.displayDescription??this.description,this.inputSchema=t.inputSchema,this.annotations=t.annotations,this.id=`${this.toolProvider.id}.${this.name}`,this.nameForModel=this.toolProvider.isFirstPartyTool?this.name:`${this.toolProvider.id}_${this.name}`}},d3=class extends oue{static{s(this,"BaseLanguageModelTool")}constructor(t){super(t)}},Ci=class{static{s(this,"LanguageModelTextPart")}constructor(t){this.value=t}},Xb=class{static{s(this,"LanguageModelDataPart")}constructor(t){this.value=t}},Zb=class{static{s(this,"LanguageModelPromptTsxPart")}constructor(t){this.value=t}};var Gi=class{static{s(this,"LanguageModelToolResult")}constructor(t,r){this.status=r,this.content=t}},TQe=I.Object({content:I.Array(I.Union([I.Object({value:I.String()}),I.Object({value:I.Unknown()})])),status:I.Optional(I.Union([I.Literal("success"),I.Literal("error"),I.Literal("cancelled")]))}),fj=(r=>(r.Accept="accept",r.Dismiss="dismiss",r))(fj||{}),wQe=I.Object({result:I.Enum(fj)});var hm=class extends d3{static{s(this,"ClsLanguageModelTool")}constructor(t){super({...t,toolProvider:m3,type:"shared"})}};d();var oSt=new Map([["copilot_semanticSearch","semantic_search"],["copilot_readFile","read_file"],["copilot_listDir","list_dir"],["copilot_getErrors","get_errors"],["copilot_runInTerminal","run_in_terminal"],["copilot_insertEdit","insert_edit_into_file"],["copilot_createFile","create_file"],["copilot_replaceString","replace_string_in_file"],["copilot_updateUserPreferences","update_user_preferences"],["copilot_fileSearch","file_search"],["copilot_findTextInFiles","grep_search"]]),sSt=new Map;for(let[e,t]of oSt)sSt.set(t,e);d();function uT(e){return`[${Pi(e)}](${e})`}s(uT,"formatUriForFileWidget");function o1(e){let t=aSt(e);if(!t)throw new Error(`Invalid input path: ${e}. Be sure to use an absolute path.`);return t}s(o1,"resolvePathInput");function aSt(e){if(e.startsWith("/")||SQe()&&cSt(e)||SQe()&&e.startsWith("\\\\"))return ll(e)}s(aSt,"resolveFsUri");function SQe(){return process.platform==="win32"}s(SQe,"isWindows");function lSt(e){return e>=65&&e<=90||e>=97&&e<=122}s(lSt,"isWindowsDriveLetter");function cSt(e){return lSt(e.charCodeAt(0))&&e.charCodeAt(1)===58}s(cSt,"hasDriveLetter");function lB(e){let t="";return e.length>0&&(t=e.map(r=>r instanceof Ci?r.value:r instanceof Zb?"":r instanceof Xb?JSON.stringify(r.value):"").join(`
`)),t===""?"(empty)":t}s(lB,"parseToolResultToString");function dj(e){let{content:t}=e;return{message:lB(t)}}s(dj,"formatToolErrorResult");function RQe(e){let{content:t}=e;return{data:t.map(r=>r instanceof Ci?{type:"text",value:r.value}:r instanceof Zb?{type:"text",value:"<unsupported>"}:r instanceof Xb?{type:"data",value:{mimeType:r.value.mimeType,data:r.value.data}}:{type:"text",value:""})}}s(RQe,"formatToolSuccessResult");var mj=class extends hm{static{s(this,"EditFileTool")}constructor(){super({name:"insert_edit_into_file",displayName:"Edit File",description:`Edit a file in the workspace. Use this tool once per file that needs to be modified, even if there are multiple changes for a file. Generate the "explanation" property first.
The system is very smart and can understand how to apply your edits to the files, you just need to provide minimal hints.
Avoid repeating existing code, instead use comments to represent regions of unchanged code. Be as concise as possible. For example:
// ...existing code...
{ changed code }
// ...existing code...
{ changed code }
// ...existing code...
Here is an example of how you should use format an edit to an existing Person class:
class Person {
// ...existing code...
age: number;
// ...existing code...
getAge() {
return this.age;
}
}`,displayDescription:"Edit a file in the workspace.",inputSchema:I.Object({filePath:I.String({description:"The absolute path of the file to edit."}),code:I.String({description:`The code change to apply to the file.
The system is very smart and can understand how to apply your edits to the files, you just need to provide minimal hints.
Avoid repeating existing code, instead use comments to represent regions of unchanged code. Be as concise as possible. For example:
// ...existing code...
{ changed code }
// ...existing code...
{ changed code }
// ...existing code...
Here is an example of how you should use format an edit to an existing Person class:
class Person {
// ...existing code...
age: number;
// ...existing code...
getAge() {
return this.age;
}
}`}),explanation:I.String({description:"A short explanation of the edit being made."})})})}async invoke(t,r,n){try{let i=await this.mapCode(r.input,t,n),o=await this.invokeClientEditFileTool(t,r,i,n);return this.getFinalEditFileResult(r,o)}catch(i){let o=i instanceof Error?i.message:"An unknown error occurred";return new Gi([new Ci(o)],"error")}}async mapCode(t,r,n){let{filePath:i}=t,o=o1(i);if(!o)throw new Error(`Invalid file path: ${i}`);return await new R9(r.ctx).mapCode({code:t.code,resource:o,markdownBeforeBlock:t.explanation},n,void 0,!0)}async invokeClientEditFileTool(t,r,n,i){let o=t.ctx.get(Zc).getToolByNameAndProvider("insert_edit_into_file",i1);if(!o)throw new Error("Client tool insert_edit_into_file is not registered");return t.ctx.get(Zc).invokeTool(t,o.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,code:n,explanation:r.input.explanation},roundId:r.roundId,toolCallId:r.toolCallId},i)}getFinalEditFileResult(t,r){if(r.status!=="success")return r;let n=lB(r.content),i=v8({uri:o1(t.input.filePath),languageId:"UNKNOWN"}),o=[];o.push(`<file_after_edit path="${t.input.filePath}">`),o.push("This is the new state of the file after the edit. Base future edits off of this file, no need to read it again, unless a terminal command may have changed it.");let a=new Mf({code:n,languageId:i,noFilePath:!0});return o.push(...a.renderAsArray()),o.push("</file_after_edit>"),new Gi([new Ci(o.join(`
`))],"success")}prepareInvocation(t,r){let{input:n}=t;if(!n.filePath.length)return{progressMessage:"Running insert_edit_into_file tool"};let i=o1(n.filePath);return{progressMessage:`Editing ${uT(i)}`}}static toEditFileParams(t){if(typeof t.filePath!="string")throw new Error("filePath must be a string");if(typeof t.code!="string")throw new Error("code must be a string");if(typeof t.explanation!="string")throw new Error("explanation must be a string");return{filePath:t.filePath,code:t.code,explanation:t.explanation}}};d();var kQe=new Gt("findFilesTool"),hj=class e extends hm{static{s(this,"FindFilesTool")}static{this.timeOutInSeconds=15}constructor(){super({name:"file_search",displayName:"Find Files",description:`Search for files in the workspace by glob pattern. This only returns the paths of matching files. Use this tool when you know the exact filename pattern of the files you're searching for. Glob patterns match from the root of the workspace folder. Examples:
- **/*.{js,ts} to match all js/ts files in the workspace.
- src/** to match all files under the top-level src folder.
- **/foo/**/*.js to match all js files under any foo folder in the workspace.`,displayDescription:"Search for files in the workspace by glob pattern.",inputSchema:I.Object({query:I.String({description:"Search for files with names or paths matching this glob pattern."}),maxResults:I.Optional(I.Number({description:"The maximum number of results to return. Do not use this unless necessary, it can slow things down. By default, only some matches are returned. If you use this and don't see what you're looking for, you can try again with a more specific query or a larger maxResults."}))})})}async invoke(t,r,n){try{let i;try{if(n.isCancellationRequested)return new Gi([new Ci("Cancelled")],"cancelled");i=await t.ctx.get(d2).resolvePath()}catch(g){throw new Error(`Failed to run file_search since failed to get ripgrep path: ${String(g)}`)}let{query:o,maxResults:a=20}=r.input,l=t.turn.workspaceFolders;if(!l?.length)return new Gi([new Ci("Failed to invoke tool file_search since no workspace folders found")],"error");let c=t.ctx.get(Jh),u={},f=l.map(async g=>{if(n.isCancellationRequested)throw new Error("Canceled");try{kQe.debug(t.ctx,`Start searching for query ${o} in workspace folder: ${g.uri.toString()}`);let y=await c.execute(i,["--files","-g",o],n,{cwd:Wa(g.uri)},e.timeOutInSeconds*1e3);kQe.debug(t.ctx,`Finished searching for query ${o} in workspace folder: ${g.uri.toString()} with results: ${y}`),u[g.uri.toString()]=y.split(`
`).map(x=>x.trim()).filter(x=>x.length>0).map(x=>`${Wa(Bo(g.uri,x))}`)}catch(y){let x=y instanceof Error?y.message:"An unknown error occurred";throw new Error(`Error processing workspace folder ${g.uri.toString()}: ${x}`)}});try{await Promise.all(f)}catch(g){let y=g instanceof Error?g.message:"An unknown error occurred";return new Gi([new Ci(y)],"error")}let m=[],h=a;for(;h>0;){let g=!1;for(let y in u)u[y].length>0&&h>0&&(m.push(u[y].shift()),h--,g=!0);if(!g)break}let p=m.length===0?`No files found matching query: ${o}`:m.length===1?`Found 1 file matching query: ${o}
${m[0]}`:`Found ${m.length} files matching query: ${o}
${m.join(`
`)}`;return new Gi([new Ci(p)],"success")}catch(i){let o=i instanceof Error?i.message:"An unknown error occurred";return new Gi([new Ci(o)],"error")}}prepareInvocation(t,r){let{input:n}=t;return n.query.length?{progressMessage:`Searching for files matching query: ${n.query}`}:{progressMessage:"Running file_search tool"}}static toFindFilesParams(t){if(typeof t.query!="string")throw new Error("query must be a string");if(t.maxResults!=null&&(typeof t.maxResults!="number"||t.maxResults<0))throw new Error("maxResults must be a positive number or undefined");return{query:t.query,maxResults:typeof t.maxResults=="number"?t.maxResults:void 0}}};d();var BQe=new Gt("findTextInFilesTool"),pj=class e extends hm{static{s(this,"FindTextInFilesTool")}static{this.timeOutInSeconds=15}constructor(){super({name:"grep_search",displayName:"Find Text In Files",description:"Do a text search in the workspace. Use this tool when you know the exact string you're searching for.",displayDescription:"Do a text search in the workspace.",inputSchema:I.Object({query:I.String({description:"The pattern to search for in files in the workspace. Can be a regex or plain text pattern"}),isRegexp:I.Optional(I.Boolean({description:"Whether the pattern is a regex. False by default."})),includePattern:I.Optional(I.String({description:"Search files matching this glob pattern. Will be applied to the relative path of files within the workspace."}))})})}async invoke(t,r,n){try{let i;try{if(n.isCancellationRequested)return new Gi([new Ci("Cancelled")],"cancelled");i=await t.ctx.get(d2).resolvePath()}catch(x){throw new Error(`Failed to run grep_search since failed to get ripgrep path: ${String(x)}`)}let{query:o,isRegexp:a=!1,includePattern:l}=r.input,c=20,u=t.turn.workspaceFolders;if(!u?.length)return new Gi([new Ci("Failed to invoke tool grep_search since no workspace folders found")],"error");let f=t.ctx.get(Jh),m={},h=u.map(async x=>{if(n.isCancellationRequested)throw new Error("Canceled");try{BQe.debug(t.ctx,`Start searching for query ${o} in workspace folder: ${x.uri.toString()}`);let b=[a?"--regexp":"--fixed-strings",o,...l?["-g",l]:[],"--no-heading","--line-number","--color","never",Wa(x.uri)],E=await f.execute(i,b,n,{cwd:Wa(x.uri)},e.timeOutInSeconds*1e3);BQe.debug(t.ctx,`Finished searching for query ${o} in workspace folder: ${x.uri.toString()} with results: ${E}`),m[x.uri.toString()]=E.split(`
`).map(_=>_.trim()).filter(_=>_.length>0)}catch(b){let E=b instanceof Error?b.message:"An unknown error occurred";throw new Error(`Error processing workspace folder ${x.uri.toString()}: ${E}`)}});try{await Promise.all(h)}catch(x){let b=x instanceof Error?x.message:"An unknown error occurred";return new Gi([new Ci(b)],"error")}let p=[],g=c;for(;g>0;){let x=!1;for(let b in m)m[b].length>0&&g>0&&(p.push(m[b].shift()),g--,x=!0);if(!x)break}let y=p.length===0?`Searched text for ${o}, no results`:p.length===1?`Searched text for: ${o}, 1 result
${p[0]}`:`Searched text for: ${o}, ${p.length} results
${p.join(`
`)}`;return new Gi([new Ci(y)],"success")}catch(i){let o=i instanceof Error?i.message:"An unknown error occurred";return new Gi([new Ci(o)],"error")}}prepareInvocation(t,r){let{input:n}=t;return n.query.length?{progressMessage:`Searching for text in files matching query: ${n.query}`}:{progressMessage:"Running grep_search tool"}}static toFindTextInFilesParams(t){if(typeof t.query!="string")throw new Error("query must be a string");if(t.isRegexp!==void 0&&typeof t.isRegexp!="boolean")throw new Error("isRegexp must be a boolean");if(t.includePattern!==void 0&&typeof t.includePattern!="string")throw new Error("includePattern must be a string");return{query:t.query,isRegexp:t.isRegexp??!1,includePattern:t.includePattern}}};d();var gj=class extends hm{static{s(this,"ListDirTool")}constructor(){super({name:"list_dir",displayName:"List Directory",description:"List the contents of a directory. Result will have the name of the child. If the name ends in /, it's a folder, otherwise a file",displayDescription:"List the contents of a directory",inputSchema:I.Object({path:I.String({description:"The absolute path to the directory to list."})})})}async invoke(t,r,n){let{path:i}=r.input,o=o1(i),l=await t.ctx.get(xo).readDirectory(o.toString());return l.length===0?new Gi([new Ci("Folder is empty")],"success"):new Gi([new Ci(l.map(([c,u])=>`${c}${u===2?"/":""}`).join(`
`))],"success")}prepareInvocation(t,r){let n=o1(t.input.path);return{progressMessage:`Reading directory ${uT(n)}`}}static toListDirParams(t){if(typeof t.path!="string")throw new Error("path must be a string");return{path:t.path}}};d();var Aj=class extends hm{static{s(this,"ReadFileTool")}constructor(){super({name:"read_file",displayName:"Read File",description:`Read the contents of a file.
You must specify the line range you're interested in, and if the file is larger, you will be given an outline of the rest of the file. If the file contents returned are insufficient for your task, you may call this tool again to retrieve more content.`,displayDescription:"Read a file in the workspace.",inputSchema:I.Object({filePath:I.String({description:"The absolute path of the file to read."}),startLineNumberBaseZero:I.Number({description:"The line number to start reading from, 0-based."}),endLineNumberBaseZero:I.Number({description:"The inclusive line number to end reading at, 0-based."})})})}async invoke(t,r,n){try{let{filePath:i,startLineNumberBaseZero:o,endLineNumberBaseZero:a}=r.input,l=o1(i);if(!l)throw new Error(`Invalid file path: ${i}`);let u=await t.ctx.get(On).getOrReadTextDocument({uri:l});if(u.status==="valid"){let f=new Mf({code:u.document.getText({start:{line:o,character:0},end:{line:a+1,character:0}}),languageId:u.document.detectedLanguageId,uri:l});return new Gi([new Ci(f.renderAsString(`
`))],"success")}else return new Gi([new Ci(`Failed to read file ${i} with result ${JSON.stringify(u)}`)],"error")}catch(i){let o=i instanceof Error?i.message:"An unknown error occurred";return new Gi([new Ci(o)],"error")}}prepareInvocation(t,r){let{input:n}=t;if(!n.filePath.length)return{progressMessage:"Running read_file tool"};let i=o1(n.filePath);return{progressMessage:`Reading file ${uT(i)}`}}static toReadFileParams(t){if(typeof t.filePath!="string")throw new Error("filePath must be a string");if(typeof t.startLineNumberBaseZero!="number")throw new Error("startLineNumberBaseZero must be a number");if(typeof t.endLineNumberBaseZero!="number")throw new Error("endLineNumberBaseZero must be a number");return{filePath:t.filePath,startLineNumberBaseZero:t.startLineNumberBaseZero,endLineNumberBaseZero:t.endLineNumberBaseZero}}};function DQe(){return[new gj,new Aj,new mj,new hj,new pj]}s(DQe,"getAllClsTools");var Zc=class{constructor(t){this.ctx=t;this._toolRegistry=new uj;for(let r of DQe())this._toolRegistry.registerTool(r)}static{s(this,"ToolsService")}registerTool(t){this._toolRegistry.registerTool(t)}unregisterTool(t){return typeof t=="string"?this._toolRegistry.unregisterTool(t):this._toolRegistry.unregisterTool(t.id)}prepareInvocation(t,r,n){let i=this._toolRegistry.getTool(t);if(!i)throw new Error(`Tool with id '${t}' is undefined`);return i.prepareInvocation?.(r,n)??{}}async invokeTool(t,r,n,i){if(i.isCancellationRequested)throw new pl;let o=this._toolRegistry.getTool(r);if(!o)throw new Error(`Tool with id '${r}' is undefined`);return await o.invoke?.(t,n,i)??new Gi([],"success")}async invokeToolConfirmation(t,r,n,i){if(i.isCancellationRequested)throw new pl;let o=this._toolRegistry.getTool(r);if(!o)throw new Error(`Tool with id '${r}' is undefined`);return await o.invokeConfirmation?.(t,n,i)??{result:"dismiss"}}getToolById(t){return this._toolRegistry.getTool(t)}getToolByNameAndProvider(t,r){return this._toolRegistry.listTools().find(n=>n.name===t&&n.toolProvider.id===r.id)}getToolsForModel(){return Array.from(this.getToolMapForModel().values())}getToolMapForModel(){let t=new Map;for(let c of this._toolRegistry.listTools())t.has(c.toolProvider.id)||t.set(c.toolProvider.id,[]),t.get(c.toolProvider.id)?.push(c);let r=t.get(m3.id)?.find(c=>c.name==="insert_edit_into_file");r&&t.get(m3.id)?.splice(t.get(m3.id)?.indexOf(r)??0,1);let n=t.get(i1.id)?.find(c=>c.name==="insert_edit_into_file");n&&t.get(i1.id)?.splice(t.get(i1.id)?.indexOf(n)??0,1);let i=new Map;r&&n&&i.set(r.nameForModel,r);let o=t.get(i1.id)??[],a=t.get(m3.id)??[],l=Array.from(t.entries()).filter(([c])=>c!==m3.id&&c!==i1.id).flatMap(([,c])=>c);return o.forEach(c=>{i.has(c.nameForModel)||i.set(c.nameForModel,c)}),a.forEach(c=>{i.has(c.nameForModel)||i.set(c.nameForModel,c)}),l.forEach(c=>{i.has(c.nameForModel)||i.set(c.nameForModel,c)}),i}};d();d();var eE=class{static{s(this,"MultiLanguageContextProviderFeatureLifecycle")}async dispose(){}};d();var LQe=require("crypto"),sue=require("fs"),aue=Ze(require("path"));var PQe="symbolDatabaseLookup",NQe="multiLanguageContextProviderDocumentSymbols",tE=class{constructor(t){this.persistenceManager=t}static{s(this,"WorkspaceDatabasePersistenceManager")}async getDBFilePath(t){await this.init();let r=await this.persistenceManager.read(PQe,t);return r||(r=await this.createDBFile(t)),aue.default.join(this.persistenceManager.directory,NQe,r)}async init(){let t=aue.default.join(this.persistenceManager.directory,NQe);await this.createIfNotExists(t)}async dirExists(t){try{return await sue.promises.access(t),!0}catch{return!1}}async createIfNotExists(t){try{await this.dirExists(t)||await sue.promises.mkdir(t,{recursive:!0})}catch{throw new Error(`Failed to create directory: ${t}`)}}async createDBFile(t){let r=`${(0,LQe.randomUUID)()}.db`;return await this.persistenceManager.update(PQe,t,r),r}async deleteDBFile(t){}};d();d();var rE=class{static{s(this,"FileSearch")}};d();var cB=class{constructor(t,r){this.workspaceUris=t;this.params=r}static{s(this,"FileWatcher")}};d();d();d();var yj=Ze(require("path")),FQe=require("worker_threads");function MQe(e,t){return new FQe.Worker(yj.default.resolve(yj.default.extname(__filename)!==".ts"?__dirname:yj.default.resolve(__dirname,"../../dist"),e),{workerData:t})}s(MQe,"createWorker");d();var Cj=class{constructor(t){this.maxDegreeOfParalellism=t;this.outstandingPromises=[],this.runningPromises=0}static{s(this,"PriorityLimiter")}queue(t,r=!1){return new Promise((n,i)=>{r?this.outstandingPromises.unshift({factory:t,c:n,e:i}):this.outstandingPromises.push({factory:t,c:n,e:i}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){let t=this.outstandingPromises.shift();this.runningPromises++;let r=t.factory();r.then(t.c,t.e),r.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this.runningPromises--,this.outstandingPromises.length>0&&this.consume()}};var QQe=Ze(ii());var xj="main.js",vj=class{constructor(t,r=3){this.promiseResolvers=new Map;this.id=0;try{let n={cwd:process.cwd(),indexWorkspaceRoots:t};this.worker=MQe(xj,n),this.worker.on("message",this.handleWorkerMessage.bind(this)),this.worker.on("error",i=>{this.handleUnexpectedError(i)}),this.postMessageQueue=new Cj(r)}catch(n){throw console.error(`Failed to create worker: ${n.message}`),n}}static{s(this,"IndexClient")}dispose(){return this.postMessageInQueue(new KM(this.id++),QQe.CancellationToken.None,!0)}async indexFile(t,r,n){return await this.postMessageInQueue(new $M(this.id++,t,r),n)}async getAllFileNames(t,r){return this.postMessageInQueue(new zM(this.id++,t),r)}getContext(t,r,n,i,o,a){return this.postMessageInQueue(new YM(this.id++,t,r,n,i,o),a,!0)}tryCreateIndex(t,r,n){return this.postMessageInQueue(new jM(this.id++,t,r),n)}async postMessageInQueue(t,r,n=!1){return this.postMessageQueue.queue(()=>this.postMessageAndWait(t,r),n)}tryRemoveIndex(t,r){return this.postMessageAndWait(new VM(this.id++,t),r)}async postMessageAndWait(t,r){if(this.fatalError)return Promise.reject(this.fatalError);let n=new Promise((o,a)=>{this.promiseResolvers.set(t.id,{resolve:o,reject:a})});this.worker.postMessage(t);let i=r.onCancellationRequested(()=>{this.worker.postMessage(new HM(t.id))});try{return await n}finally{i.dispose()}}handleWorkerMessage(t){if(t.operation!=="response")throw new Error("Unexpected message operation");let r=this.promiseResolvers.get(t.id);if(!r)throw new Error(`Received response for message that isn't in progress: ${t.id}`);this.promiseResolvers.delete(t.id),t.error?(t.error.code=t.code,r.reject(t.error)):r.resolve(t.data)}handleUnexpectedError(t){let r;if(t instanceof Error){r=t,r.code==="MODULE_NOT_FOUND"&&r.message?.endsWith(xj+"'")&&(r=new Error(`Failed to load ${xj}`),r.code="CopilotPromptLoadFailure");let n=new Error().stack;r.stack&&n?.match(/^Error\n/)&&(r.stack+=n.replace(/^Error/,""))}else t&&typeof t=="object"&&"name"in t&&"status"in t&&t.name==="ExitStatus"&&typeof t.status=="number"?(r=new Error(`${xj} exited with status ${t.status}`),r.code=`CopilotPromptWorkerExit${t.status}`):r=new Error(`Non-error thrown: ${JSON.stringify(t)}`);for(let n of this.promiseResolvers.values())n.reject(r);this.promiseResolvers.clear(),this.fatalError=r}};var uB=Ze(ii());var jf=new Gt(X5),nE=class{constructor(t,r,n,i){this.ctx=t;this.watcher=r;this.workspaceDatabasePersistenceManager=n;this.workspaceInit=new Map;this.watcher.onFileChange(async(o,a)=>{await this.indexFile(a,this.languageId(a)??"plaintext")}),this.watcher.onWorkspaceChange(async(o,a)=>{if(o===1){jf.debug(this.ctx,`workspace removed: ${a}`),await this.indexClient.tryRemoveIndex(a,uB.CancellationToken.None);return}jf.debug(this.ctx,`workspace added: ${a}`),await this.indexAddedWorkspace(a)}),this.indexClient=new vj(i);for(let o of i){let a=o.rootPath;this.workspaceInit.set(a,this.doWorkspaceIndex(a).then(()=>{jf.debug(this.ctx,`workspace ${a} indexed`),this.workspaceInit.delete(a)}))}}static{s(this,"MultiLanguageContextIndexWatcher")}isInitializing(t){for(let[r]of this.workspaceInit)if(t.startsWith(r))return!0;return!1}dispose(){return this.indexClient.dispose()}async indexAddedWorkspace(t){let r=await fSt(t,this.workspaceDatabasePersistenceManager);await this.indexClient.tryCreateIndex(r.rootPath,r.databaseFilePath,uB.CancellationToken.None),this.workspaceInit.has(t)&&await this.workspaceInit.get(t);let n=this.doWorkspaceIndex(t).then(()=>{jf.debug(this.ctx,`workspace ${t} indexed`),this.workspaceInit.delete(t)});this.workspaceInit.set(t,n)}async doWorkspaceIndex(t){jf.debug(this.ctx,`indexing workspace ${t}`);let r=Zee.map(f=>`*${f}`);if(r.length===0)return;let i=`**/${Zee.length===1?r[0]:`{${r.join(",")}}`}`,o=this.ctx.get(rE),a=await Promise.all([o.findFiles(i,{uri:t},{excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!0,excludeIDESearchIgnoredFiles:!0}),this.indexClient.getAllFileNames(t,uB.CancellationToken.None)]),l=a[0],c=a[1],u=Array.from(new Set([...l,...c]));jf.debug(this.ctx,`found ${u.length} files to index in ${t}`),await Promise.all(u.map(async f=>{let m=this.languageId(f);m&&await this.indexFile(f.replace(/\/+$/,""),m)})),jf.debug(this.ctx,`finished indexing workspace ${t}`)}async indexFile(t,r){try{jf.debug(this.ctx,`index triggered for ${t}`),await this.indexClient.indexFile(t,r,uB.CancellationToken.None)}catch(n){jf.debug(this.ctx,`failed to index ${t} with ${n}`)}}languageId(t){return $ve(t)}};async function fSt(e,t){return{databaseFilePath:await t.getDBFilePath(e),rootPath:e}}s(fSt,"createIndexableWorkspaceFolder");d();d();var OQe=100,dSt=5e3,bj=class{static{s(this,"CachedContextFetcher")}constructor(){}runWithCache(t,r,n,i,o,a,l,c){let u=Date.now(),f=this.get(n,i,r,u);if(f)return this.incrementRefCount(f),c.onCancellationRequested(()=>this.decrementRefCount(f)),f.value;if(!a)return t(r,n,i,o,l,c);let m=new Mn.CancellationTokenSource,h=s(()=>m.cancel(),"cancel"),p=t(r,n,i,o,l,m.token);return f=this.setBasedOnLastDelimiter(n,i,r,u,p,h),this.incrementRefCount(f),c.onCancellationRequested(()=>this.decrementRefCount(f)),p}get(t,r,n,i){if(this.cachedValue&&this.cachedValue.uri===n&&!(Math.abs(this.cachedValue.cursorPosition-r)>OQe)){if(r>this.cachedValue.cursorPosition){if(t.substring(this.cachedValue.cursorPosition,r).match(/[^A-Za-z0-9]/))return}else if(r<this.cachedValue.cursorPosition)return;if(!(i-this.cachedValue.timestamp>dSt))return this.cachedValue}}setBasedOnLastDelimiter(t,r,n,i,o,a){let l=t.substring(0,r),c=/[A-Za-z0-9]+$/.exec(l),u=r;c&&(u=c.index),r-u>OQe&&(u=r);let f={cursorPosition:u,uri:n,timestamp:i,fullText:t,value:o.finally(()=>{f.complete=!0}),refCount:0,cancel:a,uuid:_r(),complete:!1};return this.cachedValue=f}incrementRefCount(t){t&&t.refCount++}decrementRefCount(t){t&&!t.complete&&(t.refCount--,t.refCount<=0&&t.cancel())}};var Ej=class{constructor(t){this.id=X5;this.selector=kM.map(t=>({language:t.languageId}));try{this.documentManager=t.get(Vr),this.resolver=new lue(this.documentManager,t)}catch(r){throw jf.error(t,"Failed to create multi-language context provider",r),r}}static{s(this,"MultiLanguageContextProvider")}},lue=class{constructor(t,r){this.ctx=r;this.documentManager=t,this.cachedContextFetcher=new bj}static{s(this,"MultiLanguageContextResolver")}resolve(t,r){return this.resolveImpl(t,r)}async resolveImpl(t,r){let n=this.ctx.get(eE).indexWatcher;if(!n)return[];if(n.isInitializing(t.documentContext.uri))return[];let i=n.indexClient;try{let o=await this.documentManager.getTextDocument({uri:t.documentContext.uri});if(o===void 0||o?.version!==t.documentContext.version)return[];let a=t.documentContext.position,l=t.documentContext.proposedEdits??[],c=yg(o,a);c=c.applyEdits(l);let u=O8e(t.activeExperiments),f=await this.cachedContextFetcher.runWithCache(i.getContext.bind(i),t.documentContext.uri,c.textDocument.getText(),c.textDocument.offsetAt(c.position),t.documentContext.languageId,c.editsWithPosition.length===0,u,r);return jf.debug(this.ctx,`Context items found for ${t.documentContext.uri}: ${f.map(m=>JSON.stringify(m)).join(", ")}`),f}catch(o){if(yM(o))return[];throw jf.error(this.ctx,"Failed to get context",o),o}}};var fB=class extends cT{constructor(r){super();this.started=!1;this.ctx=r,this.ctx.get(n1).addListener(this)}static{s(this,"AgentMultiLanguageContextProvider")}async start(){if(!this.started&&await this.isEnabled()&&!this.ctx.get(ul).providers.some(r=>r.id===X5)){let r=this.ctx.get(tE);this.fileWatcher=new cue([],{excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!1,excludeIDESearchIgnoredFiles:!1}),this.multiLanguageContextIndexWatcher=new nE(this.ctx,this.fileWatcher,r,[]),this.fileSearch=new uue(this.ctx),this.ctx.set(cB,this.fileWatcher),this.ctx.set(rE,this.fileSearch),this.ctx.set(nE,this.multiLanguageContextIndexWatcher),this.ctx.get(ul).registerContextProvider(new Ej(this.ctx)),this.started=!0}}isStarted(){return this.started}async isEnabled(){let r=await this.ctx.get(or).updateExPValuesAndAssignments(),n=PO(this.ctx,r);return n.includes(X5)||n.length===1&&n[0]==="*"}async onWorkspaceAdded(r){await this.isEnabled()&&await this.fileWatcher?.triggerWorkspaceChange(0,r.uri)}async onWorkspaceRemoved(r){await this.isEnabled()&&await this.fileWatcher?.triggerWorkspaceChange(1,r.uri)}async onWorkspaceSubfoldersTerminated(r,n){if(await this.isEnabled())return super.onWorkspaceSubfoldersTerminated(r,n)}async onFileChange(r){if(await this.isEnabled())for(let n of r.documents)await this.fileWatcher?.triggerFileChange(this.toFileWatcherType(r.type),n.uri)}toFileWatcherType(r){switch(r){case"create":return 2;case"delete":return 1;case"update":return 0;default:throw new Error("Unknown file watcher event type")}}},cue=class extends cB{constructor(r,n){super(r,n);this.fileChangeListeners=[];this.workspaceChangeListeners=[]}static{s(this,"MultiLanguageFileWatcher")}onFileChange(r){this.fileChangeListeners.push(r)}onWorkspaceChange(r){this.workspaceChangeListeners.push(r)}dispose(){}async triggerFileChange(r,n){for(let i of this.fileChangeListeners)await i(r,n)}async triggerWorkspaceChange(r,n){for(let i of this.workspaceChangeListeners)await i(r,n)}},uue=class extends rE{constructor(r){super();this.ctx=r}static{s(this,"LspFileSearch")}async findFiles(r,n,i){return(await this.ctx.get(Jc).getWatchedFiles(n)).map(a=>this.ctx.get(Vr).getTextDocumentUnsafe(a)?.clientUri??a.uri)}};var fue=class extends eE{static{s(this,"AgentMultiLanguageContextProviderFeatureLifecycle")}constructor(t){super(),this.agentMultiLanguageContextProvider=new fB(t),t.set(fB,this.agentMultiLanguageContextProvider)}get indexWatcher(){return this.agentMultiLanguageContextProvider?.multiLanguageContextIndexWatcher}async tryStart(t){}async dispose(){return super.dispose()}};function UQe(e){let t=e.get(yc),r=new tE(t);e.set(tE,r),e.set(eE,new fue(e))}s(UQe,"setupMultiLanguageContextProviderFeature");d();d();d();var s1=new Map;s1.set("copilot",{app:"copilot-client",catalog_service:"CopilotCompletionsVSCode"});s1.set("copilot-intellij",{app:"copilot-intellij",catalog_service:"CopilotIntelliJ"});s1.set("copilot-xcode",{app:"copilot-xcode",catalog_service:"CopilotXcode"});s1.set("copilot-eclipse",{app:"copilot-eclipse",catalog_service:"CopilotEclipse"});s1.set("copilot.vim",{app:"copilot-vim",catalog_service:"CopilotVim"});s1.set("copilot-vs",{app:"copilot-vs",catalog_service:"CopilotVS"});var hSt=new Gt("sdk");function Ij(e,t){s1.has(e.get(gn).getEditorPluginInfo().name)||hSt.warn(e,...t)}s(Ij,"deprecationWarning");var GVe=Ze(kue()),ap=Ze(yh());d();d();d();var nn={ParseError:-32700,InvalidRequest:-32600,MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,ServerNotInitialized:-32002,RequestCancelled:-32800,ContentModified:-32801,ServerCancelled:-32802,NoCopilotToken:1e3,DeviceFlowFailed:1001,CopilotNotAvailable:1002};var Cc=class extends Error{static{s(this,"SchemaValidationError")}constructor(t){super(BUe(t))}};function st(e,t){let r=hs.Compile(e);return async(n,i,o)=>{if(!r.Check(o)){let a=BUe(r.Errors(o));return[null,{code:nn.InvalidParams,message:a}]}return t(n,i,o)}}s(st,"addMethodHandlerValidation");function BUe(e){return`Schema validation failed with the following errors:
${Array.from(e).map(r=>`- ${r.path}: ${r.message}`).join(`
`)}`}s(BUe,"createErrorMessage");d();var Bue=Ze(ii());d();var l1=class{constructor(t){this.ctx=t}static{s(this,"AbstractCommand")}};var Fj="github.copilot.finishDeviceFlow",Due=class extends l1{constructor(){super(...arguments);this.name=Fj;this.arguments=I.Tuple([])}static{s(this,"FinishDeviceFlowCommand")}async handle(r,n){let i=this.ctx.get(Bn).pendingSignIn;if(!i)throw new Bue.ResponseError(nn.InvalidRequest,"No pending sign in");try{await this.ctx.get(lc).open(i.verificationUri)}catch(o){p0.warn(this.ctx,"Failed to open",i.verificationUri),p0.exception(this.ctx,o,Fj)}try{return await i.status}catch(o){throw new Bue.ResponseError(nn.DeviceFlowFailed,String(o))}finally{this.ctx.get(Bn).pendingSignIn=void 0}}},DUe=[Due];d();d();var ns=class extends un{static{s(this,"CopilotCompletionCache")}constructor(t=100){super(t)}};var CB="github.copilot.didAcceptCompletionItem",Pue=class extends l1{constructor(){super(...arguments);this.name=CB;this.arguments=I.Tuple([I.String({minLength:1})])}static{s(this,"DidAcceptCommand")}handle(r,[n]){let o=this.ctx.get(ns).get(n);return o?(wU(this.ctx,o),!0):!1}},PUe=[Pue];d();var uBt="github.copilot.didAcceptNextEditSuggestionItem",Nue=class extends l1{constructor(){super(...arguments);this.name=uBt;this.arguments=I.Tuple([I.String({minLength:1})])}static{s(this,"DidAcceptCommand")}async handle(r,[n]){return await this.ctx.get(Kh).handleAcceptance(n),!0}},NUe=[Nue];d();var Fue="github.copilot.didAcceptPanelCompletionItem",Lue=class extends l1{constructor(){super(...arguments);this.name=Fue;this.arguments=I.Tuple([I.String({minLength:1})])}static{s(this,"DidAcceptPanelCompletionItemCommand")}handle(r,n){let[i]=n,a=this.ctx.get(ns).get(i);return a?($v(this.ctx,a.triggerCategory,a.insertText,a.offset,a.uri,a.telemetry,{compType:"full"},a.copilotAnnotations),!0):!1}},LUe=[Lue];var fBt=[...DUe,...PUe,...NUe,...LUe];function FUe(e,t){let r=new Map;for(let n of fBt){let i=new n(e),o=hs.Compile(i.arguments);r.set(i.name,{typeCheck:o,command:i})}return t.onExecuteCommand((n,i)=>{let o=r.get(n.command);if(!o)throw new Error(`Unknown command: ${n.command}`);let a=p2(n.arguments??[]);if(a.length<o.command.arguments.minItems&&(a.length=o.command.arguments.minItems),o.typeCheck.Check(n.arguments))return o.command.handle(i,a);throw new Cc(o.typeCheck.Errors(n.arguments))}),[...r.keys()]}s(FUe,"registerCommands");d();var MUe=Ze(require("node:events"));var Vf=class extends fv{constructor(r){super(new y8,new Map);this.emitters=new Map;this.envSettings=new Map;this.env={...r},this.setOverridesFromEnvironment()}static{s(this,"AgentConfigProvider")}setOverridesFromEnvironment(){["DebugOverrideEngine","DebugOverrideProxyUrl","DebugOverrideCapiUrl","DebugUseEditorFetcher","UseSubsetMatching"].forEach(n=>{for(let i of["AGENT_DEBUG_","GITHUB_COPILOT_","GH_COPILOT_"]){let o=`${i}${dBt(n.replace(/^Debug/,""))}`;o in this.env&&(this.envSettings.set(Rt[n],this.env[o]),this.setConfig(Rt[n],this.env[o]))}})}setConfig(r,n){super.setConfig(r,n??this.envSettings.get(r)),this.emitters.get(r)?.emit("change",n)}onConfigChange(r,n){this.emitters.has(r)||this.emitters.set(r,new MUe.default),this.emitters.get(r)?.on("change",n)}};function dBt(e){return e.replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase()}s(dBt,"camelCaseToSnakeCaseAllCaps");var mBt="unknown-editor",QUe="unknown-editor-plugin",Mj=class extends gn{static{s(this,"AgentEditorInfo")}setEditorAndPluginInfo(t,r,n=[]){this._editorInfo=r,this._editorPluginInfo=t,this._relatedPluginInfo=n}setCopilotIntegrationId(t){this._copilotIntegrationId=t}getEditorInfo(){return this._editorInfo?this._editorInfo:{name:mBt,version:"0"}}getEditorPluginInfo(){return this._editorPluginInfo?this._editorPluginInfo:{name:QUe,version:"0"}}getRelatedPluginInfo(){return this._relatedPluginInfo??[]}getCopilotIntegrationId(){return this._copilotIntegrationId}};function OUe(e){return e.getEditorPluginInfo().name!==QUe}s(OUe,"hasValidInfo");d();var qUe=require("node:events");var UUe="initialize",g2=class{constructor(){this.emitter=new qUe.EventEmitter;this.initialized=!1}static{s(this,"InitializedNotifier")}once(t){this.emitter.once(UUe,t)}emit(){if(this.initialized)throw new Error("Already initialized");this.initialized=!0,this.emitter.emit(UUe)}};d();var A2=Ze(yh());var hBt=new Map([[4,A2.MessageType.Log],[3,A2.MessageType.Info],[2,A2.MessageType.Warning],[1,A2.MessageType.Error]]),Qj=class extends Ga{static{s(this,"NotificationLogger")}logIt(t,r,n,...i){if(r==4&&!SU(t)&&n!=="console")return;let o={type:hBt.get(r),message:ETe(n,...i)},a=t.get(Wr).connection;try{a.sendNotification(new A2.NotificationType("window/logMessage"),o)}catch(l){if(l instanceof A2.ConnectionError)return;throw l}}};d();var WUe=Ze(cl());var Oj=class{constructor(t,r=!1){this.ctx=t;this.codeSnippets=r}static{s(this,"RedirectTelemetryReporter")}get notificationName(){return this.codeSnippets?"codeSnippetTelemetry":"uedTelemetry"}sendTelemetryEvent(t,r,n){this.ctx.get(Wr).connection.sendNotification(new WUe.NotificationType(this.notificationName),{type:"event",name:t,properties:r||{},measurements:n||{}})}sendTelemetryErrorEvent(t,r,n){this.sendTelemetryEvent(t,r,n)}dispose(){return Promise.resolve()}};async function GUe(e){let t=e.get(Ms),r=t.deactivate();t.setReporter(new Oj(e)),t.setRestrictedReporter(new Oj(e,!0)),await r}s(GUe,"setupRedirectingTelemetryReporters");d();d();var Uj=class{static{s(this,"InstallationManager")}async startup(t){await this.isNewInstall(t)?(await this.markInstalled(t),this.handleInstall(t,await this.wasPreviouslyInstalled(t))):await this.isNewUpgrade(t)&&(await this.markUpgraded(t),this.handleUpgrade(t))}uninstall(t){return this.handleUninstall(t)}handleInstall(t,r){r?jt(t,"installed.reinstall"):jt(t,"installed.new")}handleUpgrade(t){jt(t,"installed.upgrade")}handleUninstall(t){jt(t,"uninstalled")}};var xB=Ze(kue());var hT=class extends Uj{static{s(this,"AgentInstallationManager")}async isNewInstall(t){let r=t.get(gn).getEditorPluginInfo();return await t.get(yc).read("versions",r.name)===void 0&&!await this.hasPersistedSettings(t)}async hasPersistedSettings(t){return(await t.get(yc).listSettings()).length>0}async markInstalled(t){let r=t.get(gn).getEditorPluginInfo();await t.get(yc).update("versions",r.name,r.version)}wasPreviouslyInstalled(t){return Promise.resolve(!1)}async isNewUpgrade(t){try{let r=t.get(gn).getEditorPluginInfo(),n=await t.get(yc).read("versions",r.name);return n===void 0&&await this.hasPersistedSettings(t)?!0:(0,xB.gt)((0,xB.coerce)(r.version),(0,xB.coerce)(n))}catch{return!1}}async markUpgraded(t){await this.markInstalled(t)}async uninstall(t){await super.uninstall(t);let r=t.get(gn).getEditorPluginInfo();await t.get(yc).delete("versions",r.name),(await t.get(yc).listKeys("versions")).length===0&&await t.get(yc).deleteSetting("versions")}};d();var HUe=require("events"),Que=Ze(require("path")),qj=Ze(cl());var Mue="didChangeWatchedFiles",pBt={watchedFiles:[],contentRestrictedFiles:[],unknownFileExtensions:[]},Xh=class e{constructor(t){this.ctx=t;this.emitter=new HUe.EventEmitter}static{s(this,"LspFileWatcher")}static{this.requestType=new qj.ProtocolRequestType("copilot/watchedFiles")}get connection(){return this.ctx.get(Wr).connection}init(){this.ctx.get(Go).getCapabilities().watchedFiles&&this.connection.onNotification(qj.DidChangeWatchedFilesNotification.type,r=>{"workspaceUri"in r&&typeof r.workspaceUri=="string"&&this.didChangeWatchedFilesHandler(r)})}async getWatchedFiles(t){if(!this.ctx.get(Go).getCapabilities().watchedFiles)return pBt;let i=(await this.connection.sendRequest(e.requestType,t)).files,o=[],a=[],l=[];for(let c of i){typeof c=="object"&&(c=c.uri);let u=Que.extname(c).toLowerCase();if(!$_.includes(u)){l.push({uri:c});continue}let f=await this.getValidDocument(c);if(f===void 0){a.push({uri:c});continue}o.push(f)}return{watchedFiles:o,contentRestrictedFiles:a,unknownFileExtensions:l}}onDidChangeWatchedFiles(t){this.emitter.on(Mue,t)}offDidChangeWatchedFiles(t){this.emitter.off(Mue,t)}async didChangeWatchedFilesHandler(t){let r=[],n=[],i=[];for(let o of t.changes){let a=o.uri,l={uri:a,isRestricted:!1,isUnknownFileExtension:!1},c=Que.extname(o.uri).toLowerCase();if(!$_.includes(c))l.isUnknownFileExtension=!0;else{let u=await this.getValidDocument(a);u===void 0?l.isRestricted=!0:l.document=u}switch(o.type){case 1:n.push(l);break;case 2:r.push(l);break;case 3:i.push(l);break}}this.emitter.emit(Mue,{workspaceFolder:{uri:t.workspaceUri},created:n,changed:r,deleted:i})}async getValidDocument(t){let n=await this.ctx.get(On).getOrReadTextDocument({uri:t});return n.status==="valid"?n.document:void 0}};d();d();var gBt=I.Object({uri:I.String({minLength:1})});async function ABt(e,t,r){let n=await e.get(On).getOrReadTextDocument(r);return[{status:ys(n),...n.status==="invalid"&&{reason:n.reason},...n.status==="notfound"&&{reason:n.message}},null]}s(ABt,"handleCheckFileStatusChecked");var jUe=st(gBt,ABt);d();var yBt=I.Object({options:I.Optional(I.Object({localChecksOnly:I.Optional(I.Boolean()),forceRefresh:I.Optional(I.Boolean())}))});async function CBt(e,t,r){return[await e.get(Bn).checkAndUpdateStatus(e,r.options),null]}s(CBt,"handleCheckStatusChecked");var VUe=st(yBt,CBt);d();d();d();d();d();d();function $Ue(e){return e?e.filter(t=>t.type==="github.web-search").map(t=>t):[]}s($Ue,"filterUnsupportedReferences");function zUe(e){return e?e.filter(t=>t.type==="github.web-search"):[]}s(zUe,"convertToCopilotReferences");var YUe=I.Object({type:I.Literal("github.web-search"),id:I.String(),data:I.Object({query:I.String(),type:I.String(),results:I.Optional(I.Array(I.Object({title:I.String(),excerpt:I.String(),url:I.String()})))}),metadata:I.Optional(I.Object({display_name:I.Optional(I.String()),display_icon:I.Optional(I.String())}))});var h3=class{constructor(t){this.deltaApplier=t;this.appliedLength=0;this.appliedText="";this.appliedAnnotations=[]}static{s(this,"ConversationFinishCallback")}isFinishedAfter(t,r){let n=t.substring(this.appliedLength,t.length),o=this.mapAnnotations(r.annotations).filter(a=>!this.appliedAnnotations.includes(a.id));this.append(n,o,$Ue(r.copilotReferences),r.copilotErrors??[],r.copilotConfirmation)}append(t,r,n,i,o){this.deltaApplier(t,r,n,i,o),this.appliedLength+=t.length,this.appliedText+=t,this.appliedAnnotations.push(...r.map(a=>a.id))}mapAnnotations(t){if(!t)return[];let r=[],n=t.for("CodeVulnerability").map(o=>({...o,type:"code_vulnerability"})),i=t.for("IPCodeCitations").map(o=>({...o,type:"ip_code_citations"}));return r.push(...n),r.push(...i),r}};d();var tl=class{static{s(this,"ConversationInspector")}};d();var Oue={Unknown:-1,Default:0,ToolRoundExceedError:1e4};var _s=class{constructor(t){this.ctx=t;this.progressEntries=new un(250)}static{s(this,"ConversationProgress")}async begin(t,r,n){let i={status:"open",handler:n};this.progressEntries.set(t.id,i),await i.handler.begin(this.ctx,t,r)}async report(t,r,n){let i=this.getProgressEntry(t);i.status==="open"&&await i.handler.report(this.ctx,t,r,n)}async end(t,r,n){let i=this.getProgressEntry(t);i.status==="open"&&(this.progressEntries.set(t.id,{...i,status:"done",updatedAt:Date.now()}),await i.handler.end(this.ctx,t,r,n))}async cancel(t,r,n){let i=this.getProgressEntry(t);i.status==="open"&&(this.progressEntries.set(t.id,{...i,status:"cancelled",updatedAt:Date.now()}),await i.handler.cancel(this.ctx,t,r,n))}getProgressEntry(t){let r=this.progressEntries.get(t.id);if(r===void 0)throw new Error(`No work done token for conversation ${t.id}`);return r.status!=="open"&&Kr.error(this.ctx,`Work done token for conversation ${t.id} is already ${r.status}, last updated at ${r.updatedAt}`),r}};d();d();var c1=class{constructor(t){this.ctx=t;this.githubRepositoryInfoCache=new Map}static{s(this,"GitHubRepositoryApi")}async getRepositoryInfo(t,r){let n=this.githubRepositoryInfoCache.get(`${t}/${r}`);if(n)return n;let i=await this._doGetRepositoryInfo(t,r);if(i.ok){let o=await i.json();return this.githubRepositoryInfoCache.set(`${t}/${r}`,o),o}throw new Error(`Failed to fetch repository info for ${t}/${r}`)}async _doGetRepositoryInfo(t,r){let n=await this.ctx.get(en).getGitHubSession(),i={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"};n&&(i.Authorization=`Bearer ${n.accessToken}`);let o=this.ctx.get(ps).getAPIUrl(`repos/${t}/${r}`);return this.ctx.get(fn).fetch(o,{method:"GET",headers:i})}async isAvailable(t,r){try{return(await this._doGetRepositoryInfo(t,r)).ok}catch{return!1}}};d();d();d();var JUe=Ze($f());var u1=class{constructor(t,r,n){this.doc=t;this.selection=r;this.visibleRange=n}static{s(this,"ElidableDocument")}fromSelectedCode(t){let r=this.getExpandedSelection(),n=r;if(t.trimNewLines){let o=this.doc.getText(r),a=o.match(/^\n*/)?.[0].length??0,l=o.match(/\n*$/)?.[0].length??0;n={start:this.getLineStart(r.start.line+a),end:this.expandLineToEnd(r.end.line-l)}}let i=new zt([(0,JUe.default)(this.doc.getText(n)).trim()]);return[this.wrapInTicks(i),n]}fromAllCode(t){let r=this.getDocumentRange(),n=this.getExpandedSelection(),i;!this.visibleRange||!this.rangeContainedIn(this.visibleRange,n)?i=n:i={start:this.getLineStart(this.visibleRange.start.line),end:this.expandLineToEnd(this.visibleRange.end.line)};let o={start:r.start,end:i.start.line>0?this.expandLineToEnd(i.start.line-1):r.start},a={start:i.start,end:n.start.line>0&&n.start.line>i.start.line?this.expandLineToEnd(n.start.line-1):i.start},l={start:n.end.line<this.doc.lineCount-1&&n.end.line<i.end.line?this.getLineStart(n.end.line+1):i.end,end:i.end},c={start:i.end.line<this.doc.lineCount-1?this.getLineStart(i.end.line+1):r.end,end:r.end},u=[[o,.6],[a,.8],[n,1],[l,.4],[c,.2]],f=new zt(u.filter(([m,h])=>!pT(m)||h===1).map(([m,h])=>{let p;return t.addLineNumbers?p=this.addLineNumbers(m):p=this.doc.getText(m),[h==1?p:y0(p),h]}));return this.wrapInTicks(f)}selectionIsDocument(){return this.rangeEquals(this.getExpandedSelection(),this.getDocumentRange())}selectionIsEmpty(){return this.selection==null||pT(this.selection)}getExpandedSelection(){return this.selection!==void 0?{start:this.getLineStart(this.selection.start.line),end:this.expandLineToEnd(this.selection.end.line)}:this.getDocumentRange()}getDocumentRange(){return{start:this.getLineStart(0),end:this.expandLineToEnd(this.doc.lineCount-1)}}getLineStart(t){return{line:t,character:0}}expandLineToEnd(t){return t>this.doc.lineCount-1&&(t=this.doc.lineCount-1),{line:t,character:this.doc.lineAt({line:t,character:0}).text.length}}rangeContainedIn(t,r){return t.start.line<=r.start.line&&t.end.line>=r.end.line}rangeEquals(t,r){return t.start.line==r.start.line&&t.end.line==r.end.line}wrapInTicks(t,r){return new zt([["```"+this.doc.detectedLanguageId,1],[t,r??1],["```",1]])}addLineNumbers(t){let r=this.doc.getText(t).split(`
`),n=this.doc.lineCount.toString().length;return r.map((o,a)=>`${(t.start.line+a+1).toString().padEnd(n," ")}:${o}`).join(`
`)}};function pT(e){return e.start.line==e.end.line&&e.start.character==e.end.character}s(pT,"isEmptyRange");var XUe=Ze(require("path"));var ZUe=I.Object({uri:I.String(),visibleRange:I.Optional(ba),selection:I.Optional(ba)}),Uue=class{constructor(t){this.turnContext=t}static{s(this,"CurrentEditorSkillProcessor")}value(){return 1}async processSkill(t){let r=this.turnContext.ctx.get(On),n=await r.getOrReadTextDocument(t),i=ys(n);if(await this.turnContext.collectFile(t0,t.uri,i),n.status==="valid"){let o=this.turnContext.conversation.source==="inline",a=new u1(n.document,t.selection,t.visibleRange),l=r.getRelativePath(n.document);if(i==="empty")return new zt([`The currently open file \`${l}\` is empty.`]);let c=[[`Code excerpt from the currently open file \`${l}\`:`,1],[a.fromAllCode({addLineNumbers:o}),1]],u=[];if(a.selectionIsDocument())u=[["The user is selecting the entire file.",1]];else if(o){let[f,m]=a.fromSelectedCode({trimNewLines:!0}),h=m.start.line+1;if(pT(m))u=[[`The user is selecting line ${h}, which is empty.`,1]];else{let p=m.end.line+1;u=[["The user is selecting"+(h==p?` line ${h}:`:` lines ${h} to ${p} (inclusive):`),1],[f,1]]}}else a.selectionIsEmpty()||(u=[["The user is selecting this code:",1],[a.fromSelectedCode({trimNewLines:!1})[0],1]]);return new zt([...c,...u])}else if(n.status==="invalid")return new zt([`The currently open file \`${XUe.basename(t.uri)}\` is content excluded.`])}},t0="current-editor",Wj=class{constructor(t){this._resolver=t;this.id=t0;this.type="explicit"}static{s(this,"CurrentEditorSkill")}description(){return"The code from the user's currently open file"}resolver(){return this._resolver}processor(t){return new Uue(t)}};d();d();var gl=class{constructor(){this.skills=[]}static{s(this,"ConversationSkillRegistry")}registerSkill(t){if(this.getSkill(t.id))throw new Error(`Skill with id '${t.id}' already registered`);this.skills.push(t)}getSkill(t){return this.skills.find(r=>r.id===t)}getDescriptors(){return[...this.skills]}},que=class{constructor(t,r,n){this.delegate=t;this.stepId=r;this.stepTitle=n}static{s(this,"StepReportingSkillResolver")}async resolveSkill(t){await t.steps.start(this.stepId,this.stepTitle);try{let r=await this.delegate.resolveSkill(t);return r||await t.steps.finish(this.stepId),r}catch(r){throw await t.steps.error(this.stepId,r instanceof Error?r.message:`Error resolving ${this.stepTitle}`),r}}},Wue=class{constructor(t,r){this.delegate=t;this.stepId=r}static{s(this,"StepReportingSkillProcessor")}value(){return this.delegate.value()}async processSkill(t,r){try{let n=await this.delegate.processSkill(t,r);return await r.steps.finish(this.stepId),n}catch(n){throw await r.steps.error(this.stepId,n instanceof Error?n.message:`Error processing ${this.stepId}`),n}}},jl=class{constructor(t,r,n,i,o,a="explicit",l=[],c=()=>!0){this.id=t;this._description=r;this.stepTitle=n;this._resolver=i;this._processor=o;this.type=a;this._examples=l;this._isAvailable=c}static{s(this,"SingleStepReportingSkill")}description(){return this._description}examples(){return this._examples}isAvailable(t){return this._isAvailable(t)}resolver(t){return new que(this._resolver(t),this.id,this.stepTitle)}processor(t){return new Wue(this._processor(t),this.id)}};var eqe=I.Object({name:I.String(),url:I.String()}),tqe=I.Object({path:I.String(),head:I.Optional(I.Object({name:I.String(),upstream:I.Optional(eqe)})),remotes:I.Optional(I.Array(eqe))}),Gue=class{constructor(t){this.turnContext=t}static{s(this,"GitMetadataSkillProcessor")}value(){return .8}processSkill(t){this.turnContext.collectLabel(f1,"git repository information");let r=[];return r.push([new zt(["Metadata about the current git repository:"]),1]),t.head&&t.head.name?(r.push([new zt([`- Current branch name: ${t.head.name}`]),1]),t.head.upstream&&r.push([new zt([`- Upstream name and url: ${t.head.upstream.name} - ${t.head.upstream.url}`]),1])):r.push([new zt(["- Detached HEAD: yes"]),1]),t.remotes&&t.remotes.length>0&&r.push([new zt([`- Remotes: ${t.remotes.map(n=>n.name).join(", ")}`]),1]),new zt(r)}},f1="git-metadata",Gj=class extends jl{static{s(this,"GitMetadataSkill")}constructor(t){super(f1,"Metadata about the current git repository, useful for questions about branch management and git related commands","Reading git information",()=>t,r=>new Gue(r))}};async function rqe(e){let t=await e.skillResolver.resolve(t0);if(t){let a=t.uri,l=D5(e.ctx,a);if(Ive(l))return{repoInfo:l,skillUsed:t0}}let r=await e.skillResolver.resolve(f1);if(!r||!r.remotes||r.remotes.length===0){Kr.debug(e.ctx,"Git metadata skill is not available or no remotes available.");return}let i=r.remotes.find(a=>a.name==="origin")??r.remotes[0],o=Eee(i.url);if(o)return{repoInfo:{baseFolder:{uri:r.path},url:i.url,...o},skillUsed:f1}}s(rqe,"extractRepoInfo");async function nqe(e){let t=[];return await xBt(e,t),await vBt(e,t),await bBt(e,t),t}s(nqe,"skillsToReference");async function xBt(e,t){let r=await EBt(e);r&&t.push(r)}s(xBt,"addRepositoryReference");async function vBt(e,t){let r=await IBt(e);r&&t.push(r)}s(vBt,"addSelectionReference");async function bBt(e,t){let r=[],n=await wBt(e);n&&r.push(n),r.push(...await _Bt(e)),r.length>0&&t.push(...r)}s(bBt,"addFileReferences");async function EBt(e){let t=await rqe(e);if(t){let r=e.ctx.get(c1),n=t.repoInfo.owner,i=t.repoInfo.repo;if(await r.isAvailable(n,i))return{type:"github.repository",id:`${n}/${i}`,data:{type:"repository",name:i,ownerLogin:n,id:(await r.getRepositoryInfo(n,i)).id}}}}s(EBt,"gitMetadataToReference");async function IBt(e){let t=await e.skillResolver.resolve(t0);if(t&&t.selection){let n=await e.ctx.get(On).getOrReadTextDocument(t),i=ys(n);if(await e.collectFile(e.turn.agent.agentSlug,t.uri,i,t.selection),n.status==="valid")return TBt(t,n.document)}}s(IBt,"currentEditorToSelectionReference");function TBt(e,t){if(e.selection&&!pT(e.selection)){let r=t.getText(e.selection);return{type:"client.selection",id:e.uri,data:{start:{line:e.selection.start.line,col:e.selection.start.character},end:{line:e.selection.end.line,col:e.selection.end.character},content:r}}}}s(TBt,"extractSelection");async function wBt(e){let t=await e.skillResolver.resolve(t0);if(t){let n=await e.ctx.get(On).getOrReadTextDocument(t),i=ys(n);if(await e.collectFile(e.turn.agent.agentSlug,t.uri,i),n.status==="valid")return{type:"client.file",id:n.document.uri,data:{content:n.document.getText(),language:n.document.detectedLanguageId}}}}s(wBt,"currentEditorToFileReference");async function _Bt(e){let t=[],r=e.turn.request.references;if(r&&r.length>0){let n=e.ctx.get(On);for(let i of r)if(i.type==="file"){let o=await n.getOrReadTextDocument(i),a=ys(o);if(await e.collectFile(e.turn.agent.agentSlug,i.uri,a,i.selection),o.status==="valid"){let l=o.document.getText();t.push({type:"client.file",id:i.uri,data:{content:l,language:o.document.detectedLanguageId}})}}}return t}s(_Bt,"fileReferenceToPlatformFileReference");d();d();d();d();var fqe=Ze(Vj()),$ue=Ze(require("path"));var dqe=500,MBt=Math.floor(.25*dqe),$j=class{static{s(this,"FixedSizeChunking")}async chunk(t,r){let n=[],i=$ue.default.extname(__filename)===".ts"?$ue.default.resolve(__dirname,"../../../../../../dist/main.js"):__filename;return n=await fqe.job(async({text:o,uri:a,tokenizerName:l,directory:c,chunkSize:u,overlap:f})=>{let h=await require(c).getTokenizerAsync(l),p=h.tokenize(o),g=p.length,y=[],x=0;for(;x<g;){let b=x+u>=g,E=b?g:x+u,_=p.slice(x,E),k=h.detokenize(_),B=o.indexOf(k);y.push({id:`${a.toString()}#${x}`,chunk:k,tokenCount:_.length,range:{start:B,end:B+k.length}}),x=b?E:E-f}return y},{data:{text:t.getText(),uri:t.uri.toString(),tokenizerName:r.tokenizer,directory:i,chunkSize:dqe,overlap:MBt}}),n}};var QBt="fixedSize",OBt=new Map([["fixedSize",$j]]);function mqe(e){let t=e==="default"?QBt:e,r=OBt.get(t);if(!r)throw new Error(`Chunking constructor for type ${e} not found`);return r}s(mqe,"getChunkingAlgorithm");d();d();var zj=Ze(n5()),y2=Ze(require("fs")),hqe=require("os"),Zh=Ze(require("path")),gT=require("process");var zue=5e4,UBt=new Gt("workspaceChunks"),Yj=class e{constructor(t,r){this.ctx=t;this.pathHashLength=8;let n=Pi(r.uri),i=(0,zj.SHA256)(r.uri).toString().substring(0,this.pathHashLength);this.cacheRootPath=Zh.join(qBt(),"project-context",`${n}.${i}`)}static{s(this,"WorkspaceChunks")}static{this.CACHE_VERSION="1.0.0"}getChunksCacheFile(t){let r=(0,zj.SHA256)(t).toString().substring(0,this.pathHashLength),n=Zh.basename(t);return Zh.join(this.cacheRootPath,`${n}.${r}.json`)}async getChunksCacheFromCacheFile(t){let r=await y2.promises.readFile(t,{encoding:"utf8"}).catch(()=>{});if(r)try{return JSON.parse(r)}catch{}}async getChunksCache(t){let r=this.getChunksCacheFile(t);return await this.getChunksCacheFromCacheFile(r)}async setChunksCache(t,r){let n=this.getChunksCacheFile(t);try{await y2.promises.mkdir(Zh.dirname(n),{recursive:!0}),await y2.promises.writeFile(n,JSON.stringify(r),{encoding:"utf8"})}catch(i){UBt.debug(this.ctx,"Failed to set chunks cache:",i)}}async removeChunksCache(t){let r=this.getChunksCacheFile(t);await y2.promises.rm(r).catch(()=>{})}async enumerateChunksCacheFileNames(){return await y2.promises.readdir(this.cacheRootPath).catch(()=>[])}async getFilesCount(){return(await this.enumerateChunksCacheFileNames()).length}async getChunksCount(){let t=0;for await(let r of this.getChunks())t++;return t++}async*getChunksForFile({uri:t}){let r=await this.getChunksCache(t);r!==void 0&&(yield*r.documentChunks)}async*getChunksFromCacheFile(t){let r=await this.getChunksCacheFromCacheFile(t);yield*r?r.documentChunks:[]}async*getChunks(t){if(t!==void 0)yield*this.getChunksForFile(t);else{let r=await this.enumerateChunksCacheFileNames();for(let n of r)yield*this.getChunksFromCacheFile(Zh.join(this.cacheRootPath,n))}}async getFileHash(t){let r=Xo(t),n="";return r&&(n=await y2.promises.readFile(r,{encoding:"utf8"}).catch(()=>"")),(0,zj.SHA256)(n).toString()}async addChunks({uri:t},r){let n=await this.getFileHash(t),i=await this.getChunksCache(t);if(i!==void 0&&i.hash===n&&i.version===e.CACHE_VERSION)return;let o={version:e.CACHE_VERSION,filePath:t,hash:n,documentChunks:r};await this.setChunksCache(t,o)}async deleteChunksForSource(t){let r=ll(t),n=await this.getChunksCache(r);return n===void 0?[]:(await this.removeChunksCache(r),n.documentChunks)}async deleteChunks({uri:t}){let r=Xo(t);if(!r)return[];let n;try{n=await y2.promises.readdir(r)}catch{return await this.deleteChunksForSource(r)}let i=[];for(let o of n){let a=ll(Zh.join(r,o));i.push(...await this.deleteChunks({uri:a}))}return i}async clear(){await y2.promises.rm(this.cacheRootPath,{recursive:!0}).catch(()=>{})}};function qBt(){return gT.env.XDG_CACHE_HOME&&Zh.isAbsolute(gT.env.XDG_CACHE_HOME)?gT.env.XDG_CACHE_HOME+"/github-copilot":(0,hqe.platform)()==="win32"?gT.env.USERPROFILE+"\\AppData\\Local\\Temp\\github-copilot":gT.env.HOME+"/.cache/github-copilot"}s(qBt,"getXdgCachePath");var Yue=1e4;var Kj=class{constructor(t,r,n){this.workspaceFolder=r;this.implementation=n;this._chunkLimiter=new Jue;this.status="notStarted",this.workspaceChunks=new Yj(t,r),this.cancellationToken=new Kue,this._chunkingTimeMs=0,this._fileCountExceeded=!1,this._chunkCountExceeded=!1,this._totalFileCount=0,this._filesUpdated=new Set}static{s(this,"ChunkingHandler")}async chunk(t,r){return r?await this.chunkFiles(t,r):await this.chunkWorkspace(t)}async chunkWorkspace(t){let r=performance.now();if(this.status="started",this.cancellationToken.isCancelled())return this.status="cancelled",this.updateChunkingTime(r,performance.now()),this.workspaceChunks.getChunks();await this.updateModelConfig(t);let n=await t.get(Jc).getWatchedFiles(this.workspaceFolder);this._totalFileCount=n.length,n.length>Yue&&(this._fileCountExceeded=!0,n=n.slice(0,Yue));let i=n.map(async o=>{this.cancellationToken.isCancelled()||await this._chunkLimiter.queue(()=>this._chunk(t,o))});try{await Promise.all(i)}catch(o){Ea(t,o,"ChunkingProvider.chunk"),this.terminateChunking()}return this.status=this.cancellationToken.isCancelled()?"cancelled":"completed",this.updateChunkingTime(r,performance.now()),await this.workspaceChunks.getChunksCount()>zue&&(this._chunkCountExceeded=!0),this.workspaceChunks.getChunks()}async chunkFiles(t,r){await this.updateModelConfig(t);let n=r.map(async i=>{this.cancellationToken.isCancelled()||(this._filesUpdated.add(i.uri),await this._chunkLimiter.queue(()=>this._chunk(t,i)))});try{await Promise.all(n)}catch(i){Ea(t,i,"ChunkingProvider.chunkFiles"),this.terminateChunking()}return await this.workspaceChunks.getChunksCount()>zue&&(this._chunkCountExceeded=!0),await this.workspaceChunks.getFilesCount()>Yue&&(this._fileCountExceeded=!0),h8e(...r.map(i=>this.workspaceChunks.getChunks(i)))}async _chunk(t,r){if(this.cancellationToken.isCancelled())return;let n=await this.implementation.chunk(r,this.modelConfig);await this.workspaceChunks.addChunks(r,n)}async updateModelConfig(t){this.modelConfig||(this.modelConfig=await yo.getModelConfiguration(t,"user"))}terminateChunking(){this.cancellationToken.cancel()}async clearChunks(){await this.workspaceChunks.clear()}updateChunkingTime(t,r){this._chunkingTimeMs=r-t}get chunkingTimeMs(){return Math.floor(this._chunkingTimeMs)}get fileCountExceeded(){return this._fileCountExceeded}get totalFileCount(){return this._totalFileCount}get chunkCountExceeded(){return this._chunkCountExceeded}get filesUpdatedCount(){return this._filesUpdated.size}async getFilesCount(){return this.workspaceChunks.getFilesCount()}getChunks(){return this.workspaceChunks.getChunks()}async getChunksCount(){return this.workspaceChunks.getChunksCount()}deleteSubfolderChunks(t){return this.workspaceChunks.deleteChunks({uri:t})}deleteFileChunks(t){return this._filesUpdated.add(t),this.workspaceChunks.deleteChunks({uri:t})}},Kue=class{constructor(){this.cancelled=!1}static{s(this,"ChunkingCancellationToken")}cancel(){this.cancelled=!0}isCancelled(){return this.cancelled}},Jue=class{constructor(t=20){this.maxCount=t;this.tasks=[];this.runningTasks=0}static{s(this,"Limiter")}async queue(t){return new Promise((r,n)=>{this.tasks.push({factory:t,resolve:r,reject:n}),this.consume()})}consume(){for(;this.tasks.length>0&&this.runningTasks<=this.maxCount;){let{factory:t,resolve:r,reject:n}=this.tasks.shift();this.runningTasks++;let i=t();i.then(r,n),i.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this.runningTasks--,this.consume()}};var ma=class{constructor(t){this.ctx=t;this.workspaceChunkingProviders=new Map}static{s(this,"ChunkingProvider")}get workspaceCount(){return this.workspaceChunkingProviders.size}createImplementation(t,r){let n=mqe(r),i=new n;return new Kj(this.ctx,t,i)}getImplementation(t,r="default"){let n=this.getParentFolder(t);if(n)return this.workspaceChunkingProviders.get(n.uri);let i=this.workspaceChunkingProviders.get(t.uri);return i||(i=this.createImplementation(t,r),this.workspaceChunkingProviders.set(t.uri,i)),i}getParentFolder(t){let r=[];for(let n of this.workspaceChunkingProviders.values())r.push(n.workspaceFolder);return r.find(n=>{let i=n.uri.replace(/[#?].*/,"").replace(/\/?$/,"/");return t.uri!==n.uri&&t.uri.startsWith(i)})}status(t){return this.getImplementation(t).status}checkLimits(t){let r=this.getImplementation(t);return{fileCountExceeded:r.fileCountExceeded,chunkCountExceeded:r.chunkCountExceeded}}fileCount(t){return this.getImplementation(t).getFilesCount()}chunkCount(t){return this.getImplementation(t).getChunksCount()}chunkingTimeMs(t){return this.getImplementation(t).chunkingTimeMs}getChunks(t){return this.getImplementation(t).getChunks()}terminateChunking(t,r){let n=this.getImplementation(r);n.terminateChunking();let o=dn.createAndMarkAsIssued().extendedBy(void 0,{fileCount:n.filesUpdatedCount});jt(t,"index.terminate",o),this.workspaceChunkingProviders.delete(r.uri)}async clearChunks(t,r){this.terminateChunking(t,r),await this.getImplementation(r).clearChunks()}async deleteSubfolderChunks(t,r){return await this.getImplementation(t).deleteSubfolderChunks(r.uri)}async deleteFileChunks(t,r){let n=this.getImplementation(t),i=[];Array.isArray(r)||(r=[r]);for(let o of r)i.push(...await n.deleteFileChunks(o));return i}async chunk(t,r,n,i){let o;return n&&(Array.isArray(n)?o=n:i=n),i||(i="default"),o?await this.chunkFiles(t,r,o,i):await this.chunkFolder(t,r,i)}async chunkFolder(t,r,n="default"){let i=this.getImplementation(r,n),o=await i.chunk(t),l=dn.createAndMarkAsIssued().extendedBy(void 0,{fileCount:i.totalFileCount,chunkCount:await i.getChunksCount(),timeTakenMs:i.chunkingTimeMs,workspaceCount:this.workspaceCount});return jt(t,"index.chunk",l),o}async chunkFiles(t,r,n,i="default"){return await this.getImplementation(r,i).chunk(t,n)}};d();d();d();d();d();function Xj(e){switch(e){case"Agent":return"Agent";case"Ask":default:return"Ask"}}s(Xj,"toChatModeEnum");var p3=class{constructor(t,r){this.request=t;this.telemetryId=_r();this.timestamp=Date.now();this.status="in-progress";this.skills=[];this.ignoredSkills=[];this.annotations=[];this.id=r??this.telemetryId}static{s(this,"Turn")}},Jj=class e{constructor(t=[],r="panel",n="en",i){this.turns=t;this.source=r;this.userLanguage=n;this._telemetryId=_r();this._timestamp=Date.now();this.id=i??this.telemetryId}static{s(this,"Conversation")}copy(){let t=JSON.parse(JSON.stringify(this.turns)),r=new e(t,this.source,this.userLanguage,this.id);return r._telemetryId=this.telemetryId,r._timestamp=this.timestamp,r}get telemetryId(){return this._telemetryId}get timestamp(){return this._timestamp}addTurn(t){this.turns.push(t)}deleteTurn(t){this.turns=this.turns.filter(r=>r.id!==t)}getLastTurn(){return this.turns[this.turns.length-1]}findTurn(t){return this.turns.find(r=>r.id===t)}};d();d();d();var pqe={id:0,start_offset:0,stop_offset:0,type:"ip_code_citations",details:{},citations:{snippet:`html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Canvas Example</title>
<`,url:"https://github.com/duonghle285/gnoud9x.github.io/tree/c95127bc5b7a491d9223f21ac3b8c5100996e754/26062020-vehinhchunhat%2Findex.html",ip_type:"LICENSE",license:"NOASSERTION"}},gqe="Alright, This response contains a code citation.";d();var Aqe=`
# Should render
## Links
Links should render. However, if a user clicks on the link, it should open a confirmation dialog before navigating to the link.
markdown:
[GitHub Copilot](https://copilot.github.com)
html:
<a href="https://copilot.github.com">GitHub Copilot</a>
## Images
The following images do come from one of these sources and should render:
- \`raw.githubusercontent.com/\`
- \`private-user-images.githubusercontent.com/\`
- \`avatars.githubusercontent.com\`
- \`gist.github.com/assets/\`
markdown:
![logo](https://avatars.githubusercontent.com/u/147005046?v=4)
html:
<img src="https://avatars.githubusercontent.com/u/147005046?v=4" alt="logo"/>
## Headers
markdown:
# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6
html:
<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h4>Header 4</h4>
<h5>Header 5</h5>
<h6>Header 6</h6>
## Paragraphs
html:
<p>This is a paragraph.</p>
## Bold
markdown:
**bold text**
html:
<strong>bold text</strong>
## Italic
markdown:
_italic text_
html:
<i>italic text</i>
## Codeblock
markdown:
\`\`\`javascript
console.log('Hello, World!');
\`\`\`
html:
<code>console.log('Hello, World!');</code>
## Unordered List
markdown:
- item 1
- item 2
- item 3
html:
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
## Ordered List
markdown:
1. item 1
2. item 2
3. item 3
html:
<ol>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ol>
## Table
markdown:
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| cell 1 | cell 2 | cell 3 |
| cell 4 | cell 5 | cell 6 |
html:
<table>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>cell 1</td>
<td>cell 2</td>
<td>cell 3</td>
</tr>
<tr>
<td>cell 4</td>
<td>cell 5</td>
<td>cell 6</td>
</tr>
</tbody>
</table>
## Blockquote
markdown:
> This is a blockquote.
html:
<blockquote>This is a blockquote.</blockquote>
# Should not render
## html tags
Unsupported tags like \`<div>\` should not render but should be escaped. This code:
\`\`\`html
<div><ul><li>Foo</li></ul><img src="https://github.com/images/modules/site/copilot/productivity-bg-head.png" alt="productivity" width="20"/>
\`\`\`
should be rendered as:
\`\`\`html
<div>
* Foo
<img src="https://github.com/images/modules/site/copilot/productivity-bg-head.png" alt="productivity" width="20"/>
\`\`\`
code:
<div><ul><li>Foo</li></ul><img src="https://github.com/images/modules/site/copilot/productivity-bg-head.png" alt="productivity" width="20"/></div>
## images
The following images do *not* come from one of the trusted domains and should not render.
markdown:
![productivity](https://github.com/images/modules/site/copilot/productivity-bg-head.png)
html:
<img src="https://github.com/images/modules/site/copilot/productivity-bg-head.png" alt="productivity" width="100"/>
## Invisible characters
### Inline styles
Styled elements should not be rendered styled. This may trick the user to think elements are actually IDE controls
<p style="color: red;">This is an <span style="display: none;">harmfully</span> styled text!</p>
### html attributes
Only img src/alt and a href attributes should make it to the dom.
The following paragraph should not render the \`id\` attribute in the dom.
<p id="foo">This is a paragraph with an id</p>
`;d();d();var yqe=Ze(require("fs")),L0=Ze(require("path"));var Xue=[".test",".spec","_test","Test","_spec","_test","Tests",".Tests","Spec"],Zue="test_",EB={js:{suffix:[".test",".spec"],location:"sameFolder"},ts:{suffix:[".test",".spec"],location:"sameFolder"},go:{suffix:["_test"],location:"sameFolder"},java:{suffix:["Test"],location:"testFolder"},php:{suffix:["Test"],location:"testFolder"},dart:{suffix:["_test"],location:"testFolder"},cs:{suffix:["Test"],location:"testFolder"},rb:{suffix:["_test","_spec"],location:"testFolder"},py:{prefix:"test_",location:"testFolder"},ps1:{suffix:[".Tests"],location:"testFolder"},kt:{suffix:["Test"],location:"testFolder"}},IB=class{constructor(t,r,n=void 0){this.ctx=t;this.fileExists=r;this.baseUri=n}static{s(this,"TestFileFinder")}async findTestFileForSourceFile(t){let r=Pi(t),n=L0.extname(r).replace(".",""),i=EB[n]??{location:"sameFolder",prefix:Zue,suffix:Xue},o=[];if(i.prefix&&o.push(i.prefix+r),i.suffix)for(let u of i.suffix??[]){let f=r.replace(`.${n}`,u+"."+n);o.push(f)}let a=i.location??"sameFolder",l;if(a==="sameFolder"){if(l=Xo(of(t)),l===void 0)return}else{let u=Xo(t);if(u===void 0)return;l=this.determineTestFolder(u,a)}for(let u of o){let f=L0.join(l,u),m=this.parseTestFilePath(f);if(m&&await this.fileExists(m))return m}let c=ll(l);if(await this.fileExists(c))return Bo(c,o[0])}parseTestFilePath(t){try{return ll(t)}catch(r){kn.error(this.ctx,`Failed to parse test file path: ${t}`,r);return}}async findImplFileForTestFile(t){let r=Pi(t),n=L0.extname(r).replace(".",""),i=EB[n]??{location:"sameFolder",prefix:Zue,suffix:Xue},o=[];if(i.prefix&&o.push(r.substring(i.prefix.length)),i.suffix)for(let c of i.suffix??[]){let f=r.substring(0,r.length-c.length-1-n.length)+"."+n;o.push(f)}let a=i.location??"sameFolder",l;a==="sameFolder"?l=of(t):l=this.determineImplFolder(t);for(let c of o){let u=Bo(l,c);if(await this.fileExists(u))return u}}findExampleTestFile(t){let r=Xo(t);if(r===void 0)return;let n=L0.extname(Pi(t)).replace(".",""),i,o=EB[n]?.location??"sameFolder";o==="sameFolder"?i=L0.dirname(r):i=this.determineTestFolder(r,o);let a=this.findFiles(i,`.${n}`,EB[n]);if(a.length>0)return ll(a[0])}findFiles(t,r,n){let i=this._readdir(t),o=[];for(let a of i){let l=`${t}${L0.sep}${a}`;n?.prefix&&a.startsWith(n.prefix)&&o.push(l),n?.suffix&&n?.suffix.some(c=>a.endsWith(c+r))&&o.push(l)}return o}_readdir(t){return yqe.readdirSync(t,{withFileTypes:!0}).filter(r=>r.isFile()).map(r=>r.name)}determineTestFolder(t,r){let n=(this.baseUri&&Xo(this.baseUri))??"",i=L0.extname(t).replace(".",""),o=this.getRelativeTestFolder(t,n,i,r);return[n,...o].filter(a=>a).join(L0.sep)}getRelativeTestFolder(t,r,n,i){let o=L0.dirname(t).replace(r,"");switch(n){case"php":case"dart":case"py":return["tests"];case"ps1":return["Tests"];case"rb":return["test",o];case"cs":return[o.replace("src","src/tests")];case"java":case"scala":case"kt":return[o.replace(/src[\\/]main/,"src/test")];default:return i==="testFolder"?[o.replace("src","test")]:[o]}}determineImplFolder(t){let r=L0.extname(Pi(t)).replace(".",""),n=of(t);switch(r){case"php":case"dart":case"py":return n.replace("tests","src");case"ps1":return n.replace("Tests","src");case"rb":return n.replace("/test","");case"cs":return n.replace("src/tests","src");case"java":case"scala":case"kt":return n.replace("src/test","src/main");default:return n.replace("test/","src/")}}};function TB(e){let t=Pi(e),r=L0.extname(t),n=EB[r.replace(".","")];return n?!(n.suffix&&!n.suffix.some(o=>t.endsWith(o+r))||n.prefix&&!t.startsWith(n.prefix)):!!(Xue.some(o=>t.endsWith(o+r))||t.startsWith(Zue))}s(TB,"isTestFile");d();var Cqe=["indexed","indexing","not_indexed"],g3=class{constructor(){this._cache=new un(100)}static{s(this,"BlackbirdIndexingStatus")}async queryIndexingStatus(t,r,n){let i=t.ctx;if(!n)return!1;let o=`repos/${r}/copilot_internal/embeddings_index`,a=await uh(i,n,o);return a.ok?(await a.json()).semantic_code_search_ok:!1}isValid(t){return t!==void 0&&Date.now()-t.timestamp<30*60*1e3}async isRepoIndexed(t,r,n,i=!1){let o=AA(r);if(!o)return!1;let a=this._cache.get(o);if(!i&&this.isValid(a))return a.status;let l=await this.queryIndexingStatus(t,o,n);return this._cache.set(o,{status:l,timestamp:Date.now()}),l}get cache(){return this._cache}};d();d();d();async function xqe(e,t,r,n){let i=Do(t.tokenizer),o=r.filter(m=>i.tokenLength(m.text)<t.maxTokens);if(o.length===0)return;let a=[],l=await e.get(en).getToken(),c=f8(e,l,"embeddings"),u=l.token,f=0;for(;f<o.length&&!n.isCancellationRequested;){let m=o.slice(f,f+t.maxBatchSize),h=await WBt(e,c,u,t.modelId,m,n);a.push(...h||[]),f+=t.maxBatchSize}return a.length?a:void 0}s(xqe,"fetchEmbeddings");async function WBt(e,t,r,n,i,o){let a=_r(),l=i.map(u=>u.text),c=await Qx(e,t,r,void 0,a,{input:l,model:n,dimensions:1024},o,_5(e));if(c.status!==200||o.isCancellationRequested){Ea(e,new C2(`Failed to request dense embeddings, status: ${c.status}`),"LocalSnippetProvider.fetchEmbeddings");return}try{return(await c.json()).data.map(f=>({id:i[f.index].id,embedding:f.embedding}))}catch{return}}s(WBt,"sendEmbeddingsRequest");d();d();var Zj=class{static{s(this,"CosineSimilarityScoring")}score(t,r){let n=Math.sqrt(t.reduce((a,l)=>a+l*l,0)),i=Math.sqrt(r.reduce((a,l)=>a+l*l,0));return t.reduce((a,l,c)=>a+l*r[c],0)/(n*i)}terminateScoring(){}};var GBt="cosine",HBt=new Map([["cosine",Zj]]);function vqe(e){let t=e==="default"?GBt:e,r=HBt.get(t);if(!r)throw new Error(`Scoring constructor for type ${e} not found`);return r}s(vqe,"getScoringAlgorithm");d();var zf=class{constructor(){this.workspaceScoringProviders=new un(25)}static{s(this,"ScoringProvider")}createImplementation(t,r){let n=vqe(r);return new n}getImplementation(t,r,n="default"){let i=this.workspaceScoringProviders.get(r.uri);return i||(i=this.createImplementation(t,n),this.workspaceScoringProviders.set(r.uri,i)),i}score(t,r,n,i,o){return this.getImplementation(t,r,o).score(n,i)}terminateScoring(t,r,n){this.getImplementation(t,r,n).terminateScoring(),this.workspaceScoringProviders.delete(r.uri)}};var bqe={modelFamily:NF.textEmbedding3Small,scoringType:"default",dimensions:null};async function Eqe(e,t,r,n,i,o,a,l=bqe){let c={...bqe,...l},u=VBt(e,t,r,n);Kr.debug(e,`EmbeddingsReranker: Reranking ${u.length} snippets (includes the user query)`);let f=await e.get(ca).getFirstMatchingEmbeddingModelConfiguration(c.modelFamily);if(f===void 0)throw new Error(`EmbeddingsReranker: Model configuration not found for ${c.modelFamily}`);let m=performance.now(),h=await xqe(e,f,u,o),p=performance.now();if(a.embeddingsTimeMs=Math.floor(p-m),h===void 0||h.length===0)return[];let g=h.findIndex(B=>B.id==="userQuery");if(g===void 0)return[];let y=h.splice(g,1)[0];if(o.isCancellationRequested)return[];let x=performance.now(),b=$Bt(e,t,h,y,c.scoringType),E=performance.now();a.rerankingTimeMs=Math.floor(E-x);let _=b.slice(0,i);return Kr.debug(e,`EmbeddingsReranker: Returning ${_.length} snippets`),_.map(B=>u.find(N=>N.id===B.id).id)}s(Eqe,"rerankSnippets");function VBt(e,t,r,n){let i=n.map(o=>({id:o.id,text:o.chunk.toLowerCase()}));return i.push({id:"userQuery",text:r.toLowerCase()}),i}s(VBt,"formatEmbeddingsInput");function $Bt(e,t,r,n,i){let o=e.get(zf);return r.map(l=>({id:l.id,score:o.score(e,t,n.embedding,l.embedding,i)})).sort((l,c)=>c.score-l.score)}s($Bt,"scoreEmbeddings");d();d();d();var tfe=Ze(Vj());var zBt=.75,YBt=1.2,KBt=47,eV=class{constructor(t,r){this.ctx=t;this.workspaceFolder=r;this.chunksCount=0;this.sumTokenCount=0;this.status="notStarted"}static{s(this,"BM25Ranking")}get avgTokenCount(){return this.sumTokenCount/this.chunksCount}async initialize(t){this.sumTokenCount=0,this.chunksCount=0;for await(let r of t)this.sumTokenCount+=r.tokenCount,this.chunksCount++;this.status="completed"}async addChunks(t){for await(let r of t)this.sumTokenCount+=r.tokenCount,this.chunksCount++}async query(t){let r=await tV();try{return await this.doQuery(t)}finally{await r.stopWorkerPool()}}async doQuery(t){let r=t.map(l=>l.toLowerCase()),n=await this.calculateIDFValues(r),i=Math.min(10*t.length,KBt),o=Math.min(i,this.chunksCount);return await this.calculateBM25Scores(r,this.avgTokenCount,n,o)}async calculateIDFValues(t){let r=this.ctx.get(ma).getChunks(this.workspaceFolder),n=TA(r,o=>({...o,chunk:o.chunk.toLowerCase()})),i=TA(n,o=>o.chunk);return await JBt(t,i)}async calculateBM25Scores(t,r,n,i){let o=this.ctx.get(ma).getChunks(this.workspaceFolder),a=new efe(i);for await(let l of o){let c=await XBt({...l,chunk:l.chunk.toLowerCase()},t,r,n);a.add({...c,chunk:l.chunk})}return a.toArray(.75)}deleteEmbeddings(t){this.chunksCount-=t.length,this.sumTokenCount-=t.reduce((r,n)=>r+n.tokenCount,0)}terminateRanking(){}};async function JBt(e,t){let r=new SharedArrayBuffer(e.length*Int32Array.BYTES_PER_ELEMENT),n=new Int32Array(r),i=[],o=0;for await(let c of t){o++;let u=tfe.job(({snippet:f,keywords:m})=>m.map(p=>f.includes(p)?1:0),{data:{snippet:c,keywords:e}}).then(f=>{for(let m=0;m<e.length;m++)Atomics.add(n,m,f[m])});i.push(u)}await Promise.all(i);let a=new Int32Array(r),l={};for(let c=0;c<e.length;c++)l[e[c]]=Math.log((o-a[c]+.5)/(a[c]+.5)+1);return l}s(JBt,"calculateIDFValues");async function XBt(e,t,r,n){return{score:await tfe.job(({keywords:o,document:a,docLength:l,avgTokenCount:c,idfValues:u,k1:f,b:m})=>{let h=0;for(let p of o){let g=u[p],y=(a.match(new RegExp(p,"g"))||[]).length,x=g*(y*(f+1)),b=y+f*(1-m+m*l/c);h+=x/b}return h},{data:{document:e.chunk,docLength:e.tokenCount,keywords:t,avgTokenCount:r,idfValues:n,k1:YBt,b:zBt}}),...e}}s(XBt,"calculateBM25Score");var efe=class{constructor(t,r=-1/0){this.maxSize=t;this.minScore=r;this.store=[]}static{s(this,"SimpleHeap")}toArray(t){if(this.store.length&&typeof t=="number"){let r=this.store.at(0).score*(1-t);return this.store.filter(n=>n.score>=r)}return this.store}add(t){if(t.score<=this.minScore)return;let r=this.store.findIndex(n=>n.score<t.score);for(this.store.splice(r>=0?r:this.store.length,0,t);this.store.length>this.maxSize;)this.store.pop();this.store.length===this.maxSize&&(this.minScore=this.store.at(-1)?.score??this.minScore)}};var eDt="bm25",tDt=new Map([["bm25",eV]]);function Iqe(e){let t=e==="default"?eDt:e,r=tDt.get(t);if(!r)throw new Error(`Ranking constructor for type ${e} not found`);return r}s(Iqe,"getRankingAlgorithm");var xc=class{constructor(){this.workspaceRankingProviders=new un(25)}static{s(this,"RankingProvider")}createImplementation(t,r,n){let i=Iqe(n);return new i(t,r)}getImplementation(t,r,n="default"){let i=this.workspaceRankingProviders.get(r.uri);return i||(i=this.createImplementation(t,r,n),this.workspaceRankingProviders.set(r.uri,i)),i}status(t,r,n){return this.getImplementation(t,r,n).status}async initialize(t,r,n,i="default"){await this.getImplementation(t,r,i).initialize(n)}async addChunks(t,r,n,i="default"){await this.getImplementation(t,r,i).addChunks(n)}async query(t,r,n,i){return this.getImplementation(t,r,i).query(n)}async terminateRanking(t,r,n){await this.getImplementation(t,r,n).terminateRanking(),this.workspaceRankingProviders.delete(r.uri)}deleteEmbeddings(t,r,n,i){return this.getImplementation(t,r,i).deleteEmbeddings(n)}};d();async function Tqe(e,t){let r=e.ctx,n=await yo.getModelConfiguration(r,"synonyms",void 0,{tool_calls:!0}),i={promptType:"synonyms",modelConfiguration:n},o=await r.get(vc).toPrompt(e,i);if(!o.toolConfig)return;let a={modelConfiguration:n,uiKind:"conversationPanel",messages:o.messages,tools:o.toolConfig?.tools,tool_choice:o.toolConfig?.tool_choice,llmInteraction:e.toLlmInteraction()},l=new ka(r),c=await fc(r,e),u=await l.fetchResponse(a,t,c.extendedBy({messageSource:"chat.synonyms"}));if(u.type==="success"&&u.toolCalls&&u.toolCalls.length>0){let f=u.toolCalls[0],m=o.toolConfig?.extractArguments(f).keywords;return!m||!Array.isArray(m)?void 0:(Kr.debug(r,`UserQueryParser: Parsed ${m.length} keywords from the original user query: ${m.join(", ")}`),m.length?m:void 0)}else{let f="reason"in u?u.reason:"";Ea(r,new C2(`Failed to request user query synonyms, result type: ${u.type}, reason: ${f}`),"LocalSnippetProvider.parseUserQuery")}}s(Tqe,"parseUserQuery");var wqe=Ze($f());var C2=class extends Error{static{s(this,"LocalSnippetProviderError")}constructor(t){super(String(t),{cause:t}),this.name="LocalSnippetProviderError"}},rV=class{constructor(){this.providerType="local"}static{s(this,"LocalSnippetProvider")}snippetProviderStatus(t,r){if(!t.turn.workspaceFolder)return Promise.resolve("not_indexed");r===void 0&&(r=!0);let n=t.ctx,i=n.get(ma),o=i.status(t.turn.workspaceFolder),a=n.get(xc),l=a.status(n,t.turn.workspaceFolder);if(o==="completed"&&l==="completed")return Promise.resolve("indexed");if(o==="started"||l==="started")return Promise.resolve("indexing");if(r){let c=t.turn.workspaceFolder;if(o==="notStarted")return Promise.race([i.chunk(n,c).then(u=>{if(i.status(c)==="completed")return a.initialize(n,c,u)}).then(()=>this.snippetProviderStatus(t,!1)),new Promise(u=>setTimeout(()=>u("not_indexed"),1e3))]);if(l==="notStarted"){let u=i.getChunks(c);return Promise.race([a.initialize(n,c,u).then(()=>this.snippetProviderStatus(t,!1)),new Promise(f=>setTimeout(()=>f("not_indexed"),1e3))])}}return Promise.resolve("not_indexed")}async collectLocalSnippets(t,r){let n=t.turn.workspaceFolder;if(!n)return[];let i=t.ctx,a=await i.get(ma).chunkCount(n);if(a===0)return[];r.chunkCount=a;let l,c=performance.now();try{l=await Tqe(t,t.cancelationToken)}catch(g){let y=new C2(g);Ea(i,y,"LocalSnippetProvider.parseUserQuery")}let u=performance.now();if(r.synonymTimeMs=Math.floor(u-c),l===void 0)return[];let f=i.get(xc),m=[],h=performance.now();try{let g=await f.query(i,n,l);r.localSnippetCount=g.length,m=g}catch(g){let y=new C2(g);Ea(i,y,"LocalSnippetProvider.rankingQuery")}let p=performance.now();return r.rankingTimeMs=Math.floor(p-h),m}async rerankLocalSnippets(t,r,n){let i=t.turn.workspaceFolder;if(!i)return[];let o=t.ctx,a=ln(t.turn.request.message),l=[];try{l=await Eqe(o,i,a,r,5,t.cancelationToken,n)}catch(f){let m=new C2(f);Ea(o,m,"LocalSnippetProvider.rerankSnippets")}let c=[],u=o.get(On);for(let f of l){let m=f.split("#")[0],h=await u.getOrReadTextDocument({uri:m}),p=r.find(g=>g.id===f);if(h.status==="valid"){let g=h.document.positionAt(p.range.start),y=h.document.positionAt(p.range.end),x=No.range(g,y);c.push({uri:h.document.uri,range:x,snippet:p.chunk})}}return c}async provideSnippets(t){let r=this.collectInfoMessage(t);r&&await t.info(r);let n={...C8e},i=await this.collectLocalSnippets(t,n);if(i.length===0)return{snippets:[],measurements:n};let o=t.ctx;return Kr.debug(o,`LocalSnippetProvider: First pass: Found ${i.length} snippets.`),{snippets:await this.rerankLocalSnippets(t,i,n),measurements:n}}collectInfoMessage(t){let r=t.turn.workspaceFolder;if(!r)return;let o=t.ctx.get(ma).checkLimits(r);if(o.fileCountExceeded||o.chunkCountExceeded)return wqe.default`
Copilot has partially indexed this project as it exceeds the file limit. As a result, responses may have incomplete context. Consider excluding large, less relevant files or folders (e.g., large CSV files) to improve accuracy.
`}};var Sqe=Ze(_qe()),oV=Ze(Vj()),Rqe=Ze(require("os")),kqe=Ze($f());var iDt=Math.min(Math.max(Math.ceil(Rqe.cpus().length/2),1),10),wB=class e{constructor(){this.isActive=!0}static{s(this,"WorkerPoolToken")}static{this.workerPoolStarted=!1}static{this.activeProcessCount=0}static{this.allTokens=[]}static{this.lock=new Sqe.default}static async startWorkerPool(){await e.lock.acquireAsync();try{e.workerPoolStarted||(e.workerPoolStarted=!0,await oV.start({maxWorkers:iDt})),e.activeProcessCount++;let t=new e;return e.allTokens.push(t),t}finally{e.lock.release()}}async stopWorkerPool(){if(this.isActive){await e.lock.acquireAsync();try{this.isActive&&(this.isActive=!1,e.activeProcessCount--,e.activeProcessCount==0&&(await oV.stop(),e.workerPoolStarted=!1),e.allTokens.includes(this)&&e.allTokens.splice(e.allTokens.indexOf(this),1))}finally{e.lock.release()}}}static async forceStopWorkerPool(){let t=e.allTokens[Symbol.iterator]();for(let r of t)await r.stopWorkerPool();e.workerPoolStarted=!1,e.activeProcessCount=0}},tV=wB.startWorkerPool.bind(wB);var c8n=I.Object({uri:I.String(),snippet:I.String(),range:I.Object({start:I.Object({line:I.Number(),character:I.Number()}),end:I.Object({line:I.Number(),character:I.Number()})})}),ife=class{constructor(t){this.turnContext=t}static{s(this,"ProjectContextSkillProcessor")}value(){return 1}async processSkill(t){if(this.turnContext.cancelationToken.isCancellationRequested){await this.turnContext.steps.cancel(AT);return}let r=[],n=this.turnContext.ctx.get(On),i=this.removeDuplicateSnippets(t);for(let o of i){let{uri:a,snippet:l,range:c}=o,u=await n.getOrReadTextDocument(o);if(u.status==="valid"){let f=new u1(u.document,c,c),m=new zt([l]),p=TB(a)?.5:.8;r.push([`Code excerpt from file \`${Xo(a)}\`:`,1],[f.wrapInTicks(m,p),1]),await this.turnContext.collectFile(yT,a,ys(u),c)}}if(r.length>0)return r.unshift([new zt(["The user wants you to consider the following snippets when computing your answer."]),1]),new zt(r)}removeDuplicateSnippets(t){let r={};return t.forEach(n=>{let i=`${n.uri}#[${n.range.start.line},${n.range.start.character}]-[${n.range.end.line},${n.range.end.character}]`;r[i]||(r[i]=n)}),Object.values(r)}},AT="collect-project-context",nV=class extends cT{constructor(r,n=[new rV]){super();this.ctx=r;this.snippetProviders=n;this.ready=!1;this.ctx.get(n1).addListener(this)}static{s(this,"ProjectContextSkillResolver")}start(){this.ready=!0}async onWorkspaceAdded(r){if(!await this.isEnabled()||(this.workerPoolToken=await tV(),!r.uri))return;let n=this.ctx.get(ma),i=this.ctx.get(Jc),o=this.ctx.get(xc),a=await n.chunk(this.ctx,r);n.status(r)!=="completed"&&i.terminateWatching(r),await o.initialize(this.ctx,r,a),await this.workerPoolToken.stopWorkerPool()}async onWorkspaceRemoved(r){if(!await this.isEnabled())return;let n=this.ctx.get(ma);if(!r)return;let i=n.getParentFolder(r);if(i){let l=await n.deleteSubfolderChunks(i,r);await this.ctx.get(xc).deleteEmbeddings(this.ctx,i,l);return}n.terminateChunking(this.ctx,r),await this.ctx.get(xc).terminateRanking(this.ctx,r),this.ctx.get(zf).terminateScoring(this.ctx,r),n.workspaceCount===0&&await wB.forceStopWorkerPool()}async onWorkspaceSubfoldersTerminated(r,n){let i=this.ctx.get(ma),o=this.ctx.get(xc),a=this.ctx.get(zf);for(let l of n)i.terminateChunking(this.ctx,l),await o.terminateRanking(this.ctx,l),a.terminateScoring(this.ctx,r)}async onFileChange(r){if(!await this.isEnabled())return;let n=await tV();try{let i=r.documents.map(c=>c.uri),o=r.workspaceFolder;if(!o)return;let a=this.ctx.get(ma),l=this.ctx.get(xc);if(r.type==="delete"||r.type==="update"){let c=await a.deleteFileChunks(o,i);await l.deleteEmbeddings(this.ctx,o,c)}if(r.type==="create"||r.type==="update"){let c=await a.chunk(this.ctx,o,r.documents);await l.addChunks(this.ctx,o,c)}}finally{await n.stopWorkerPool()}}isStarted(){return this.ready}async isEnabled(){return!0}async resolveSkill(r){await r.steps.start(AT,"Collecting relevant project context"),await r.info(kqe.default`Project context is applied to this response, which may lead to slightly longer load times. For faster and more general Copilot responses, remove the project context option from your prompt.`);let n=this.snippetProviders.map(async l=>l.snippetProviderStatus(r)),i=await Promise.all(n),o="not_indexed",a;for(let l of Cqe){let c=i.findIndex(u=>u===l);if(c!==-1){o=l,a=this.snippetProviders[c];break}}switch(o){case"indexed":{let{snippets:l,measurements:c}=await a.provideSnippets(r);if(await x8e(r,a.providerType,c),l.length===0){await r.steps.error(AT,"No project context found");return}return await r.steps.finish(AT),l}case"indexing":{await r.steps.error(AT,"Indexing repository, please try again later");return}case"not_indexed":{await r.steps.error(AT,"No project context available");return}}}},yT="project-context",iV=class extends jl{static{s(this,"ProjectContextSkill")}constructor(t){super(yT,"Code snippets and documentation from the open project. This skill is useful when the user question is specific to the open project and its context. Do not include this skill for general programming questions.","Performing code search",()=>t,r=>new ife(r),"implicit",["Relevant: How do I add a custom server route?","Relevant: Where is the code that processes the response from CopyableThreadElement?","Relevant: Where do I add tests for the InputValidation class?","Relevant: How to implement a shared buffer component","Not relevant: What does numpy do?"],()=>!0)}};d();var Bqe=I.Object({labels:I.Array(I.String())}),ofe=class{constructor(t){this.turnContext=t}static{s(this,"ProjectLabelsSkillProcessor")}value(){return 1}processSkill(t){let r=[];return r.push([new zt(["The developer is working on a project with the following characteristics (languages, frameworks):"]),1]),t.labels.forEach(n=>{r.push([new zt([`- ${n}`]),.9]),this.turnContext.collectLabel(ep,n)}),new zt(r)}},ep="project-labels",sV=class{constructor(t){this._resolver=t;this.id=ep;this.type="explicit"}static{s(this,"ProjectLabelsSkill")}description(){return"The characteristics of the project the developer is working on (languages, frameworks)"}resolver(){return this._resolver}processor(t){return new ofe(t)}};d();var aV=Ze($f());var Pqe={id:0,start_offset:0,stop_offset:0,type:"code_vulnerability",details:{type:"server-side-unvalidated-url-redirection",description:"Allows a URL to be redirected to a different URL that is specified by an external user.",ui_type:"test",ui_description:"test"}},Nqe=aV.dedent`
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
`,Lqe=aV.dedent`
\`\`\`kotlin
fun main() {
println("Hello, World!")
}
\`\`\`
`,oDt=aV.dedent`
### Inputs
\`p\` - paragraph message
\`c\` - code block
\`<number>\` - number of vulnerabilities, must be at the end of the string (applies to all code blocks)
### Examples
\`/debug.vulnerability\` - 1 paragraph followed by 1 code block with 1 vulnerability
\`/debug.vulnerability pcc2\` - 1 paragraph followed by 2 code blocks with 2 vulnerabilities each
\`/debug.vulnerability cpc3\` - 1 code block followed by 1 paragraph followed by 1 code block--each code block has 3 vulnerabilities
`,sfe=`
`,Dqe=Nqe+sfe+Lqe;function Fqe(e){let t=1;if(e.length===0)return{reply:Dqe,vulnerabilities:t};if(e==="0")return{reply:Dqe,vulnerabilities:0};if(e==="help")return{reply:oDt,vulnerabilities:t};let r=e.slice(-1);isNaN(Number(r))||(t=Number(r),e=e.slice(0,-1));let n="";for(let i of e)i==="p"?n+=Nqe+sfe:i==="c"&&(n+=Lqe+sfe);return{reply:n.trimEnd(),vulnerabilities:t}}s(Fqe,"parseVulnerabilitiesInstructions");var Mqe=Ze($f());var sDt="Oops, your response got filtered. Vote down if you think this shouldn't have happened",aDt="You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait for your limit to reset.",afe=class{constructor(){this.id="debug.fail";this.description="Fail for debugging purposes";this.shortDescription="Fail";this.scopes=["chat-panel"]}static{s(this,"DebugFailPromptTemplate")}response(t,r){throw new Error(r.length>0?r:"Debug Fail")}},lDt=new afe,lfe=class{constructor(){this.id="debug.upgrade";this.description="upgrade for debugging purposes";this.shortDescription="upgrade";this.scopes=["chat-panel"]}static{s(this,"DebugUpgradePromptTemplate")}response(t){return new Vl(aDt,{message:"",code:402,responseIsIncomplete:!0,responseIsFiltered:!1})}},cDt=new lfe,cfe=class{constructor(){this.id="debug.notify";this.description="Notify for debugging purposes";this.shortDescription="Notify";this.scopes=["chat-panel","inline"]}static{s(this,"DebugNotificationPromptTemplate")}response(t,r){let n="warning";r.includes("info")&&(n="info");let i=r.replace("info","").replace("warning","").trim(),o=[{severity:n,message:i.length>0?i:"Debug Notification"}];return new Vl("Alright, I'm producing a notification",void 0,[],o)}},uDt=new cfe,ufe=class{constructor(){this.id="debug.filter";this.description="Make the RAI filter kick in";this.shortDescription="RAI Filter";this.scopes=["chat-panel"]}static{s(this,"DebugFilterPromptTemplate")}response(t){return t.turn.status="filtered",new Vl(sDt,{message:"",responseIsFiltered:!0,responseIsIncomplete:!1})}},fDt=new ufe,ffe=class{constructor(){this.id="debug.dump";this.description="Dump the conversation";this.shortDescription="Dump";this.scopes=["chat-panel"]}static{s(this,"DebugDumpPromptTemplate")}async response(t){return new Vl(await Oqe(t))}},dDt=new ffe,dfe=class{constructor(){this.id="debug.tree";this.description="Jingle bells, jingle bells, jingle all the way";this.shortDescription="Christmas Tree";this.scopes=["chat-panel"]}static{s(this,"DebugChristmasTreePromptTemplate")}requiredSkills(){return[ep,t0]}instructions(t,r){return"Create a function that prints a christmas tree"}},mDt=new dfe,mfe=class{constructor(){this.id="debug.echo";this.description="Echo the user message back to the user";this.shortDescription="Echo";this.scopes=["chat-panel"]}static{s(this,"DebugEchoPromptTemplate")}response(t){return new Vl(ln(t.turn.request.message))}},hDt=new mfe,hfe=class{constructor(){this.id="debug.prompt";this.description="Show the prompt for the last response or generate a new one";this.shortDescription="Prompt";this.scopes=["chat-panel"]}static{s(this,"DebugPromptPromptTemplate")}response(t,r){let n=t.ctx.get($l).getLastTurnPrompts();if(n!==void 0&&n.size>0){let i="Here are the prompts used in the last turn:";return n.forEach((o,a)=>{i+=Mqe.default`
### ${a} prompt
\`\`\`\`
${o}
\`\`\`\`
`}),new Vl(i)}return new Vl("No prompt available")}},pDt=new hfe,pfe=class{constructor(){this.id="debug.skills";this.description="Resolves and displays all available skills or a single skill (id) if provided";this.shortDescription="Skills";this.scopes=["chat-panel"]}static{s(this,"DebugSkillsPromptTemplate")}async response(t,r,n){let i,o;if(r.length>0){let a=r.split(" ");i=a[0],o=a.slice(1).join(" ")}return t.turn.request.message=o??"",new Vl(await Uqe(t,n,i))}},gDt=new pfe,gfe=class{constructor(){this.id="debug.vulnerability";this.description="Create a message with a vulnerability annotation";this.shortDescription="Vulnerability";this.scopes=["chat-panel"]}static{s(this,"DebugVulnerabilityPromptTemplate")}response(t,r){let{reply:n,vulnerabilities:i}=Fqe(r);for(let o=0;o<i;o++)t.turn.annotations.push(Pqe);return new Vl(n,void 0,t.turn.annotations)}},ADt=new gfe,Afe=class{constructor(){this.id="debug.citation";this.description="Create a message with a code citation annotation";this.shortDescription="CodeCitation";this.scopes=["chat-panel"]}static{s(this,"DebugCodeCitationPromptTemplate")}response(t){return t.turn.annotations.push(pqe),new Vl(gqe,void 0,t.turn.annotations)}},yDt=new Afe,yfe=class{constructor(){this.id="debug.markdown";this.description="Markdown rendering specification by example";this.shortDescription="Markdown";this.scopes=["chat-panel","inline"]}static{s(this,"DebugMarkdownRenderingPromptTemplate")}response(){return new Vl(Aqe)}},CDt=new yfe,Cfe=class{constructor(){this.id="debug.long";this.description="Generate a long response";this.shortDescription="Long";this.scopes=["chat-panel"]}static{s(this,"DebugLongPromptTemplate")}instructions(t,r){return"Write out the OWASP top 10 with code examples in java"}},xDt=new Cfe,xfe=class{constructor(){this.id="debug.project";this.description="Generate a response using the project context skill";this.shortDescription="Project";this.scopes=["chat-panel","inline"]}static{s(this,"DebugProjectContextPromptTemplate")}requiredSkills(){return[yT]}},vDt=new xfe,vfe=class{constructor(){this.id="debug.confirmation";this.description="Generate a response with a confirmation";this.shortDescription="Confirmation";this.scopes=["chat-panel","inline"]}static{s(this,"DebugConfirmationPromptTemplate")}response(){let t={type:"action",title:"Confirmation that you want to proceed",message:"Do you want to proceed?",agentSlug:"debug.confirmation",confirmation:{answer:"yes"}};return new Vl("Alright, I'm producing a notification",void 0,[],[],[],t)}},bDt=new vfe;function Qqe(){return[lDt,cDt,uDt,fDt,mDt,dDt,hDt,pDt,gDt,ADt,yDt,bDt,CDt,xDt,vDt]}s(Qqe,"getDebugTemplates");d();d();function y3(e,t){if(e.length==0)return new zt([]);let r=e.map((n,i)=>{let o;switch(t){case"linear":o=1-i/e.length;break;case"inverseLinear":o=(i+1)/e.length;break;case"positional":o=1/(i+1);break;case"inversePositional":o=1/(e.length-i);break}return Array.isArray(n)&&n.length==2&&(o*=n[1],n=n[0]),[n,o]});return new zt(r)}s(y3,"weighElidableList");var qqe=I.Object({uri:I.String(),problems:I.Array(I.Object({message:I.String(),range:ba}))}),bfe=class{constructor(t){this.turnContext=t}static{s(this,"ProblemsInActiveDocumentSkillProcessor")}value(){return 1}async processSkill(t){let r=this.turnContext.ctx.get(On),n=await r.getOrReadTextDocument(t);if(await this.turnContext.collectFile(C3,t.uri,ys(n)),n.status==="valid"){let i=r.getRelativePath(n.document);this.turnContext.collectLabel(C3,`problems in ${i}`);let o=this.getElidableProblems(t,n,i);return await this.preElideDocuments(o)}else this.turnContext.collectLabel(C3,"problem markers")}getElidableProblems(t,r,n){let i=[];return i.push(new zt([`Problems and errors in the active document (\`${n}\`):`])),i.push(...this.createElidableProblems(t,r)),y3(i,"linear")}createElidableProblems(t,r){return t.problems.map(n=>{let i=[];i.push(new zt([`- "${n.message}" at line ${n.range.start.line}.`+(r.document?" Excerpt from the code:":"")]));let o=n.range,a;if(o&&(this.isEmpty(o)?a=r.document.lineAt(o.start).text:a=r.document.getText(o),a)){let l=r.document.detectedLanguageId;i.push(new zt([["```"+l,1],[y0(a),.8],["```",1]]))}return new zt(i)})}isEmpty(t){return t.start.line===t.end.line&&t.start.character===t.end.character}async preElideDocuments(t){let r=(await yo.getModelConfiguration(this.turnContext.ctx,"user")).maxRequestTokens,n=t.elide(Math.floor(r*.1)).getText();return new zt([n])}},C3="problems-in-active-document",lV=class extends jl{static{s(this,"ProblemsInActiveDocumentSkill")}constructor(t){super(C3,"List of problems and errors in the active document, useful when the user question is about finding and fixing errors, non-functioning code, compilation issues, etc.","Analyzing problems and errors",()=>t,r=>new bfe(r),"explicit",["How can I fix the errors?","Why is my app not working?","Why am I getting compilation errors?","Raw error messages or stack traces"])}};d();d();var cV=class{constructor(t){this.turnContext=t}static{s(this,"PromptForTestGeneration")}async fromImplementationFile(t){let r=this.turnContext.ctx.get(Vr).getWorkspaceFolder(t),n=this.fileExistFn(),i=new IB(this.turnContext.ctx,n,r?.uri),o=await i.findTestFileForSourceFile(t.uri),a=TB(t.uri);if(o&&!a){let l=t.detectedLanguageId;if(await n(o))return await this.asTestFilePrompt(l,o);{let c=i.findExampleTestFile(t.uri);if(c)return await this.asExampleFilePrompt(l,c)}}}async fromTestFile(t){if(!TB(t))return;let n=this.turnContext.ctx.get(Vr).getWorkspaceFolder(t),i=this.fileExistFn(),a=await new IB(this.turnContext.ctx,i,n?.uri).findImplFileForTestFile(t.uri);if(a){let l=t.detectedLanguageId;if(await i(a))return await this.asImplFilePrompt(l,a)}}async asImplFilePrompt(t,r){let n=await this.fileInfoForPrompt(r);if(n){let[i,o]=n;return new zt([[`${EDt} \`${o}\`:`,1],["```"+t,1],[i,.9],["```",1]])}return new zt([])}async asTestFilePrompt(t,r){let n=await this.fileInfoForPrompt(r);if(n){let[i,o]=n;return new zt([[`${IDt} \`${o}\`:`,1],["```"+t,1],[i,.9],["```",1]])}return new zt([])}async asExampleFilePrompt(t,r){let n=await this.fileInfoForPrompt(r);if(n){let[i,o]=n;return new zt([[`${TDt} \`${o}\`:`,1],["```"+t,1],[i,.9],["```",1]])}return new zt([])}async fileInfoForPrompt(t){if(!this.turnContext.isFileIncluded(t)){let r=this.turnContext.ctx.get(On),n=await r.getOrReadTextDocument({uri:t});if(await this.turnContext.collectFile(tp,t,ys(n)),n.status==="valid"){let i=r.getRelativePath(n.document);return[y0(n.document.getText()),i]}}}fileExistFn(){return async t=>{try{return await this.turnContext.ctx.get(xo).stat(t),!0}catch{return!1}}}},EDt="Code excerpt from the implementation source file",IDt="Code excerpt from the test file",TDt="Code excerpt from an example test file";var Wqe=I.Object({currentFileUri:I.String(),sourceFileUri:I.Optional(I.String()),testFileUri:I.Optional(I.String())}),Ife=class{constructor(t){this.turnContext=t}static{s(this,"TestContextSkillProcessor")}value(){return .9}async processSkill(t){let r=this.turnContext.ctx.get(On),n=new cV(this.turnContext);if(t.sourceFileUri&&t.testFileUri){if(t.sourceFileUri!==t.currentFileUri&&t.testFileUri!==t.currentFileUri)return;if(t.testFileUri===t.currentFileUri){let i=await r.getOrReadTextDocument({uri:t.testFileUri});if(await this.turnContext.collectFile(tp,t.testFileUri,ys(i)),i.status==="valid")return await n.asImplFilePrompt(i.document.detectedLanguageId,t.sourceFileUri)}else if(t.sourceFileUri===t.currentFileUri){let i=await r.getOrReadTextDocument({uri:t.sourceFileUri});if(await this.turnContext.collectFile(tp,t.sourceFileUri,ys(i)),i.status==="valid")return await n.asTestFilePrompt(i.document.detectedLanguageId,t.testFileUri)}}else if(t.sourceFileUri&&t.sourceFileUri===t.currentFileUri){let i=await r.getOrReadTextDocument({uri:t.sourceFileUri});if(await this.turnContext.collectFile(tp,t.sourceFileUri,ys(i)),i.status==="valid")return await n.fromImplementationFile(i.document)}else if(t.testFileUri&&t.testFileUri===t.currentFileUri){let i=await r.getOrReadTextDocument({uri:t.testFileUri});if(await this.turnContext.collectFile(tp,t.testFileUri,ys(i)),i.status==="valid")return await n.fromTestFile(i.document)}}},tp="test-context",uV=class extends jl{static{s(this,"TestContextSkill")}constructor(t){super(tp,"Example tests useful for creating, adding and fixing tests, to detect available test frameworks as well as finding the corresponding implementation to existing tests","Searching test examples",()=>t,r=>new Ife(r))}};d();var Gqe=Ze($f());var Hqe=I.Object({failures:I.Array(I.Object({testName:I.String(),testSuite:I.Optional(I.String()),testFileUri:I.String(),failureReason:I.Optional(I.String()),testLocation:ba}))}),Tfe=class{constructor(t){this.turnContext=t}static{s(this,"TestFailuresSkillProcessor")}value(){return .9}async processSkill(t){if(t.failures.length>0){this.turnContext.collectLabel(aE,"test failures");let r=await this.createElidableFailures(t.failures);if(r){let n=new zt(["The latest test run produced the following failures and errors:"]);return new zt([[n,1],[r,1]])}}}async createElidableFailures(t){let r=this.turnContext.ctx.get(On),n=[],i=this.groupFailuresByFile(t);for(let[o,a]of i.entries()){let l=await r.getOrReadTextDocument({uri:o});if(await this.turnContext.collectFile(aE,o,ys(l)),l.status==="valid"){let c=r.getRelativePath(l.document),u=this.createElidableFailuresOfDoc(a,c),f=this.appendCode(u,c,l.document);n.push([f,1])}}if(n.length>0)return new zt(n)}groupFailuresByFile(t){let r=new Map;for(let n of t){let i=r.get(n.testFileUri)||[];i.push(n),r.set(n.testFileUri,i)}return r}createElidableFailuresOfDoc(t,r){let n=t.map(i=>{let o=`\`${i.testName}\``,a=`${i.testSuite?` in suite \`${i.testSuite}\``:""}`,l=` in file \`${r}\` `,c=". ";i.failureReason&&(c=" with the following error:",i.failureReason.includes(`
`)?c+="\n```\n"+i.failureReason+"\n```\n":c+=` \`${i.failureReason}\`. `);let u=`${i.testLocation.start.line==i.testLocation.end.line?"on line "+i.testLocation.start.line:"between lines "+i.testLocation.start.line+" and "+i.testLocation.end.line}`;return[new zt([Gqe.default`\n\n- Test ${o}${a}${l}failed${c}The failed test is ${u}.\n`]),1]});return new zt(n)}appendCode(t,r,n){let i=[new zt([`
The code of file \`${r}\` is:
`]),.6],o=[new zt([["```"+n.detectedLanguageId,1],[y0(n.getText()),.9],["```",1]]),.7];return new zt([[t,1],i,o])}},aE="test-failures",fV=class extends jl{static{s(this,"TestFailuresSkill")}constructor(t){super(aE,"Test failures and errors of the latest test run","Collecting test failures",()=>t,r=>new Tfe(r))}};var Am=Ze($f());var Vl=class{constructor(t,r,n=[],i=[],o=[],a){this.message=t;this.error=r;this.annotations=n;this.notifications=i;this.references=o;this.confirmationRequest=a}static{s(this,"PromptTemplateResponse")}},lE=class{constructor(t,r,n,i,o=[],a=[],l,c=!1){this.id=t;this.description=r;this.shortDescription=n;this.prompt=i;this.skills=o;this.scopes=a;this.inlinePrompt=l;this.producesCodeEdits=c}static{s(this,"StaticPromptTemplate")}instructions(t,r,n="panel"){let i;return n==="inline"?i=this.inlinePrompt??this.prompt:i=this.prompt,i+`
`+r}requiredSkills(){return this.skills}},wDt=new lE("tests","Generate unit tests","Generate Tests",Am.default`
Write a set of unit tests for the code above, or for the selected code if provided.
Provide tests for the functionality of the code and not the implementation details.
The tests should test the happy path as well as the edge cases.
Choose self explanatory names for the tests that describe the tested behavior. Do not start the test names with "test".
Think about the different scenarios that could happen and test them.
Do reply with the tests only and do not explain them further.
Do reply with new or modified tests only and not with the complete test class or suite.
Follow the same test style as in existing tests if they exist.
You must not create inline comments like "Arrange, Act, Assert", unless existing tests use inline comments as well.
If existing tests use any mocking or stubbing libraries, use the same libraries before writing your own test doubles.
`,[tp,aE],["chat-panel","editor"]),_Dt=new lE("simplify","Simplify the code","Simplify This",Am.default`
Provide a simplified version of the selected code above.
Do not change the behavior of the code.
The code should still be readable and easy to understand.
Do not reply with the original code but only a simplified version.
Do only reply with one code snippet that contains the complete simplified code and explain what you have simplified after.`,[],["editor","chat-panel","inline"],Am.default`
Provide a simplified version of the selected code.
Modify the selected code to make it simpler and easier to understand.
Do not change the behavior of the code.
Removing empty lines is not a simplification.
You must not omit any code that is necessary for the code to compile and run, for example by replacing lines with ... or similar.
Do not reply with the original code but only a simplified version.`,!0),SDt=new lE("fix","Fix problems and compile errors","Fix This",Am.default`
Fix the provided errors and problems.
Do not invent new problems.
The fixed code should still be readable and easy to understand.
If there are no problems provided do reply that you can't detect any problems and the user should describe more precisely what they want to be fixed.
Group problems if they are related and can be fixed by the same change.
Present a group as a single problem with a simple description that does not repeat the single problems but explains the whole group of problems in a few words.
Explain each group of problems without repeating the detailed error message.
Show how the error can be fixed by providing a code snippet that displays the code before and after it has been fixed after each group.
Shorten fully qualified class names to the simple class name and full file paths to the file names only.
When enumerating the groups, start with the word "Problem" followed by the number and a quick summary of the problem. Format this headline bold.
At last provide a completely fixed version of the code if the fixes required multiple code changes.`,[C3],["editor","chat-panel","inline"],Am.default`
Fix the provided errors and problems.
Do not invent new problems.
The fixed code should still be readable and easy to understand.
If there are no problems provided do reply that you can't detect any problems and the user should describe more precisely what they want to be fixed.
Do not attempt to fix problems that are not provided, like unbalanced brackets or parentheses that are not causing errors.
Briefly explain the problems without repeating the detailed error message.`,!0),RDt=new lE("explain","Explain how the code works","Explain This",Am.default`
Write an explanation for the selected code above as paragraphs of text.
Include excerpts of code snippets to underline your explanation.
Do not repeat the complete code.
The explanation should be easy to understand for a developer who is familiar with the programming language used but not familiar with the code.`,[],["editor","chat-panel","inline"],Am.default`
Write an explanation for the code the user is selecting.
Include excerpts of code snippets to underline your explanation.
Do not repeat the complete code.
Keep the explanation brief and easy to understand for a developer who is familiar with the programming language used but not familiar with the code.`,!1),kDt=new lE("doc","Document the current selection of code","Generate Docs",Am.default`
Write documentation for the selected code.
The reply should be a codeblock containing the original selection with the documentation added as comments.
Use the most appropriate documentation style for the programming language used (e.g. JSDoc for JavaScript, docstrings for Python etc.)`,[],["editor","chat-panel","inline"],Am.default`
Add documentation to the selected code.
Modify the selected code by adding documentation as comments.
You must only modify the selected code and nothing else.
Use the most appropriate documentation style for the programming language used (e.g. JSDoc for JavaScript, docstrings for Python etc.).
Place the comments before functions and methods, unless the language has a different convention (for example Python's docstring).`,!0),wfe=class{constructor(){this.id="feedback";this.description="Steps to provide feedback";this.shortDescription="Feedback";this.scopes=["chat-panel"]}static{s(this,"FeedbackPromptTemplate")}response(t){let r=Rfe(t.conversation),n=Am.default`
You can provide direct feedback by pressing the thumbs up/down buttons on a single message.
In case you want to share more details, please click [here](https://gh.io/copilot-chat-jb-feedback) to share your feedback.
`;return r?new Vl(n+`
In order to help us understand your feedback better, you can include the following identifier in your feedback: by doing so, you are granting us permission to access the telemetry data associated with your feedback.
\`\`\`yaml
${t.conversation.id}/${r}
\`\`\``):new Vl(n)}},BDt=new wfe,_fe=class{constructor(){this.id="help";this.description="Get help on how to use Copilot chat";this.shortDescription="Help";this.scopes=["chat-panel"]}static{s(this,"HelpPromptTemplate")}response(t){let r=Sfe(t.ctx).filter(i=>i!=this),n=Am.default`
You can ask me general programming questions, or use one of the following commands to get help with a specific task:
${r.map(i=>`- \`/${i.id}\` - ${i.description}`).join(`
`)}
To have a great conversation, ask me questions as if I was a real programmer:
- **Show me the code** you want to talk about by having the files open and selecting the most important lines.
- On top of files, **I take different parts of your IDE into consideration** when answering questions. This includes, but is not limited to, test results and failures, build and runtime logs, active Git repository as well as details of the open project.
- **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.
- **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.
`;return new Vl(n)}},DDt=new _fe;function _B(){return[wDt,_Dt,SDt,RDt,kDt,BDt,DDt,...Qqe()]}s(_B,"getPromptTemplates");function Sfe(e){let t=_B();return!x_(e)&&!sh(e)&&(t=t.filter(r=>!r.id.startsWith("debug."))),t}s(Sfe,"getUserFacingPromptTemplates");var kfe=class{constructor(t,r){this.conversation=t;this.capabilities=r}static{s(this,"ConversationHolder")}},Hi=class{constructor(t){this.ctx=t;this.conversations=new un(100)}static{s(this,"Conversations")}create({capabilities:t,source:r,userLanguage:n,conversationId:i}={}){let o=new Jj([],r??"panel",n,i),a=t?.skills??[];return t?.allSkills&&(a=this.ctx.get(gl).getDescriptors().map(l=>l.id)),this.conversations.set(o.id,new kfe(o,{skills:a})),o}destroy(t){this.conversations.delete(t)}async addTurn(t,r,n,i,o,a,l,c){let u=this.get(t);return r.request.references=n&&n.length>0?n:[],i&&(r.request.activeEditor=i),o&&(r.workspaceFolder=o),a&&a.length>0&&(r.workspaceFolders=a),l&&l.length>0&&(r.ignoredSkills=l.map(f=>({skillId:f}))),c&&(r.agent={agentSlug:c.agentSlug},r.confirmationResponse=c),await this.determineAndApplyAgent(u,r),await this.determineAndApplyTemplate(u,r),u.addTurn(r),r}async determineAndApplyAgent(t,r){if(t.source==="panel"&&ln(r.request.message).trim().startsWith("@")){let[n,i]=this.extractKeywordAndQuestionFromRequest(ln(r.request.message),"@");(await m1(this.ctx)).find(l=>l.slug===n)&&(r.request.message=i,r.request.type="user",r.agent={agentSlug:n})}}async determineAndApplyTemplate(t,r){if(ln(r.request.message).trim().startsWith("/")){let[n,i]=this.extractKeywordAndQuestionFromRequest(ln(r.request.message),"/"),o=_B().find(a=>a.id===n);if(o){r.request.message=i,r.request.type="user",await this.determineAndApplyAgent(t,r);let a=o.instructions?o.instructions(this.ctx,r.request.message,t.source):i;r.template={templateId:n,userQuestion:r.request.message},r.request.message=a,r.request.type="template"}}}extractKeywordAndQuestionFromRequest(t,r){let[n,...i]=t.trim().split(" "),o=i.join(" ");return[n.replace(r,""),o]}deleteTurn(t,r){this.get(t).deleteTurn(r)}get(t){return this.getHolder(t).conversation}getCapabilities(t){return this.getHolder(t).capabilities}getSupportedSkills(t){let r=this.ctx.get(gl).getDescriptors().filter(i=>i.type==="implicit").map(i=>i.id),n=this.getCapabilities(t).skills;return[...r,...n]}filterSupportedSkills(t,r){let n=this.getSupportedSkills(t);return r.filter(i=>n.includes(i))}getHolder(t){let r=this.conversations.get(t);if(!r)throw new Error(`Conversation with id ${t} does not exist`);return r}getAll(){let t=this.conversations.values();return Array.from(t).map(r=>r.conversation)}findByTurnId(t){for(let r of this.getAll()){let n=r.findTurn(t);if(n)return{conversation:r,turn:n}}}};d();function sWe(e){return typeof e>"u"||e===null}s(sWe,"isNothing");function PDt(e){return typeof e=="object"&&e!==null}s(PDt,"isObject");function NDt(e){return Array.isArray(e)?e:sWe(e)?[]:[e]}s(NDt,"toArray");function LDt(e,t){var r,n,i,o;if(t)for(o=Object.keys(t),r=0,n=o.length;r<n;r+=1)i=o[r],e[i]=t[i];return e}s(LDt,"extend");function FDt(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}s(FDt,"repeat");function MDt(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}s(MDt,"isNegativeZero");var QDt=sWe,ODt=PDt,UDt=NDt,qDt=FDt,WDt=MDt,GDt=LDt,Al={isNothing:QDt,isObject:ODt,toArray:UDt,repeat:qDt,isNegativeZero:WDt,extend:GDt};function aWe(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
`+e.mark.snippet),n+" "+r):n}s(aWe,"formatError");function RB(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=aWe(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}s(RB,"YAMLException$1");RB.prototype=Object.create(Error.prototype);RB.prototype.constructor=RB;RB.prototype.toString=s(function(t){return this.name+": "+aWe(this,t)},"toString");var Du=RB;function Bfe(e,t,r,n,i){var o="",a="",l=Math.floor(i/2)-1;return n-t>l&&(o=" ... ",t=n-l+o.length),r-n>l&&(a=" ...",r=n+l-a.length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:n-t+o.length}}s(Bfe,"getLine");function Dfe(e,t){return Al.repeat(" ",t-e.length)+e}s(Dfe,"padStart");function HDt(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],o,a=-1;o=r.exec(e.buffer);)i.push(o.index),n.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var l="",c,u,f=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+f+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)u=Bfe(e.buffer,n[a-c],i[a-c],e.position-(n[a]-n[a-c]),m),l=Al.repeat(" ",t.indent)+Dfe((e.line-c+1).toString(),f)+" | "+u.str+`
`+l;for(u=Bfe(e.buffer,n[a],i[a],e.position,m),l+=Al.repeat(" ",t.indent)+Dfe((e.line+1).toString(),f)+" | "+u.str+`
`,l+=Al.repeat("-",t.indent+f+3+u.pos)+`^
`,c=1;c<=t.linesAfter&&!(a+c>=i.length);c++)u=Bfe(e.buffer,n[a+c],i[a+c],e.position-(n[a]-n[a+c]),m),l+=Al.repeat(" ",t.indent)+Dfe((e.line+c+1).toString(),f)+" | "+u.str+`
`;return l.replace(/\n$/,"")}s(HDt,"makeSnippet");var jDt=HDt,VDt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$Dt=["scalar","sequence","mapping"];function zDt(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}s(zDt,"compileStyleAliases");function YDt(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(VDt.indexOf(r)===-1)throw new Du('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=zDt(t.styleAliases||null),$Dt.indexOf(this.kind)===-1)throw new Du('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}s(YDt,"Type$1");var r0=YDt;function jqe(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(o,a){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(i=a)}),r[i]=n}),r}s(jqe,"compileList");function KDt(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(s(n,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}s(KDt,"compileMap");function Nfe(e){return this.extend(e)}s(Nfe,"Schema$1");Nfe.prototype.extend=s(function(t){var r=[],n=[];if(t instanceof r0)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Du("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof r0))throw new Du("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Du("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Du("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof r0))throw new Du("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Nfe.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=jqe(i,"implicit"),i.compiledExplicit=jqe(i,"explicit"),i.compiledTypeMap=KDt(i.compiledImplicit,i.compiledExplicit),i},"extend");var JDt=Nfe,XDt=new r0("tag:yaml.org,2002:str",{kind:"scalar",construct:s(function(e){return e!==null?e:""},"construct")}),ZDt=new r0("tag:yaml.org,2002:seq",{kind:"sequence",construct:s(function(e){return e!==null?e:[]},"construct")}),ePt=new r0("tag:yaml.org,2002:map",{kind:"mapping",construct:s(function(e){return e!==null?e:{}},"construct")}),tPt=new JDt({explicit:[XDt,ZDt,ePt]});function rPt(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}s(rPt,"resolveYamlNull");function nPt(){return null}s(nPt,"constructYamlNull");function iPt(e){return e===null}s(iPt,"isNull");var oPt=new r0("tag:yaml.org,2002:null",{kind:"scalar",resolve:rPt,construct:nPt,predicate:iPt,represent:{canonical:s(function(){return"~"},"canonical"),lowercase:s(function(){return"null"},"lowercase"),uppercase:s(function(){return"NULL"},"uppercase"),camelcase:s(function(){return"Null"},"camelcase"),empty:s(function(){return""},"empty")},defaultStyle:"lowercase"});function sPt(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}s(sPt,"resolveYamlBoolean");function aPt(e){return e==="true"||e==="True"||e==="TRUE"}s(aPt,"constructYamlBoolean");function lPt(e){return Object.prototype.toString.call(e)==="[object Boolean]"}s(lPt,"isBoolean");var cPt=new r0("tag:yaml.org,2002:bool",{kind:"scalar",resolve:sPt,construct:aPt,predicate:lPt,represent:{lowercase:s(function(e){return e?"true":"false"},"lowercase"),uppercase:s(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:s(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function uPt(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}s(uPt,"isHexCode");function fPt(e){return 48<=e&&e<=55}s(fPt,"isOctCode");function dPt(e){return 48<=e&&e<=57}s(dPt,"isDecCode");function mPt(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!uPt(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!fPt(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!dPt(e.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}s(mPt,"resolveYamlInteger");function hPt(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}s(hPt,"constructYamlInteger");function pPt(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Al.isNegativeZero(e)}s(pPt,"isInteger");var gPt=new r0("tag:yaml.org,2002:int",{kind:"scalar",resolve:mPt,construct:hPt,predicate:pPt,represent:{binary:s(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:s(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:s(function(e){return e.toString(10)},"decimal"),hexadecimal:s(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),APt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function yPt(e){return!(e===null||!APt.test(e)||e[e.length-1]==="_")}s(yPt,"resolveYamlFloat");function CPt(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}s(CPt,"constructYamlFloat");var xPt=/^[-+]?[0-9]+e/;function vPt(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Al.isNegativeZero(e))return"-0.0";return r=e.toString(10),xPt.test(r)?r.replace("e",".e"):r}s(vPt,"representYamlFloat");function bPt(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Al.isNegativeZero(e))}s(bPt,"isFloat");var EPt=new r0("tag:yaml.org,2002:float",{kind:"scalar",resolve:yPt,construct:CPt,predicate:bPt,represent:vPt,defaultStyle:"lowercase"}),IPt=tPt.extend({implicit:[oPt,cPt,gPt,EPt]}),TPt=IPt,lWe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cWe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function wPt(e){return e===null?!1:lWe.exec(e)!==null||cWe.exec(e)!==null}s(wPt,"resolveYamlTimestamp");function _Pt(e){var t,r,n,i,o,a,l,c=0,u=null,f,m,h;if(t=lWe.exec(e),t===null&&(t=cWe.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],m=+(t[11]||0),u=(f*60+m)*6e4,t[9]==="-"&&(u=-u)),h=new Date(Date.UTC(r,n,i,o,a,l,c)),u&&h.setTime(h.getTime()-u),h}s(_Pt,"constructYamlTimestamp");function SPt(e){return e.toISOString()}s(SPt,"representYamlTimestamp");var RPt=new r0("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:wPt,construct:_Pt,instanceOf:Date,represent:SPt});function kPt(e){return e==="<<"||e===null}s(kPt,"resolveYamlMerge");var BPt=new r0("tag:yaml.org,2002:merge",{kind:"scalar",resolve:kPt}),Ofe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function DPt(e){if(e===null)return!1;var t,r,n=0,i=e.length,o=Ofe;for(r=0;r<i;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}s(DPt,"resolveYamlBinary");function PPt(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=Ofe,a=0,l=[];for(t=0;t<i;t++)t%4===0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)),a=a<<6|o.indexOf(n.charAt(t));return r=i%4*6,r===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):r===18?(l.push(a>>10&255),l.push(a>>2&255)):r===12&&l.push(a>>4&255),new Uint8Array(l)}s(PPt,"constructYamlBinary");function NPt(e){var t="",r=0,n,i,o=e.length,a=Ofe;for(n=0;n<o;n++)n%3===0&&n&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[n];return i=o%3,i===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):i===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):i===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}s(NPt,"representYamlBinary");function LPt(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}s(LPt,"isBinary");var FPt=new r0("tag:yaml.org,2002:binary",{kind:"scalar",resolve:DPt,construct:PPt,predicate:LPt,represent:NPt}),MPt=Object.prototype.hasOwnProperty,QPt=Object.prototype.toString;function OPt(e){if(e===null)return!0;var t=[],r,n,i,o,a,l=e;for(r=0,n=l.length;r<n;r+=1){if(i=l[r],a=!1,QPt.call(i)!=="[object Object]")return!1;for(o in i)if(MPt.call(i,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}s(OPt,"resolveYamlOmap");function UPt(e){return e!==null?e:[]}s(UPt,"constructYamlOmap");var qPt=new r0("tag:yaml.org,2002:omap",{kind:"sequence",resolve:OPt,construct:UPt}),WPt=Object.prototype.toString;function GPt(e){if(e===null)return!0;var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],WPt.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;o[t]=[i[0],n[i[0]]]}return!0}s(GPt,"resolveYamlPairs");function HPt(e){if(e===null)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}s(HPt,"constructYamlPairs");var jPt=new r0("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:GPt,construct:HPt}),VPt=Object.prototype.hasOwnProperty;function $Pt(e){if(e===null)return!0;var t,r=e;for(t in r)if(VPt.call(r,t)&&r[t]!==null)return!1;return!0}s($Pt,"resolveYamlSet");function zPt(e){return e!==null?e:{}}s(zPt,"constructYamlSet");var YPt=new r0("tag:yaml.org,2002:set",{kind:"mapping",resolve:$Pt,construct:zPt}),uWe=TPt.extend({implicit:[RPt,BPt],explicit:[FPt,qPt,jPt,YPt]}),v3=Object.prototype.hasOwnProperty,dV=1,fWe=2,dWe=3,mV=4,Pfe=1,KPt=2,Vqe=3,JPt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XPt=/[\x85\u2028\u2029]/,ZPt=/[,\[\]\{\}]/,mWe=/^(?:!|!!|![a-z\-]+!)$/i,hWe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $qe(e){return Object.prototype.toString.call(e)}s($qe,"_class");function h1(e){return e===10||e===13}s(h1,"is_EOL");function uE(e){return e===9||e===32}s(uE,"is_WHITE_SPACE");function Pu(e){return e===9||e===32||e===10||e===13}s(Pu,"is_WS_OR_EOL");function xT(e){return e===44||e===91||e===93||e===123||e===125}s(xT,"is_FLOW_INDICATOR");function eNt(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}s(eNt,"fromHexCode");function tNt(e){return e===120?2:e===117?4:e===85?8:0}s(tNt,"escapedHexLen");function rNt(e){return 48<=e&&e<=57?e-48:-1}s(rNt,"fromDecimalCode");function zqe(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}s(zqe,"simpleEscapeSequence");function nNt(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}s(nNt,"charFromCodepoint");var pWe=new Array(256),gWe=new Array(256);for(cE=0;cE<256;cE++)pWe[cE]=zqe(cE)?1:0,gWe[cE]=zqe(cE);var cE;function iNt(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||uWe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}s(iNt,"State$1");function AWe(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=jDt(r),new Du(t,r)}s(AWe,"generateError");function rn(e,t){throw AWe(e,t)}s(rn,"throwError");function hV(e,t){e.onWarning&&e.onWarning.call(null,AWe(e,t))}s(hV,"throwWarning");var Yqe={YAML:s(function(t,r,n){var i,o,a;t.version!==null&&rn(t,"duplication of %YAML directive"),n.length!==1&&rn(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&rn(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&rn(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&hV(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(t,r,n){var i,o;n.length!==2&&rn(t,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],mWe.test(i)||rn(t,"ill-formed tag handle (first argument) of the TAG directive"),v3.call(t.tagMap,i)&&rn(t,'there is a previously declared suffix for "'+i+'" tag handle'),hWe.test(o)||rn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{rn(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function x3(e,t,r,n){var i,o,a,l;if(t<r){if(l=e.input.slice(t,r),n)for(i=0,o=l.length;i<o;i+=1)a=l.charCodeAt(i),a===9||32<=a&&a<=1114111||rn(e,"expected valid JSON character");else JPt.test(l)&&rn(e,"the stream contains non-printable characters");e.result+=l}}s(x3,"captureSegment");function Kqe(e,t,r,n){var i,o,a,l;for(Al.isObject(r)||rn(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,l=i.length;a<l;a+=1)o=i[a],v3.call(t,o)||(t[o]=r[o],n[o]=!0)}s(Kqe,"mergeMappings");function vT(e,t,r,n,i,o,a,l,c){var u,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,f=i.length;u<f;u+=1)Array.isArray(i[u])&&rn(e,"nested arrays are not supported inside keys"),typeof i=="object"&&$qe(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&$qe(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(u=0,f=o.length;u<f;u+=1)Kqe(e,t,o[u],r);else Kqe(e,t,o,r);else!e.json&&!v3.call(r,i)&&v3.call(t,i)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,rn(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}s(vT,"storeMappingPair");function Ufe(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):rn(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}s(Ufe,"readLineBreak");function rl(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;uE(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(h1(i))for(Ufe(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&hV(e,"deficient indentation"),n}s(rl,"skipSeparationSpace");function AV(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Pu(r)))}s(AV,"testDocumentSeparator");function qfe(e,t){t===1?e.result+=" ":t>1&&(e.result+=Al.repeat(`
`,t-1))}s(qfe,"writeFoldedLines");function oNt(e,t,r){var n,i,o,a,l,c,u,f,m=e.kind,h=e.result,p;if(p=e.input.charCodeAt(e.position),Pu(p)||xT(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Pu(i)||r&&xT(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,l=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Pu(i)||r&&xT(i))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),Pu(n))break}else{if(e.position===e.lineStart&&AV(e)||r&&xT(p))break;if(h1(p))if(c=e.line,u=e.lineStart,f=e.lineIndent,rl(e,!1,-1),e.lineIndent>=t){l=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=u,e.lineIndent=f;break}}l&&(x3(e,o,a,!1),qfe(e,e.line-c),o=a=e.position,l=!1),uE(p)||(a=e.position+1),p=e.input.charCodeAt(++e.position)}return x3(e,o,a,!1),e.result?!0:(e.kind=m,e.result=h,!1)}s(oNt,"readPlainScalar");function sNt(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(x3(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else h1(r)?(x3(e,n,i,!0),qfe(e,rl(e,!1,t)),n=i=e.position):e.position===e.lineStart&&AV(e)?rn(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);rn(e,"unexpected end of the stream within a single quoted scalar")}s(sNt,"readSingleQuotedScalar");function aNt(e,t){var r,n,i,o,a,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return x3(e,r,e.position,!0),e.position++,!0;if(l===92){if(x3(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),h1(l))rl(e,!1,t);else if(l<256&&pWe[l])e.result+=gWe[l],e.position++;else if((a=tNt(l))>0){for(i=a,o=0;i>0;i--)l=e.input.charCodeAt(++e.position),(a=eNt(l))>=0?o=(o<<4)+a:rn(e,"expected hexadecimal character");e.result+=nNt(o),e.position++}else rn(e,"unknown escape sequence");r=n=e.position}else h1(l)?(x3(e,r,n,!0),qfe(e,rl(e,!1,t)),r=n=e.position):e.position===e.lineStart&&AV(e)?rn(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}rn(e,"unexpected end of the stream within a double quoted scalar")}s(aNt,"readDoubleQuotedScalar");function lNt(e,t){var r=!0,n,i,o,a=e.tag,l,c=e.anchor,u,f,m,h,p,g=Object.create(null),y,x,b,E;if(E=e.input.charCodeAt(e.position),E===91)f=93,p=!1,l=[];else if(E===123)f=125,p=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),E=e.input.charCodeAt(++e.position);E!==0;){if(rl(e,!0,t),E=e.input.charCodeAt(e.position),E===f)return e.position++,e.tag=a,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=l,!0;r?E===44&&rn(e,"expected the node content, but found ','"):rn(e,"missed comma between flow collection entries"),x=y=b=null,m=h=!1,E===63&&(u=e.input.charCodeAt(e.position+1),Pu(u)&&(m=h=!0,e.position++,rl(e,!0,t))),n=e.line,i=e.lineStart,o=e.position,bT(e,t,dV,!1,!0),x=e.tag,y=e.result,rl(e,!0,t),E=e.input.charCodeAt(e.position),(h||e.line===n)&&E===58&&(m=!0,E=e.input.charCodeAt(++e.position),rl(e,!0,t),bT(e,t,dV,!1,!0),b=e.result),p?vT(e,l,g,x,y,b,n,i,o):m?l.push(vT(e,null,g,x,y,b,n,i,o)):l.push(y),rl(e,!0,t),E=e.input.charCodeAt(e.position),E===44?(r=!0,E=e.input.charCodeAt(++e.position)):r=!1}rn(e,"unexpected end of the stream within a flow collection")}s(lNt,"readFlowCollection");function cNt(e,t){var r,n,i=Pfe,o=!1,a=!1,l=t,c=0,u=!1,f,m;if(m=e.input.charCodeAt(e.position),m===124)n=!1;else if(m===62)n=!0;else return!1;for(e.kind="scalar",e.result="";m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)Pfe===i?i=m===43?Vqe:KPt:rn(e,"repeat of a chomping mode identifier");else if((f=rNt(m))>=0)f===0?rn(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?rn(e,"repeat of an indentation width identifier"):(l=t+f-1,a=!0);else break;if(uE(m)){do m=e.input.charCodeAt(++e.position);while(uE(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!h1(m)&&m!==0)}for(;m!==0;){for(Ufe(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&m===32;)e.lineIndent++,m=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),h1(m)){c++;continue}if(e.lineIndent<l){i===Vqe?e.result+=Al.repeat(`
`,o?1+c:c):i===Pfe&&o&&(e.result+=`
`);break}for(n?uE(m)?(u=!0,e.result+=Al.repeat(`
`,o?1+c:c)):u?(u=!1,e.result+=Al.repeat(`
`,c+1)):c===0?o&&(e.result+=" "):e.result+=Al.repeat(`
`,c):e.result+=Al.repeat(`
`,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!h1(m)&&m!==0;)m=e.input.charCodeAt(++e.position);x3(e,r,e.position,!1)}return!0}s(cNt,"readBlockScalar");function Jqe(e,t){var r,n=e.tag,i=e.anchor,o=[],a,l=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rn(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!Pu(a))));){if(l=!0,e.position++,rl(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,bT(e,t,dWe,!1,!0),o.push(e.result),rl(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)rn(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}s(Jqe,"readBlockSequence");function uNt(e,t,r){var n,i,o,a,l,c,u=e.tag,f=e.anchor,m={},h=Object.create(null),p=null,g=null,y=null,x=!1,b=!1,E;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),E=e.input.charCodeAt(e.position);E!==0;){if(!x&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rn(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,(E===63||E===58)&&Pu(n))E===63?(x&&(vT(e,m,h,p,g,null,a,l,c),p=g=y=null),b=!0,x=!0,i=!0):x?(x=!1,i=!0):rn(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,E=n;else{if(a=e.line,l=e.lineStart,c=e.position,!bT(e,r,fWe,!1,!0))break;if(e.line===o){for(E=e.input.charCodeAt(e.position);uE(E);)E=e.input.charCodeAt(++e.position);if(E===58)E=e.input.charCodeAt(++e.position),Pu(E)||rn(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(vT(e,m,h,p,g,null,a,l,c),p=g=y=null),b=!0,x=!1,i=!1,p=e.tag,g=e.result;else if(b)rn(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=f,!0}else if(b)rn(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=f,!0}if((e.line===o||e.lineIndent>t)&&(x&&(a=e.line,l=e.lineStart,c=e.position),bT(e,t,mV,!0,i)&&(x?g=e.result:y=e.result),x||(vT(e,m,h,p,g,y,a,l,c),p=g=y=null),rl(e,!0,-1),E=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&E!==0)rn(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return x&&vT(e,m,h,p,g,null,a,l,c),b&&(e.tag=u,e.anchor=f,e.kind="mapping",e.result=m),b}s(uNt,"readBlockMapping");function fNt(e){var t,r=!1,n=!1,i,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&rn(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):rn(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Pu(a);)a===33&&(n?rn(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),mWe.test(i)||rn(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),ZPt.test(o)&&rn(e,"tag suffix cannot contain flow indicator characters")}o&&!hWe.test(o)&&rn(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{rn(e,"tag name is malformed: "+o)}return r?e.tag=o:v3.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:rn(e,'undeclared tag handle "'+i+'"'),!0}s(fNt,"readTagProperty");function dNt(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&rn(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Pu(r)&&!xT(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&rn(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}s(dNt,"readAnchorProperty");function mNt(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Pu(n)&&!xT(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&rn(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),v3.call(e.anchorMap,r)||rn(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],rl(e,!0,-1),!0}s(mNt,"readAlias");function bT(e,t,r,n,i){var o,a,l,c=1,u=!1,f=!1,m,h,p,g,y,x;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=l=mV===r||dWe===r,n&&rl(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;fNt(e)||dNt(e);)rl(e,!0,-1)?(u=!0,l=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):l=!1;if(l&&(l=u||i),(c===1||mV===r)&&(dV===r||fWe===r?y=t:y=t+1,x=e.position-e.lineStart,c===1?l&&(Jqe(e,x)||uNt(e,x,y))||lNt(e,y)?f=!0:(a&&cNt(e,y)||sNt(e,y)||aNt(e,y)?f=!0:mNt(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&rn(e,"alias node should not have any properties")):oNt(e,y,dV===r)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=l&&Jqe(e,x))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&rn(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),m=0,h=e.implicitTypes.length;m<h;m+=1)if(g=e.implicitTypes[m],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(v3.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],m=0,h=p.length;m<h;m+=1)if(e.tag.slice(0,p[m].tag.length)===p[m].tag){g=p[m];break}g||rn(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&rn(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):rn(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}s(bT,"composeNode");function hNt(e){var t=e.position,r,n,i,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(rl(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Pu(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&rn(e,"directive name must not be less than one character in length");a!==0;){for(;uE(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!h1(a));break}if(h1(a))break;for(r=e.position;a!==0&&!Pu(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}a!==0&&Ufe(e),v3.call(Yqe,n)?Yqe[n](e,n,i):hV(e,'unknown document directive "'+n+'"')}if(rl(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,rl(e,!0,-1)):o&&rn(e,"directives end mark is expected"),bT(e,e.lineIndent-1,mV,!1,!0),rl(e,!0,-1),e.checkLineBreaks&&XPt.test(e.input.slice(t,e.position))&&hV(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&AV(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,rl(e,!0,-1));return}if(e.position<e.length-1)rn(e,"end of the stream or a document separator is expected");else return}s(hNt,"readDocument");function yWe(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new iNt(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,rn(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)hNt(r);return r.documents}s(yWe,"loadDocuments");function pNt(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=yWe(e,r);if(typeof t!="function")return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])}s(pNt,"loadAll$1");function gNt(e,t){var r=yWe(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Du("expected a single document in the stream, but found more")}}s(gNt,"load$1");var ANt=pNt,yNt=gNt,CWe={loadAll:ANt,load:yNt},xWe=Object.prototype.toString,vWe=Object.prototype.hasOwnProperty,Wfe=65279,CNt=9,kB=10,xNt=13,vNt=32,bNt=33,ENt=34,Lfe=35,INt=37,TNt=38,wNt=39,_Nt=42,bWe=44,SNt=45,pV=58,RNt=61,kNt=62,BNt=63,DNt=64,EWe=91,IWe=93,PNt=96,TWe=123,NNt=124,wWe=125,n0={};n0[0]="\\0";n0[7]="\\a";n0[8]="\\b";n0[9]="\\t";n0[10]="\\n";n0[11]="\\v";n0[12]="\\f";n0[13]="\\r";n0[27]="\\e";n0[34]='\\"';n0[92]="\\\\";n0[133]="\\N";n0[160]="\\_";n0[8232]="\\L";n0[8233]="\\P";var LNt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],FNt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function MNt(e,t){var r,n,i,o,a,l,c;if(t===null)return{};for(r={},n=Object.keys(t),i=0,o=n.length;i<o;i+=1)a=n[i],l=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&vWe.call(c.styleAliases,l)&&(l=c.styleAliases[l]),r[a]=l;return r}s(MNt,"compileStyleMap");function QNt(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Du("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Al.repeat("0",n-t.length)+t}s(QNt,"encodeHex");var ONt=1,BB=2;function UNt(e){this.schema=e.schema||uWe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Al.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=MNt(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?BB:ONt,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}s(UNt,"State");function Xqe(e,t){for(var r=Al.repeat(" ",t),n=0,i=-1,o="",a,l=e.length;n<l;)i=e.indexOf(`
`,n),i===-1?(a=e.slice(n),n=l):(a=e.slice(n,i+1),n=i+1),a.length&&a!==`
`&&(o+=r),o+=a;return o}s(Xqe,"indentString");function Ffe(e,t){return`
`+Al.repeat(" ",e.indent*t)}s(Ffe,"generateNextLine");function qNt(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}s(qNt,"testImplicitResolving");function gV(e){return e===vNt||e===CNt}s(gV,"isWhitespace");function DB(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Wfe||65536<=e&&e<=1114111}s(DB,"isPrintable");function Zqe(e){return DB(e)&&e!==Wfe&&e!==xNt&&e!==kB}s(Zqe,"isNsCharOrWhitespace");function eWe(e,t,r){var n=Zqe(e),i=n&&!gV(e);return(r?n:n&&e!==bWe&&e!==EWe&&e!==IWe&&e!==TWe&&e!==wWe)&&e!==Lfe&&!(t===pV&&!i)||Zqe(t)&&!gV(t)&&e===Lfe||t===pV&&i}s(eWe,"isPlainSafe");function WNt(e){return DB(e)&&e!==Wfe&&!gV(e)&&e!==SNt&&e!==BNt&&e!==pV&&e!==bWe&&e!==EWe&&e!==IWe&&e!==TWe&&e!==wWe&&e!==Lfe&&e!==TNt&&e!==_Nt&&e!==bNt&&e!==NNt&&e!==RNt&&e!==kNt&&e!==wNt&&e!==ENt&&e!==INt&&e!==DNt&&e!==PNt}s(WNt,"isPlainSafeFirst");function GNt(e){return!gV(e)&&e!==pV}s(GNt,"isPlainSafeLast");function SB(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}s(SB,"codePointAt");function _We(e){var t=/^\n* /;return t.test(e)}s(_We,"needIndentIndicator");var SWe=1,Mfe=2,RWe=3,kWe=4,CT=5;function HNt(e,t,r,n,i,o,a,l){var c,u=0,f=null,m=!1,h=!1,p=n!==-1,g=-1,y=WNt(SB(e,0))&&GNt(SB(e,e.length-1));if(t||a)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=SB(e,c),!DB(u))return CT;y=y&&eWe(u,f,l),f=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=SB(e,c),u===kB)m=!0,p&&(h=h||c-g-1>n&&e[g+1]!==" ",g=c);else if(!DB(u))return CT;y=y&&eWe(u,f,l),f=u}h=h||p&&c-g-1>n&&e[g+1]!==" "}return!m&&!h?y&&!a&&!i(e)?SWe:o===BB?CT:Mfe:r>9&&_We(e)?CT:a?o===BB?CT:Mfe:h?kWe:RWe}s(HNt,"chooseScalarStyle");function jNt(e,t,r,n,i){e.dump=function(){if(t.length===0)return e.quotingType===BB?'""':"''";if(!e.noCompatMode&&(LNt.indexOf(t)!==-1||FNt.test(t)))return e.quotingType===BB?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=n||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return qNt(e,u)}switch(s(c,"testAmbiguity"),HNt(t,l,e.indent,a,c,e.quotingType,e.forceQuotes&&!n,i)){case SWe:return t;case Mfe:return"'"+t.replace(/'/g,"''")+"'";case RWe:return"|"+tWe(t,e.indent)+rWe(Xqe(t,o));case kWe:return">"+tWe(t,e.indent)+rWe(Xqe(VNt(t,a),o));case CT:return'"'+$Nt(t)+'"';default:throw new Du("impossible error: invalid scalar style")}}()}s(jNt,"writeScalar");function tWe(e,t){var r=_We(e)?String(t):"",n=e[e.length-1]===`
`,i=n&&(e[e.length-2]===`
`||e===`
`),o=i?"+":n?"":"-";return r+o+`
`}s(tWe,"blockHeader");function rWe(e){return e[e.length-1]===`
`?e.slice(0,-1):e}s(rWe,"dropEndingNewline");function VNt(e,t){for(var r=/(\n+)([^\n]*)/g,n=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,r.lastIndex=u,nWe(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",o,a;a=r.exec(e);){var l=a[1],c=a[2];o=c[0]===" ",n+=l+(!i&&!o&&c!==""?`
`:"")+nWe(c,t),i=o}return n}s(VNt,"foldString");function nWe(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,o,a=0,l=0,c="";n=r.exec(e);)l=n.index,l-i>t&&(o=a>i?a:l,c+=`
`+e.slice(i,o),i=o+1),a=l;return c+=`
`,e.length-i>t&&a>i?c+=e.slice(i,a)+`
`+e.slice(a+1):c+=e.slice(i),c.slice(1)}s(nWe,"foldLine");function $Nt(e){for(var t="",r=0,n,i=0;i<e.length;r>=65536?i+=2:i++)r=SB(e,i),n=n0[r],!n&&DB(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||QNt(r);return t}s($Nt,"escapeString");function zNt(e,t,r){var n="",i=e.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(v2(e,t,l,!1,!1)||typeof l>"u"&&v2(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}s(zNt,"writeFlowSequence");function iWe(e,t,r,n){var i="",o=e.tag,a,l,c;for(a=0,l=r.length;a<l;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(v2(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&v2(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=Ffe(e,t)),e.dump&&kB===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}s(iWe,"writeBlockSequence");function YNt(e,t,r){var n="",i=e.tag,o=Object.keys(r),a,l,c,u,f;for(a=0,l=o.length;a<l;a+=1)f="",n!==""&&(f+=", "),e.condenseFlow&&(f+='"'),c=o[a],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),v2(e,t,c,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),v2(e,t,u,!1,!1)&&(f+=e.dump,n+=f));e.tag=i,e.dump="{"+n+"}"}s(YNt,"writeFlowMapping");function KNt(e,t,r,n){var i="",o=e.tag,a=Object.keys(r),l,c,u,f,m,h;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Du("sortKeys must be a boolean or a function");for(l=0,c=a.length;l<c;l+=1)h="",(!n||i!=="")&&(h+=Ffe(e,t)),u=a[l],f=r[u],e.replacer&&(f=e.replacer.call(r,u,f)),v2(e,t+1,u,!0,!0,!0)&&(m=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,m&&(e.dump&&kB===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,m&&(h+=Ffe(e,t)),v2(e,t+1,f,!0,m)&&(e.dump&&kB===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,i+=h));e.tag=o,e.dump=i||"{}"}s(KNt,"writeBlockMapping");function oWe(e,t,r){var n,i,o,a,l,c;for(i=r?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o<a;o+=1)if(l=i[o],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(c=e.styleMap[l.tag]||l.defaultStyle,xWe.call(l.represent)==="[object Function]")n=l.represent(t,c);else if(vWe.call(l.represent,c))n=l.represent[c](t,c);else throw new Du("!<"+l.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}s(oWe,"detectType");function v2(e,t,r,n,i,o,a){e.tag=null,e.dump=r,oWe(e,r,!1)||oWe(e,r,!0);var l=xWe.call(e.dump),c=n,u;n&&(n=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",m,h;if(f&&(m=e.duplicates.indexOf(r),h=m!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(i=!1),h&&e.usedDuplicates[m])e.dump="*ref_"+m;else{if(f&&h&&!e.usedDuplicates[m]&&(e.usedDuplicates[m]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(KNt(e,t,e.dump,i),h&&(e.dump="&ref_"+m+e.dump)):(YNt(e,t,e.dump),h&&(e.dump="&ref_"+m+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?iWe(e,t-1,e.dump,i):iWe(e,t,e.dump,i),h&&(e.dump="&ref_"+m+e.dump)):(zNt(e,t,e.dump),h&&(e.dump="&ref_"+m+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&jNt(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Du("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}s(v2,"writeNode");function JNt(e,t){var r=[],n=[],i,o;for(Qfe(e,r,n),i=0,o=n.length;i<o;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(o)}s(JNt,"getDuplicateReferences");function Qfe(e,t,r){var n,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)Qfe(e[i],t,r);else for(n=Object.keys(e),i=0,o=n.length;i<o;i+=1)Qfe(e[n[i]],t,r)}s(Qfe,"inspectNode");function XNt(e,t){t=t||{};var r=new UNt(t);r.noRefs||JNt(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),v2(r,0,n,!0,!0)?r.dump+`
`:""}s(XNt,"dump$1");var ZNt=XNt,eLt={dump:ZNt};function Gfe(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}s(Gfe,"renamed");var r9n=CWe.load,n9n=CWe.loadAll,Hfe=eLt.dump;var i9n=Gfe("safeLoad","load"),o9n=Gfe("safeLoadAll","loadAll"),s9n=Gfe("safeDump","dump");var fE=Ze($f());var jfe=class{constructor(){this.resolvedSkills={};this.resolutions=[]}static{s(this,"SkillDump")}},$l=class{constructor(){this.dump=new un(25);this.promptsDump=new un(1)}static{s(this,"ConversationDumper")}addResolvedSkill(t,r,n){let i=this.getDump(t);i.resolvedSkills[r]=n}getResolvedSkill(t,r){return this.getDump(t).resolvedSkills[r]}addResolution(t,r){this.getDump(t).resolutions.push(r)}getDump(t){let r=this.dump.get(t);return r||(r=new jfe,this.dump.set(t,r)),r}addPrompt(t,r,n){let i=this.promptsDump.get(t);i===void 0&&(i=new Map,this.promptsDump.set(t,i)),i.set(n,r)}getLastTurnPrompts(){if(this.promptsDump===void 0)return;let t=this.promptsDump.values().next();if(!t.done)return t.value}};function BWe(e){let t=e.copy();return t.turns=t.turns.filter(r=>r.status!=="in-progress"&&(r.response===void 0||r.response?.type==="model")),t}s(BWe,"filterConversationTurns");function Rfe(e){return BWe(e).getLastTurn()?.id}s(Rfe,"getLastTurnId");async function Oqe(e){let t=BWe(e.conversation),r=Rfe(e.conversation);if(!r)return"Nothing to dump because no request has been sent to the model yet.";let i=e.ctx.get($l).getDump(r),o=nLt(i,t.turns);kn.debug(e.ctx,`conversation.dump
`,`
`+o);let a=await iLt(i,e.ctx);return fE.default`
${rLt(e.conversation,r)}
${tLt(e.ctx)}
The following code can be copied into a chat simulation \`yml\` file. This response has not polluted the conversation history and did not cause any model roundtrip.
\`\`\`yaml
${o}
\`\`\`${a?`
${a}`:""}
`}s(Oqe,"getConversationDump");function tLt(e){let t=e.get(gn);return fE.default`
- IDE: \`${t.getEditorInfo().name} (${t.getEditorInfo().version})\`
- Plugin: \`${t.getEditorPluginInfo().version}\`
`}s(tLt,"getEditorInfoDumpMessage");function rLt(e,t){return fE.default`
Debug information for the last turn of the conversation.
- ConversationId: \`${e.id}\`
- MessageId: \`${t}\`
`}s(rLt,"getInfoDumpMessage");async function Uqe(e,t,r){let n=e.ctx.get(gl),i="# Available skills",o=n.getDescriptors().filter(a=>e.ctx.get(Hi).getSupportedSkills(e.conversation.id).includes(a.id));if(r&&(o=o.filter(a=>a.id===r)),o.length===0)return`No skill with id ${r} available`;for(let a of o)i+=`
- ${a.id}`;e.turn.request.message&&ln(e.turn.request.message).trim().length>0&&(i+=`
**User message**: ${ln(e.turn.request.message)}`);for(let a of o){i+=`
## ${a.id}`,i+=fE.default`
\n\n
**Description**
${a.description()}`;let l=n.getSkill(a.id),c=await l?.resolver(e).resolveSkill(e);if(c){i+=fE.default`
\n\n
**Resolution**
\`\`\`yaml
${Hfe(c)}
\`\`\``;let u=await l?.processor(e).processSkill(c,e);if(u){let f=typeof u=="string"?u:u.elide(1e3).getText();i+=fE.default`
\n\n
**Processed value**
${f}`}else i+=`
**Unprocessable**`}else i+=`
**Unresolvable**`}return i}s(Uqe,"getSkillsDump");function nLt(e,t){let r={state:{skills:e.resolvedSkills},turns:t.map((n,i)=>{let o={request:ln(n.request.message)};return n.response&&(o.response=ln(n.response.message)),o})};return Hfe(r)}s(nLt,"toSimulationFormat");async function iLt(e,t){let r=e.resolutions.map(o=>o.files).flat(),n=r.filter((o,a)=>o&&r.indexOf(o)===a),i;for(let o of n)if(o&&o.status==="included"){i||(i=`The following files have been used:
`);let a=await t.get(On).getOrReadTextDocument(o),l;a.status==="valid"&&(l=a.document);let c=l?.getText();kn.debug(t,`conversation.dump.file
`,c),i+=`
**${o.uri}**
\`\`\`${l?.detectedLanguageId}
${c}
\`\`\``}return i}s(iLt,"fileDump");d();function Vfe(e,t){let r=Do(t.tokenizer),n=0;for(let i of e)n+=t.baseTokensPerMessage,i.role&&(n+=r.tokenize(i.role).length),i.name&&(n+=r.tokenize(i.name).length+t.baseTokensPerName),i.content&&(n+=r.tokenize(ln(i.content)).length);return n+=t.baseTokensPerCompletion,n}s(Vfe,"countMessagesTokens");d();function DWe(e,t,r,n,i){let o=["You are an AI programming assistant.",'When asked for your name, you must respond with "GitHub Copilot".',"Follow the user's requirements carefully & to the letter.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.","You can answer general programming questions and perform the following tasks:","* Ask a question about the files in your current workspace","* Explain how the code in your active editor works","* Make changes to existing code","* Review the selected code in your active editor","* Generate unit tests for the selected code","* Propose a fix for the problems in the selected code","* Scaffold code for a new file or project in a workspace","* Create a new Jupyter Notebook","* Ask questions about VS Code","* Generate query parameters for workspace search","* Ask how to do something in the terminal","* Explain what just happened in the terminal"].join(`
`),a=["The active document is the source code the user is looking at right now.","You have read access to the code in the active document, files the user has recently worked with and open tabs. You are able to retrieve, read and use this code to answer questions.","You cannot retrieve code that is outside of the current project.","You can only give one reply for each conversation turn."].join(`
`),l=t?`The user works in an IDE called ${t} which can be used to edit code, run and debug the user's application as well as executing tests.`:"",c=n?`The user is using ${n} as their operating system.`:"",u=i?`You use the ${i} large language model.`:"",f=r?`The user is logged in as ${r} on GitHub.`:"";return[o,c,u,f,l,a].filter(m=>m&&m!="").join(`
`)}s(DWe,"chatBasePrompt");d();d();d();d();var ET=class{static{s(this,"CustomInstruction")}static async getInstructions(t,r,n={}){try{let i=t.get(Gg),o=i.getGlobalInstructions(n),a=await i.readFromWorkspaces(t,r,n),l=[...o,...a];return this.processInstructions(l,n)}catch{return}}static processInstructions(t,r={}){if(!t||t.length===0)return;let n=[];for(let o of t){let a=this.createInstructionElement(o,r);a&&n.push(a)}return n.length===0?void 0:`${r.customIntroduction||"When generating code, please follow these user provided coding instructions. You can ignore an instruction if it contradicts a system message."}
<instructions>${n.join(`
`)}</instructions>`}static createInstructionElement(t,r={}){let n=[];for(let i of t.content)i.languageId?r.languageId&&i.languageId===r.languageId&&n.push(`For ${i.languageId} code: ${i.instruction}`):n.push(i.instruction);if(n.length!==0)return n.join(`
`)}};d();d();function PWe(e){let t=e.split(`
`),r=[],n=!1,i=[];for(let o of t)o.startsWith("```")?(n?(r.push([y0(i.join(`
`)),1]),i=[],r.push([new zt([o]),1])):r.push([new zt([o]),1]),n=!n):n?i.push(o):r.push([new zt([o]),.8]);return n&&(r.push([y0(i.join(`
`)),1]),r.push([new zt(["```"]),1])),new zt(r)}s(PWe,"fromMessage");function IT(e){let t=$fe(e),r=[];for(let n=0;n<t.length;n++){let i=t[n],o=NWe(i.request,n+1),a=i.response&&i.response?.type!=="meta"?NWe(i.response):"",l=o;a!==""&&(l+=`
`+a+(t.length>1&&n!==t.length-1?`
`:"")),r.push(PWe(l))}return r.length>0?new zt([[new zt(["Consider the following conversation history:"]),1],[y3(r,"inverseLinear"),1]]):null}s(IT,"fromHistory");var oLt=5;function $fe(e,t){return e.filter(n=>(n.status==="success"||n.status==="in-progress")&&ln(n.request.message)!=""&&n.agent?.agentSlug===t).reverse().slice(0,oLt).reverse()}s($fe,"filterTurns");function NWe(e,t=0){let r;switch(e.type){case"user":case"template":r="User";break;case"model":r="GitHub Copilot";break;default:r=e.type}let n=ln(e.message).startsWith("```")?`
`:" ";return`${t>0?`${t}) `:""}${r}:${n}${ln(e.message)}`}s(NWe,"formatTurnMessage");d();d();d();var sLt=4,zfe={skillIds:[]},yV=class{constructor(t,r){this.ctx=t;this.chatFetcher=r}static{s(this,"MetaPromptFetcher")}async fetchPromptContext(t,r,n,i,o){let a=t.conversation.getLastTurn().request.message;if(r.length>0){let l=await yo.getModelConfiguration(t.ctx,"meta",void 0,{tool_calls:!0}),c={promptType:"meta",supportedSkillDescriptors:r,modelConfiguration:l},u=await this.ctx.get(vc).toPrompt(t,c),f=i.extendedBy({messageSource:"chat.metaprompt"},{promptTokenLen:u.tokens}),m={modelConfiguration:l,messages:u.messages,uiKind:o,llmInteraction:t.toLlmInteraction()};if(u.toolConfig===void 0)throw new Error("No tool call configuration found in meta prompt.");m.tool_choice=u.toolConfig.tool_choice,m.tools=u.toolConfig.tools;let h=await this.chatFetcher.fetchResponse(m,n,f);return h.type!=="success"&&(Kr.error(this.ctx,"Failed to fetch prompt context, trying again..."),h=await this.chatFetcher.fetchResponse(m,n,f)),await t.ctx.get(tl).inspectFetchResult(h),this.handleResult(h,f,ln(a),o,u.toolConfig)}else return zfe}handleResult(t,r,n,i,o){if(t.type!=="success")return this.telemetryError(r,t),zfe;let l;if(t.toolCalls&&t.toolCalls.length>0)l=o.extractArguments(t.toolCalls[0]).skillIds?.slice(0,sLt);else return Kr.error(this.ctx,"Missing tool call in meta prompt response"),zfe;let c=r.extendedBy({uiKind:i,skillIds:l?.join(",")??""},{numTokens:t.numTokens+t.toolCalls[0].approxNumTokens}),u=c.extendedBy({messageText:n});return jt(this.ctx,`${v0(i)}.metaPrompt`,c,0),jt(this.ctx,`${v0(i)}.promptContext`,u,1),{skillIds:l??[]}}telemetryError(t,r){let n=t.extendedBy({resultType:r.type,reason:r.reason??""});jt(this.ctx,"conversation.promptContextError",n,1)}};d();d();d();var CV=class{constructor(){this.languageId=["java","kotlin","scala","groovy"]}static{s(this,"JavaProjectMetadataLookup")}determineBuildTools(t){return[...t.buildTools]}determineApplicationFrameworks(t){let r=[];return me(t,r,"org.springframework.boot","Spring Boot"),me(t,r,"jakarta.jakartaee-api","Jakarta EE"),me(t,r,"javax:javaee-api","Java EE"),me(t,r,"org.apache.struts:struts2-core","Apache Struts"),me(t,r,"org.hibernate:hibernate-core","Hibernate"),me(t,r,"org.apache.wicket:wicket-core","Apache Wicket"),me(t,r,"javax.faces:jsf-api","JSF"),me(t,r,"org.grails:grails-core","Grails"),r}determineCoreLibraries(t){let r=[];return me(t,r,"com.google.guava","Google Guava"),me(t,r,"org.apache.commons:commons-lang3","Apache Commons Lang"),me(t,r,"org.apache.commons:commons-io","Apache Commons IO"),me(t,r,"joda-time:joda-time","Joda-Time"),me(t,r,"com.google.code.gson:gson","Google Gson"),me(t,r,"org.apache.commons:commons-math3","Apache Commons Math"),me(t,r,"org.apache.commons:commons-collections4","Apache Commons Collections"),me(t,r,"org.apache.commons:commons-net","Apache Commons Net"),me(t,r,"org.apache.poi:poi","Apache POI"),me(t,r,"com.fasterxml.jackson.core:jackson-databind","Jackson"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"org.junit.jupiter:junit-jupiter","JUnit"),me(t,r,"junit:junit","JUnit"),me(t,r,"org.testng:testng","TestNG"),me(t,r,"org.spockframework:spock-core","Spock"),me(t,r,"io.cucumber:cucumber-java","Cucumber"),me(t,r,"org.jboss.arquillian.junit:arquillian-junit-container","Arquillian"),r}determineTestingLibraries(t){let r=[];return me(t,r,"org.mockito","Mockito"),me(t,r,"org.assertj","AssertJ"),me(t,r,"org.hamcrest","Hamcrest"),me(t,r,"org.powermock","PowerMock"),me(t,r,"org.jmock","JMock"),me(t,r,"org.easymock","EasyMock"),me(t,r,"org.jmockit:jmockit","JMockit"),me(t,r,"com.github.tomakehurst:wiremock","WireMock"),me(t,r,"org.dbunit:dbunit","DBUnit"),me(t,r,"com.icegreen:greenmail","GreenMail"),me(t,r,"net.sourceforge.htmlunit:htmlunit","HtmlUnit"),me(t,r,"org.seleniumhq.selenium:selenium-java","Selenium"),me(t,r,"io.rest-assured:rest-assured","Rest-Assured"),me(t,r,"io.gatling.highcharts:gatling-charts-highcharts","Gatling"),me(t,r,"org.apache.jmeter:ApacheJMeter","JMeter"),r}},xV=class{constructor(){this.languageId=["javascript","javascriptreact","typescript","typescriptreact","vue"]}static{s(this,"JavaScriptProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"@types/node","Node.js"),me(t,r,"react-native","React Native"),r.find(n=>n.name==="React Native")||me(t,r,"react","React"),me(t,r,"angular","Angular"),me(t,r,"vue","Vue.js"),me(t,r,"ember","Ember.js"),me(t,r,"backbone","Backbone.js"),me(t,r,"meteor","Meteor"),me(t,r,"polymer","Polymer"),me(t,r,"aurelia","Aurelia"),me(t,r,"knockout","Knockout.js"),me(t,r,"dojo","Dojo Toolkit"),me(t,r,"mithril","Mithril.js"),me(t,r,"marionette","Marionette.js"),me(t,r,"marko","Marko.js"),me(t,r,"svelte","Svelte"),me(t,r,"hyperapp","Hyperapp"),me(t,r,"inferno","Inferno.js"),me(t,r,"preact","Preact"),me(t,r,"riot","Riot.js"),me(t,r,"moon","Moon.js"),me(t,r,"stencil","Stencil.js"),r}determineCoreLibraries(t){let r=[];return me(t,r,"lodash","Lodash"),me(t,r,"moment","Moment.js"),me(t,r,"axios","Axios"),me(t,r,"redux","Redux"),me(t,r,"recoil","Recoil"),me(t,r,"jquery","jQuery"),me(t,r,"d3","D3.js"),me(t,r,"underscore","Underscore.js"),me(t,r,"ramda","Ramda"),me(t,r,"immutable","Immutable.js"),me(t,r,"rxjs","RxJS"),me(t,r,"three","Three.js"),me(t,r,"socket.io","Socket.IO"),me(t,r,"express","Express.js"),me(t,r,"next","Next.js"),me(t,r,"puppeteer","Puppeteer"),me(t,r,"cheerio","Cheerio"),me(t,r,"nodemailer","Nodemailer"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"jest","Jest"),me(t,r,"mocha","Mocha"),me(t,r,"jasmine","Jasmine"),me(t,r,"ava","AVA"),me(t,r,"qunit","QUnit"),me(t,r,"tape","Tape"),r}determineTestingLibraries(t){let r=[];return me(t,r,"chai","Chai"),me(t,r,"sinon","Sinon"),me(t,r,"enzyme","Enzyme"),me(t,r,"protractor","Protractor"),me(t,r,"supertest","Supertest"),me(t,r,"nock","Nock"),me(t,r,"cypress","Cypress"),me(t,r,"@testing-library/react","React Testing Library"),r}},vV=class{constructor(){this.languageId="go"}static{s(this,"GoProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"github.com/gorilla/mux","Gorilla Mux"),me(t,r,"github.com/go-chi/chi","Chi"),me(t,r,"github.com/gin-gonic/gin","Gin"),me(t,r,"github.com/labstack/echo","Echo"),me(t,r,"github.com/revel/revel","Revel"),me(t,r,"github.com/astaxie/beego","Beego"),me(t,r,"github.com/go-martini/martini","Martini"),me(t,r,"github.com/gobuffalo/buffalo","Buffalo"),me(t,r,"github.com/goji/goji","Goji"),me(t,r,"github.com/hoisie/web","Web.go"),r}determineCoreLibraries(t){let r=[];return me(t,r,"net/http","net/http"),me(t,r,"fmt","fmt"),me(t,r,"io","io"),me(t,r,"time","time"),me(t,r,"math","math"),me(t,r,"strconv","strconv"),me(t,r,"strings","strings"),me(t,r,"sort","sort"),me(t,r,"encoding/json","encoding/json"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"github.com/onsi/ginkgo","ginkgo"),me(t,r,"github.com/onsi/gomega","gomega"),me(t,r,"github.com/stretchr/testify","testify"),me(t,r,"gopkg.in/check.v1","gocheck"),me(t,r,"github.com/franela/goblin","goblin"),me(t,r,"github.com/DATA-DOG/godog","godog"),me(t,r,"github.com/stesla/gospec","gospec"),me(t,r,"github.com/rjeczalik/gotest","gotest"),me(t,r,"github.com/smartystreets/goconvey","goconvey"),r}determineTestingLibraries(t){let r=[];return me(t,r,"github.com/stretchr/testify","Testify"),me(t,r,"github.com/smartystreets/goconvey","GoConvey"),me(t,r,"github.com/onsi/ginkgo","Ginkgo"),me(t,r,"github.com/golang/mock","GoMock"),me(t,r,"gopkg.in/check.v1","GoCheck"),me(t,r,"github.com/franela/goblin","Goblin"),me(t,r,"github.com/DATA-DOG/godog","GoDog"),me(t,r,"github.com/onsi/gomega","Gomega"),me(t,r,"github.com/stesla/gospec","GoSpec"),me(t,r,"github.com/rjeczalik/gotest","GoTest"),r}},bV=class{constructor(){this.languageId=["python","jupyter"]}static{s(this,"PythonProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"flask","Flask"),me(t,r,"django","Django"),me(t,r,"pyramid","Pyramid"),me(t,r,"tornado","Tornado"),me(t,r,"fastapi","FastAPI"),r}determineCoreLibraries(t){let r=[];return me(t,r,"requests","requests"),me(t,r,"numpy","numpy"),me(t,r,"pandas","pandas"),me(t,r,"scipy","scipy"),me(t,r,"matplotlib","matplotlib"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"pytest","Pytest"),me(t,r,"unittest","Unittest"),me(t,r,"doctest","Doctest"),me(t,r,"nose","Nose"),r}determineTestingLibraries(t){let r=[];return me(t,r,"mock","Mock"),me(t,r,"hypothesis","Hypothesis"),me(t,r,"behave","Behave"),me(t,r,"lettuce","Lettuce"),me(t,r,"testify","Testify"),me(t,r,"pyhamcrest","PyHamcrest"),r}},EV=class{constructor(){this.languageId=["php","blade"]}static{s(this,"PhpProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"laravel/framework","Laravel"),me(t,r,"symfony/symfony","Symfony"),me(t,r,"slim/slim","Slim"),me(t,r,"cakephp/cakephp","CakePHP"),me(t,r,"yiisoft/yii2","Yii"),me(t,r,"zendframework/zendframework","Zend Framework"),me(t,r,"phalcon/cphalcon","Phalcon"),me(t,r,"bcosca/fatfree","Fat-Free"),me(t,r,"fuel/fuel","FuelPHP"),me(t,r,"phpixie/framework","PHPixie"),r}determineCoreLibraries(t){let r=[];return me(t,r,"monolog/monolog","Monolog"),me(t,r,"vlucas/phpdotenv","PHP dotenv"),me(t,r,"symfony/console","Symfony Console"),me(t,r,"guzzlehttp/guzzle","GuzzleHttp"),me(t,r,"ramsey/uuid","Ramsey UUID"),me(t,r,"doctrine/orm","Doctrine ORM"),me(t,r,"php-di/php-di","PHP-DI"),me(t,r,"phpunit/php-timer","PHPUnit Timer"),me(t,r,"symfony/finder","Symfony Finder"),me(t,r,"symfony/yaml","Symfony Yaml"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"phpunit/phpunit","PHPUnit"),me(t,r,"behat/behat","Behat"),me(t,r,"phpspec/phpspec","PHPSpec"),me(t,r,"codeception/codeception","Codeception"),me(t,r,"atoum/atoum","Atoum"),me(t,r,"pestphp/pest","PestPHP"),me(t,r,"kahlan/kahlan","Kahlan"),me(t,r,"peridot-php/peridot","Peridot"),me(t,r,"phake/phake","Phake"),r}determineTestingLibraries(t){let r=[];return me(t,r,"mockery/mockery","Mockery"),me(t,r,"php-mock/php-mock","PHP-Mock"),me(t,r,"php-mock/php-mock-phpunit","PHP-Mock PHPUnit"),me(t,r,"padraic/mockery","Padraic Mockery"),me(t,r,"phpspec/prophecy","PHPSpec Prophecy"),me(t,r,"phpunit/php-invoker","PHPUnit Invoker"),me(t,r,"phpunit/php-token-stream","PHPUnit Token Stream"),me(t,r,"phpunit/php-code-coverage","PHPUnit Code Coverage"),me(t,r,"phpunit/php-timer","PHPUnit Timer"),me(t,r,"phpunit/php-text-template","PHPUnit Text Template"),r}},IV=class{constructor(){this.languageId="csharp"}static{s(this,"CSharpProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"Microsoft.NETCore.App",".NET Core"),me(t,r,"Microsoft.AspNetCore.App","ASP.NET Core"),r}determineCoreLibraries(t){let r=[];return me(t,r,"EntityFramework","Entity Framework"),me(t,r,"Newtonsoft.Json","Newtonsoft.Json"),me(t,r,"AutoMapper","AutoMapper"),me(t,r,"Serilog","Serilog"),me(t,r,"Dapper","Dapper"),me(t,r,"Polly","Polly"),me(t,r,"FluentValidation","FluentValidation"),me(t,r,"MediatR","MediatR"),me(t,r,"Hangfire","Hangfire"),me(t,r,"RabbitMQ.Client","RabbitMQ.Client"),me(t,r,"MassTransit","MassTransit"),me(t,r,"Microsoft.Extensions.Logging","Microsoft.Extensions.Logging"),me(t,r,"Microsoft.Extensions.DependencyInjection","Microsoft.Extensions.DependencyInjection"),me(t,r,"Microsoft.Extensions.Configuration","Microsoft.Extensions.Configuration"),me(t,r,"Microsoft.Extensions.Http","Microsoft.Extensions.Http"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"xunit","xUnit"),me(t,r,"NUnit","NUnit"),me(t,r,"SpecFlow","SpecFlow"),r}determineTestingLibraries(t){let r=[];return me(t,r,"Moq","Moq"),me(t,r,"FluentAssertions","FluentAssertions"),me(t,r,"Bogus","Bogus"),me(t,r,"RestSharp","RestSharp"),me(t,r,"Swashbuckle.AspNetCore","Swashbuckle.AspNetCore"),r}},TV=class{constructor(){this.languageId="dart"}static{s(this,"DartProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"flutter","Flutter"),me(t,r,"angular","AngularDart"),r}determineCoreLibraries(t){let r=[];return me(t,r,"dartx","dartx"),me(t,r,"provider","Provider"),me(t,r,"rxdart","RxDart"),me(t,r,"dio","Dio"),me(t,r,"json_serializable","json_serializable"),me(t,r,"freezed","Freezed"),me(t,r,"moor","Moor"),me(t,r,"hive","Hive"),me(t,r,"http","http"),me(t,r,"path","path"),me(t,r,"intl","intl"),me(t,r,"equatable","equatable"),me(t,r,"get_it","get_it"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"test","test"),me(t,r,"flutter_test","flutter_test"),r}determineTestingLibraries(t){let r=[];return me(t,r,"mockito","mockito"),me(t,r,"bloc_test","bloc_test"),r}},wV=class{constructor(){this.languageId="ruby"}static{s(this,"RubyProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"rails","Rails"),me(t,r,"sinatra","Sinatra"),me(t,r,"hanami","Hanami"),me(t,r,"grape","Grape"),me(t,r,"roda","Roda"),me(t,r,"padrino","Padrino"),me(t,r,"cuba","Cuba"),me(t,r,"ramaze","Ramaze"),me(t,r,"nyara","Nyara"),me(t,r,"rack","Rack"),r}determineCoreLibraries(t){let r=[];return me(t,r,"active_record","ActiveRecord"),me(t,r,"sequel","Sequel"),me(t,r,"rom","ROM"),me(t,r,"datamapper","DataMapper"),me(t,r,"mongoid","Mongoid"),me(t,r,"neo4j","Neo4j"),me(t,r,"redis","Redis"),me(t,r,"cassandra","Cassandra"),me(t,r,"couchrest","CouchRest"),me(t,r,"riak","Riak"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"rspec","RSpec"),me(t,r,"minitest","Minitest"),me(t,r,"cucumber","Cucumber"),me(t,r,"spinach","Spinach"),me(t,r,"turnip","Turnip"),me(t,r,"bacon","Bacon"),me(t,r,"shoulda","Shoulda"),me(t,r,"test-unit","Test::Unit"),me(t,r,"wrong","Wrong"),me(t,r,"contest","Contest"),r}determineTestingLibraries(t){let r=[];return me(t,r,"factory_bot","FactoryBot"),me(t,r,"faker","Faker"),me(t,r,"ffaker","FFaker"),me(t,r,"fabrication","Fabrication"),me(t,r,"machinist","Machinist"),me(t,r,"mocha","Mocha"),me(t,r,"flexmock","FlexMock"),me(t,r,"rr","RR"),me(t,r,"bourne","Bourne"),me(t,r,"not_a_mock","NotAMock"),r}},_V=class{constructor(){this.languageId="rust"}static{s(this,"RustProjectMetadataLookup")}determineBuildTools(t){return t.buildTools}determineApplicationFrameworks(t){let r=[];return me(t,r,"tokio","tokio"),me(t,r,"async-std","async-std"),me(t,r,"hyper","hyper"),me(t,r,"actix-web","actix-web"),me(t,r,"rocket","rocket"),r}determineCoreLibraries(t){let r=[];return me(t,r,"serde","serde"),me(t,r,"regex","regex"),me(t,r,"rand","rand"),me(t,r,"log","log"),me(t,r,"lazy_static","lazy_static"),me(t,r,"libc","libc"),me(t,r,"futures","futures"),me(t,r,"rayon","rayon"),me(t,r,"reqwest","reqwest"),me(t,r,"warp","warp"),r}determineTestingFrameworks(t){let r=[];return me(t,r,"test-case","test-case"),me(t,r,"proptest","proptest"),me(t,r,"quickcheck","quickcheck"),r}determineTestingLibraries(t){let r=[];return me(t,r,"mockall","mockall"),me(t,r,"double","double"),me(t,r,"rstest","rstest"),me(t,r,"mockiato","mockiato"),me(t,r,"mock_derive","mock_derive"),me(t,r,"mocktopus","mocktopus"),me(t,r,"mockers","mockers"),me(t,r,"mock_it","mock_it"),r}},SV=class{constructor(){this.languageId=["c","cpp"]}static{s(this,"CProjectMetadataLookup")}determineBuildTools(t){return t.buildTools.filter(r=>["gcc","clang","make","cmake","autotools","ninja","meson"].includes(r.name))}determineApplicationFrameworks(t){return t.libraries.filter(r=>["libc","libuv","openssl","zlib","libevent","libcurl"].includes(r.name))}determineCoreLibraries(t){return t.libraries.filter(r=>["libpng","libjpeg","libxml2","sqlite","postgres","mysql"].includes(r.name))}determineTestingFrameworks(t){return t.libraries.filter(r=>["unity","criterion","cmocka","check","ctest","minunit"].includes(r.name))}determineTestingLibraries(t){return t.libraries.filter(r=>["cmock","fff","trompeloeil","fakeit"].includes(r.name))}};function me(e,t,r,n){let i=e.libraries.find(o=>o.name.toLowerCase().indexOf(r.toLowerCase())>-1);i&&t.push({name:n,version:i.version})}s(me,"addFromLibraries");var RV=class{constructor(t,r){this.languageId=t;this.delegates=r}static{s(this,"CompositeProjectMetadataLookup")}determineBuildTools(t){return this.delegates.map(r=>r.determineBuildTools(t)).flat()}determineApplicationFrameworks(t){return this.delegates.map(r=>r.determineApplicationFrameworks(t)).flat()}determineCoreLibraries(t){return this.delegates.map(r=>r.determineCoreLibraries(t)).flat()}determineTestingFrameworks(t){return this.delegates.map(r=>r.determineTestingFrameworks(t)).flat()}determineTestingLibraries(t){return this.delegates.map(r=>r.determineTestingLibraries(t)).flat()}};function FWe(e){return e.language.version?e.language.name+" "+e.language.version:e.language.name}s(FWe,"determineProgrammingLanguage");var LWe=[new CV,new xV,new vV,new bV,new EV,new IV,new TV,new wV,new _V,new SV];function MWe(e){let t=LWe.find(r=>typeof r.languageId=="string"?r.languageId===e:Array.isArray(r.languageId)?r.languageId.includes(e):!1)??new RV(e,LWe);return new Yfe(t)}s(MWe,"getMetadataLookup");var Yfe=class{constructor(t){this.delegate=t;this.languageId=t.languageId}static{s(this,"DistinctProjectMetadataLookup")}determineBuildTools(t){return this.deduplicateDependencies(this.delegate.determineBuildTools(t))}determineApplicationFrameworks(t){return this.deduplicateDependencies(this.delegate.determineApplicationFrameworks(t))}determineCoreLibraries(t){return this.deduplicateDependencies(this.delegate.determineCoreLibraries(t))}determineTestingFrameworks(t){return this.deduplicateDependencies(this.delegate.determineTestingFrameworks(t))}determineTestingLibraries(t){return this.deduplicateDependencies(this.delegate.determineTestingLibraries(t))}deduplicateDependencies(t){let r=[];return t.forEach(n=>{r.find(i=>i.name===n.name)||r.push(n)}),r}};var QWe=I.Object({name:I.String(),version:I.Optional(I.String())}),OWe=I.Object({language:I.Object({id:I.String(),name:I.String(),version:I.Optional(I.String())}),libraries:I.Array(QWe),buildTools:I.Array(QWe)}),Kfe=class{constructor(t){this.turnContext=t}static{s(this,"ProjectMetadataSkillProcessor")}value(){return 1}processSkill(t){let r=[];r.push([new zt([`The user is working on a project with the following characteristics:
`]),1]);let n=MWe(t.language.id);return this.addProgrammingLanguage(t,r),this.addBuildTools(t,r,n),this.addApplicationFramework(t,r,n),this.addCoreLibraries(t,r,n),this.addTestingFrameworks(t,r,n),this.addTestingLibraries(t,r,n),new zt(r)}addProgrammingLanguage(t,r){let n=FWe(t);this.turnContext.collectLabel(p1,n),r.push([new zt([`- programming language: ${n}`]),1])}addBuildTools(t,r,n){this.addToPrompt(r,"- build tools:",n.determineBuildTools(t))}addApplicationFramework(t,r,n){this.addToPrompt(r,"- application frameworks:",n.determineApplicationFrameworks(t))}addCoreLibraries(t,r,n){this.addToPrompt(r,"- core libraries:",n.determineCoreLibraries(t))}addTestingFrameworks(t,r,n){this.addToPrompt(r,"- testing frameworks:",n.determineTestingFrameworks(t))}addTestingLibraries(t,r,n){this.addToPrompt(r,"- testing libraries:",n.determineTestingLibraries(t))}addToPrompt(t,r,n){if(n.length>0){n.forEach(o=>{this.turnContext.collectLabel(p1,`${o.name}${o.version?" "+o.version:""}`)});let i=n.map(o=>` - ${o.name}${o.version?" "+o.version:""}`).join(`
`);t.push([new zt([`${r}
${i}`]),1])}}},p1="project-metadata",kV=class{constructor(t){this._resolver=t;this.id=p1;this.type="explicit"}static{s(this,"ProjectMetadataSkill")}description(){return"The characteristics of the project the developer is working on (languages, frameworks)"}resolver(){return this._resolver}processor(t){return new Kfe(t)}};d();var UWe=Ze(require("path"));var Jfe=class{constructor(t){this.turnContext=t}static{s(this,"ReferencesSkillProcessor")}value(){return 1}async processSkill(t){let r=this.turnContext.ctx.get(On),n=[],i=this.filterIncludedFiles(t),o=(await this.toFileChunks(i,r)).filter(a=>a!==void 0).flat();if(o.length>0)return n.push([new zt(["The user wants you to consider the following referenced files when computing your answer."]),1]),n.push(...o),new zt(n)}filterIncludedFiles(t){return t.filter(r=>r.type==="file"&&!this.turnContext.isFileIncluded(r.uri))}async toFileChunks(t,r){return await Promise.all(t.map(async n=>{if(n.type==="file"&&n.uri)return await this.elideReferencedFiles(r,n)}))}async elideReferencedFiles(t,r){let n=await t.getOrReadTextDocument(r),i=ys(n);if(await this.turnContext.collectFile(DV,r.uri,i),n.status==="valid"){let o=t.getRelativePath(n.document);if(i==="included"){let a=new u1(n.document,r.selection,r.visibleRange);return[[`Code excerpt from referenced file \`${o}\`:`,1],[a.fromAllCode({addLineNumbers:!1}),1]]}else if(i==="empty")return[[new zt([`The referenced file \`${o}\` is empty.`]),1]]}else if(n.status==="invalid")return[[new zt([`The referenced file \`${UWe.basename(r.uri)}\` is content excluded.`]),1]]}},Xfe=class{static{s(this,"ReferencesSkillResolver")}resolveSkill(t){if(t.turn.request.references&&t.turn.request.references.length>0)return t.turn.request.references}},DV="references",BV=class{constructor(){this.id=DV;this.type="implicit"}static{s(this,"ReferencesSkill")}description(){return"The code from the user's referenced files"}resolver(){return new Xfe}processor(t){return new Jfe(t)}};var dE=s(()=>[p1,ep,DV,t0],"mandatorySkills"),PV=class{constructor(t,r){this.chatFetcher=r;this.metaPromptFetcher=new yV(t,this.chatFetcher)}static{s(this,"ConversationContextCollector")}async collectContext(t,r,n,i,o,a){let l=[];if(o){let c=o.requiredSkills?await o.requiredSkills(t.ctx):[];l.push(...c.filter(u=>!dE().includes(u)))}else(await this.metaPromptFetcher.fetchPromptContext(t,await this.selectableSkillDescriptors(t.ctx,t.conversation,t.turn),r,n,i)).skillIds.reverse().forEach(u=>{!l.includes(u)&&!dE().includes(u)&&l.push(u)});if(a){let c=await a.additionalSkills(t.ctx);l.push(...c.filter(u=>!dE().includes(u)))}return l.push(...dE()),l=l.filter(c=>!this.isIgnoredSkill(c,t.turn)),{skillIds:t.ctx.get(Hi).filterSupportedSkills(t.conversation.id,l)}}async selectableSkillDescriptors(t,r,n){let i=await this.getNonSelectableSkills(t),o=t.get(Hi).getSupportedSkills(r.id),a=t.get(gl).getDescriptors(),l=[];for(let c of a){if(i.includes(c.id)||!o.includes(c.id))continue;(c.isAvailable?await c.isAvailable(t):!0)&&!this.isIgnoredSkill(c.id,n)&&l.push(c)}return l}async getNonSelectableSkills(t){let r=await m1(t),n=(await Promise.all(r.map(i=>i.additionalSkills(t)))).flat();return[...dE(),...n]}isIgnoredSkill(t,r){return r.ignoredSkills?.some(n=>n.skillId===t)}};d();d();var NV=class{constructor(t,r,n,i){this.ctx=t;this.conversation=r;this.turn=n;this.progress=i;this.rounds=[]}static{s(this,"AgentToolCalls")}getRound(t){return this.rounds.find(r=>r.roundId===t)}async start(t,r,n,i){let o=this.getRound(t);if(o||(o={roundId:t,reply:""},this.rounds.push(o)),o.toolCalls?.find(l=>l.id===r))Kr.error(this.ctx,`Tool call ${r} already exists for the round ${t} in conversation ${this.conversation.id} and turn ${this.turn.id}`);else{let l={id:r,name:n,progressMessage:i,status:"running"};o.toolCalls=[l],await this.progress.report(this.conversation,this.turn,{editAgentRounds:[o]})}}async finish(t,r){await this.update(t,r,n=>{n.status="completed"})}async result(t,r,n){await this.update(t,r,i=>{i.status="completed",i.result=n.data})}async cancel(t,r){await this.update(t,r,n=>{n.status="cancelled"})}async finishAll(t="completed"){let r=this.rounds.filter(n=>{let i=n.toolCalls?.filter(o=>o.status==="running").map(o=>(o.status=t,o));if(i&&i.length>0)return n.toolCalls=i,!0});r.length>0&&await this.progress.report(this.conversation,this.turn,{editAgentRounds:r})}async error(t,r,n){await this.update(t,r,i=>{i.status="error",i.error=n||"Unknown error"})}async update(t,r,n){let i=this.rounds.find(a=>a.roundId===t);i||(i={roundId:t,reply:""},this.rounds.push(i));let o=i.toolCalls?.find(a=>a.id===r);o?(n(o),await this.progress.report(this.conversation,this.turn,{editAgentRounds:[i]})):Kr.error(this.ctx,`Tool call ${r} not found for the agent round ${t} in conversation ${this.conversation.id} and turn ${this.turn.id}`)}};d();var LV=class{constructor(t,r,n,i){this.ctx=t;this.conversation=r;this.turn=n;this.progress=i;this.steps=[]}static{s(this,"Steps")}async start(t,r,n){let i=this.steps.find(o=>o.id===t);if(!i)i={id:t,title:r,description:n,status:"running"},this.steps.push(i),await this.progress.report(this.conversation,this.turn,{steps:[i]});else throw new Error(`Step with id "${t}" already started`)}async finish(t){await this.updateStep(t,r=>{r.status="completed"})}async cancel(t){await this.updateStep(t,r=>{r.status="cancelled"})}async finishAll(t="completed"){let r=this.steps.filter(n=>n.status==="running").map(n=>(n.status=t,n));r.length>0&&await this.progress.report(this.conversation,this.turn,{steps:r})}async error(t,r){return this.updateStep(t,n=>{n.status="failed",n.error={message:r||"Unknown error"}})}async updateStep(t,r){let n=this.steps.find(i=>i.id===t);n?(r(n),await this.progress.report(this.conversation,this.turn,{steps:[n]})):Kr.error(this.ctx,`Step ${t} not found for conversation ${this.conversation.id} and turn ${this.turn.id}`)}};d();var aLt="X-Initiator",lLt="X-Interaction-ID",cLt="X-Interaction-Type";var FV=class{static{s(this,"LlmInteractionInitiator")}static id(){throw new Error("Must be implemented by subclass")}},Zfe=class extends FV{static{s(this,"User")}static id(){return"user"}},ede=class extends FV{static{s(this,"Agent")}static id(){return"agent"}},tde=class{static{s(this,"GenericLlmInteraction")}constructor(t,r,n){this.initiator=t.id(),this.interactionType=r,this.interactionId=n}toCapiHeaders(){return{[aLt]:this.initiator,[lLt]:this.interactionId,[cLt]:this.interactionType.toString()}}},Nu=class e extends tde{static{s(this,"LlmInteraction")}static user(t,r){return new e(Zfe,t,r)}static agent(t,r){return new e(ede,t,r)}};var b3=class{constructor(t,r,n,i){this.ctx=t;this.conversation=r;this.turn=n;this.cancelationToken=i;this.skillResolver=new rde(this),this.steps=new LV(t,r,n,t.get(_s)),this.collector=new nde(r,n,t.get(_s)),this.agentToolCalls=new NV(t,r,n,t.get(_s))}static{s(this,"TurnContext")}toLlmInteraction(){return this.conversation.source==="inline"?Nu.user("conversation-inline",this.turn.telemetryId):this.agentToolCalls.rounds.length?Nu.agent("conversation-panel",this.turn.telemetryId):Nu.user("conversation-panel",this.turn.telemetryId)}async collectFile(t,r,n,i){let o={type:"file",collector:t,uri:r,status:n};i&&(o.range=i),await this.collector.collect(o)}collectLabel(t,r){this.collector.collect({type:"label",collector:t,label:r})}isFileIncluded(t){return this.collector.collectibles.some(r=>r.type==="file"&&r.status==="included"&&r.uri===t)}async info(t){await this.sendChatNotification(t,"info")}async warn(t){await this.sendChatNotification(t,"warning")}async sendChatNotification(t,r){await this.ctx.get(_s).report(this.conversation,this.turn,{notifications:[{severity:r,message:t}]})}},MV=class extends Error{constructor(r,n){super(`Cycle detected while resolving skills: ${n.join(" -> ")} -> ${r}`);this.skillId=r;this.skillStack=n}static{s(this,"CycleError")}},PB=class extends Error{static{s(this,"ConversationAbortError")}constructor(t){super(t)}},rde=class{constructor(t){this.turnContext=t;this.resolveStack=[]}static{s(this,"SkillResolver")}async resolve(t){if(this.turnContext.ctx.get(Hi).getSupportedSkills(this.turnContext.conversation.id).includes(t)){this.ensureNoCycle(t);let n=this.turnContext.ctx.get($l).getResolvedSkill(this.turnContext.turn.id,t);if(n)return this.resolveStack.pop(),n;let i=await this.newlyResolve(t);return this.resolveStack.pop(),i}}ensureNoCycle(t){if(this.resolveStack.includes(t))throw new MV(t,this.resolveStack);this.resolveStack.push(t)}async newlyResolve(t){let n=this.turnContext.ctx.get(gl).getSkill(t);try{let i=await n?.resolver(this.turnContext).resolveSkill(this.turnContext);if(i)return this.turnContext.ctx.get($l).addResolvedSkill(this.turnContext.turn.id,t,i),i}catch(i){if(i instanceof MV||i instanceof PB)throw i;Kr.exception(this.turnContext.ctx,i,`Error while resolving skill ${t}`)}}},nde=class{constructor(t,r,n){this.conversation=t;this.turn=r;this.conversationProgress=n;this.collectibles=[]}static{s(this,"Collector")}async collect(t){this.collectibles.push(t),await this.reportCollectedFile(t)}async reportCollectedFile(t){t.type==="file"&&await this.conversationProgress.report(this.conversation,this.turn,{references:[{type:"file",uri:t.uri,status:t.status,range:t.range}]})}collectiblesForCollector(t){return this.collectibles.filter(r=>r.collector===t)}};async function qWe(e,t){let[r,n,i]=await uLt(e,t);return i.push(...mLt(e)),r.length>0||n.length>0?[new zt([[new zt(["Consider the additional context:"]),1],[y3(r,"inverseLinear"),.9],...n]),i]:[null,i]}s(qWe,"fromSkills");async function uLt(e,t){let r=[],n=[],i=[],o=[...e.turn.skills].reverse();for(let a of o){if(!await hLt(e,a.skillId,t?.languageId??""))continue;let[l,c]=await fLt(e,a.skillId);l&&(dE().indexOf(a.skillId)===-1?n.push(l):i.push(l)),r.push(c)}return n.reverse(),i.reverse(),r.reverse(),[n,i,r]}s(uLt,"handleSkillsInReverse");async function fLt(e,t){let n=e.ctx.get(gl).getSkill(t);try{let i=Date.now(),o=await e.skillResolver.resolve(t),a=Date.now()-i;if(o){let l=n?.processor(e),c=Date.now(),u=await l?.processSkill(o,e),f=Date.now()-c;return u?await dLt(e,n,l,u,a,f):[void 0,await OV(e,n,"unprocessable",void 0,a,f)]}else return[void 0,await OV(e,n,"unresolvable",void 0,a)]}catch(i){if(Kr.exception(e.ctx,i,`Error while resolving skill ${t}`),i instanceof PB)throw i;return[void 0,await OV(e,n,"failed")]}}s(fLt,"safelyProcessSkill");async function dLt(e,t,r,n,i,o){let a;return typeof n=="string"?a=new zt([[n,1]]):a=n,[[a,r?.value()||0],await OV(e,t,"resolved",a,i,o)]}s(dLt,"handleProcessedSkill");async function OV(e,t,r,n,i,o){let l=e.collector.collectiblesForCollector(t?.id??"unknown").filter(u=>u.type==="file"),c={skillId:t?.id??"unknown",resolution:r,files:l,resolutionTimeMs:i,processingTimeMs:o};if(n){let u=await e.ctx.get(ca).getBestChatModelConfig(kd("user")),f=n.elide(u.maxRequestTokens).getText();c.tokensPreEliding=Do(u.tokenizer).tokenLength(f)}return e.ctx.get($l).addResolution(e.turn.id,c),c}s(OV,"determineResolution");function mLt(e){return e.turn.ignoredSkills.map(t=>({skillId:t.skillId,resolution:"ignored"}))}s(mLt,"handleIgnoredSkills");async function hLt(e,t,r){if(t!==p1&&t!==ep)return!0;let n=e.ctx.get(or),i=await n.updateExPValuesAndAssignments({languageId:r});return n.ideChatEnableProjectMetadata(i)?t===p1:t===ep}s(hLt,"includeSkill");var WWe=Ze($f());var mE=class{static{s(this,"AbstractUserPromptStrategy")}async elidableContent(t,r){let n=[],i=IT(t.conversation.turns.slice(0,-1));i!==null&&n.push([i,.6]);let[o,a]=await this.elidableSkills(t,r);return o!==null&&(i!==null&&n.push(["",.1]),n.push([o,.8])),[new zt(n),a]}async elidableSkills(t,r){return await qWe(t,r)}async promptContent(t,r,n){let i;t.turn.workspaceFolder&&(i=await ET.getInstructions(t.ctx,[t.turn.workspaceFolder],{includeCodeGenerationInstructions:!0,includeCommitMessageGenerationInstructions:!1}));let o=Ff(t.conversation.getLastTurn().request.message),a;i?typeof o=="string"?a=i+`
`+o:a=[{type:"text",text:i},...o]:a=o;let[l,c]=await this.elidableContent(t,n);return[[{role:"system",content:r},{role:"user",content:l},{role:"system",content:this.suffix(t)},{role:"user",content:a}],c]}},UV=class extends mE{static{s(this,"PanelUserPromptStrategy")}suffix(t){return WWe.default`
Use the above information, including the additional context and conversation history (if available) to answer the user's question below.
Prioritize the context given in the user's question.
When generating code, think step-by-step. Briefly explain the code and then output it in a single code block.
When fixing problems and errors, provide a brief description first.
When generating classes, use a separate code block for each class.
Keep your answers short and impersonal.
Use Markdown formatting in your answers.
Escape special Markdown characters (like *, ~, -, _, etc.) with a backslash or backticks when using them in your answers.
You must enclose file names and paths in single backticks. Never use single or double quotes for file names or paths.
Make sure to include the programming language name at the start of every code block.
Avoid wrapping the whole response in triple backticks.
Only use triple backticks codeblocks for code.
Do not repeat the user's code excerpt when answering.
Do not prefix your answer with "GitHub Copilot".
Do not start your answer with a programming language name.
Do not include follow up questions or suggestions for next turns.
Respond in the following locale: ${t.conversation.userLanguage}.
`.trim()}};var GWe=Ze($f());var qV=class extends mE{static{s(this,"InlineUserPromptStrategy")}suffix(t){return GWe.default`
Use the above information, including the additional context and conversation history (if available) to answer the user's question below.
Prioritize the context given in the user's question.
Keep your answers short and impersonal.
Use Markdown formatting in your answers.
Escape special Markdown characters (like *, ~, -, _, etc.) with a backslash or backticks when using them in your answers.
You must enclose file names and paths in single backticks. Never use single or double quotes for file names or paths.
Make sure to include the programming language name at the start of every code block.
Only use triple backticks codeblocks for code.
Do not repeat the user's code excerpt when answering.
Do not prefix your answer with "GitHub Copilot".
Do not start your answer with a programming language name.
Do not include follow up questions or suggestions for next turns.
Respond in the following locale: ${t.conversation.userLanguage}.
The user is editing an open file in their editor.
The user's code is provided with line numbers prepended, for example: '1:code', starting at 1.
The selected code line numbers are provided and are inclusive.
If the user's question is about modifying the code in the editor, adhere to the following rules:
To edit a range of the user's code, use the following format:
- Generate a codeblock with the new code.
- Prefix the codeblock with a markdown comment of the form <!-- replace lines start to end -->
- Start and end are line numbers in the user's original code.
- Start and end are inclusive.
- Single line edits can be done by setting start and end to the same line number: <!-- replace lines X to X -->
- The original code between the start and end will be replaced with the new code.
- This format can be used to replace as well as add new code to the user's code.
For example, to replace lines X to Y of the user's code, use the following format:
<!-- replace lines X to Y -->
\`\`\`language
new code
\`\`\`
To delete a range of the user's code, use the following format:
- Generate a codeblock with the original code.
- Prefix the codeblock with a markdown comment of the form <!-- delete lines start to end -->
- Start and end are line numbers in the user's original code.
- Start and end are inclusive.
- Single line deletions can be done by setting start and end to the same line number: <!-- delete lines X to X -->
- The original code in the range will be deleted from the user's code.
For example, to delete lines X to Y of the user's code, use the following format:
<!-- delete lines X to Y -->
\`\`\`language
original code
\`\`\`
Remember:
- Prefix comments must be placed directly above/after the code block respectively.
- The first row of a codeblock must never be indented.
- Code in codeblocks must not contain line numbers.
- You must not return a codeblock containing the final code, but only individual codeblocks for each change.
`.trim()}};d();var ide=Ze($f());var WV=class{static{s(this,"MetaPromptStrategy")}elidableContent(t){let r=IT(t.turns.slice(0,-1)),n=[];return r!==null&&n.push([r,.6]),new zt(n)}suffix(t){if(t.promptType!=="meta")throw new Error("Invalid prompt options for strategy");if(!t.supportedSkillDescriptors)throw new Error("Supported skills must be provided for meta prompts");return this.buildMetaPrompt(t.supportedSkillDescriptors)}buildMetaPrompt(t){return ide.default`
Your task is to provide a helpful answer to the user's question.
To help you create that answer, you can resolve skills that give you more context.
Each skill has a description and some example user questions to help you understand when the skill may be useful.
List of available skills:
${t.map(r=>`${this.skillToPrompt(r)}
`).join(`
`)}
`.trim()}createFunctionArgumentSchema(t){let r=hLe(t.map(n=>n.id));return I.Object({skillIds:I.Array(r,{description:"The skill ids to resolve ranked from most to least useful"})})}toolConfig(t){if(t.promptType!=="meta")throw new Error("Invalid prompt options for strategy");return{tool_choice:{type:"function",function:{name:"resolveSkills"}},tools:[{type:"function",function:{name:"resolveSkills",description:"Resolves the skills by id to help answer the user question.",parameters:this.createFunctionArgumentSchema(t.supportedSkillDescriptors)}}],extractArguments(r){return{skillIds:LC(r).skillIds}}}}skillToPrompt(t){let r=t.description?t.description():t.id,n=`Skill Id: ${t.id}
Skill Description: ${r}`,i=t.examples?t.examples():[];return i.length>0&&(n+=`
Skill Examples:
${i.map(o=>` - ${o}`).join(`
`)}`),n}promptContent(t,r,n){let i=t.conversation.getLastTurn().request.message,o=this.elidableContent(t.conversation);return[[{role:"system",content:r},{role:"user",content:o},{role:"system",content:this.suffix(n)},{role:"user",content:ide.default`
This is the user's question:
${ln(i).trim()}
`.trim()}],[]]}};d();var HWe=Ze($f());var GV=class{static{s(this,"SuggestionsPromptStrategy")}toolConfig(){return{tool_choice:{type:"function",function:{name:"showSuggestions"}},tools:[{type:"function",function:{name:"showSuggestions",description:"Show the computed suggestions to the user",parameters:I.Object({suggestedTitle:I.String({description:"The suggested title for the conversation"}),followUp:I.String({description:"The suggested follow-up question for the conversation"})})}}],extractArguments(t){let r=LC(t);return{suggestedTitle:r.suggestedTitle,followUp:r.followUp}}}}suffix(t){return HWe.default`
Your task is to come up with two suggestions:
1) Suggest a title for the current conversation based on the history of the conversation so far.
- The title must be a short phrase that captures the essence of the conversation.
- The title must be relevant to the conversation context.
- The title must not be offensive or inappropriate.
- The title must be in the following locale: ${t.conversation.userLanguage}.
2) Write a short one-sentence question that the user can ask as a follow up to continue the current conversation.
- The question must be phrased as a question asked by the user, not by Copilot.
- The question must be relevant to the conversation context.
- The question must not be offensive or inappropriate.
- The question must not appear in the conversation history.
- The question must not have already been answered.
- The question must be in the following locale: ${t.conversation.userLanguage}.
`.trim()}elidableContent(t){let r=IT(t.turns.slice()),n=[];return r!==null&&n.push([r,.6]),new zt(n)}promptContent(t,r,n){return[[{role:"system",content:r},{role:"user",content:this.elidableContent(t.conversation)},{role:"system",content:this.suffix(t)}],[]]}};d();var pLt=[{type:"function",function:{name:"queryWithKeywords",description:"Searches the workspace for synonyms and relevant keywords related to the original user query. These keywords could be used as file names, symbol names, abbreviations, or comments in the relevant code.",parameters:I.Object({keywords:I.Array(I.Object({keyword:I.String({description:"A keyword or phrase relevant to the original user query that a user could search to answer their question. Keywords are not generic and do not repeat."}),variations:I.Array(I.String(),{description:"An array of relevant variations of the keyword. Variations include synonyms and plural forms. Variations are not generic and do not repeat."})}))})}}],HV=class extends mE{static{s(this,"UserQuerySynonymsPromptStrategy")}suffix(){return`
You are a coding assistant that helps developers find relevant code in their workspace by providing a list of relevant keywords they can search for.
The user will provide you with potentially relevant information from the workspace. This information may be incomplete.
# Additional Rules
Think step by step:
1. Read the user's question to understand what they are asking about their workspace.
2. If there are pronouns in the question, such as 'it', 'that', 'this', try to understand what they refer to by looking at the rest of the question and the conversation history.
3. Output a list of up to 8 relevant keywords that the user could search to answer their question. These keywords could be used as file names, symbol names, abbreviations, or comments in the relevant code. Put the keywords most relevant to the question first. Do not include overly generic keywords. Do not repeat keywords.
4. For each keyword in the list of relevant keywords, output a list of relevant variations of the keyword if applicable. Consider synonyms and plural forms. Do not include overly generic variations. Do not repeat variations.
# Example
User: Where is the code for base64 encoding?
Response:
queryWithKeywords([
{ "keyword": "base64 encoding", "variations": ["base64 encoder", "base64 encode"] },
{ "keyword": "base64", "variations": ["base 64"] },
{ "keyword": "encode", "variations": ["encoding", "encoded", "encoder", "encoders"] }
]);
`.trim()}promptContent(t,r,n){if(n.promptType!=="synonyms")throw new Error("Invalid prompt options for user query strategy");let i=Ff(t.conversation.getLastTurn().request.message),o=[{role:"system",content:r},{role:"system",content:this.suffix()},{role:"user",content:i}];return Promise.resolve([o,[]])}toolConfig(t){if(t.promptType!=="synonyms")throw new Error("Invalid prompt options for user query strategy");return{tools:pLt,tool_choice:{type:"function",function:{name:"queryWithKeywords"}},extractArguments(r){let n=LC(r).keywords;if(!n||!Array.isArray(n))return{keywords:[]};let i=new Set;for(let o of n)if(!(!bO(o,"keyword")||!o.keyword||typeof o.keyword!="string")&&(i.add(o.keyword.toLowerCase()),!(!bO(o,"variations")||!o.variations||!Array.isArray(o.variations))))for(let a of o.variations)typeof a=="string"&&i.add(a.toLowerCase());return{keywords:Array.from(i)??[]}}}}};var ode=class{constructor(t,r,n){this.promptType=t;this.strategy=n;this.modelFamilies=Array.isArray(r)?r:[r]}static{s(this,"PromptStrategyDescriptor")}};function NB(e,t,r){return new ode(e,t,r)}s(NB,"descriptor");var jWe=[NB("user",kd("user"),()=>new UV),NB("inline",kd("inline"),()=>new qV),NB("meta",kd("meta"),()=>new WV),NB("suggestions",kd("suggestions"),()=>new GV),NB("synonyms",kd("synonyms"),()=>new HV)],jV=class{static{s(this,"DefaultPromptStrategyFactory")}async createPromptStrategy(t,r,n){let i=jWe.find(o=>o.promptType===r&&o.modelFamilies.includes(n));if(!i)throw new Error(`No prompt strategy found for promptType: ${r} and modelFamily: ${n}`);return i.strategy(t)}get descriptors(){return jWe}};var $We=require("console");var vc=class{constructor(t,r=new jV){this.ctx=t;this.promptStrategyFactory=r}static{s(this,"ConversationPromptEngine")}async toPrompt(t,r){let n=await this.promptStrategyFactory.createPromptStrategy(this.ctx,r.promptType,r.modelConfiguration.modelFamily),[i,o]=await n.promptContent(t,await this.safetyPrompt(r.userSelectedModelName??r.modelConfiguration.uiName),r),[a,l]=this.elideChatMessages(i,r.modelConfiguration);return await this.ctx.get(tl).inspectPrompt({type:r.promptType,prompt:VWe(a),tokens:l}),this.ctx.get($l).addPrompt(t.turn.id,VWe(a),r.promptType),{messages:a,tokens:l,skillResolutions:o,toolConfig:n.toolConfig?.(r)}}elideChatMessages(t,r){let n=t.filter(l=>!(typeof l.content=="string"||Array.isArray(l.content)));(0,$We.assert)(n.length==1,"Only one elidable message is supported right now.");let i=this.computeNonElidableTokens(t,r),o=r.maxRequestTokens-i,a=t.map(l=>typeof l.content=="string"||Array.isArray(l.content)?l:{role:l.role,content:gLt(l.content.elide(o).getText())}).filter(l=>l.content.length>0);return[a,Vfe(a,r)]}computeNonElidableTokens(t,r){let n=t.filter(i=>typeof i.content=="string");return n.push({role:"user",content:""}),Vfe(n,r)}async safetyPrompt(t){let r=await this.ctx.get(Bn).getSession(this.ctx),n=this.ctx.get(gn).getEditorInfo().readableName??this.ctx.get(gn).getEditorInfo().name,i=ALt(process.platform);return DWe(this.ctx,n,r?.login,i,t)}};function gLt(e){return e.trimStart().replace(/^\[\.\.\.\]\n?/,"")}s(gLt,"processResultOfElidableText");function VWe(e){return e.map(t=>ln(t.content)).join(`
`)}s(VWe,"debugChatMessages");function ALt(e){switch(e){case"darwin":return"macOS";case"win32":return"Windows";case"linux":return"Linux";case"freebsd":return"FreeBSD";case"openbsd":return"OpenBSD";case"sunos":return"SunOS";case"aix":return"AIX";default:return}}s(ALt,"mapPlatformToOs");var VV=class{constructor(t,r){this.ctx=t;this.chatFetcher=r}static{s(this,"TurnSuggestions")}async fetchRawSuggestions(t,r,n,i){let o=await yo.getModelConfiguration(t.ctx,"suggestions",void 0,{tool_calls:!0}),a={promptType:"suggestions",modelConfiguration:o},l=await this.ctx.get(vc).toPrompt(t,a),c=i.extendedBy({messageSource:"chat.suggestions"},{promptTokenLen:l.tokens}),u={modelConfiguration:o,messages:l.messages,uiKind:n,llmInteraction:t.toLlmInteraction()};if(l.toolConfig===void 0)throw new Error("No tool call configuration found in suggestions prompt.");u.tool_choice=l.toolConfig.tool_choice,u.tools=l.toolConfig.tools;let f=await this.chatFetcher.fetchResponse(u,r,c);if(f.type!=="success"&&(Kr.error(this.ctx,"Failed to fetch suggestions, trying again..."),f=await this.chatFetcher.fetchResponse(u,r,c)),f.type==="success"){if(!f.toolCalls||f.toolCalls.length===0){Kr.error(this.ctx,"Missing tool call in suggestions response");return}let m=f.toolCalls[0],{followUp:h,suggestedTitle:p}=l.toolConfig.extractArguments(m);if(!h||!p){Kr.error(this.ctx,"Missing follow-up or suggested title in suggestions response");return}return{followUp:h.trim(),suggestedTitle:p.trim(),promptTokenLen:l.tokens,numTokens:f.numTokens+m.approxNumTokens}}else if(f.type==="successMultiple"){Kr.error(this.ctx,"successMultiple response is unexpected for suggestions");return}else if(f.type==="tool_calls"){Kr.error(this.ctx,"tool_calls response is unexpected for suggestions");return}else{Kr.error(this.ctx,`Failed to fetch suggestions due to reason: ${f.reason}`);return}}};var TT=class{constructor(t,r,n){this.turnContext=t;this.chatFetcher=r;this.computeSuggestions=n}static{s(this,"ChatFetchResultPostProcessor")}async postProcess(t,r,n,i,o,a,l,c){switch(p8e(this.turnContext.ctx,l,a,t.type=="offTopic",t.requestId,c,o.extendedBy({},{fileCount:this.turnContext.ctx.get(ma).workspaceCount})),await this.turnContext.ctx.get(tl).inspectFetchResult(t),t.type){case"success":return await this.processSuccessfulFetchResult(n,t.numTokens,t.requestId,r,l,i,o,c);case"offTopic":return this.processOffTopicFetchResult(o,l,c);case"canceled":return this.turnContext.turn.status="cancelled",this.turnContext.turn.response={message:"Cancelled",type:"user"},{error:{message:ln(this.turnContext.turn.response?.message??""),type:this.turnContext.turn.response?.type}};case"failed":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:t.reason,type:"server"},{error:{message:UC.translateErrorMessage(t.code,t.reason),code:t.code}};case"filtered":return this.turnContext.turn.status="filtered",{error:{message:"Oops, your response got filtered. Vote down if you think this shouldn't have happened.",responseIsFiltered:!0}};case"length":return this.turnContext.turn.status="error",{error:{message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0}};case"agentAuthRequired":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Authorization required",type:"server"},{error:{message:"Authorization required",responseIsFiltered:!1}};case"no_choices":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"No choices returned",type:"server"},{error:{message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0}};case"no_finish_reason":return this.turnContext.turn.status="error",n&&n.length>0?this.turnContext.turn.response={message:n,type:"model",references:this.turnContext.turn.response?.references}:this.turnContext.turn.response={message:"No finish reason",type:"server"},{error:{message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0}};case"model_not_supported":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Model not supported",type:"server"},{error:{message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1}};case"model_max_prompt_tokens_exceeded":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Model max prompt tokens exceeded",type:"server"},{error:{message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",code:400,reason:"model_max_prompt_tokens_exceeded",responseIsFiltered:!1}};case"successMultiple":case"tool_calls":case"unknown":return this.turnContext.turn.status="error",{error:{message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1}}}}async processSuccessfulFetchResult(t,r,n,i,o,a,l,c){if(t&&t.length>0){a.markAsDisplayed(),l.markAsDisplayed(),this.turnContext.turn.status="success",this.turnContext.turn.response={message:t,type:"model",references:this.turnContext.turn.response?.references},g8e(this.turnContext.ctx,this.turnContext.conversation,o,t,r,n,c,l);let u=this.computeSuggestions?await this.fetchSuggestions(i,o,a,c):void 0;if(u){let{followUp:f,suggestedTitle:m}=u;return{followup:f.message!==""?f:void 0,suggestedTitle:m!==""?m:void 0}}return{}}return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"The model returned successful but did not contain any response text.",type:"meta"},{error:{message:ln(this.turnContext.turn.response?.message??""),type:this.turnContext.turn.response?.type}}}async fetchSuggestions(t,r,n,i){let a=await new VV(this.turnContext.ctx,this.chatFetcher).fetchRawSuggestions(this.turnContext,t,r,n);if(a===void 0)return;let l=this.enrichFollowup(a,r,n,i);return Kr.debug(this.turnContext.ctx,"Computed followup",l),Kr.debug(this.turnContext.ctx,"Computed suggested title",a.suggestedTitle),{followUp:l,suggestedTitle:a.suggestedTitle}}enrichFollowup(t,r,n,i){let o=n.extendedBy({messageSource:"chat.suggestions",suggestionId:_r(),suggestion:"Follow-up from model"},{promptTokenLen:t.promptTokenLen,numTokens:t.numTokens});return v8e(this.turnContext.ctx,r,o,i),{message:t.followUp,id:o.properties.suggestionId,type:o.properties.suggestion}}processOffTopicFetchResult(t,r,n){let i="Sorry, but I can only assist with programming related questions.";return this.turnContext.turn.response={message:i,type:"offtopic-detection"},this.turnContext.turn.status="off-topic",A8e(this.turnContext.ctx,this.turnContext.conversation,r,i,t.properties.messageId,n,t),{error:{message:i,responseIsFiltered:!0}}}};d();var $V=I.Union([I.String(),I.Number()]),hE=I.Union([I.String(),I.Number()]),yLt=I.Union([I.Literal("included"),I.Literal("blocked"),I.Literal("notfound"),I.Literal("empty")]),zV=I.Object({uri:I.String(),position:I.Optional(wl)}),LB=I.Object({type:I.Literal("file"),uri:I.String(),visibleRange:I.Optional(ba),selection:I.Optional(ba),status:I.Optional(yLt),range:I.Optional(ba)}),wT=I.Union([LB,YUe]),ym=I.Union([I.Literal("panel"),I.Literal("inline")]),CLt=I.Union([I.Object({type:I.Literal("text"),text:I.String()}),I.Object({type:I.Literal("image_url"),imageUrl:I.Object({url:I.String(),detail:I.Optional(I.Union([I.Literal("low"),I.Literal("high")]))})})]),sde=I.Union([I.String(),I.Array(CLt)]),zWe=I.Object({request:sde,response:I.Optional(I.String()),agentSlug:I.Optional(I.String()),turnId:I.Optional(hE)});function YV(e){return typeof e=="string"?e:e.map(t=>t.type==="image_url"?{type:"image_url",image_url:{url:t.imageUrl.url,detail:t.imageUrl.detail}}:{type:"text",text:t.text})}s(YV,"convertToMessageContent");function KV(e,t){if(e=Ff(e),typeof e=="string")return e+t;let r=e.map(n=>n.type==="text").lastIndexOf(!0);if(r>=0){let n=[...e],i=n[r];return n[r]={type:"text",text:i.text+t},n}return[...e,{type:"text",text:t}]}s(KV,"appendToMessage");var JV=I.Union([I.Literal("Ask"),I.Literal("Agent")]),xLt=I.Object({type:I.String(),description:I.String()}),YWe=I.Object({name:I.String(),description:I.String(),inputSchema:I.Optional(I.Object({type:I.String(),properties:I.Record(I.String(),xLt),required:I.Array(I.String())})),confirmationMessages:I.Optional(I.Object({title:I.String(),message:I.String()}))}),XV=I.Object({uri:I.String(),name:I.String()});var ade="generate-response",ZV=class extends Error{constructor(r,n,i,o){super(r);this.authorizationUri=n;this.agentSlug=i;this.agentName=o}static{s(this,"RemoteAgentAuthorizationError")}},FB=class{constructor(t,r,n){this.agent=t;this.turnContext=r;this.chatFetcher=n;this.conversationProgress=r.ctx.get(_s),this.chatFetcher=this.chatFetcher??new ka(r.ctx),this.postProcessor=new TT(r,this.chatFetcher,!1),this.conversation=r.conversation,this.turn=r.turn}static{s(this,"RemoteAgentTurnProcessor")}async process(t,r,n,i){try{await this.processWithAgent(t,r,this.turnContext,i)}catch(o){Kr.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,o);let a=o instanceof Error?o.message:String(o);this.turn.status="error",this.turn.response={message:a,type:"meta"},o instanceof ZV?await this.endProgress({unauthorized:{authorizationUri:o.authorizationUri,agentSlug:o.agentSlug,agentName:o.agentName}}):await this.endProgress({error:{message:a,responseIsIncomplete:!0}})}}async processWithAgent(t,r,n,i){await this.conversationProgress.begin(this.conversation,this.turn,t);let o=await fc(this.turnContext.ctx,this.turnContext,{languageId:i?.detectedLanguageId??""});if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let a=await this.buildAgentPrompt(n);if(!a)await this.endTurnWithResponse(`No prompt created for agent ${this.agent.id}`,"error");else{let l={type:"user",prompt:JSON.stringify(a.messages,null,2),tokens:a.tokens};await n.ctx.get(tl).inspectPrompt(l),await n.steps.start(ade,"Generating response");let c=this.augmentTelemetry(a,o,this.turn.template,i);if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let u=await this.fetchConversationResponse(n,a.messages,r,o.extendedBy({messageSource:"chat.user"},{promptTokenLen:a.tokens}),c,i);this.turn.status==="cancelled"&&this.turn.response?.type==="user"?await this.cancelProgress():(await this.finishGenerateResponseStep(u,n),await this.endProgress({error:u.error,followUp:u.followup,suggestedTitle:u.suggestedTitle,skillResolutions:a.skillResolutions}))}}async buildAgentPrompt(t){let r=this.createMessagesFromHistory(t),n=await this.computeCopilotReferences(t),i=this.getOrCreateAgentSessionId(t);return this.turn.agent&&(this.turn.agent.sessionId=i),this.turn.confirmationResponse?this.addConfirmationResponse(this.turn.confirmationResponse,r):r.push({role:"user",content:Ff(t.turn.request.message),copilot_references:n.length>0?n:void 0}),{messages:r,tokens:-1,skillResolutions:[]}}getOrCreateAgentSessionId(t){let r=this.turn.agent?.agentSlug;if(r){for(let n of t.conversation.turns)if(n.agent?.agentSlug===r&&n.agent.sessionId)return n.agent.sessionId}return _r()}addConfirmationResponse(t,r){r.push({role:"user",content:"",copilot_confirmations:[t]})}createMessagesFromHistory(t){return $fe(t.conversation.turns.slice(0,-1),this.agent.slug).flatMap(r=>{let n=[];if(r.request&&n.push({role:"user",content:Ff(r.request.message)}),r.response&&r.response.type==="model"){let i=zUe(r.response.references);n.push({role:"assistant",content:Ff(r.response.message),copilot_references:i.length>0?i:void 0})}return n})}async computeCopilotReferences(t){return await nqe(t)}async endTurnWithResponse(t,r){this.turn.response={type:"meta",message:t},this.turn.status=r,await this.conversationProgress.report(this.conversation,this.turn,{reply:t}),await this.endProgress()}async fetchConversationResponse(t,r,n,i,o,a){n.onCancellationRequested(async()=>{await this.cancelProgress()});let l=new h3((m,h,p,g,y)=>{let x=y?{...y,agentSlug:this.agent.slug}:void 0;this.conversationProgress.report(this.conversation,this.turn,{reply:m,annotations:h,references:p,notifications:g.map(b=>({message:b.message,severity:"warning"})),confirmationRequest:x}),this.turn.response?(this.turn.response.message=KV(this.turn.response.message,m),this.turn.response.references.push(...p)):this.turn.response={message:m,type:"model",references:p},this.turn.annotations.push(...h??[]),x&&(this.turn.confirmationRequest=x)}),c=await this.turnContext.ctx.get(en).getGitHubSession(),u={engineName:"agents",endpoint:this.agent.endpoint??this.agent.slug,messages:r,uiKind:"conversationPanel",intentParams:{intent:!0,intent_threshold:.7,intent_content:ln(this.turn.request.message)},authToken:c?.accessToken,copilot_thread_id:this.turn.agent?.sessionId,llmInteraction:t.toLlmInteraction()},f=await this.chatFetcher.fetchResponse(u,n,i,(m,h)=>l.isFinishedAfter(m,h));return this.ensureAgentIsAuthorized(f),await this.postProcessor.postProcess(f,n,l.appliedText,i,o.extendedBy(this.addExtensibilityInfoTelemetry()),ln(this.turn.request.message),"conversationPanel",a)}ensureAgentIsAuthorized(t){if(t.type==="agentAuthRequired")throw this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Authorization required",type:"server"},new ZV("Authorization required",t.authUrl,this.agent.slug,this.agent.name)}augmentTelemetry(t,r,n,i){return RS(this.conversation,"conversationPanel",ln(this.turn.request.message).length,t.tokens,n?.templateId,void 0,r,t.skillResolutions)}addExtensibilityInfoTelemetry(){return{extensibilityInfoJson:JSON.stringify({agent:this.agent.slug,outgoingReferences:this.turn.request.references?.map(t=>t.type)??[],incomingReferences:this.turn.response?.references?.map(t=>t.type)??[]})}}async finishGenerateResponseStep(t,r){t.error?await r.steps.error(ade,t.error.message):await r.steps.finish(ade)}async endProgress(t){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,t)}async cancelProgress(){await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};var MB=class{constructor(t,r,n,i,o,a){this.id=t;this.slug=r;this.name=n;this.description=i;this.avatarUrl=o;this.endpoint=a}static{s(this,"RemoteAgent")}additionalSkills(){return[]}turnProcessor(t){return new FB(this,t)}},e$=class extends MB{static{s(this,"ExtensibilityPlatformAgent")}constructor(){super(0,"github","GitHub","Get answers grounded in web search, code search, and your enterprise's knowledge bases.","https://avatars.githubusercontent.com/u/9919?s=200&v=4","chat")}turnProcessor(t){return new FB(this,t)}};d();var vLt="github",rp=class{static{s(this,"RemoteAgentRegistry")}},t$=class extends rp{constructor(r){super();this.ctx=r;this._agents=void 0;this._lastFetchTime=0}static{s(this,"CapiRemoteAgentRegistry")}async agents(){return this.shouldRefreshAgents()&&(this._agents=await this.fetchAgents()),this._agents!=null?this._agents.slice():[]}shouldRefreshAgents(){return!this._agents||!this._lastFetchTime?!0:this.isLastFetchOlderOneHour()}isLastFetchOlderOneHour(){return Date.now()-this._lastFetchTime>36e5}async fetchAgents(){let r=await ov(this.ctx,"/agents");return r.ok?(this._lastFetchTime=Date.now(),this.parseAgents(await r.text())):(kn.error(this.ctx,"Failed to fetch agents from CAPI",{status:r.status,statusText:r.statusText}),[])}parseAgents(r){let n;try{n=JSON.parse(r).agents,Array.isArray(n)||kn.error(this.ctx,"Expected 'agents' to be an array")}catch(i){return r.includes("access denied")||kn.warn(this.ctx,"Invalid remote agent response:",r,i),[]}return n.filter(i=>i.slug!==vLt).map(i=>new MB(i.id,i.slug,i.name,i.description,i.avatar_url))}};var lde=class{constructor(){this.slug="project";this.name="Project";this.description="Ask about your project"}static{s(this,"ProjectAgent")}additionalSkills(){return[yT]}};async function m1(e){let t=[];return t.push(new e$),t.push(...await e.get(rp).agents()),t.push(new lde),t}s(m1,"getAgents");d();var KWe=Ze(cl());async function r$(e){let t=await e.get(Bn).checkAndUpdateStatus(e);if(t.status!=="OK")throw new KWe.ResponseError(nn.NoCopilotToken,`Not authenticated: ${t.status}`)}s(r$,"verifyAuthenticated");function Io(e){return async(t,r,n)=>(await r$(t),e(t,r,n))}s(Io,"ensureAuthenticated");var bLt=I.Object({});async function ELt(e,t,r){return[(await m1(e)).map(o=>({slug:o.slug,name:o.name,description:o.description,avatarUrl:o.avatarUrl})),null]}s(ELt,"handleConversationAgentsChecked");var JWe=Io(st(bLt,ELt));d();d();var QB=Ze(cl());function ILt(e,t,r){let n=dn.createAndMarkAsIssued({languageId:String(t.detectedLanguageId),requestedDocumentVersion:String(r),actualDocumentVersion:String(t.version)});return jt(e,"getCompletions.docVersionMismatch",n)}s(ILt,"telemetryVersionMismatch");async function np(e,t,r){let i=e.get(Vr).getTextDocumentUnsafe(t);if(!i)throw new QB.ResponseError(nn.InvalidParams,`Document for URI could not be found: ${t.uri}`);await r$(e);let o=await Lv(e,t,i.getText());if(o.status==="invalid")throw e.get(Ki).setInactive(o.reason),new QB.ResponseError(nn.CopilotNotAvailable,o.reason);if(t.version!==void 0&&i.version!==t.version)throw r?.isCancellationRequested||(ILt(e,i,t.version),bc.debug(e,`Requested document version was ${t.version} but actual document version was ${i.version}.`)),new QB.ResponseError(nn.ContentModified,"Document Version Mismatch");return i}s(np,"getTextDocument");async function g1(e,t,r){let n=t.textDocument??t.doc;if(!n){await r$(e);return}try{return await np(e,n,r)}catch(i){if(i instanceof QB.ResponseError&&i.code===nn.CopilotNotAvailable)return;throw i}}s(g1,"getTextDocumentIfAvailable");var TLt=I.Union([I.Literal("keyboard"),I.Literal("toolbar")]),wLt=I.Object({turnId:hE,codeBlockIndex:I.Number(),source:TLt,copiedCharacters:I.Number(),totalCharacters:I.Number(),copiedText:I.String(),doc:I.Optional(zV),textDocument:I.Optional(iu),position:I.Optional(wl),conversationSource:I.Optional(ym)});async function _Lt(e,t,r){let n=await g1(e,r,t),i={totalCharacters:r.totalCharacters,copiedCharacters:r.copiedCharacters},o=r.position??r.doc?.position;n&&o&&(i={...i,currentLine:o.line});let a=Y5(r.conversationSource),l=await fc(e,e.get(Hi).findByTurnId(r.turnId),{languageId:n?.detectedLanguageId??""});return Cf(e,n,{codeBlockIndex:r.codeBlockIndex.toString(),source:r.source,uiKind:a},i,`${v0(a)}.acceptedCopy`,l),["OK",null]}s(_Lt,"handleConversationCodeCopyChecked");var XWe=st(wLt,_Lt);d();var SLt=I.Union([I.Literal("keyboard"),I.Literal("toolbar"),I.Literal("diff")]),RLt=I.Object({turnId:hE,source:SLt,codeBlockIndex:I.Number(),acceptedLength:I.Optional(I.Number()),totalCharacters:I.Number(),newFile:I.Optional(I.Boolean()),doc:I.Optional(zV),textDocument:I.Optional(iu),position:I.Optional(wl),conversationSource:I.Optional(ym)});async function kLt(e,t,r){let n=await g1(e,r,t),i={totalCharacters:r.totalCharacters,acceptedLength:r.acceptedLength??r.totalCharacters},o=r.position??r.doc?.position;n&&o&&(i={...i,insertionOffset:n.offsetAt(o),currentLine:o.line});let a=Y5(r.conversationSource),l=await fc(e,e.get(Hi).findByTurnId(r.turnId),{languageId:n?.detectedLanguageId??""});return Cf(e,n,{codeBlockIndex:r.codeBlockIndex.toString(),source:r.source,uiKind:a,compType:r.acceptedLength&&r.acceptedLength<r.totalCharacters?"partial":"full"},i,`${v0(a)}.acceptedInsert`,l),["OK",null]}s(kLt,"handleConversationCodeInsertChecked");var ZWe=st(RLt,kLt);d();d();var n$=I.Array(ba);function i$(e){if(e.textDocument?.uri)return{uri:e.textDocument.uri,selection:e.selection,visibleRange:e.visibleRanges?.[0]}}s(i$,"resolveAsActiveEditor");d();var eGe=Ze(cl());var o$=new eGe.ProgressType,cde=class{constructor(t){this.progressToken=t}static{s(this,"WorkDoneProgressHandler")}async begin(t,r,n){await t.get(Wr).connection.sendProgress(o$,this.progressToken,{kind:"begin",title:`Conversation ${r.id} Turn ${n.id}`,conversationId:r.id,turnId:n.id,agentSlug:n.agent?.agentSlug})}async report(t,r,n,i){await t.get(Wr).connection.sendProgress(o$,this.progressToken,{kind:"report",conversationId:r.id,turnId:n.id,...i})}async end(t,r,n,i){await t.get(Wr).connection.sendProgress(o$,this.progressToken,{kind:"end",conversationId:r.id,turnId:n.id,...i})}async cancel(t,r,n,i){await t.get(Wr).connection.sendProgress(o$,this.progressToken,{kind:"end",conversationId:r.id,turnId:n.id,cancellationReason:"CancelledByUser",error:i})}};function _T(e){return new cde(e.workDoneToken)}s(_T,"createProgressHandler");d();d();d();var F0=class extends Error{constructor(r){super(r.message);this.conversationError=r;this.name="AgentConversationError"}static{s(this,"AgentConversationError")}};d();var b2=class extends Error{static{s(this,"ToolCallCanceledError")}constructor(t){super(t),this.name="Canceled"}};d();var ST=class extends Error{static{s(this,"ToolRoundExceedError")}constructor(){super('Oops, maximum tool attempts reached. You can type "continue" to proceed or rephrase your request.'),this.name="ToolRoundExceedError"}};d();d();var tGe="```",OB=String.raw`<!-- (?<mode>[\w-]+) lines? (?<start>\d+)(?: to (?<end>\d+))? -->`,BLt=String.raw`${tGe}[\w]*?\n(?<codeblock>[\s\S]*?)\n${tGe}`,DLt=new RegExp(OB+`
`+BLt,"gs"),ude=["replace","delete"];function fde(e,t){let r=e.matchAll(DLt),n=Array.from(r),i=[];for(let o of n){let a=o.groups;if(!a||!ude.includes(a.mode))continue;let l=a.start?parseInt(a.start)-1:-1,c=a.end?parseInt(a.end)-1:l,f=a.codeblock.split(`
`),m=f[0].match(/^\s*/)?.[0]??"";f.forEach((y,x)=>{f[x]=y.slice(m.length)});let h={mode:a.mode,codeblock:f.join(`
`),start:l,end:c},p=dde([h],t);if(!p)continue;let g={text:p,uri:t.uri};i.push({...h,updatedDocument:g})}return i}s(fde,"extractEditsFromTaggedCodeblocks");function dde(e,t){if(e.length===0)return;e.sort((n,i)=>n.start!==i.start?i.start-n.start:i.end-n.end);let r=t.getText().split(`
`);for(let n of e){let i=n.start,o=n.end,a=n.mode,l=n.codeblock.split(`
`);if(!(i<0||o<0||o<i)&&!(i>=r.length||o>=r.length)){if(a==="delete")r.splice(i,o-i+1);else if(a==="replace"){let c=r[i].match(/^\s*/)?.[0]??"";l.forEach((u,f)=>{l[f]=c+u}),r.splice(i,o-i+1,...l)}}}return r.join(`
`)}s(dde,"applyEditsToDocument");d();d();d();d();var E2=class{constructor(t,r,n=[]){this.textDocumentResult=t;this.range=r;this.descriptions=n;this.descriptions=n}static{s(this,"FileAttachment")}render(){if(this.textDocumentResult.status!=="valid")return[];let t=this.textDocumentResult.document,r=new Mf({code:t.getText(this.range),languageId:t.detectedLanguageId,uri:t.uri}),n=["<attachment>"];return n.push(...this.descriptions),n.push(...r.renderAsArray()),n.push("</attachment>"),n}};var PLt=new Gt("activeEditorPrompt");async function rGe(e,t){let r=[],n=e.turnContext.turn.request.activeEditor;if(n){if(t.isCancellationRequested)throw new pl;let i=await e.textDocumentProvider.getByUri(n.uri);if(i.status==="valid")if(n.selection&&NLt(n.selection)){let o=new E2(i,n.selection,["User's active selection, this should be the main focus:",`Excerpt from ${Pi(n.uri)}, lines ${n.selection.start.line+1} to ${n.selection.end.line+1}:`]);r.push(...o.render());let a=new E2(i,void 0,["User's active file for additional context:"]);r.push(...a.render())}else if(n.visibleRange){let o=new E2(i,n.visibleRange,["User's current visible code:",`Excerpt from ${Pi(n.uri)}, lines ${n.visibleRange.start.line+1} to ${n.visibleRange.end.line+1}:`]);r.push(...o.render())}else{let o=new E2(i,void 0,["User's active file for additional context:"]);r.push(...o.render())}else PLt.warn(e.context,`Failed to read file in active editor ${n.uri} with status ${i.status} and reason ${i.status==="notfound"?i.message:i.reason}`)}return r}s(rGe,"processActiveEditor");function NLt(e){return e.start.line!==e.end.line||e.start.character!==e.end.character}s(NLt,"notEmptySelection");var LLt=new Gt("fileReferencesPrompt");async function nGe(e,t){let r=e.turnContext.turn.request.references?.filter(a=>a.type==="file")||[];if(r.length===0&&!e.turnContext.turn.request.activeEditor)return[];let[n,i]=await Promise.all([Promise.all(r.map(async a=>{if(t.isCancellationRequested)throw new pl;let l=[],c=await e.textDocumentProvider.getByUri(a.uri);if(c.status==="valid"){let u=new E2(c,void 0,[]);u&&l.push(...u.render())}else LLt.warn(e.context,`Failed to read file ${a.uri} with status ${c.status} and reason ${c.status==="notfound"?c.message:c.reason}`);return l})),rGe(e,t)]),o=n.flat();return o.length>0||i.length>0?["<attachments>",...o,...i,"</attachments>"]:[]}s(nGe,"processFileReferences");d();d();function iGe(e){return e.reduce((r,n)=>r+n.value.length,0)+Math.max(0,e.length-1)}s(iGe,"partsLength");async function sGe(e,t=1/0,r){let n=oGe(0,e,t),i=t-iGe(n);for(;;){let o=!1,a=[];for(let l of n)if(l.type==="text")a.push(l);else if(l.type==="dir"){a.push({type:"text",uri:l.uri,value:l.value});let c=await l.getChildren();if(r?.isCancellationRequested)return FLt();let u=oGe(l.level+1,c,i-1);u.length&&(o=!0,i-=iGe(u)+1,a.push(...u))}if(n=a,!o)break}return{files:n.map(o=>o.uri).filter(o=>o!==void 0),tree:n.map(o=>o.value).join(`
`)}}s(sGe,"visualFileTree");function oGe(e,t,r){let n=" ".repeat(e),i=[],o=r;for(let a=0;a<t.length;++a){let l=t[a],c=n+l.name+(l.type===2?"/":"");if(c.length>o){let u=n+"...";for(;u.length>o&&i.length>0;)o+=i.pop().value.length+1;u.length<=o&&i.push({type:"text",uri:void 0,value:u});break}l.type===2?i.push({type:"dir",uri:l.uri,level:e,value:c,getChildren:l.getChildren}):i.push({type:"text",uri:l.uri,value:c}),o-=c.length,a!==t.length-1&&(o-=1)}return i}s(oGe,"toParts");var FLt=s(()=>({tree:"",files:[]}),"emptyTree");async function aGe(e,t,r,n){let i=await MLt(e,t,r,n);if(!i.length)return"";let o;if(i.length===1)o=i[0].tree.tree;else{o="";for(let{label:l,tree:c}of i){o+=`${l}/
`;for(let u of c.tree.split(`
`))o+=` ${u}
`}}let a=OC(o);return["I am working in a workspace that has the following structure:",a,o,a,"This view of the workspace structure may be truncated. You can use tools to collect more context if needed."].join(`
`)}s(aGe,"generateWorkspaceStructurePrompt");async function MLt(e,t,r,n){return t.length?Promise.all(t.map(async i=>{let o=i.name,a=await sGe(await lGe(e,i.uri,r,n),r.maxLength/t.length,n);return{label:o,tree:a}})):[]}s(MLt,"generateWorkspaceStructure");async function lGe(e,t,r,n){if(n.isCancellationRequested)return[];let i;try{i=await e.get(xo).readDirectory(t)}catch{return[]}return n.isCancellationRequested?[]:(i.sort((o,a)=>o[1]===a[1]?o[0].localeCompare(a[0]):o[1]===2?1:-1),Promise.all(i.map(([o,a])=>{let l=Bo(t,o);return r.excludeDotFiles&&o.startsWith(".")||ULt(l)?null:a===2?{type:2,uri:l,name:o,getChildren:s(()=>lGe(e,l,r,n),"getChildren")}:{type:1,uri:l,name:o}})).then(o=>o.filter(a=>a!=null)))}s(lGe,"buildFileList");var QLt=["node_modules","venv","out","dist",".git",".yarn",".npm",".venv","foo.asar",".vscode-test"],OLt=[".ds_store","thumbs.db","package-lock.json","yarn.lock",".cache"];function ULt(e){return!!(OLt.includes(Pi(e).toLowerCase())||Xo(e)?.toLowerCase()?.split(/[/\\]/g)?.some(r=>QLt.includes(r)))}s(ULt,"shouldAlwaysIgnoreFile");var cGe=new Gt("editAgentPrompt"),s$=class{constructor(t,r){this._toolsService=t;this.props=r;this.ctx=r.turnContext.ctx,this.turnContext=r.turnContext,this.currentTurn=r.turnContext.turn}static{s(this,"EditAgentPrompt")}async render(t){let r=this.turnContext.conversation.turns.slice(0,-1),n=this.createChatMessagesFromHistory(r),i=Gle(this.currentTurn.response?.message,!0),o=[{role:"system",content:this.buildSystemMessage().join(`
`)},...n,{role:"system",content:this.buildDefaultAgentPrompt().join(`
`)},{role:"user",content:(await this.buildUserPrompt(this.props.userMessage,t)).join(`
`)},...i];return i.length&&o.push({role:"user",content:"Above is the result of calling one or more tools. The user cannot see the results, so you should explain them to the user if referencing them in your answer. Continue from where you left off without repeating yourself."}),o}createChatMessagesFromHistory(t){let r=[];for(let n of t)if(n.request&&r.push({role:"user",content:Ff(n.request.message)}),n.response){let i=Gle(n.response.message,!0);i.forEach(o=>r.push(this.fixToolCallsInResponse(o,i)))}return r}fixToolCallsInResponse(t,r){if(t.tool_calls&&t.tool_calls.length){let n=t.tool_calls,i=[];for(let o of n)r.find(l=>l.role==="tool"&&l.tool_call_id===o.id)?i.push(o):cGe.warn(this.ctx,`Tool call ${o.id} does not have a result in the response. Removing it from the tool calls history.`);t.tool_calls=i}return t}addToolCallModelResponse(t,r){let n={role:"assistant",content:t,tool_calls:r.length?r:void 0};this.currentTurn.response?this.currentTurn.response.message=pk(this.currentTurn.response.message,n):this.currentTurn.response={message:[n],type:"model"}}addToolCallResult(t,r){let n="";switch(t.status){case"error":n="Tool call failed with error: ";break;case"cancelled":n="Tool call is cancelled with result: ";break;default:case"success":n=""}let i=n+lB(t.content),o={role:"tool",content:i,tool_call_id:r};if(!this.currentTurn.response)this.currentTurn.response={message:[o],type:"model"};else{if(fG(this.currentTurn.response.message)&&this.currentTurn.response.message.find(l=>l.role==="tool"&&l.tool_call_id===r)){cGe.info(this.ctx,`Tool call result for ${r} already exists in the turn response. Ignoring the new one.`);return}this.currentTurn.response.message=pk(this.currentTurn.response.message,o)}}buildSystemMessage(){let t=[];return t.push("You are an AI programming assistant.",'When asked for your name, you must respond with "GitHub Copilot".',"Follow the user's requirements carefully & to the letter.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.",`Respond in the following locale: ${this.props.turnContext.conversation.userLanguage}.`),t}buildDefaultAgentPrompt(){let t=this._toolsService.getToolMapForModel().get("get_errors")!==void 0,r=this._toolsService.getToolMapForModel().get("run_in_terminal")!==void 0,n=this._toolsService.getToolMapForModel().get("replace_string_in_file")!==void 0,i=this._toolsService.getToolMapForModel().get("update_user_preferences")!==void 0,o=[];return o.push("<instructions>"),o.push("You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks."),o.push("The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question."),o.push("If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when making changes."),o.push("If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept."),o.push("If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context."),o.push("Prefer using the semantic_search tool to search for context unless you know the exact string or filename pattern you're searching for."),o.push("Don't make assumptions about the situation-gather context first, then perform the task or answer the question."),o.push("Think creatively and explore the workspace in order to make a complete fix."),o.push("Don't repeat yourself after a tool call, pick up where you left off."),o.push(`NEVER print out a codeblock with file changes unless the user asked for it. Use the insert_edit_into_file ${n?"or replace_string_in_file":""} tool instead.`),r&&o.push("NEVER print out a codeblock with a terminal command to run unless the user asked for it. Use the run_in_terminal tool instead."),o.push("You don't need to read a file if it's already provided in context."),o.push("</instructions>"),o.push("<toolUseInstructions>"),o.push("When using a tool, follow the json schema very carefully and make sure to include ALL required properties."),o.push("Always output valid JSON when using a tool."),o.push("If a tool exists to do a task, use the tool instead of asking the user to manually take an action."),o.push("If you say that you will take an action, then go ahead and use the tool to do it. No need to ask permission."),o.push("Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs."),o.push("Never say the name of a tool to a user."),o.push(`For example, instead of saying that you'll use the run_in_terminal tool, say "I'll run the command in a terminal".`),o.push("If you think running multiple tools can answer the user's question, prefer calling them in parallel whenever possible, but do not call semantic_search in parallel."),o.push("If semantic_search returns the full contents of the text files in the workspace, you have all the workspace context."),r&&o.push("Don't call the run_in_terminal tool multiple times in parallel. Instead, run one command and wait for the output before running the next command."),i&&o.push("After you have performed the user's task, if the user corrected something you did, expressed a coding preference, or communicated a fact that you need to remember, use the update_user_preferences tool to save their preferences."),o.push("</toolUseInstructions>"),o.push("<editFileInstructions>"),n?(o.push("Before you edit an existing file, make sure you either already have it in the provided context, or read it with the read_file tool, so that you can make proper changes."),o.push("Use the replace_string_in_file tool to replace a string in a file, but only if you are sure that the string is unique enough to not cause any issues. You can use this tool multiple times per file."),o.push("Use the insert_edit_into_file tool to insert code into a file."),o.push("When editing files, group your changes by file."),o.push("NEVER show the changes to the user, just call the tool, and the edits will be applied and shown to the user."),o.push("NEVER print a codeblock that represents a change to a file, use insert_edit_into_file or replace_string_in_file instead."),o.push("For each file, give a short description of what needs to be changed, then use the replace_string_in_file or insert_edit_into_file tools. You can use any tool multiple times in a response, and you can keep writing text after using a tool.")):(o.push("Don't try to edit an existing file without reading it first, so you can make changes properly."),o.push("Use the insert_edit_into_file tool to edit files. When editing files, group your changes by file."),o.push("NEVER show the changes to the user, just call the tool, and the edits will be applied and shown to the user."),o.push(`NEVER print a codeblock that represents a change to a file, use insert_edit_into_file ${n?"or replace_string_in_file":""} instead.`),o.push(`For each file, give a short description of what needs to be changed, then use the ${n?"replace_string_in_file or":""} insert_edit_into_file tool. You can use any tool multiple times in a response, and you can keep writing text after using a tool.`)),o.push(`Follow best practices when editing files. If a popular external library exists to solve a problem, use it and properly install the package e.g. ${r?'with "npm install" or ':""}creating a "requirements.txt".`),t&&o.push("After editing a file, you MUST call get_errors to validate the change. Fix the errors if they are relevant to your change or the prompt, and remember to validate that they were actually fixed."),o.push("The insert_edit_into_file tool is very smart and can understand how to apply your edits to the user's files, you just need to provide minimal hints."),o.push("When you use the insert_edit_into_file tool, avoid repeating existing code, instead use comments to represent regions of unchanged code. The tool prefers that you are as concise as possible. For example:"),o.push(`// ${Ul}`),o.push("changed code"),o.push(`// ${Ul}`),o.push("changed code"),o.push(`// ${Ul}`),o.push(""),o.push("Here is an example of how you should format an edit to an existing Person class:"),o.push("class Person {"),o.push(` // ${Ul}`),o.push(" age: number;"),o.push(` // ${Ul}`),o.push(" getAge() {"),o.push(" return this.age;"),o.push(" }"),o.push("}"),o.push("</editFileInstructions>"),o}async buildUserPrompt(t,r){let n=this._toolsService.getToolMapForModel().get("replace_string_in_file")!==void 0,i=[],o=await nGe({turnContext:this.props.turnContext,textDocumentProvider:this.props.textDocumentProvider,context:this.ctx},r);return o.length>0&&i.push(...o),i.push("<context>"),i.push(`${this.getCurrentDate()}`),i.push(`${this.getUserOS()}`),i.push(`${this.getWorkspaceFoldersHint()}`),i.push(`${await this.getWorkspaceStructureHint(r)}`),i.push("</context>"),i.push("<reminder>"),i.push(`When using the insert_edit_into_file tool, avoid repeating existing code, instead use a line comment with \`${Ul}\` to represent regions of unchanged code.`),n&&i.push("When using the replace_string_in_file tool, include 3-5 lines of unchanged code before and after the string you want to replace, to make it unambiguous which part of the file should be edited."),i.push("</reminder>"),i.push("<prompt>"),i.push(t),i.push("</prompt>"),i}getWorkspaceFoldersHint(){return this.props.workspaceFolders&&this.props.workspaceFolders.length>0?`I am working in a workspace with the following folders:
${this.props.workspaceFolders.map(r=>` - ${Xo(r.uri)}`).join(`
`)}`:"There is no workspace currently open."}async getWorkspaceStructureHint(t){return this.props.workspaceFolders?await aGe(this.props.turnContext.ctx,this.props.workspaceFolders,{maxLength:2e3,excludeDotFiles:!0},t):""}getCurrentDate(){return`The current date is ${new Date().toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})}.`}getUserOS(){let t=process.platform;return`My current OS is: ${t==="win32"?"Windows":t==="darwin"?"macOS":t==="linux"?"Linux":"Unknown"}`}};d();function mde(e){if(e instanceof Error)return e.stack?e.stack:e.message;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}s(mde,"toString");var uGe=15,RT=new Gt("toolCallingLoop"),a$=class e{constructor(t,r,n,i){this.turnContext=t;this.chatFetcher=r;this.modelConfiguration=n;this.baseTelemetryWithExp=i;this.toolCallRounds=[];this.conversationProgress=t.ctx.get(_s),this.conversation=t.conversation,this.turn=t.turn,this.toolsService=t.ctx.get(Zc),this.prompt=new s$(this.toolsService,{turnContext:this.turnContext,userMessage:ln(this.turnContext.turn.request.message),workspaceFolders:this.turnContext.turn.workspaceFolders,textDocumentProvider:new Wg(this.turnContext.ctx)}),this.requestId=_r(),this.baseTelemetryWithExp=this.baseTelemetryWithExp.extendedBy({requestId:this.requestId})}static{s(this,"ToolCallingLoop")}static{this.NextToolCallId=Date.now()}async run(t){this.abortIfCanceled(t);let r=0,n;for(;;){r++,this.abortIfCanceled(t),this.validateIteration(r,n);let i=performance.now(),o=await this.runOne(r,t);if(E8e(this.turnContext.ctx,this.turnContext,r,performance.now()-i,this.baseTelemetryWithExp),n={...o},this.toolCallRounds.push(o.round),!o.round.toolCalls.length||o.response.type!=="success"&&o.response.type!=="tool_calls"){this.turn.status==="in-progress"&&(this.turn.status="success");return}}}async runOne(t,r){this.abortIfCanceled(r);let n=await this.prompt.render(r),i="",o=new h3((u,f,m,h)=>{let p=u.trim().match(OB)!==null;this.conversationProgress.report(this.conversation,this.turn,{annotations:f,references:m,hideText:p,notifications:h.map(g=>({severity:"warning",message:g.message})),editAgentRounds:[{roundId:t,reply:u}]}),this.turn.annotations.push(...f??[]),i+=u});this.abortIfCanceled(r);let a=this.toolsService.getToolsForModel();this.abortIfCanceled(r);let l={messages:n,modelConfiguration:this.modelConfiguration,uiKind:"agentPanel",tools:this.getAvailableChatTools(a),intentParams:{intent:!0},llmInteraction:this.turnContext.toLlmInteraction()};RT.debug(this.turnContext.ctx,`Send request for iteration ${t} for turn ${this.turn.id} with: ${JSON.stringify(l,null,2)}`);let c=await this.chatFetcher.fetchResponse(l,r,this.baseTelemetryWithExp,(u,f)=>o.isFinishedAfter(u,f));return this.processChatFetchResult(t,c,i,a,r)}async processChatFetchResult(t,r,n,i,o){switch(this.abortIfCanceled(o),RT.debug(this.turnContext.ctx,`Processing fetch type: ${r.type} in iteration ${t} for turn ${this.turn.id}: ${JSON.stringify(r,null,2)}`),r.type){case"success":return this.turn.status="success",this.prompt.addToolCallModelResponse(n,[]),{response:r,round:{response:r.value,toolInputRetry:0,toolCalls:[]}};case"offTopic":throw this.turn.status="off-topic",new F0({message:"Sorry, but I can only assist with programming related questions.",responseIsFiltered:!0});case"canceled":throw new pl;case"failed":throw this.turn.status="error",new F0({message:UC.translateErrorMessage(r.code,r.reason),code:r.code});case"filtered":throw this.turn.status="filtered",new F0({message:"Oops, your response got filtered.",responseIsFiltered:!0});case"length":throw this.turn.status="error",new F0({message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0});case"agentAuthRequired":throw this.turn.status="error",new F0({message:"Authorization required",responseIsFiltered:!1});case"no_choices":throw this.turn.status="error",new F0({message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"no_finish_reason":throw this.turn.status="error",new F0({message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"model_not_supported":throw this.turn.status="error",new F0({message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1});case"model_max_prompt_tokens_exceeded":throw this.turn.status="error",new F0({message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",responseIsFiltered:!1});case"tool_calls":return await this.handleToolCalls(r,n,i,t,o);case"successMultiple":case"unknown":default:throw this.turn.status="error",new F0({message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1})}}async handleToolCalls(t,r,n,i,o){if(t.type!=="tool_calls")throw new Error(`Expected tool_calls type but got ${t.type}`);if(!t.toolCalls)throw new Error("Tool calls are required but were not provided");let a=t.toolCalls.map(l=>{if(!l.id){let c=`cls_${e.NextToolCallId++}`;l.id=c}return l});this.prompt.addToolCallModelResponse(r,a);for(let l of a)await this.handleSingleToolCall(l,n,i,o);return{response:t,round:{response:r,toolInputRetry:0,toolCalls:a.map(l=>({id:l.id,name:l.function.name,arguments:JSON.stringify(l.function.arguments)}))}}}async handleSingleToolCall(t,r,n,i){if(!t.id)throw new Error(`Tool call id is required but was not provided for function ${t.function.name}`);let o=this.findToolByName(r,t.function.name);if(o){let a=performance.now(),l="success";try{let c=LC(t),u=this.toolsService.prepareInvocation(o.id,{input:c},i),f=this.turnContext.turn.needToolCallConfirmation!==void 0?this.turnContext.turn.needToolCallConfirmation:!1;await this.requestToolInvocationApproval(u,f,o.id,c,n,t.id,o.annotations,i),this.abortIfCanceled(i),await this.turnContext.agentToolCalls.start(n,t.id,o.name,u.progressMessage||`Running ${o.displayName} tool`);let m=await this.toolsService.invokeTool(this.turnContext,o.id,{toolInvocationToken:t.id,input:c,roundId:n,toolCallId:t.id},i);if(this.abortIfCanceled(i),m.status==="success"){let h=RQe(m);await this.turnContext.agentToolCalls.result(n,t.id,h)}else if(m.status==="error"){let h=dj(m);await this.turnContext.agentToolCalls.error(n,t.id,h.message)}else await this.turnContext.agentToolCalls.cancel(n,t.id);this.prompt.addToolCallResult(m,t.id)}catch(c){if(c instanceof b2||c instanceof pl)throw this.turn.status="cancelled",l="cancelled",this.prompt.addToolCallResult(new Gi([new Ci("")],"cancelled"),t.id),new b2(c.message);{RT.error(this.turnContext.ctx,`Error while invoking tool ${t.id}: ${mde(c)}`,c),l="error";let u=new Gi([new Ci(mde(c).substring(0,300))],"error");this.prompt.addToolCallResult(u,t.id),this.abortIfCanceled(i);let f=dj(u);await this.turnContext.agentToolCalls.error(n,t.id,f.message)}}finally{let c=performance.now()-a;I8e(this.turnContext.ctx,this.turnContext,o,t.id,n,c,l,this.baseTelemetryWithExp)}}else{let a=`Tool with name ${t.function.name} not found in registered tools`;RT.error(this.turnContext.ctx,a);let l=new Gi([new Ci(a)],"error");this.prompt.addToolCallResult(l,t.id);let c=dj(l);await this.turnContext.agentToolCalls.error(n,t.id,c.message)}}getAvailableChatTools(t){return t.map(r=>({type:"function",function:{name:r.nameForModel,description:r.description,parameters:r.inputSchema}}))}findToolByName(t,r){return t.find(n=>n.nameForModel===r)}abortIfCanceled(t){if(t.isCancellationRequested)throw this.turn.status="cancelled",new pl}async requestToolInvocationApproval(t,r,n,i,o,a,l,c){if(t.confirmationMessages&&r){let u=await this.toolsService.invokeToolConfirmation(this.turnContext,n,{title:t.confirmationMessages.title,message:t.confirmationMessages.message,input:i,roundId:o,toolCallId:a,annotations:l},c);switch(u.result){case"dismiss":throw this.turn.status="cancelled",new b2("Cancelled by user");case"accept":return Promise.resolve();default:throw new b2(`Invalid confirmation result ${u.result}`)}}else RT.debug(this.turnContext.ctx,`Tool call confirmation not required for ${n} with confirmation messages '${t.confirmationMessages?.message}' and needToolConfirm '${r}'`)}validateIteration(t,r){if(r&&t>uGe)throw RT.debug(this.turnContext.ctx,`Tool calling loop exceeds max iterations ${uGe} for turn ${this.turn.id}`),new ST}};var l$=new Gt("agenticTurnProcessor"),c$=class{constructor(t,r){this.turnContext=t;this.chatFetcher=r;this.conversationProgress=t.ctx.get(_s),this.chatFetcher=this.chatFetcher??new ka(t.ctx),this.conversation=t.conversation,this.turn=t.turn}static{s(this,"AgenticTurnProcessor")}async process(t,r,n,i,o){try{await this.processWithModelAndToolCall(t,r,this.turnContext,n,i,o)}catch(a){Kr.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,a);let l=a instanceof Error?a.message:String(a);this.turn.status="error",this.updateTurnResponseWithError(l),await this.endProgress({error:{message:l,code:Oue.Unknown,responseIsIncomplete:!0}})}}async processWithModelAndToolCall(t,r,n,i,o,a){if(r.isCancellationRequested)return;await this.conversationProgress.begin(this.conversation,this.turn,t);let l=await fc(this.turnContext.ctx,this.turnContext,{languageId:o?.detectedLanguageId??""});r.onCancellationRequested(async()=>{l$.info(this.turnContext.ctx,`Cancellation requested for turn ${this.turn.id}`),this.turn.status="cancelled",await this.cancelProgress()});try{let c=await yo.getModelConfiguration(this.turnContext.ctx,"edits",a);await new a$(this.turnContext,this.chatFetcher,c,l).run(r),await this.endProgress({})}catch(c){if(c instanceof b2)l$.info(this.turnContext.ctx,`Tool call canceled for turn ${this.turn.id}`,c),this.turn.status="cancelled",await this.cancelProgress();else if(c instanceof pl)l$.info(this.turnContext.ctx,`Turn ${this.turn.id} was cancelled`,c),this.turn.status="cancelled",this.updateTurnResponseWithError("Cancelled by user"),await this.cancelProgress();else if(c instanceof ST)this.turn.status="error",this.updateTurnResponseWithError(c.message),await this.endProgress({error:{message:c.message,code:Oue.ToolRoundExceedError,responseIsIncomplete:!0}});else if(c instanceof F0)this.turn.status="error",this.updateTurnResponseWithError(c.message),await this.endProgress({error:c.conversationError});else throw l$.error(this.turnContext.ctx,`Error in processing turn ${this.turn.id}`,c),c}}updateTurnResponseWithError(t){this.turn.response?.message?this.turn.response.message=pk(this.turn.response?.message,{role:"assistant",content:t}):this.turn.response={message:t,type:"meta"}}async endProgress(t){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,t)}async cancelProgress(){await this.turnContext.agentToolCalls.finishAll("cancelled"),await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};d();var hde="collect-context",pde="generate-response",u$=class{constructor(t,r,n){this.turnContext=t;this.strategy=r;this.chatFetcher=n;this.conversationProgress=t.ctx.get(_s),this.chatFetcher=this.chatFetcher??new ka(t.ctx),this.postProcessor=new TT(t,this.chatFetcher,r.computeSuggestions),this.conversation=t.conversation,this.turn=t.turn}static{s(this,"ModelTurnProcessor")}async process(t,r,n,i,o){try{await this.processWithModel(t,r,this.turnContext,n,i,o)}catch(a){Kr.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,a);let l=a instanceof Error?a.message:String(a);this.turn.status="error",this.turn.response={message:l,type:"meta"},await this.endProgress({error:{message:l,responseIsIncomplete:!0}})}}async processWithModel(t,r,n,i,o,a){await this.conversationProgress.begin(this.conversation,this.turn,t);let l=await fc(this.turnContext.ctx,this.turnContext,{languageId:o?.detectedLanguageId??""});if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let c=_B().find(h=>h.id===this.turn.template?.templateId);if(c?.response){await this.handleTemplateResponse(c,this.turn.template.userQuestion,r);return}let u=(await m1(this.turnContext.ctx)).find(h=>h.slug===this.turn.agent?.agentSlug);if(u){let h=await this.checkAgentPreconditions(u);if(h){await this.endProgress(h);return}}await n.steps.start(hde,"Collecting context"),await this.collectContext(n,r,l,this.strategy.uiKind,c,u);let f=a?(await this.turnContext.ctx.get(ca).getBestChatModelConfig([a])).uiName:void 0,m=await this.strategy.buildConversationPrompt(n,o?.detectedLanguageId??"",void 0,f);if(!m)await n.steps.error(hde,"Failed to collect context"),await this.endTurnWithResponse(this.strategy.earlyReturnResponse,"error");else{await n.steps.finish(hde),await n.steps.start(pde,"Generating response");let h=this.augmentTelemetry(m,l,c,i,o);if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let p=await this.fetchConversationResponse(m.messages,r,l.extendedBy({messageSource:"chat.user"},{promptTokenLen:m.tokens}),h,o,a),g=await this.strategy.processResponse(this.turn);this.turn.status==="cancelled"&&this.turn.response?.type==="user"?await this.cancelProgress():(await this.finishGenerateResponseStep(p,n),await this.endProgress({error:p.error,followUp:p.followup,suggestedTitle:p.suggestedTitle,skillResolutions:m.skillResolutions,updatedDocuments:g}))}}async checkAgentPreconditions(t){try{let r=t.checkPreconditions?await t.checkPreconditions(this.turnContext.ctx,this.turn):void 0;if(r&&r.type==="authorizationRequired")return{unauthorized:{...r,agentName:t.name,agentSlug:t.slug}}}catch(r){Kr.error(this.turnContext.ctx,`Error checking preconditions for agent ${t.slug}`,r);let n=r instanceof Error?r.message:String(r);return this.turn.status="error",this.turn.response={message:n,type:"meta"},{error:{message:n,responseIsIncomplete:!0}}}}async endTurnWithResponse(t,r){this.turn.response={type:"meta",message:t},this.turn.status=r,await this.conversationProgress.report(this.conversation,this.turn,{reply:t}),await this.endProgress()}async handleTemplateResponse(t,r,n){if(!t.response)return;let i=await t.response(this.turnContext,r,n);this.turn.response={type:"meta",message:i.message},this.turn.status=i.error?.responseIsFiltered?"filtered":i.error?.responseIsIncomplete?"error":"success",i.error?.responseIsFiltered||i.error?.responseIsIncomplete?(await this.conversationProgress.report(this.conversation,this.turn,{reply:"Sure, I can definitely do that!",annotations:i.annotations,notifications:i.notifications,references:i.references}),await this.turnContext.steps.finishAll(),await this.endProgress({error:{message:i.message,code:i.error?.code||0,responseIsIncomplete:i.error?.responseIsIncomplete,responseIsFiltered:i.error?.responseIsFiltered}})):(await this.conversationProgress.report(this.conversation,this.turn,{reply:i.message,annotations:i.annotations,notifications:i.notifications,references:i.references,confirmationRequest:i.confirmationRequest}),await this.endProgress())}async collectContext(t,r,n,i,o,a){let c=await new PV(this.turnContext.ctx,this.chatFetcher).collectContext(t,r,n,i,o,a);return this.turn.skills=c.skillIds.map(u=>({skillId:u})),c}async fetchConversationResponse(t,r,n,i,o,a){r.onCancellationRequested(async()=>{await this.cancelProgress()});let l="",c=0,u=new h3((p,g,y,x)=>{let b=p.trim().match(OB)!==null;if(this.conversationProgress.report(this.conversation,this.turn,{reply:p,annotations:g,references:y,hideText:b,notifications:x.map(E=>({severity:"warning",message:E.message}))}),this.turn.response?this.turn.response.message=KV(this.turn.response.message,p):this.turn.response={message:p,type:"model"},this.turn.annotations.push(...g??[]),l+=p,this.strategy.currentDocument){let E=this.strategy.extractEditsFromResponse(l,this.strategy.currentDocument);E&&E.length>0&&(l="",this.conversationProgress.report(this.conversation,this.turn,{codeEdits:E}),c+=E.length)}}),f=await yo.getModelConfiguration(this.turnContext.ctx,"user",a);t=yo.transformMessages(t,f.modelFamily);let m={modelConfiguration:f,messages:t,uiKind:this.strategy.uiKind,intentParams:{intent:!0,intent_threshold:.7,intent_content:ln(this.turn.request.message)},llmInteraction:this.turnContext.toLlmInteraction()},h=await this.chatFetcher.fetchResponse(m,r,n,(p,g)=>u.isFinishedAfter(p,g));return i=i.extendedBy(void 0,{numCodeEdits:c}),await this.postProcessor.postProcess(h,r,u.appliedText,n,i,ln(this.turn.request.message),this.strategy.uiKind,o)}augmentTelemetry(t,r,n,i,o){let a;return i?(this.turn.request.type="follow-up",y8e(this.turnContext.ctx,this.conversation,this.strategy.uiKind,ln(this.turn.request.message),t.tokens,i.type,i.id,o,r),a=RS(this.conversation,this.strategy.uiKind,ln(this.turn.request.message).length,t.tokens,i.type,i.id,r,t.skillResolutions)):a=RS(this.conversation,this.strategy.uiKind,ln(this.turn.request.message).length,t.tokens,n?.id,void 0,r,t.skillResolutions),a}async finishGenerateResponseStep(t,r){t.error?await r.steps.error(pde,t.error.message):await r.steps.finish(pde)}async endProgress(t){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,t)}async cancelProgress(){await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};d();var f$=class{constructor(t){this.ctx=t;this.earlyReturnResponse="Oops, an error has occurred. Please try again";this.uiKind="conversationPanel";this.computeSuggestions=!0}static{s(this,"PanelTurnProcessorStrategy")}processResponse(){return[]}async buildConversationPrompt(t,r,n,i){let o="user",a=await yo.getModelConfiguration(t.ctx,o),l={promptType:o,modelConfiguration:a,languageId:r,userSelectedModelName:i};return await this.ctx.get(vc).toPrompt(t,l)}extractEditsFromResponse(t,r){return[]}},d$=class{constructor(t){this.ctx=t;this.earlyReturnResponse="Please open a file and select code for the inline chat to be available";this.uiKind="conversationInline";this.computeSuggestions=!1}static{s(this,"InlineTurnProcessorStrategy")}async buildConversationPrompt(t,r,n){let i=await this.getCurrentEditorSkill(t);if(!i)return;let o=await this.getDocumentIfValid(i.uri);if(!o)return;let a=n?.producesCodeEdits===!1?"user":"inline",l=await t.ctx.get(ca).getBestChatModelConfig(kd(a)),c={promptType:a,modelConfiguration:l,languageId:r};return c.promptType==="inline"&&(this.currentDocument=o),await this.ctx.get(vc).toPrompt(t,c)}async processResponse(t){let r=[],n=ln(t.response?.message??"");if(n&&t.status==="success"&&this.currentDocument){let i=await this.processInlineResponse(n,this.currentDocument);i&&r.push(i)}return r}async getCurrentEditorSkill(t){let r=await t.skillResolver.resolve(t0);if(r)return r}async getDocumentIfValid(t){let r=await this.ctx.get(On).getOrReadTextDocument({uri:t});if(r.status==="valid")return r.document}async processInlineResponse(t,r){let i=fde(t,r).filter(a=>ude.includes(a.mode)),o=dde(i,r);if(o)return await this.ctx.get(tl).documentDiff({original:r.getText(),updated:o}),{uri:r.uri,text:o}}extractEditsFromResponse(t,r){return fde(t,r)}};d();d();var fGe=Ze(cl()),dGe=Ze(yh());var M0=class{constructor(t,r,n){this.ctx=t;this.skillId=r;this.requestType=new fGe.ProtocolRequestType("conversation/context");this.typeCheck=hs.Compile(n)}static{s(this,"AgentSkillResolver")}async resolveSkill(t){let r=this.ctx.get(Wr).connection,n={conversationId:t.conversation.id,turnId:t.turn.id,skillId:this.skillId},i;try{let o=await r.sendRequest(this.requestType,n),[a,l]=o;if(l){let c=new dGe.ResponseError(l.code,l.message,l.data);Kr.error(this.ctx,`ResponseError while resolving skill ${this.skillId}`,c);return}i=a}catch(o){Kr.error(this.ctx,`Error while resolving skill ${this.skillId}`,o);return}if(i!=null){if(!this.typeCheck.Check(i))throw new Cc(this.typeCheck.Errors(i));return i}}};var gde=class{constructor(t,r,n="",i="",o=[],a=[]){this.progressToken=t;this.chunks=r;this.followUp=n;this.suggestedTitle=i;this.skills=o;this.references=a}static{s(this,"SyntheticTurn")}},I2=class{constructor(){this.turns=[]}static{s(this,"SyntheticTurns")}add(t,r,n="",i="",o=[],a=[]){let l=new gde(t,r,n,i,o,a);return this.turns.push(l),l}get(t){return this.turns.find(r=>r.progressToken===t)}},m$=class{constructor(t,r){this.turnContext=t;this.syntheticTurn=r;this.conversationProgress=t.ctx.get(_s)}static{s(this,"SyntheticTurnProcessor")}async process(t,r){try{await this.processWithSyntheticTurns(this.syntheticTurn,t,r)}catch(n){Kr.error(this.turnContext.ctx,`Error processing turn ${this.turnContext.turn.id}`,n);let i=n.message;this.turnContext.turn.status="error",this.turnContext.turn.response={message:i,type:"meta"},await this.conversationProgress.end(this.turnContext.conversation,this.turnContext.turn,{error:{message:i,responseIsIncomplete:!0}})}}async processWithSyntheticTurns(t,r,n){await this.conversationProgress.begin(this.turnContext.conversation,this.turnContext.turn,r),await this.resolveSyntheticSkill(t,n),await this.processSyntheticChunks(t,n),await this.endSyntheticProgress(t,n),this.turnContext.turn.response={type:"model",message:t.chunks.join("")},this.turnContext.turn.status=n.isCancellationRequested?"cancelled":"success"}async resolveSyntheticSkill(t,r){let n=this.turnContext.ctx.get(Hi).getCapabilities(this.turnContext.conversation.id),i=t.skills.filter(o=>n.skills.includes(o));for(let o of i){let l=await new M0(this.turnContext.ctx,o,I.Object({value:I.String()})).resolveSkill(this.turnContext);l&&!r.isCancellationRequested&&await this.conversationProgress.report(this.turnContext.conversation,this.turnContext.turn,{reply:l.value})}}async processSyntheticChunks(t,r){for(let n of t.chunks)r.isCancellationRequested||(await this.conversationProgress.report(this.turnContext.conversation,this.turnContext.turn,{reply:n}),await IS(1))}async endSyntheticProgress(t,r){r.isCancellationRequested?await this.conversationProgress.cancel(this.turnContext.conversation,this.turnContext.turn):await this.conversationProgress.end(this.turnContext.conversation,this.turnContext.turn,{followUp:{message:t.followUp,type:"followup",id:_r()},suggestedTitle:t.suggestedTitle,updatedDocuments:this.turnContext.conversation.source==="inline"?[{uri:"fakeUpdatedDoc.ts",text:"fake"}]:void 0})}};var T2=class{static{s(this,"TurnProcessorFactory")}async createProcessor(t,r,n){let i=t.ctx.get(I2).get(r);if(i)return new m$(t,i);let a=(await m1(t.ctx)).find(c=>c.slug===t.turn.agent?.agentSlug);if(a?.turnProcessor)return a.turnProcessor(t);let l;return t.conversation.source==="inline"?l=new d$(t.ctx):l=new f$(t.ctx),t.turn.chatMode==="Agent"?new c$(t):(n!==void 0&&(l.computeSuggestions=n),new u$(t,l))}};d();var mGe=Ze(cl());var kT=class{static{s(this,"WorkspaceFoldersValidator")}static validate(t){if(!t)return;let r=new Set;for(let n of t){if(r.has(n.uri))throw new mGe.ResponseError(nn.InvalidParams,`Duplicate workspace folder uri ${n.uri}`);r.add(n.uri)}}};d();function h$(e){if(e&&e.uri.length>0)return[{uri:e.uri,name:Pi(e.uri)}]}s(h$,"resolveAsWorkspaceFolders");d();d();var qLt=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),Lu=class{constructor(t){this.tokens=[];this.handlers=[];this._isCancelled=!1;this.onCancellationRequested=s((t,r)=>this._isCancelled?qLt(t,r):(this.handlers.push(t.bind(r)),{dispose:s(()=>{},"dispose")}),"onCancellationRequested");this.tokens=t,this._isCancelled=t.some(r=>r.isCancellationRequested),t.forEach(r=>{r.onCancellationRequested(n=>this.cancel(n))})}static{s(this,"MergedToken")}cancel(t){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach(r=>r(t)))}get isCancellationRequested(){return this.tokens.some(t=>t.isCancellationRequested)}};var Q0=class{constructor(){this.tokens=new un(250)}static{s(this,"ProgressTokens")}add(t,r){let n=new Mn.CancellationTokenSource,i=new Lu([r,n.token]);return this.tokens.set(t.toString(),n),i}cancel(t){let r=this.tokens.get(t.toString());r&&(r.cancel(),this.tokens.delete(t.toString()))}};var WLt=I.Object({conversationId:I.Optional($V),workDoneToken:I.Union([I.String(),I.Number()]),turns:I.Array(zWe,{minItems:1}),capabilities:I.Optional(I.Object({allSkills:I.Optional(I.Boolean()),skills:I.Optional(I.Array(I.String()))})),doc:I.Optional(iu),textDocument:I.Optional(iu),selection:I.Optional(ba),visibleRanges:I.Optional(n$),computeSuggestions:I.Optional(I.Boolean()),references:I.Optional(I.Array(wT)),source:I.Optional(ym),workspaceFolder:I.Optional(I.String()),workspaceFolders:I.Optional(I.Array(XV)),ignoredSkills:I.Optional(I.Array(I.String())),userLanguage:I.Optional(I.String()),model:I.Optional(I.String()),chatMode:I.Optional(JV),needToolCallConfirmation:I.Optional(I.Boolean())});async function GLt(e,t,r){kT.validate(r.workspaceFolders);let n=await g1(e,r,t),i=e.get(Hi).create(r);await HLt(e,i,r,n);let o=i.turns[i.turns.length-1],a=_T(r),l=e.get(Q0).add(a.progressToken,t),c=new b3(e,i,o,l);return await(await e.get(T2).createProcessor(c,a.progressToken,r.computeSuggestions)).process(a,l,void 0,n,r.model),[{conversationId:i.id,turnId:o.id,agentSlug:o.agent?.agentSlug,modelFamily:r.model},null]}s(GLt,"handleConversationCreateChecked");async function HLt(e,t,r,n){for(let i of r.turns){let o=YV(i.request),a=new p3({message:o,type:"user"},i.turnId);i.response&&(a.response={message:i.response,type:"model"}),i.agentSlug&&(a.agent={agentSlug:i.agentSlug}),a.chatMode=Xj(r.chatMode),a.needToolCallConfirmation=r.needToolCallConfirmation;let l=r.workspaceFolder?{uri:r.workspaceFolder}:void 0,c=r.workspaceFolders&&r.workspaceFolders.length>0?r.workspaceFolders:h$(l),u=i$({textDocument:n,selection:r.selection,visibleRanges:r.visibleRanges});await e.get(Hi).addTurn(t.id,a,r.references,u,l,c,r.ignoredSkills,void 0)}}s(HLt,"addTurns");var hGe=st(WLt,GLt);d();var jLt=I.Object({conversationId:I.String()});function VLt(e,t,r){return e.get(Hi).destroy(r.conversationId),["OK",null]}s(VLt,"handleConversationDestroyChecked");var pGe=Io(st(jLt,VLt));d();var $Lt=I.Object({});function zLt(e,t,r){return[{path:e.get(yc).directory},null]}s(zLt,"handleConversationPersistenceChecked");var gGe=Io(st($Lt,zLt));d();d();var yGe=Ze(require("node:events"));var Ade=class{static{s(this,"TokenPreconditionCheck")}async check(t){let r=await t.get(Bn).getSession(t),n=t.get(Ia),i=n.fallbackAppId();return r&&r.githubAppId&&r.githubAppId!==i?{type:"token",status:"ok"}:{type:"token",status:"failed",githubAppId:n.githubAppId}}},yde=class{static{s(this,"ChatEnabledPreconditionCheck")}async check(t){return{type:"chat_enabled",status:(await t.get(en).getToken()).envelope.chat_enabled?"ok":"failed"}}},YLt=[new Ade,new yde],AGe="onPreconditionsChanged",Cm=class{constructor(t,r=YLt){this.ctx=t;this.checks=r;this.emitter=new yGe.default;Ks(t,async()=>{await this.check()})}static{s(this,"PreconditionsCheck")}check(t){return t&&(this.result=void 0),this.result===void 0&&(this.result=this.requestChecks()),this.result}async requestChecks(){let t=[];this.checks.length>0&&(t=await Promise.all(this.checks.map(i=>i.check(this.ctx))));let r=t.every(i=>i.status==="ok")?"ok":"failed",n={results:t,status:r};return this.emit(n),n}onChange(t){this.emitter.on(AGe,t)}emit(t){this.emitter.emit(AGe,t)}};var KLt=I.Object({forceCheck:I.Optional(I.Boolean())});async function JLt(e,t,r){let n=r.forceCheck??!1;return[await e.get(Cm).check(n),null]}s(JLt,"handleConversationPreconditionsChecked");var CGe=Io(st(KLt,JLt));d();var XLt=I.Object({turnId:I.String(),rating:I.Number(),doc:I.Optional(iu),textDocument:I.Optional(iu),source:I.Optional(ym)});async function ZLt(e,t,r){let n=await g1(e,r,t),i=Y5(r.source),o="unrated";r.rating>0?o="positive":r.rating<0&&(o="negative");let a=await fc(e,e.get(Hi).findByTurnId(r.turnId),{languageId:n?.detectedLanguageId??""});return Cf(e,n,{rating:o,uiKind:i},{},`${v0(i)}.messageRating`,a),["OK",null]}s(ZLt,"handleConversationRatingChecked");var xGe=st(XLt,ZLt);d();d();var p$=class extends d3{static{s(this,"ClientLanguageModelTool")}constructor(t){super({...t,toolProvider:i1,type:"client"}),this.confirmationMessages=t.confirmationMessages}prepareInvocation(t,r){return{progressMessage:`Running ${this.name} tool`,confirmationMessages:this.confirmationMessages}}async invoke(t,r,n){let i={name:this.name,input:r.input,conversationId:t.conversation.id,turnId:t.turn.id,roundId:r.roundId,toolCallId:r.toolCallId};try{return await t.ctx.get(FC).invokeClientTool(t,i)}catch(o){throw new Error(`Failed to invoke client tool ${this.name}: ${String(o)}`)}}async invokeConfirmation(t,r,n){if(n.isCancellationRequested)throw new pl;let i={name:this.name,title:r.title,message:r.message,input:r.input,conversationId:t.conversation.id,turnId:t.turn.id,roundId:r.roundId,toolCallId:r.toolCallId,annotations:r.annotations};try{return await t.ctx.get(qg).invokeClientToolConfirmation(t,i)}catch(o){throw new Error(`Failed to invoke client tool confirmation ${this.name}: ${String(o)}`)}}};var eFt=I.Object({tools:I.Array(YWe)});function tFt(e,t,r){return r.tools.forEach(n=>{e.get(Zc).registerTool(new p$({name:n.name,description:n.description,inputSchema:n.inputSchema,confirmationMessages:n.confirmationMessages}))}),["OK",null]}s(tFt,"conversationRegisterToolsChecked");var vGe=st(eFt,tFt);d();var rFt=I.Object({});function nFt(e,t,r){return[Sfe(e).map(i=>({id:i.id,description:i.description,shortDescription:i.shortDescription,scopes:i.scopes})),null]}s(nFt,"handleConversationTemplatesChecked");var bGe=Io(st(rFt,nFt));d();var iFt=I.Object({workDoneToken:I.Union([I.String(),I.Number()]),conversationId:$V,turnId:I.Optional(hE),message:sde,followUp:I.Optional(I.Object({id:I.String(),type:I.String()})),doc:I.Optional(iu),textDocument:I.Optional(iu),selection:I.Optional(ba),visibleRanges:I.Optional(n$),computeSuggestions:I.Optional(I.Boolean()),references:I.Optional(I.Array(wT)),workspaceFolder:I.Optional(I.String()),workspaceFolders:I.Optional(I.Array(XV)),ignoredSkills:I.Optional(I.Array(I.String())),confirmationResponse:pLe,model:I.Optional(I.String()),chatMode:I.Optional(JV),needToolCallConfirmation:I.Optional(I.Boolean())});async function oFt(e,t,r){kT.validate(r.workspaceFolders);let n=await g1(e,r,t),i=e.get(Hi),o=i.get(r.conversationId),a=YV(r.message),l=new p3({message:a,type:"user"},r.turnId);l.chatMode=Xj(r.chatMode),l.needToolCallConfirmation=r.needToolCallConfirmation;let c=r.workspaceFolder?{uri:r.workspaceFolder}:void 0,u=r.workspaceFolders&&r.workspaceFolders.length>0?r.workspaceFolders:h$(c),f=i$({textDocument:n,selection:r.selection,visibleRanges:r.visibleRanges});l=await i.addTurn(o.id,l,r.references,f,c,u,r.ignoredSkills,r.confirmationResponse);let m=_T(r),h=e.get(Q0).add(m.progressToken,t),p=new b3(e,o,l,h);return await(await e.get(T2).createProcessor(p,m.progressToken,r.computeSuggestions)).process(m,h,r.followUp,n,r.model),[{conversationId:o.id,turnId:l.id,agentSlug:l.agent?.agentSlug,modelFamily:r.model},null]}s(oFt,"handleConversationTurnChecked");var EGe=st(iFt,oFt);d();var sFt=I.Object({conversationId:I.String(),turnId:I.String(),source:I.Optional(ym)});async function aFt(e,t,r){e.get(Hi).deleteTurn(r.conversationId,r.turnId);let i=Y5(r.source),o=await fc(e,e.get(Hi).findByTurnId(r.turnId),{languageId:""});return Cf(e,void 0,{messageId:r.turnId,uiKind:i,conversationId:r.conversationId},{},`${v0(i)}.messageDelete`,o),["OK",null]}s(aFt,"handleConversationTurnDeleteChecked");var IGe=Io(st(sFt,aFt));d();var lFt=I.Object({document:I.Object({uri:I.String(),text:I.String(),languageId:I.String(),version:I.Number()}),selection:I.Object({start:I.Object({line:I.Number(),character:I.Number()}),end:I.Object({line:I.Number(),character:I.Number()})})});function cFt(){return["You are a world-class software engineer and the author and maintainer of the discussed code. Your feedback prefectly combines detailed feedback and explanation of context.",'When asked for your name, you must respond with "GitHub Copilot".',"Follow the user's requirements carefully & to the letter.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.","Use Markdown formatting in your answers.","Make sure to include the programming language name at the start of the Markdown code blocks.","Avoid wrapping the whole response in triple backticks.","The user works in an IDE called Visual Studio Code which has a concept for editors with open files, integrated unit test support, an output pane that shows the output of running the code as well as an integrated terminal.","The active document is the source code the user is looking at right now.","You can only give one reply for each conversation turn.","","Additional Rules","Think step by step:","1. Examine the provided code and any other context like user question, related errors, project details, class definitions, etc.","2. Provide feedback on the current selection on where it can be improved or introduces a problem.","2a. Avoid commenting on correct code.","2b. Avoid commenting on commented out code.","2c. Keep scoping rules in mind.","3. Reply with an enumerated list of feedback with source line number, filepath, kind (bug, performance, consistency, documentation, naming, readability, style, other), severity (low, medium, high), and feedback text.","3a. E.g.: 1. Line 357 in src/flow.js, bug, high severity: `i` is not incremented.","3b. E.g.: 2. Line 361 in src/arrays.js, documentation, low severity: Function `binarySearch` is not documented.","3c. E.g.: 3. Line 176 in src/vs/platform/actionWidget/browser/actionWidget.ts, consistency, medium severity: The color id `'background.actionBar'` is not consistent with the other color ids used. Use `'actionBar.background'` instead.","3d. E.g.: 4. Line 410 in src/search.js, documentation, medium severity: Returning `-1` when the target is not found is a common convention, but it should be documented.","3e. E.g.: 5. Line 51 in src/account.py, bug, high severity: The deposit method is not thread-safe. You should use a lock to ensure that the balance update is an atomic operation.","3f. E.g.: 6. Line 220 in src/account.py, readability, low severity: The withdraw method is very long and combines multipe logical steps, consider splitting it into multiple methods.","4. Try to sort the feedback by file and line number.",'5. When there is no feedback to provide, reply with "No feedback to provide."',"","Focus on being clear, helpful, and thorough.","Use developer-friendly terms and analogies in your explanations.","Provide clear and relevant examples when helpful."].join(`
`)}s(cFt,"buildSystemMessage");function uFt(e){let r=e.document.text.split(`
`).slice(e.selection.start.line,e.selection.end.line+1),n=e.selection.start.line+1,i=e.selection.end.line+1,o=r.map((a,l)=>{let c=e.selection.start.line+l+1;return`/* ${c>n&&c<i?"Selected ":""}Line ${c} */${a}`}).join(`
`);return["<currentChange>","Current selection with the selected lines labeled as such:","",`From the file: ${e.document.uri}`,`\`\`\`${e.document.languageId}/${e.document.uri}: FROM_LINE: ${n} - TO_LINE: ${i}`,o,"```","","</currentChange>"].join(`
`)}s(uFt,"buildUserMessage");function fFt(e,t){let r=[],n=e.text.split(`
`),i=/(\d+)\.\s*Line\s*(\d+)\s*in\s*([^,]+),\s*(\w+),\s*(\w+)\s*severity:\s*((?:[^`.\n]|`[^`]*`|\.(?=\s*[A-Z]))+)(?:\.|$)/gm,o;for(;(o=i.exec(t))!==null;){let[a,l,c,u,f,m,h]=o;if(!["bug","performance","consistency","documentation","naming","readability","style","other"].includes(f.toLowerCase()))continue;let p=parseInt(c)-1;if(p<0||p>=n.length)continue;let g=n[p],y=Math.max(g.search(/\S/),0),x=g.trimEnd().length,b={uri:e.uri,range:{start:{line:p,character:y},end:{line:p,character:x}},message:h.trim(),kind:f.toLowerCase(),severity:m.toLowerCase()};r.push(b)}return r}s(fFt,"parseReviewComments");async function dFt(e,t,r){if(!r.document.text)return[null,{code:nn.InvalidRequest,message:"Document text is required"}];if(!r.document.uri)return[null,{code:nn.InvalidRequest,message:"Document URI is required"}];if(!r.document.languageId)return[null,{code:nn.InvalidRequest,message:"Document language ID is required"}];let n=r.document.text.split(`
`);if(r.selection.start.line<0||r.selection.end.line>=n.length)return[null,{code:nn.InvalidRequest,message:"Invalid selection range"}];if(r.selection.start.line>r.selection.end.line)return[null,{code:nn.InvalidRequest,message:"Selection start line must be before end line"}];let i=e.get(ka),o=await yo.getModelConfiguration(e,"codeReview"),a=[{role:"system",content:cFt()},{role:"user",content:uFt(r)}],l=await e.get(or).updateExPValuesAndAssignments(),c=await i.fetchResponse({modelConfiguration:o,messages:a,uiKind:"conversationPanel",intentParams:{intent:!0},llmInteraction:Nu.user("code-review",_r())},t,l);if(c.type!=="success")return[null,{code:nn.InternalError,message:"Failed to generate code review"}];let u=fFt(r.document,c.value);return u.sort((f,m)=>f.range.start.line-m.range.start.line),[{comments:u},null]}s(dFt,"handleCopilotCodeReviewChecked");var TGe=Io(st(lFt,dFt));d();d();var E3=class{constructor(t,r,n,i,o){this.ctx=t;this.editConversation=r;this.currentTurn=n;this.partialResultToken=i;this.userSelectedModel=o;this.workingSetUriToPathMap=new Map;for(let a of n.workingSet)this.workingSetUriToPathMap.set(a.uri,KA.uriToPath(a.uri))}static{s(this,"EditTurnContext")}get editTurnId(){return this.currentTurn.id}get editConversationId(){return this.editConversation.id}mapToUriInWorkingSet(t){for(let[r,n]of this.workingSetUriToPathMap)if(n===t)return r}toLlmInteraction(){return Nu.user("conversation-edit-panel",this.editTurnId)}};d();async function g$(e,t,r,n){let o=e.get(Za).create("panel","en"),a=new qC({message:"",type:"user"},[]),l="file:///path/to/HelloWorld.java",c=new E3(e,o,a,n,ei.Gpt4o),u=e.get(Ac);await u.reportTurn(c,{editConversationId:t,editTurnId:r,fileGenerationStatus:"edit-plan-generated",editDescription:`### [HelloWorld.java](${l})
Complete the \`main\` method to print "Hello, World!" to the console.`,uri:l}),await u.reportTurn(c,{editConversationId:t,editTurnId:r,fileGenerationStatus:"updated-code-generated",uri:l,partialText:`public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}`,languageId:"java",markdownCodeFence:"```"});let f="file:///path/to/HelloWorld.py";await u.reportTurn(c,{editConversationId:t,editTurnId:r,fileGenerationStatus:"edit-plan-generated",editDescription:`### [HelloWorld.py](${f})
Complete the \`main\` method to print "Hello, World!" to the console.`,uri:f}),await u.reportTurn(c,{editConversationId:t,editTurnId:r,fileGenerationStatus:"updated-code-generating",uri:f,partialText:`def main():
`,languageId:"python",markdownCodeFence:"```"}),await u.reportTurn(c,{editConversationId:t,editTurnId:r,fileGenerationStatus:"updated-code-generating",uri:f,partialText:` println("Hello, World!")
`,languageId:"python",markdownCodeFence:"```"}),await u.reportTurn(c,{editConversationId:t,editTurnId:r,fileGenerationStatus:"updated-code-generated",uri:f,partialText:"",languageId:"python",markdownCodeFence:"```"})}s(g$,"streamMockedResult");d();var mFt=I.Object({enableMock:I.Boolean()}),A1=class{constructor(){this.enableMock=!1}static{s(this,"CopilotEditsMockManager")}isMockEnabled(){return this.enableMock}setMockEnabled(t){this.enableMock=t}};function hFt(e,t,r){return e.get(A1).setMockEnabled(r.enableMock),["OK",null]}s(hFt,"handleTestingSetCopilotEditsResponseChecked");var wGe=st(mFt,hFt);var pFt=I.Object({request:I.String(),response:I.Optional(I.String())}),gFt=I.Union([I.Literal("panel")]),AFt=I.Object({partialResultToken:I.Union([I.String(),I.Number()]),turns:I.Array(pFt,{minItems:1}),workingSet:I.Optional(I.Array(LB)),source:I.Optional(gFt),workspaceFolder:I.Optional(I.String()),userLanguage:I.Optional(I.String()),model:I.Optional(I.String())});function yFt(e,t){let r=e.create(t.source,t.userLanguage);for(let n of t.turns){let i=new qC({message:n.request,type:"user"},t.workingSet);n.response&&(i.response={message:n.response,type:"model"}),t.workspaceFolder&&(i.workspaceFolder=t.workspaceFolder),e.addTurn(r.id,i)}return r}s(yFt,"buildEditConversation");async function CFt(e,t,r){if(e.get(A1).isMockEnabled())return await g$(e,_r(),_r(),r.partialResultToken),[[],null];let n=yFt(e.get(Za),r),i=n.getLastTurn(),o=new E3(e,n,i,r.partialResultToken,r.model),a=e.get(Q0).add(r.partialResultToken,t);return[await e.get(JA).createOrContinueEditConversation(o,a),null]}s(CFt,"handleEditConversationCreateChecked");var _Ge=Io(st(AFt,CFt));d();var xFt=I.Object({editConversationId:I.String()});function vFt(e,t,r){return e.get(Za).destroy(r.editConversationId),["OK",null]}s(vFt,"handleEditConversationDestroyChecked");var SGe=Io(st(xFt,vFt));d();var bFt=I.Object({partialResultToken:I.Union([I.String(),I.Number()]),editConversationId:I.String(),message:I.String(),workingSet:I.Optional(I.Array(LB)),workspaceFolder:I.Optional(I.String()),userLanguage:I.Optional(I.String()),model:I.Optional(I.String())});function EFt(e,t,r){let n=e.get(t),i=new qC({message:r.message,type:"user"},r.workingSet);return r.workspaceFolder&&(i.workspaceFolder=r.workspaceFolder),e.addTurn(n.id,i),n}s(EFt,"buildEditConversation");async function IFt(e,t,r){if(e.get(A1).isMockEnabled())return await g$(e,r.editConversationId,_r(),r.partialResultToken),[[],null];let n=e.get(Za),i=EFt(n,r.editConversationId,r),o=i.getLastTurn(),a=new E3(e,i,o,r.partialResultToken,r.model),l=e.get(Q0).add(r.partialResultToken,t);return[await e.get(JA).createOrContinueEditConversation(a,l),null]}s(IFt,"handleEditConversationTurnChecked");var RGe=Io(st(bFt,IFt));d();var TFt=I.Object({editConversationId:I.String(),editTurnId:I.String(),source:I.Optional(ym)});async function wFt(e,t,r){e.get(Za).deleteTurn(r.editConversationId,r.editTurnId);let i=await SS(e,r.editTurnId,r.editConversationId,{languageId:""});return Cf(e,void 0,{messageId:r.editTurnId,uiKind:"editsPanel",conversationId:r.editConversationId},{},`${v0("editsPanel")}.copilotEditsMessageDelete`,i),["OK",null]}s(wFt,"handleEditConversationTurnDeleteChecked");var kGe=Io(st(TFt,wFt));d();var _Ft=I.Object({}),SFt=I.Object({servers:I.Array(I.Object({name:I.String(),tools:I.Array(I.Object({name:I.String(),status:I.Enum(xk)}))}))});function RFt(e,t,r){return[e.get(Qf).getAllTools(),null]}s(RFt,"handleGetMCPToolsChecked");function kFt(e,t,r){for(let{name:i,tools:o}of r.servers)for(let{name:a,status:l}of o)e.get(Qf).updateMCPToolStatus(i,a,l);return[e.get(Qf).getAllTools(),null]}s(kFt,"handleUpdateMCPToolsStatusChecked");var BGe=st(_Ft,RFt),DGe=st(SFt,kFt);d();var BFt=I.Object({});async function DFt(e,t,r){let n=await e.get(en).getToken();return[PFt(await e.get(lf).getMetadata(),n),null]}s(DFt,"handleCopilotModelsChecked");function PFt(e,t){let r=t.getTokenValue("editor_preview_features")=="0",n=Dd.filterModelsWithEditorPreviewFeatures(e,r),i=[];return n.forEach(o=>{if(o.model_picker_enabled===!0){let a=[];o.capabilities.type==="chat"?(a.push("chat-panel"),a.push("edit-panel"),a.push("inline"),!vxe.has(o.capabilities.family)&&o.capabilities.supports?.tool_calls&&(o.capabilities.limits?.max_prompt_tokens??!1)&&a.push("agent-panel"),i.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:a,id:o.id,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1}},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0})):o.capabilities.type==="completion"?i.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:["completion"],id:o.id,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1}},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0}):i.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:a,id:o.id,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1}},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0})}}),i}s(PFt,"filterModels");var PGe=Io(st(BFt,DFt));d();var NFt=I.Object({model:I.Optional(I.String()),status:I.Optional(I.String())});async function LFt(e,t,r){return r.model&&r.status==="enabled"?await e.get(lf).acceptModelPolicy(r.model)?["OK",null]:[null,{code:nn.InternalError,message:"Failed to accept model policy"}]:[null,{code:nn.InvalidRequest,message:"Invalid model or status"}]}s(LFt,"handleCopilotModelsPolicyChecked");var NGe=Io(st(NFt,LFt));d();d();var w2=10;function LGe(e,t){let r=t,n=e.lineAt(t.line);return n.isEmptyOrWhitespace||(r=n.range.end),r}s(LGe,"panelPositionForDocument");d();var Cde=new Gt("solutions");async function*FFt(e){for await(let t of e){let r={...t};r.completionText=r.completionText.trimEnd(),yield r}}s(FFt,"trimChoices");var BT=class{constructor(t,r,n,i){this.textDocument=t;this.startPosition=r;this.cancellationToken=n;this.solutionCountTarget=i;this.targetPosition=LGe(this.textDocument,this.startPosition)}static{s(this,"SolutionManager")}get savedTelemetryData(){return this._savedTelemetryData}set savedTelemetryData(t){this._savedTelemetryData=t}};function A$(e){return e.replace(/\s+/g,"")}s(A$,"normalizeCompletionText");async function MFt(e,t){let r=t.targetPosition,n=t.textDocument,i=D5(e,n.uri),o=_r(),a=dn.createAndMarkAsIssued({headerRequestId:o,languageId:n.detectedLanguageId,source:"open copilot"},{});t.savedTelemetryData=await e.get(or).updateExPValuesAndAssignments({uri:n.uri,languageId:n.detectedLanguageId},a);let l=await m6(e,o,yg(n,r),t.savedTelemetryData);if(l.type==="copilotContentExclusion")return{status:"FinishedNormally"};if(l.type==="contextTooShort")return{status:"FinishedWithError",error:"Context too short"};if(l.type==="promptCancelled")return{status:"FinishedWithError",error:"Prompt cancelled"};if(l.type==="promptTimeout")return{status:"FinishedWithError",error:"Prompt timeout"};if(l.type==="promptError")return{status:"FinishedWithError",error:"Prompt error"};let c=l.prompt,u=l.trailingWs;u.length>0&&(t.startPosition=No.position(t.startPosition.line,t.startPosition.character-u.length));let f=t.cancellationToken;t.savedTelemetryData=t.savedTelemetryData.extendedBy({},{...o8(c),solutionCount:t.solutionCountTarget,promptEndPos:n.offsetAt(r)}),Cde.debug(e,"prompt:",c),jt(e,"solution.requested",t.savedTelemetryData);let m=e.get(hh).forLanguage(e,n.detectedLanguageId,t.savedTelemetryData),h=uf(n.detectedLanguageId),p=LS(n,r),g={language:n.detectedLanguageId,next_indent:p.next??0,prompt_tokens:c.prefixTokens??0,suffix_tokens:c.suffixTokens??0},y={};m==="parsing"&&!h&&(y.stop=[`
`,`\r
\r
`]);let x=B5(e,t.savedTelemetryData),b={prompt:c,languageId:n.detectedLanguageId,repoInfo:i,ourRequestId:o,engineModelId:x.modelId,count:t.solutionCountTarget,uiKind:"synthesize",postOptions:y,headers:x.headers,extra:g},E;switch(m){case"server":E=s(()=>{},"finishedCb"),g.force_indent=p.prev??-1,g.trim_by_indentation=!0;break;case"parsingandserver":E=h?NS(e,n,t.startPosition,!1):()=>{},g.force_indent=p.prev??-1,g.trim_by_indentation=!0;break;case"parsing":default:E=h?NS(e,n,t.startPosition,!1):()=>{};break}let _=t.savedTelemetryData,k=await e.get(hu).fetchAndStreamCompletions(e,b,_.extendedBy(),E,f);if(k.type==="failed"||k.type==="canceled")return{status:"FinishedWithError",error:`${k.type}: ${k.reason}`};let B=k.choices;B=FFt(B),B=_S(B,Z=>YS(e,n,r,Z,!1,Cde));let N=_S(B,async Z=>{let he=Z.completionText;Cde.info(e,`Open Copilot completion: [${Z.completionText}]`);let ee=await r6e(e,n,r,Z.completionText)??No.position(r.line,0),[G]=d6(n.getText(No.range(ee,r)));he=G+he;let q=Z.completionText;u.length>0&&q.startsWith(u)&&(q=q.substring(u.length));let ie=Z.meanLogProb,z=ie!==void 0?Math.exp(ie):0,j=_.extendedBy({choiceIndex:Z.choiceIndex.toString()});return{completionText:q,insertText:he,range:No.range(ee,r),meanProb:z,meanLogProb:ie||0,requestId:Z.requestId,choiceIndex:Z.choiceIndex,telemetryData:j,copilotAnnotations:Z.copilotAnnotations}});return MGe(f,N[Symbol.asyncIterator]())}s(MFt,"launchSolutions");async function FGe(e,t){let r=await e;switch(r.status){case"Solution":await t.onSolution(r.solution),await FGe(r.next,t);break;case"FinishedNormally":await t.onFinishedNormally();break;case"FinishedWithError":await t.onFinishedWithError(r.error);break}}s(FGe,"reportSolutions");async function y$(e,t,r){return e.get(Ki).withProgress(async()=>{let i=MFt(e,t);return await FGe(i,r)})}s(y$,"runSolutions");async function MGe(e,t){if(e.isCancellationRequested)return{status:"FinishedWithError",error:"Cancelled"};let r=await t.next();return r.done===!0?{status:"FinishedNormally"}:{status:"Solution",solution:r.value,next:MGe(e,t)}}s(MGe,"generateSolutionsStream");var OGe=Ze(n5()),qB=Ze(cl());d();d();function C$(e,t){let r=e.split(`
`),n=t,i=t,o=r[t.line],a=o.indexOf("%");a!==-1&&(o=o.substring(0,a)+o.substring(a+1),n={line:t.line,character:a});let l=o.indexOf("^");if(l!==-1){let c=o.indexOf("^",l+1);if(c===-1)throw new Error("Challenge document must contain zero or two ^ characters.");o=o.substring(0,l)+o.substring(l+1,c)+o.substring(c+1),n={line:t.line,character:t.character},i={line:t.line,character:t.character+c-l-1}}return{cursorLine:o,lines:r,start:n,end:i}}s(C$,"parseChallengeDoc");var QFt=I.Object({text:I.String(),score:I.Number()}),OFt=I.Object({documents:I.Array(QFt),options:I.Optional(I.Object({}))});async function x$(e,t,r){let n=_r();for(let i=0;i<t.length&&i<10;i++){let{text:o,score:a}=t[i],{cursorLine:l,lines:c,start:u}=C$(o,e),f=[l.slice(Math.min(u.character,e.character))].concat(c.slice(e.line+1)).join(`
`);r.offset=c.slice(0,e.line).reduce((m,h)=>m+h.length+1,0)+u.character,await r.onSolution({requestId:{headerRequestId:n,completionId:_r(),created:0,serverExperiments:"",deploymentId:""},completionText:f,insertText:f,range:{start:e,end:e},meanProb:a,meanLogProb:-1,choiceIndex:i,telemetryData:ng.createEmptyConfigForTesting()})}await r.onFinishedNormally()}s(x$,"runTestSolutions");var ip=class{constructor(t){this.documents=t}static{s(this,"ExternalTestingPanelCompletionDocuments")}};function UFt(e,t,r){return e.forceSet(ip,new ip(r.documents)),["OK",null]}s(UFt,"handleTestingSetPanelCompletionDocumentsChecked");var QGe=st(OFt,UFt);var UGe=rF.type;function qFt(e,t,r,n,i){let o=A$(n.completionText),a=(0,OGe.SHA256)(o).toString();return e.get(ns).set(a,{displayText:n.completionText,insertText:n.insertText,offset:r,uuid:a,range:n.range,uri:t.textDocument.uri,telemetry:n.telemetryData.extendedBy({},{rank:i-1}),index:n.choiceIndex,position:t.position,resultType:0,triggerCategory:"solution",copilotAnnotations:n.copilotAnnotations}),{range:n.range,insertText:n.insertText,command:{command:Fue,title:`Accept completion ${i}`,arguments:[a]}}}s(qFt,"makeCompletion");function vde(e,t){return`${e}/${t}`}s(vde,"progressMessage");var xde=class{constructor(t,r,n){this.ctx=t;this.params=r;this.onCompletion=n;this.offset=0;this.count=0;this.items=new Map}static{s(this,"SolutionHandler")}get service(){return this.ctx.get(Wr)}async onSolution(t){this.count+=1;let r=qFt(this.ctx,this.params,this.offset,t,this.items.size+1);this.items.has(r.command.arguments[0])||(this.items.set(r.command.arguments[0],r),await this.onCompletion(r)),this.params.workDoneToken!==void 0&&await this.service.connection.sendProgress(qB.WorkDoneProgress.type,this.params.workDoneToken,{kind:"report",message:vde(this.count,w2),percentage:Math.round(100*this.count/w2)})}onFinishedNormally(){return WFt(this.params.workDoneToken,this.service,this.count)}async onFinishedWithError(t){if(this.error=t,this.params.workDoneToken!==void 0)return this.service.connection.sendProgress(qB.WorkDoneProgress.type,this.params.workDoneToken,{kind:"end",message:`Error: ${t}`})}};async function WFt(e,t,r=0){e!==void 0&&await t.connection.sendProgress(qB.WorkDoneProgress.type,e,{kind:"end",message:vde(r,w2)})}s(WFt,"reportDone");var UB;async function GFt(e,t,r){let n=await np(e,r.textDocument,t),i=r.position;r.workDoneToken!==void 0&&await e.get(Wr).connection.sendProgress(qB.WorkDoneProgress.type,r.workDoneToken,{kind:"begin",title:"GitHub Copilot Completions Panel",cancellable:!0,message:vde(0,w2),percentage:0});let o=[],a=s(f=>(o.push(f),Promise.resolve()),"onCompletion"),l=r.partialResultToken;l!==void 0&&(a=s(async f=>{await e.get(Wr).connection.sendProgress(rF.partialResult,l,{items:[f]})},"onCompletion"));let c=new xde(e,r,a),u=e.get(ip);if(u.documents){let f=u.documents;await x$(i,f,c)}else{c.offset=n.offsetAt(i);let f=new BT(n,i,t,w2);await y$(e,f,c)}return c.error!==void 0?[null,{code:nn.InternalError,message:c.error}]:[{items:o},null]}s(GFt,"handleChecked");async function HFt(e,t,r){UB&&(UB.cancel(),UB.dispose()),UB=new Mn.CancellationTokenSource;let n=UB.token,i=new Lu([t,n]);try{return await GFt(e,i,r)}catch(o){if(n.isCancellationRequested&&!t.isCancellationRequested)return[null,{code:nn.ServerCancelled,message:"Request was superseded by a new request"}];throw o}}s(HFt,"handleCheckedWithAbort");var qGe=st(y3e,HFt);d();d();d();function VFt(e){let t=e.get(ps).getLoginReachabilityUrl(),r=e.get(ps).getAPIUrl(),n=e.get(ps).getLastKnownEndpointUrl("proxy","_ping"),i=e.get(ps).getLastKnownEndpointUrl("api","_ping"),o=e.get(ps).getLastKnownEndpointUrl("telemetry","_ping");function a(l){return new URL(l).host}return s(a,"label"),[{label:a(t),url:t},{label:a(r),url:r},{label:a(n),url:n},{label:a(i),url:i},{label:a(o),url:o}]}s(VFt,"urlsToCheck");async function WGe(e){let t=VFt(e).map(async({label:r,url:n})=>{let{message:i,status:o}=await $Ft(e,n);return{label:r,url:n,message:i,status:o}});return await Promise.all(t)}s(WGe,"checkReachability");async function $Ft(e,t){try{let r=await e.get(fn).fetch(t,{}),n=r.status>=200&&r.status<400?"reachable":"unreachable";return{message:`HTTP ${r.status}`+(r.statusText?` - ${r.statusText}`:""),status:n}}catch(r){return{message:String(r),status:"unreachable"}}}s($Ft,"determineReachability");var xm=Ze(require("os")),DT=Ze(require("tls"));async function GGe(e){return{sections:[zFt(e),YFt(),await JFt(e),KFt(),XFt(e),await ZFt(e)]}}s(GGe,"collectDiagnostics");function HGe(e){return e.sections.map(eMt).join(xm.EOL+xm.EOL)}s(HGe,"formatDiagnosticsAsMarkdown");function zFt(e){return{name:"Copilot",items:{Version:rv(e),Build:Sd(e),Editor:Vu(e)["Editor-Version"]}}}s(zFt,"collectCopilotSection");function YFt(){return{name:"Environment",items:{http_proxy:_2("http_proxy"),https_proxy:_2("https_proxy"),no_proxy:_2("no_proxy"),SSL_CERT_FILE:_2("SSL_CERT_FILE"),SSL_CERT_DIR:_2("SSL_CERT_DIR"),OPENSSL_CONF:_2("OPENSSL_CONF")}}}s(YFt,"collectEnvironmentSection");function KFt(){return{name:"Node setup",items:{"Number of root certificates":DT.rootCertificates.length,"Operating system":xm.type(),"Operating system version":xm.release(),"Operating system architecture":xm.arch(),NODE_OPTIONS:_2("NODE_OPTIONS"),NODE_EXTRA_CA_CERTS:_2("NODE_EXTRA_CA_CERTS"),NODE_TLS_REJECT_UNAUTHORIZED:_2("NODE_TLS_REJECT_UNAUTHORIZED"),"tls default min version":DT.DEFAULT_MIN_VERSION,"tls default max version":DT.DEFAULT_MAX_VERSION}}}s(KFt,"collectNodeSection");async function JFt(e){let t={};try{let r=await e.get(en).getToken();t["Send Restricted Telemetry"]=r.getTokenValue("rt")==="1"?"enabled":"disabled",t.Chat=r.envelope?.chat_enabled?"enabled":void 0,t["Content exclusion"]=r.envelope?.copilotignore_enabled?"enabled":"unavailable"}catch{}return Object.keys(t).forEach(r=>t[r]===void 0&&delete t[r]),{name:"Feature Flags",items:t}}s(JFt,"collectFeatureFlagsSection");function XFt(e){let t=e.get(fn);return{name:"Network Configuration",items:{"Proxy host":t.proxySettings?.host,"Proxy port":t.proxySettings?.port,"Kerberos SPN":t.proxySettings?.kerberosServicePrincipal,"Reject unauthorized":t.rejectUnauthorized?"enabled":"disabled",Fetcher:t.name}}}s(XFt,"collectNetworkConfigSection");async function ZFt(e){return{name:"Reachability",items:Object.fromEntries((await WGe(e)).map(({label:r,status:n,message:i})=>[r,i]))}}s(ZFt,"collectReachabilitySection");function _2(e){let t=Object.keys(process.env).find(r=>r.toLowerCase()===e.toLowerCase());return t?process.env[t]:void 0}s(_2,"findEnvironmentVariable");function eMt(e){return`## ${e.name}`+xm.EOL+xm.EOL+Object.keys(e.items).filter(t=>t!=="name").map(t=>`- ${t}: ${e.items[t]??"n/a"}`).join(xm.EOL)}s(eMt,"formatSectionAsMarkdown");var tMt=I.Object({});async function rMt(e){return[{report:HGe(await GGe(e))},null]}s(rMt,"handleDiagnosticsChecked");var jGe=st(tMt,rMt);d();d();d();d();function VGe(e,t,r){function n(o,a,l){let c=new RegExp(`^(${a})+`,"g");return o.split(`
`).map(u=>{let f=u.replace(c,""),m=u.length-f.length;return l(m)+f}).join(`
`)}s(n,"replace");let i;if(e.tabSize===void 0||typeof e.tabSize=="string"?i=4:i=e.tabSize,e.insertSpaces===!1){let o=s(a=>n(a," ",l=>" ".repeat(Math.floor(l/i))+" ".repeat(l%i)),"r");t.displayText=o(t.displayText),t.completionText=o(t.completionText)}else if(e.insertSpaces===!0){let o=s(a=>n(a," ",l=>" ".repeat(l*i)),"r");if(t.displayText=o(t.displayText),t.completionText=o(t.completionText),r){let a=s(l=>{if(l==="")return l;let c=l.split(`
`)[0],u=c.length-c.trimStart().length,f=u%i;if(f!==0&&u>0){let m=" ".repeat(f);return n(l,m,h=>" ".repeat((Math.floor(h/i)+1)*i))}else return l},"re");t.displayText=a(t.displayText),t.completionText=a(t.completionText)}}return t}s(VGe,"normalizeIndentCharacter");function $Ge(e,t,r,n,i,o,a){let l=n.lineAt(i),c=t.map(u=>{let f=No.range(No.position(i.line,0),No.position(i.line,i.character+u.suffixCoverage)),m="";if(o&&(u.completion=VGe(o,u.completion,l.isEmptyOrWhitespace)),l.isEmptyOrWhitespace&&(u.completion.displayNeedsWsOffset||u.completion.completionText.startsWith(l.text)))m=u.completion.completionText;else{let p=No.range(f.start,i);m=n.getText(p)+u.completion.displayText}return{uuid:_r(),insertText:m,range:f,uri:n.uri,index:u.completion.completionIndex,telemetry:u.telemetry,displayText:u.completion.displayText,position:i,offset:n.offsetAt(i),resultType:r,copilotAnnotations:u.copilotAnnotations}});if(r===2&&a!==void 0){let u=c.find(f=>f.index===a);if(u){let f=c.filter(m=>m.index!==a);c=[u,...f]}}return c}s($Ge,"completionsFromGhostTextResults");async function bde(e,t,r,n={}){let i=0;n.selectedCompletionInfo?.text&&!n.selectedCompletionInfo.text.includes(")")&&(t=t.addSelectedCompletionInfo(n.selectedCompletionInfo),i=t.position.character-n.selectedCompletionInfo.range.end.character);let o=await Zne(e,t,r,n);if(o.type!=="success")return o;let[a,l]=o.value;if(r?.isCancellationRequested)return{type:"canceled",reason:"after getGhostText",telemetryData:{telemetryBlob:o.telemetryBlob}};let c=yTe(e,t.textDocument,t.position,l),u=$Ge(e,a,l,t.textDocument,t.position,n.formattingOptions,c);if(u.length===0)return{type:"empty",reason:"no completions in final result",telemetryData:o.telemetryData};let f=u.map(m=>{let{start:h,end:p}=m.range,g=Mn.Range.create(h,Mn.Position.create(p.line,p.character-i));return{...m,range:g}});return{...o,value:f}}s(bde,"getInlineCompletionsResult");async function v$(e,t,r,n,i={}){nMt(e,t,r);let o=await bde(e,yg(t,r),n,i);return D8e(e,o)}s(v$,"getInlineCompletions");function nMt(e,t,r){let n=t.getText({start:{line:Math.max(r.line-1,0),character:0},end:r}),i=t.getText({start:r,end:{line:Math.min(r.line+2,t.lineCount-1),character:t.lineCount-1>r.line?0:r.character}});_O.debug(e,`Requesting for ${t.uri} at ${r.line}:${r.character}`,`between ${JSON.stringify(n)} and ${JSON.stringify(i)}.`)}s(nMt,"logCompletionLocation");var ZGe=Ze(cl());d();var zGe=require("crypto");var PT=class{static{s(this,"LspClientContextProvider")}constructor(t,r,n){this.id=r,this.selector=n,this.resolver=new Ide(t,this.id)}},Ide=class{constructor(t,r){this.ctx=t;this.id=r;this.contextItems=[];this.update=!1}static{s(this,"LspClientContextResolver")}async resolve(t,r){let n=[];if(this.contextItems.length>0)n=this.contextItems;else if(this.update){let i=this.ctx.get(Wr),o=(0,zGe.randomUUID)(),a=i.connection.onProgress(ZL.type,o,l=>{n.push(...l)});r.onCancellationRequested(()=>{a?.dispose()});try{let l=await i.connection.sendRequest(ZL.type,{providerId:this.id,data:this.data,textDocument:{uri:t.documentContext.uri,languageId:t.documentContext.languageId,version:t.documentContext.version},position:t.documentContext.position,partialResultToken:o},r);n.push(...l)}finally{a?.dispose()}}return this.reset(),Promise.resolve(n)}setContextItems(t){this.contextItems=t}clearContextItems(){this.contextItems=[]}setUpdate(t){this.update=t}clearData(){this.data=void 0}reset(){this.clearContextItems(),this.clearData(),this.setUpdate(!1)}};function NT(e,t,r){try{let n=e.get(ul),i=new Map;n.providers.forEach(o=>{i.set(o.id,o)}),t.providers.forEach(o=>{let a=i.get(o.id);a&&a instanceof PT&&a.resolver.setContextItems(o.contextItems)}),t.updating&&t.updating.length>0&&t.updating.forEach(o=>{let a=i.get(o);a&&a instanceof PT&&(a.resolver.setUpdate(!0),a.resolver.data=r)})}catch(n){kn.error(e,"Failed to set context items on context providers",n)}}s(NT,"setContextItems");var Ede={nocase:!0,matchBase:!0,nonegate:!0,dot:!0};async function YGe(e,t,r){return t.map(i=>{try{if(typeof i=="string")return wa(r.uri,i,Ede);if(typeof i=="object"){let o=!0;return"language"in i&&(o&&=r.languageId==(i.language||"")),"scheme"in i&&(o&&=wa(r.uri,i.scheme||"",Ede)),"pattern"in i&&(o&&=wa(r.uri,i.pattern||"",Ede)),o}}catch{return!1}return!1}).some(Boolean)?10:0}s(YGe,"match");d();var iMt=I.Object({documents:I.Array(I.String()),basename:I.Optional(I.String()),options:I.Optional(I.Object({}))}),I3=class{constructor(t,r){this.documents=t;this.basename=r}static{s(this,"ExternalTestingCompletionDocuments")}};function oMt(e,t,r){return e.forceSet(I3,new I3(r.documents,r.basename||"")),["OK",null]}s(oMt,"handleTestingSetCompletionDocumentsChecked");var KGe=new Gt("setCompletionDocuments"),XGe=st(iMt,oMt);function b$(e,t,r,n){let i=e.get(I3);if(i.documents){let o=n?3:1;if(r&&i.basename&&i.basename.trim().length>0){KGe.debug(e,`Returning filtered completions by basename ${i.basename}`);let a=sMt(i,r);return a&&a.length>0?JGe(a,o,t):void 0}else return KGe.debug(e,"Returning completions for all pre-set documents"),JGe(i.documents,o,t)}}s(b$,"getTestCompletions");function JGe(e,t,r){return e.slice(0,t).map(n=>{let{cursorLine:i,lines:o,start:a,end:l}=C$(n,r);return{insertText:[i.slice(Math.min(a.character,r.character))].concat(o.slice(r.line+1)).join(`
`),range:{start:a,end:l}}})}s(JGe,"sliceAndMapCompletions");function sMt(e,t){return e.basename===Pi(t)?e.documents||[]:[]}s(sMt,"getFilteredDocs");var eHe=I.Object({doc:I.Object({position:wl,insertSpaces:I.Optional(I.Boolean()),tabSize:I.Optional(I.Number()),uri:g_,version:I.Number()}),contextItems:I.Optional(ene)}),WB;async function tHe(e,t,r,n){WB&&(WB.cancel(),WB.dispose()),WB=new Mn.CancellationTokenSource;let i=new Lu([t,WB.token]);r.contextItems&&NT(e,r.contextItems);let o=b$(e,r.doc.position,r.doc.uri,n);if(o)return[{completions:o.map(h=>({uuid:_r(),text:h.insertText,displayText:h.insertText,position:r.doc.position,range:h.range,docVersion:r.doc.version}))},null];let a;try{a=await np(e,r.doc,i)}catch(m){if(!(m instanceof ZGe.ResponseError))throw m;switch(m.code){case nn.CopilotNotAvailable:case nn.ContentModified:return[{completions:[]},null]}throw m}let l=r.doc.position,c=await v$(e,a,l,i,{isCycling:n,formattingOptions:r.doc});if(!c)return[{completions:[]},null];let u=e.get(ns);for(let m of c)u.set(m.uuid,{...m,triggerCategory:"ghostText"});return[{completions:c.map(m=>({uuid:m.uuid,text:m.insertText,range:m.range,displayText:m.displayText,position:m.position,docVersion:a.version}))},null]}s(tHe,"handleGetCompletionsHelper");var rHe=st(eHe,(e,t,r)=>tHe(e,t,r,!1)),nHe=st(eHe,(e,t,r)=>tHe(e,t,r,!0));d();var iHe=Ze(n5()),LT=Ze(cl());var aMt=I.Object({doc:I.Object({position:wl,uri:g_,version:I.Number()}),panelId:I.String()});function lMt(e,t,r,n,i){let o=A$(i.completionText),a=(0,iHe.SHA256)(o).toString();return e.get(ns).set(a,{displayText:i.insertText,insertText:i.completionText,offset:n,uuid:a,range:r,uri:t.doc.uri,telemetry:i.telemetryData,index:i.choiceIndex,position:r.end,resultType:0,triggerCategory:"solution",copilotAnnotations:i.copilotAnnotations}),{panelId:t.panelId,range:r,completionText:i.completionText,displayText:i.insertText,score:i.meanProb,solutionId:a}}s(lMt,"makeSolution");var Tde=class{constructor(t,r,n){this.ctx=t;this.params=r;this.range=n;this.offset=0}static{s(this,"SolutionHandler")}get service(){return this.ctx.get(Wr)}onSolution(t){return this.service.connection.sendNotification(new LT.NotificationType("PanelSolution"),lMt(this.ctx,this.params,this.range,this.offset,t))}onFinishedNormally(){return oHe(this.params.panelId,this.service)}onFinishedWithError(t){return this.service.connection.sendNotification(new LT.NotificationType("PanelSolutionsDone"),{status:"Error",message:t,panelId:this.params.panelId})}};async function oHe(e,t){return t.connection.sendNotification(new LT.NotificationType("PanelSolutionsDone"),{status:"OK",panelId:e})}s(oHe,"reportDone");var GB;async function cMt(e,t,r){GB&&(GB.cancel(),GB.dispose()),GB=new Mn.CancellationTokenSource;let n=new Lu([t,GB.token]),i=r.doc.position,o=No.range(i,i),a=new Tde(e,r,o),l=e.get(ip);if(l.documents){let c=l.documents;x$(i,c,a)}else{let c;try{c=await np(e,r.doc,n)}catch(f){if(!(f instanceof LT.ResponseError))throw f;switch(f.code){case nn.CopilotNotAvailable:case nn.ContentModified:return uMt(e,r)}throw f}a.offset=c.offsetAt(i);let u=new BT(c,i,n,w2);y$(e,u,a)}return[{solutionCountTarget:w2},null]}s(cMt,"handleGetPanelCompletionsChecked");async function uMt(e,t){return await oHe(t.panelId,e.get(Wr)),[{solutionCountTarget:0},null]}s(uMt,"produceEmptySolutions");var sHe=st(aMt,cMt);d();var fMt=I.Object({});function dMt(e,t,r){return[{version:e.get(po).getDisplayVersion(),buildType:Sd(e),runtimeVersion:`node/${process.versions.node}`},null]}s(dMt,"handleGetVersionChecked");var aHe=st(fMt,dMt);d();var mMt=I.Object({changes:I.Array(I.String()),userCommits:I.Array(I.String()),recentCommits:I.Array(I.String()),workspaceFolder:I.Optional(I.String()),userLanguage:I.Optional(I.String())});async function hMt(e,t){let r=["You are an AI programming assistant, helping a software developer to come up with the best git commit message for their code changes.","You excel in interpreting the purpose behind code changes to craft succinct, clear commit messages that adhere to the repository's guidelines.","","# First, think step-by-step:","1. Analyze the CODE CHANGES thoroughly to understand what's been modified.","2. Identify the purpose of the changes to answer the *why* for the commit messages, also considering the optionally provided RECENT USER COMMITS.","3. Review the provided RECENT REPOSITORY COMMITS to identify established commit message conventions. Focus on the format and style, ignoring commit-specific details like refs, tags, and authors.","4. Generate a thoughtful and succinct commit message for the given CODE CHANGES. It MUST follow the established writing conventions.","5. Remove any meta information like issue references, tags, or author names from the commit message. The developer will add them.","6. Now only show your message, wrapped with a single markdown ```text codeblock! Do not provide any explanations or details"];return t&&r.push(`
Current git branch name: ${t}`),e&&r.push(`
Respond in the following locale: ${e}`),r.join(`
`)}s(hMt,"buildSystemMessage");function pMt(e,t){let r=[];return e.userCommits.length>0&&r.push("# RECENT USER COMMITS (For reference only, do not copy!):",e.userCommits.map(n=>`- ${n}`).join(`
`),""),e.recentCommits.length>0&&r.push("# RECENT REPOSITORY COMMITS (For reference only, do not copy!):",e.recentCommits.map(n=>`- ${n}`).join(`
`),""),r.push("# CODE CHANGES:",e.changes.join(`
`),"","<reminder>","Now generate a commit message that describes the CODE CHANGES.","DO NOT COPY commits from RECENT COMMITS, but use them as reference for the commit style.","ONLY return a single markdown code block, NO OTHER PROSE!","```text","commit message goes here","```","</reminder>"),t&&r.push("<custom-instructions>",t,"</custom-instructions>"),r.join(`
`)}s(pMt,"buildUserMessage");async function gMt(e,t,r){if(r.changes.length===0)return[null,{code:nn.InvalidRequest,message:"No changes provided"}];let n=new ka(e),i=await yo.getModelConfiguration(e,"gitCommit"),o=[{uri:r.workspaceFolder?r.workspaceFolder:ll(process.cwd())}],a=await ET.getInstructions(e,o,{includeCodeGenerationInstructions:!1,includeCommitMessageGenerationInstructions:!0,customIntroduction:"When generating the commit message, please use the following custom instructions provided by the user."}),l=e.get(Hi),c=l.create({capabilities:{skills:[f1]}}),u=new p3({message:"",type:"user"});await l.addTurn(c.id,u);let f=_T({workDoneToken:_r()});await e.get(_s).begin(c,u,f);let p=(await new b3(e,c,u,t).skillResolver.resolve(f1))?.head?.name,g=[{role:"system",content:await hMt(r.userLanguage,p)},{role:"user",content:pMt(r,a)}],y=await e.get(or).updateExPValuesAndAssignments(),x=await n.fetchResponse({modelConfiguration:i,messages:g,uiKind:"conversationPanel",intentParams:{intent:!0},llmInteraction:Nu.user("git-commit",_r())},t,y);if(x.type!=="success")return[null,{code:nn.InternalError,message:"Failed to generate commit message"}];let b=x.value.match(/```text\n([\s\S]*?)\n```/);return[{commitMessage:b?b[1].trim():x.value.trim()},null]}s(gMt,"handleGitCommitGenerateChecked");var lHe=Io(st(mMt,gMt));d();var uHe=_Z.type,HB;function cHe(e){return{title:"Completion Accepted",command:CB,arguments:[e]}}s(cHe,"makeCommand");async function AMt(e,t,r){HB&&(HB.cancel(),HB.dispose());let n=r.context.triggerKind===1;HB=new Mn.CancellationTokenSource;let i=HB.token,o=new Lu([t,i]);r.contextItems&&NT(e,r.contextItems,r.data);let a=b$(e,r.position,r.textDocument.uri,n);if(a)return[{items:a.map(p=>({command:cHe(_r()),...p}))},null];let l=await np(e,r.textDocument,o),c=r.position,u=await v$(e,l,c,o,{isCycling:n,selectedCompletionInfo:r.context.selectedCompletionInfo,formattingOptions:r.formattingOptions,data:r.data});if(!u)return t.isCancellationRequested?[null,{code:nn.RequestCancelled,message:"Request was canceled"}]:i.isCancellationRequested?[null,{code:nn.ServerCancelled,message:"Request was superseded by a new request"}]:[{items:[]},null];let f=e.get(ns);for(let h of u)f.set(h.uuid,{...h,triggerCategory:"ghostText"});return[{items:u.map(h=>({command:cHe(h.uuid),insertText:h.insertText,range:h.range}))},null]}s(AMt,"handleChecked");var fHe=st(kO,(e,t,r)=>AMt(e,t,r));d();var dHe=kZ.type,jB;async function CMt(e,t,r){jB&&(jB.cancel(),jB.dispose());let n=r.context.triggerKind===1;jB=new Mn.CancellationTokenSource;let i=jB.token,o=new Lu([t,i]);r.contextItems&&NT(e,r.contextItems);let a=await np(e,r.textDocument,o),l=await bde(e,yg(a,r.position),o,{promptOnly:!0,isCycling:n,selectedCompletionInfo:r.context.selectedCompletionInfo,formattingOptions:r.formattingOptions,data:r.data});if(l.type!=="promptOnly")throw new Error(`Unexpected result type ${l.type}`);return[{prompt:l.prompt},null]}s(CMt,"handleChecked");var mHe=st(kO,(e,t,r)=>CMt(e,t,r));d();d();function wde(e){let t=e.indexOf("-----BEGIN CERTIFICATE-----")+27,r=e.indexOf("-----END CERTIFICATE-----"),n=30,i=e.substring(t,t+n)+"..."+e.substring(r-n,r-1);return FT(i)}s(wde,"asReadableCert");function FT(e){return e.replace(/\s/g,"")}s(FT,"normalizeNewlines");var vMt=I.Object({});async function bMt(e){return[{certificates:(await e.get(Xa).getAllRootCAs()).map(FT)},null]}s(bMt,"handleListCertificatesChecked");var hHe=st(vMt,bMt);d();async function EMt(e,t,r){let n=e.get(Kh);if(r.textDocument.version===void 0)throw new Error("textDocument.version is undefined");let i=ac(r.textDocument.uri);e.get(Xg).onUserPositionChange(i,new mn(r.position.line,r.position.character));let o=await n.handleNextEditRequest(i,r.textDocument.version,t);return o?[{edits:o.map(l=>({text:l.edit.text,textDocument:l.edit.textDocument,range:l.edit.range,command:{title:"Accept inline edit",command:CB,arguments:[l.id]}}))},null]:[{edits:[]},null]}s(EMt,"handleChecked");var pHe=st(g3e,EMt);d();var IMt=I.Object({uuid:I.String({minLength:1}),acceptedLength:I.Optional(I.Number({minimum:1}))});function TMt(e,t,r){let n=e.get(ns),i=n.get(r.uuid);if(i){n.delete(r.uuid);let o=wMt(r,i);$v(e,i.triggerCategory,i.insertText,i.offset,i.uri,i.telemetry,o,i.copilotAnnotations)}return["OK",null]}s(TMt,"notifyAcceptedChecked");function wMt(e,t){return e.acceptedLength===void 0?{compType:"full"}:e.acceptedLength<t.insertText.length?{compType:"partial",acceptedLength:e.acceptedLength}:{compType:"full"}}s(wMt,"getSuggestionStatus");var gHe=st(IMt,TMt);d();var _Mt=I.Object({uuids:I.Array(I.String())});function SMt(e,t,r){let n=e.get(ns),i=r.uuids.flatMap(o=>n.get(o)??[]);if(i.length>0){let o=i[0];for(let l of r.uuids)n.delete(l);let a=i.map(l=>({completionText:l.displayText,completionTelemetryData:l.telemetry}));TU(e,"ghostText",o.offset,o.uri,a),e.get(w0).resetState()}return["OK",null]}s(SMt,"notifyRejectedChecked");var AHe=st(_Mt,SMt);d();var RMt=I.Object({uuid:I.String({minLength:1})});function kMt(e,t,r){let i=e.get(ns).get(r.uuid);return i&&SO(e,i.triggerCategory,i),["OK",null]}s(kMt,"notifyShownChecked");var yHe=st(RMt,kMt);d();var BMt=G8e;function DMt(e,t,r){let n=e.get(ul),i={unregistered:[],registered:[]};return r.providers.forEach(o=>{try{let a=new PT(e,o.id,o.selector);n.registerContextProvider(a),i.registered.push(o.id)}catch{i.unregistered.push(o.id)}}),[i,null]}s(DMt,"registerContextProviders");var CHe=st(BMt,DMt);d();d();var xHe=require("net");function _de(e){return e.HTTPS_PROXY||e.https_proxy||e.HTTP_PROXY||e.http_proxy}s(_de,"getProxyFromEnvironment");function PMt(e){return e.NODE_TLS_REJECT_UNAUTHORIZED!=="0"}s(PMt,"getRejectUnauthorizedFromEnvironment");var vHe=I.Object({proxy:I.Optional(I.String()),proxyStrictSSL:I.Optional(I.Boolean()),proxyAuthorization:I.Optional(I.String()),proxyKerberosServicePrincipal:I.Optional(I.String())});function bHe(e){let r={proxy:_de(e),proxyStrictSSL:PMt(e)},n=e.GH_COPILOT_KERBEROS_SERVICE_PRINCIPAL??e.GITHUB_COPILOT_KERBEROS_SERVICE_PRINCIPAL??e.AGENT_KERBEROS_SERVICE_PRINCIPAL;return n&&(r.proxyKerberosServicePrincipal=n),r}s(bHe,"getHttpSettingsFromEnvironment");function VB(e){(0,xHe.isIPv6)(e)?e="https://["+e+"]":/:\/\//.test(e)||(e=`https://${e}`);let{hostname:t,port:r,username:n,password:i}=new URL(e);return{host:t,port:NMt(r),proxyAuth:LMt(n,i)}}s(VB,"proxySettingFromUrl");function NMt(e){if(!e)return 80;let t=Number(e);if(isNaN(t))throw new TypeError("Invalid proxy port");return t}s(NMt,"parsePort");function LMt(e,t){return!e||!t?"":`${decodeURIComponent(e)}:${decodeURIComponent(t)}`}s(LMt,"getAuth");d();var Rde=I.Object({host:I.String(),port:I.Number(),username:I.Optional(I.String()),password:I.Optional(I.String()),rejectUnauthorized:I.Optional(I.Boolean())}),FMt=I.Object({uri:I.Optional(I.String())}),MMt=I.Object({showEditorCompletions:I.Optional(I.Boolean()),enableAutoCompletions:I.Optional(I.Boolean()),delayCompletions:I.Optional(I.Boolean()),filterCompletions:I.Optional(I.Boolean())}),IHe=I.Object({github:I.Optional(I.Object({copilot:I.Optional(I.Object({}))})),"github-enterprise":I.Optional(FMt),http:I.Optional(vHe),telemetry:I.Optional(I.Object({telemetryLevel:I.Optional(I.String())}))}),kde=Object.keys(IHe.properties).filter(e=>e!=="github"),QMt=I.Intersect([IHe,MMt]),OMt=I.Object({settings:I.Optional(I.Union([I.Object({}),I.Array(I.Unknown(),{maxItems:0})])),networkProxy:I.Optional(Rde),authProvider:I.Optional(I.Never())}),EHe=hs.Compile(OMt),Sde=hs.Compile(QMt);async function THe(e,t){if(!EHe.Check(t))throw new Cc(EHe.Errors(t));let r=Array.isArray(t.settings)?{}:t.settings;r&&await Bde(e,r),t.networkProxy!==void 0&&E$(e,t.networkProxy),await $B(e,r)}s(THe,"notifyChangeConfiguration");async function Bde(e,t){for(let i of Sde.Errors(t)){let o=i.path.split("/")?.[1];bc.warn(e,`Invalid ${i.path.slice(1).replace(/\//g,".")} setting:`,i.message),delete t[o]}if(!Sde.Check(t))throw new Cc(Sde.Errors(t));let r=e.get(Vf);r.setConfig(Rt.ShowEditorCompletions,t.showEditorCompletions),r.setConfig(Rt.DelayCompletions,t.delayCompletions),r.setConfig(Rt.EnableAutoCompletions,t.enableAutoCompletions),r.setConfig(Rt.FilterCompletions,t.filterCompletions),t.http&&Dde(e,t.http);let n=t["github-enterprise"];n&&(e.get(ps).updateBaseUrl(e,n.uri),e.get(Bn).updateEnterpriseConfig(e,n)),t.github?.copilot&&await UMt(e,t.github.copilot)}s(Bde,"applySettingsToConfiguration");async function UMt(e,t){let r=e.get(Vf);for(let n of Object.values(Rt)){let i=qve(t,n);r.setConfig(n,i)}t.mcp?await GMt(e,t.mcp):await HMt(e),t.globalCopilotInstructions&&qMt(e,t.globalCopilotInstructions),t.globalGitCommitInstructions&&WMt(e,t.globalGitCommitInstructions)}s(UMt,"applyCopilotConfiguration");function qMt(e,t){try{e.get(Gg).setGlobalCopilotInstructions(t)}catch(r){bc.error(e,"Failed to apply global Copilot instructions configuration",r)}}s(qMt,"applyGlobalCopilotInstructionsConfiguration");function WMt(e,t){try{e.get(Gg).setGlobalGitCommitInstructions(t)}catch(r){bc.error(e,"Failed to apply global Git commit instructions configuration",r)}}s(WMt,"applyGlobalGitCommitInstructionsConfiguration");function Dde(e,t){let r=e.get(Vf),n=e.get(fn);if(t.proxy===void 0&&(t=bHe(r.env)),n.rejectUnauthorized=t?.proxyStrictSSL,!t.proxy){n.proxySettings=void 0;return}try{n.proxySettings=VB(t.proxy),t.proxyAuthorization&&(n.proxySettings.proxyAuth=t.proxyAuthorization),t.proxyKerberosServicePrincipal&&(n.proxySettings.kerberosServicePrincipal=t.proxyKerberosServicePrincipal)}catch(i){if(!(i instanceof TypeError))throw i;bc.warn(e,"Invalid proxy URL",t.proxy,i),n.proxySettings=void 0}}s(Dde,"applyHttpConfiguration");function E$(e,t){if(!t){e.get(fn).proxySettings=void 0,e.get(fn).rejectUnauthorized=void 0;return}let r;t.username&&(t.password?r=t.username+":"+t.password:r=t.username),e.get(fn).proxySettings={host:t.host,port:t.port,proxyAuth:r},e.get(fn).rejectUnauthorized=t.rejectUnauthorized??!0}s(E$,"applyNetworkProxyConfiguration");async function GMt(e,t){try{let r=JSON.parse(t);await e.get(Qf).updateMCPServers(r)}catch(r){bc.error(e,"Failed to apply MCP configuration",r)}}s(GMt,"applyMCPConfiguration");async function HMt(e){await e.get(Qf).updateMCPServers({})}s(HMt,"removeMCPConfiguration");async function $B(e,t){if(!e.get(Go).getCapabilities().redirectedTelemetry){let r=(t?.telemetry?.telemetryLevel??"all")==="all";await w5(e,"agent",r)}await e.get(en).primeToken()}s($B,"initializePostConfigurationDependencies");var wHe=I.Object({name:I.String(),version:I.String(),readableName:I.Optional(I.String())}),jMt=I.Object({editorInfo:wHe,editorPluginInfo:wHe,editorConfiguration:I.Optional(I.Object({})),networkProxy:I.Optional(Rde),authProvider:I.Optional(I.Never()),redirectTelemetry:I.Optional(I.Boolean()),options:I.Optional(I.Object({}))});async function VMt(e,t,r){e.get(gn).setEditorAndPluginInfo(r.editorPluginInfo,r.editorInfo),Ij(e,["setEditorInfo is deprecated. Use initializationOptions for editorInfo and editorPluginInfo","and workspace/didChangeConfiguration for editorConfiguration."]),r.editorConfiguration&&await Bde(e,r.editorConfiguration);let n=e.get(fn),i=e.get(Vf).env,o=_de(i);if(r.editorInfo.name==="VisualStudio"){if(o)n.proxySettings=VB(o);else if(r.networkProxy){E$(e,r.networkProxy);let a=i.GH_COPILOT_KERBEROS_SERVICE_PRINCIPAL??i.GITHUB_COPILOT_KERBEROS_SERVICE_PRINCIPAL??i.AGENT_KERBEROS_SERVICE_PRINCIPAL;n.proxySettings&&a&&(n.proxySettings.kerberosServicePrincipal??=a)}}else r.networkProxy?E$(e,r.networkProxy):o&&(n.proxySettings=VB(o));return await $B(e,r.editorConfiguration),["OK",null]}s(VMt,"handleSetEditorInfoChecked");var _He=st(jMt,VMt);d();var $Mt=I.Object({options:I.Optional(I.Object({}))});async function zMt(e,t,r){let n=e.get(Bn).pendingSignIn?.status;if(n===void 0)return[null,{code:nn.InvalidRequest,message:"No pending sign in"}];let i;try{return i=await n,[i,null]}catch(o){return[null,{code:nn.DeviceFlowFailed,message:String(o)}]}finally{e.get(Bn).pendingSignIn=void 0}}s(zMt,"handleSignInConfirmChecked");var SHe=st($Mt,zMt);d();var YMt=I.Object({options:I.Optional(I.Object({})),githubAppId:I.Optional(I.String())});async function KMt(e,t,r){try{let n=e.get(Bn),i=await n.checkAndUpdateStatus(e,{githubAppId:r.githubAppId});if(i.status==="OK")return[{status:"AlreadySignedIn",user:i.user},null];let o=r.githubAppId??e.get(Ia).findAppIdToAuthenticate(),a=await e.get(Dv).getToken(e,o,n.getConfiguredUrls()),l=a.waitForAuth.then(async c=>(e.get(Ia).githubAppId=o,await e.get(Bn).setPersistedSession(c),await e.get(Bn).checkAndUpdateStatus(e,{freshSignIn:!0})));return e.get(Bn).pendingSignIn={verificationUri:a.verification_uri,status:l},[{status:"PromptUserDeviceFlow",userCode:a.user_code,verificationUri:a.verification_uri,expiresIn:a.expires_in,interval:a.interval,command:{command:Fj,title:"Sign in with GitHub",arguments:[]}},null]}catch(n){if(!(n instanceof as))throw n;return[null,{code:nn.DeviceFlowFailed,message:n.message}]}}s(KMt,"handleSignInInitiateChecked");var Pde=st(YMt,KMt);d();var JMt=I.Object({githubToken:I.String({minLength:1}),user:I.String({minLength:1}),githubAppId:I.Optional(I.String({minLength:1}))});async function XMt(e,t,r){let n=r.githubToken,i=r.user,o=r.githubAppId;return await e.get(Bn).setPersistedSession({accessToken:n,login:i,githubAppId:o}),[await e.get(Bn).checkAndUpdateStatus(e),null]}s(XMt,"handleSignInWithGithubTokenChecked");var RHe=st(JMt,XMt);d();var ZMt=I.Object({options:I.Optional(I.Object({}))});async function eQt(e,t,r){return await e.get(Bn).deletePersistedSession(),[await e.get(Bn).checkAndUpdateStatus(e),null]}s(eQt,"handleSignOutChecked");var kHe=st(ZMt,eQt);d();var tQt=I.Object({});function rQt(e,t,r){return v4e(e),["OK",null]}s(rQt,"handleTelemetryAuthNotifyDismissedChecked");var BHe=st(tQt,rQt);d();var nQt=I.Object({authSource:I.Union([I.Literal("toast"),I.Literal("goldbar"),I.Literal("menu")])});function iQt(e,t,r){return x4e(e,r.authSource),["OK",null]}s(iQt,"handleTelemetryAuthNotifyShownChecked");var DHe=st(nQt,iQt);d();var oQt=I.Object({authType:I.Union([I.Literal("editorAuth"),I.Literal("deviceFlow")])});function sQt(e,t,r){return JQ(e,r.authType),["OK",null]}s(sQt,"handleTelemetryGitHubLoginSuccessChecked");var PHe=st(oQt,sQt);d();var aQt=I.Object({authSource:I.Union([I.Literal("toast"),I.Literal("goldbar"),I.Literal("menu")]),authType:I.Union([I.Literal("editorAuth"),I.Literal("deviceFlow")])});function lQt(e,t,r){return KQ(e,r.authSource,r.authType),["OK",null]}s(lQt,"handleTelemetryNewGitHubLoginChecked");var NHe=st(aQt,lQt);d();var cQt=I.Object({transaction:I.Optional(I.String()),stacktrace:I.Optional(I.String()),properties:I.Optional(I.Record(I.String(),I.String())),platform:I.Optional(I.String()),exception_detail:I.Optional(I.Array(I.Object({type:I.Optional(I.String()),value:I.Optional(I.String()),stacktrace:I.Optional(I.Array(I.Object({filename:I.Optional(I.String()),lineno:I.Optional(I.Union([I.String(),I.Integer()])),colno:I.Optional(I.Union([I.String(),I.Integer()])),function:I.Optional(I.String()),in_app:I.Optional(I.Boolean())})))})))}),Nde=class extends Error{constructor(r,n){super(r);this.code=n;this.name="AgentEditorError"}static{s(this,"AgentEditorError")}};function uQt(e,t,r){let n=e.get(po),i=e.get(gn).getEditorPluginInfo(),o=r.properties||{},a;r.platform&&r.exception_detail&&s1.has(i.name)&&(a=Object.assign({rollup_id:"auto",context:NZ(e),sensitive_context:{},deployed_to:n.getBuildType(),platform:r.platform,exception_detail:r.exception_detail},s1.get(i.name)),r.transaction&&(a.transaction=r.transaction),n.getBuildType()!=="dev"&&(a.release=`${a.app}@${i.version}`));let l=new Nde(r.stacktrace??"N/A",i.name);return l.stack=void 0,Ea(e,l,void 0,o,a),["OK",null]}s(uQt,"handleTelemetryExceptionChecked");var LHe=st(cQt,uQt);d();d();d();d();d();d();var FHe=Ze(require("tls"));var I$=class{static{s(this,"RootCertificateConfigurator")}#e;constructor(t){this._certificateReader=t.get(Xa)}async enhanceProxySettings(t){let r=await this.getCertificates();return{...t,ca:r}}async getCertificates(){let t=await this._certificateReader.getAllRootCAs();if(t.length!==0)return t}async createSecureContext(){let t=await this._certificateReader.getAllRootCAs(),n=FHe.createSecureContext({_vscodeAdditionalCaCerts:t}),i=n.context;for(let o of t)i.addCACert(o);return{secureContext:n,certs:t}}async applyToRequestOptions(t){this.#e??=this.createSecureContext();let r=await this.#e;t.secureContext=r.secureContext,t.ca=r.certs,t.cert=r.certs}};d();var HT=Ze(Jje(),1),Xjn={ALPN_HTTP2:HT.default.ALPN_HTTP2,ALPN_HTTP2C:HT.default.ALPN_HTTP2C,ALPN_HTTP1_1:HT.default.ALPN_HTTP1_1,ALPN_HTTP1_0:HT.default.ALPN_HTTP1_0},{fetch:Zjn,context:Xje,reset:eVn,noCache:tVn,h1:rVn,keepAlive:nVn,h1NoCache:iVn,keepAliveNoCache:oVn,cacheStats:sVn,clearCache:aVn,offPush:lVn,onPush:cVn,createUrl:uVn,timeoutSignal:fVn,Body:dVn,Headers:Zje,Request:mVn,Response:hVn,AbortController:j$,AbortError:V$,AbortSignal:eVe,FetchBaseError:pVn,FetchError:gVn,ALPN_HTTP2:AVn,ALPN_HTTP2C:yVn,ALPN_HTTP1_1:CVn,ALPN_HTTP1_0:xVn}=HT.default;var jT=class extends fn{constructor(r){super();this.ctx=r;this.name="HelixFetcher";this.createSocketFactory=s((r,n)=>async i=>{i.rejectUnauthorized=n,i.timeout=r.connectionTimeoutInMs,await this.certificateConfigurator.applyToRequestOptions(i);let o=await this.certificateConfigurator.enhanceProxySettings(r);return await this.proxySocketFactory.createSocket(i,o)},"createSocketFactory");this.fetchApi=this.createFetchApi(r),this.certificateConfigurator=new I$(r),this.proxySocketFactory=r.get(Ug)}static{s(this,"HelixFetcher")}set proxySettings(r){this._proxySettings=r,this.fetchApi=this.createFetchApi(this.ctx)}get proxySettings(){return this._proxySettings}set rejectUnauthorized(r){super.rejectUnauthorized=r,this.fetchApi=this.createFetchApi(this.ctx)}get rejectUnauthorized(){return super.rejectUnauthorized}createFetchApi(r){let n=r.get(po);return super.rejectUnauthorized===!1&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED="0"),Xje({userAgent:`GithubCopilot/${n.getVersion()}`,socketFactory:this._proxySettings?this.createSocketFactory(this._proxySettings,super.rejectUnauthorized):void 0,rejectUnauthorized:super.rejectUnauthorized})}async fetch(r,n){let i=n.signal,o=!1;if(n.timeout){let u=this.makeAbortController();setTimeout(()=>{u.abort(),o=!0},n.timeout),n.signal?.addEventListener("abort",()=>u.abort()),n.signal?.aborted&&u.abort(),i=u.signal}let a={...n,body:n.body?n.body:n.json,signal:i};await this.certificateConfigurator.applyToRequestOptions(a);let l=await this.certificateConfigurator.getCertificates();this.fetchApi.setCA(l);let c=await this.fetchApi.fetch(r,a).catch(u=>{throw o?new G7(`Request to <${r}> timed out after ${n.timeout}ms`,u):u});return new i5(c.status,c.statusText,c.headers,()=>c.text(),()=>c.body)}disconnectAll(){return this.fetchApi.reset()}makeAbortController(){return new j$}};d();d();var tD=require("fs");var VT=class extends xo{static{s(this,"LocalFileSystem")}async readFileString(t){return(await tD.promises.readFile(Wa(t))).toString()}async stat(t){let{targetStat:r,lstat:n,stat:i}=await this.statWithLink(Wa(t));return{ctime:r.ctimeMs,mtime:r.mtimeMs,size:r.size,type:this.getFileType(r,n,i)}}async readDirectory(t){let r=Wa(t),n=await tD.promises.readdir(r,{withFileTypes:!0}),i=[];for(let o of n)i.push([o.name,o.isFile()?1:2]);return i}async statWithLink(t){let r=await tD.promises.lstat(t);if(r.isSymbolicLink())try{let n=await tD.promises.stat(t);return{lstat:r,stat:n,targetStat:n}}catch{}return{lstat:r,targetStat:r}}getFileType(t,r,n){let i=0;return t.isFile()&&(i=1),t.isDirectory()&&(i=2),r.isSymbolicLink()&&n&&(i|=64),i}};d();var $$=class extends rp{constructor(r=[]){super();this._agents=r}static{s(this,"TestRemoteAgentRegistry")}agents(){return this._agents}};d();var z$=class extends tl{constructor(){super(...arguments);this.prompts=[];this.fetchResults=[];this.diffs=[]}static{s(this,"TestConversationInspector")}shouldInspect(){return!0}inspectPrompt(r){this.shouldInspect()&&this.prompts.push(r)}inspectFetchResult(r){this.shouldInspect()&&this.fetchResults.push(r)}documentDiff(r){this.shouldInspect()&&this.diffs.push(r)}};d();var mme=class extends Xa{constructor(r){super();this.certificates=r}static{s(this,"TestCertificateReader")}getAllRootCAs(){return this.certificates}},rVe=s(e=>new mme(e),"createTestCertificateReader");function gme(e,t,r){let n=new hme;n.set("x-github-request-id","1");for(let[i,o]of Object.entries(r||{}))n.set(i,o);return new i5(e,"status text",n,()=>Promise.resolve(t??""),()=>null)}s(gme,"createFakeResponse");function nVe(e,t,r){let n;return typeof t=="string"?n=t:n=JSON.stringify(t),gme(e,n,Object.assign({"content-type":"application/json"},r))}s(nVe,"createFakeJsonResponse");var rD=class extends fn{constructor(){super(...arguments);this.name="FakeFetcher"}static{s(this,"FakeFetcher")}disconnectAll(){throw new Error("Method not implemented.")}makeAbortController(){return new pme}};var Y$=class extends rD{static{s(this,"NoFetchFetcher")}fetch(t,r){throw new Error("NoFetchFetcher does not support fetching")}};var hme=class{constructor(){this.headers=new Map}static{s(this,"FakeHeaders")}append(t,r){this.headers.set(t.toLowerCase(),r)}delete(t){this.headers.delete(t.toLowerCase())}get(t){return this.headers.get(t.toLowerCase())??null}has(t){return this.headers.has(t.toLowerCase())}set(t,r){this.headers.set(t.toLowerCase(),r)}entries(){return this.headers.entries()}keys(){return this.headers.keys()}values(){return this.headers.values()}[Symbol.iterator](){return this.headers.entries()}},pme=class{constructor(){this.signal={aborted:!1,addEventListener:s(()=>{},"addEventListener"),removeEventListener:s(()=>{},"removeEventListener")}}static{s(this,"FakeAbortController")}abort(){this.signal.aborted=!0}};d();function tqt(e){return{modelId:"gpt-3.5-turbo",modelFamily:e,uiName:"Test GPT",maxRequestTokens:6144,maxResponseTokens:2048,baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:"cl100k_base",isExperimental:!1,stream:!0,toolCalls:!0}}s(tqt,"fakeChatModelConfiguration");function rqt(e){return{modelId:"embedding-test",modelFamily:e,maxBatchSize:1,maxTokens:50,tokenizer:"cl100k_base"}}s(rqt,"fakeEmbeddingModelConfiguration");var K$=class extends ca{static{s(this,"TestModelConfigurationProvider")}getBestChatModelConfig(t){let r=t[0];return Promise.resolve(tqt(r))}getFirstMatchingEmbeddingModelConfiguration(t){return Promise.resolve(rqt(t))}};d();var J$=class extends lc{constructor(){super(...arguments);this.openedUrls=[];this.opened=new $5}static{s(this,"TestUrlOpener")}open(r){return this.openedUrls.push(r),this.opened.resolve(),Promise.resolve()}},X$=class extends Ha{constructor(){super();this.sentMessages=[];this.warningPromises=[]}static{s(this,"TestNotificationSender")}performDismiss(){this.actionToPerform="DISMISS"}performAction(r){this.actionToPerform=r}showWarningMessage(r,...n){this.sentMessages.push(r);let i;if(this.actionToPerform)if(this.actionToPerform==="DISMISS")i=Promise.resolve(void 0);else{let o=n.find(a=>a.title===this.actionToPerform);i=o?Promise.resolve(o):Promise.resolve(void 0)}else i=n?Promise.resolve(n[0]):Promise.resolve(void 0);return this.warningPromises.push(i),i}async waitForWarningMessages(){await Promise.all(this.warningPromises)}};d();function iVe(e,t,r,n){return bA.create(Z3e(e),t,r,n,t)}s(iVe,"createTextDocument");var Ame=class extends Vr{constructor(r){super(r);this._openTextDocuments=[];this._notebookDocuments=new Map;this._workspaceFolders=[];this._focusSubscribers=[];this._changeSubscribers=[];this._openSubscribers=[];this._closeSubscribers=[];this.onDidFocusTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._focusSubscribers.push(o),{dispose:s(()=>{this._focusSubscribers=this._focusSubscribers.filter(a=>a!==o)},"dispose")}},"onDidFocusTextDocument");this.onDidChangeTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._changeSubscribers.push(o),{dispose:s(()=>{this._changeSubscribers=this._changeSubscribers.filter(a=>a!==o)},"dispose")}},"onDidChangeTextDocument");this.onDidOpenTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._openSubscribers.push(o),{dispose:s(()=>{this._openSubscribers=this._openSubscribers.filter(a=>a!==o)},"dispose")}},"onDidOpenTextDocument");this.onDidCloseTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._closeSubscribers.push(o),{dispose:s(()=>{this._closeSubscribers=this._closeSubscribers.filter(a=>a!==o)},"dispose")}},"onDidCloseTextDocument")}static{s(this,"SimpleTestTextDocumentManager")}init(r){this._workspaceFolders=r.map(n=>({uri:n.uri,name:n.name??Pi(n.uri)}))}async readTextDocumentFromDisk(r){return super.readTextDocumentFromDisk(r)}getTextDocumentsUnsafe(){return this._openTextDocuments}setTextDocument(r,n,i){let o=iVe(r,n,0,i);return this._openTextDocuments.push(o),o}updateTextDocument(r,n){let i=this._openTextDocuments.findIndex(a=>a.uri===r.toString());if(i<0)throw new Error("Document not found");let o=this._openTextDocuments[i];this._openTextDocuments[i]=iVe(r,o.clientLanguageId,o.version+1,n)}setNotebookDocument(r,n){this._notebookDocuments.set(r.uri.replace(/#.*/,""),n)}findNotebook({uri:r}){return this._notebookDocuments.get(r.replace(/#.*/,""))}getWorkspaceFolders(){return this._workspaceFolders}emitEvent(r){switch(r.eventName){case"focus":this._focusSubscribers.forEach(n=>n(r.args));break;case"change":this._changeSubscribers.forEach(n=>n(r.args));break;case"open":this._openSubscribers.forEach(n=>n(r.args));break;case"close":this._closeSubscribers.forEach(n=>n(r.args));break}}},Z$=class extends Ame{constructor(r){super(r);this.contents=new Map}static{s(this,"TestTextDocumentManager")}readTextDocumentFromDisk(r){return Promise.resolve(this.contents.get(r))}setDiskContents(r,n){this.contents.set(r,n)}};var yme=class extends Ga{static{s(this,"NullLog")}logIt(...t){}};function nqt(e){let t=new M8;return t.set(lg,e),t.set(fv,e),t.set(po,new po),t.set(wd,new wd({debug:!1,verboseLogging:!1,testMode:!0,simulation:!1})),t.set(Xa,rVe([])),t.set(Ug,lG(t)),t.set(Hp,new Hp),t.set(ch,new vF),t.set(yf,new yf),t.set(Zp,new Zp),t.set(tg,new tg),t.set(ic,new ic(t,"tid=test",!0)),t.set(Ms,new Ms),t.set(Ha,new X$),t.set(lc,new J$),t.set(ig,new g6),t.set(Ga,new yme),t.set(ou,new ou),t.set(Ds,new Ds("test-session","test-machine")),t.set(ps,new k9(t)),t.set(af,new af),w5(t,"copilot-test",!0),t.set(or,new or(t)),t.set(Eh,new Eh),t.set(Af,new Af),t.set(hh,new A8),t.set(en,new S3("tid=test")),t.set(Ki,new kF),t.set(Ro,new Ro),t.set(Th,xU(t)),t.set(w0,new w0),t.set(zd,new zd),t.set(BA,BA.default),t.set(Lf,new Lf),t.set(Dd,new Dd(t,!1)),t.set(Ia,new Ia),t.set(On,new On(t)),t.set(gf,new XQ),t.set(Bl,new Bl),t.set(ul,DO(t,async(r,n,i)=>n.find(o=>o==="*")?1:n.find(o=>typeof o!="string"&&o.language===i.languageId)?10:0)),t.set(Vd,new Vd(t)),iqt(t),t.set(bh,new bh(t)),t.set(Go,new Go),t}s(nqt,"_createBaselineContext");function iqt(e){e.set(Hi,new Hi(e)),e.set(_s,new _s(e)),e.set(vc,new vc(e)),e.set(gl,new gl),e.set($l,new $l),e.set(tl,new z$),e.set(Cm,new Cm(e,[])),e.set(ca,new K$),e.set(rp,new $$),e.set(c1,new c1(e)),e.set(g3,new g3),e.set(ma,new ma(e)),e.set(xc,new xc),e.set(zf,new zf)}s(iqt,"registerConversation");function oVe(){let e=nqt(new fv(new y8,new Map));return e.set(fn,new Y$),e.set(gn,new Cme),e.set(Vr,new Z$(e)),e.set(xo,new VT),e.set(Hc,new Hc(e)),e.set(Za,new Za(e)),e.set(Ac,new mG(e)),e.set(Z5,new z8),cj(e),e}s(oVe,"createLibTestingContext");var Cme=class extends gn{constructor(r={name:"lib-tests-plugin",version:"2"},n={name:"lib-tests-editor",version:"1"},i=[{name:"lib-tests-related-plugin",version:"3"}]){super();this.editorPluginInfo=r;this.editorInfo=n;this.relatedPluginInfo=i}static{s(this,"LibTestsEditorInfo")}getEditorInfo(){return this.editorInfo}getEditorPluginInfo(){return this.editorPluginInfo}getRelatedPluginInfo(){return this.relatedPluginInfo}};var aVe=Ze(require("fs"));var sVe=`${process.env.HOME}/.copilot-testing-gh-token`,ez,tz;async function lVe(e){e.forceSet(en,new S3(await oqt()))}s(lVe,"setTestingCopilotTokenManager");var oqt=s(async()=>{if(process.env.GH_COPILOT_IDE_TOKEN)return process.env.GH_COPILOT_IDE_TOKEN;let e=process.env.GH_COPILOT_TOKEN??"";if(/=/.test(e))return e;if(tz)return tz;let t=e||process.env.GITHUB_COPILOT_TOKEN||await sqt(),r=oVe(),n=new jT(r);return r.forceSet(fn,n),tz=_F(r,{...l8({}),accessToken:t}).then(i=>{if(i.kind==="success")return i.envelope.token;throw new as('Could not fetch testing Copilot token. Try running "npm run get_token" again?')}),tz},"getCopilotToken");async function sqt(){try{ez??=(await aVe.promises.readFile(sVe)).toString().trim()}catch{ez??=process.env.GITHUB_TOKEN??""}if(!ez)throw new Error(`Tests: either GH_COPILOT_IDE_TOKEN, GH_COPILOT_TOKEN, or GITHUB_TOKEN must be set, or there must be a GitHub token from an app with access to Copilot in ${sVe}. Run "npm run get_token" to get one.`);return ez}s(sqt,"getTestingGitHubToken");function cVe(e){return new pA({token:`test token ${_r()}`,refresh_in:0,expires_at:0,...e})}s(cVe,"createTestCopilotToken");var xme=class extends en{constructor(r){super();this.copilotToken=r;this.wasReset=!1;this.ghSession=uVe()}static{s(this,"FakeCopilotTokenManagerFromCopilotToken")}async getGitHubSession(){return Promise.resolve(this.ghSession)}getToken(){return Promise.resolve(this.copilotToken)}resetToken(){this.wasReset=!0}checkCopilotToken(){return Promise.resolve({status:"OK"})}},rz=class extends xme{static{s(this,"TestCopilotTokenManager")}constructor(t){super(cVe(t))}},S3=class extends rz{static{s(this,"FixedCopilotTokenManager")}constructor(t){super({token:t})}};function uVe(e={}){return{accessToken:_r(),...e,...l8(e)}}s(uVe,"testGitHubSession");var nz=class extends Bn{static{s(this,"NotAuthManager")}constructor(){super(null,null)}getPersistedSession(){return Promise.resolve(void 0)}checkAndUpdateStatus(){return Promise.resolve({status:"NotSignedIn"})}},$T=class extends Bn{constructor(r=new S3("tid=valid-copilot-token"),n=""){super(null,r);this.githubAppId=n}static{s(this,"AlwaysAuthManager")}getPersistedSession(){return Promise.resolve({login:"user",accessToken:"",githubAppId:this.githubAppId,...this.getConfiguredUrls()})}};var aqt=I.Object({options:I.Optional(I.Object({}))});async function lqt(e,t,r){return e.forceSet(Bn,new $T),e.get(en).resetToken(),e.get(Ki).forceNormal(),await new Promise(n=>setTimeout(n,0)),["OK",null]}s(lqt,"handleTestingAlwaysAuthChecked");var fVe=st(aqt,lqt);d();var cqt=I.Object({messages:I.Array(I.Object({role:I.Enum(ml),content:I.String(),name:I.Optional(I.String())})),modelFamily:I.Optional(I.Enum(ei)),stop:I.Optional(I.Array(I.String())),conversationOptions:I.Optional(I.Object({maxResponseTokens:I.Optional(I.Number()),temperature:I.Optional(I.Number())}))});async function uqt(e,t,r){let n=new ka(e),i=await e.get(ca).getBestChatModelConfig([r.modelFamily??ei.CopilotBase]),o=await SS(e,"","");return[await n.fetchResponse({modelConfiguration:i,messages:r.messages,uiKind:"conversationIntegrationTest",stop:r.stop,intentParams:{intent:!0},llmInteraction:Nu.user("test",_r())},t,o),null]}s(uqt,"handleChatMLChecked");var dVe=Io(st(cqt,uqt));d();d();var mVe=require("crypto"),hVe=require("http"),pVe=require("stream"),gVe=require("util"),YT=Ze(yh());var fqt=9e4,dqt=new YT.ProtocolRequestType("copilot/fetch"),mqt=new YT.ProtocolRequestType("copilot/fetchCancel"),hqt=new YT.ProgressType,pqt=new YT.ProtocolRequestType("copilot/fetchDisconnectAll"),y1=class extends Error{static{s(this,"EditorFetcherError")}constructor(t){super(t),this.name="EditorFetcherError"}},zT=class extends fn{constructor(r){super();this.ctx=r;this.name="EditorFetcher";this.userAgent=`GithubCopilot/${r.get(po).getVersion()}`}static{s(this,"EditorFetcher")}disconnectAll(){return this.ctx.get(Wr).connection.sendRequest(pqt,{})}makeAbortController(){return new j$}async fetch(r,n){n.headers||={},n.headers["user-agent"]=this.userAgent;let{signal:i}=n,o=this.ctx.get(Wr).connection,a=(0,mVe.randomUUID)(),l=new Mn.CancellationTokenSource,c=new pVe.PassThrough,u=s(()=>{o.sendRequest(mqt,{workDoneToken:a})},"sendCancelRequest"),f=s(()=>{c.emit("error",new V$("EditorFetch request aborted")),c.end()},"destroyBodyStream");if(i){if(!(i instanceof eVe))throw new y1("EditorFetcher received unexpected abort signal");if(i.aborted)throw new V$("EditorFetcher signal aborted before fetch");i.addEventListener("abort",u)}o.onProgress(hqt,a,h=>{h.kind==="end"?(i?.removeEventListener("abort",u),i?.removeEventListener("abort",f),h.error&&c.emit("error",new y1(h.error)),c.end()):h.kind==="report"&&c.write(h.chunk)});let m=await new Promise((h,p)=>{let g=setTimeout(()=>{p(new y1("Request timed out from lsp server"))},n.timeout??fqt),y=s(()=>{p(new V$("EditorFetcher request aborted"))},"rejectIfAborted");i?.addEventListener("abort",y),o.sendRequest(dqt,Aqt(r,a,n),l.token).then(h).catch(x=>{let b="EditorFetcher request failed";x&&typeof x=="object"&&"message"in x&&(b+=`: ${String(x.message)}`),x&&typeof x=="object"&&"data"in x&&(b+=`: ${(0,gVe.inspect)(x.data)}`),p(new y1(b))}).finally(()=>{i?.removeEventListener("abort",y),clearTimeout(g)})});if(!m.status)throw new y1("EditorFetcher received invalid response");return i?.addEventListener("abort",f),new i5(m.status,hVe.STATUS_CODES[m.status]??"",new Zje(m.headers),()=>gqt(c),()=>c)}};function gqt(e){return new Promise((t,r)=>{let n="";e.on("error",r),e.on("end",()=>t(n)),e.on("data",i=>n+=String(i))})}s(gqt,"consumeStream");function Aqt(e,t,r){let{timeout:n,method:i}=r,o=r.headers??{},a=r.json?JSON.stringify(r.json):r.body;return r.json&&(o["content-type"]="application/json"),{url:e,headers:o,body:a,timeout:n,method:i,workDoneToken:t}}s(Aqt,"convertOptionsToParams");var yqt=I.Object({url:I.String(),headers:I.Optional(I.Record(I.String(),I.String())),body:I.Optional(I.String()),timeout:I.Optional(I.Number()),method:I.Optional(I.Union([I.Literal("GET"),I.Literal("POST")])),cancelBeforeRequest:I.Optional(I.Boolean()),cancelAfterRequest:I.Optional(I.Boolean()),cancelAfterFirstChunk:I.Optional(I.Boolean())});async function Cqt(e,t,r){let n=new zT(e),i=n.makeAbortController(),o=i.signal,{url:a,cancelBeforeRequest:l,cancelAfterRequest:c,cancelAfterFirstChunk:u,...f}=r;l&&i.abort();let m=n.fetch(a,{signal:o,...f});c&&i.abort();let h;try{h=await m}catch(y){return[{error:`Fetch stream error: ${y instanceof y1?y.message:String(y)}`},null]}let{status:p}=h,g=Object.fromEntries(Array.from(h.headers));try{if(u){let x=h.body();for await(let b of x){let E=b.toString();return i.abort(),[{status:p,headers:g,body:E},null]}}let y=await h.text();return[{status:p,headers:g,body:y},null]}catch(y){return[{error:`Fetch stream error: ${y instanceof y1?y.message:String(y)}`},null]}}s(Cqt,"handleTestingFetchChecked");var AVe=st(yqt,Cqt);d();var xqt=I.Object({});async function vqt(e,t,r){return await e.get(Ro).flush(),["OK",null]}s(vqt,"handleTestingFlushPromiseQueueChecked");var yVe=st(xqt,vqt);d();var bqt=I.Object({filePath:I.String(),code:I.String(),offset:I.Number(),languageId:I.String(),timeout:I.Optional(I.Number()),waitForContext:I.Optional(I.Boolean())});async function Eqt(e,t,r){try{await e.get(n1).start();let n=e.get(nE),i=r.timeout??1e3,o=Date.now(),a=[],l=!0;for(;l;)try{a=await n.indexClient.getContext(r.filePath,r.code,r.offset,r.languageId,PS,t)}catch{}finally{l=(r.waitForContext??!1)&&a.length==0&&Date.now()-o<i}return[{initialized:!0,context:a},null]}catch{return[{initialized:!1,context:[]},null]}}s(Eqt,"handleTestingGetContextChecked");var CVe=st(bqt,Eqt);d();var Iqt=I.Object({uri:I.String()});async function Tqt(e,t,r){let i=await e.get(Vr).getTextDocument(r);return[{uri:r.uri,languageId:i?.clientLanguageId??"unknown",version:i?.version??-1,text:i?.getText()??""},null]}s(Tqt,"handleGetDocumentChecked");var xVe=st(Iqt,Tqt);d();d();d();var iz=Ze(require("assert"));var D2=class{constructor(){this.events=[];this.errors=[]}static{s(this,"TelemetrySpy")}sendTelemetryEvent(t,r={},n={}){this.events.push({name:t,properties:r,measurements:n})}sendTelemetryErrorEvent(t,r={},n={},i){this.errors.push({name:t,properties:r,measurements:n,errorProps:i})}sendTelemetryException(t,r={},n={}){this.events.push({name:"error.exception",properties:{message:t.message,...r},measurements:n})}dispose(){return Promise.resolve()}get hasEvent(){return this.events.length>0}get hasError(){return this.errors.length>0}get exceptions(){return this.events.filter(t=>t.name==="error.exception")}get hasException(){return this.exceptions.length>0}get firstEvent(){return this.events[0]}get firstError(){return this.errors[0]}get firstException(){return this.exceptions[0]}eventsMatching(t){return this.events.filter(t)}eventByName(t){let r=this.events.filter(n=>n.name===t);return iz.strictEqual(r.length,1,`Expected exactly one event with name ${t}`),r[0]}errorsMatching(t){return this.errors.filter(t)}exceptionsMatching(t){return this.exceptions.filter(t)}assertHasProperty(t){iz.ok(this.eventsMatching(r=>r.name!=="ghostText.produced").every(r=>t(r.properties)))}};var KT=class extends Ro{static{s(this,"TestPromiseQueue")}async awaitPromises(){await Promise.all(this.promises)}};var wqt=I.Object({});async function _qt(e,t,r){let n=e.get(Ms),i=n.getReporter(e),o=n.getRestrictedReporter(e);if(!(i instanceof D2)||!(o instanceof D2||o===void 0))return[null,{code:nn.InternalError,message:"Telemetry is not being captured. You must first call testing/setTelemetryCapture."}];let a=e.get(Ro);return a instanceof KT&&await a.awaitPromises(),[{standard:{events:i.events,errors:i.errors},restricted:{events:o?.events||[],errors:o?.errors||[]}},null]}s(_qt,"handleTestingGetTelemetryChecked");var vVe=st(wqt,_qt);d();var Sqt=I.Object({options:I.Optional(I.Object({}))});async function Rqt(e,t,r){e.forceSet(Bn,new nz),e.get(en).resetToken();try{await e.get(en).getToken()}catch{}return await new Promise(n=>setTimeout(n,0)),["OK",null]}s(Rqt,"handleTestingNeverAuthChecked");var bVe=st(Sqt,Rqt);d();d();var vme=class extends rD{static{s(this,"ExpConfigFetcher")}constructor(t){super(),this.fullConfig={Features:[],Flights:{},Configs:[{Id:"vscode",Parameters:t.Parameters}],ParameterGroups:[],AssignmentContext:t.AssignmentContext}}fetch(t,r){return t.endsWith("telemetry")?Promise.resolve(nVe(200,this.fullConfig)):Promise.resolve(gme(404,""))}},oz=class extends vme{constructor(r,n){super(r);this.delegate=n}static{s(this,"ExpConfigFetcherWithDelegate")}fetch(r,n){return r.endsWith("telemetry")?super.fetch(r,n):this.delegate.fetch(r,n)}makeAbortController(){return this.delegate.makeAbortController()}};var kqt=I.Object({expFlags:I.Record(I.String(),I.Union([I.String(),I.Number(),I.Boolean()]))});function Bqt(e,t,r){if(r.expFlags){let n={AssignmentContext:"assignmentcontext",Parameters:{...r.expFlags}};e.forceSet(fn,new oz(n,e.get(fn)))}return["OK",null]}s(Bqt,"handleTestingOverrideExpFlagsChecked");var EVe=st(kqt,Bqt);d();var Dqt=I.Object({rules:Ure});function Pqt(e,t,r){let n=e.get(Hc);return n?(n.setTestingRules(r.rules),["OK",null]):[null,{code:nn.InternalError,message:"Could not set content exclusion rules"}]}s(Pqt,"handleTestingSetContentExclusionRulesChecked");var IVe=st(Dqt,Pqt);d();var Nqt=I.Object({workDoneToken:I.Union([I.String(),I.Number()]),chunks:I.Array(I.String()),followUp:I.Optional(I.String()),suggestedTitle:I.Optional(I.String()),skills:I.Optional(I.Array(I.String())),references:I.Optional(I.Array(wT)),options:I.Optional(I.Object({}))});function Lqt(e,t,r){return e.get(I2).add(r.workDoneToken,r.chunks,r.followUp,r.suggestedTitle,r.skills,r.references),["OK",null]}s(Lqt,"handleTestingSetSyntheticTurnsChecked");var TVe=st(Nqt,Lqt);d();var Fqt=I.Object({telemetryCapture:I.Boolean()});async function Mqt(e,t,r){return r.telemetryCapture?(await w5(e,"agent",!1),e.get(Ms).setReporter(new D2),e.get(Ms).setRestrictedReporter(new D2),e.forceSet(Ro,new KT)):(await w5(e,"agent",!0),e.forceSet(Ro,new Ro)),["OK",null]}s(Mqt,"handleTestingSetTelemetryCaptureChecked");var wVe=st(Fqt,Mqt);d();var Qqt=I.Object({});async function Oqt(e,t,r){let n=e.get(Ha),i=e.get(Ga);return await n.showWarningMessage("This is a test message",{title:"Some Action"}).then(a=>o(3,"response from message request",a?.title)).catch(a=>o(1,"error sending show message request",a)),["OK",null];function o(a,l,c){return i.logIt(e,a,"triggerShowMessage",`${l} (${String(c)})`)}s(o,"sendNotification")}s(Oqt,"handleTriggerShowMessageChecked");var _Ve=st(Qqt,Oqt);d();var Uqt=I.Object({options:I.Optional(I.Object({})),githubAppId:I.Optional(I.String())});async function qqt(e,t,r){return await lVe(e),e.forceSet(Bn,new $T(e.get(en),r.githubAppId)),["OK",null]}s(qqt,"handleTestingUseTestingTokenChecked");var SVe=st(Uqt,qqt);d();var Wqt=I.Object({});async function Gqt(e,t,r){return await new hT().uninstall(e),["OK",null]}s(Gqt,"handleUninstallChecked");var RVe=st(Wqt,Gqt);d();var Hqt=H8e;function jqt(e,t,r){let n=e.get(ul),i={unregistered:[],notUnregistered:[]};return r.providers.forEach(o=>{try{n.unregisterContextProvider(o.id),i.unregistered.push(o.id)}catch{i.notUnregistered.push(o.id)}}),[i,null]}s(jqt,"unregisterContextProviders");var kVe=st(Hqt,jqt);d();var bme=Ze(require("os"));var Vqt=I.Object({expectedCertificate:I.String()});async function $qt(e,t,r){let i=(await aG(e).getAllRootCAs()).map(FT),o=FT(r.expectedCertificate);return i.includes(o)?[{status:!0,message:"Certificate verified"},null]:[{status:!1,message:`expected certificate not found - Expected to find certificate ${wde(o)}. Only found those installed on the system:${bme.EOL}${i.map(a=>"- "+wde(a)).join(bme.EOL)}`},null]}s($qt,"handleVerifyCertificateChecked");var BVe=st(Vqt,$qt);d();var zqt=I.Object({});async function Yqt(){return[{status:!!await new hk().load()},null]}s(Yqt,"handleVerifyKerberosChecked");var DVe=st(zqt,Yqt);d();var Kqt=I.Object({source:I.String(),version:I.Number(),uri:I.String()});async function Jqt(e,t,r){let i=await e.get(Vr).getTextDocument(r);return i?i.getText()!==r.source?[{status:!1,message:`Source mismatch: [State] ${i.getText()} !== [Request] ${r.source}`},null]:i.version!==r.version?[{status:!1,message:`Version mismatch: [State] ${i.version} !== [Request] ${r.version}`},null]:[{status:!0,message:""},null]:[{status:!1,message:`Document not found: <${r.uri}>`},null]}s(Jqt,"handleVerifyStateChecked");var PVe=st(Kqt,Jqt);d();var Xqt=I.Object({});function Zqt(e,t,r){return[e.get(Vr).getWorkspaceFolders().map(i=>{let o=new URL(i.uri),a=decodeURIComponent(o.pathname);return{...i,path:a}}),null]}s(Zqt,"handleVerifyWorkspaceStateChecked");var NVe=st(Xqt,Zqt);var vE=class{constructor(t){this.handlers=t}static{s(this,"MethodHandlers")}};function LVe(){let e=new Map;return e.set(uHe.method,fHe),e.set(dHe.method,mHe),e.set("getCompletions",rHe),e.set("getCompletionsCycling",nHe),e.set("getPanelCompletions",sHe),e.set(UGe.method,qGe),e.set("getVersion",aHe),e.set("setEditorInfo",_He),e.set("checkStatus",VUe),e.set("checkFileStatus",jUe),e.set("signInInitiate",Pde),e.set("signIn",Pde),e.set("signInConfirm",SHe),e.set("signInWithGithubToken",RHe),e.set("signOut",kHe),e.set("notifyShown",yHe),e.set("notifyAccepted",gHe),e.set("notifyRejected",AHe),e.set("telemetry/exception",LHe),e.set("telemetry/authNotifyDismissed",BHe),e.set("telemetry/authNotifyShown",DHe),e.set("telemetry/gitHubLoginSuccess",PHe),e.set("telemetry/newGitHubLogin",NHe),e.set("textDocument/copilotInlineEdit",pHe),e.set("testing/overrideExpFlags",EVe),e.set("testing/alwaysAuth",fVe),e.set("testing/neverAuth",bVe),e.set("testing/useTestingToken",SVe),e.set("testing/setCompletionDocuments",XGe),e.set("testing/setPanelCompletionDocuments",QGe),e.set("testing/triggerShowMessageRequest",_Ve),e.set("testing/getTelemetry",vVe),e.set("testing/setTelemetryCapture",wVe),e.set("testing/flushPromiseQueue",yVe),e.set("testing/getDocument",xVe),e.set("testing/chatml",dVe),e.set("testing/setSyntheticTurns",TVe),e.set("testing/fetch",AVe),e.set("testing/setContentExclusionRules",IVe),e.set("testing/setCopilotEditsResponse",wGe),e.set("testing/getContext",CVe),e.set("uninstall",RVe),e.set("debug/diagnostics",jGe),e.set("debug/listCertificates",hHe),e.set("debug/verifyState",PVe),e.set("debug/verifyCertificate",BVe),e.set("debug/verifyKerberos",DVe),e.set("debug/verifyWorkspaceState",NVe),e.set("context/registerProviders",CHe),e.set("context/unregisterProviders",kVe),e.set("conversation/preconditions",CGe),e.set("conversation/persistence",gGe),e.set("conversation/create",hGe),e.set("conversation/turn",EGe),e.set("conversation/turnDelete",IGe),e.set("conversation/destroy",pGe),e.set("conversation/rating",xGe),e.set("conversation/copyCode",XWe),e.set("conversation/insertCode",ZWe),e.set("conversation/templates",bGe),e.set("conversation/agents",JWe),e.set("conversation/registerTools",vGe),e.set("copilot/models",PGe),e.set("copilot/setModelPolicy",NGe),e.set("copilot/codeReview",TGe),e.set("git/commitGenerate",lHe),e.set("editConversation/create",_Ge),e.set("editConversation/turn",RGe),e.set("editConversation/turnDelete",kGe),e.set("editConversation/destroy",SGe),e.set("mcp/getTools",BGe),e.set("mcp/updateToolsStatus",DGe),new vE(e)}s(LVe,"getAllMethods");d();d();d();var FVe=Ze(yh());var C1=class{constructor(t){this.ctx=t}static{s(this,"AbstractNotification")}get type(){return new FVe.NotificationType(this.name)}};var Eme=class extends C1{constructor(){super(...arguments);this.name=EZ.method;this.params=i3e}static{s(this,"DidChangeAuthNotificationHandler")}handle(r){let n=this.ctx.get(Bn);r?.handle&&r?.accessToken?n.setTransientSession({accessToken:r.accessToken,login:r.handle,githubAppId:r.githubAppId}):n.setTransientSession(null)}},MVe=[Eme];d();var Ime=class extends C1{constructor(){super(...arguments);this.name=SZ.method;this.params=d3e}static{s(this,"DidShowCompletionNotificationHandler")}handle(r){let n=r.item.command.arguments[0],o=this.ctx.get(ns).get(n);o&&CTe(this.ctx,o)}},Tme=class extends C1{constructor(){super(...arguments);this.name=BZ.method;this.params=A3e}static{s(this,"DidShowInlineEditNotificationHandler")}async handle(r){let n=r.item.command.arguments[0];await this.ctx.get(Kh).handleShown(n)}},wme=class extends C1{constructor(){super(...arguments);this.name=RZ.method;this.params=m3e}static{s(this,"DidPartiallyAcceptCompletionNotificationHandler")}handle(r){let n=r.item.command.arguments[0],i=r.acceptedLength,o=this.ctx.get(ns),a=o.get(n);a&&(o.delete(n),i>=a.insertText.length?wU(this.ctx,a):xTe(this.ctx,a,i))}},QVe=[Ime,Tme,wme];d();var sz=class extends C1{constructor(){super(...arguments);this.name="window/workDoneProgress/cancel";this.params=I.Object({token:I.Union([I.String(),I.Number()])})}static{s(this,"WorkDoneProgressCancelNotification")}handle(r){this.ctx.get(Q0).cancel(r.token)}};var eWt=[...MVe,...QVe,sz];function OVe(e,t){for(let r of eWt){let n=new r(e),i=hs.Compile(n.params);t.onNotification(n.type,rf(e,async o=>{p2(o),i.Check(o)?await n.handle(o):bc.error(e,`Notification ${n.name}:`,new Cc(i.Errors(o)))},`Notification ${n.name}`))}}s(OVe,"registerNotifications");d();var qVe=Ze(require("events")),az=Ze(cl());var UVe=new Gt("AgentTextDocumentConfiguration"),_me=class{constructor(t){this.ctx=t;this.emitter=new qVe.default}static{s(this,"AgentTextDocumentsConfiguration")}create(t,r,n,i){try{return bA.create(t,r,n,i)}catch(o){throw UVe.exception(this.ctx,o,".create"),o}}update(t,r,n){try{let i=[];for(let a of r)if(az.TextDocumentContentChangeEvent.isIncremental(a)){let l={range:a.range,rangeOffset:t.offsetAt(a.range.start),rangeLength:t.offsetAt(a.range.end)-t.offsetAt(a.range.start),text:a.text};i.push(l)}let o={document:{uri:t.uri,version:n},contentChanges:i};return this.emitter.emit("change",o),bA.withChanges(t,r,n)}catch(i){throw UVe.exception(this.ctx,i,".update"),i}}},R3=class extends Vr{constructor(r){super(r);this._documents=new Map;this.workspaceFolders=[];this.onDidChangeTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._textDocumentConfiguration.emitter.on("change",o),{dispose:s(()=>{this._textDocumentConfiguration.emitter.removeListener("change",o)},"dispose")}},"onDidChangeTextDocument");this.onDidOpenTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._textDocumentConfiguration.emitter.on("open",o),{dispose:s(()=>{this._textDocumentConfiguration.emitter.removeListener("open",o)},"dispose")}},"onDidOpenTextDocument");this.onDidCloseTextDocument=s((r,n,i)=>{let o=r.bind(n);return this._textDocumentConfiguration.emitter.on("close",o),{dispose:s(()=>{this._textDocumentConfiguration.emitter.removeListener("close",o)},"dispose")}},"onDidCloseTextDocument");this.onDidFocusTextDocument=s((r,n,i)=>this.connection.onNotification(wZ.type,o=>{let a=("textDocument"in o?o.textDocument:o)??{};r.call(n,"uri"in a?{document:a}:void 0)}),"onDidFocusTextDocument");this._textDocumentConfiguration=new _me(r),this._notebookDocuments=new az.NotebookDocuments(this._textDocumentConfiguration)}static{s(this,"AgentTextDocumentManager")}get connection(){return this.ctx.get(Wr).connection}init(r){this.connection.onDidOpenTextDocument(n=>{let i=n.textDocument,o=this._textDocumentConfiguration.create(i.uri,i.languageId,i.version,i.text);this._documents.set(ac(i.uri),o),this._textDocumentConfiguration.emitter.emit("open",{document:{...i,uri:o.uri}})}),this.connection.onDidChangeTextDocument(n=>{let i=n.textDocument,o=n.contentChanges,{version:a}=i;if(a==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let l=ac(i.uri),c=this._documents.get(l);c!==void 0&&(c=this._textDocumentConfiguration.update(c,o,a),this._documents.set(l,c))}),this.connection.onDidCloseTextDocument(n=>{let i=ac(n.textDocument.uri);this._documents.delete(i),this._textDocumentConfiguration.emitter.emit("close",{document:{uri:i}})}),this._notebookDocuments.listen(this.connection),this.workspaceFolders.length=0,this.workspaceFolders.push(...r)}didChangeWorkspaceFolders(r){r.added.forEach(n=>this.registerWorkspaceFolder(n)),r.removed.forEach(n=>this.unregisterWorkspaceFolder(n))}unregisterWorkspaceFolder(r){let n=this.workspaceFolders.findIndex(i=>i.uri===r.uri);n>=0&&this.workspaceFolders.splice(n,1)}registerWorkspaceFolder(r){this.workspaceFolders.push(r)}getTextDocumentsUnsafe(){return[...this._documents.values()]}getTextDocumentUnsafe(r){return this._documents.get(ac(r.uri))}getWorkspaceFolders(){return this.workspaceFolders}findNotebook(r){let n=this._notebookDocuments.findNotebookDocumentForCell(r.uri);if(n)return{getCells:s(()=>n.cells.map((i,o)=>this.wrapCell(i,o)).filter(i=>!!i),"getCells"),getCellFor:s(({uri:i})=>{let o=n.cells.findIndex(a=>a.document===i);return o!==-1?this.wrapCell(n.cells[o],o):void 0},"getCellFor")}}wrapCell(r,n){let i=this._notebookDocuments.getCellTextDocument(r);if(i)return{kind:r.kind,metadata:r.metadata??{},index:n,document:i}}};var WVe=hs.Compile(c3e);function p2(e){if(e!==null){if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=p2(e[t]);else if(typeof e=="object"){let t=e;for(let r in t)t[r]===null?delete t[r]:t[r]=p2(t[r])}return e}}s(p2,"purgeNulls");var Wr=class{constructor(t,r){this.ctx=t;this.connection=r;this.initialized=!1;this.#i=this.ctx.get(Ga)}static{s(this,"Service")}#e;#t;#i;get clientCapabilities(){return this.#t}listen(){let t=this.ctx,r=this.connection;r.onRequest(this.messageHandler.bind(this)),OVe(t,r);let n={name:"GitHub Copilot Language Server",version:t.get(po).getDisplayVersion(),nodeVersion:process.versions.node},i,o=s(async c=>{try{if(i&&c&&typeof c=="object"&&!("settings"in c)){let u=await r.workspace.getConfiguration(["github.copilot",...kde].map(m=>({section:m}))),f={github:{copilot:u.shift()}};for(let m of kde)f[m]=u.shift();c.settings=f}return THe(t,p2(c))}catch(u){bc.exception(t,u,"didChangeConfiguration")}},"didChangeConfiguration");function a(c){try{t.get(R3).didChangeWorkspaceFolders(c),t.get(Lf).emit(c)}catch(u){bc.exception(t,u,"didChangeWorkspaceFolders")}}s(a,"didChangeWorkspaceFolders"),this.connection.onNotification("vs/didAddWorkspaceFolder",({name:c,uri:u})=>a({added:[{uri:u,name:c??u}],removed:[]})),this.connection.onNotification("vs/didRemoveWorkspaceFolder",({name:c,uri:u})=>a({added:[],removed:[{uri:u,name:c??u}]})),r.onInitialize(async c=>{if(this.initialized)throw new Error("initialize request sent after initialized notification");this.#t=c.capabilities;let u=c.capabilities.copilot,f=p2(c.initializationOptions);if(f){if(!WVe.Check(f))throw new Cc(WVe.Errors(f));let g=f,y=t.get(gn);g.editorPluginInfo?y.setEditorAndPluginInfo({version:"unknown",...g.editorPluginInfo},g.editorInfo&&{version:"unknown",...g.editorInfo},g.relatedPluginInfo??[]):bc.warn(t,"editorInfo and editorPluginInfo will soon be required in initializationOptions. This will replace setEditorInfo."),g.copilotIntegrationId&&y.setCopilotIntegrationId(g.copilotIntegrationId),g.githubAppId&&(t.get(Ia).githubAppId=g.githubAppId),g.copilotCapabilities&&(u=g.copilotCapabilities)}let m=c.capabilities.workspace?.workspaceFolders??!1;t.get(R3).init(c.workspaceFolders??[]),D9e(this.ctx),t.get(Lf).emit({added:c.workspaceFolders??[],removed:[]}),i=c.capabilities.workspace?.configuration,u&&(t.get(Go).setCapabilities(u),"openURL"in u&&Ij(t,["The openURL Copilot capability has been removed in favor of window/showDocument."]));let p=s(async()=>{this.initialized||(this.initialized=!0,bc.info(t,`${n.name} ${n.version} initialized`),m&&r.workspace.onDidChangeWorkspaceFolders(a),i?await o({}):await $B(t),this.installationTelemetryTimer=setTimeout(()=>{new hT().startup(t).catch(()=>{})},1e3),t.get(g2).emit(),await q9e(t))},"onInitialized");return r.onInitialized(rf(t,p,"onInitialized")),t.get(Xh).init(),u?.token&&t.get(Bn).setTransientSession(null),u?.redirectedTelemetry&&await GUe(t),GVe.lt(process.versions.node,"20.8.0")&&bc.warn(t,`Node.js ${process.versions.node} support is deprecated. Please upgrade to Node.js 20.8 or newer.`),{capabilities:{textDocumentSync:{openClose:!0,change:ap.TextDocumentSyncKind.Incremental},notebookDocumentSync:{notebookSelector:[{notebook:"*"}]},workspace:{workspaceFolders:{supported:m,changeNotifications:m}},executeCommandProvider:{commands:FUe(t,r)},inlineCompletionProvider:{}},serverInfo:n}}),r.onShutdown(async()=>{await(this.#e??=this.deactivate())}),r.onExit(()=>void this.onExit()),r.onDidChangeConfiguration(rf(t,o,"onDidChangeConfiguration")),r.listen();let l=new Qj;this.ctx.forceSet(Ga,l)}async messageHandler(t,r,n){let i=this.ctx.get(vE).handlers.get(t);if(!i)return new ap.ResponseError(nn.MethodNotFound,`Method not found: ${t}`);if(!this.initialized)return new ap.ResponseError(nn.ServerNotInitialized,"Agent service not initialized.");if(this.#e)return new ap.ResponseError(nn.InvalidRequest,"Agent service shut down.");if(t!=="setEditorInfo"&&!OUe(this.ctx.get(gn)))throw new ap.ResponseError(nn.ServerNotInitialized,"editorInfo and editorPluginInfo not set in initializationOptions");Array.isArray(r)&&(r=r[0]),p2(r);try{let[o,a]=await i(this.ctx,n,r);return a?new ap.ResponseError(a.code,a.message,a.data):o}catch(o){if(n.isCancellationRequested)return new ap.ResponseError(nn.RequestCancelled,"Request was canceled");if(o instanceof as)return new ap.ResponseError(nn.NoCopilotToken,`Not authenticated: ${o.message}`);throw o instanceof ap.ResponseError||bc.exception(this.ctx,o,`Request ${t}`),o}}async onExit(){try{this.ctx.get(Jh).dispose()}catch(t){bc.exception(this.ctx,t,"failed to dispose ripgrep process manager")}this.ctx.forceSet(Ga,this.#i),await(this.#e??=this.deactivate())}async deactivate(){let t=this.ctx;clearTimeout(this.installationTelemetryTimer),oie(t),await Promise.race([new Promise(r=>setTimeout(r,100)),t.get(Ro).flush()]),await Promise.race([new Promise(r=>setTimeout(r,1800)),t.get(Ms).deactivate()])}dispose(){clearTimeout(this.installationTelemetryTimer),this.connection.dispose()}},bc=new Gt("lsp");var lz=class e extends jv{constructor(r){super(r);this.reportedUnknownProviders=new Set}static{s(this,"AgentRelatedFilesProvider")}get service(){return this.context.get(Wr)}static mapProviderNameToNeighboringFileType(r){let n="CSharpCopilotCompletionContextProvider",i="CSharpRoslynCompletionRelatedContextProvider",o="CppCopilotCompletionContextProvider",a="CppCopilotCompletionSemanticCodeContextProvider";switch(r){case n:return"related/csharp";case i:return"related/csharproslyn";case o:return"related/cpp";case a:return"related/cppsemanticcodecontext";default:return"related/other"}}convert(r){let n={entries:[],traits:r.traits};for(let i of r.entries){let o={type:e.mapProviderNameToNeighboringFileType(i.providerName),uris:i.uris};n.entries.push(o),o.type==="related/other"&&!this.reportedUnknownProviders.has(i.providerName)&&(this.reportedUnknownProviders.add(i.providerName),fl.warn(this.context,`unknown providerName ${i.providerName}`))}return n}async getRelatedFilesResponse(r,n,i){fl.debug(this.context,`Fetching related files for ${r.uri}`);let o=this.context.get(Go).getCapabilities().related??!1;if(e.relatedCapabilityTelemetry(this.context,n,o),!o)return fl.debug(this.context,"`copilot/related` not supported"),N9e;try{let a=await this.service.connection.sendRequest(DZ.type,{textDocument:{uri:r.uri},data:r.data,telemetry:{properties:n.properties,measurements:n.measurements}},i);return this.convert(a)}catch(a){fl.exception(this.context,a,".copilotRelated");return}}static{this.telemetrySent=!1}static relatedCapabilityTelemetry(r,n,i){try{if(!i||e.telemetrySent)return;e.telemetrySent=!0,jt(r,"copilotRelated.hasRelatedCapability",n)}catch(o){fl.exception(r,o,"copilotRelated")}}};d();var HVe=Ze(cl());var Sme=new Gt("copilotTokenManager"),Rme=class e extends u8{static{s(this,"AgentClientCopilotTokenManager")}static{this.RequestType=new HVe.ProtocolRequestType("copilot/token")}constructor(t,r=!1){super(t,r)}async fetchCopilotTokenEnvelope(){let t=this.ctx.get(Wr).connection;try{this.didChangeToken??=t.onNotification("copilot/didChangeToken",()=>{this.resetToken()});let r=await t.sendRequest(e.RequestType,{force:!1});if(!r?.envelope)throw Sme.debug(this.ctx,"Envelope missing from copilot/token response"),new Rd({reason:"NotSignedIn",message:"Editor did not return a token"});let{accessToken:n,handle:i,githubAppId:o,envelope:a,tokenEndpoint:l}=r;Sme.debug(this.ctx,"Retrieved envelope from copilot/token");let c=new pA(a);if(c.isExpired())throw new as("Expired token in copilot/token response");if(i&&n){let u;if(l!==void 0){try{u=new URL(l).origin}catch{Sme.warn(this.ctx,`Invalid token endpoint URL <${l}>`)}this.ctx.get(ps).updateBaseUrlFromTokenEndpoint(this.ctx,l)}this.ctx.get(Bn).setTransientSession({accessToken:n,login:i,githubAppId:o,apiUrl:u},!1)}else if(!await this.getGitHubSession())throw new Rd({reason:"NotSignedIn"});return y_(this.ctx,c),a}catch(r){throw r instanceof Error?new as(r.message,r):r}}},nD=class extends en{constructor(r,n=new u8(r,!0)){super();this.ctx=r;this.fallback=n;this.client=new Rme(r,!0)}static{s(this,"AgentCopilotTokenManager")}canGetToken(){return this.ctx.get(Go).getCapabilities().token??!1}getDelegate(){return this.canGetToken()?this.client:this.fallback}resetToken(r){this.getDelegate().resetToken(r)}async getToken(){return this.getDelegate().getToken()}async getGitHubSession(){return this.fallback.getGitHubSession()}};d();var tWt=new Gt("Public Code References"),cz=class extends gf{static{s(this,"CLSCitationManager")}async handleIPCodeCitation(t,r){let n=r.location?.start.line!==void 0?r.location.start.line+1:"-",i=r.location?.start.character!==void 0?r.location.start.character+1:"-",o=(r.matchingText??"").replace(/[\r\n]/g," ");tWt.info(t,`Text found matching public code in ${r.inDocumentUri} [Ln ${n}, Col ${i}] near ${o}...:`+r.details.map((a,l)=>`
${l+1}) [${a.license}] ${a.url}`).join("")),!(r.version===void 0||r.location===void 0)&&t.get(Go).getCapabilities().ipCodeCitation===!0&&await t.get(Wr).connection.sendNotification(IZ.type,{uri:r.inDocumentUri,version:r.version,range:r.location,matchingText:r.matchingText??"",citations:r.details})}};d();d();function jVe(e){rWt(e)}s(jVe,"activateExtensibilityPlatformFeature");function rWt(e){e.set(rp,new t$(e)),e.set(c1,new c1(e))}s(rWt,"registerContextDependencies");d();var VVe=I.String(),kme=class{constructor(t){this.turnContext=t}static{s(this,"BuildLogsSkillProcessor")}value(){return .9}processSkill(t){return this.turnContext.collectLabel(fz,"build logs"),`The contents of the application build logs:
\`\`\`
${t}
\`\`\``}},fz="build-logs",uz=class extends jl{static{s(this,"BuildLogsSkill")}constructor(t){super(fz,"The application build logs, which can be used to fix build or compilation errors.","Reading build logs",()=>t,r=>new kme(r))}};d();var nWt=I.Object({uri:I.String(),visibleRange:I.Optional(ba),openedAt:I.Optional(I.String()),activeAt:I.Optional(I.String())}),$Ve=I.Object({files:I.Array(nWt)}),iWt=3,Bme=class{constructor(t){this.turnContext=t}static{s(this,"RecentFilesSkillProcessor")}value(){return .7}async processSkill(t){let r=await this.getDocuments(t);if(r.length>0){let n=this.toElidableDocs(r),i=y3(n,"inversePositional");return await this.preElideDocuments(i)}}async getDocuments(t){let r=this.sortFiles(t.files);r=this.filterIncludedDocs(r);let n=this.turnContext.ctx.get(On),i=[];for(let o of r){let a=await n.getOrReadTextDocument(o),l=ys(a);if(await this.turnContext.collectFile(mz,o.uri,l),a.status==="valid"&&l!=="empty"&&(i.push([a.document,o]),i.length===iWt))break}return i.reverse()}sortFiles(t){return t.sort((r,n)=>r.activeAt&&n.activeAt?new Date(r.activeAt).getTime()-new Date(n.activeAt).getTime():r.activeAt?-1:n.activeAt?1:0).reverse()}filterIncludedDocs(t){return t.filter(r=>!this.turnContext.isFileIncluded(r.uri))}toElidableDocs(t){return t.map(r=>{let[n,i]=r,o=this.turnContext.ctx.get(On).getRelativePath(n),a=new u1(n,void 0,i.visibleRange);return new zt([[`Code excerpt from file \`${o}\`:`,1],[a.fromAllCode({addLineNumbers:!1}),.9]])})}async preElideDocuments(t){let r=(await yo.getModelConfiguration(this.turnContext.ctx,"user")).maxRequestTokens,n=t.elide(Math.floor(r*.1)).getText();return new zt([n])}},mz="recent-files",dz=class extends jl{static{s(this,"RecentFilesSkill")}constructor(t){super(mz,"Provides code examples helpful for creating, explaining, refactoring, or fixing code. It's based on the files the user has worked on in the editor.","Resolving recent files",()=>t,r=>new Bme(r))}};d();var zVe=I.String(),Dme=class{constructor(t){this.turnContext=t}static{s(this,"RuntimeLogsSkillProcessor")}value(){return .9}processSkill(t){return this.turnContext.collectLabel(pz,"runtime logs"),`The contents of the application runtime logs:
\`\`\`
${t}
\`\`\``}},pz="runtime-logs",hz=class extends jl{static{s(this,"RuntimeLogsSkill")}constructor(t){super(pz,"The application runtime or debug logs, which are used to view output logs from the console. This is useful for debugging and troubleshooting runtime issues.","Reading runtime logs",()=>t,r=>new Dme(r))}};d();var gz=Ze(yh());var Az=class extends tl{constructor(r){super();this.ctx=r}static{s(this,"AgentConversationInspector")}shouldInspect(){return aF(this.ctx)}get connection(){if(this.shouldInspect())return this.ctx.get(Wr).connection}async inspectPrompt(r){return this.connection?.sendNotification(new gz.NotificationType("conversation/inspectPrompt"),r)}async inspectFetchResult(r){return this.connection?.sendNotification(new gz.NotificationType("conversation/inspectFetchResult"),r)}async documentDiff(r){return this.connection?.sendNotification(new gz.NotificationType("conversation/documentDiff"),r)}};d();var YVe=Ze(cl());var iD=class{constructor(t){this.ctx=t;this.notificationEndpoint="conversation/preconditionsNotification";t.get(Cm).onChange(r=>{this.sendNotification(r)})}static{s(this,"PreconditionsNotifier")}sendNotification(t){return this.ctx.get(Wr).connection.sendNotification(new YVe.NotificationType(this.notificationEndpoint),t)}};function KVe(e){oWt(e),sWt(e),jVe(e)}s(KVe,"activateConversationFeature");function oWt(e){e.set(Hi,new Hi(e)),e.set($l,new $l),e.set(vc,new vc(e)),e.set(ca,new bG(e)),e.set(I2,new I2),e.set(_s,new _s(e)),e.set(Cm,new Cm(e)),e.set(iD,new iD(e)),e.set(lf,new PF(e,new DF(e))),e.set(T2,new T2),e.set(g3,new g3),e.set(tl,new Az(e)),e.set(ma,new ma(e)),e.set(xc,new xc),e.set(zf,new zf)}s(oWt,"registerContextDependencies");function sWt(e){let t=new gl;t.registerSkill(new iV(new nV(e))),t.registerSkill(new kV(new M0(e,p1,OWe))),t.registerSkill(new sV(new M0(e,ep,Bqe))),t.registerSkill(new Wj(new M0(e,t0,ZUe))),t.registerSkill(new BV),t.registerSkill(new dz(new M0(e,mz,$Ve))),t.registerSkill(new Gj(new M0(e,f1,tqe))),t.registerSkill(new lV(new M0(e,C3,qqe))),t.registerSkill(new hz(new M0(e,pz,zVe))),t.registerSkill(new uz(new M0(e,fz,VVe))),t.registerSkill(new uV(new M0(e,tp,Wqe))),t.registerSkill(new fV(new M0(e,aE,Hqe))),e.set(gl,t)}s(sWt,"registerSkills");d();var JVe=Ze(ii());var yz=class extends Ac{static{s(this,"AgentEditProgressReporter")}constructor(t){super(t)}async reportTurn(t,r){await this.ctx.get(Wr).connection.sendProgress(new JVe.ProgressType,t.partialResultToken,[{editConversationId:t.editConversationId,editTurnId:t.editTurnId,...r}])}};d();var XVe=Ze(cl()),ZVe=Ze(yh());var Cz=class extends qg{constructor(){super(...arguments);this.requestType=new XVe.ProtocolRequestType("conversation/invokeClientToolConfirmation");this.typeCheck=hs.Compile(wQe)}static{s(this,"AgentClientToolConfirmationInvoker")}async invokeClientToolConfirmation(r,n){let i=this.ctx.get(Wr).connection,o;try{let a=await i.sendRequest(this.requestType,n),[l,c]=a;if(c){let u=new ZVe.ResponseError(c.code,c.message,c.data);throw Kr.error(this.ctx,`ResponseError while invoking client tool confirmation ${n.name}`,u),new Error(`Failed to invoke client tool confirmation ${n.name}: ${c.message}`)}o=l}catch(a){throw new Error(`Failed to invoke client tool confirmation ${n.name}: ${String(a)}`)}if(o==null)throw new Error(`Failed to invoke client tool confirmation ${n.name}: No result returned`);if(!this.typeCheck.Check(o))throw new Cc(this.typeCheck.Errors(o));return o}};d();var e$e=Ze(cl()),t$e=Ze(yh());var xz=class extends FC{constructor(){super(...arguments);this.requestType=new e$e.ProtocolRequestType("conversation/invokeClientTool");this.typeCheck=hs.Compile(TQe)}static{s(this,"AgentClientToolInvoker")}async invokeClientTool(r,n){let i=this.ctx.get(Wr).connection,o;try{let a=await i.sendRequest(this.requestType,n),[l,c]=a;if(c){let u=new t$e.ResponseError(c.code,c.message,c.data);throw Kr.error(this.ctx,`ResponseError while invoking client tool ${n.name}`,u),new Error(`Failed to invoke client tool ${n.name}: ${c.message}`)}o=l}catch(a){throw new Error(`Failed to invoke client tool ${n.name}: ${String(a)}`)}if(o==null)throw new Error(`Failed to invoke client tool ${n.name}: No result returned`);if(!this.typeCheck.Check(o))throw new Cc(this.typeCheck.Errors(o));return this.transformToToolResult(o)}transformToToolResult(r){let n=r.content.map(i=>typeof i.value=="string"?new Ci(i.value):new Zb(i.value));return new Gi(n,r.status??"success")}};d();d();function r$e(e,t,r){try{let n=e.get(or).javaContextProviderParams(r);if(n){let i=JSON.parse(n);for(let[o,a]of Object.entries(i))t.set(o,a)}}catch(n){return kn.debug(e,"Failed to get the active Java experiments for the Context Provider API",n),!1}return!0}s(r$e,"fillInJavaActiveExperiments");var Pme=Ze(yh());var aWt={type:new Pme.NotificationType("featureFlagsNotification")},lWt={type:new Pme.NotificationType("copilot/didChangeFeatureFlags")},oD=class{constructor(t){this.ctx=t;Ks(t,r=>this.sendNotification(r))}static{s(this,"FeatureFlagsNotifier")}async sendNotification(t){let r=this.ctx,n=r.get(or),i=await n.updateExPValuesAndAssignments(),o=!1;t.envelope.chat_enabled&&(o=n.ideEnableCopilotEditsAgent(i));let a=n.ideEnableCopilotNewBilling(i),l={};r.get(or).excludeRelatedFiles(i)&&(l.ExcludeRelatedFiles=!0);let c=ine(r,i);c.length>0&&(l.ExpContextProviders=c);let u=new Map;L8e(r,c,u,i),RO(r,u,i),r$e(r,u,i);for(let[h,p]of u.entries())l[h]=p;let f=r.get(Go),m=r.get(Wr).connection;if(f.getCapabilities().didChangeFeatureFlags)await m.sendNotification(lWt.type,{envelope:{...t.envelope,token:void 0,expires_at:void 0,refresh_in:void 0,user_notification:void 0,limited_user_quotas:void 0,limited_user_reset_date:void 0,error_details:void 0,organization_list:void 0,enterprise_list:void 0,endpoints:void 0},token:t.getTokenValues(),activeExps:l,cea:o,cnb:a});else{let h={rt:t.getTokenValue("rt")==="1",sn:t.getTokenValue("sn")==="1",chat:t.envelope.chat_enabled??!1,ic:t.envelope.chat_enabled??!1,pc:!0,cea:o,cnb:a,ae:l};t.envelope.xcode_chat&&t.envelope.chat_enabled&&(h.xc=!0),await m.sendNotification(aWt.type,h)}}};d();var vz=class extends Ki{constructor(r){super();this.ctx=r;this.notificationEndpoint="statusNotification"}static{s(this,"NotificationStatusReporter")}didChange(r){let n=r.kind;r.busy&&n!=="Error"&&(n="InProgress"),this.ctx.get(Wr).connection.sendNotification(PZ.type,{busy:r.busy,kind:r.kind,status:n,message:r.message??""}),this.ctx.get(Wr).connection.sendNotification("didChangeStatus",{busy:r.busy,kind:r.kind,message:r.message})}};d();var n$e=new VT;d();d();d();var Fu=new Gt("CopilotMCP");d();var Nme=/[^a-z0-9_-]/gi,cWt=process.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function i$e(){let e={};for(let t of cWt){let r=process.env[t];r!==void 0&&(r.startsWith("()")||(e[t]=r))}return e}s(i$e,"getDefaultEnvironment");function o$e(e,t){return t.description||(Fu.warn(e,`Tool ${t.name} does not have a description. Tools must be accurately described to be called`),t.description="<empty>"),Nme.lastIndex=0,Nme.test(t.name)?(Fu.warn(e,`Tool ${JSON.stringify(t.name)} is invalid. Tools names may only contain [a-zA-Z0-9_-]`),t._nameForModel=t.name.replace(Nme,"_")):t._nameForModel=t.name,t}s(o$e,"normalizeTool");d();d();d();d();var ro;(function(e){e.assertEqual=i=>i;function t(i){}s(t,"assertIs"),e.assertIs=t;function r(i){throw new Error}s(r,"assertNever"),e.assertNever=r,e.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},e.getValidEnumValues=i=>{let o=e.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),a={};for(let l of o)a[l]=i[l];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(let a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}s(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(ro||(ro={}));var Fme;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Fme||(Fme={}));var Dr=ro.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),N2=s(e=>{switch(typeof e){case"undefined":return Dr.undefined;case"string":return Dr.string;case"number":return isNaN(e)?Dr.nan:Dr.number;case"boolean":return Dr.boolean;case"function":return Dr.function;case"bigint":return Dr.bigint;case"symbol":return Dr.symbol;case"object":return Array.isArray(e)?Dr.array:e===null?Dr.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Dr.promise:typeof Map<"u"&&e instanceof Map?Dr.map:typeof Set<"u"&&e instanceof Set?Dr.set:typeof Date<"u"&&e instanceof Date?Dr.date:Dr.object;default:return Dr.unknown}},"getParsedType"),Ht=ro.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),uWt=s(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Kf=class e extends Error{static{s(this,"ZodError")}get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},i=s(o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let l=n,c=0;for(;c<a.path.length;){let u=a.path[c];c===a.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(a))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}},"processError");return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ro.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Kf.create=e=>new Kf(e);var ZT=s((e,t)=>{let r;switch(e.code){case Ht.invalid_type:e.received===Dr.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ht.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ro.jsonStringifyReplacer)}`;break;case Ht.unrecognized_keys:r=`Unrecognized key(s) in object: ${ro.joinValues(e.keys,", ")}`;break;case Ht.invalid_union:r="Invalid input";break;case Ht.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ro.joinValues(e.options)}`;break;case Ht.invalid_enum_value:r=`Invalid enum value. Expected ${ro.joinValues(e.options)}, received '${e.received}'`;break;case Ht.invalid_arguments:r="Invalid function arguments";break;case Ht.invalid_return_type:r="Invalid function return type";break;case Ht.invalid_date:r="Invalid date";break;case Ht.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ro.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ht.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ht.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ht.custom:r="Invalid input";break;case Ht.invalid_intersection_types:r="Intersection results could not be merged";break;case Ht.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ht.not_finite:r="Number must be finite";break;default:r=t.defaultError,ro.assertNever(e)}return{message:r}},"errorMap"),c$e=ZT;function fWt(e){c$e=e}s(fWt,"setErrorMap");function bz(){return c$e}s(bz,"getErrorMap");var Ez=s(e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let l="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)l=u(a,{data:t,defaultError:l}).message;return{...i,path:o,message:l}},"makeIssue"),dWt=[];function Er(e,t){let r=bz(),n=Ez({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ZT?void 0:ZT].filter(i=>!!i)});e.common.issues.push(n)}s(Er,"addIssueToContext");var i0=class e{static{s(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return Un;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Un;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}},Un=Object.freeze({status:"aborted"}),XT=s(e=>({status:"dirty",value:e}),"DIRTY"),O0=s(e=>({status:"valid",value:e}),"OK"),Mme=s(e=>e.status==="aborted","isAborted"),Qme=s(e=>e.status==="dirty","isDirty"),bE=s(e=>e.status==="valid","isValid"),lD=s(e=>typeof Promise<"u"&&e instanceof Promise,"isAsync");function Iz(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}s(Iz,"__classPrivateFieldGet");function u$e(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}s(u$e,"__classPrivateFieldSet");var jr;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(jr||(jr={}));var sD,aD,Im=class{static{s(this,"ParseInputLazyPath")}constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},s$e=s((e,t)=>{if(bE(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Kf(e.common.issues);return this._error=r,this._error}}},"handleResult");function ti(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:s((a,l)=>{var c,u;let{message:f}=e;return a.code==="invalid_enum_value"?{message:f??l.defaultError}:typeof l.data>"u"?{message:(c=f??n)!==null&&c!==void 0?c:l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:l.defaultError}},"customMap"),description:i}}s(ti,"processCreateParams");var ri=class{static{s(this,"ZodType")}get description(){return this._def.description}_getType(t){return N2(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:N2(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new i0,ctx:{common:t.parent.common,data:t.data,parsedType:N2(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(lD(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:N2(t)},o=this._parseSync({data:t,path:i.path,parent:i});return s$e(i,o)}"~validate"(t){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:N2(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:i});return bE(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(r=o?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>bE(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:N2(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(lD(i)?i:Promise.resolve(i));return s$e(n,o)}refine(t,r){let n=s(i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r,"getIssueProperties");return this._refinement((i,o)=>{let a=t(i),l=s(()=>o.addIssue({code:Ht.custom,...n(i)}),"setError");return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Jf({schema:this,typeName:Pn.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s(r=>this["~validate"](r),"validate")}}optional(){return Em.create(this,this._def)}nullable(){return v1.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return F2.create(this)}promise(){return D3.create(this,this._def)}or(t){return RE.create([this,t],this._def)}and(t){return kE.create(this,t,this._def)}transform(t){return new Jf({...ti(this._def),schema:this,typeName:Pn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new LE({...ti(this._def),innerType:this,defaultValue:r,typeName:Pn.ZodDefault})}brand(){return new cD({typeName:Pn.ZodBranded,type:this,...ti(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new FE({...ti(this._def),innerType:this,catchValue:r,typeName:Pn.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return uD.create(this,t)}readonly(){return ME.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mWt=/^c[^\s-]{8,}$/i,hWt=/^[0-9a-z]+$/,pWt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gWt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,AWt=/^[a-z0-9_-]{21}$/i,yWt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,CWt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xWt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vWt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Lme,bWt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,EWt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,IWt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,TWt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wWt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_Wt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,f$e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",SWt=new RegExp(`^${f$e}$`);function d$e(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}s(d$e,"timeRegexSource");function RWt(e){return new RegExp(`^${d$e(e)}$`)}s(RWt,"timeRegex");function m$e(e){let t=`${f$e}T${d$e(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}s(m$e,"datetimeRegex");function kWt(e,t){return!!((t==="v4"||!t)&&bWt.test(e)||(t==="v6"||!t)&&IWt.test(e))}s(kWt,"isValidIP");function BWt(e,t){if(!yWt.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}s(BWt,"isValidJWT");function DWt(e,t){return!!((t==="v4"||!t)&&EWt.test(e)||(t==="v6"||!t)&&TWt.test(e))}s(DWt,"isValidCidr");var k3=class e extends ri{static{s(this,"ZodString")}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Dr.string){let o=this._getOrReturnCtx(t);return Er(o,{code:Ht.invalid_type,expected:Dr.string,received:o.parsedType}),Un}let n=new i0,i;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,l=t.data.length<o.value;(a||l)&&(i=this._getOrReturnCtx(t,i),a?Er(i,{code:Ht.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&Er(i,{code:Ht.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")xWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"email",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Lme||(Lme=new RegExp(vWt,"u")),Lme.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"emoji",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")gWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"uuid",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")AWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"nanoid",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")mWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"cuid",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")hWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"cuid2",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")pWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"ulid",code:Ht.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Er(i,{validation:"url",code:Ht.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"regex",code:Ht.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?m$e(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?SWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?RWt(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?CWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"duration",code:Ht.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?kWt(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"ip",code:Ht.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?BWt(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"jwt",code:Ht.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?DWt(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"cidr",code:Ht.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?wWt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"base64",code:Ht.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?_Wt.test(t.data)||(i=this._getOrReturnCtx(t,i),Er(i,{validation:"base64url",code:Ht.invalid_string,message:o.message}),n.dirty()):ro.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:Ht.invalid_string,...jr.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...jr.errToObj(t)})}url(t){return this._addCheck({kind:"url",...jr.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...jr.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...jr.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...jr.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...jr.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...jr.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...jr.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...jr.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...jr.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...jr.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...jr.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...jr.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(n=t?.local)!==null&&n!==void 0?n:!1,...jr.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...jr.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...jr.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...jr.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...jr.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...jr.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...jr.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...jr.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...jr.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...jr.errToObj(r)})}nonempty(t){return this.min(1,jr.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};k3.create=e=>{var t;return new k3({checks:[],typeName:Pn.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...ti(e)})};function PWt(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}s(PWt,"floatSafeRemainder");var EE=class e extends ri{static{s(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Dr.number){let o=this._getOrReturnCtx(t);return Er(o,{code:Ht.invalid_type,expected:Dr.number,received:o.parsedType}),Un}let n,i=new i0;for(let o of this._def.checks)o.kind==="int"?ro.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?PWt(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.not_finite,message:o.message}),i.dirty()):ro.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,jr.toString(r))}gt(t,r){return this.setLimit("min",t,!1,jr.toString(r))}lte(t,r){return this.setLimit("max",t,!0,jr.toString(r))}lt(t,r){return this.setLimit("max",t,!1,jr.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:jr.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:jr.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:jr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:jr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:jr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:jr.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:jr.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:jr.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:jr.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:jr.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ro.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};EE.create=e=>new EE({checks:[],typeName:Pn.ZodNumber,coerce:e?.coerce||!1,...ti(e)});var IE=class e extends ri{static{s(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Dr.bigint)return this._getInvalidInput(t);let n,i=new i0;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Er(n,{code:Ht.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):ro.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return Er(r,{code:Ht.invalid_type,expected:Dr.bigint,received:r.parsedType}),Un}gte(t,r){return this.setLimit("min",t,!0,jr.toString(r))}gt(t,r){return this.setLimit("min",t,!1,jr.toString(r))}lte(t,r){return this.setLimit("max",t,!0,jr.toString(r))}lt(t,r){return this.setLimit("max",t,!1,jr.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:jr.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:jr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:jr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:jr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:jr.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:jr.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};IE.create=e=>{var t;return new IE({checks:[],typeName:Pn.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...ti(e)})};var TE=class extends ri{static{s(this,"ZodBoolean")}_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Dr.boolean){let n=this._getOrReturnCtx(t);return Er(n,{code:Ht.invalid_type,expected:Dr.boolean,received:n.parsedType}),Un}return O0(t.data)}};TE.create=e=>new TE({typeName:Pn.ZodBoolean,coerce:e?.coerce||!1,...ti(e)});var wE=class e extends ri{static{s(this,"ZodDate")}_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Dr.date){let o=this._getOrReturnCtx(t);return Er(o,{code:Ht.invalid_type,expected:Dr.date,received:o.parsedType}),Un}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return Er(o,{code:Ht.invalid_date}),Un}let n=new i0,i;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),Er(i,{code:Ht.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):ro.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:jr.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:jr.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};wE.create=e=>new wE({checks:[],coerce:e?.coerce||!1,typeName:Pn.ZodDate,...ti(e)});var ew=class extends ri{static{s(this,"ZodSymbol")}_parse(t){if(this._getType(t)!==Dr.symbol){let n=this._getOrReturnCtx(t);return Er(n,{code:Ht.invalid_type,expected:Dr.symbol,received:n.parsedType}),Un}return O0(t.data)}};ew.create=e=>new ew({typeName:Pn.ZodSymbol,...ti(e)});var _E=class extends ri{static{s(this,"ZodUndefined")}_parse(t){if(this._getType(t)!==Dr.undefined){let n=this._getOrReturnCtx(t);return Er(n,{code:Ht.invalid_type,expected:Dr.undefined,received:n.parsedType}),Un}return O0(t.data)}};_E.create=e=>new _E({typeName:Pn.ZodUndefined,...ti(e)});var SE=class extends ri{static{s(this,"ZodNull")}_parse(t){if(this._getType(t)!==Dr.null){let n=this._getOrReturnCtx(t);return Er(n,{code:Ht.invalid_type,expected:Dr.null,received:n.parsedType}),Un}return O0(t.data)}};SE.create=e=>new SE({typeName:Pn.ZodNull,...ti(e)});var B3=class extends ri{static{s(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(t){return O0(t.data)}};B3.create=e=>new B3({typeName:Pn.ZodAny,...ti(e)});var L2=class extends ri{static{s(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(t){return O0(t.data)}};L2.create=e=>new L2({typeName:Pn.ZodUnknown,...ti(e)});var lp=class extends ri{static{s(this,"ZodNever")}_parse(t){let r=this._getOrReturnCtx(t);return Er(r,{code:Ht.invalid_type,expected:Dr.never,received:r.parsedType}),Un}};lp.create=e=>new lp({typeName:Pn.ZodNever,...ti(e)});var tw=class extends ri{static{s(this,"ZodVoid")}_parse(t){if(this._getType(t)!==Dr.undefined){let n=this._getOrReturnCtx(t);return Er(n,{code:Ht.invalid_type,expected:Dr.void,received:n.parsedType}),Un}return O0(t.data)}};tw.create=e=>new tw({typeName:Pn.ZodVoid,...ti(e)});var F2=class e extends ri{static{s(this,"ZodArray")}_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==Dr.array)return Er(r,{code:Ht.invalid_type,expected:Dr.array,received:r.parsedType}),Un;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,l=r.data.length<i.exactLength.value;(a||l)&&(Er(r,{code:a?Ht.too_big:Ht.too_small,minimum:l?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(Er(r,{code:Ht.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(Er(r,{code:Ht.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,l)=>i.type._parseAsync(new Im(r,a,r.path,l)))).then(a=>i0.mergeArray(n,a));let o=[...r.data].map((a,l)=>i.type._parseSync(new Im(r,a,r.path,l)));return i0.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:jr.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:jr.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:jr.toString(r)}})}nonempty(t){return this.min(1,t)}};F2.create=(e,t)=>new F2({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Pn.ZodArray,...ti(t)});function JT(e){if(e instanceof Mu){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Em.create(JT(n))}return new Mu({...e._def,shape:s(()=>t,"shape")})}else return e instanceof F2?new F2({...e._def,type:JT(e.element)}):e instanceof Em?Em.create(JT(e.unwrap())):e instanceof v1?v1.create(JT(e.unwrap())):e instanceof x1?x1.create(e.items.map(t=>JT(t))):e}s(JT,"deepPartialify");var Mu=class e extends ri{static{s(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ro.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Dr.object){let u=this._getOrReturnCtx(t);return Er(u,{code:Ht.invalid_type,expected:Dr.object,received:u.parsedType}),Un}let{status:n,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof lp&&this._def.unknownKeys==="strip"))for(let u in i.data)a.includes(u)||l.push(u);let c=[];for(let u of a){let f=o[u],m=i.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new Im(i,m,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof lp){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of l)c.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(u==="strict")l.length>0&&(Er(i,{code:Ht.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let f of l){let m=i.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new Im(i,m,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let m=await f.key,h=await f.value;u.push({key:m,value:h,alwaysSet:f.alwaysSet})}return u}).then(u=>i0.mergeObjectSync(n,u)):i0.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return jr.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:s((r,n)=>{var i,o,a,l;let c=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(l=jr.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}},"errorMap")}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:s(()=>({...this._def.shape(),...t}),"shape")})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:s(()=>({...this._def.shape(),...t._def.shape()}),"shape"),typeName:Pn.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return ro.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:s(()=>r,"shape")})}omit(t){let r={};return ro.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:s(()=>r,"shape")})}deepPartial(){return JT(this)}partial(t){let r={};return ro.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new e({...this._def,shape:s(()=>r,"shape")})}required(t){let r={};return ro.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Em;)o=o._def.innerType;r[n]=o}}),new e({...this._def,shape:s(()=>r,"shape")})}keyof(){return h$e(ro.objectKeys(this.shape))}};Mu.create=(e,t)=>new Mu({shape:s(()=>e,"shape"),unknownKeys:"strip",catchall:lp.create(),typeName:Pn.ZodObject,...ti(t)});Mu.strictCreate=(e,t)=>new Mu({shape:s(()=>e,"shape"),unknownKeys:"strict",catchall:lp.create(),typeName:Pn.ZodObject,...ti(t)});Mu.lazycreate=(e,t)=>new Mu({shape:e,unknownKeys:"strip",catchall:lp.create(),typeName:Pn.ZodObject,...ti(t)});var RE=class extends ri{static{s(this,"ZodUnion")}_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(o){for(let l of o)if(l.result.status==="valid")return l.result;for(let l of o)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;let a=o.map(l=>new Kf(l.ctx.common.issues));return Er(r,{code:Ht.invalid_union,unionErrors:a}),Un}if(s(i,"handleResults"),r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let l=a.map(c=>new Kf(c));return Er(r,{code:Ht.invalid_union,unionErrors:l}),Un}}get options(){return this._def.options}};RE.create=(e,t)=>new RE({options:e,typeName:Pn.ZodUnion,...ti(t)});var P2=s(e=>e instanceof BE?P2(e.schema):e instanceof Jf?P2(e.innerType()):e instanceof DE?[e.value]:e instanceof PE?e.options:e instanceof NE?ro.objectValues(e.enum):e instanceof LE?P2(e._def.innerType):e instanceof _E?[void 0]:e instanceof SE?[null]:e instanceof Em?[void 0,...P2(e.unwrap())]:e instanceof v1?[null,...P2(e.unwrap())]:e instanceof cD||e instanceof ME?P2(e.unwrap()):e instanceof FE?P2(e._def.innerType):[],"getDiscriminator"),Tz=class e extends ri{static{s(this,"ZodDiscriminatedUnion")}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==Dr.object)return Er(r,{code:Ht.invalid_type,expected:Dr.object,received:r.parsedType}),Un;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(Er(r,{code:Ht.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Un)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let o of r){let a=P2(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let l of a){if(i.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);i.set(l,o)}}return new e({typeName:Pn.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...ti(n)})}};function Ome(e,t){let r=N2(e),n=N2(t);if(e===t)return{valid:!0,data:e};if(r===Dr.object&&n===Dr.object){let i=ro.objectKeys(t),o=ro.objectKeys(e).filter(l=>i.indexOf(l)!==-1),a={...e,...t};for(let l of o){let c=Ome(e[l],t[l]);if(!c.valid)return{valid:!1};a[l]=c.data}return{valid:!0,data:a}}else if(r===Dr.array&&n===Dr.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let a=e[o],l=t[o],c=Ome(a,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===Dr.date&&n===Dr.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}s(Ome,"mergeValues");var kE=class extends ri{static{s(this,"ZodIntersection")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=s((o,a)=>{if(Mme(o)||Mme(a))return Un;let l=Ome(o.value,a.value);return l.valid?((Qme(o)||Qme(a))&&r.dirty(),{status:r.value,value:l.data}):(Er(n,{code:Ht.invalid_intersection_types}),Un)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};kE.create=(e,t,r)=>new kE({left:e,right:t,typeName:Pn.ZodIntersection,...ti(r)});var x1=class e extends ri{static{s(this,"ZodTuple")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Dr.array)return Er(n,{code:Ht.invalid_type,expected:Dr.array,received:n.parsedType}),Un;if(n.data.length<this._def.items.length)return Er(n,{code:Ht.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Un;!this._def.rest&&n.data.length>this._def.items.length&&(Er(n,{code:Ht.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,l)=>{let c=this._def.items[l]||this._def.rest;return c?c._parse(new Im(n,a,n.path,l)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>i0.mergeArray(r,a)):i0.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};x1.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new x1({items:e,typeName:Pn.ZodTuple,rest:null,...ti(t)})};var wz=class e extends ri{static{s(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Dr.object)return Er(n,{code:Ht.invalid_type,expected:Dr.object,received:n.parsedType}),Un;let i=[],o=this._def.keyType,a=this._def.valueType;for(let l in n.data)i.push({key:o._parse(new Im(n,l,n.path,l)),value:a._parse(new Im(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?i0.mergeObjectAsync(r,i):i0.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof ri?new e({keyType:t,valueType:r,typeName:Pn.ZodRecord,...ti(n)}):new e({keyType:k3.create(),valueType:t,typeName:Pn.ZodRecord,...ti(r)})}},rw=class extends ri{static{s(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Dr.map)return Er(n,{code:Ht.invalid_type,expected:Dr.map,received:n.parsedType}),Un;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([l,c],u)=>({key:i._parse(new Im(n,l,n.path,[u,"key"])),value:o._parse(new Im(n,c,n.path,[u,"value"]))}));if(n.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return Un;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),l.set(u.value,f.value)}return{status:r.value,value:l}})}else{let l=new Map;for(let c of a){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return Un;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),l.set(u.value,f.value)}return{status:r.value,value:l}}}};rw.create=(e,t,r)=>new rw({valueType:t,keyType:e,typeName:Pn.ZodMap,...ti(r)});var nw=class e extends ri{static{s(this,"ZodSet")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Dr.set)return Er(n,{code:Ht.invalid_type,expected:Dr.set,received:n.parsedType}),Un;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(Er(n,{code:Ht.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(Er(n,{code:Ht.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(c){let u=new Set;for(let f of c){if(f.status==="aborted")return Un;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}s(a,"finalizeSet");let l=[...n.data.values()].map((c,u)=>o._parse(new Im(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>a(c)):a(l)}min(t,r){return new e({...this._def,minSize:{value:t,message:jr.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:jr.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};nw.create=(e,t)=>new nw({valueType:e,minSize:null,maxSize:null,typeName:Pn.ZodSet,...ti(t)});var _z=class e extends ri{static{s(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==Dr.function)return Er(r,{code:Ht.invalid_type,expected:Dr.function,received:r.parsedType}),Un;function n(l,c){return Ez({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,bz(),ZT].filter(u=>!!u),issueData:{code:Ht.invalid_arguments,argumentsError:c}})}s(n,"makeArgsIssue");function i(l,c){return Ez({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,bz(),ZT].filter(u=>!!u),issueData:{code:Ht.invalid_return_type,returnTypeError:c}})}s(i,"makeReturnsIssue");let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof D3){let l=this;return O0(async function(...c){let u=new Kf([]),f=await l._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(n(c,p)),u}),m=await Reflect.apply(a,this,f);return await l._def.returns._def.type.parseAsync(m,o).catch(p=>{throw u.addIssue(i(m,p)),u})})}else{let l=this;return O0(function(...c){let u=l._def.args.safeParse(c,o);if(!u.success)throw new Kf([n(c,u.error)]);let f=Reflect.apply(a,this,u.data),m=l._def.returns.safeParse(f,o);if(!m.success)throw new Kf([i(f,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:x1.create(t).rest(L2.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||x1.create([]).rest(L2.create()),returns:r||L2.create(),typeName:Pn.ZodFunction,...ti(n)})}},BE=class extends ri{static{s(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};BE.create=(e,t)=>new BE({getter:e,typeName:Pn.ZodLazy,...ti(t)});var DE=class extends ri{static{s(this,"ZodLiteral")}_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return Er(r,{received:r.data,code:Ht.invalid_literal,expected:this._def.value}),Un}return{status:"valid",value:t.data}}get value(){return this._def.value}};DE.create=(e,t)=>new DE({value:e,typeName:Pn.ZodLiteral,...ti(t)});function h$e(e,t){return new PE({values:e,typeName:Pn.ZodEnum,...ti(t)})}s(h$e,"createZodEnum");var PE=class e extends ri{static{s(this,"ZodEnum")}constructor(){super(...arguments),sD.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return Er(r,{expected:ro.joinValues(n),received:r.parsedType,code:Ht.invalid_type}),Un}if(Iz(this,sD,"f")||u$e(this,sD,new Set(this._def.values),"f"),!Iz(this,sD,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return Er(r,{received:r.data,code:Ht.invalid_enum_value,options:n}),Un}return O0(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};sD=new WeakMap;PE.create=h$e;var NE=class extends ri{static{s(this,"ZodNativeEnum")}constructor(){super(...arguments),aD.set(this,void 0)}_parse(t){let r=ro.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Dr.string&&n.parsedType!==Dr.number){let i=ro.objectValues(r);return Er(n,{expected:ro.joinValues(i),received:n.parsedType,code:Ht.invalid_type}),Un}if(Iz(this,aD,"f")||u$e(this,aD,new Set(ro.getValidEnumValues(this._def.values)),"f"),!Iz(this,aD,"f").has(t.data)){let i=ro.objectValues(r);return Er(n,{received:n.data,code:Ht.invalid_enum_value,options:i}),Un}return O0(t.data)}get enum(){return this._def.values}};aD=new WeakMap;NE.create=(e,t)=>new NE({values:e,typeName:Pn.ZodNativeEnum,...ti(t)});var D3=class extends ri{static{s(this,"ZodPromise")}unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==Dr.promise&&r.common.async===!1)return Er(r,{code:Ht.invalid_type,expected:Dr.promise,received:r.parsedType}),Un;let n=r.parsedType===Dr.promise?r.data:Promise.resolve(r.data);return O0(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};D3.create=(e,t)=>new D3({type:e,typeName:Pn.ZodPromise,...ti(t)});var Jf=class extends ri{static{s(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s(a=>{Er(n,a),a.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async l=>{if(r.value==="aborted")return Un;let c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?Un:c.status==="dirty"||r.value==="dirty"?XT(c.value):c});{if(r.value==="aborted")return Un;let l=this._def.schema._parseSync({data:a,path:n.path,parent:n});return l.status==="aborted"?Un:l.status==="dirty"||r.value==="dirty"?XT(l.value):l}}if(i.type==="refinement"){let a=s(l=>{let c=i.refinement(l,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l},"executeRefinement");if(n.common.async===!1){let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?Un:(l.status==="dirty"&&r.dirty(),a(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?Un:(l.status==="dirty"&&r.dirty(),a(l.value).then(()=>({status:r.value,value:l.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!bE(a))return a;let l=i.transform(a.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>bE(a)?Promise.resolve(i.transform(a.value,o)).then(l=>({status:r.value,value:l})):a);ro.assertNever(i)}};Jf.create=(e,t,r)=>new Jf({schema:e,typeName:Pn.ZodEffects,effect:t,...ti(r)});Jf.createWithPreprocess=(e,t,r)=>new Jf({schema:t,effect:{type:"preprocess",transform:e},typeName:Pn.ZodEffects,...ti(r)});var Em=class extends ri{static{s(this,"ZodOptional")}_parse(t){return this._getType(t)===Dr.undefined?O0(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Em.create=(e,t)=>new Em({innerType:e,typeName:Pn.ZodOptional,...ti(t)});var v1=class extends ri{static{s(this,"ZodNullable")}_parse(t){return this._getType(t)===Dr.null?O0(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};v1.create=(e,t)=>new v1({innerType:e,typeName:Pn.ZodNullable,...ti(t)});var LE=class extends ri{static{s(this,"ZodDefault")}_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===Dr.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};LE.create=(e,t)=>new LE({innerType:e,typeName:Pn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ti(t)});var FE=class extends ri{static{s(this,"ZodCatch")}_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return lD(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Kf(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Kf(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};FE.create=(e,t)=>new FE({innerType:e,typeName:Pn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ti(t)});var iw=class extends ri{static{s(this,"ZodNaN")}_parse(t){if(this._getType(t)!==Dr.nan){let n=this._getOrReturnCtx(t);return Er(n,{code:Ht.invalid_type,expected:Dr.nan,received:n.parsedType}),Un}return{status:"valid",value:t.data}}};iw.create=e=>new iw({typeName:Pn.ZodNaN,...ti(e)});var NWt=Symbol("zod_brand"),cD=class extends ri{static{s(this,"ZodBranded")}_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},uD=class e extends ri{static{s(this,"ZodPipeline")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return s(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Un:o.status==="dirty"?(r.dirty(),XT(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})},"handleAsync")();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Un:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:Pn.ZodPipeline})}},ME=class extends ri{static{s(this,"ZodReadonly")}_parse(t){let r=this._def.innerType._parse(t),n=s(i=>(bE(i)&&(i.value=Object.freeze(i.value)),i),"freeze");return lD(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};ME.create=(e,t)=>new ME({innerType:e,typeName:Pn.ZodReadonly,...ti(t)});function a$e(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}s(a$e,"cleanParams");function p$e(e,t={},r){return e?B3.create().superRefine((n,i)=>{var o,a;let l=e(n);if(l instanceof Promise)return l.then(c=>{var u,f;if(!c){let m=a$e(t,n),h=(f=(u=m.fatal)!==null&&u!==void 0?u:r)!==null&&f!==void 0?f:!0;i.addIssue({code:"custom",...m,fatal:h})}});if(!l){let c=a$e(t,n),u=(a=(o=c.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...c,fatal:u})}}):B3.create()}s(p$e,"custom");var LWt={object:Mu.lazycreate},Pn;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Pn||(Pn={}));var FWt=s((e,t={message:`Input not instance of ${e.name}`})=>p$e(r=>r instanceof e,t),"instanceOfType"),g$e=k3.create,A$e=EE.create,MWt=iw.create,QWt=IE.create,y$e=TE.create,OWt=wE.create,UWt=ew.create,qWt=_E.create,WWt=SE.create,GWt=B3.create,HWt=L2.create,jWt=lp.create,VWt=tw.create,$Wt=F2.create,zWt=Mu.create,YWt=Mu.strictCreate,KWt=RE.create,JWt=Tz.create,XWt=kE.create,ZWt=x1.create,eGt=wz.create,tGt=rw.create,rGt=nw.create,nGt=_z.create,iGt=BE.create,oGt=DE.create,sGt=PE.create,aGt=NE.create,lGt=D3.create,l$e=Jf.create,cGt=Em.create,uGt=v1.create,fGt=Jf.createWithPreprocess,dGt=uD.create,mGt=s(()=>g$e().optional(),"ostring"),hGt=s(()=>A$e().optional(),"onumber"),pGt=s(()=>y$e().optional(),"oboolean"),gGt={string:s(e=>k3.create({...e,coerce:!0}),"string"),number:s(e=>EE.create({...e,coerce:!0}),"number"),boolean:s(e=>TE.create({...e,coerce:!0}),"boolean"),bigint:s(e=>IE.create({...e,coerce:!0}),"bigint"),date:s(e=>wE.create({...e,coerce:!0}),"date")},AGt=Un,xe=Object.freeze({__proto__:null,defaultErrorMap:ZT,setErrorMap:fWt,getErrorMap:bz,makeIssue:Ez,EMPTY_PATH:dWt,addIssueToContext:Er,ParseStatus:i0,INVALID:Un,DIRTY:XT,OK:O0,isAborted:Mme,isDirty:Qme,isValid:bE,isAsync:lD,get util(){return ro},get objectUtil(){return Fme},ZodParsedType:Dr,getParsedType:N2,ZodType:ri,datetimeRegex:m$e,ZodString:k3,ZodNumber:EE,ZodBigInt:IE,ZodBoolean:TE,ZodDate:wE,ZodSymbol:ew,ZodUndefined:_E,ZodNull:SE,ZodAny:B3,ZodUnknown:L2,ZodNever:lp,ZodVoid:tw,ZodArray:F2,ZodObject:Mu,ZodUnion:RE,ZodDiscriminatedUnion:Tz,ZodIntersection:kE,ZodTuple:x1,ZodRecord:wz,ZodMap:rw,ZodSet:nw,ZodFunction:_z,ZodLazy:BE,ZodLiteral:DE,ZodEnum:PE,ZodNativeEnum:NE,ZodPromise:D3,ZodEffects:Jf,ZodTransformer:Jf,ZodOptional:Em,ZodNullable:v1,ZodDefault:LE,ZodCatch:FE,ZodNaN:iw,BRAND:NWt,ZodBranded:cD,ZodPipeline:uD,ZodReadonly:ME,custom:p$e,Schema:ri,ZodSchema:ri,late:LWt,get ZodFirstPartyTypeKind(){return Pn},coerce:gGt,any:GWt,array:$Wt,bigint:QWt,boolean:y$e,date:OWt,discriminatedUnion:JWt,effect:l$e,enum:sGt,function:nGt,instanceof:FWt,intersection:XWt,lazy:iGt,literal:oGt,map:tGt,nan:MWt,nativeEnum:aGt,never:jWt,null:WWt,nullable:uGt,number:A$e,object:zWt,oboolean:pGt,onumber:hGt,optional:cGt,ostring:mGt,pipeline:dGt,preprocess:fGt,promise:lGt,record:eGt,set:rGt,strictObject:YWt,string:g$e,symbol:UWt,transformer:l$e,tuple:ZWt,undefined:qWt,union:KWt,unknown:HWt,void:VWt,NEVER:AGt,ZodIssueCode:Ht,quotelessJson:uWt,ZodError:Kf});var Ume="2025-03-26",C$e=[Ume,"2024-11-05","2024-10-07"],Sz="2.0",x$e=xe.union([xe.string(),xe.number().int()]),v$e=xe.string(),yGt=xe.object({progressToken:xe.optional(x$e)}).passthrough(),cp=xe.object({_meta:xe.optional(yGt)}).passthrough(),Xf=xe.object({method:xe.string(),params:xe.optional(cp)}),fD=xe.object({_meta:xe.optional(xe.object({}).passthrough())}).passthrough(),b1=xe.object({method:xe.string(),params:xe.optional(fD)}),up=xe.object({_meta:xe.optional(xe.object({}).passthrough())}).passthrough(),Rz=xe.union([xe.string(),xe.number().int()]),b$e=xe.object({jsonrpc:xe.literal(Sz),id:Rz}).merge(Xf).strict(),E$e=s(e=>b$e.safeParse(e).success,"isJSONRPCRequest"),I$e=xe.object({jsonrpc:xe.literal(Sz)}).merge(b1).strict(),T$e=s(e=>I$e.safeParse(e).success,"isJSONRPCNotification"),w$e=xe.object({jsonrpc:xe.literal(Sz),id:Rz,result:up}).strict(),qme=s(e=>w$e.safeParse(e).success,"isJSONRPCResponse"),P3;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(P3||(P3={}));var _$e=xe.object({jsonrpc:xe.literal(Sz),id:Rz,error:xe.object({code:xe.number().int(),message:xe.string(),data:xe.optional(xe.unknown())})}).strict(),S$e=s(e=>_$e.safeParse(e).success,"isJSONRPCError"),R$e=xe.union([b$e,I$e,w$e,_$e]),OE=up.strict(),kz=b1.extend({method:xe.literal("notifications/cancelled"),params:fD.extend({requestId:Rz,reason:xe.string().optional()})}),k$e=xe.object({name:xe.string(),version:xe.string()}).passthrough(),CGt=xe.object({experimental:xe.optional(xe.object({}).passthrough()),sampling:xe.optional(xe.object({}).passthrough()),roots:xe.optional(xe.object({listChanged:xe.optional(xe.boolean())}).passthrough())}).passthrough(),xGt=Xf.extend({method:xe.literal("initialize"),params:cp.extend({protocolVersion:xe.string(),capabilities:CGt,clientInfo:k$e})});var vGt=xe.object({experimental:xe.optional(xe.object({}).passthrough()),logging:xe.optional(xe.object({}).passthrough()),completions:xe.optional(xe.object({}).passthrough()),prompts:xe.optional(xe.object({listChanged:xe.optional(xe.boolean())}).passthrough()),resources:xe.optional(xe.object({subscribe:xe.optional(xe.boolean()),listChanged:xe.optional(xe.boolean())}).passthrough()),tools:xe.optional(xe.object({listChanged:xe.optional(xe.boolean())}).passthrough())}).passthrough(),Wme=up.extend({protocolVersion:xe.string(),capabilities:vGt,serverInfo:k$e,instructions:xe.optional(xe.string())}),bGt=b1.extend({method:xe.literal("notifications/initialized")});var Bz=Xf.extend({method:xe.literal("ping")}),EGt=xe.object({progress:xe.number(),total:xe.optional(xe.number())}).passthrough(),Dz=b1.extend({method:xe.literal("notifications/progress"),params:fD.merge(EGt).extend({progressToken:x$e})}),Pz=Xf.extend({params:cp.extend({cursor:xe.optional(v$e)}).optional()}),Nz=up.extend({nextCursor:xe.optional(v$e)}),B$e=xe.object({uri:xe.string(),mimeType:xe.optional(xe.string())}).passthrough(),D$e=B$e.extend({text:xe.string()}),P$e=B$e.extend({blob:xe.string().base64()}),IGt=xe.object({uri:xe.string(),name:xe.string(),description:xe.optional(xe.string()),mimeType:xe.optional(xe.string())}).passthrough(),TGt=xe.object({uriTemplate:xe.string(),name:xe.string(),description:xe.optional(xe.string()),mimeType:xe.optional(xe.string())}).passthrough(),wGt=Pz.extend({method:xe.literal("resources/list")}),Gme=Nz.extend({resources:xe.array(IGt)}),_Gt=Pz.extend({method:xe.literal("resources/templates/list")}),Hme=Nz.extend({resourceTemplates:xe.array(TGt)}),SGt=Xf.extend({method:xe.literal("resources/read"),params:cp.extend({uri:xe.string()})}),jme=up.extend({contents:xe.array(xe.union([D$e,P$e]))}),RGt=b1.extend({method:xe.literal("notifications/resources/list_changed")}),kGt=Xf.extend({method:xe.literal("resources/subscribe"),params:cp.extend({uri:xe.string()})}),BGt=Xf.extend({method:xe.literal("resources/unsubscribe"),params:cp.extend({uri:xe.string()})}),DGt=b1.extend({method:xe.literal("notifications/resources/updated"),params:fD.extend({uri:xe.string()})}),PGt=xe.object({name:xe.string(),description:xe.optional(xe.string()),required:xe.optional(xe.boolean())}).passthrough(),NGt=xe.object({name:xe.string(),description:xe.optional(xe.string()),arguments:xe.optional(xe.array(PGt))}).passthrough(),LGt=Pz.extend({method:xe.literal("prompts/list")}),Vme=Nz.extend({prompts:xe.array(NGt)}),FGt=Xf.extend({method:xe.literal("prompts/get"),params:cp.extend({name:xe.string(),arguments:xe.optional(xe.record(xe.string()))})}),Lz=xe.object({type:xe.literal("text"),text:xe.string()}).passthrough(),Fz=xe.object({type:xe.literal("image"),data:xe.string().base64(),mimeType:xe.string()}).passthrough(),Mz=xe.object({type:xe.literal("audio"),data:xe.string().base64(),mimeType:xe.string()}).passthrough(),N$e=xe.object({type:xe.literal("resource"),resource:xe.union([D$e,P$e])}).passthrough(),MGt=xe.object({role:xe.enum(["user","assistant"]),content:xe.union([Lz,Fz,Mz,N$e])}).passthrough(),$me=up.extend({description:xe.optional(xe.string()),messages:xe.array(MGt)}),QGt=b1.extend({method:xe.literal("notifications/prompts/list_changed")}),OGt=xe.object({title:xe.optional(xe.string()),readOnlyHint:xe.optional(xe.boolean()),destructiveHint:xe.optional(xe.boolean()),idempotentHint:xe.optional(xe.boolean()),openWorldHint:xe.optional(xe.boolean())}).passthrough(),UGt=xe.object({name:xe.string(),description:xe.optional(xe.string()),inputSchema:xe.object({type:xe.literal("object"),properties:xe.optional(xe.object({}).passthrough())}).passthrough(),annotations:xe.optional(OGt)}).passthrough(),qGt=Pz.extend({method:xe.literal("tools/list")}),zme=Nz.extend({tools:xe.array(UGt)}),Qz=up.extend({content:xe.array(xe.union([Lz,Fz,Mz,N$e])),isError:xe.boolean().default(!1).optional()}),Ooi=Qz.or(up.extend({toolResult:xe.unknown()})),WGt=Xf.extend({method:xe.literal("tools/call"),params:cp.extend({name:xe.string(),arguments:xe.optional(xe.record(xe.unknown()))})}),GGt=b1.extend({method:xe.literal("notifications/tools/list_changed")}),L$e=xe.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),HGt=Xf.extend({method:xe.literal("logging/setLevel"),params:cp.extend({level:L$e})}),jGt=b1.extend({method:xe.literal("notifications/message"),params:fD.extend({level:L$e,logger:xe.optional(xe.string()),data:xe.unknown()})}),VGt=xe.object({name:xe.string().optional()}).passthrough(),$Gt=xe.object({hints:xe.optional(xe.array(VGt)),costPriority:xe.optional(xe.number().min(0).max(1)),speedPriority:xe.optional(xe.number().min(0).max(1)),intelligencePriority:xe.optional(xe.number().min(0).max(1))}).passthrough(),zGt=xe.object({role:xe.enum(["user","assistant"]),content:xe.union([Lz,Fz,Mz])}).passthrough(),YGt=Xf.extend({method:xe.literal("sampling/createMessage"),params:cp.extend({messages:xe.array(zGt),systemPrompt:xe.optional(xe.string()),includeContext:xe.optional(xe.enum(["none","thisServer","allServers"])),temperature:xe.optional(xe.number()),maxTokens:xe.number().int(),stopSequences:xe.optional(xe.array(xe.string())),metadata:xe.optional(xe.object({}).passthrough()),modelPreferences:xe.optional($Gt)})}),KGt=up.extend({model:xe.string(),stopReason:xe.optional(xe.enum(["endTurn","stopSequence","maxTokens"]).or(xe.string())),role:xe.enum(["user","assistant"]),content:xe.discriminatedUnion("type",[Lz,Fz,Mz])}),JGt=xe.object({type:xe.literal("ref/resource"),uri:xe.string()}).passthrough(),XGt=xe.object({type:xe.literal("ref/prompt"),name:xe.string()}).passthrough(),ZGt=Xf.extend({method:xe.literal("completion/complete"),params:cp.extend({ref:xe.union([XGt,JGt]),argument:xe.object({name:xe.string(),value:xe.string()}).passthrough()})}),Yme=up.extend({completion:xe.object({values:xe.array(xe.string()).max(100),total:xe.optional(xe.number().int()),hasMore:xe.optional(xe.boolean())}).passthrough()}),eHt=xe.object({uri:xe.string().startsWith("file://"),name:xe.optional(xe.string())}).passthrough(),tHt=Xf.extend({method:xe.literal("roots/list")}),rHt=up.extend({roots:xe.array(eHt)}),nHt=b1.extend({method:xe.literal("notifications/roots/list_changed")}),Uoi=xe.union([Bz,xGt,ZGt,HGt,FGt,LGt,wGt,_Gt,SGt,kGt,BGt,WGt,qGt]),qoi=xe.union([kz,Dz,bGt,nHt]),Woi=xe.union([OE,KGt,rHt]),Goi=xe.union([Bz,YGt,tHt]),Hoi=xe.union([kz,Dz,jGt,DGt,RGt,GGt,QGt]),joi=xe.union([OE,Wme,Yme,$me,Vme,Gme,Hme,jme,Qz,zme]),QE=class extends Error{static{s(this,"McpError")}constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}};var iHt=6e4,Oz=class{static{s(this,"Protocol")}constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this.setNotificationHandler(kz,r=>{let n=this._requestHandlerAbortControllers.get(r.params.requestId);n?.abort(r.params.reason)}),this.setNotificationHandler(Dz,r=>{this._onprogress(r)}),this.setRequestHandler(Bz,r=>({}))}_setupTimeout(t,r,n,i,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),new QE(P3.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t,this._transport.onclose=()=>{this._onclose()},this._transport.onerror=r=>{this._onerror(r)},this._transport.onmessage=(r,n)=>{qme(r)||S$e(r)?this._onresponse(r):E$e(r)?this._onrequest(r,n):T$e(r)?this._onnotification(r):this._onerror(new Error(`Unknown message type: ${JSON.stringify(r)}`))},await this._transport.start()}_onclose(){var t;let r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._transport=void 0,(t=this.onclose)===null||t===void 0||t.call(this);let n=new QE(P3.ConnectionClosed,"Connection closed");for(let i of r.values())i(n)}_onerror(t){var r;(r=this.onerror)===null||r===void 0||r.call(this,t)}_onnotification(t){var r;let n=(r=this._notificationHandlers.get(t.method))!==null&&r!==void 0?r:this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,r){var n,i,o,a;let l=(n=this._requestHandlers.get(t.method))!==null&&n!==void 0?n:this.fallbackRequestHandler;if(l===void 0){(i=this._transport)===null||i===void 0||i.send({jsonrpc:"2.0",id:t.id,error:{code:P3.MethodNotFound,message:"Method not found"}}).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}let c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);let u={signal:c.signal,sessionId:(o=this._transport)===null||o===void 0?void 0:o.sessionId,_meta:(a=t.params)===null||a===void 0?void 0:a._meta,sendNotification:s(f=>this.notification(f,{relatedRequestId:t.id}),"sendNotification"),sendRequest:s((f,m,h)=>this.request(f,m,{...h,relatedRequestId:t.id}),"sendRequest"),authInfo:r?.authInfo,requestId:t.id};Promise.resolve().then(()=>l(t,u)).then(f=>{var m;if(!c.signal.aborted)return(m=this._transport)===null||m===void 0?void 0:m.send({result:f,jsonrpc:"2.0",id:t.id})},f=>{var m,h;if(!c.signal.aborted)return(m=this._transport)===null||m===void 0?void 0:m.send({jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(f.code)?f.code:P3.InternalError,message:(h=f.message)!==null&&h!==void 0?h:"Internal error"}})}).catch(f=>this._onerror(new Error(`Failed to send response: ${f}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.params,i=Number(r),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(i),l=this._timeoutInfo.get(i);if(l&&a&&l.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(c){a(c);return}o(n)}_onresponse(t){let r=Number(t.id),n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),qme(t))n(t);else{let i=new QE(t.error.code,t.error.message,t.error.data);n(i)}}get transport(){return this._transport}async close(){var t;await((t=this._transport)===null||t===void 0?void 0:t.close())}request(t,r,n){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}=n??{};return new Promise((l,c)=>{var u,f,m,h,p;if(!this._transport){c(new Error("Not connected"));return}((u=this._options)===null||u===void 0?void 0:u.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(t.method),(f=n?.signal)===null||f===void 0||f.throwIfAborted();let g=this._requestMessageId++,y={...t,jsonrpc:"2.0",id:g};n?.onprogress&&(this._progressHandlers.set(g,n.onprogress),y.params={...t.params,_meta:{progressToken:g}});let x=s(_=>{var k;this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),(k=this._transport)===null||k===void 0||k.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(_)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(B=>this._onerror(new Error(`Failed to send cancellation: ${B}`))),c(_)},"cancel");this._responseHandlers.set(g,_=>{var k;if(!(!((k=n?.signal)===null||k===void 0)&&k.aborted)){if(_ instanceof Error)return c(_);try{let B=r.parse(_.result);l(B)}catch(B){c(B)}}}),(m=n?.signal)===null||m===void 0||m.addEventListener("abort",()=>{var _;x((_=n?.signal)===null||_===void 0?void 0:_.reason)});let b=(h=n?.timeout)!==null&&h!==void 0?h:iHt,E=s(()=>x(new QE(P3.RequestTimeout,"Request timed out",{timeout:b})),"timeoutHandler");this._setupTimeout(g,b,n?.maxTotalTimeout,E,(p=n?.resetTimeoutOnProgress)!==null&&p!==void 0?p:!1),this._transport.send(y,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(_=>{this._cleanupTimeout(g),c(_)})})}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n={...t,jsonrpc:"2.0"};await this._transport.send(n,r)}setRequestHandler(t,r){let n=t.shape.method.value;this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,o)=>Promise.resolve(r(t.parse(i),o)))}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){this._notificationHandlers.set(t.shape.method.value,n=>Promise.resolve(r(t.parse(n))))}removeNotificationHandler(t){this._notificationHandlers.delete(t)}};function F$e(e,t){return Object.entries(t).reduce((r,[n,i])=>(i&&typeof i=="object"?r[n]=r[n]?{...r[n],...i}:i:r[n]=i,r),{...e})}s(F$e,"mergeCapabilities");var Uz=class extends Oz{static{s(this,"Client")}constructor(t,r){var n;super(r),this._clientInfo=t,this._capabilities=(n=r?.capabilities)!==null&&n!==void 0?n:{}}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=F$e(this._capabilities,t)}assertCapability(t,r){var n;if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n[t]))throw new Error(`Server does not support ${t} (required for ${r})`)}async connect(t,r){if(await super.connect(t),t.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:Ume,capabilities:this._capabilities,clientInfo:this._clientInfo}},Wme,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!C$e.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,this._instructions=n.instructions,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){var r,n,i,o,a;switch(t){case"logging/setLevel":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.logging))throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.prompts))throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.resources))throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!(!((o=this._serverCapabilities)===null||o===void 0)&&o.tools))throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!(!((a=this._serverCapabilities)===null||a===void 0)&&a.completions))throw new Error(`Server does not support completions (required for ${t})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(t){var r;switch(t){case"notifications/roots/list_changed":if(!(!((r=this._capabilities.roots)===null||r===void 0)&&r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"ping":break}}async ping(t){return this.request({method:"ping"},OE,t)}async complete(t,r){return this.request({method:"completion/complete",params:t},Yme,r)}async setLoggingLevel(t,r){return this.request({method:"logging/setLevel",params:{level:t}},OE,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},$me,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},Vme,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},Gme,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},Hme,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},jme,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},OE,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},OE,r)}async callTool(t,r=Qz,n){return this.request({method:"tools/call",params:t},r,n)}async listTools(t,r){return this.request({method:"tools/list",params:t},zme,r)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};d();var wze=Ze(Ize(),1),dD=Ze(require("node:process"),1),_ze=require("node:stream");d();var Wz=class{static{s(this,"ReadBuffer")}append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
`);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),BHt(r)}clear(){this._buffer=void 0}};function BHt(e){return R$e.parse(JSON.parse(e))}s(BHt,"deserializeMessage");function Tze(e){return JSON.stringify(e)+`
`}s(Tze,"serializeMessage");var DHt=dD.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function PHt(){let e={};for(let t of DHt){let r=dD.default.env[t];r!==void 0&&(r.startsWith("()")||(e[t]=r))}return e}s(PHt,"getDefaultEnvironment");var Gz=class{static{s(this,"StdioClientTransport")}constructor(t){this._abortController=new AbortController,this._readBuffer=new Wz,this._stderrStream=null,this._serverParams=t,(t.stderr==="pipe"||t.stderr==="overlapped")&&(this._stderrStream=new _ze.PassThrough)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,r)=>{var n,i,o,a,l,c;this._process=(0,wze.default)(this._serverParams.command,(n=this._serverParams.args)!==null&&n!==void 0?n:[],{env:(i=this._serverParams.env)!==null&&i!==void 0?i:PHt(),stdio:["pipe","pipe",(o=this._serverParams.stderr)!==null&&o!==void 0?o:"inherit"],shell:!1,signal:this._abortController.signal,windowsHide:dD.default.platform==="win32"&&NHt(),cwd:this._serverParams.cwd}),this._process.on("error",u=>{var f,m;if(u.name==="AbortError"){(f=this.onclose)===null||f===void 0||f.call(this);return}r(u),(m=this.onerror)===null||m===void 0||m.call(this,u)}),this._process.on("spawn",()=>{t()}),this._process.on("close",u=>{var f;this._process=void 0,(f=this.onclose)===null||f===void 0||f.call(this)}),(a=this._process.stdin)===null||a===void 0||a.on("error",u=>{var f;(f=this.onerror)===null||f===void 0||f.call(this,u)}),(l=this._process.stdout)===null||l===void 0||l.on("data",u=>{this._readBuffer.append(u),this.processReadBuffer()}),(c=this._process.stdout)===null||c===void 0||c.on("error",u=>{var f;(f=this.onerror)===null||f===void 0||f.call(this,u)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){var t,r;return this._stderrStream?this._stderrStream:(r=(t=this._process)===null||t===void 0?void 0:t.stderr)!==null&&r!==void 0?r:null}processReadBuffer(){for(var t,r;;)try{let n=this._readBuffer.readMessage();if(n===null)break;(t=this.onmessage)===null||t===void 0||t.call(this,n)}catch(n){(r=this.onerror)===null||r===void 0||r.call(this,n)}}async close(){this._abortController.abort(),this._process=void 0,this._readBuffer.clear()}send(t){return new Promise(r=>{var n;if(!(!((n=this._process)===null||n===void 0)&&n.stdin))throw new Error("Not connected");let i=Tze(t);this._process.stdin.write(i)?r():this._process.stdin.once("drain",r)})}};function NHt(){return"type"in dD.default}s(NHt,"isElectron");var Hz=class{constructor(t,r,n){this.transport=null;this.ctx=t,this.mcp=new Uz({name:r,version:n})}static{s(this,"MCPStdioServer")}async connect(t){t.env={...i$e(),...t.env||{}},this.transport=new Gz(t);try{await this.mcp.connect(this.transport)}catch(r){throw Fu.error(this.ctx,"Connection failed:",r),r}}async getToolsList(){let t=[];return this.transport&&(t=(await this.mcp.listTools()).tools.map(n=>{let i={name:n.name,description:n.description,inputSchema:{...n.inputSchema||{},properties:n.inputSchema?.properties||{},type:n.inputSchema?.type||"object"},_status:"enabled",_nameForModel:n.name,annotations:n.annotations};return o$e(this.ctx,i),i})),t}async callTool(t,r){let n=new Gi([],"error");try{let i=await this.mcp.callTool({name:t,arguments:r});if(i&&typeof i=="object"){if(i.content)return this.formatToolResult(i);Fu.error(this.ctx,`Error calling tool ${t}: `+JSON.stringify(i)),n.content.push(new Ci(`Error calling tool ${t}: `+JSON.stringify(i)))}else Fu.error(this.ctx,`Error calling tool ${t}: `+String(i)),n.content.push(new Ci(`Error calling tool ${t}: `+String(i)))}catch(i){Fu.error(this.ctx,`Error calling tool ${t}:`,i);let o=i instanceof Error?i.message:"An unknown error occurred";n.content.push(new Ci(`Error calling tool ${t}: `+o))}return n}formatToolResult(t){let r=new Gi([],t.isError===!0?"error":"success");for(let n of t.content)n.type==="text"?r.content.push(new Ci(n.text)):(n.type==="image"||n.type==="audio")&&r.content.push(new Xb({mimeType:n.mimeType,data:n.data}));return r}async cleanup(){this.transport&&await this.mcp.close()}};d();var jz=class extends d3{static{s(this,"McpLanguageModelTool")}constructor(t,r){super({...t,toolProvider:{id:t.serverName,displayName:t.serverName,description:t.serverName,isFirstPartyTool:!1},type:"mcp"}),this.invoker=r}prepareInvocation(t,r){let n={title:`Confirm MCP Tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`,message:`Do you want to allow the external MCP tool "${this.toolProvider.displayName}/${this.displayName}" to run?`};return{progressMessage:`Running MCP tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`,confirmationMessages:n}}async invoke(t,r,n){return await this.invoker(r.input)}async invokeConfirmation(t,r,n){if(n.isCancellationRequested)throw new pl;let i={name:this.name,title:r.title,message:r.message,input:r.input,conversationId:t.conversation.id,turnId:t.turn.id,roundId:r.roundId,toolCallId:r.toolCallId,annotations:r.annotations};try{return await t.ctx.get(qg).invokeClientToolConfirmation(t,i)}catch(o){throw new Error(`Failed to invoke client tool confirmation ${this.name}: ${String(o)}`)}}};var Sze=Ze(cl());var Vz=class e extends Qf{constructor(r){super();this.MCPServersMap=new Map;this.cachedMCPServerTools=[];this.ctx=r}static{s(this,"CLSMCPManager")}static{this.requestType=new Sze.ProtocolNotificationType("copilot/mcpTools")}async updateMCPServers(r){await this.clearAllServers();for(let n of Object.keys(r))await this.addServer({name:n,...r[n]});await this.getAndCacheAllTools(),this.registerTools(),await this.notifyClient()}getAllTools(){return this.cachedMCPServerTools}updateMCPToolStatus(r,n,i){let o=this.getTool(r,n);if(!o){Fu.error(this.ctx,`Not found MCP ${r} server ${n} tool`);return}o._status=i,i==="enabled"?this.ctx.get(Zc).getToolById(`${r}.${n}`)||this.registerTool(r,o):this.unregisterTool(r,n)}async callTool(r,n,i){let o=this.MCPServersMap.get(r);if(o){let{status:a,server:l}=o;if(a==="running"&&l)return await l.callTool(n,i)}throw new Error(`MCP server ${r} is not running`)}getTool(r,n){let o=this.getAllTools().find(a=>a.name===r)?.tools;return!o||o.length===0?null:o.find(a=>a.name===n)||null}async getAndCacheAllTools(){let r=[];for(let n of this.MCPServersMap.keys()){let i=this.MCPServersMap.get(n);try{if(i.status==="running"&&i.server){let o=await i.server.getToolsList();o.forEach(a=>{let l=a.name,c=this.getToolStatus(n,l);c&&(a._status=c)}),r.push({name:n,status:i.status,tools:o})}else i.status==="error"?r.push({name:n,status:i.status,tools:[],error:i.error}):r.push({name:n,status:i.status,tools:[]})}catch(o){Fu.error(this.ctx,`Error getting tools list for MCP server ${n}:`,o);let a=o instanceof Error?`message: ${o.message} stack: ${o.stack}`:String(o);r.push({name:n,status:i.status,tools:[],error:a})}}this.cachedMCPServerTools=r}getToolStatus(r,n){let i=this.getTool(r,n);return i?i._status:null}async addServer(r){try{this.MCPServersMap.set(r.name,{status:"stopped",server:null});let n=new Hz(this.ctx,r.name,r.version||"1.0.0");await n.connect(r),this.MCPServersMap.set(r.name,{status:"running",server:n})}catch(n){Fu.error(this.ctx,`Error initializing MCP server ${r.name}:`,n);let i=n instanceof Error?`message: ${n.message} stack: ${n.stack}`:String(n);this.MCPServersMap.set(r.name,{status:"error",server:null,error:i}),this.ctx.get(Ha).showWarningMessageOnlyOnce(`${r.name}.initialize`,`Failed to initialize MCP server '${r.name}'. Please check the logs for more details.`)}}async notifyClient(){let r=this.getAllTools();await this.ctx.get(Wr).connection.sendNotification(e.requestType,{servers:r})}registerTools(){for(let r of this.cachedMCPServerTools){let{name:n,tools:i}=r;for(let o of i)this.registerTool(n,o)}}registerTool(r,n){let{name:i,description:o,inputSchema:a,_status:l,_nameForModel:c,annotations:u}=n;Fu.debug(this.ctx,"register MCP Tool:",{...n}),l!=="disabled"&&this.ctx.get(Zc).registerTool(new jz({serverName:r,name:c,displayName:i,description:o||"",displayDescription:o||"",inputSchema:a,annotations:u},f=>(Fu.debug(this.ctx,"copilot MCP Invoker:",r,i,f),this.callTool(r,i,f))))}unregisterAllTools(){for(let r of this.cachedMCPServerTools){let{name:n,tools:i}=r;for(let o of i){let{name:a}=o;this.unregisterTool(n,a)}}}unregisterTool(r,n){this.ctx.get(Zc).unregisterTool(`${r}.${n}`)}async clearAllServers(){this.unregisterAllTools();for(let r of this.MCPServersMap.values()){let{status:n,server:i}=r;n==="running"&&i&&await i.cleanup()}this.MCPServersMap.clear()}};d();d();var LHt=new Gt("fetcher"),FHt="https://default.exp-tas.com/",$z=class extends fn{constructor(r,n,i,o){super();this.ctx=r;this.defaultFetcher=n;this.fallbackFetcher=i;this.onFallbackSuccess=o}static{s(this,"FallbackFetcher")}async fetch(r,n){try{return await this.defaultFetcher.fetch(r,n)}catch(i){if(kc(i)||`${r}/`.startsWith(FHt))throw i;LHt.info(this.ctx,`Request to <${r}> failed, attempting fallback.`,i);let o=await this.fallbackFetcher.fetch(r,n);return this.onFallbackSuccess(),o}}set proxySettings(r){this.defaultFetcher.proxySettings=r}get proxySettings(){return this.defaultFetcher.proxySettings}get name(){return this.defaultFetcher.name}async disconnectAll(){return this.defaultFetcher.disconnectAll()}makeAbortController(){return this.defaultFetcher.makeAbortController()}};var Rze=new Gt("fetcher"),zz=class extends fn{constructor(r,n=new jT(r),i=new zT(r)){super();this.ctx=r;this.helixFetcher=n;this.editorFetcher=i;this.currentFetcher=this.helixFetcher,this.fallbackFetcher=new $z(r,n,i,()=>{Rze.info(this.ctx,"Fallback fetch succeeded, switching to editor fetcher."),this.currentFetcher=this.editorFetcher}),r.get(g2).once(()=>{this.updateFetcher()}),r.get(Vf).onConfigChange(Rt.FetchStrategy,a=>{this.fetchStrategy=a,this.updateFetcher()}),this.fetchStrategy=Vn(r,Rt.FetchStrategy)}static{s(this,"AgentDelegatingFetcher")}get editorFetcherCapability(){return this.ctx.get(Go).getCapabilities().fetch??!1}updateFetcher(){let r,n;if(!this.editorFetcherCapability)n="Using Helix fetcher, editor does not have fetch capability.",r=this.helixFetcher;else if(this.fetchStrategy==="client")n="Using editor fetcher, fetch strategy set to client.",r=this.editorFetcher;else if(this.fetchStrategy==="native")n="Using Helix fetcher, fetch strategy set to native.",r=this.helixFetcher;else{let i=Vn(this.ctx,Rt.DebugUseEditorFetcher);i?.toString()==="true"?(n="Using editor fetcher, debug flag is enabled.",r=this.editorFetcher):i?.toString()==="false"?(n="Using Helix fetcher, debug flag is disabled.",r=this.helixFetcher):(n="Editor fetcher capability available, will fallback if needed.",r=this.fallbackFetcher)}this.currentFetcher!=r&&(Rze.debug(this.ctx,n),this.currentFetcher=r)}get name(){return this.currentFetcher.name}set proxySettings(r){this.helixFetcher.proxySettings=r}get proxySettings(){return this.helixFetcher.proxySettings}set rejectUnauthorized(r){super.rejectUnauthorized=r,this.helixFetcher.rejectUnauthorized=r}get rejectUnauthorized(){return super.rejectUnauthorized}fetch(r,n){return this.currentFetcher.fetch(r,n)}disconnectAll(){return this.currentFetcher.disconnectAll()}makeAbortController(){return this.currentFetcher.makeAbortController()}};d();var Yz=class extends Ha{constructor(r){super();this.ctx=r}static{s(this,"ConnectionNotificationSender")}get connection(){return this.ctx.get(Wr).connection}showWarningMessage(r,...n){return this.connection.window.showWarningMessage(r,...n)}};d();d();var kze=Ze(require("crypto")),Bze=require("os");var MHt=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function QHt(e){let t=e.replace(/-/g,":").toLowerCase();return!MHt.has(t)}s(QHt,"validateMacAddress");function OHt(){let e=(0,Bze.networkInterfaces)();for(let t in e){let r=e[t];if(r){for(let{mac:n}of r)if(QHt(n))return n}}throw new Error("Unable to retrieve mac address (unexpected format)")}s(OHt,"getMac");var ohe;function UHt(){try{let e=OHt();return kze.createHash("sha256").update(e,"utf8").digest("hex")}catch{return}}s(UHt,"getMacMachineId");function Dze(){return ohe||(ohe=UHt()||_r()),ohe}s(Dze,"getMachineId");var qHt=_r()+Date.now(),Pze=new Ds(qHt,Dze());d();d();var mD=Ze(require("node:process"),1),Ahe=require("node:buffer"),yhe=Ze(require("node:path"),1),Xze=require("node:url"),Zze=Ze(require("node:util"),1),Che=Ze(require("node:child_process"),1),qE=Ze(require("node:fs/promises"),1);d();var uhe=Ze(require("node:process"),1),Fze=Ze(require("node:os"),1),Mze=Ze(require("node:fs"),1);d();var Nze=Ze(require("node:fs"),1);d();var ahe=Ze(require("node:fs"),1);var she;function WHt(){try{return ahe.default.statSync("/.dockerenv"),!0}catch{return!1}}s(WHt,"hasDockerEnv");function GHt(){try{return ahe.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}s(GHt,"hasDockerCGroup");function lhe(){return she===void 0&&(she=WHt()||GHt()),she}s(lhe,"isDocker");var che,HHt=s(()=>{try{return Nze.default.statSync("/run/.containerenv"),!0}catch{return!1}},"hasContainerEnv");function aw(){return che===void 0&&(che=HHt()||lhe()),che}s(aw,"isInsideContainer");var Lze=s(()=>{if(uhe.default.platform!=="linux")return!1;if(Fze.default.release().toLowerCase().includes("microsoft"))return!aw();try{return Mze.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!aw():!1}catch{return!1}},"isWsl"),lw=uhe.default.env.__IS_WSL_TEST__?Lze:Lze();d();function UE(e,t,r){let n=s(i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),"define");return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=r();return n(i),i},set(i){n(i)}}),e}s(UE,"defineLazyProperty");d();var Vze=require("node:util"),Jz=Ze(require("node:process"),1),$ze=require("node:child_process");d();var Qze=require("node:util"),Oze=Ze(require("node:process"),1),Uze=require("node:child_process");var jHt=(0,Qze.promisify)(Uze.execFile);async function fhe(){if(Oze.default.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await jHt("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari"}s(fhe,"defaultBrowserId");d();d();var qze=Ze(require("node:process"),1),Wze=require("node:util"),dhe=require("node:child_process");var VHt=(0,Wze.promisify)(dhe.execFile);async function Gze(e,{humanReadableOutput:t=!0}={}){if(qze.default.platform!=="darwin")throw new Error("macOS only");let r=t?[]:["-ss"],{stdout:n}=await VHt("osascript",["-e",e,r]);return n.trim()}s(Gze,"runAppleScript");async function mhe(e){return Gze(`tell application "Finder" to set app_path to application file id "${e}" as string
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}s(mhe,"bundleName");d();var Hze=require("node:util"),jze=require("node:child_process");var $Ht=(0,Hze.promisify)(jze.execFile),zHt={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},Kz=class extends Error{static{s(this,"UnknownBrowserError")}};async function hhe(e=$Ht){let{stdout:t}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!r)throw new Kz(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:n}=r.groups,i=zHt[n];if(!i)throw new Kz(`Unknown browser ID: ${n}`);return i}s(hhe,"defaultBrowser");var YHt=(0,Vze.promisify)($ze.execFile),KHt=s(e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,t=>t.toUpperCase()),"titleize");async function phe(){if(Jz.default.platform==="darwin"){let e=await fhe();return{name:await mhe(e),id:e}}if(Jz.default.platform==="linux"){let{stdout:e}=await YHt("xdg-mime",["query","default","x-scheme-handler/http"]),t=e.trim();return{name:KHt(t.replace(/.desktop$/,"").replace("-"," ")),id:t}}if(Jz.default.platform==="win32")return hhe();throw new Error("Only macOS, Linux, and Windows are supported")}s(phe,"defaultBrowser");var JHt=Zze.default.promisify(Che.default.execFile),ghe=yhe.default.dirname((0,Xze.fileURLToPath)(importMetaUrlShim)),zze=yhe.default.join(ghe,"xdg-open"),{platform:cw,arch:Yze}=mD.default,XHt=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let r="/etc/wsl.conf",n=!1;try{await qE.default.access(r,qE.constants.F_OK),n=!0}catch{}if(!n)return e;let i=await qE.default.readFile(r,{encoding:"utf8"}),o=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return o?(t=o.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),eYe=s(async()=>`${await XHt()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,"getPowershellPathFromWsl");async function ZHt(){let e=await eYe(),r=Ahe.Buffer.from('(Get-ItemProperty -Path "HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice").ProgId',"utf16le").toString("base64"),{stdout:n}=await JHt(e,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",r],{encoding:"utf8"}),i=n.trim(),o={ChromeHTML:"com.google.chrome",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return o[i]?{id:o[i]}:{}}s(ZHt,"getWindowsDefaultBrowserFromWsl");var Kze=s(async(e,t)=>{let r;for(let n of e)try{return await t(n)}catch(i){r=i}throw r},"pTryEach"),Xz=s(async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Kze(e.app,l=>Xz({...e,app:l}));let{name:t,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(t))return Kze(t,l=>Xz({...e,app:{name:l,arguments:r}}));if(t==="browser"||t==="browserPrivate"){let l={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},c={chrome:"--incognito",firefox:"--private-window",edge:"--inPrivate"},u=lw?await ZHt():await phe();if(u.id in l){let f=l[u.id];return t==="browserPrivate"&&r.push(c[f]),Xz({...e,app:{name:uw[f],arguments:r}})}throw new Error(`${u.name} is not supported as a default browser`)}let n,i=[],o={};if(cw==="darwin")n="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),t&&i.push("-a",t);else if(cw==="win32"||lw&&!aw()&&!t){n=lw?await eYe():`${mD.default.env.SYSTEMROOT||mD.default.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),lw||(o.windowsVerbatimArguments=!0);let l=["Start"];e.wait&&l.push("-Wait"),t?(l.push(`"\`"${t}\`""`),e.target&&r.push(e.target)):e.target&&l.push(`"${e.target}"`),r.length>0&&(r=r.map(c=>`"\`"${c}\`""`),l.push("-ArgumentList",r.join(","))),e.target=Ahe.Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(t)n=t;else{let l=!ghe||ghe==="/",c=!1;try{await qE.default.access(zze,qE.constants.X_OK),c=!0}catch{}n=mD.default.versions.electron??(cw==="android"||l||!c)?"xdg-open":zze}r.length>0&&i.push(...r),e.wait||(o.stdio="ignore",o.detached=!0)}cw==="darwin"&&r.length>0&&i.push("--args",...r),e.target&&i.push(e.target);let a=Che.default.spawn(n,i,o);return e.wait?new Promise((l,c)=>{a.once("error",c),a.once("close",u=>{if(!e.allowNonzeroExitCode&&u>0){c(new Error(`Exited with code ${u}`));return}l(a)})}):(a.unref(),a)},"baseOpen"),ejt=s((e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return Xz({...t,target:e})},"open");function Jze(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Yze]:t}=e;if(!t)throw new Error(`${Yze} is not supported`);return t}s(Jze,"detectArchBinary");function xhe({[cw]:e},{wsl:t}){if(t&&lw)return Jze(t);if(!e)throw new Error(`${cw} is not supported`);return Jze(e)}s(xhe,"detectPlatformBinary");var uw={};UE(uw,"chrome",()=>xhe({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));UE(uw,"firefox",()=>xhe({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));UE(uw,"edge",()=>xhe({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));UE(uw,"browser",()=>"browser");UE(uw,"browserPrivate",()=>"browserPrivate");var Zz=ejt;var eY=class extends lc{constructor(r,n=new vhe){super();this.ctx=r;this.fallback=n}static{s(this,"AgentUrlOpener")}async open(r){let n=this.ctx.get(Wr);if(!(n.clientCapabilities?.window?.showDocument?.support&&(await n.connection.window.showDocument({uri:r,external:!0})).success))return this.fallback.open(r)}},vhe=class extends lc{static{s(this,"SpawnUrlOpener")}async open(t){await Zz(t)}};d();d();var tY=class extends lj{static{s(this,"AgentWorkspaceWatcher")}async getWatchedFiles(){return(await this.ctx.get(Xh).getWatchedFiles({workspaceUri:this.workspaceFolder.uri,workspaceFolder:this.workspaceFolder,excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!0})).watchedFiles}startWatching(){if(this.status==="ready")return;this.ctx.get(Xh).onDidChangeWatchedFiles(this.onDidChangeWatchedFilesHandler.bind(this)),this.status="ready"}stopWatching(){this.status="stopped",this.ctx.get(Xh).offDidChangeWatchedFiles(this.onDidChangeWatchedFilesHandler.bind(this))}onDidChangeWatchedFilesHandler(t){if(t.workspaceFolder.uri!==this.workspaceFolder.uri)return;let n=t.created.filter(a=>!a.isRestricted&&!a.isUnknownFileExtension);if(n.length){let a=n.map(l=>l.document).filter(l=>l!==void 0);this.onFilesCreated(a)}let i=t.changed.filter(a=>!a.isRestricted&&!a.isUnknownFileExtension);if(i.length){let a=i.map(l=>l.document).filter(l=>l!==void 0);this.onFilesUpdated(a)}let o=t.deleted.filter(a=>!a.isRestricted&&!a.isUnknownFileExtension);o.length&&this.onFilesDeleted(o.map(a=>({uri:a.uri})))}};var rY=class extends Jc{static{s(this,"AgentWorkspaceWatcherProvider")}createWatcher(t){return new tY(this.ctx,t)}shouldStartWatching(t){return!!this.ctx.get(Go).getCapabilities().watchedFiles&&(!this.hasWatcher(t)||this.getStatus(t)==="stopped")}};function tYe(e){let t=new Vf(process.env),r=mLe(t);r.set(Vf,t),r.set(g2,new g2),r.set(fn,new zz(r)),r.set(ka,new ka(r)),Dde(r,{});let n=CQe();r.set(yc,n);let i=new nD(r);r.set(en,i),r.set(nD,i);let o=new AS(r,n);r.set(AS,o),r.set(Bn,new Bn(o,i)),r.set(Dv,new Dv),r.set(Ds,Pze),r.set(gn,new Mj),r.set(vE,LVe()),r.set(ns,new ns),r.set(xo,n$e),r.set(jv,new lz(r)),r.set(Jc,new rY(r)),r.set(Xh,new Xh(r)),r.set(Bl,new Bl),r.set(ul,DO(r,YGe)),r.set(Vd,new Vd(r)),r.set(Z5,new z8),cj(r),UQe(r),a6e(r),r.set(Wr,new Wr(r,e)),r.set(Ha,new Yz(r)),r.set(lc,new eY(r)),r.set(Ki,new vz(r)),r.set(oD,new oD(r));let a=new R3(r);return r.set(Vr,a),r.set(R3,a),r.set(ps,new k9(r,process.env)),r.set(Hc,new Hc(r)),KVe(r),wLe(r),r.set(Q0,new Q0),r.set(I3,new I3),r.set(ip,new ip),r.set(gf,new cz),r.set(A1,new A1),r.set(Xg,new sj(r)),r.set(Kh,new Kh(r)),r.set(JA,new JA(r)),r.set(Za,new Za(r)),r.set(Ac,new yz(r)),r.set(FC,new xz(r)),r.set(qg,new Cz(r)),r.set(Zc,new Zc(r)),r.set(d2,new d2(r)),r.set(Jh,new Jh(r)),r.set(Qf,new Vz(r)),r.set(Gg,new Gg),r}s(tYe,"createLanguageServerContext");d();var bhe=require("events"),hD=Ze(require("fs"));var iY=Ze(cl());d();var nYe=Ze(require("fs")),iYe=Ze(require("http")),fw=Ze(require("path"));var nY=class{constructor(t,r){this.port=t;let n;this.server=iYe.createServer((i,o)=>{if(i.headers.accept&&i.headers.accept=="text/event-stream")switch(o.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}),i.url){case"/stdin":r.on("read",l=>{rYe(o,JSON.stringify(l))});return;case"/stdout":r.on("write",l=>{rYe(o,JSON.stringify(l))});return;default:o.writeHead(404),o.end();return}o.writeHead(200,{"Content-Type":"text/html"});let a=__dirname;fw.basename(__dirname)!=="debug"&&(a=fw.dirname(__dirname)),n??=nYe.readFileSync(fw.join(a,"dist","debugServer.html")).toString(),o.write(n),o.end()}),this.server.on("error",i=>{console.error(i)})}static{s(this,"DebugServer")}listen(){return this.server.listen(this.port),this}getPort(){return this.server.address().port}};function rYe(e,t){e.write("data: "+t.toString().replace(/\n/g,`
data: `)+`
`)}s(rYe,"writeData");var Ehe=class extends iY.AbstractMessageWriter{constructor(r,n){super();this.delegate=r;this.ev=n}static{s(this,"DebugMessageWriter")}async write(r){return this.ev.emit("write",r),this.delegate.write(r)}end(){this.ev.emit("end"),this.delegate.end()}},Ihe=class extends iY.AbstractMessageReader{constructor(r,n){super();this.delegate=r;this.ev=n}static{s(this,"DebugMessageReader")}listen(r){return this.delegate.listen(n=>{this.ev.emit("read",n),r(n)})}};async function oYe(e,t,r){let n,i=parseInt(e.GH_COPILOT_DEBUG_UI_PORT??e.GITHUB_COPILOT_DEBUG_UI_PORT);if(!isNaN(i)){n??=new bhe.EventEmitter;let l=new nY(i,n).listen();i===0&&await Zz(`http://localhost:${l.getPort()}`)}let o=e.GITHUB_COPILOT_RECORD??"",a;try{let l=Date.now().toString();o==="1"||o==="true"?a=hD.openSync(`stdio${l}.log`,"w"):o&&o!=="0"&&o!=="false"&&(a=hD.openSync(o.replaceAll("%s",l),"w"))}catch(l){console.error(l)}if(a){let l=s(c=>{a&&hD.appendFile(a,c,u=>{u&&(a=void 0,console.error(u))})},"log");n??=new bhe.EventEmitter,n.on("read",c=>l(`<-- ${JSON.stringify(c)}
`)),n.on("write",c=>l(`--> ${JSON.stringify(c)}
`))}return n&&(t=new Ihe(t,n),r=new Ehe(r,n)),[t,r]}s(oYe,"wrapTransports");async function cYe(){let e=C4e(process.argv.slice(2)).version(new po().getDisplayVersion()).strict().option("debug",{type:"boolean",hidden:!0}).option("clientProcessId",{type:"string",hidden:!0}).option("stdio",{type:"boolean",describe:"Use stdio"});"pkg"in process||e.option("node-ipc",{type:"boolean",describe:"Use node IPC",conflicts:"stdio"});let t=await e.parse(),r,n;t["node-ipc"]?(r=new Tm.IPCMessageReader(process),n=new Tm.IPCMessageWriter(process)):t.stdio?(r=new Tm.StreamMessageReader(process.stdin),n=new Tm.StreamMessageWriter(process.stdout)):(console.error("error: required option '--stdio' not specified"),process.exit(1)),"pkg"in process&&process.platform!=="win32"&&(process.env.TMPDIR=await sYe.mkdtemp(aYe.default.tmpdir()+"/github-copilot-"));let i=(0,Tm.createConnection)(Tm.ProposedFeatures.all,...await oYe(process.env,r,n)),o=tYe(i);console=vbe(o);let a=o.get(Wr);r.onClose(()=>a.onExit()),process.on("SIGINT",()=>{a.onExit().finally(()=>process.exit(130)).catch(()=>{})}),process.on("SIGTERM",()=>{a.onExit().finally(()=>process.exit(143)).catch(()=>{})}),a.listen()}s(cYe,"main");lYe.isMainThread?require.main===module&&cYe():Cbe()&&xbe();0&&(module.exports={getTokenizer,getTokenizerAsync,main});
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'
/*! Bundled license information:
crypto-js/ripemd160.js:
(** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
crypto-js/mode-ctr-gladman.js:
(** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*)
@microsoft/applicationinsights-common/dist/es5/applicationinsights-common.js:
(*!
* Application Insights JavaScript SDK - Common, 3.3.6
* Copyright (c) Microsoft and contributors. All rights reserved.
*)
(*! https://github.com/nevware21/ts-utils v0.11.8 *)
@microsoft/applicationinsights-web-basic/dist/es5/applicationinsights-web-basic.js:
(*!
* Application Insights JavaScript Web SDK - Basic, 3.3.6
* Copyright (c) Microsoft and contributors. All rights reserved.
*)
(*! https://github.com/nevware21/ts-utils v0.11.8 *)
(*!
* NevWare21 Solutions LLC - ts-async, 0.5.4
* https://github.com/nevware21/ts-async
* Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
* Licensed under the MIT license.
*)
git-url-parse/lib/index.js:
(*!
* buildToken
* Builds OAuth token prefix (helper function)
*
* @name buildToken
* @function
* @param {GitUrl} obj The parsed Git url object.
* @return {String} token prefix
*)
undici/lib/web/fetch/body.js:
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
undici/lib/web/websocket/frame.js:
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
@vscode/prompt-tsx/dist/base/util/vs/nls.js:
@vscode/prompt-tsx/dist/base/util/vs/common/platform.js:
@vscode/prompt-tsx/dist/base/util/vs/common/process.js:
@vscode/prompt-tsx/dist/base/util/vs/common/path.js:
@vscode/prompt-tsx/dist/base/util/vs/common/uri.js:
(*!!! DO NOT modify, this file was COPIED from 'microsoft/vscode' *)
yargs-parser/build/lib/string-utils.js:
yargs-parser/build/lib/tokenize-arg-string.js:
yargs-parser/build/lib/yargs-parser-types.js:
yargs-parser/build/lib/yargs-parser.js:
(**
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*)
yargs-parser/build/lib/index.js:
(**
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
* CJS and ESM environments.
*
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*)
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/
//# sourceMappingURL=main.js.map